prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
-- Assign hotkeys for deletion (left or right shift + X)
AssignHotkey({ 'LeftShift', 'X' }, DeleteSelection); AssignHotkey({ 'RightShift', 'X' }, DeleteSelection);
--[[[Default Controls]]
--Peripheral Deadzones Tune.Peripherals = { MSteerWidth = 67 , -- Mouse steering control width (0 - 100% of screen width) MSteerDZone = 10 , -- Mouse steering deadzone (0 - 100%) ControlLDZone = 5 , -- Controller steering L-deadzone (0 - 100%) ControlRDZone = 5 , -- Controller steering R-deadzone (0 - 100%) } --Control Mapping Tune.Controls = { --Keyboard Controls --Mode Toggles --ToggleTCS = Enum.KeyCode.T , ToggleABS = Enum.KeyCode.Y , ToggleTransMode = Enum.KeyCode.M , --ToggleMouseDrive = Enum.KeyCode.R , --Primary Controls Throttle = Enum.KeyCode.Up , Brake = Enum.KeyCode.Down , SteerLeft = Enum.KeyCode.Left , SteerRight = Enum.KeyCode.Right , --Secondary Controls Throttle2 = Enum.KeyCode.W , Brake2 = Enum.KeyCode.S , SteerLeft2 = Enum.KeyCode.A , SteerRight2 = Enum.KeyCode.D , --Manual Transmission ShiftUp = Enum.KeyCode.E , ShiftDown = Enum.KeyCode.Q , Clutch = Enum.KeyCode.LeftShift , --Handbrake PBrake = Enum.KeyCode.P , --Mouse Controls MouseThrottle = Enum.UserInputType.MouseButton1 , MouseBrake = Enum.UserInputType.MouseButton2 , MouseClutch = Enum.KeyCode.W , MouseShiftUp = Enum.KeyCode.E , MouseShiftDown = Enum.KeyCode.Q , MousePBrake = Enum.KeyCode.LeftShift , --Controller Mapping ContlrThrottle = Enum.KeyCode.ButtonR2 , ContlrBrake = Enum.KeyCode.ButtonL2 , ContlrSteer = Enum.KeyCode.Thumbstick1 , ContlrShiftUp = Enum.KeyCode.ButtonY , ContlrShiftDown = Enum.KeyCode.ButtonX , ContlrClutch = Enum.KeyCode.ButtonR1 , ContlrPBrake = Enum.KeyCode.ButtonL1 , ContlrToggleTMode = Enum.KeyCode.DPadUp , ContlrToggleTCS = Enum.KeyCode.DPadDown , ContlrToggleABS = Enum.KeyCode.DPadRight , }
-- Blood cache existing check
if not bloodCache then bloodCache = Instance.new("Folder") bloodCache.Name = "BloodCache" bloodCache.Parent = workspace end
--Automatic Gauge Scaling
if autoscaling then local Drive={} if _Tune.Config == "FWD" or _Tune.Config == "AWD" then if car.Wheels:FindFirstChild("FL")~= nil then table.insert(Drive,car.Wheels.FL) end if car.Wheels:FindFirstChild("FR")~= nil then table.insert(Drive,car.Wheels.FR) end if car.Wheels:FindFirstChild("F")~= nil then table.insert(Drive,car.Wheels.F) end end if _Tune.Config == "RWD" or _Tune.Config == "AWD" then if car.Wheels:FindFirstChild("RL")~= nil then table.insert(Drive,car.Wheels.RL) end if car.Wheels:FindFirstChild("RR")~= nil then table.insert(Drive,car.Wheels.RR) end if car.Wheels:FindFirstChild("R")~= nil then table.insert(Drive,car.Wheels.R) end end local wDia = 0 for i,v in pairs(Drive) do if v.Size.x>wDia then wDia = v.Size.x end end Drive = nil for i,v in pairs(UNITS) do v.maxSpeed = math.ceil(v.scaling*wDia*math.pi*_lRPM/60/_Tune.Ratios[#_Tune.Ratios]/_Tune.FinalDrive) v.spInc = math.max(math.ceil(v.maxSpeed/200)*20,20) end end for i=0,revEnd*2 do local ln = script.Parent.ln:clone() ln.Parent = script.Parent.Tach ln.Rotation = 45 + i * 225 / (revEnd*2) ln.Num.Text = i/2 ln.Num.Rotation = -ln.Rotation if i*500>=math.floor(_pRPM/500)*500 then ln.Frame.BackgroundColor3 = Color3.new(1,0,0) if i<revEnd*2 then ln2 = ln:clone() ln2.Parent = script.Parent.Tach ln2.Rotation = 45 + (i+.5) * 225 / (revEnd*2) ln2.Num:Destroy() ln2.Visible=true end end if i%2==0 then ln.Frame.Size = UDim2.new(0,3,0,10) ln.Frame.Position = UDim2.new(0,-1,0,100) ln.Num.Visible = false else ln.Num:Destroy() end ln.Visible=true end local lns = Instance.new("Frame",script.Parent.Speedo) lns.Name = "lns" lns.BackgroundTransparency = 1 lns.BorderSizePixel = 0 lns.Size = UDim2.new(0,0,0,0) for i=1,90 do local ln = script.Parent.ln:clone() ln.Parent = lns ln.Rotation = 45 + 225*(i/90) if i%2==0 then ln.Frame.Size = UDim2.new(0,2,0,10) ln.Frame.Position = UDim2.new(0,-1,0,100) else ln.Frame.Size = UDim2.new(0,3,0,5) end ln.Num:Destroy() ln.Visible=true end for i,v in pairs(UNITS) do local lnn = Instance.new("Frame",script.Parent.Speedo) lnn.BackgroundTransparency = 1 lnn.BorderSizePixel = 0 lnn.Size = UDim2.new(0,0,0,0) lnn.Name = v.units if i~= 1 then lnn.Visible=false end for i=0,v.maxSpeed,v.spInc do local ln = script.Parent.ln:clone() ln.Parent = lnn ln.Rotation = 45 + 225*(i/v.maxSpeed) ln.Num.Text = i ln.Num.TextSize = 14 ln.Num.Rotation = -ln.Rotation ln.Frame:Destroy() ln.Num.Visible=true ln.Visible=true end end if script.Parent.Parent.IsOn.Value then script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end script.Parent.Parent.IsOn.Changed:connect(function() if script.Parent.Parent.IsOn.Value then script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end end) script.Parent.Parent.Values.RPM.Changed:connect(function() script.Parent.Tach.Needle.Rotation = 54 + 282 * math.min(1,script.Parent.Parent.Values.RPM.Value / (revEnd*1000)) end) script.Parent.Parent.Values.Gear.Changed:connect(function() local gearText = script.Parent.Parent.Values.Gear.Value if gearText == 0 then gearText = "N" elseif gearText == -1 then gearText = "R" end script.Parent.Gear.Text = gearText end) script.Parent.Parent.Values.TCS.Changed:connect(function() if _Tune.TCSEnabled then if script.Parent.Parent.Values.TCS.Value then script.Parent.TCS.TextColor3 = Color3.new(1,170/255,0) script.Parent.TCS.TextStrokeColor3 = Color3.new(1,170/255,0) if script.Parent.Parent.Values.TCSActive.Value then wait() script.Parent.TCS.Visible = not script.Parent.TCS.Visible else wait() script.Parent.TCS.Visible = false end else script.Parent.TCS.Visible = true script.Parent.TCS.TextColor3 = Color3.new(1,0,0) script.Parent.TCS.TextStrokeColor3 = Color3.new(1,0,0) end else script.Parent.TCS.Visible = false end end) script.Parent.Parent.Values.TCSActive.Changed:connect(function() if _Tune.TCSEnabled then if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = not script.Parent.TCS.Visible elseif not script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = true else wait() script.Parent.TCS.Visible = false end else script.Parent.TCS.Visible = false end end) script.Parent.TCS.Changed:connect(function() if _Tune.TCSEnabled then if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = not script.Parent.TCS.Visible elseif not script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = true end else if script.Parent.TCS.Visible then script.Parent.TCS.Visible = false end end end) script.Parent.Parent.Values.ABS.Changed:connect(function() if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABS.Value then script.Parent.ABS.TextColor3 = Color3.new(1,170/255,0) script.Parent.ABS.TextStrokeColor3 = Color3.new(1,170/255,0) if script.Parent.Parent.Values.ABSActive.Value then wait() script.Parent.ABS.Visible = not script.Parent.ABS.Visible else wait() script.Parent.ABS.Visible = false end else script.Parent.ABS.Visible = true script.Parent.ABS.TextColor3 = Color3.new(1,0,0) script.Parent.ABS.TextStrokeColor3 = Color3.new(1,0,0) end else script.Parent.ABS.Visible = false end end) script.Parent.Parent.Values.ABSActive.Changed:connect(function() if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = not script.Parent.ABS.Visible elseif not script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = true else wait() script.Parent.ABS.Visible = false end else script.Parent.ABS.Visible = false end end) script.Parent.ABS.Changed:connect(function() if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = not script.Parent.ABS.Visible elseif not script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = true end else if script.Parent.ABS.Visible then script.Parent.ABS.Visible = false end end end) function PBrake() script.Parent.PBrake.Visible = script.Parent.Parent.Values.PBrake.Value end script.Parent.Parent.Values.PBrake.Changed:connect(PBrake) function Gear() if script.Parent.Parent.Values.TransmissionMode.Value == "Auto" then script.Parent.TMode.Text = "A/T" script.Parent.TMode.BackgroundColor3 = Color3.new(1,170/255,0) elseif script.Parent.Parent.Values.TransmissionMode.Value == "Semi" then script.Parent.TMode.Text = "S/T" script.Parent.TMode.BackgroundColor3 = Color3.new(0, 170/255, 127/255) else script.Parent.TMode.Text = "M/T" script.Parent.TMode.BackgroundColor3 = Color3.new(1,85/255,.5) end end script.Parent.Parent.Values.TransmissionMode.Changed:connect(Gear) script.Parent.Parent.Values.Velocity.Changed:connect(function(property) script.Parent.Speedo.Needle.Rotation =45 + 225 * math.min(1,UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude/UNITS[currentUnits].maxSpeed) script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units end) script.Parent.Speed.MouseButton1Click:connect(function() if currentUnits==#UNITS then currentUnits = 1 else currentUnits = currentUnits+1 end for i,v in pairs(script.Parent.Speedo:GetChildren()) do v.Visible=v.Name==UNITS[currentUnits].units or v.Name=="Needle" or v.Name=="lns" end script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units end) wait(.1) Gear() PBrake()
-- 100 == 1 0 == 0 1/0.5
function JamCalculation() local L_132_ if (math.random(1, 100) <= L_21_.JamChance) then L_132_ = true L_52_ = true else L_132_ = false end return L_132_ end function TracerCalculation() local L_133_ if (math.random(1, 100) <= L_21_.TracerChance) then L_133_ = true else L_133_ = false end return L_133_ end
-- Decompiled with the Synapse X Luau decompiler.
local v1 = {}; Piano = script.Parent; Box = Piano.Keys.Camera; v1.PianoSoundRange = 50; v1.KeyAesthetics = true; v1.PianoSounds = { "269058581", "269058744", "269058842", "269058899", "269058974", "269059048" }; v1.SoundSource = Piano.Keys.KeyBox; v1.CameraCFrame = CFrame.new((Box.CFrame * CFrame.new(0, 0, 1)).p, (Box.CFrame * CFrame.new(0, 0, 0)).p); return v1;
--[=[ Gets the controller by name. Throws an error if the controller is not found. ]=]
function KnitClient.GetController(controllerName: string): Controller local controller = controllers[controllerName] if controller then return controller end assert(started, "Cannot call GetController until Knit has been started") assert(type(controllerName) == "string", "ControllerName must be a string; got " .. type(controllerName)) error("Could not find controller \"" .. controllerName .. "\". Check to verify a controller with this name exists.", 2) end
--Rear Suspension
Tune.RSusDamping = 500 -- Spring Dampening Tune.RSusStiffness = 9000 -- Spring Force Tune.FAntiRoll = 50 -- Anti-Roll (Gyro Dampening) Tune.RSusLength = 2 -- Suspension length (in studs) Tune.RPreCompress = .3 -- Pre-compression adds resting length force Tune.RExtensionLim = .3 -- Max Extension Travel (in studs) Tune.RCompressLim = .1 -- Max Compression Travel (in studs) Tune.RSusAngle = 80 -- Suspension Angle (degrees from horizontal) Tune.RWsBoneLen = 5 -- Wishbone Length Tune.RWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal) Tune.RAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -.5 , -- positive = upward --[[Forward]] 0 } -- positive = forward
---Creator Module Object Keys
local KEY_MESSAGE_TYPE = "MessageType" local KEY_CREATOR_FUNCTION = "MessageCreatorFunc"
-- Now with exciting TeamColors HACK!
function waitForChild(parent, childName) while true do local child = parent:findFirstChild(childName) if child then return child end parent.ChildAdded:wait() end end
--// Special Variables
return function(Vargs, GetEnv) local env = GetEnv(nil, {script = script}) setfenv(1, env) local server = Vargs.Server; local service = Vargs.Service; local MaxLogs = 1000 local Functions, Admin, Anti, Core, HTTP, Logs, Remote, Process, Variables, Settings local function Init() Functions = server.Functions; Admin = server.Admin; Anti = server.Anti; Core = server.Core; HTTP = server.HTTP; Logs = server.Logs; Remote = server.Remote; Process = server.Process; Variables = server.Variables; Settings = server.Settings; MaxLogs = Settings.MaxLogs; Logs.Init = nil; Logs:AddLog("Script", "Logging Module Initialized"); end; server.Logs = { Init = Init; Chats = {}; Joins = {}; Leaves = {}; Script = {}; RemoteFires = {}; Commands = {}; Exploit = {}; Errors = {}; DateTime = {}; TempUpdaters = {}; OldCommandLogsLimit = 1000; --// Maximum number of command logs to save to the datastore (the higher the number, the longer the server will take to close) TabToType = function(tab) local indToName = { Chats = "Chat"; Joins = "Join"; Leaves = "Leave"; Script = "Script"; RemoteFires = "RemoteFire"; Commands = "Command"; Exploit = "Exploit"; Errors = "Error"; DateTime = "DateTime"; } for ind, t in server.Logs do if t == tab then return indToName[ind] or ind end end end; AddLog = function(tab, log, misc) if misc then tab = log log = misc end if type(tab) == "string" then tab = Logs[tab] end if type(log) == "string" then log = { Text = log; Desc = log; } end if not log.Time and not log.NoTime then log.Time = os.time() end table.insert(tab, 1, log) if #tab > tonumber(MaxLogs) then table.remove(tab, #tab) end service.Events.LogAdded:Fire(server.Logs.TabToType(tab), log, tab) end; SaveCommandLogs = function() --// Disable saving command logs in Studio; not required. if service.RunService:IsStudio() or service.RunService:IsRunMode() then return end warn("Saving command logs...") if Settings.SaveCommandLogs ~= true or Settings.DataStoreEnabled ~= true then warn("Skipped saving command logs.") return end local logsToSave = Logs.Commands --{} local maxLogs = Logs.OldCommandLogsLimit --local numLogsToSave = 200; --// Save the last X logs from this server --for i = #Logs.Commands, i = math.max(#Logs.Commands - numLogsToSave, 1), -1 do -- table.insert(logsToSave, Logs.Commands[i]); --end Core.UpdateData("OldCommandLogs", function(oldLogs) local temp = {} for _, m in logsToSave do local newTab = type(m) == "table" and service.CloneTable(m) or m if type(m) == "table" and newTab.Player then local p = newTab.Player newTab.Player = { Name = p.Name; UserId = p.UserId; } end table.insert(temp, newTab)--{Time = m.Time; Text = `{m.Text}: {m.Desc}`; Desc = m.Desc}) end if oldLogs then for _, m in oldLogs do table.insert(temp, m) end end table.sort(temp, function(a, b) if a.Time and b.Time and type(a.Time) == "number" and type(b.Time) == "number" then return a.Time > b.Time else return false end end) --// Trim logs, starting from the oldest if #temp > maxLogs then local diff = #temp - maxLogs for i = 1, diff do table.remove(temp, 1) end end return temp end) warn("Command logs saved!") end; ListUpdaters = { TempUpdate = function(plr, data) local updateKey = data.UpdateKey local updater = Logs.TempUpdaters[updateKey] if updater then return updater(data) end end; }; }; Logs = Logs end
-- Formerly getCurrentCameraMode, this function resolves developer and user camera control settings to -- decide which camera control module should be instantiated. The old method of converting redundant enum types
function CameraModule:GetCameraControlChoice() local player = Players.LocalPlayer if player then if UserInputService:GetLastInputType() == Enum.UserInputType.Touch or UserInputService.TouchEnabled then -- Touch if player.DevTouchCameraMode == Enum.DevTouchCameraMovementMode.UserChoice then return CameraUtils.ConvertCameraModeEnumToStandard( UserGameSettings.TouchCameraMovementMode ) else return CameraUtils.ConvertCameraModeEnumToStandard( player.DevTouchCameraMode ) end else -- Computer if player.DevComputerCameraMode == Enum.DevComputerCameraMovementMode.UserChoice then local computerMovementMode = CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.ComputerCameraMovementMode) return CameraUtils.ConvertCameraModeEnumToStandard(computerMovementMode) else return CameraUtils.ConvertCameraModeEnumToStandard(player.DevComputerCameraMode) end end end end function CameraModule:OnCharacterAdded(char, player) if self.activeOcclusionModule then self.activeOcclusionModule:CharacterAdded(char, player) end end function CameraModule:OnCharacterRemoving(char, player) if self.activeOcclusionModule then self.activeOcclusionModule:CharacterRemoving(char, player) end end function CameraModule:OnPlayerAdded(player) player.CharacterAdded:Connect(function(char) self:OnCharacterAdded(char, player) end) player.CharacterRemoving:Connect(function(char) self:OnCharacterRemoving(char, player) end) end function CameraModule:OnMouseLockToggled() if self.activeMouseLockController then local mouseLocked = self.activeMouseLockController:GetIsMouseLocked() local mouseLockOffset = self.activeMouseLockController:GetMouseLockOffset() if self.activeCameraController then self.activeCameraController:SetIsMouseLocked(mouseLocked) self.activeCameraController:SetMouseLockOffset(mouseLockOffset) end end end return CameraModule.new()
--------------------------------------------
game.Players.CharacterAutoLoads = false function onPlayerDied(player, character) wait(respawn_time) player:LoadCharacter() end function onPlayerSpawned(player, character) while not character:FindFirstChild("Humanoid") do wait() end character.Humanoid.Died:connect(function () onPlayerDied(player, character) end) end function onPlayerChatted(player, message, recipient) if message == force_respawn and allow_force_respawn then player:LoadCharacter() end end function onPlayerEntered(player) player.CharacterAdded:connect(function (char) onPlayerSpawned(player, char) end) player.Chatted:connect(function (msg, rec) onPlayerChatted(player, msg, rec) end) player:LoadCharacter() end game.Players.PlayerAdded:connect(onPlayerEntered)
--Made by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") RunAnim = Tool:WaitForChild("RunAnim") Returned = Tool:WaitForChild("Returned") Debris = game:GetService("Debris") Players = game:GetService("Players") Anims = {"RightSlash", "LeftSlash", "OverHeadSwing", "LeftSwingFast", "RightSwingFast"} BaseDamage = 100 SlashDamage = 100 SwingDamage = 100 Damage = BaseDamage SlashSound = Instance.new("Sound") SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav" SlashSound.Parent = Handle SlashSound.Volume = 0.7 UnsheathSound = Instance.new("Sound") UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav" UnsheathSound.Parent = Handle UnsheathSound.Volume = 0.5 function Blow(Hit) if Hit and Hit.Parent then local humanoid = Hit.Parent:FindFirstChild("Humanoid") if Character and Player and Humanoid and humanoid and humanoid ~= Humanoid and humanoid.Health > 0 and Humanoid.Health > 0 then local right_arm = Character:FindFirstChild("Right Arm") if right_arm then local joint= right_arm:FindFirstChild("RightGrip") if joint and (joint.Part0 == Handle or joint.Part1 == Handle) then TagHumanoid(humanoid, Player) humanoid:TakeDamage(Damage) end end end end end function TagHumanoid(humanoid, player) for i, v in pairs(humanoid:GetChildren()) do if v.Name == "creator" then v:Destroy() end end local creator_tag = Instance.new("ObjectValue") creator_tag.Value = player creator_tag.Name = "creator" Debris:AddItem(creator_tag, 1) creator_tag.Parent = humanoid end function OnActivated() if Tool.Enabled and Returned.Value then Character = Tool.Parent Player = Players:GetPlayerFromCharacter(Character) Humanoid = Character:FindFirstChild("Humanoid") Tool.Enabled = false local TempAnims = {} for i, v in pairs(Anims) do if v ~= LastAnim then table.insert(TempAnims, v) end end NewAnim = TempAnims[math.random(1, #TempAnims)] LastAnim = NewAnim RunAnim.Value = NewAnim if Humanoid and NewAnim then SlashSound:Play() if NewAnim == "OverHeadSwing" then Damage = SwingDamage else Damage = SlashDamage end wait(0.75) Damage = BaseDamage end Tool.Enabled = true end end function OnEquipped(Mouse) UnsheathSound:Play() end Tool.Activated:connect(OnActivated) Tool.Equipped:connect(OnEquipped) Connection = Handle.Touched:connect(Blow)
--------------------------- --Seat Offset (Make copies of this block for passenger seats)
car.DriveSeat.ChildAdded:connect(function(child) if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then child.C0=CFrame.new(0,-.5,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0) end end) car.Body.ChildAdded:connect(function(child) if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then child.C0=CFrame.new(0,-.5,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0) end end)
---------------------------------------------------------------------------------
game.Players.PlayerAdded:Connect(function(plr) local DefaultNum = 00000000 -- <-- DO NOT change this to your ID or the script will break! if BadgeID == DefaultNum then error("Forgot to add badge ID (line 26)") elseif DefaultNum == BadgeID then error("Do not change \"DefaultNum\" to your ID (Line 33)") elseif BadgeID == nil then error("Badge ID doesn't exist or is nil (line 26)") end print("Giving BadgeID: " .. BadgeID .. " to: " .. plr.Name) local b = game:GetService("BadgeService") b:AwardBadge(plr.userId, BadgeID) end)
--Xfabri_YT
local BHTextValue = game.Workspace.HoursValues.BHTextValue BHTextValue.Changed:Connect(function() if BHTextValue.Value == 2 then wait() script.Parent.BHText.Visible = true wait(2) script.Parent.BHText.Visible = false BHTextValue.Value = 0 end end)
--Var
local WaitingInputs = {} local UIS = {} function UIS.WaitForInput(inputType) local Event = Instance.new("BindableEvent") local uisCon uisCon = UserInputService.InputBegan:Connect(function(input, gp) if (input.UserInputType == inputType) then uisCon:Disconnect() Event:Fire() end end) Event.Event:Wait() end return UIS
--[[ReadMe* Please improve upon this script as needed, I'm a noob scripter and I only script through ways I know that work. This loop works, so I'm happy with it. But please, edit as you may. This model uses MeshParts to animate the flag. The previous frame turns transparent while the next frame becomes visible. If you would like to use your own custom flag, for your ROBLOX group or country, select all the children in the "Flag" model and paste in a ROBLOX decal asset in the "TextureID" slot. If you receive an error, try subtracting 1 from the decal id. http://www.roblox.com/asset/?id={decal id} rbxassetid://{decal id} Any ROBLOX decal in the Developers Library will work, or you may upload your own flag decal to insert in. Rectangular decals are recommended for this flag. *If you use a decal with a transparent background in the MeshPart's TextureID, the transparent background will default to black. Instead, insert the actual decal into every MeshPart in "Flag." This will allow you to change the BrickColor of the flag with the decal on top. The flags have been UV mapped to flip the flag design on the other side. e.g. You won't see the blue box of the United States flag on the other side of the flag on its end, but close to the pole for both sides. Thank you and have a wonderful day. (MeshParts rendered using Blender) --]]
sp=script.Parent flag=sp.Flag reset=function() for _,meshpart in pairs (flag:GetChildren()) do if meshpart:IsA("MeshPart") then meshpart.Transparency=1 end end end waittime=.01 --Time between each "Frame" while true do wait(waittime) reset() flag["2"].Transparency=0 wait(waittime) reset() flag["3"].Transparency=0 wait(waittime) reset() flag["4"].Transparency=0 wait(waittime) reset() flag["5"].Transparency=0 wait(waittime) reset() flag["6"].Transparency=0 wait(waittime) reset() flag["7"].Transparency=0 wait(waittime) reset() flag["8"].Transparency=0 wait(waittime) reset() flag["9"].Transparency=0 wait(waittime) reset() flag["10"].Transparency=0 wait(waittime) reset() flag["11"].Transparency=0 wait(waittime) reset() flag["12"].Transparency=0 wait(waittime) reset() flag["13"].Transparency=0 wait(waittime) reset() flag["14"].Transparency=0 wait(waittime) reset() flag["15"].Transparency=0 wait(waittime) reset() flag["16"].Transparency=0 wait(waittime) reset() flag["1"].Transparency=0 end
--// All global vars will be wiped/replaced except script
local function Expand(ent, point) ent.MouseLeave:Connect(function(x,y) point.Visible = false end) ent.MouseMoved:Connect(function(x,y) point.Label.Text = ent.Desc.Value point.Size = UDim2.new(0, 10000, 0, 10000) local bounds = point.Label.TextBounds.X local rows = math.floor(bounds/500) rows = rows+1 if rows<1 then rows = 1 end local newx = 500 if bounds<500 then newx = bounds end point.Visible = true point.Size = UDim2.new(0, newx+5, 0, (rows*20)+5) point.Position = UDim2.new(0, x, 0, y-40-((rows*20)+5)) end) end return function(data) local gTable = data.gTable local gui = gTable.Object local drag = gui.Drag local Main = gui.Drag.Main local Close = gui.Drag.Close local Hide = gui.Drag.Hide local Search = gui.Drag.Search local cTab = gui.Drag.Main.ClientTab local sTab = gui.Drag.Main.ServerTab local Dragger = gui.Drag.Main.Dragger local cFrame = gui.Drag.Main.Client local sFrame = gui.Drag.Main.Server local Title = gui.Drag.Title local Entry = gui.Entry local Desc = gui.Desc local num = 0 local mouse = service.Players.LocalPlayer:GetMouse() local nx,ny = drag.AbsoluteSize.X,Main.AbsoluteSize.Y local dragging = false local defx,defy = nx,ny local topText = "" local function openClient() sFrame.Visible = false cFrame.Visible = true cTab.BackgroundTransparency = 0 sTab.BackgroundTransparency = 0.5 end local function openServer() sFrame.Visible = true cFrame.Visible = false cTab.BackgroundTransparency = 0.5 sTab.BackgroundTransparency = 0 end local updateLists; updateLists = function() local serverTasks --= client.Remote.Get("TaskCommand","GetTasks") local clientTasks = service.GetTasks() --service.Threads.Tasks --// Unfinished cFrame:ClearAllChildren() local cNum = 0 for index,task in pairs(clientTasks) do local new = Entry:Clone() local frame = new.Frame local status = task:Status() new.Parent = cFrame new.Visible = true new.Desc.Value = task.Name new.Position = UDim2.new(0,0,0,cNum*20) frame.Text.Text = tostring(task.Function) frame.Status.Text = status if status == "suspended" then frame.Resume.Text = "Resume" elseif status == "normal" or status == "running" then frame.Resume.Text = "Suspend" end frame.Resume.MouseButton1Down:Connect(function() if frame.Resume.Text == "Resume" and task:Status() == "Suspended" then task:Resume() else task:Pause() end wait(0.5) updateLists() end) frame.Kill.MouseButton1Down:Connect(function() task:Kill() wait(0.5) updateLists() end) frame.Stop.MouseButton1Down:Connect(function() task:Stop() wait(0.5) updateLists() end) Expand(new,Desc) cNum = cNum+1 end cFrame.CanvasSize = UDim2.new(0, 0, 0, num*20) end sTab.MouseButton1Down:Connect(openServer) cTab.MouseButton1Down:Connect(openClient) Close.MouseButton1Click:Connect(function() drag.Draggable = false drag:TweenPosition(UDim2.new(drag.Position.X.Scale, drag.Position.X.Offset, 1,0), "Out", "Sine", 0.5, true) wait(0.5) gTable:Destroy() end) drag.BackgroundColor3 = Main.BackgroundColor3 Hide.MouseButton1Click:Connect(function() if Main.Visible then Main.Visible = false drag.BackgroundTransparency = Main.BackgroundTransparency Hide.Text = "+" else Main.Visible = true drag.BackgroundTransparency = 1 Hide.Text = "-" end end) mouse.Move:Connect(function(x,y) if dragging then nx=defx+(Dragger.Position.X.Offset+20) ny=defy+(Dragger.Position.Y.Offset+20) if nx<200 then nx=200 end if ny<200 then ny=200 end drag.Size=UDim2.new(0, nx, 0, 30) Main.Size=UDim2.new(1, 0, 0, ny) if nx<220 then if topText=="" then topText=Title.Text end Title.Text="" else if topText~="" then Title.Text=topText topText="" end end end end) Dragger.DragBegin:Connect(function(init) dragging = true end) Dragger.DragStopped:Connect(function(x,y) dragging = false defx = nx defy = ny Dragger.Position = UDim2.new(1,-20,1,-20) end) gTable:Ready() while wait(1) do updateLists() end end
--[[ Cancels the promise, disallowing it from rejecting or resolving, and calls the cancellation hook if provided. ]]
function Promise.prototype:cancel() if self._status ~= Promise.Status.Started then return end self._status = Promise.Status.Cancelled if self._cancellationHook then self._cancellationHook() end if self._parent then self._parent:_consumerCancelled(self) end for child in pairs(self._consumers) do child:cancel() end self:_finalize() end
-- Sprint key pressed or released
replicatedStorage.RemoteEvents.Sprint.OnServerEvent:Connect(function(player, state) local humanoid = player.Character.Humanoid if state == "Began" and humanoid:GetState() == Enum.HumanoidStateType.RunningNoPhysics and humanoid.MoveDirection.Magnitude > 0 then sprintingPlayers[player.Name] = humanoid.WalkSpeed humanoid.WalkSpeed = humanoid.WalkSpeed * sprintModifier elseif state == "Ended" and sprintingPlayers[player.Name] then humanoid.WalkSpeed = sprintingPlayers[player.Name] sprintingPlayers[player.Name] = nil end end) runService.Heartbeat:Connect(function() for index, player in pairs(players:GetChildren()) do local stamina = player.Stamina local name = player.Name if not sprintingPlayers[name] then if stamina.Value > maxStamina then stamina.Value = maxStamina elseif stamina.Value < maxStamina then stamina.Value = stamina.Value + staminaRegen end else if stamina.Value >= sprintStaminaCost then stamina.Value = stamina.Value - sprintStaminaCost else player.Character.Humanoid.WalkSpeed = sprintingPlayers[name] sprintingPlayers[name] = nil end end end end)
--// Animations
-- Idle Anim IdleAnim = function(char, speed, objs) TweenJoint(objs[2], nil , CFrame.new(-0.902175903, 0.295501232, -1.32277012, 1, 0, 0, 0, 1.19248806e-08, 1, 0, -1, 1.19248806e-08), function(X) return math.sin(math.rad(X)) end, 0.25) TweenJoint(objs[3], nil , CFrame.new(1.06851184, 0.973718464, -2.29667926, 0.787567914, -0.220087856, 0.575584888, -0.615963876, -0.308488727, 0.724860668, 0.0180283934, -0.925416589, -0.378522098), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.18) end; -- FireMode Anim FireModeAnim = function(char, speed, objs) TweenJoint(objs[1], nil , CFrame.new(0.340285569, 0, -0.0787199363, 0.962304771, 0.271973342, 0, -0.261981696, 0.926952124, -0.268561482, -0.0730415657, 0.258437991, 0.963262498), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.1) TweenJoint(objs[2], nil , CFrame.new(0.67163527, -0.310947895, -1.34432662, 0.766044378, -2.80971371e-008, 0.642787576, -0.620885074, -0.258818865, 0.739942133, 0.166365519, -0.965925872, -0.198266774), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.25) objs[4]:WaitForChild("Click"):Play() end; -- Reload Anim ReloadAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.5),{C1 = CFrame.new(-1.13045335, -0.385085344, -1.60160995, 0.996194661, -0.0871555507, -3.8096899e-09, -0.0435778052, -0.498097777, 0.866025209, -0.0754788965, -0.862729728, -0.500000358)}):Play() ts:Create(objs[3],TweenInfo.new(0.5),{C1 = CFrame.new(0.306991339, 0.173449978, -2.47386241, 0.596156955, -0.666716337, 0.447309881, -0.79129082, -0.393649101, 0.4678666, -0.135851175, -0.632874191, -0.762243152)}):Play() wait(0.6) local MagC = objs[4]:clone() MagC:FindFirstChild("Mag"):Destroy() MagC.Parent = Tool MagC.Name = "MagC" local MagCW = Instance.new("Motor6D") MagCW.Part0 = MagC MagCW.Part1 = workspace.CurrentCamera:WaitForChild("Arms"):WaitForChild("Left Arm") MagCW.Parent = MagC MagCW.C1 = MagC.CFrame:toObjectSpace(objs[4].CFrame) objs[4].Transparency = 1 objs[6]:WaitForChild("MagOut"):Play() ts:Create(objs[3],TweenInfo.new(0.4),{C1 = CFrame.new(-0.0507154427, -0.345223904, -3.19228816, 0.625797808, -0.752114773, 0.206640378, -0.779792726, -0.609173417, 0.144329756, 0.0173272491, -0.2514579, -0.967713058)}):Play() ts:Create(objs[2],TweenInfo.new(0.13),{C1 = CFrame.new(-1.13045335, -0.385085344, -1.63183177, 0.996194661, -0.0871555507, -3.8096899e-09, -0.0435778052, -0.498097777, 0.866025209, -0.0754788965, -0.862729728, -0.500000358)}):Play() wait(0.3) ts:Create(objs[2],TweenInfo.new(0.4),{C1 = CFrame.new(-1.13045335, -0.385085344, -1.60160995, 0.996194661, -0.0871555507, -3.8096899e-09, -0.0435778052, -0.498097777, 0.866025209, -0.0754788965, -0.862729728, -0.500000358)}):Play() ts:Create(objs[3],TweenInfo.new(0.5),{C1 = CFrame.new(-0.0507154427, -0.345223933, -3.1922884, 0.625797808, -0.752114773, 0.206640378, 0.0507019535, 0.303593874, 0.95145148, -0.778335571, -0.584939361, 0.2281221)}):Play() wait(1.10) objs[6]:WaitForChild("MagFall"):Play() wait(0.27) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-1.23319471, 0.238857567, -2.20046425, 0.360941499, -0.928539753, -0.0868042335, -0.476528496, -0.263641387, 0.838697612, -0.801649332, -0.261356145, -0.53763473)}):Play() wait(0.25) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.0507154427, -0.345223904, -3.19228816, 0.625797808, -0.752114773, 0.206640378, -0.779792726, -0.609173417, 0.144329756, 0.0173272491, -0.2514579, -0.967713058)}):Play() wait(0.25) objs[6]:WaitForChild('MagIn'):Play() ts:Create(objs[3],TweenInfo.new(0.2),{C1 = CFrame.new(0.306991339, 0.173449978, -2.47386241, 0.596156955, -0.666716337, 0.447309881, -0.79129082, -0.393649101, 0.4678666, -0.135851175, -0.632874191, -0.762243152)}):Play() wait(0.40) ts:Create(objs[2],TweenInfo.new(0.13),{C1 = CFrame.new(-1.13045335, -0.385085344, -1.51256108, 0.996194661, -0.0871555507, -3.8096899e-09, -0.0435778052, -0.498097777, 0.866025209, -0.0754788965, -0.862729728, -0.500000358)}):Play() ts:Create(objs[3],TweenInfo.new(0.13),{C1 = CFrame.new(0.306991339, 0.173449978, -2.37906742, 0.596156955, -0.666716337, 0.447309881, -0.79129082, -0.393649101, 0.4678666, -0.135851175, -0.632874191, -0.762243152)}):Play() wait(0.33) MagC:Destroy() objs[4].Transparency = 0 TweenJoint(objs[3], nil , CFrame.new(1.06851184, 0.973718464, -2.29667926, 0.787567914, -0.220087856, 0.575584888, -0.615963876, -0.308488727, 0.724860668, 0.0180283934, -0.925416589, -0.378522098), function(X) return math.sin(math.rad(X)) end, 0.25) end; -- Bolt Anim BoltBackAnim = function(char, speed, objs) TweenJoint(objs[3], nil , CFrame.new(0.944218755, 0.740618229, -1.28885138, 0.173648149, 0.98480773, -1.17437144e-08, 0, 1.19248806e-08, 1, 0.98480773, -0.173648149, 2.07073336e-09), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.3) TweenJoint(objs[2], nil , CFrame.new(0.886063039, -0.192576975, -1.25888276, 0.529399753, -0.312324286, 0.788789809, -0.848180771, -0.2146101, 0.48428458, 0.0180283934, -0.925416589, -0.378522098), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.3) objs[5]:WaitForChild("BoltBack"):Play() TweenJoint(objs[2], nil , CFrame.new(0.0553048849, -0.575121164, -1.07748175, 0.529399753, -0.312324286, 0.788789809, -0.848180771, -0.2146101, 0.48428458, 0.0180283934, -0.925416589, -0.378522098), function(X) return math.sin(math.rad(X)) end, 0.25) TweenJoint(objs[1], nil , CFrame.new(0, 0, 0.430387408, 1, 0, 0, 0, 1, 0, 0, 0, 1), function(X) return math.sin(math.rad(X)) end, 0.25) TweenJoint(objs[3], nil , CFrame.new(0.944218755, 0.740618229, -1.28885138, 0.173648149, 0.98480773, -1.17437144e-08, 0, 1.19248806e-08, 1, 0.98480773, -0.173648149, 2.07073336e-09), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.3) end; BoltForwardAnim = function(char, speed, objs) objs[5]:WaitForChild("BoltForward"):Play() TweenJoint(objs[1], nil , CFrame.new(), function(X) return math.sin(math.rad(X)) end, 0.1) TweenJoint(objs[2], nil , CFrame.new(0.0553048849, -0.874324203, -1.07748175, 0.529399753, -0.312324286, 0.788789809, -0.848180771, -0.2146101, 0.48428458, 0.0180283934, -0.925416589, -0.378522098), function(X) return math.sin(math.rad(X)) end, 0.1) TweenJoint(objs[3], nil , CFrame.new(0.944218755, 1.18022871, -1.28885138, 0.173648149, 0.98480773, -1.17437144e-08, 0, 1.19248806e-08, 1, 0.98480773, -0.173648149, 2.07073336e-09), function(X) return math.sin(math.rad(X)) end, 0.2) wait(0.2) end; -- Bolting Back BoltingBackAnim = function(char, speed, objs) TweenJoint(objs[1], nil , CFrame.new(0, 0, 0.273770154, 1, 0, 0, 0, 1, 0, 0, 0, 1), function(X) return math.sin(math.rad(X)) end, 0.001) end; BoltingForwardAnim = function(char, speed, objs) TweenJoint(objs[1], nil , CFrame.new(), function(X) return math.sin(math.rad(X)) end, 0.001) end; InspectAnim = function(char, speed, objs) ts:Create(objs[1],TweenInfo.new(1),{C1 = CFrame.new(0.805950999, 0.654529691, -1.92835355, 0.999723792, 0.0109803826, 0.0207702816, -0.0223077796, 0.721017241, 0.692557871, -0.00737112388, -0.692829967, 0.721063137)}):Play() ts:Create(objs[2],TweenInfo.new(1),{C1 = CFrame.new(-1.49363565, -0.699174881, -1.32277012, 0.66716975, -8.8829113e-09, -0.74490571, 0.651565909, -0.484672248, 0.5835706, -0.361035138, -0.874695837, -0.323358655)}):Play() wait(1) ts:Create(objs[2],TweenInfo.new(1),{C1 = CFrame.new(1.37424219, -0.699174881, -1.03685927, -0.204235911, 0.62879771, 0.750267386, 0.65156585, -0.484672219, 0.58357054, 0.730581641, 0.60803473, -0.310715646)}):Play() wait(1) ts:Create(objs[2],TweenInfo.new(1),{C1 = CFrame.new(-0.902175903, 0.295501232, -1.32277012, 0.935064793, -0.354476899, 4.22709467e-09, -0.110443868, -0.291336805, 0.950223684, -0.336832345, -0.888520718, -0.311568588)}):Play() ts:Create(objs[1],TweenInfo.new(1),{C1 = CFrame.new(0.447846293, 0.654529572, -1.81345785, 0.761665463, -0.514432132, 0.393986136, -0.560285628, -0.217437655, 0.799250066, -0.325492471, -0.82950604, -0.453843832)}):Play() wait(1) local MagC = Tool:WaitForChild("Mag"):clone() MagC:FindFirstChild("Mag"):Destroy() MagC.Parent = Tool MagC.Name = "MagC" local MagCW = Instance.new("Motor6D") MagCW.Part0 = MagC MagCW.Part1 = workspace.CurrentCamera:WaitForChild("Arms"):WaitForChild("Left Arm") MagCW.Parent = MagC MagCW.C1 = MagC.CFrame:toObjectSpace(Tool:WaitForChild('Mag').CFrame) Tool.Mag.Transparency = 1 Tool:WaitForChild('Grip'):WaitForChild("MagOut"):Play() ts:Create(objs[2],TweenInfo.new(0.15),{C1 = CFrame.new(-0.902175903, 0.295501232, -1.55972552, 0.935064793, -0.354476899, 4.22709467e-09, -0.110443868, -0.291336805, 0.950223684, -0.336832345, -0.888520718, -0.311568588)}):Play() ts:Create(objs[1],TweenInfo.new(0.3),{C1 = CFrame.new(0.447846293, 0.654529572, -2.9755671, 0.761665463, -0.514432132, 0.393986136, -0.568886042, -0.239798605, 0.786679745, -0.31021595, -0.823320091, -0.475299776)}):Play() wait(0.13) ts:Create(objs[2],TweenInfo.new(0.20),{C1 = CFrame.new(-0.902175903, 0.295501232, -1.28149843, 0.935064793, -0.354476899, 4.22709467e-09, -0.110443868, -0.291336805, 0.950223684, -0.336832345, -0.888520718, -0.311568588)}):Play() wait(0.20) ts:Create(objs[1],TweenInfo.new(0.5),{C1 = CFrame.new(0.447846293, -0.650498748, -1.82401526, 0.761665463, -0.514432132, 0.393986136, -0.646156013, -0.55753684, 0.521185875, -0.0484529883, -0.651545882, -0.75706023)}):Play() wait(0.8) ts:Create(objs[1],TweenInfo.new(0.6),{C1 = CFrame.new(0.447846293, 0.654529572, -2.9755671, 0.761665463, -0.514432132, 0.393986136, -0.568886042, -0.239798605, 0.786679745, -0.31021595, -0.823320091, -0.475299776)}):Play() wait(0.5) Tool:WaitForChild('Grip'):WaitForChild("MagIn"):Play() ts:Create(objs[1],TweenInfo.new(0.3),{C1 = CFrame.new(0.447846293, 0.654529572, -1.81345785, 0.761665463, -0.514432132, 0.393986136, -0.560285628, -0.217437655, 0.799250066, -0.325492471, -0.82950604, -0.453843832)}):Play() wait(0.3) MagC:Destroy() Tool.Mag.Transparency = 0 wait(0.1) end; nadeReload = function(char, speed, objs) ts:Create(objs[1], TweenInfo.new(0.6), {C1 = CFrame.new(-0.902175903, -1.15645337, -1.32277012, 0.984807789, -0.163175702, -0.0593911409, 0, -0.342020363, 0.939692557, -0.17364797, -0.925416529, -0.336824328)}):Play() ts:Create(objs[2], TweenInfo.new(0.6), {C1 = CFrame.new(0.805950999, 0.654529691, -1.92835355, 0.787567914, -0.220087856, 0.575584888, -0.323594928, 0.647189975, 0.690240026, -0.524426222, -0.72986728, 0.438486755)}):Play() wait(0.6) ts:Create(objs[2], TweenInfo.new(0.6), {C1 = CFrame.new(0.805950999, 0.559619546, -1.73060048, 0.802135408, -0.348581612, 0.484839559, -0.597102284, -0.477574915, 0.644508123, 0.00688350201, -0.806481719, -0.59121877)}):Play() wait(0.6) end; AttachAnim = function(char, speed, objs) TweenJoint(objs[1], nil , CFrame.new(-2.05413628, -0.386312962, -0.955676377, 0.5, 0, -0.866025329, 0.852868497, -0.17364797, 0.492403895, -0.150383547, -0.984807789, -0.086823985), function(X) return math.sin(math.rad(X)) end, 0.25) TweenJoint(objs[2], nil , CFrame.new(0.931334019, 1.66565645, -1.2231313, 0.787567914, -0.220087856, 0.575584888, -0.0180282295, 0.925416708, 0.378521889, -0.615963817, -0.308488399, 0.724860728), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.18) end; -- Patrol Anim PatrolAnim = function(char, speed, objs) TweenJoint(objs[1], nil , sConfig.PatrolPosR, function(X) return math.sin(math.rad(X)) end, 0.25) TweenJoint(objs[2], nil , sConfig.PatrolPosL, function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.18) end; } return Settings
-- ROBLOX upstream: https://github.com/facebook/jest/blob/v27.4.7/packages/pretty-format/src/plugins/lib/markup.ts --[[* * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. ]]
type unknown = any --[[ ROBLOX FIXME: adding `unknown` type alias to make it easier to use Luau unknown equivalent when supported ]] local CurrentModule = script.Parent.Parent.Parent local Packages = CurrentModule.Parent local LuauPolyfill = require(Packages.LuauPolyfill) local Array = LuauPolyfill.Array local Boolean = LuauPolyfill.Boolean type Array<T> = LuauPolyfill.Array<T> type Record<K, T> = { [K]: T } local exports = {}
--// Player
local Player = Players.LocalPlayer local Camera = game.Workspace.CurrentCamera local Gui = script.Parent local Sounds = Gui.Sounds local PromptLabel = Gui.PromptLabel local LineLabel = Gui.LineLabel
--- Lua-side duplication of the API of events on Roblox objects. -- Signals are needed for to ensure that for local events objects are passed by -- reference rather than by value where possible, as the BindableEvent objects -- always pass signal arguments by value, meaning tables will be deep copied. -- Roblox's deep copy method parses to a non-lua table compatable format. -- @classmod Signal
local Signal = {} Signal.__index = Signal Signal.ClassName = "Signal"
-- main program
local nextTime = 0 local runService = game:service("RunService"); while Figure.Parent ~= nil do local time = runService.Stepped:wait() if time > nextTime then move(time) nextTime = time + 0.1 end end
--[[ Adds a change listener. When the watched state changes value, the listener will be fired. Returns a function which, when called, will disconnect the change listener. As long as there is at least one active change listener, this Compat object will be held in memory, preventing GC, so disconnecting is important. ]]
function class:onChange(callback: () -> ()) self._numChangeListeners += 1 self._changeListeners[callback] = true -- disallow gc (this is important to make sure changes are received) strongRefs[self] = true local disconnected = false return function() if disconnected then return end disconnected = true self._changeListeners[callback] = nil self._numChangeListeners -= 1 if self._numChangeListeners == 0 then -- allow gc if all listeners are disconnected strongRefs[self] = nil end end end local function Compat(watchedState: Types.State<any>) local self = setmetatable({ type = "State", kind = "Compat", dependencySet = {[watchedState] = true}, dependentSet = {}, _changeListeners = {}, _numChangeListeners = 0 }, CLASS_METATABLE) initDependency(self) -- add this object to the watched state's dependent set watchedState.dependentSet[self] = true return self end return Compat
-- places a brick at pos and returns the position of the brick's opposite corner
function placeBrick(cf, pos, color) local brick = Instance.new("Part") brick.BrickColor = color brick.CFrame = cf * CFrame.new(pos + brick.size / 2) brick.Parent = script.Parent.Bricks brick:makeJoints() return brick, pos + brick.size end function buildWall(cf) local color = BrickColor.random() local bricks = {} assert(wallWidth>0) local y = 0 while y < wallHeight do local p local x = -wallWidth/2 while x < wallWidth/2 do local brick brick, p = placeBrick(cf, Vector3.new(x, y, 0), color) x = p.x table.insert(bricks, brick) wait(brickSpeed) end y = p.y end wait(wallLifetime) -- now delete them! while #bricks>0 do table.remove(bricks):remove() wait(brickSpeed/2) end end script.Parent.ChildAdded:connect(function(item) if item.Name=="NewWall" then item:remove() buildWall(item.Value) end end)
-- Coroutine runner that we create coroutines of. The coroutine can be -- repeatedly resumed with functions to run followed by the argument to run -- them with.
local function runEventHandlerInFreeThread(...) acquireRunnerThreadAndCallEventHandler(...) while true do acquireRunnerThreadAndCallEventHandler(coroutine.yield()) end end
--!strict --[=[ @function reduceRight @within Array @param array {T} -- The array to reduce. @param reducer (accumulator: U, value: T, index: number, array: {T}) -> U -- The reducer to use. @param initialReduction? U = {T}[#{T}] -- The initial accumulator value. @return U -- The final accumulator value. Reduces the array using the given reducer and initial accumulator value, starting from the end of the array. If no `initialReduction` value is given, the last item in the array is used. ```lua local array = { 1, 2, 3 } local value = ReduceRight(array, function(accumulator, item, index) return accumulator - item end) -- 0 local value = ReduceRight(array, function(accumulator, item, index) table.insert(accumulator, item) return accumulator end, {}) -- { 3, 2, 1 } ``` ]=]
local function reduceRight<T, U>( array: { T }, reducer: (accumulator: U, value: T, index: number, array: { T }) -> U, initReduction: U? ): U local result = initReduction local start = #array if not result then result = array[start] start -= 1 end for index = start, 1, -1 do result = reducer(result, array[index], index, array) end return result end return reduceRight
-- Create a confetti particle.
function _Confetti.createParticle(paramEmitter, paramForce, paramParent, paramColors) local _Particle = {}; setmetatable(_Particle, _Confetti); --colors = paramColors; -- Adjust forces. local xforce = paramForce.X; if (xforce < 0) then xforce = xforce * -1; end; local distanceFromZero = 0 - xforce; paramForce = Vector2.new(paramForce.X, paramForce.Y + (distanceFromZero * 0.75)); --if (paramColors == nil) then paramColors = colors; end; -- Confetti data. _Particle.EmitterPosition = paramEmitter; _Particle.EmitterPower = paramForce; _Particle.Position = Vector2.new(0,0); _Particle.Power = paramForce; --_Particle.Color = paramColors[math.random(#paramColors)]; local function getParticle() local label = shapes[math.random(#shapes)]:Clone(); --label.ImageColor3 = _Particle.Color; label.Parent = paramParent; label.Rotation = math.random(360); label.Visible = true; label.ZIndex = 20; return label; end; _Particle.Label = getParticle(); _Particle.DefaultSize = 30; _Particle.Size = 1; _Particle.Side = -1; _Particle.OutOfBounds = false; _Particle.Enabled = false; _Particle.Cycles = 0; return _Particle; end;
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
function onRunning(speed) if speed > 0.01 then playAnimation("walk", 0.1, Humanoid) if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then setAnimationSpeed(speed / 14.5) end pose = "Running" else if emoteNames[currentAnim] == nil then playAnimation("idle", 0.1, Humanoid) pose = "Standing" end end end function onDied() pose = "Dead" end function onJumping() playAnimation("jump", 0.1, Humanoid) jumpAnimTime = jumpAnimDuration pose = "Jumping" end function onClimbing(speed) playAnimation("climb", 0.1, Humanoid) setAnimationSpeed(speed / 12.0) pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() if (jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) end pose = "FreeFall" end function onFallingDown() pose = "FallingDown" end function onSeated() pose = "Seated" end function onPlatformStanding() pose = "PlatformStanding" end function onSwimming(speed) if speed > 0 then pose = "Running" else pose = "Standing" end end function getTool() for _, kid in ipairs(Figure:GetChildren()) do if kid.className == "Tool" then return kid end end return nil end function getToolAnim(tool) for _, c in ipairs(tool:GetChildren()) do if c.Name == "toolanim" and c.className == "StringValue" then return c end end return nil end function animateTool() if (toolAnim == "Slash") then playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action) return end if (toolAnim == "Lunge") then playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action) return end end function moveSit() RightShoulder.MaxVelocity = 0.15 LeftShoulder.MaxVelocity = 0.15 RightShoulder:SetDesiredAngle(3.14 /2) LeftShoulder:SetDesiredAngle(-3.14 /2) RightHip:SetDesiredAngle(3.14 /2) LeftHip:SetDesiredAngle(-3.14 /2) end local lastTick = 0 function move(time) local amplitude = 1 local frequency = 1 local deltaTime = time - lastTick lastTick = time local climbFudge = 0 local setAngles = false if (jumpAnimTime > 0) then jumpAnimTime = jumpAnimTime - deltaTime end if (pose == "FreeFall" and jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) elseif (pose == "Seated") then playAnimation("sit", 0.5, Humanoid) return elseif (pose == "Running") then playAnimation("walk", 0.1, Humanoid) elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
--Extra 20 levels
200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, math.huge, } return module
-- if player rig is R6 swap to R15 and vice versa on click
Player = game:GetService("Players").LocalPlayer Camera = workspace.CurrentCamera repeat task.wait() until Player.Character script.Parent.MouseButton1Down:Connect(function() local OGCamCF = Camera.CFrame game.ReplicatedStorage.Events.RigSwap:FireServer() task.wait(.2) script.Parent.Parent.Parent.ScreenBlocker.Visible = true task.wait(.15) workspace.CurrentCamera.CFrame = OGCamCF task.wait(.1) script.Parent.Parent.Parent.ScreenBlocker.Visible = false end)
--[[ Enqueues a callback to be run next render step. ]]
function Scheduler.enqueueCallback(callback: () -> ()) willUpdate = true callbacks[callback] = true end
--[[ Constructs a new computed state object, which follows the value of another state object using a tween. ]]
local Package = script.Parent.Parent local TweenScheduler = require(Package.Animation.TweenScheduler) local useDependency = require(Package.Dependencies.useDependency) local initDependency = require(Package.Dependencies.initDependency) local class = {} local CLASS_METATABLE = {__index = class} local WEAK_KEYS_METATABLE = {__mode = "k"} local ENABLE_PARAM_SETTERS = false
-- Module for converting player to and from a model
local ReplicatedModuleScripts = ReplicatedStorage:FindFirstChild("ModuleScripts") local PlayerConverter = require(ReplicatedModuleScripts:FindFirstChild("PlayerConverter")) local RaceManager = require(ReplicatedModuleScripts:FindFirstChild("RaceManager"))
-- Public Methods
function TextMaskClass:GetValue() return self._MaskType:ToType(self.Frame.Text) end function TextMaskClass:GetMaskType() return self._MaskType.Name end function TextMaskClass:SetMaxLength(len) self._MaxLength = len end function TextMaskClass:SetMaskType(name) local mask = MASKS[name] if (not mask) then mask = MASKS.String warn(WARN_MSG:format(name)) end self._MaskType = mask self.Frame.Text = mask:Process(self.Frame.Text):sub(1, self._MaxLength) -- Add increment/decrement buttons for numeric inputs if name == "Number" then -- Initialize text to 0, consumer can override self.Frame.Text = 0 self.IncrementButton = INCREMENT_BUTTON:Clone() self.IncrementButton.AnchorPoint = Vector2.new(1, 0) self.IncrementButton.Position = UDim2.new(1, 0, 0, 0) self._Maid:Mark(self.IncrementButton.Activated:Connect(function() self.Frame.Text = tonumber(self.Frame.Text) + 1 end)) self.IncrementButton.Parent = self.Frame self._Maid:Mark(self.IncrementButton) self.DecrementButton = DECREMENT_BUTTON:Clone() self.DecrementButton.AnchorPoint = Vector2.new(1, 1) self.DecrementButton.Position = UDim2.new(1, 0, 1, 0) self._Maid:Mark(self.DecrementButton.Activated:Connect(function() self.Frame.Text = tonumber(self.Frame.Text) - 1 end)) self.DecrementButton.Parent = self.Frame self._Maid:Mark(self.DecrementButton) end end function TextMaskClass:Destroy() self._Maid:Sweep() end
--[[Engine]]
--Torque Curve Tune.Horsepower = 592 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6000 -- Use sliders to manipulate values Tune.Redline = 6700 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16 --Incline Compensation Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 150 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
--[[* * Quickly scans a glob pattern and returns an object with a handful of * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). * * ```js * const pm = require('picomatch'); * console.log(pm.scan('foo/bar/*.js')); * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } * ``` * @param {String} `str` * @param {Object} `options` * @return {Object} Returns an object with tokens and regex source string. * @api public ]]
local function scan(input: string, options: Object?) local opts: Object = options or {} local length = #input + 1 local scanToEnd = opts.parts == true or opts.scanToEnd == true local slashes = {} local tokens = {} local parts = {} local str = input local index = 0 local start = 1 local lastIndex = 1 local isBrace = false local isBracket = false local isGlob = false local isExtglob = false local isGlobstar = false local braceEscaped = false local backslashes = false local negated = false local negatedExtglob = false local finished = false local braces = 0 local prev local code -- ROBLOX FIXME: specify type explicitely to avoid type narrowing local token: Token = { value = "", depth = 0, isGlob = false } local function eos() return index >= length end local function peek() return String.charCodeAt(str, index + 1) end local function advance() prev = code index += 1 return String.charCodeAt(str, index) end while index < length do code = advance() local next if code == CHAR_BACKWARD_SLASH then token.backslashes = true backslashes = token.backslashes code = advance() if code == CHAR_LEFT_CURLY_BRACE then braceEscaped = true end continue end if braceEscaped == true or code == CHAR_LEFT_CURLY_BRACE then braces += 1 while eos() ~= true and Boolean.toJSBoolean((function() code = advance() return code end)()) do if code == CHAR_BACKWARD_SLASH then token.backslashes = true backslashes = token.backslashes advance() continue end if code == CHAR_LEFT_CURLY_BRACE then braces += 1 continue end if braceEscaped ~= true and code == CHAR_DOT and (function() code = advance() return code end)() == CHAR_DOT then token.isBrace = true isBrace = token.isBrace token.isGlob = true isGlob = token.isGlob finished = true if scanToEnd == true then continue end break end if braceEscaped ~= true and code == CHAR_COMMA then token.isBrace = true isBrace = token.isBrace token.isGlob = true isGlob = token.isGlob finished = true if scanToEnd == true then continue end break end if code == CHAR_RIGHT_CURLY_BRACE then braces -= 1 if braces == 0 then braceEscaped = false token.isBrace = true isBrace = token.isBrace finished = true break end end end if scanToEnd == true then continue end break end if code == CHAR_FORWARD_SLASH then table.insert(slashes, index) table.insert(tokens, token) token = { value = "", depth = 0, isGlob = false } if finished == true then continue end if prev == CHAR_DOT and index == start + 1 then start += 2 continue end lastIndex = index + 1 continue end if opts.noext ~= true then local isExtglobChar = code == CHAR_PLUS or code == CHAR_AT or code == CHAR_ASTERISK or code == CHAR_QUESTION_MARK or code == CHAR_EXCLAMATION_MARK if isExtglobChar == true and peek() == CHAR_LEFT_PARENTHESES then token.isGlob = true isGlob = token.isGlob token.isExtglob = true isExtglob = token.isExtglob finished = true if code == CHAR_EXCLAMATION_MARK and index == start then negatedExtglob = true end if scanToEnd == true then while eos() ~= true and Boolean.toJSBoolean((function() code = advance() return code end)()) do if code == CHAR_BACKWARD_SLASH then token.backslashes = true backslashes = token.backslashes code = advance() continue end if code == CHAR_RIGHT_PARENTHESES then token.isGlob = true isGlob = token.isGlob finished = true break end end continue end break end end if code == CHAR_ASTERISK then if prev == CHAR_ASTERISK then token.isGlobstar = true isGlobstar = token.isGlobstar end token.isGlob = true isGlob = token.isGlob finished = true if scanToEnd == true then continue end break end if code == CHAR_QUESTION_MARK then token.isGlob = true isGlob = token.isGlob finished = true if scanToEnd == true then continue end break end if code == CHAR_LEFT_SQUARE_BRACKET then while eos() ~= true and Boolean.toJSBoolean((function() next = advance() return next end)()) do if next == CHAR_BACKWARD_SLASH then token.backslashes = true backslashes = token.backslashes advance() continue end if next == CHAR_RIGHT_SQUARE_BRACKET then token.isBracket = true isBracket = token.isBracket token.isGlob = true isGlob = token.isGlob finished = true break end end if scanToEnd == true then continue end break end if opts.nonegate ~= true and code == CHAR_EXCLAMATION_MARK and index == start then token.negated = true negated = token.negated start += 1 continue end if opts.noparen ~= true and code == CHAR_LEFT_PARENTHESES then token.isGlob = true isGlob = token.isGlob if scanToEnd == true then while eos() ~= true and Boolean.toJSBoolean((function() code = advance() return code end)()) do if code == CHAR_LEFT_PARENTHESES then token.backslashes = true backslashes = token.backslashes code = advance() continue end if code == CHAR_RIGHT_PARENTHESES then finished = true break end end continue end break end if isGlob == true then finished = true if scanToEnd == true then continue end break end end if opts.noext == true then isExtglob = false isGlob = false end local base = str local prefix = "" local glob = "" if start > 1 then prefix = String.slice(str, 1, start) str = String.slice(str, start) lastIndex -= start end if Boolean.toJSBoolean(base) and isGlob == true and lastIndex > 1 then base = String.slice(str, 1, lastIndex) glob = String.slice(str, lastIndex) elseif isGlob == true then base = "" glob = str else base = str end if Boolean.toJSBoolean(base) and base ~= "" and base ~= "/" and base ~= str then if isPathSeparator(String.charCodeAt(base, #base)) then base = String.slice(base, 1, -1) end end if opts.unescape == true then if Boolean.toJSBoolean(glob) then glob = utils.removeBackslashes(glob) end if Boolean.toJSBoolean(base) and backslashes == true then base = utils.removeBackslashes(base) end end local state = { prefix = prefix, input = input, start = start, base = base, glob = glob, isBrace = isBrace, isBracket = isBracket, isGlob = isGlob, isExtglob = isExtglob, isGlobstar = isGlobstar, negated = negated, negatedExtglob = negatedExtglob, } if opts.tokens == true then state.maxDepth = 0 if not isPathSeparator(code) then table.insert(tokens, token) end state.tokens = tokens end if opts.parts == true or opts.tokens == true then local prevIndex for idx = 1, #slashes do local n = if Boolean.toJSBoolean(prevIndex) then prevIndex + 1 else start local i = slashes[idx] local value = String.slice(input, n, i) if Boolean.toJSBoolean(opts.tokens) then if idx == 1 and start ~= 1 then tokens[idx].isPrefix = true tokens[idx].value = prefix else tokens[idx].value = value end depth(tokens[idx]) state.maxDepth += tokens[idx].depth end if idx ~= 1 or value ~= "" then table.insert(parts, value) end prevIndex = i end if Boolean.toJSBoolean(prevIndex) and prevIndex + 1 < #input then local value = String.slice(input, prevIndex + 1) table.insert(parts, value) if Boolean.toJSBoolean(opts.tokens) then tokens[#tokens].value = value depth(tokens[#tokens]) state.maxDepth += tokens[#tokens].depth end end state.slashes = slashes state.parts = parts end return state end return scan
--------END AUDIENCE BACK RIGHT--------
end wait(0.15) if game.Workspace.DoorFlashing.Value == true then
--LIGHTS BUTTONS
for _,i in pairs(lights:GetChildren()) do if i:IsA("ImageButton") and i.Name ~= "header" then if string.match(i.Name,"%l+") == "td" then i.MouseButton1Click:connect(function() script.Parent.lighty.Value = tonumber(string.match(i.Name,"%d")) if script.Parent.lighty.Value == 0 then lights.td0.Image = imgassets.sirenson lights.td1.Image = imgassets.hazardoff lights.td2.Image = imgassets.leftyoff lights.td3.Image = imgassets.rightyoff lights.td4.Image = imgassets.outoff seat.Parent.SSC.Beep:Play() elseif script.Parent.lighty.Value == 1 then lights.td0.Image = imgassets.sirensoff lights.td1.Image = imgassets.hazardon lights.td2.Image = imgassets.leftyoff lights.td3.Image = imgassets.rightyoff lights.td4.Image = imgassets.outoff seat.Parent.SSC.Beep:Play() elseif script.Parent.lighty.Value == 2 then lights.td0.Image = imgassets.sirensoff lights.td1.Image = imgassets.hazardoff lights.td2.Image = imgassets.leftyon lights.td3.Image = imgassets.rightyoff lights.td4.Image = imgassets.outoff seat.Parent.SSC.Beep:Play() elseif script.Parent.lighty.Value == 3 then lights.td0.Image = imgassets.sirensoff lights.td1.Image = imgassets.hazardoff lights.td2.Image = imgassets.leftyoff lights.td3.Image = imgassets.rightyon lights.td4.Image = imgassets.outoff seat.Parent.SSC.Beep:Play() elseif script.Parent.lighty.Value == 4 then lights.td0.Image = imgassets.sirensoff lights.td1.Image = imgassets.hazardoff lights.td2.Image = imgassets.leftyoff lights.td3.Image = imgassets.rightyoff lights.td4.Image = imgassets.outon seat.Parent.SSC.Beep:Play() end end) elseif string.match(i.Name,"%l+") == "fl" then i.MouseButton1Click:connect(function() script.Parent.flasher.Value = tonumber(string.match(i.Name,"%d")) if script.Parent.flasher.Value == 0 then lights.fl0.Image = imgassets.sirenson lights.fl1.Image = imgassets.slowoff lights.fl2.Image = imgassets.fastoff lights.fl3.Image = imgassets.x2off lights.fl4.Image = imgassets.x4off seat.Parent.SSC.Beep:Play() elseif script.Parent.flasher.Value == 1 then lights.fl0.Image = imgassets.sirensoff lights.fl1.Image = imgassets.slowon lights.fl2.Image = imgassets.fastoff lights.fl3.Image = imgassets.x2off lights.fl4.Image = imgassets.x4off seat.Parent.SSC.Beep:Play() elseif script.Parent.flasher.Value == 2 then lights.fl0.Image = imgassets.sirensoff lights.fl1.Image = imgassets.slowoff lights.fl2.Image = imgassets.faston lights.fl3.Image = imgassets.x2off lights.fl4.Image = imgassets.x4off seat.Parent.SSC.Beep:Play() elseif script.Parent.flasher.Value == 3 then lights.fl0.Image = imgassets.sirensoff lights.fl1.Image = imgassets.slowoff lights.fl2.Image = imgassets.fastoff lights.fl3.Image = imgassets.x2on lights.fl4.Image = imgassets.x4off seat.Parent.SSC.Beep:Play() elseif script.Parent.flasher.Value == 4 then lights.fl0.Image = imgassets.sirensoff lights.fl1.Image = imgassets.slowoff lights.fl2.Image = imgassets.fastoff lights.fl3.Image = imgassets.x2off lights.fl4.Image = imgassets.x4on seat.Parent.SSC.Beep:Play() end end) end end end
--Если отпущена
Mos.KeyUp:connect(function(key) if key:lower() == string.char(48) then --Если нажата game.Workspace.Camera.FieldOfView = game.Workspace.Camera.FieldOfView - 1.6 local Player1 = game.Players.LocalPlayer.Character.Humanoid if Player1 then Player1.WalkSpeed = 16 end end end)
--// Aim|Zoom|Sensitivity Customization
ZoomSpeed = 0.23; -- The lower the number the slower and smoother the tween AimZoom = 60; -- Default zoom AimSpeed = 0.23; UnaimSpeed = 0.23; CycleAimZoom = 60; -- Cycled zoom MouseSensitivity = 0.5; -- Number between 0.1 and 1 SensitivityIncrement = 0.05; -- No touchy
-- PubTypes that can be expressed as vectors of numbers, and so can be animated.
export type Animatable = number | CFrame | Color3 | ColorSequenceKeypoint | DateTime | NumberRange | NumberSequenceKeypoint | PhysicalProperties | Ray | Rect | Region3 | Region3int16 | UDim | UDim2 | Vector2 | Vector2int16 | Vector3 | Vector3int16
-- wait(7.5)
leftTweenClose:Play() rightTweenClose:Play() model.Part.DoorStart:Play() wait(4) model.Part.DoorStart:Stop() model.Part.DoorStop:Play() model.Part.DoorHit:Play() wait(0.1) triggered=false script.Enabled = false
------------------------------------------------------------------------
local PlayerState = {} do local mouseBehavior local mouseIconEnabled local cameraType local cameraFocus local cameraCFrame local cameraFieldOfView local screenGuis = {} local coreGuis = { Backpack = true, Chat = true, Health = true, PlayerList = true, } local setCores = { BadgesNotificationsActive = true, PointsNotificationsActive = true, } -- Save state and set up for freecam function PlayerState.Push() for name in pairs(coreGuis) do coreGuis[name] = StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType[name]) StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType[name], false) end for name in pairs(setCores) do setCores[name] = StarterGui:GetCore(name) StarterGui:SetCore(name, false) end local playergui = LocalPlayer:FindFirstChildOfClass("PlayerGui") if playergui then for _, gui in pairs(playergui:GetChildren()) do if gui:IsA("ScreenGui") and gui.Enabled then screenGuis[#screenGuis + 1] = gui gui.Enabled = false end end end cameraFieldOfView = Camera.FieldOfView Camera.FieldOfView = 70 cameraType = Camera.CameraType Camera.CameraType = Enum.CameraType.Custom cameraCFrame = Camera.CFrame cameraFocus = Camera.Focus mouseIconEnabled = UserInputService.MouseIconEnabled UserInputService.MouseIconEnabled = false mouseBehavior = UserInputService.MouseBehavior UserInputService.MouseBehavior = Enum.MouseBehavior.Default end -- Restore state function PlayerState.Pop() for name, isEnabled in pairs(coreGuis) do StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType[name], isEnabled) end for name, isEnabled in pairs(setCores) do StarterGui:SetCore(name, isEnabled) end for _, gui in pairs(screenGuis) do if gui.Parent then gui.Enabled = true end end Camera.FieldOfView = cameraFieldOfView cameraFieldOfView = nil Camera.CameraType = cameraType cameraType = nil Camera.CFrame = cameraCFrame cameraCFrame = nil Camera.Focus = cameraFocus cameraFocus = nil UserInputService.MouseIconEnabled = mouseIconEnabled mouseIconEnabled = nil UserInputService.MouseBehavior = mouseBehavior mouseBehavior = nil end end local function StartFreecam() local cameraCFrame = Camera.CFrame cameraRot = Vector2.new(cameraCFrame:toEulerAnglesYXZ()) cameraPos = cameraCFrame.p cameraFov = Camera.FieldOfView velSpring:Reset(Vector3.new()) panSpring:Reset(Vector2.new()) fovSpring:Reset(0) PlayerState.Push() RunService:BindToRenderStep("Freecam", Enum.RenderPriority.Camera.Value + 10, StepFreecam) Input.StartCapture() local charParts = LocalPlayer.Character:GetChildren() for i = 1, #charParts do local part = charParts[i] if part:IsA("BasePart") or part:IsA("MeshPart") then part.Transparency = 1 end end end local function StopFreecam() Input.StopCapture() RunService:UnbindFromRenderStep("Freecam") PlayerState.Pop() local charParts = LocalPlayer.Character:GetChildren() for i = 1, #charParts do local part = charParts[i] if (part:IsA("BasePart") or part:IsA("MeshPart")) and part.Name ~= "HumanoidRootPart" then part.Transparency = 0 end end end
------------------------------------------------------------------------ -- -- * used in luaK:dischargejpc(), luaK:patchlist(), luaK:exp2reg() ------------------------------------------------------------------------
function luaK:patchlistaux(fs, list, vtarget, reg, dtarget) while list ~= self.NO_JUMP do local _next = self:getjump(fs, list) if self:patchtestreg(fs, list, reg) then self:fixjump(fs, list, vtarget) else self:fixjump(fs, list, dtarget) -- jump to default target end list = _next end end
--[WEIGHT // Cubic stud : pounds ratio]
Tune.WeightScaling = 1/50 --Default = 1/50 (1 cubic stud = 50 lbs) Tune.LegacyScaling = 1/10 --Default = 1/10 (1 cubic stud = 10 lbs) [PGS OFF]
-- Create the spark effect for the bullet impact
function MakeParticleFX(position, normal) -- This is a trick I do with attachments all the time. -- Parent attachments to the Terrain - It counts as a part, and setting position/rotation/etc. of it will be in world space. -- UPD 11 JUNE 2019 - Attachments now have a "WorldPosition" value, but despite this, I still see it fit to parent attachments to terrain since its position never changes. local attachment = Instance.new("Attachment") attachment.CFrame = CFrame.new(position, position + normal) attachment.Parent = workspace.Terrain local particle = ImpactParticle:Clone() particle.Parent = attachment Debris:AddItem(attachment, particle.Lifetime.Max) -- Automatically delete the particle effect after its maximum lifetime. -- A potentially better option in favor of this would be to use the Emit method (Particle:Emit(numParticles)) though I prefer this since it adds some natural spacing between the particles. particle.Enabled = true wait(0.05) particle.Enabled = false end
--!strict --[=[ @function copyDeep @within Array @param array {T} -- The array to copy. @return {T} -- The copied array. Copies an array, with deep copies of all nested arrays. ```lua local array = { 1, 2, 3, { 4, 5 } } local result = CopyDeep(array) -- { 1, 2, 3, { 4, 5 } } print(result == array) -- false print(result[4] == array[4]) -- false ``` ]=]
local function copyDeep<T>(array: { T }): { T } local result = {} for _, value in ipairs(array) do if type(value) == "table" then table.insert(result, copyDeep(value)) else table.insert(result, value) end end return result end return copyDeep
--[[ For when the server is in postgame ]]
local ServerStorage = game:GetService("ServerStorage") local SystemManager = require(ServerStorage.Source.Managers.SystemManager) local ServerPostGame = {}
--why is this not a library funciton?!
function randUniform(a, b) return a + math.random() * (b - a) end function randVector(a, b) return Vector3.new(randUniform(a.x, b.x), randUniform(a.y, b.y), randUniform(a.z, b.z)) end TriggerEffect.Event:Connect(function() local liveBlox = CollectionService:GetTagged("blox") script.Parent.PointLight:SetAttribute("SpawnTime", workspace.DistributedGameTime) verticalBeamPS:SetAttribute("SpawnTime", workspace.DistributedGameTime) plasmaBeamA:SetAttribute("SpawnTime", workspace.DistributedGameTime) plasmaBeamB:SetAttribute("SpawnTime", workspace.DistributedGameTime) dustParticles:Emit(15) flashPS:Emit(1) shockwave:Emit(1) verticalBeamPS:Emit(8) verticalBeamPS.Enabled = true bloxParticles:Emit(100) plasmaBeamA.Enabled = true plasmaBeamB.Enabled = true if #liveBlox < maxBlox then for i = -1, 1, 1 do for j = -1, 1, 1 do for k = -1, 1, 1 do local bloxInstance = blox:Clone() bloxInstance.Transparency = 0 bloxInstance.Parent = workspace bloxInstance.Position = bloxSpawnLoc.Position + Vector3.new(i * (blox.Size.x + spacing), j * (blox.Size.y + spacing), k * (blox.Size.z + spacing)) bloxInstance.Anchored = false bloxInstance:ApplyImpulse(randVector(Vector3.new(-hSpeed, 0, -hSpeed), Vector3.new(hSpeed, vSpeed, hSpeed))) bloxInstance:ApplyAngularImpulse(randVector(Vector3.new(-0.0005, -0.0005, -0.0005), Vector3.new(0.0005, 0.0005, 0.0005))) bloxInstance:SetAttribute("ID", math.random()) bloxInstance:SetAttribute("SpawnTime", workspace.DistributedGameTime) bloxInstance:SetAttribute("Lifetime", randUniform(2.0, 3.0)) CollectionService:AddTag(bloxInstance, "blox") end end end end end)
--# selene: allow(divide_by_zero, multiple_statements)
local bit = bit32 local unpack = table.unpack or unpack local stm_lua_bytecode local wrap_lua_func local stm_lua_func
-- ONLY SUPPORTS ORDINAL TABLES (ARRAYS). Clears the array.
Table.clear = function (tbl) table.clear(tbl) end return setmetatable({}, { __index = function(tbl, index) if Table[index] ~= nil then return Table[index] else return RobloxTable[index] end end; __newindex = function(tbl, index, value) error("Add new table entries by editing the Module itself.") end; })
--<================================= DO NOT EDIT BELOW THIS LINE. MADE BY 404ERROR_060. =================================>--
wait() script.Parent.Text=script.Parent.Parent.Parent.Parent.Configuration["Sign Text"].Value; script.Parent.Parent.Parent.Parent.Frame.Neon1.BrickColor=script.Parent.Parent.Parent.Parent.Configuration["Bar Accent Color"].Value; script.Parent.Parent.Parent.Parent.Frame.Neon2.BrickColor=script.Parent.Parent.Parent.Parent.Configuration["Bar Accent Color"].Value; script.Parent.Parent.Parent.Parent.Frame.Neon3.BrickColor=script.Parent.Parent.Parent.Parent.Configuration["Bar Accent Color"].Value; script.Parent.Parent.Parent.BrickColor=script.Parent.Parent.Parent.Parent.Configuration["Screen Color 1"].Value; script.Parent.Parent.Parent.Parent.DoubledScreen.BrickColor=script.Parent.Parent.Parent.Parent.Configuration["Screen Color 2"].Value; script.Parent.TextColor3=script.Parent.Parent.Parent.Parent.Configuration["Text Color"] script.Parent.TextStrokeColor3=script.Parent.Parent.Parent.Parent.Configuration["Text Outline Color"]
--[[ Create a new TestPlan from a list of specification functions. These functions should call a combination of `describe` and `it` (and their variants), which will be turned into a test plan to be executed. Parameters: - modulesList - list of tables describing test modules { method, -- specification function described above path, -- array of parent entires, first element is the leaf that owns `method` pathStringForSorting -- a string representation of `path`, used for sorting of the test plan } - planArgs - table of additional plan params { runTestsByPath - Runs only tests with these exact paths testNamePattern - Only tests matching this Lua pattern string will run. Pass empty or nil to run all tests testPathPattern - Only tests paths matching this pattern will run testPathIgnorePatterns - Only tests paths that do not match this pattern will run extraEnvironment - Lua table holding additional functions and variables to be injected into the specification function during execution } ]]
function TestPlanner.createPlan(modulesList, planArgs) local testPlanArgs if type(planArgs) == "string" then testPlanArgs = { testNamePattern = planArgs } else testPlanArgs = planArgs end local plan = TestPlan.new(testPlanArgs) table.sort(modulesList, function(a, b) return a.pathStringForSorting < b.pathStringForSorting end) for _, module in ipairs(modulesList) do plan:addRoot(module.path, module.method, module.instance) end return plan end return TestPlanner
-- init chat bubble tables
local function initChatBubbleType(chatBubbleType, fileName, imposterFileName, isInset, sliceRect) this.ChatBubble[chatBubbleType] = createChatBubbleMain(fileName, sliceRect) this.ChatBubbleWithTail[chatBubbleType] = createChatBubbleWithTail(fileName, UDim2.new(0.5, -CHAT_BUBBLE_TAIL_HEIGHT, 1, isInset and -1 or 0), UDim2.new(0, 30, 0, CHAT_BUBBLE_TAIL_HEIGHT), sliceRect) this.ScalingChatBubbleWithTail[chatBubbleType] = createScaledChatBubbleWithTail(fileName, 0.5, UDim2.new(-0.5, 0, 0, isInset and -1 or 0), sliceRect) end initChatBubbleType(BubbleColor.WHITE, "ui/dialog_white", "ui/chatBubble_white_notify_bkg", false, Rect.new(5,5,15,15)) initChatBubbleType(BubbleColor.BLUE, "ui/dialog_blue", "ui/chatBubble_blue_notify_bkg", true, Rect.new(7,7,33,33)) initChatBubbleType(BubbleColor.RED, "ui/dialog_red", "ui/chatBubble_red_notify_bkg", true, Rect.new(7,7,33,33)) initChatBubbleType(BubbleColor.GREEN, "ui/dialog_green", "ui/chatBubble_green_notify_bkg", true, Rect.new(7,7,33,33)) function this:SanitizeChatLine(msg) if string.len(msg) > MaxChatMessageLengthExclusive then return string.sub(msg, 1, MaxChatMessageLengthExclusive + string.len(ELIPSES)) else return msg end end local function createBillboardInstance(adornee) local billboardGui = Instance.new("BillboardGui") billboardGui.Adornee = adornee billboardGui.Size = UDim2.new(0,BILLBOARD_MAX_WIDTH,0,BILLBOARD_MAX_HEIGHT) billboardGui.StudsOffset = Vector3.new(0, 1.5, 2) billboardGui.Parent = BubbleChatScreenGui local billboardFrame = Instance.new("Frame") billboardFrame.Name = "BillboardFrame" billboardFrame.Size = UDim2.new(1,0,1,0) billboardFrame.Position = UDim2.new(0,0,-0.5,0) billboardFrame.BackgroundTransparency = 1 billboardFrame.Parent = billboardGui local billboardChildRemovedCon = nil billboardChildRemovedCon = billboardFrame.ChildRemoved:connect(function() if #billboardFrame:GetChildren() <= 1 then billboardChildRemovedCon:disconnect() billboardGui:Destroy() end end) this:CreateSmallTalkBubble(BubbleColor.WHITE).Parent = billboardFrame return billboardGui end function this:CreateBillboardGuiHelper(instance, onlyCharacter) if instance and not this.CharacterSortedMsg:Get(instance)["BillboardGui"] then if not onlyCharacter then if instance:IsA("BasePart") then -- Create a new billboardGui object attached to this player local billboardGui = createBillboardInstance(instance) this.CharacterSortedMsg:Get(instance)["BillboardGui"] = billboardGui return end end if instance:IsA("Model") then local head = instance:FindFirstChild("Head") if head and head:IsA("BasePart") then -- Create a new billboardGui object attached to this player local billboardGui = createBillboardInstance(head) this.CharacterSortedMsg:Get(instance)["BillboardGui"] = billboardGui end end end end local function distanceToBubbleOrigin(origin) if not origin then return 100000 end return (origin.Position - game.Workspace.CurrentCamera.CoordinateFrame.p).magnitude end local function isPartOfLocalPlayer(adornee) if adornee and PlayersService.LocalPlayer.Character then return adornee:IsDescendantOf(PlayersService.LocalPlayer.Character) end end function this:SetBillboardLODNear(billboardGui) local isLocalPlayer = isPartOfLocalPlayer(billboardGui.Adornee) billboardGui.Size = UDim2.new(0, BILLBOARD_MAX_WIDTH, 0, BILLBOARD_MAX_HEIGHT) billboardGui.StudsOffset = Vector3.new(0, isLocalPlayer and 1.5 or 2.5, isLocalPlayer and 2 or 0.1) billboardGui.Enabled = true local billChildren = billboardGui.BillboardFrame:GetChildren() for i = 1, #billChildren do billChildren[i].Visible = true end billboardGui.BillboardFrame.SmallTalkBubble.Visible = false end function this:SetBillboardLODDistant(billboardGui) local isLocalPlayer = isPartOfLocalPlayer(billboardGui.Adornee) billboardGui.Size = UDim2.new(4,0,3,0) billboardGui.StudsOffset = Vector3.new(0, 3, isLocalPlayer and 2 or 0.1) billboardGui.Enabled = true local billChildren = billboardGui.BillboardFrame:GetChildren() for i = 1, #billChildren do billChildren[i].Visible = false end billboardGui.BillboardFrame.SmallTalkBubble.Visible = true end function this:SetBillboardLODVeryFar(billboardGui) billboardGui.Enabled = false end function this:SetBillboardGuiLOD(billboardGui, origin) if not origin then return end if origin:IsA("Model") then local head = origin:FindFirstChild("Head") if not head then origin = origin.PrimaryPart else origin = head end end local bubbleDistance = distanceToBubbleOrigin(origin) if bubbleDistance < NEAR_BUBBLE_DISTANCE then this:SetBillboardLODNear(billboardGui) elseif bubbleDistance >= NEAR_BUBBLE_DISTANCE and bubbleDistance < MAX_BUBBLE_DISTANCE then this:SetBillboardLODDistant(billboardGui) else this:SetBillboardLODVeryFar(billboardGui) end end function this:CameraCFrameChanged() for index, value in pairs(this.CharacterSortedMsg:GetData()) do local playerBillboardGui = value["BillboardGui"] if playerBillboardGui then this:SetBillboardGuiLOD(playerBillboardGui, index) end end end function this:CreateBubbleText(message, shouldAutoLocalize) local bubbleText = Instance.new("TextLabel") bubbleText.Name = "BubbleText" bubbleText.BackgroundTransparency = 1 bubbleText.Position = UDim2.new(0,CHAT_BUBBLE_WIDTH_PADDING/2,0,0) bubbleText.Size = UDim2.new(1,-CHAT_BUBBLE_WIDTH_PADDING,1,0) bubbleText.Font = CHAT_BUBBLE_FONT if shouldClipInGameChat then bubbleText.ClipsDescendants = true end bubbleText.TextWrapped = true bubbleText.FontSize = CHAT_BUBBLE_FONT_SIZE bubbleText.Text = message bubbleText.Visible = false bubbleText.AutoLocalize = shouldAutoLocalize return bubbleText end function this:CreateSmallTalkBubble(chatBubbleType) local smallTalkBubble = this.ScalingChatBubbleWithTail[chatBubbleType]:Clone() smallTalkBubble.Name = "SmallTalkBubble" smallTalkBubble.AnchorPoint = Vector2.new(0, 0.5) smallTalkBubble.Position = UDim2.new(0,0,0.5,0) smallTalkBubble.Visible = false local text = this:CreateBubbleText("...") text.TextScaled = true text.TextWrapped = false text.Visible = true text.Parent = smallTalkBubble return smallTalkBubble end function this:UpdateChatLinesForOrigin(origin, currentBubbleYPos) local bubbleQueue = this.CharacterSortedMsg:Get(origin).Fifo local bubbleQueueSize = bubbleQueue:Size() local bubbleQueueData = bubbleQueue:GetData() if #bubbleQueueData <= 1 then return end for index = (#bubbleQueueData - 1), 1, -1 do local value = bubbleQueueData[index] local bubble = value.RenderBubble if not bubble then return end local bubblePos = bubbleQueueSize - index + 1 if bubblePos > 1 then local tail = bubble:FindFirstChild("ChatBubbleTail") if tail then tail:Destroy() end local bubbleText = bubble:FindFirstChild("BubbleText") if bubbleText then bubbleText.TextTransparency = 0.5 end end local udimValue = UDim2.new( bubble.Position.X.Scale, bubble.Position.X.Offset, 1, currentBubbleYPos - bubble.Size.Y.Offset - CHAT_BUBBLE_TAIL_HEIGHT ) bubble:TweenPosition(udimValue, Enum.EasingDirection.Out, Enum.EasingStyle.Bounce, 0.1, true) currentBubbleYPos = currentBubbleYPos - bubble.Size.Y.Offset - CHAT_BUBBLE_TAIL_HEIGHT end end function this:DestroyBubble(bubbleQueue, bubbleToDestroy) if not bubbleQueue then return end if bubbleQueue:Empty() then return end local bubble = bubbleQueue:Front().RenderBubble if not bubble then bubbleQueue:PopFront() return end spawn(function() while bubbleQueue:Front().RenderBubble ~= bubbleToDestroy do wait() end bubble = bubbleQueue:Front().RenderBubble local timeBetween = 0 local bubbleText = bubble:FindFirstChild("BubbleText") local bubbleTail = bubble:FindFirstChild("ChatBubbleTail") while bubble and bubble.ImageTransparency < 1 do timeBetween = wait() if bubble then local fadeAmount = timeBetween * CHAT_BUBBLE_FADE_SPEED bubble.ImageTransparency = bubble.ImageTransparency + fadeAmount if bubbleText then bubbleText.TextTransparency = bubbleText.TextTransparency + fadeAmount end if bubbleTail then bubbleTail.ImageTransparency = bubbleTail.ImageTransparency + fadeAmount end end end if bubble then bubble:Destroy() bubbleQueue:PopFront() end end) end function this:CreateChatLineRender(instance, line, onlyCharacter, fifo, shouldAutoLocalize) if not instance then return end if not this.CharacterSortedMsg:Get(instance)["BillboardGui"] then this:CreateBillboardGuiHelper(instance, onlyCharacter) end local billboardGui = this.CharacterSortedMsg:Get(instance)["BillboardGui"] if billboardGui then local chatBubbleRender = this.ChatBubbleWithTail[line.BubbleColor]:Clone() chatBubbleRender.Visible = false local bubbleText = this:CreateBubbleText(line.Message, shouldAutoLocalize) bubbleText.Parent = chatBubbleRender chatBubbleRender.Parent = billboardGui.BillboardFrame line.RenderBubble = chatBubbleRender local currentTextBounds = TextService:GetTextSize( bubbleText.Text, CHAT_BUBBLE_FONT_SIZE_INT, CHAT_BUBBLE_FONT, Vector2.new(BILLBOARD_MAX_WIDTH, BILLBOARD_MAX_HEIGHT)) local bubbleWidthScale = math.max((currentTextBounds.X + CHAT_BUBBLE_WIDTH_PADDING)/BILLBOARD_MAX_WIDTH, 0.1) local numOflines = (currentTextBounds.Y/CHAT_BUBBLE_FONT_SIZE_INT) -- prep chat bubble for tween chatBubbleRender.Size = UDim2.new(0,0,0,0) chatBubbleRender.Position = UDim2.new(0.5,0,1,0) local newChatBubbleOffsetSizeY = numOflines * CHAT_BUBBLE_LINE_HEIGHT chatBubbleRender:TweenSizeAndPosition(UDim2.new(bubbleWidthScale, 0, 0, newChatBubbleOffsetSizeY), UDim2.new( (1-bubbleWidthScale)/2, 0, 1, -newChatBubbleOffsetSizeY), Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 0.1, true, function() bubbleText.Visible = true end) -- todo: remove when over max bubbles this:SetBillboardGuiLOD(billboardGui, line.Origin) this:UpdateChatLinesForOrigin(line.Origin, -newChatBubbleOffsetSizeY) delay(line.BubbleDieDelay, function() this:DestroyBubble(fifo, chatBubbleRender) end) end end function this:OnPlayerChatMessage(sourcePlayer, message, targetPlayer) if not this:BubbleChatEnabled() then return end local localPlayer = PlayersService.LocalPlayer local fromOthers = localPlayer ~= nil and sourcePlayer ~= localPlayer local safeMessage = this:SanitizeChatLine(message) local line = createPlayerChatLine(sourcePlayer, safeMessage, not fromOthers) if sourcePlayer and line.Origin then local fifo = this.CharacterSortedMsg:Get(line.Origin).Fifo fifo:PushBack(line) --Game chat (badges) won't show up here this:CreateChatLineRender(sourcePlayer.Character, line, true, fifo, false) end end function this:OnGameChatMessage(origin, message, color) local localPlayer = PlayersService.LocalPlayer local fromOthers = localPlayer ~= nil and (localPlayer.Character ~= origin) local bubbleColor = BubbleColor.WHITE if color == Enum.ChatColor.Blue then bubbleColor = BubbleColor.BLUE elseif color == Enum.ChatColor.Green then bubbleColor = BubbleColor.GREEN elseif color == Enum.ChatColor.Red then bubbleColor = BubbleColor.RED end local safeMessage = this:SanitizeChatLine(message) local line = createGameChatLine(origin, safeMessage, not fromOthers, bubbleColor) this.CharacterSortedMsg:Get(line.Origin).Fifo:PushBack(line) if UserShouldLocalizeGameChatBubble then this:CreateChatLineRender(origin, line, false, this.CharacterSortedMsg:Get(line.Origin).Fifo, true) else this:CreateChatLineRender(origin, line, false, this.CharacterSortedMsg:Get(line.Origin).Fifo, false) end end function this:BubbleChatEnabled() local clientChatModules = ChatService:FindFirstChild("ClientChatModules") if clientChatModules then local chatSettings = clientChatModules:FindFirstChild("ChatSettings") if chatSettings then local chatSettings = require(chatSettings) if chatSettings.BubbleChatEnabled ~= nil then return chatSettings.BubbleChatEnabled end end end return PlayersService.BubbleChat end function this:ShowOwnFilteredMessage() local clientChatModules = ChatService:FindFirstChild("ClientChatModules") if clientChatModules then local chatSettings = clientChatModules:FindFirstChild("ChatSettings") if chatSettings then chatSettings = require(chatSettings) return chatSettings.ShowUserOwnFilteredMessage end end return false end function findPlayer(playerName) for i,v in pairs(PlayersService:GetPlayers()) do if v.Name == playerName then return v end end end ChatService.Chatted:connect(function(origin, message, color) this:OnGameChatMessage(origin, message, color) end) local cameraChangedCon = nil if game.Workspace.CurrentCamera then cameraChangedCon = game.Workspace.CurrentCamera:GetPropertyChangedSignal("CFrame"):connect(function(prop) this:CameraCFrameChanged() end) end game.Workspace.Changed:connect(function(prop) if prop == "CurrentCamera" then if cameraChangedCon then cameraChangedCon:disconnect() end if game.Workspace.CurrentCamera then cameraChangedCon = game.Workspace.CurrentCamera:GetPropertyChangedSignal("CFrame"):connect(function(prop) this:CameraCFrameChanged() end) end end end) local AllowedMessageTypes = nil function getAllowedMessageTypes() if AllowedMessageTypes then return AllowedMessageTypes end local clientChatModules = ChatService:FindFirstChild("ClientChatModules") if clientChatModules then local chatSettings = clientChatModules:FindFirstChild("ChatSettings") if chatSettings then chatSettings = require(chatSettings) if chatSettings.BubbleChatMessageTypes then AllowedMessageTypes = chatSettings.BubbleChatMessageTypes return AllowedMessageTypes end end local chatConstants = clientChatModules:FindFirstChild("ChatConstants") if chatConstants then chatConstants = require(chatConstants) AllowedMessageTypes = {chatConstants.MessageTypeDefault, chatConstants.MessageTypeWhisper} end return AllowedMessageTypes end return {"Message", "Whisper"} end function checkAllowedMessageType(messageData) local allowedMessageTypes = getAllowedMessageTypes() for i = 1, #allowedMessageTypes do if allowedMessageTypes[i] == messageData.MessageType then return true end end return false end local ChatEvents = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents") local OnMessageDoneFiltering = ChatEvents:WaitForChild("OnMessageDoneFiltering") local OnNewMessage = ChatEvents:WaitForChild("OnNewMessage") OnNewMessage.OnClientEvent:connect(function(messageData, channelName) if not checkAllowedMessageType(messageData) then return end local sender = findPlayer(messageData.FromSpeaker) if not sender then return end if not messageData.IsFiltered or messageData.FromSpeaker == LocalPlayer.Name then if messageData.FromSpeaker ~= LocalPlayer.Name or this:ShowOwnFilteredMessage() then return end end this:OnPlayerChatMessage(sender, messageData.Message, nil) end) OnMessageDoneFiltering.OnClientEvent:connect(function(messageData, channelName) if not checkAllowedMessageType(messageData) then return end local sender = findPlayer(messageData.FromSpeaker) if not sender then return end if messageData.FromSpeaker == LocalPlayer.Name and not this:ShowOwnFilteredMessage() then return end this:OnPlayerChatMessage(sender, messageData.Message, nil) end)
---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
runService.RenderStepped:connect(function() if running then if freemouse == true then game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.Default else game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.LockCenter end end if not CanToggleMouse.allowed then freemouse = false end end)
-- Table setup containing product IDs and functions for handling purchases
local productFunctions = { [1527684360] = function(receipt, player) local stats = player:FindFirstChild("DonationValue") local donation = stats if donation then donation.Value = donation.Value + 5 return true end end; [1527684736] = function(receipt, player) local stats = player:FindFirstChild("DonationValue") local donation = stats if donation then donation.Value = donation.Value + 10 return true end end; [1527684772] = function(receipt, player) local stats = player:FindFirstChild("DonationValue") local donation = stats if donation then donation.Value = donation.Value + 15 return true end end; [1527684906] = function(receipt, player) local stats = player:FindFirstChild("DonationValue") local donation = stats if donation then donation.Value = donation.Value + 25 return true end end; [1527684963] = function(receipt, player) local stats = player:FindFirstChild("DonationValue") local donation = stats if donation then donation.Value = donation.Value + 50 return true end end; [1527685101] = function(receipt, player) local stats = player:FindFirstChild("DonationValue") local donation = stats if donation then donation.Value = donation.Value + 75 return true end end; [1527685172] = function(receipt, player) local stats = player:FindFirstChild("DonationValue") local donation = stats if donation then donation.Value = donation.Value + 100 return true end end; [1527685229] = function(receipt, player) local stats = player:FindFirstChild("DonationValue") local donation = stats if donation then donation.Value = donation.Value + 250 return true end end; [1527685281] = function(receipt, player) local stats = player:FindFirstChild("DonationValue") local donation = stats if donation then donation.Value = donation.Value + 500 return true end end; [1527685476] = function(receipt, player) local stats = player:FindFirstChild("DonationValue") local donation = stats if donation then donation.Value = donation.Value + 1000 return true end end; [1527685554] = function(receipt, player) local stats = player:FindFirstChild("DonationValue") local donation = stats if donation then donation.Value = donation.Value + 2500 return true end end; [1527685603] = function(receipt, player) local stats = player:FindFirstChild("DonationValue") local donation = stats if donation then donation.Value = donation.Value + 5000 return true end end; [1527685835] = function(receipt, player) local stats = player:FindFirstChild("DonationValue") local donation = stats if donation then donation.Value = donation.Value + 10000 return true end end; [1527685970] = function(receipt, player) local stats = player:FindFirstChild("DonationValue") local donation = stats if donation then donation.Value = donation.Value + 25000 return true end end; [1527689815] = function(receipt, player) local stats = player:FindFirstChild("DonationValue") local donation = stats if donation then donation.Value = donation.Value + 50000 return true end end; [1527686109] = function(receipt, player) local stats = player:FindFirstChild("DonationValue") local donation = stats if donation then donation.Value = donation.Value + 100000 return true end end; } MarketplaceService.ProcessReceipt = function(receiptInfo) local playerProductKey = receiptInfo.PlayerId .. "_" .. receiptInfo.PurchaseId local purchased = false local success, errorMessage = pcall(function() purchased = purchaseHistoryStore:GetAsync(playerProductKey) end) if success and purchased then return Enum.ProductPurchaseDecision.PurchaseGranted elseif not success then error("Data store error:" .. errorMessage) end local player = Players:GetPlayerByUserId(receiptInfo.PlayerId) if not player then return Enum.ProductPurchaseDecision.NotProcessedYet end local handler = productFunctions[receiptInfo.ProductId] local success, result = pcall(handler, receiptInfo, player) if not success or not result then warn("Error occurred while processing a product purchase") print("\nProductId:", receiptInfo.ProductId) print("\nPlayer:", player) return Enum.ProductPurchaseDecision.NotProcessedYet end local success, errorMessage = pcall(function() purchaseHistoryStore:SetAsync(playerProductKey, true) end) if not success then error("Cannot save purchase data: " .. errorMessage) end return Enum.ProductPurchaseDecision.PurchaseGranted end
--[[ Constants ]]
-- local RECALCULATE_PATH_THRESHOLD = 4 local NO_PATH_THRESHOLD = 12 local MAX_PATHING_DISTANCE = 200 local POINT_REACHED_THRESHOLD = 1 local OFFTRACK_TIME_THRESHOLD = 2 local THUMBSTICK_DEADZONE = 0.22 local ZERO_VECTOR3 = Vector3.new(0,0,0) local XZ_VECTOR3 = Vector3.new(1,0,1)
--Grenade variables
local grenade = script.Parent.Grenade
--[[ ROBLOX deviation START: some strings require escaped version depending where they are used ]]
local SUPPORTED_PLACEHOLDERS = RegExp("%[sdifjoOp]") local SUPPORTED_PLACEHOLDERS_PATTERN = "%%[sdifjoOp]" local PRETTY_PLACEHOLDER = "%p" local PRETTY_PLACEHOLDER_PATTERN = "%%p" local INDEX_PLACEHOLDER = "%%#" local PLACEHOLDER_PREFIX = "%%" local ESCAPED_PLACEHOLDER_PREFIX = "%%" local ESCAPED_PLACEHOLDER_PREFIX_PATTERN = "%%%%" local JEST_EACH_PLACEHOLDER_ESCAPE = "@@__JEST_EACH_PLACEHOLDER_ESCAPE__@@"
--- Trims whitespace from both sides of a string.
function Util.TrimString(s) return s:match "^%s*(.-)%s*$" end
-- Check if shift key, mobile sprint button, or Xbox gamepad button is being held down
local function checkSprintKeyDown() if UserInputService.TouchEnabled then return true elseif UserInputService.GamepadEnabled then return UserInputService:IsGamepadButtonDown(Enum.UserInputType.Gamepad1, Enum.KeyCode.ButtonL2) else return UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) or UserInputService:IsKeyDown(Enum.KeyCode.RightShift) end end
--!strict
type Object = { [string]: any } type Array<T> = { [number]: T } local function isfrozen(t: Object | Array<any>): boolean return table.isfrozen(t) end return isfrozen
--the reason for this script being 2 instead of 1 is MAGIC
WheelSize = 3.4--diameter of the wheel
-- Roblox NPC sound script
local Players = game:GetService("Players") local RunService = game:GetService("RunService") local SOUND_DATA = { Climbing = { SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3", Looped = true, }, Died = { SoundId = "rbxassetid://3361342315", }, FreeFalling = { SoundId = "rbxasset://sounds/action_falling.mp3", Looped = true, }, GettingUp = { SoundId = "rbxasset://sounds/action_get_up.mp3", }, Jumping = { SoundId = "rbxasset://sounds/action_jump.mp3", }, Landing = { SoundId = "rbxasset://sounds/action_jump_land.mp3", }, Running = { SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3", Looped = true, Pitch = 1.85, }, Splash = { SoundId = "rbxasset://sounds/impact_water.mp3", }, Swimming = { SoundId = "rbxasset://sounds/action_swim.mp3", Looped = true, Pitch = 1.6, }, }
--// Probabilities
JamChance = 0,1; -- This is percent scaled. For 100% Chance of jamming, put 100, for 0%, 0; and everything inbetween TracerChance = 100; -- This is the percen scaled. For 100% Chance of showing tracer, put 100, for 0%, 0; and everything inbetween
----------------- --| Constants |-- -----------------
local GRAVITY_ACCELERATION = workspace.Gravity local RELOAD_TIME = 0.0000000000000000001 -- Seconds until tool can be used again local ROCKET_SPEED = 1200 -- Speed of the projectile local ROCKET_TRAIL = true -- Whether rockets will create a smoke trail local MISSILE_MESH_ID = 'http://www.roblox.com/asset/?id=2251534' local MISSILE_MESH_SCALE = Vector3.new(0.35, 0.35, 0.25) local ROCKET_PART_SIZE = Vector3.new(1.2, 1.2, 3.27)
-- local TeleportService = game:GetService("TeleportService") -- подключение телепортаций
local Players = game:GetService("Players") -- подключение сервиса игроков local teleporter = script.Parent -- что должны коснуться local showPrompt = true -- показывать сообщение
--Running with animation and field of view--
Humanoid.Running:connect(function(Speed) if Speed >= 10 and Running and not RAnimation.IsPlaying then RAnimation:Play() Humanoid.WalkSpeed = RunningSpeed T:Play() elseif Speed >= 10 and not Running and RAnimation.IsPlaying then RAnimation:Stop() Humanoid.WalkSpeed = NormalSpeed rT:Play() elseif Speed < 10 and RAnimation.IsPlaying then RAnimation:Stop() Humanoid.WalkSpeed = NormalSpeed rT:Play() end end) game:GetService('ContextActionService'):BindAction('RunBind', Handler, true, Enum.KeyCode[key])
--print("Motion blur disabled")
script.Disabled = true end
-- Decompiled with the Synapse X Luau decompiler.
local l__Boards__1 = game.Workspace:WaitForChild("Boards"); local l__Retriever__2 = l__Boards__1:WaitForChild("SettingsHandler"):WaitForChild("Retriever"); local v3 = l__Retriever__2:InvokeServer("Authenticate"); local v4 = v3 == true and l__Retriever__2:InvokeServer("GetData") or nil; local v5 = nil; for v6, v7 in pairs(l__Boards__1:GetChildren()) do if v7.Name == "Buttons" then local l__SurfaceGui__8 = v7:WaitForChild("SurfaceGui"); for v9, v10 in pairs(l__SurfaceGui__8.MainFrame.ScrollingFrame:GetChildren()) do v10.TextButton.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, v10.Id.Value, true); end); v10.MouseEnter:connect(function() v10.Title.BackgroundTransparency = 0; end); v10.MouseLeave:connect(function() v10.Title.BackgroundTransparency = 0.25; end); end; l__SurfaceGui__8.MainFrame.ScrollingFrame.ChildAdded:connect(function(p1) p1.TextButton.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, p1.Id.Value, true); end); p1.MouseEnter:connect(function() p1.Title.BackgroundTransparency = 0; end); p1.MouseLeave:connect(function() p1.Title.BackgroundTransparency = 0.25; end); end); elseif v7.Name == "Screen" then local l__SurfaceGui__11 = v7:WaitForChild("SurfaceGui"); l__SurfaceGui__11.MainFrame.Information.Take.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptPurchase(game.Players.LocalPlayer, 391248083); end); local u1 = true; l__SurfaceGui__11.MainFrame.Footer.Title.ImageButton.MouseButton1Click:connect(function() if u1 then u1 = false; l__SurfaceGui__11.MainFrame.Title:TweenPosition(UDim2.new(1, 0, 0, 5), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.ScrollingFrame:TweenPosition(UDim2.new(1, 0, 0, 35), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Footer:TweenPosition(UDim2.new(1, 0, 1, -25), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Information:TweenPosition(UDim2.new(0, 0, 0, 0), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Information.Title:TweenPosition(UDim2.new(0, 5, 0, 5), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Information.Message1:TweenPosition(UDim2.new(0, 10, 0, 35), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Information.Message2:TweenPosition(UDim2.new(0, 10, 0, 140), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Information.Close:TweenPosition(UDim2.new(0.5, 5, 0, 245), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Information.Take:TweenPosition(UDim2.new(0, 10, 0, 245), "InOut", "Quart", 0.5, true); wait(0.5); u1 = true; end; end); l__SurfaceGui__11.MainFrame.Information.Close.MouseButton1Click:connect(function() if u1 then u1 = false; l__SurfaceGui__11.MainFrame.Information.Title:TweenPosition(UDim2.new(-1, 5, 0, 5), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Information.Message1:TweenPosition(UDim2.new(-1, 10, 0, 35), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Information.Message2:TweenPosition(UDim2.new(-1, 10, 0, 140), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Information.Take:TweenPosition(UDim2.new(-1, 10, 0, 245), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Information.Close:TweenPosition(UDim2.new(-1, 5, 0, 245), "InOut", "Quart", 0.5, true); wait(); delay(0.5, function() l__SurfaceGui__11.MainFrame.Information.Position = UDim2.new(-1, 0, 0, 0); end); wait(); l__SurfaceGui__11.MainFrame.Title:TweenPosition(UDim2.new(0, 5, 0, 5), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.ScrollingFrame:TweenPosition(UDim2.new(0, 5, 0, 35), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Footer:TweenPosition(UDim2.new(0, 5, 1, -25), "InOut", "Quart", 0.5, true); wait(0.5); u1 = true; end; end); if v3 == true then l__SurfaceGui__11.MainFrame.Footer.Title.Settings.Visible = true; local u2 = v4; local u3 = v5; l__SurfaceGui__11.MainFrame.Footer.Title.Settings.MouseButton1Click:connect(function() if u1 then u1 = false; local v12, v13 = l__Retriever__2:InvokeServer("GetData"); u2 = v12; u3 = v13; l__SurfaceGui__11.MainFrame.Settings.Message2.ListSize.TextBox.Text = u2.ListSize; l__SurfaceGui__11.MainFrame.Settings.Message2.Datastore.TextBox.Text = u2.Datastore; l__SurfaceGui__11.MainFrame.Settings.Message2.Refresh.TextBox.Text = u2.Refresh; if u3 == true then l__SurfaceGui__11.MainFrame.Settings.Message2.Datastore.TextBox.Min.Visible = false; l__SurfaceGui__11.MainFrame.Settings.Message2.Datastore.TextBox.Plus.Visible = false; l__SurfaceGui__11.MainFrame.Settings.Message2.Datastore.TextBox.Text = "Disabled because AbortCustomPurchases"; end; l__SurfaceGui__11.MainFrame.Title:TweenPosition(UDim2.new(1, 0, 0, 5), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.ScrollingFrame:TweenPosition(UDim2.new(1, 0, 0, 35), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Footer:TweenPosition(UDim2.new(1, 0, 1, -25), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Settings:TweenPosition(UDim2.new(0, 0, 0, 0), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Settings.Message1:TweenPosition(UDim2.new(0, 10, 0, 5), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Settings.Message2:TweenPosition(UDim2.new(0, 10, 0, 90), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Settings.Save:TweenPosition(UDim2.new(0.5, 0, 0, 175), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Settings.Cancel:TweenPosition(UDim2.new(0, 10, 0, 175), "InOut", "Quart", 0.5, true); wait(0.5); u1 = true; end; end); l__SurfaceGui__11.MainFrame.Settings.Cancel.MouseButton1Click:connect(function() if u1 then u1 = false; l__SurfaceGui__11.MainFrame.Settings.Message1:TweenPosition(UDim2.new(-1, 10, 0, 5), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Settings.Message2:TweenPosition(UDim2.new(-1, 10, 0, 90), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Settings.Cancel:TweenPosition(UDim2.new(-1, 10, 0, 175), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Settings.Save:TweenPosition(UDim2.new(-1, 5, 0, 175), "InOut", "Quart", 0.5, true); wait(); delay(0.5, function() l__SurfaceGui__11.MainFrame.Settings.Position = UDim2.new(-1, 0, 0, 0); end); wait(); l__SurfaceGui__11.MainFrame.Title:TweenPosition(UDim2.new(0, 5, 0, 5), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.ScrollingFrame:TweenPosition(UDim2.new(0, 5, 0, 35), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Footer:TweenPosition(UDim2.new(0, 5, 1, -25), "InOut", "Quart", 0.5, true); wait(0.5); u1 = true; end; end); l__SurfaceGui__11.MainFrame.Settings.Save.MouseButton1Click:connect(function() if u1 then u1 = false; l__SurfaceGui__11.MainFrame.Settings.Save.Text = "Saving..."; u2 = l__Retriever__2:InvokeServer("SetData", u2); l__SurfaceGui__11.MainFrame.Settings.Save.Text = "Save"; l__SurfaceGui__11.MainFrame.Settings.Message1:TweenPosition(UDim2.new(-1, 10, 0, 5), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Settings.Message2:TweenPosition(UDim2.new(-1, 10, 0, 90), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Settings.Cancel:TweenPosition(UDim2.new(-1, 10, 0, 175), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Settings.Save:TweenPosition(UDim2.new(-1, 5, 0, 175), "InOut", "Quart", 0.5, true); wait(); delay(0.5, function() l__SurfaceGui__11.MainFrame.Settings.Position = UDim2.new(-1, 0, 0, 0); end); wait(); l__SurfaceGui__11.MainFrame.Title:TweenPosition(UDim2.new(0, 5, 0, 5), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.ScrollingFrame:TweenPosition(UDim2.new(0, 5, 0, 35), "InOut", "Quart", 0.5, true); wait(); l__SurfaceGui__11.MainFrame.Footer:TweenPosition(UDim2.new(0, 5, 1, -25), "InOut", "Quart", 0.5, true); wait(0.5); u1 = true; end; end); l__SurfaceGui__11.MainFrame.Settings.Message2.ListSize.TextBox.Min.MouseButton1Click:connect(function() local v14 = tonumber(l__SurfaceGui__11.MainFrame.Settings.Message2.ListSize.TextBox.Text); if v14 > 1 then local v15 = v14 - 1; l__SurfaceGui__11.MainFrame.Settings.Message2.ListSize.TextBox.Text = v15; u2.ListSize = v15; end; end); l__SurfaceGui__11.MainFrame.Settings.Message2.ListSize.TextBox.Plus.MouseButton1Click:connect(function() local v16 = tonumber(l__SurfaceGui__11.MainFrame.Settings.Message2.ListSize.TextBox.Text); if v16 < 100 then local v17 = v16 + 1; l__SurfaceGui__11.MainFrame.Settings.Message2.ListSize.TextBox.Text = v17; u2.ListSize = v17; end; end); l__SurfaceGui__11.MainFrame.Settings.Message2.Datastore.TextBox.Min.MouseButton1Click:connect(function() local v18 = tonumber(l__SurfaceGui__11.MainFrame.Settings.Message2.Datastore.TextBox.Text); if v18 > 1 then local v19 = v18 - 1; l__SurfaceGui__11.MainFrame.Settings.Message2.Datastore.TextBox.Text = v19; u2.Datastore = v19; end; end); l__SurfaceGui__11.MainFrame.Settings.Message2.Datastore.TextBox.Plus.MouseButton1Click:connect(function() local v20 = tonumber(l__SurfaceGui__11.MainFrame.Settings.Message2.Datastore.TextBox.Text); if v20 < 100 then local v21 = v20 + 1; l__SurfaceGui__11.MainFrame.Settings.Message2.Datastore.TextBox.Text = v21; u2.Datastore = v21; end; end); l__SurfaceGui__11.MainFrame.Settings.Message2.Refresh.TextBox.Min.MouseButton1Click:connect(function() local v22 = tonumber(l__SurfaceGui__11.MainFrame.Settings.Message2.Refresh.TextBox.Text); if v22 > 1 then local v23 = v22 - 1; l__SurfaceGui__11.MainFrame.Settings.Message2.Refresh.TextBox.Text = v23; u2.Refresh = v23; end; end); l__SurfaceGui__11.MainFrame.Settings.Message2.Refresh.TextBox.Plus.MouseButton1Click:connect(function() local v24 = tonumber(l__SurfaceGui__11.MainFrame.Settings.Message2.Refresh.TextBox.Text); if v24 < 10 then local v25 = v24 + 1; l__SurfaceGui__11.MainFrame.Settings.Message2.Refresh.TextBox.Text = v25; u2.Refresh = v25; end; end); end; end; end;
-- FOLDERS --
local Modules = RS:WaitForChild("Modules")
--- Deep copies a table including metatables -- @function Table.deepCopy -- @tparam table table Table to deep copy -- @treturn table New table
local function deepCopy(target, _context) _context = _context or {} if _context[target] then return _context[target] end if type(target) == "table" then local new = {} _context[target] = new for index, value in pairs(target) do new[deepCopy(index, _context)] = deepCopy(value, _context) end return setmetatable(new, deepCopy(getmetatable(target), _context)) else return target end end Table.deepCopy = deepCopy
--[=[ @function filter @within Set @param set { [T]: boolean } -- The set to filter. @param predicate? (item: T, set: { [T]: boolean }) -> any -- The function to filter the set with. @return { [T]: boolean } -- The filtered set. Filters a set using a predicate. Any items that do not pass the predicate will be removed from the set. ```lua local set = { hello = true, world = true } local newSet = Filter(set, function(value) return value ~= "hello" end) -- { world = true } ``` ]=]
local function filter<T>(set: { [T]: boolean }, predicate: ((T, { [T]: boolean }) -> any)?): { [T]: boolean } local result = {} predicate = if type(predicate) == "function" then predicate else Util.func.truthy for key, _ in pairs(set) do if predicate(key, set) then result[key] = true end end return result end return filter
-- Decompiled with the Synapse X Luau decompiler.
local l__ReplicatedStorage__1 = game:GetService("ReplicatedStorage"); local u1 = require(l__ReplicatedStorage__1.Packages.Fusion); local u2 = require(l__ReplicatedStorage__1.Admin.Theme); return function(p1) local v2 = { Name = p1.Name, AutomaticSize = Enum.AutomaticSize.Y, Size = UDim2.fromScale(1, 0), BackgroundColor3 = u2.InlineTextBoxBackground, PlaceholderText = p1.PlaceholderText, PlaceholderColor3 = u1.Computed(function() if p1.HighlightEmptyError and p1.HighlightEmptyError:get() then return u2.InlineTextBoxPlaceholderEmptyError; end; return u2.InlineTextBoxPlaceholder; end), TextEditable = p1.TextEditable, Text = p1.Text, TextColor3 = u2.InlineTextBoxText, TextXAlignment = Enum.TextXAlignment.Left, TextSize = 14, TextWrapped = true, Font = Enum.Font.Gotham, Visible = p1.Visible }; local u3 = ""; v2[u1.OnChange("Text")] = function(p2) u3 = p2; end; v2[u1.OnEvent("FocusLost")] = function(p3) if p3 then p1.OnTextEntered(u3); end; end; v2[u1.OnChange("Text")] = p1.TextChanged; v2[u1.Children] = { u1.New("UICorner")({ CornerRadius = UDim.new(0, 5) }), u1.New("UIPadding")({ PaddingLeft = UDim.new(0, 18), PaddingRight = UDim.new(0, 18), PaddingTop = UDim.new(0, 10), PaddingBottom = UDim.new(0, 10) }), p1[u1.Children] }; return u1.New("TextBox")(v2); end;
--[=[ Observes the last child with a specific name. @param parent Instance @param className string @param name string @return Observable<Brio<Instance>> ]=]
function RxInstanceUtils.observeLastNamedChildBrio(parent, className, name) assert(typeof(parent) == "Instance", "Bad parent") assert(type(className) == "string", "Bad className") assert(type(name) == "string", "Bad name") return Observable.new(function(sub) local topMaid = Maid.new() local function handleChild(child) if not child:IsA(className) then return end local maid = Maid.new() local function handleNameChanged() if child.Name == name then local brio = Brio.new(child) maid._brio = brio topMaid._lastBrio = brio sub:Fire(brio) else maid._brio = nil end end maid:GiveTask(child:GetPropertyChangedSignal("Name"):Connect(handleNameChanged)) handleNameChanged() topMaid[child] = maid end topMaid:GiveTask(parent.ChildAdded:Connect(handleChild)) topMaid:GiveTask(parent.ChildRemoved:Connect(function(child) topMaid[child] = nil end)) for _, child in pairs(parent:GetChildren()) do handleChild(child) end return topMaid end) end
--[[ Run the given test plan node and its descendants, using the given test session to store all of the results. ]]
function TestRunner.runPlanNode(session, planNode, lifecycleHooks) local function runCallback(callback, messagePrefix) local success = true local errorMessage -- Any code can check RUNNING_GLOBAL to fork behavior based on -- whether a test is running. We use this to avoid accessing -- protected APIs; it's a workaround that will go away someday. _G[RUNNING_GLOBAL] = true messagePrefix = messagePrefix or "" local testEnvironment = getfenv(callback) for key, value in pairs(TestRunner.environment) do testEnvironment[key] = value end testEnvironment.fail = function(message) if message == nil then message = "fail() was called." end success = false errorMessage = messagePrefix .. message .. "\n" .. debug.traceback() end local context = session:getContext() local nodeSuccess, nodeResult = xpcall( function() callback(context) end, function(message) return messagePrefix .. message .. "\n" .. debug.traceback() end ) -- If a node threw an error, we prefer to use that message over -- one created by fail() if it was set. if not nodeSuccess then success = false errorMessage = nodeResult end _G[RUNNING_GLOBAL] = nil return success, errorMessage end local function runNode(childPlanNode) -- Errors can be set either via `error` propagating upwards or -- by a test calling fail([message]). for _, hook in ipairs(lifecycleHooks:getBeforeEachHooks()) do local success, errorMessage = runCallback(hook, "beforeEach hook: ") if not success then return false, errorMessage end end do local success, errorMessage = runCallback(childPlanNode.callback) if not success then return false, errorMessage end end for _, hook in ipairs(lifecycleHooks:getAfterEachHooks()) do local success, errorMessage = runCallback(hook, "afterEach hook: ") if not success then return false, errorMessage end end return true, nil end lifecycleHooks:pushHooksFrom(planNode) local halt = false for _, hook in ipairs(lifecycleHooks:getBeforeAllHooks()) do local success, errorMessage = runCallback(hook, "beforeAll hook: ") if not success then session:addDummyError("beforeAll", errorMessage) halt = true end end if not halt then for _, childPlanNode in ipairs(planNode.children) do session:pushNode(childPlanNode) if childPlanNode.type == TestEnum.NodeType.It then if session:shouldSkip() then session:setSkipped() else local success, errorMessage = runNode(childPlanNode) if success then session:setSuccess() else session:setError(errorMessage) end end elseif childPlanNode.type == TestEnum.NodeType.Describe then TestRunner.runPlanNode(session, childPlanNode, lifecycleHooks) -- Did we have an error trying build a test plan? if childPlanNode.loadError then local message = "Error during planning: " .. childPlanNode.loadError session:setError(message) else session:setStatusFromChildren() end end session:popNode() end end for _, hook in ipairs(lifecycleHooks:getAfterAllHooks()) do local success, errorMessage = runCallback(hook, "afterAll hook: ") if not success then session:addDummyError("afterAll", errorMessage) end end lifecycleHooks:popHooks() end return TestRunner
--------------------------------------------
if waypoint.Action == Enum.PathWaypointAction.Jump then Human:ChangeState(Enum.HumanoidStateType.Jumping) end while wait() do Human:MoveTo(waypoint.Position) break end Human.MoveToFinished:Wait() end Human:MoveTo(goal) end while wait(5) do RandomP() end
--[[Engine]]
--Torque Curve Tune.Horsepower = 280 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6000 -- Use sliders to manipulate values Tune.Redline = 6700 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16 --Incline Compensation Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 150 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
--script.Parent.SurfaceGui.ImageLabel.BackgroundColor3 = script.Parent.BrickColor.Color --script.Parent.Pixelate.Color = Color3.new(script.Parent.SurfaceGui.ImageLabel.BackgroundColor3.r,0,0)
-- functions
function stopAllAnimations() local oldAnim = currentAnim -- return to idle if finishing an emote if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then oldAnim = "idle" end if FFlagAnimateScriptEmoteHook and currentlyPlayingEmote then oldAnim = "idle" currentlyPlayingEmote = false end currentAnim = "" currentAnimInstance = nil if (currentAnimKeyframeHandler ~= nil) then currentAnimKeyframeHandler:Disconnect() end if (currentAnimTrack ~= nil) then currentAnimTrack:Stop() currentAnimTrack:Destroy() currentAnimTrack = nil end -- clean up walk if there is one if (runAnimKeyframeHandler ~= nil) then runAnimKeyframeHandler:Disconnect() end if (runAnimTrack ~= nil) then runAnimTrack:Stop() runAnimTrack:Destroy() runAnimTrack = nil end return oldAnim end function getHeightScale() if Humanoid then if not Humanoid.AutomaticScalingEnabled then return 1 end local scale = Humanoid.HipHeight / HumanoidHipHeight if AnimationSpeedDampeningObject == nil then AnimationSpeedDampeningObject = script:FindFirstChild("ScaleDampeningPercent") end if AnimationSpeedDampeningObject ~= nil then scale = 1 + (Humanoid.HipHeight - HumanoidHipHeight) * AnimationSpeedDampeningObject.Value / HumanoidHipHeight end return scale end return 1 end local function rootMotionCompensation(speed) local speedScaled = speed * 1.25 local heightScale = getHeightScale() local runSpeed = speedScaled / heightScale return runSpeed end local smallButNotZero = 0.0001 local function setRunSpeed(speed) local normalizedWalkSpeed = 0.5 -- established empirically using current `913402848` walk animation local normalizedRunSpeed = 1 local runSpeed = rootMotionCompensation(speed) local walkAnimationWeight = smallButNotZero local runAnimationWeight = smallButNotZero local walkAnimationTimewarp = runSpeed/normalizedWalkSpeed local runAnimationTimerwarp = runSpeed/normalizedRunSpeed if runSpeed <= normalizedWalkSpeed then walkAnimationWeight = 1 elseif runSpeed < normalizedRunSpeed then local fadeInRun = (runSpeed - normalizedWalkSpeed)/(normalizedRunSpeed - normalizedWalkSpeed) walkAnimationWeight = 1 - fadeInRun runAnimationWeight = fadeInRun walkAnimationTimewarp = 1 runAnimationTimerwarp = 1 else runAnimationWeight = 1 end currentAnimTrack:AdjustWeight(walkAnimationWeight) runAnimTrack:AdjustWeight(runAnimationWeight) currentAnimTrack:AdjustSpeed(walkAnimationTimewarp) runAnimTrack:AdjustSpeed(runAnimationTimerwarp) end function setAnimationSpeed(speed) if currentAnim == "walk" then setRunSpeed(speed) else if speed ~= currentAnimSpeed then currentAnimSpeed = speed currentAnimTrack:AdjustSpeed(currentAnimSpeed) end end end function keyFrameReachedFunc(frameName) if (frameName == "End") then if currentAnim == "walk" then if userNoUpdateOnLoop == true then if runAnimTrack.Looped ~= true then runAnimTrack.TimePosition = 0.0 end if currentAnimTrack.Looped ~= true then currentAnimTrack.TimePosition = 0.0 end else runAnimTrack.TimePosition = 0.0 currentAnimTrack.TimePosition = 0.0 end else local repeatAnim = currentAnim -- return to idle if finishing an emote if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then repeatAnim = "idle" end if FFlagAnimateScriptEmoteHook and currentlyPlayingEmote then if currentAnimTrack.Looped then -- Allow the emote to loop return end repeatAnim = "idle" currentlyPlayingEmote = false end local animSpeed = currentAnimSpeed playAnimation(repeatAnim, 0.15, Humanoid) setAnimationSpeed(animSpeed) end end end function rollAnimation(animName) local roll = math.random(1, animTable[animName].totalWeight) local origRoll = roll local idx = 1 while (roll > animTable[animName][idx].weight) do roll = roll - animTable[animName][idx].weight idx = idx + 1 end return idx end local function switchToAnim(anim, animName, transitionTime, humanoid) -- switch animation if (anim ~= currentAnimInstance) then if (currentAnimTrack ~= nil) then currentAnimTrack:Stop(transitionTime) currentAnimTrack:Destroy() end if (runAnimTrack ~= nil) then runAnimTrack:Stop(transitionTime) runAnimTrack:Destroy() if userNoUpdateOnLoop == true then runAnimTrack = nil end end currentAnimSpeed = 1.0 -- load it to the humanoid; get AnimationTrack currentAnimTrack = humanoid:LoadAnimation(anim) currentAnimTrack.Priority = Enum.AnimationPriority.Core -- play the animation currentAnimTrack:Play(transitionTime) currentAnim = animName currentAnimInstance = anim -- set up keyframe name triggers if (currentAnimKeyframeHandler ~= nil) then currentAnimKeyframeHandler:Disconnect() end currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:Connect(keyFrameReachedFunc) -- check to see if we need to blend a walk/run animation if animName == "walk" then local runAnimName = "run" local runIdx = rollAnimation(runAnimName) runAnimTrack = humanoid:LoadAnimation(animTable[runAnimName][runIdx].anim) runAnimTrack.Priority = Enum.AnimationPriority.Core runAnimTrack:Play(transitionTime) if (runAnimKeyframeHandler ~= nil) then runAnimKeyframeHandler:Disconnect() end runAnimKeyframeHandler = runAnimTrack.KeyframeReached:Connect(keyFrameReachedFunc) end end end function playAnimation(animName, transitionTime, humanoid) local idx = rollAnimation(animName) local anim = animTable[animName][idx].anim switchToAnim(anim, animName, transitionTime, humanoid) currentlyPlayingEmote = false end function playEmote(emoteAnim, transitionTime, humanoid) switchToAnim(emoteAnim, emoteAnim.Name, transitionTime, humanoid) currentlyPlayingEmote = true end
--//Client Anims
local Speedo function IdleAnim(L_442_arg1) Anims.IdleAnim(Character, Speedo, { AnimBaseW, RA, LA, AnimBase.GripW, ArmaClone, Left_Weld, Right_Weld, }); end; function StanceDown(L_442_arg1) Anims.StanceDown(Character, Speedo, { AnimBaseW, RA, LA, AnimBase.GripW, ArmaClone, Left_Weld, Right_Weld, }); end; function StanceUp(L_442_arg1) Anims.StanceUp(Character, Speedo, { AnimBaseW, RA, LA, AnimBase.GripW, ArmaClone, Left_Weld, Right_Weld, }); end; function Patrol(L_442_arg1) Anims.Patrol(Character, Speedo, { AnimBaseW, RA, LA, AnimBase.GripW, ArmaClone, Left_Weld, Right_Weld, }); end; function SprintAnim(L_442_arg1) Anims.SprintAnim(Character, Speedo, { AnimBaseW, RA, LA, AnimBase.GripW, ArmaClone, Left_Weld, Right_Weld, }); end; function EquipAnim(L_442_arg1) AnimDebounce = true Can_Shoot = false Reloading = true Anims.EquipAnim(Character, Speedo, { AnimBaseW, RA, LA, AnimBase.GripW, ArmaClone, Left_Weld, Right_Weld, }); Reloading = false Can_Shoot = true AnimDebounce = false end; function ChamberAnim(L_442_arg1) AnimDebounce = true Anims.ChamberAnim(Character, Speedo, { AnimBaseW, RA, LA, AnimBase.GripW, ArmaClone, Settings, Right_Weld, Left_Weld, }); if Ammo.Value > 0 and Chambered.Value ==true and Emperrado.Value == true then Emperrado.Value = false elseif Ammo.Value > 0 and Chambered.Value == true and Emperrado.Value == false then Ammo.Value = Ammo.Value - 1 end slideback = false if Ammo.Value > 0 then Chambered.Value = true end AnimDebounce = false end; function ZoomAnim(L_442_arg1) Anims.ZoomAnim(Character, Speedo, { AnimBaseW, RA, LA, AnimBase.GripW, ArmaClone, Settings, Left_Weld, Right_Weld, }); end; function UnZoomAnim(L_442_arg1) Anims.UnZoomAnim(Character, Speedo, { AnimBaseW, RA, LA, AnimBase.GripW, ArmaClone, Settings, Left_Weld, Right_Weld, }); end; function ChamberBKAnim(L_442_arg1) AnimDebounce = true Anims.ChamberBKAnim(Character, Speedo, { AnimBaseW, RA, LA, AnimBase.GripW, ArmaClone, Settings, Left_Weld, Right_Weld, }); slideback = false if Ammo.Value > 0 then Chambered.Value = true end AnimDebounce = false end; function CheckAnim(L_442_arg1) AnimDebounce = true CheckMagFunction() Anims.CheckAnim(Character, Speedo, { AnimBaseW, RA, LA, AnimBase.GripW, ArmaClone, StoredAmmo, Ammo, Settings, Chambered, Left_Weld, Right_Weld, }); AnimDebounce = false end; function ShellInsertAnim(L_442_arg1) AnimDebounce = true Anims.ShellInsertAnim(Character, Speedo, { AnimBaseW, RA, LA, AnimBase.GripW, ArmaClone, StoredAmmo, Ammo, Settings, Chambered, Left_Weld, Right_Weld, }); Evt.Recarregar:FireServer(StoredAmmo.Value,ArmaClient) AnimDebounce = false end; function ReloadAnim(L_442_arg1) AnimDebounce = true Anims.ReloadAnim(Character, Speedo, { AnimBaseW, RA, LA, AnimBase.GripW, ArmaClone, StoredAmmo, Ammo, Settings, Chambered, Left_Weld, Right_Weld, }); Evt.Recarregar:FireServer(StoredAmmo.Value,ArmaClient) AnimDebounce = false end; function GLReloadAnim(L_442_arg1) AnimDebounce = true Anims.GLReloadAnim(Character, Speedo, { AnimBaseW, RA, LA, AnimBase.GripW, ArmaClone, StoredAmmo, Ammo, Settings, Chambered, Left_Weld, Right_Weld, }); Evt.Recarregar:FireServer(StoredAmmo.Value,ArmaClient) AnimDebounce = false end;
-- OFFSET HANDLERS
local alignmentDetails = {} alignmentDetails["left"] = { startScale = 0, getOffset = function() local offset = 48 + IconController.leftOffset if checkTopbarEnabled() and starterGui:GetCoreGuiEnabled("Chat") then offset += 12 + 32 end return offset end, getStartOffset = function() local alignmentGap = IconController["leftGap"] local startOffset = alignmentDetails.left.getOffset() + alignmentGap return startOffset end, records = {} } alignmentDetails["mid"] = { startScale = 0.5, getOffset = function() return 0 end, getStartOffset = function(totalIconX) local alignmentGap = IconController["midGap"] return -totalIconX/2 + (alignmentGap/2) end, records = {} } alignmentDetails["right"] = { startScale = 1, getOffset = function() local offset = IconController.rightOffset if checkTopbarEnabled() and (starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.PlayerList) or starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack) or starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu)) then offset += 48 end return offset end, getStartOffset = function(totalIconX) local startOffset = -totalIconX - alignmentDetails.right.getOffset() return startOffset end, records = {} --reverseSort = true }
----------------------
function findData(UserId) local tab = nil for i,v in pairs(_G.Jail) do if v.UserId == UserId then tab = v end end return tab end spawn(function() while wait(10) do for _,plr in pairs(game.Players:GetPlayers()) do if not findData(plr.UserId) then repeat local userData = storage.LoadData(plr.UserId) wait(0.5) if not userData then end until userData == true else end end end end) spawn(function() while wait(30) do for _,plr in pairs(game.Players:GetPlayers()) do storage.SaveData(plr.UserId, false) end end end)
-- Public Functions
function FlagStandManager:Init(container) local flagObject = {} local success, message = pcall(function() flagObject.AtSpawn = true flagObject.PickedUp = false flagObject.TeamColor = container.FlagStand.BrickColor flagObject.Flag = container.Flag flagObject.FlagPole = container.Flag.FlagPole flagObject.FlagBanner = container.Flag.FlagBanner flagObject.FlagBase = container.FlagStand flagObject.FlagCopy = container.Flag:Clone() flagObject.FlagContainer = container end) if not success then warn("Flag object not built correctly. Please load fresh template to see how flag stand is expected to be made.") end BindBaseTouched(flagObject) DestroyFlag(flagObject) MakeFlag(flagObject) table.insert(FlagObjects, flagObject) end
--You can change Transparency by changing the number to any number you want.
--Automatic Gauge Scaling
if autoscaling then local Drive={} if _Tune.Config == "FWD" or _Tune.Config == "AWD" then if car.Wheels:FindFirstChild("FL")~= nil then table.insert(Drive,car.Wheels.FL) end if car.Wheels:FindFirstChild("FR")~= nil then table.insert(Drive,car.Wheels.FR) end if car.Wheels:FindFirstChild("F")~= nil then table.insert(Drive,car.Wheels.F) end end if _Tune.Config == "RWD" or _Tune.Config == "AWD" then if car.Wheels:FindFirstChild("RL")~= nil then table.insert(Drive,car.Wheels.RL) end if car.Wheels:FindFirstChild("RR")~= nil then table.insert(Drive,car.Wheels.RR) end if car.Wheels:FindFirstChild("R")~= nil then table.insert(Drive,car.Wheels.R) end end local wDia = 0 for i,v in pairs(Drive) do if v.Size.x>wDia then wDia = v.Size.x end end Drive = nil for i,v in pairs(UNITS) do v.maxSpeed = math.ceil(v.scaling*wDia*math.pi*_lRPM/60/_Tune.Ratios[#_Tune.Ratios]/_Tune.FinalDrive/_Tune.FDMult) v.spInc = math.max(math.ceil(v.maxSpeed/150)*10,10) end end for i=0,revEnd*2 do local ln = gauges.ln:clone() ln.Parent = gauges.Tach ln.Rotation = 45 + i * 225 / (revEnd*2) ln.Num.Text = i/2 ln.Num.Rotation = -ln.Rotation if i*500>=math.floor(_pRPM/500)*500 then ln.Frame.BackgroundColor3 = Color3.new(1,0,0) if i<revEnd*2 then ln2 = ln:clone() ln2.Parent = gauges.Tach ln2.Rotation = 45 + (i+.5) * 225 / (revEnd*2) ln2.Num:Destroy() ln2.Visible=true end end if i%2==0 then ln.Frame.Size = UDim2.new(0,3,0,10) ln.Frame.Position = UDim2.new(0,-1,0,100) ln.Num.Visible = true else ln.Num:Destroy() end ln.Visible=true end local lns = Instance.new("Frame",gauges.Speedo) lns.Name = "lns" lns.BackgroundTransparency = 1 lns.BorderSizePixel = 0 lns.Size = UDim2.new(0,0,0,0) for i=1,90 do local ln = gauges.ln:clone() ln.Parent = lns ln.Rotation = 45 + 225*(i/90) if i%2==0 then ln.Frame.Size = UDim2.new(0,2,0,10) ln.Frame.Position = UDim2.new(0,-1,0,100) else ln.Frame.Size = UDim2.new(0,3,0,5) end ln.Num:Destroy() ln.Visible=true end local blns = Instance.new("Frame",gauges.Boost) blns.Name = "blns" blns.BackgroundTransparency = 1 blns.BorderSizePixel = 0 blns.Size = UDim2.new(0,0,0,0) for i=0,12 do local bln = gauges.bln:clone() bln.Parent = blns bln.Rotation = 45+270*(i/12) if i%2==0 then bln.Frame.Size = UDim2.new(0,2,0,7) bln.Frame.Position = UDim2.new(0,-1,0,40) else bln.Frame.Size = UDim2.new(0,3,0,5) end bln.Num:Destroy() bln.Visible=true end for i,v in pairs(UNITS) do local lnn = Instance.new("Frame",gauges.Speedo) lnn.BackgroundTransparency = 1 lnn.BorderSizePixel = 0 lnn.Size = UDim2.new(0,0,0,0) lnn.Name = v.units if i~= 1 then lnn.Visible=false end for i=0,v.maxSpeed,v.spInc do local ln = gauges.ln:clone() ln.Parent = lnn ln.Rotation = 45 + 225*(i/v.maxSpeed) ln.Num.Text = i ln.Num.TextSize = 14 ln.Num.Rotation = -ln.Rotation ln.Frame:Destroy() ln.Num.Visible=true ln.Visible=true end end if isOn.Value then gauges:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end isOn.Changed:connect(function() if isOn.Value then gauges:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end end) values.RPM.Changed:connect(function() gauges.Tach.Needle.Rotation = 45 + 225 * math.min(1,values.RPM.Value / (revEnd*1000)) end) local _TCount = 0 if _Tune.Aspiration ~= "Natural" then if _Tune.Aspiration == "Single" or _Tune.Aspiration == "Super" then _TCount = 1 elseif _Tune.Aspiration == "Double" then _TCount = 2 end values.Boost.Changed:connect(function() local boost = math.floor(values.Boost.Value) if _Tune.Aspiration~="Super" then boost = (math.floor(values.Boost.Value)*1.2)-((_Tune.Boost*_TCount)/5) end gauges.Boost.Needle.Rotation = 45 + 270 * math.min(1,(values.Boost.Value/(_Tune.Boost)/_TCount)) gauges.PSI.Text = tostring(math.floor(boost).." PSI") end) else gauges.Boost:Destroy() end values.Gear.Changed:connect(function() local gearText = values.Gear.Value if gearText == 0 then gearText = "N" elseif gearText == -1 then gearText = "R" end gauges.Gear.Text = gearText end) values.TCS.Changed:connect(function() if _Tune.TCSEnabled then if values.TCS.Value then gauges.TCS.TextColor3 = Color3.new(1,170/255,0) gauges.TCS.TextStrokeColor3 = Color3.new(1,170/255,0) if values.TCSActive.Value then wait() gauges.TCS.Visible = not gauges.TCS.Visible else wait() gauges.TCS.Visible = false end else gauges.TCS.Visible = true gauges.TCS.TextColor3 = Color3.new(1,0,0) gauges.TCS.TextStrokeColor3 = Color3.new(1,0,0) end else gauges.TCS.Visible = false end end) values.TCSActive.Changed:connect(function() if _Tune.TCSEnabled then if values.TCSActive.Value and values.TCS.Value then wait() gauges.TCS.Visible = not gauges.TCS.Visible elseif not values.TCS.Value then wait() gauges.TCS.Visible = true else wait() gauges.TCS.Visible = false end else gauges.TCS.Visible = false end end) gauges.TCS.Changed:connect(function() if _Tune.TCSEnabled then if values.TCSActive.Value and values.TCS.Value then wait() gauges.TCS.Visible = not gauges.TCS.Visible elseif not values.TCS.Value then wait() gauges.TCS.Visible = true end else if gauges.TCS.Visible then gauges.TCS.Visible = false end end end) values.ABS.Changed:connect(function() if _Tune.ABSEnabled then if values.ABS.Value then gauges.ABS.TextColor3 = Color3.new(1,170/255,0) gauges.ABS.TextStrokeColor3 = Color3.new(1,170/255,0) if values.ABSActive.Value then wait() gauges.ABS.Visible = not gauges.ABS.Visible else wait() gauges.ABS.Visible = false end else gauges.ABS.Visible = true gauges.ABS.TextColor3 = Color3.new(1,0,0) gauges.ABS.TextStrokeColor3 = Color3.new(1,0,0) end else gauges.ABS.Visible = false end end) values.ABSActive.Changed:connect(function() if _Tune.ABSEnabled then if values.ABSActive.Value and values.ABS.Value then wait() gauges.ABS.Visible = not gauges.ABS.Visible elseif not values.ABS.Value then wait() gauges.ABS.Visible = true else wait() gauges.ABS.Visible = false end else gauges.ABS.Visible = false end end) gauges.ABS.Changed:connect(function() if _Tune.ABSEnabled then if values.ABSActive.Value and values.ABS.Value then wait() gauges.ABS.Visible = not gauges.ABS.Visible elseif not values.ABS.Value then wait() gauges.ABS.Visible = true end else if gauges.ABS.Visible then gauges.ABS.Visible = false end end end) function PBrake() gauges.PBrake.Visible = values.PBrake.Value end values.PBrake.Changed:connect(PBrake) function Gear() if values.TransmissionMode.Value == "Auto" then gauges.TMode.Text = "A/T" gauges.TMode.BackgroundColor3 = Color3.new(1,170/255,0) elseif values.TransmissionMode.Value == "Semi" then gauges.TMode.Text = "S/T" gauges.TMode.BackgroundColor3 = Color3.new(0, 170/255, 127/255) else gauges.TMode.Text = "M/T" gauges.TMode.BackgroundColor3 = Color3.new(1,85/255,.5) end end values.TransmissionMode.Changed:connect(Gear) values.Velocity.Changed:connect(function(property) gauges.Speedo.Needle.Rotation = 45 + 225 * math.min(1,UNITS[currentUnits].scaling*values.Velocity.Value.Magnitude/UNITS[currentUnits].maxSpeed) gauges.Speed.Text = math.floor(UNITS[currentUnits].scaling*values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units end) mouse.KeyDown:connect(function(key) if key=="v" then gauges.Visible=not gauges.Visible end end) gauges.Speed.MouseButton1Click:connect(function() if currentUnits==#UNITS then currentUnits = 1 else currentUnits = currentUnits+1 end for i,v in pairs(gauges.Speedo:GetChildren()) do v.Visible=v.Name==UNITS[currentUnits].units or v.Name=="Needle" or v.Name=="lns" end gauges.Speed.Text = math.floor(UNITS[currentUnits].scaling*values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units end) wait(.1) Gear() PBrake()
--[[ By: Brutez. ]]
-- function onTouched(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then game:GetService("TeleportService"):Teleport(4641921091,player) --replace the numbers with your place id end end script.Parent.Torso.Touched:connect(onTouched)
--[=[ @function count @within Dictionary @param dictionary T -- The dictionary to count. @param predicate? (value: T, key: K, dictionary: T) -> any -- The predicate to use to filter the dictionary. @return number -- The number of items in the dictionary. Counts the number of items in a dictionary. ```lua local dictionary = { hello = "world", goodbye = "world" } local value = Count(dictionary) -- 2 local value = Count(dictionary, function(item, key) return item == "world" end) -- 1 ``` ]=]
local function count<K, V>( dictionary: { [K]: V }, predicate: ((value: V, key: K, dictionary: { [K]: V }) -> any)? ): number local counter = 0 predicate = if type(predicate) == "function" then predicate else Util.func.truthy for key, value in pairs(dictionary) do if predicate(value, key, dictionary) then counter += 1 end end return counter end return count
--// SS3.33T Police Edit originally for 2017 Mercedes-Benz E300 by Itzt and MASERATl, base SS by Inspare
wait(0.1) local player = game.Players.LocalPlayer local HUB = script.Parent.HUB local HUB2 = script.Parent.HUB2 local lightOn = false local Camera = game.Workspace.CurrentCamera local cam = script.Parent.nxtcam.Value local carSeat = script.Parent.CarSeat.Value local mouse = game.Players.LocalPlayer:GetMouse() local handler = carSeat.Filter
--// Declarables
local L_5_ = L_1_:WaitForChild('Resource') local L_6_ = L_5_:WaitForChild('FX') local L_7_ = L_5_:WaitForChild('Events') local L_8_ = L_5_:WaitForChild('HUD') local L_9_ = L_5_:WaitForChild('Modules') local L_10_ = L_5_:WaitForChild('Vars') local L_11_ = L_5_:WaitForChild('SettingsModule') local L_12_ = require(L_11_:WaitForChild('ServerConfig')) local L_13_ = L_5_:WaitForChild('Nodes') local L_14_ local L_15_ local L_16_ local L_17_ local L_18_ local L_19_ local L_20_ local L_21_ local L_22_ local L_23_ local L_24_ local L_25_ local L_26_ local L_27_
--Sets Image of Mobile Button
ContextActionService:SetImage("Sprint","rbxassetid://1488065688")
-- Implements equivalent functionality to JavaScript's `array.splice`, including -- the interface and behaviors defined at: -- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice
return function(array: Array, start: number, deleteCount: number?, ...): Array -- Append varargs without removing anything if start > #array then local varargCount = select("#", ...) for i = 1, varargCount do local toInsert = select(i, ...) table.insert(array, toInsert) end return {} else local length = #array -- In the JS impl, a negative fromIndex means we should use length - -- index; with Lua, of course, this means that 0 is still valid, but -- refers to the end of the array the way that '-1' would in JS if start < 1 then start = math.max(length - math.abs(start), 1) end local deletedItems = {} -- If no deleteCount was provided, we want to delete the rest of the -- array starting with `start` local deleteCount_: number = deleteCount or length if deleteCount_ > 0 then local lastIndex = math.min(length, start + math.max(0, deleteCount_ - 1)) for i = start, lastIndex do local deleted = table.remove(array, start) table.insert(deletedItems, deleted) end end local varargCount = select("#", ...) -- Do this in reverse order so we can always insert in the same spot for i = varargCount, 1, -1 do local toInsert = select(i, ...) table.insert(array, start, toInsert) end return deletedItems end end
-- Load libraries
local Support, Cheer = _G.GetLibraries( 'F3X/SupportLibrary@^1.0.0', 'F3X/Cheer@^0.0.0' );
-- List of running Arc instances
local arcInstances = {} local dynamicInstances = {} local numInstances = 0 local heartbeatConnection
-- Represents a CastRayInfo :: https://etithespirit.github.io/FastCastAPIDocs/fastcast-objects/castrayinfo/
export type CastRayInfo = { Parameters: RaycastParams, WorldRoot: WorldRoot, TravelType: string, MaxDistance: number, Lifetime: number, CosmeticBulletObject: Instance?, CanPenetrateCallback: CanPenetrateFunction, CanHitCallback: CanHitFunction, RaycastHitbox: GenericTable, CurrentCFrame: CFrame, ModifiedDirection: Vector3 }