prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--///////////////////////// Constructors --//////////////////////////////////////
function module.new() local obj = setmetatable({}, methods) obj.SayMessageRequest = nil return obj end return module.new()
--[[** ensures Roblox ColorSequence type @param value The value to check against @returns True iff the condition is satisfied, false otherwise **--]]
t.ColorSequence = t.typeof("ColorSequence")
-- Core connections
Connections = {}; function ClearConnections() -- Clears and disconnects temporary connections for Index, Connection in pairs(Connections) do Connection:disconnect(); Connections[Index] = nil; end; end; function InitializeUI() -- Sets up the UI -- Ensure UI has not yet been initialized if UI then return; end; -- Create the root UI UI = Create 'ScreenGui' { Name = 'Building Tools by F3X (UI)' }; -- Set up dock Dock = Cheer(Tool.Interfaces.Dock, UI).Start(getfenv(0)); end;
-- Returns all objects under instance with Transparency
local function GetTransparentsRecursive(instance, partsTable) local partsTable = partsTable or {} for _, child in pairs(instance:GetChildren()) do if child:IsA('BasePart') or child:IsA('Decal') then table.insert(partsTable, child) end GetTransparentsRecursive(child, partsTable) end return partsTable end local function SelectionBoxify(instance) local selectionBox = Instance.new('SelectionBox') selectionBox.Adornee = instance selectionBox.Color = BrickColor.new('Toothpaste') selectionBox.Parent = instance return selectionBox end local function Light(instance) local light = PointLight:Clone() light.Range = light.Range + 2 light.Parent = instance end local function FadeOutObjects(objectsWithTransparency, fadeIncrement) repeat local lastObject = nil for _, object in pairs(objectsWithTransparency) do object.Transparency = object.Transparency + fadeIncrement lastObject = object end wait() until lastObject.Transparency >= 1 or not lastObject end local function Dematerialize(character, humanoid, firstPart) humanoid.WalkSpeed = 0 local parts = {} for _, child in pairs(character:GetChildren()) do if child:IsA('BasePart') then child.Anchored = true table.insert(parts, child) elseif child:IsA('LocalScript') or child:IsA('Script') then child:Destroy() end end local selectionBoxes = {} local firstSelectionBox = SelectionBoxify(firstPart) Light(firstPart) wait(0.05) for _, part in pairs(parts) do if part ~= firstPart then table.insert(selectionBoxes, SelectionBoxify(part)) Light(part) end end local objectsWithTransparency = GetTransparentsRecursive(character) FadeOutObjects(objectsWithTransparency, 0.1) wait(0.5) humanoid.Health = 0 DebrisService:AddItem(character, 2) local fadeIncrement = 0.05 Delay(0.2, function() FadeOutObjects({firstSelectionBox}, fadeIncrement) if character then character:Destroy() end end) FadeOutObjects(selectionBoxes, fadeIncrement) end local function OnTouched(shot, otherPart) local character, humanoid = FindCharacterAncestor(otherPart) if character and humanoid and character ~= Character then ApplyTags(humanoid) if shot then local hitFadeSound = shot:FindFirstChild(HitFadeSound.Name) if hitFadeSound then hitFadeSound.Parent = humanoid.Torso hitFadeSound:Play() end shot:Destroy() end Dematerialize(character, humanoid, otherPart) end end local function OnEquipped() Character = Tool.Parent Humanoid = Character:WaitForChild('Humanoid') Player = PlayersService:GetPlayerFromCharacter(Character) end local function OnActivated() if Tool.Enabled and Humanoid.Health > 0 then Tool.Enabled = false FireSound:Play() local handleCFrame = Handle.CFrame local firingPoint = handleCFrame.p + handleCFrame:vectorToWorldSpace(NOZZLE_OFFSET) for i=1, 25 do local target=Humanoid.TargetPoint target = CFrame.Angles((0.5 - math.random()) * 2 * (math.random()*.04), (0.5 - math.random()) * 2 * (math.random()*.04), (0.5 - math.random()) * 2 * (math.random()*.04)) * target local shotCFrame = CFrame.new(firingPoint, target) local laserShotClone = BaseShot:Clone() laserShotClone.CFrame = shotCFrame + (shotCFrame.lookVector * (BaseShot.Size.Z / 2)) local bodyVelocity = Instance.new('BodyVelocity') bodyVelocity.velocity = shotCFrame.lookVector * SHOT_SPEED bodyVelocity.Parent = laserShotClone laserShotClone.Touched:connect(function(otherPart) OnTouched(laserShotClone, otherPart) end) DebrisService:AddItem(laserShotClone, SHOT_TIME) laserShotClone.Parent = Tool end Tool.GripPos=Vector3.new(0,.2,-.5) Tool.GripRight=Vector3.new(0.926,.2,-0.377) wait(.1) Tool.GripPos=Vector3.new(0,.2,-0.25) Tool.GripRight=Vector3.new(0.926,.15,-0.377) wait(.1) Tool.GripPos=Vector3.new(0,0.2,0) Tool.GripRight=Vector3.new(0.926,.1,-0.377) wait(.1) Tool.GripPos=Vector3.new(0,0.2,0.125) Tool.GripRight=Vector3.new(0.926,.05,-0.377) wait(.1) Tool.GripPos=Vector3.new(0,0.2,0.25) Tool.GripRight=Vector3.new(0.926,0,-0.377) wait(.25) ReloadSound:Play() wait(1.25) -- ReloadSound length Tool.Enabled = true end end local function OnUnequipped() end
--// All global vars will be wiped/replaced except script --// All guis are autonamed codeName..gui.Name
return function(data) local player = service.Players.LocalPlayer local playergui = player.PlayerGui local gui = script.Parent.Parent local frame = gui.Frame local text = gui.Frame.TextBox local scroll = gui.Frame.ScrollingFrame local players = gui.Frame.PlayerList local entry = gui.Entry local BindEvent = gTable.BindEvent local opened = false local scrolling = false local debounce = false local settings = client.Remote.Get("Setting",{"SplitKey","ConsoleKeyCode","BatchKey"}) local splitKey = settings.SplitKey local consoleKey = settings.ConsoleKeyCode local batchKey = settings.BatchKey local commands = client.Remote.Get('FormattedCommands') or {} local tweenInfo = TweenInfo.new(0.15)----service.SafeTweenSize(frame,UDim2.new(1,0,0,40),nil,nil,0.3,nil,function() if scrollOpen then frame.Size = UDim2.new(1,0,0,140) end end) local scrollOpenTween = service.TweenService:Create(frame, tweenInfo, { Size = UDim2.new(1, 0, 0, 140); }) local scrollCloseTween = service.TweenService:Create(frame, tweenInfo, { Size = UDim2.new(1, 0, 0, 40); }) local consoleOpenTween = service.TweenService:Create(frame, tweenInfo, { Position = UDim2.new(0, 0, 0, 0); }) local consoleCloseTween = service.TweenService:Create(frame, tweenInfo, { Position = UDim2.new(0, 0, 0, -200); }) frame.Position = UDim2.new(0,0,0,-200) frame.Visible = false frame.Size = UDim2.new(1,0,0,40) scroll.Visible = false if client.Variables.ConsoleOpen then if client.Variables.ChatEnabled then service.StarterGui:SetCoreGuiEnabled("Chat",true) end if client.Variables.PlayerListEnabled then service.StarterGui:SetCoreGuiEnabled('PlayerList',true) end if client.UI.Get("Notif") then client.UI.Get("Notif",nil,true).Object.LABEL.Visible = true end local scr = client.UI.Get("Chat",nil,true) if scr then scr.Object.Drag.Visible = true end local scr = client.UI.Get("PlayerList",nil,true) if scr then scr.Object.Drag.Visible = true end local scr = client.UI.Get("HintHolder",nil,true) if scr then scr.Object.Frame.Visible = true end end client.Variables.ChatEnabled = service.StarterGui:GetCoreGuiEnabled("Chat") client.Variables.PlayerListEnabled = service.StarterGui:GetCoreGuiEnabled('PlayerList') local function close() if gui:IsDescendantOf(game) and not debounce then debounce = true scroll:ClearAllChildren() scroll.CanvasSize = UDim2.new(0,0,0,0) scroll.ScrollingEnabled = false frame.Size = UDim2.new(1,0,0,40) scroll.Visible = false players.Visible = false scrollOpen = false if client.Variables.ChatEnabled then service.StarterGui:SetCoreGuiEnabled("Chat",true) end if client.Variables.PlayerListEnabled then service.StarterGui:SetCoreGuiEnabled('PlayerList',true) end if client.UI.Get("Notif") then client.UI.Get("Notif",nil,true).Object.LABEL.Visible = true end local scr = client.UI.Get("Chat",nil,true) if scr then scr.Object.Drag.Visible = true end local scr = client.UI.Get("PlayerList",nil,true) if scr then scr.Object.Drag.Visible = true end local scr = client.UI.Get("HintHolder",nil,true) if scr then scr.Object.Frame.Visible = true end consoleCloseTween:Play(); --service.SafeTweenPos(frame,UDim2.new(0,0,0,-200),'Out','Linear',0.2,true) --frame:TweenPosition(UDim2.new(0,0,0,-200),'Out','Linear',0.2,true) debounce = false opened = false end end local function open() if gui:IsDescendantOf(game) and not debounce then debounce = true client.Variables.ChatEnabled = service.StarterGui:GetCoreGuiEnabled("Chat") client.Variables.PlayerListEnabled = service.StarterGui:GetCoreGuiEnabled('PlayerList') service.StarterGui:SetCoreGuiEnabled("Chat",false) service.StarterGui:SetCoreGuiEnabled('PlayerList',false) scroll.ScrollingEnabled = true players.ScrollingEnabled = true if client.UI.Get("Notif") then client.UI.Get("Notif",nil,true).Object.LABEL.Visible = false end local scr = client.UI.Get("Chat",nil,true) if scr then scr.Object.Drag.Visible = false end local scr = client.UI.Get("PlayerList",nil,true) if scr then scr.Object.Drag.Visible = false end local scr = client.UI.Get("HintHolder",nil,true) if scr then scr.Object.Frame.Visible = false end consoleOpenTween:Play(); frame.Size = UDim2.new(1,0,0,40) scroll.Visible = false players.Visible = false scrollOpen = false text.Text = '' frame.Visible = true frame.Position = UDim2.new(0,0,0,0) text:CaptureFocus() text.Text = '' wait() text.Text = '' debounce = false opened = true end end text.FocusLost:connect(function(enterPressed) if enterPressed then if text.Text~='' and string.len(text.Text)>1 then client.Remote.Send('ProcessCommand',text.Text) end end close() end) text.Changed:connect(function(c) if c == 'Text' and text.Text ~= '' and open then scroll:ClearAllChildren() players:ClearAllChildren() local nText = text.Text if string.match(nText,".*"..batchKey.."([^']+)") then nText = string.match(nText,".*"..batchKey.."([^']+)") nText = string.match(nText,"^%s*(.-)%s*$") end local pNum = 0 local pMatch = string.match(nText,".+"..splitKey.."(.*)$") for i,v in next,service.Players:GetChildren() do if (pMatch and string.sub(string.lower(tostring(v)),1,#pMatch) == string.lower(pMatch)) or string.match(nText,splitKey.."$") then local new = entry:Clone() new.Text = tostring(v) new.TextXAlignment = "Right" new.Visible = true new.Parent = players new.Position = UDim2.new(0,0,0,20*pNum) new.MouseButton1Down:connect(function() text.Text = text.Text..tostring(v) text:CaptureFocus() end) pNum = pNum+1 end end players.CanvasSize = UDim2.new(0,0,0,pNum*20) local num = 0 for i,v in next,commands do if string.sub(string.lower(v),1,#nText) == string.lower(nText) or string.find(string.lower(v), string.match(string.lower(nText),"^(.-)"..splitKey) or string.lower(nText), 1, true) then if not scrollOpen then scrollOpenTween:Play(); --frame.Size = UDim2.new(1,0,0,140) scroll.Visible = true players.Visible = true scrollOpen = true end local b = entry:Clone() b.Visible = true b.Parent = scroll b.Text = v b.Position = UDim2.new(0,0,0,20*num) b.MouseButton1Down:connect(function() text.Text = b.Text text:CaptureFocus() end) num = num+1 end end frame.Size = UDim2.new(1, 0, 0, math.clamp((num*20)+40, 40, 140)) scroll.CanvasSize = UDim2.new(0,0,0,num*20) elseif c == 'Text' and text.Text == '' and opened then scrollCloseTween:Play(); --service.SafeTweenSize(frame,UDim2.new(1,0,0,40),nil,nil,0.3,nil,function() if scrollOpen then frame.Size = UDim2.new(1,0,0,140) end end) scroll.Visible = false players.Visible = false scrollOpen = false scroll:ClearAllChildren() scroll.CanvasSize = UDim2.new(0,0,0,0) end end) BindEvent(service.UserInputService.InputBegan, function(InputObject) local textbox = service.UserInputService:GetFocusedTextBox() if not (textbox) and rawequal(InputObject.UserInputType, Enum.UserInputType.Keyboard) and InputObject.KeyCode.Name == (client.Variables.CustomConsoleKey or consoleKey) then if opened then close() else open() end client.Variables.ConsoleOpen = opened end end) gTable:Ready() end
--- SonOfSevenless
print("Teleport Spell Loaded") local COOLDOWN = 0 local MP = 0 bin = script.Parent function TryToCast(player) -- returns true if player may cast this spell -- make sure this player has the wizard board stats local stats = player:findFirstChild("leaderstats") if stats == nil then return false end local mana = stats:findFirstChild("Mana") local level = stats:findFirstChild("Level") if mana == nil or level == nil then return false end if (mana.Value >= MP) then mana.Value = mana.Value - MP return true end return false end function teleportPlayer(pos) local player = game.Players.LocalPlayer if player == nil or player.Character == nil then return end local char = player.Character.Torso sound = Instance.new("Sound") sound.SoundId = "" sound.Parent = char sound.PlayOnRemove = true sound:remove() char.CFrame = CFrame.new(Vector3.new(pos.x, pos.y + 7, pos.z)) sound = Instance.new("Sound") sound.SoundId = "" sound.Parent = char sound.PlayOnRemove = true sound:remove() end enabled = true function onButton1Down(mouse) if not enabled then return end local player = game.Players.LocalPlayer if player == nil then return end --if TryToCast(player) == false then return end enabled = false mouse.Icon = "rbxasset://textures\\ArrowFarCursor.png" -- find the best cf local cf = mouse.Hit local v = cf.lookVector teleportPlayer(cf.p) wait(COOLDOWN) mouse.Icon = "rbxasset://textures\\ArrowCursor.png" enabled = true end function onSelected(mouse) mouse.Icon = "rbxasset://textures\\ArrowCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end bin.Selected:connect(onSelected)
--[=[ Instantly skips the spring forwards by that amount time @param delta number -- Time to skip forwards @return () ]=]
function SpringObject:TimeSkip(delta) assert(type(delta) == "number", "Bad delta") self._currentSpring:TimeSkip(delta) self.Changed:Fire() end function SpringObject:__index(index) if index == "Value" or index == "Position" or index == "p" then return SpringUtils.fromLinearIfNeeded(self._currentSpring.Value) elseif index == "Velocity" or index == "v" then return SpringUtils.fromLinearIfNeeded(self._currentSpring.Velocity) elseif index == "Target" or index == "t" then return SpringUtils.fromLinearIfNeeded(self._currentSpring.Target) elseif index == "Damper" or index == "d" then return self._currentSpring.Damper elseif index == "Speed" or index == "s" then return self._currentSpring.Speed elseif index == "Clock" then return self._currentSpring.Clock elseif SpringObject[index] then return SpringObject[index] else error(("%q is not a member of SpringObject"):format(tostring(index))) end end function SpringObject:__newindex(index, value) if index == "Value" or index == "Position" or index == "p" then local observable = Blend.toPropertyObservable(value) or Rx.of(value) self._maid._valueSub = observable:Subscribe(function(unconverted) local converted = SpringUtils.toLinearIfNeeded(unconverted) self:_getSpringForType(converted).Value = converted self.Changed:Fire() end) elseif index == "Velocity" or index == "v" then local observable = Blend.toPropertyObservable(value) or Rx.of(value) self._maid._velocitySub = observable:Subscribe(function(unconverted) local converted = SpringUtils.toLinearIfNeeded(unconverted) self:_getSpringForType(0*converted).Velocity = converted self.Changed:Fire() end) elseif index == "Target" or index == "t" then local observable = Blend.toPropertyObservable(value) or Rx.of(value) self._maid._targetSub = observable:Subscribe(function(unconverted) local converted = SpringUtils.toLinearIfNeeded(unconverted) self:_getSpringForType(converted).Target = converted self.Changed:Fire() end) elseif index == "Damper" or index == "d" then local observable = assert(Blend.toNumberObservable(value), "Invalid damper") self._maid._damperSub = observable:Subscribe(function(unconverted) assert(type(unconverted) == "number", "Bad damper") self._currentSpring.Damper = unconverted self.Changed:Fire() end) elseif index == "Speed" or index == "s" then local observable = assert(Blend.toNumberObservable(value), "Invalid speed") self._maid._speedSub = observable:Subscribe(function(unconverted) assert(type(unconverted) == "number", "Bad damper") self._currentSpring.Speed = unconverted self.Changed:Fire() end) elseif index == "Clock" then assert(type(value) == "function", "Bad clock value") self._currentSpring.Clock = value self.Changed:Fire() else error(("%q is not a member of SpringObject"):format(tostring(index))) end end function SpringObject:_getSpringForType(converted) if rawget(self, "_currentSpring") == nil then -- only happens on init rawset(self, "_currentSpring", Spring.new(converted)) return self._currentSpring else local currentType = typeof(SpringUtils.fromLinearIfNeeded(self._currentSpring.Value)) if currentType == typeof(converted) then return self._currentSpring else local oldDamper = self._currentSpring.d local oldSpeed = self._currentSpring.s self._currentSpring = Spring.new(converted) self._currentSpring.Speed = oldSpeed self._currentSpring.Damper = oldDamper return self._currentSpring end end end
--[[ ___ ___ ____________________ __ ___ ___ __ _____ __ ___ ___ __ ________ __ / _ )/ _ \/ _/_ __/ _/ __/ // / / _ | / _ \/ |/ /\ \/ / / _ | / _ \/ |/ / _/ |/ / / _ / , _// / / / _/ /_\ \/ _ / / __ |/ , _/ /|_/ / \ / / __ |/ // / /|_/ // // / /____/_/|_/___/ /_/ /___/___/_//_/ /_/ |_/_/|_/_/ /_/ /_/ /_/ |_/____/_/ /_/___/_/|_/ -- Developed by Avallex -- ]]
-- local Code = {} local Scroll = script.Parent:WaitForChild('Main'):WaitForChild('ScrollingFrame') Code.Strings = {} function Code:Initialise() local yoffset = 0 for i,v in pairs(Code.Strings) do local Copy = script:WaitForChild('Entry'):Clone() Copy.Position = UDim2.new(0,0,0,yoffset) Copy.Parent = Scroll Copy.Text = v yoffset = yoffset + 15 end Scroll.CanvasSize = UDim2.new(0,0,0,yoffset) end script.Parent:WaitForChild('Close').MouseButton1Click:connect(function() script.Parent:Destroy() end) return Code
--Connect any players that are added to the game to above 'NewPlayer' function
Players.PlayerAdded:connect(function(Player) Player.CharacterAdded:Connect(function(Character) --Run on every part that is added to the character local function ChangeGroup(Part) if Part:IsA("BasePart") then --Make sure we're dealing with any type of part PhysicsService:SetPartCollisionGroup(Part, "Players") --Set the part's collision group end end --Run above function on any parts that are added to the character from this point Character.ChildAdded:Connect(ChangeGroup) --Run above function on any parts that may already exist for _, Object in pairs(Character:GetChildren()) do ChangeGroup(Object) end end) end)
--[[ tweenJoint Function Parameters: Object Joint - This has to be a weld with a C0 and C1 property CFrame newC0 - This is what the new C0 of the weld will be. You can put nil if you don't want to effect the C0 CFrame newC1 - This is what the new C1 of the weld will be. You can put nil if you don't want to effect the C1 function Alpha - This is an alpha function that takes an input parameter of a number between 0 and 90 and returns a number between 0 and 1. For example, function(X) return math.sin(math.rad(X)) end float Duration - This is how long the tweening takes to complete --]]
local RS = game:GetService("RunService") local Proned2 Rendido.Changed:Connect(function() Stance:FireServer(Stances,Virar,Rendido.Value) end) Algemado.Changed:Connect(function() Stance:FireServer(Stances,Virar,Rendido.Value) end) function Stand() Stance:FireServer(Stances,Virar,Rendido.Value) TS:Create(char.Humanoid, TweenInfo.new(.3), {CameraOffset = Vector3.new(CameraX,CameraY,-.5)} ):Play() if Steady then Humanoid.WalkSpeed = ServerConfig.SlowPaceWalkSpeed Humanoid.JumpPower = ServerConfig.JumpPower else if Ferido.Value == false then Humanoid.WalkSpeed = ServerConfig.NormalWalkSpeed Humanoid.JumpPower = ServerConfig.JumpPower else Humanoid.WalkSpeed = ServerConfig.SlowPaceWalkSpeed Humanoid.JumpPower = ServerConfig.JumpPower end end IsStanced = false Proned2 = Vector3.new(0,0,0) end function Crouch() Stance:FireServer(Stances,Virar,Rendido.Value) TS:Create(char.Humanoid, TweenInfo.new(.3), {CameraOffset = Vector3.new(CameraX,CameraY,0)} ):Play() Humanoid.WalkSpeed = ServerConfig.CrouchWalkSpeed Humanoid.JumpPower = 0 IsStanced = true Proned2 = Vector3.new(0,0,0) end function Prone() Stance:FireServer(Stances,Virar,Rendido.Value) TS:Create(char.Humanoid, TweenInfo.new(.3), {CameraOffset = Vector3.new(CameraX,CameraY,0)} ):Play() if Rendido.Value == true then Humanoid.WalkSpeed = 0 else Humanoid.WalkSpeed = ServerConfig.ProneWalksSpeed * StancesPasta.Mobility.Value end Humanoid.JumpPower = 0 IsStanced = true Proned2 = Vector3.new(0,0.5,0.5) end function Lean() TS:Create(char.Humanoid, TweenInfo.new(.3), {CameraOffset = Vector3.new(CameraX,CameraY,0)} ):Play() Stance:FireServer(Stances,Virar,Rendido.Value) end function TweenThing(Thing,What,Value,Time) local Goal = {} local Info = TweenInfo.new(Time) Goal[What] = Value game:GetService("TweenService"):Create(Thing,Info,Goal):Play() end local xAngle = 0 local yAngle = 0 local cameraPos = Vector3.new(0,1.4,7.5) local runService = game:GetService("RunService") UserInputService.InputBegan:Connect(function(input, gameProcessed) if not gameProcessed then if input.KeyCode == Enum.KeyCode.C and Stances == 0 and ChangeStance and Caido.Value == false and Correndo.Value == false and Rappeling.Value == false and not _G.Lean and not Sentado then Stances = 1 --CameraX = 0 CameraY = -.6 Poses.Levantado.Visible = false Poses.Agaixado.Visible = true Poses.Deitado.Visible = false Crouch() _G.Crouched = true elseif input.KeyCode == Enum.KeyCode.C and Stances == 1 and ChangeStance and Caido.Value == false and Correndo.Value == false and Rappeling.Value == false and not _G.Lean and not Sentado then Stances = 2 CameraX = 0 CameraY = -2.2 Virar = 0 Poses.Levantado.Visible = false Poses.Agaixado.Visible = false Poses.Deitado.Visible = true Poses.Esg_Right.Visible = false Poses.Esg_Left.Visible = false Lean() Prone() _G.Crouched = false _G.Proned = true elseif input.KeyCode == Enum.KeyCode.X and Stances == 2 and ChangeStance and Caido.Value == false and Correndo.Value == false and Rappeling.Value == false and not _G.Lean and not Sentado then _G.Crouched = true _G.Proned = false Stances = 1 --CameraX = 0 CameraY = -.6 Poses.Levantado.Visible = false Poses.Agaixado.Visible = true Poses.Deitado.Visible = false Crouch() elseif input.KeyCode == Enum.KeyCode.X and Stances == 1 and ChangeStance and Caido.Value == false and Correndo.Value == false and Rappeling.Value == false and not _G.Lean and not Sentado then _G.Crouched = false Stances = 0 --CameraX = 0 CameraY = 1 Poses.Levantado.Visible = true Poses.Agaixado.Visible = false Poses.Deitado.Visible = false Stand() elseif input.KeyCode == Enum.KeyCode.Z and ChangeStance and Caido.Value == false and Correndo.Value == false then if not Steady then Steady = true Poses.Steady.Visible = true if Stances == 0 then Stand() Humanoid.WalkSpeed = ServerConfig.SlowPaceWalkSpeed * StancesPasta.Mobility.Value end else Steady = false Poses.Steady.Visible = false if Stances == 0 then Stand() Humanoid.WalkSpeed = ServerConfig.NormalWalkSpeed * StancesPasta.Mobility.Value end end elseif input.KeyCode == Enum.KeyCode.E and Stances ~= 2 and ChangeStance and Caido.Value == false and Correndo.Value == false and not _G.Lean then if Virar == 0 or Virar == -1 then Virar = 1 CameraX = 1.75 Poses.Esg_Right.Visible = true Poses.Esg_Left.Visible = false else Virar = 0 CameraX = 0 Poses.Esg_Right.Visible = false Poses.Esg_Left.Visible = false end Lean() elseif input.KeyCode == Enum.KeyCode.Q and Stances ~= 2 and ChangeStance and Caido.Value == false and Correndo.Value == false and not _G.Lean then if Virar == 0 or Virar == 1 then Virar = -1 CameraX = -1.75 Poses.Esg_Right.Visible = false Poses.Esg_Left.Visible = true else Virar = 0 CameraX = 0 Poses.Esg_Right.Visible = false Poses.Esg_Left.Visible = false end Lean() elseif input.KeyCode == Enum.KeyCode.LeftShift and Correndo.Value == false and Ferido.Value == false and Caido.Value == false and not _G.Lean and not Sentado and not cansado then if Velocidade > 0 then ChangeStance = false Correndo.Value = true --Steady = false Stand() Stances = 0 Virar = 0 CameraX = 0 CameraY = 1 Lean() Poses.Levantado.Visible = true Poses.Agaixado.Visible = false Poses.Deitado.Visible = false Poses.Esg_Right.Visible = false Poses.Esg_Left.Visible = false Humanoid.WalkSpeed = ServerConfig.RunWalkSpeed end end end end) UserInputService.InputEnded:Connect(function(input, gameProcessed) if not gameProcessed then if input.KeyCode == Enum.KeyCode.LeftShift and Correndo.Value == true and not _G.Lean then ChangeStance = true Correndo.Value = false if Steady then Humanoid.WalkSpeed = ServerConfig.SlowPaceWalkSpeed Poses.Steady.Visible = true else Humanoid.WalkSpeed = ServerConfig.NormalWalkSpeed Poses.Steady.Visible = false end end end end) Stand() Humanoid.Died:Connect(function() TS:Create(char.Humanoid, TweenInfo.new(1), {CameraOffset = Vector3.new(0,0,0)} ):Play() ChangeStance = false Main.Visible = false end) Humanoid.Seated:Connect(function(IsSeated, Seat) if IsSeated then Sentado = true Stand() Stances = 0 Virar = 0 CameraX = 0 CameraY = 1 Lean() Poses.Levantado.Visible = true Poses.Agaixado.Visible = false Poses.Deitado.Visible = false Poses.Esg_Right.Visible = false Poses.Esg_Left.Visible = false else Sentado = false end end) Humanoid.Running:Connect(function(Speed)
-- emote bindable hook
script:WaitForChild("PlayEmote").OnInvoke = function(emote) -- Only play emotes when idling if pose ~= "Standing" then return end if emoteNames[emote] ~= nil then -- Default emotes playAnimation(emote, EMOTE_TRANSITION_TIME, Humanoid) if userPlayEmoteByIdAnimTrackReturn then return true, currentAnimTrack else return true end end -- Return false to indicate that the emote could not be played return false end
-- map a value from one range to another
local function map(x, inMin, inMax, outMin, outMax) return (x - inMin)*(outMax - outMin)/(inMax - inMin) + outMin end local function playSound(sound) sound.TimePosition = 0 sound.Playing = true end local function stopSound(sound) sound.Playing = false sound.TimePosition = 0 end local function initializeSoundSystem(humanoid, rootPart) local sounds = {} -- initialize sounds for name, props in pairs(SOUND_DATA) do local sound = Instance.new("Sound") sound.Name = name -- set default values sound.Archivable = false sound.EmitterSize = 5 sound.MaxDistance = 150 sound.Volume = 0.65 for propName, propValue in pairs(props) do sound[propName] = propValue end sound.Parent = rootPart sounds[name] = sound end local playingLoopedSounds = {} local function stopPlayingLoopedSounds(except) for sound in pairs(playingLoopedSounds) do if sound ~= except then sound.Playing = false playingLoopedSounds[sound] = nil end end end -- state transition callbacks local stateTransitions = { [Enum.HumanoidStateType.FallingDown] = function() stopPlayingLoopedSounds() end, [Enum.HumanoidStateType.GettingUp] = function() stopPlayingLoopedSounds() playSound(sounds.GettingUp) end, [Enum.HumanoidStateType.Jumping] = function() stopPlayingLoopedSounds() playSound(sounds.Jumping) end, [Enum.HumanoidStateType.Swimming] = function() local verticalSpeed = math.abs(rootPart.Velocity.Y) if verticalSpeed > 0.1 then sounds.Splash.Volume = math.clamp(map(verticalSpeed, 100, 350, 0.28, 1), 0, 1) playSound(sounds.Splash) end stopPlayingLoopedSounds(sounds.Swimming) sounds.Swimming.Playing = true playingLoopedSounds[sounds.Swimming] = true end, [Enum.HumanoidStateType.Freefall] = function() sounds.FreeFalling.Volume = 0 stopPlayingLoopedSounds(sounds.FreeFalling) playingLoopedSounds[sounds.FreeFalling] = true end, [Enum.HumanoidStateType.Landed] = function() stopPlayingLoopedSounds() local verticalSpeed = math.abs(rootPart.Velocity.Y) if verticalSpeed > 75 then sounds.Landing.Volume = math.clamp(map(verticalSpeed, 50, 100, 0, 1), 0, 1) playSound(sounds.Landing) end end, [Enum.HumanoidStateType.Running] = function() stopPlayingLoopedSounds(sounds.Running) sounds.Running.Playing = true playingLoopedSounds[sounds.Running] = true end, [Enum.HumanoidStateType.Climbing] = function() local sound = sounds.Climbing if math.abs(rootPart.Velocity.Y) > 0.1 then sound.Playing = true stopPlayingLoopedSounds(sound) else stopPlayingLoopedSounds() end playingLoopedSounds[sound] = true end, [Enum.HumanoidStateType.Seated] = function() stopPlayingLoopedSounds() end, [Enum.HumanoidStateType.Dead] = function() stopPlayingLoopedSounds() playSound(sounds.Died) end, } -- updaters for looped sounds local loopedSoundUpdaters = { [sounds.Climbing] = function(dt, sound, vel) sound.Playing = vel.Magnitude > 0.1 end, [sounds.FreeFalling] = function(dt, sound, vel) if vel.Magnitude > 75 then sound.Volume = math.clamp(sound.Volume + 0.9*dt, 0, 1) else sound.Volume = 0 end end, [sounds.Running] = function(dt, sound, vel) sound.Playing = vel.Magnitude > 0.5 and humanoid.MoveDirection.Magnitude > 0.5 end, } -- state substitutions to avoid duplicating entries in the state table local stateRemap = { [Enum.HumanoidStateType.RunningNoPhysics] = Enum.HumanoidStateType.Running, } local activeState = stateRemap[humanoid:GetState()] or humanoid:GetState() local activeConnections = {} local stateChangedConn = humanoid.StateChanged:Connect(function(_, state) state = stateRemap[state] or state if state ~= activeState then local transitionFunc = stateTransitions[state] if transitionFunc then transitionFunc() end activeState = state end end) local steppedConn = RunService.Stepped:Connect(function(_, worldDt) -- update looped sounds on stepped for sound in pairs(playingLoopedSounds) do local updater = loopedSoundUpdaters[sound] if updater then updater(worldDt, sound, rootPart.Velocity) end end end) local humanoidAncestryChangedConn local rootPartAncestryChangedConn local function terminate() stateChangedConn:Disconnect() steppedConn:Disconnect() humanoidAncestryChangedConn:Disconnect() rootPartAncestryChangedConn:Disconnect() end humanoidAncestryChangedConn = humanoid.AncestryChanged:Connect(function(_, parent) if not parent then terminate() end end) rootPartAncestryChangedConn = rootPart.AncestryChanged:Connect(function(_, parent) if not parent then terminate() end end) end local character = script.Parent local humanoid = character:WaitForChild("Humanoid") local rootPart = character:WaitForChild("HumanoidRootPart") return initializeSoundSystem(humanoid, rootPart)
--Insert this script into Workspace, not camera.
game.Players.PlayerAdded:connect(function(p) wait(1) p.CameraMaxZoomDistance = 0 end)
--s.Pitch = 0.7
while s.Pitch<1 do s.Pitch=s.Pitch+0.010 s:Play() if s.Pitch>1 then s.Pitch=1 end wait(0.001) end
--[=[ Given an observable that emits observables, emit an observable that once the initial observable completes, the latest values of each emitted observable will be combined into an array that will be emitted. https://rxjs.dev/api/operators/combineLatestAll @return (source: Observable<Observable<T>>) -> Observable<{ T }> ]=]
function Rx.combineLatestAll() return function(source) assert(Observable.isObservable(source), "Bad observable") return Observable.new(function(sub) local observables = {} local maid = Maid.new() local alive = true maid:GiveTask(function() alive = false end) maid:GiveTask(source:Subscribe( function(value) assert(Observable.isObservable(value)) table.insert(observables, value) end, function(...) sub:Fail(...) end), function() if not alive then return end maid:GiveTask(Rx.combineLatest(observables)) :Subscribe(sub:GetFireFailComplete()) end) return maid end) end end
--Left Arm
MakeWeld(car.Misc.Anims.R15.LeftArm.Hand.Y,car.DriveSeat,"Motor6D").Name="M" MakeWeld(car.Misc.Anims.R15.LeftArm.Hand.Z,car.Misc.Anims.R15.LeftArm.Hand.Y,"Motor6D").Name="M" MakeWeld(car.Misc.Anims.R15.LeftArm.Hand.X,car.Misc.Anims.R15.LeftArm.Hand.Z,"Motor6D").Name="M" ModelWeld(car.Misc.Anims.R15.LeftArm.Hand.Parts,car.Misc.Anims.R15.LeftArm.Hand.X) MakeWeld(car.Misc.Anims.R15.LeftArm.LowerArm.X,car.Misc.Anims.R15.LeftArm.Hand.X,"Motor6D").Name="M" ModelWeld(car.Misc.Anims.R15.LeftArm.LowerArm.Parts,car.Misc.Anims.R15.LeftArm.LowerArm.X) MakeWeld(car.Misc.Anims.R15.LeftArm.UpperArm.X,car.Misc.Anims.R15.LeftArm.LowerArm.X,"Motor6D").Name="M" ModelWeld(car.Misc.Anims.R15.LeftArm.UpperArm.Parts,car.Misc.Anims.R15.LeftArm.UpperArm.X)
--[=[ Same as `andThenCall`, except for `finally`. Attaches a `finally` handler to this Promise that calls the given callback with the predefined arguments. @param callback (...: any) -> any @param ...? any -- Additional arguments which will be passed to `callback` @return Promise ]=]
function Promise.prototype:finallyCall(callback, ...) assert(isCallable(callback), string.format(ERROR_NON_FUNCTION, "Promise:finallyCall")) local length, values = pack(...) return self:_finally(debug.traceback(nil, 2), function() return callback(unpack(values, 1, length)) end) end
--[=[ @function includes @within Array @param array {T} -- The array to search. @param value any -- The value to search for. @param from? number -- The index to start searching from. @return boolean -- Whether the array contains the value. Checks whether the array contains the value. This is a wrapper around `Find`. #### Aliases `contains`, `has` ```lua local array = { "hello", "world", "goodbye" } local value = Includes(array, "hello") -- true local value = Includes(array, "sift") -- false local value = Includes(array, "hello", 2) -- false ``` ]=]
local function includes<T>(array: { T }, value: any, from: number?): boolean return Find(array, value, from) ~= nil end return includes
--[[Susupension]]
Tune.SusEnabled = true -- Sets whether suspension is enabled for PGS --Front Suspension Tune.FSusDamping = 700 -- Spring Dampening Tune.FSusStiffness = 9000 -- Spring Force Tune.FAntiRoll = 50 -- Anti-Roll (Gyro Dampening) Tune.FSusLength = 2 -- Suspension length (in studs) Tune.FPreCompress = .3 -- Pre-compression adds resting length force Tune.FExtensionLim = .1 -- Max Extension Travel (in studs) Tune.FCompressLim = .1 -- Max Compression Travel (in studs) Tune.FSusAngle = 80 -- Suspension Angle (degrees from horizontal) Tune.FWsBoneLen = 5 -- Wishbone Length Tune.FWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal) Tune.FAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -.5 , -- positive = upward --[[Forward]] 0 } -- positive = forward --Rear Suspension Tune.RSusDamping = 700 -- Spring Dampening Tune.RSusStiffness = 9000 -- Spring Force Tune.RAntiRoll = 50 -- Anti-Roll (Gyro Dampening) Tune.RSusLength = 2 -- Suspension length (in studs) Tune.RPreCompress = .3 -- Pre-compression adds resting length force Tune.RExtensionLim = .1 -- 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 --Aesthetics Tune.SusVisible = false -- Spring Visible Tune.WsBVisible = false -- Wishbone Visible Tune.SusRadius = .2 -- Suspension Coil Radius Tune.SusThickness = .1 -- Suspension Coil Thickness Tune.SusColor = "Bright red" -- Suspension Color [BrickColor] Tune.SusCoilCount = 6 -- Suspension Coil Count Tune.WsColor = "Black" -- Wishbone Color [BrickColor] Tune.WsThickness = .1 -- Wishbone Rod Thickness
-- @outline // PUBLIC METHODS
function Ping.Get(plr) plr = GetPlayer(plr) local RobloxCalculatedPing = plr:GetNetworkPing() return RobloxCalculatedPing ~= 0 and (RobloxCalculatedPing*2) or (Pool[plr] and Pool[plr].Value) or 0 end function Ping.UpdatePlayer(plr) plr = GetPlayer(plr) if not Pool[plr] or (Pool[plr].Code ~= -1 and tick() - Pool[plr].Time < MAX_THROTTLE_TIME) then return end local plrObject = System.Player.Get(plr) if not plrObject or not plrObject.Ready then return end Pool[plr].Code = System.Random:NextInteger(0, 0xFFFF) Pool[plr].Time = tick() System.Remotes.FireClient(plr, "Ping", {Code = Pool[plr].Code, Value = Pool[plr].Value}) end function Ping.GetAll() return Pool end
--[[ if not service.UserInputService.KeyboardEnabled then warn("User is on mobile :: CustomChat Disabled") chatenabled = true drag.Visible = false service.StarterGui:SetCoreGuiEnabled('Chat',true) end --]]
client.Handlers.RemoveCustomChat = function() local chat = gui if chat then chat:Destroy() client.Variables.ChatEnabled = true service.StarterGui:SetCoreGuiEnabled('Chat', true) end end client.Handlers.ChatHandler = function(plr, message, mode) if not message then return end if string.sub(message, 1, 2) == '/e' then return end if gui then local player if plr and type(plr) == "userdata" then player = plr else player = { Name = tostring(plr or "System"), TeamColor = BrickColor.White() } end if #message > 150 then message = `{string.sub(message, 1, 150)}...` end if mode then if mode == "Private" or mode == "System" then table.insert(storedChats, { Color = player.TeamColor or BrickColor.White(), Player = player.Name, Message = message, Mode = "Global", Private = true }) table.insert(storedChats, { Color = player.TeamColor or BrickColor.White(), Player = player.Name, Message = message, Mode = "Team", Private = true }) table.insert(storedChats, { Color = player.TeamColor or BrickColor.White(), Player = player.Name, Message = message, Mode = "Local", Private = true }) table.insert(storedChats, { Color = player.TeamColor or BrickColor.White(), Player = player.Name, Message = message, Mode = "Admins", Private = true }) table.insert(storedChats, { Color = player.TeamColor or BrickColor.White(), Player = player.Name, Message = message, Mode = "Cross", Private = true }) else local plr = player.Name table.insert(storedChats, { Color = player.TeamColor or BrickColor.White(), Player = plr, Message = message, Mode = mode }) end else local plr = player.Name table.insert(storedChats, { Color = player.TeamColor or BrickColor.White(), Player = plr, Message = message, Mode = "Global" }) end if mode == "Local" then if not localTab.Visible then localb.Text = "Local*" end elseif mode == "Team" then if not teamTab.Visible then team.Text = "Team*" end elseif mode == "Admins" then if not adminsTab.Visible then admins.Text = "Admins*" end elseif mode == "Cross" then if not crossTab.Visible then cross.Text = "Cross*" end else if not globalTab.Visible then global.Text = "Global*" end end if #storedChats >= 50 then table.remove(storedChats, 1) end UpdateChat() if not nohide then if player and type(player) == "userdata" then local char = player.Character local head = char:FindFirstChild("Head") if head then local cont = service.LocalContainer():FindFirstChild(`{player.Name}Bubbles`) if not cont then cont = Instance.new("BillboardGui", service.LocalContainer()) cont.Name = `{player.Name}Bubbles` cont.StudsOffset = Vector3.new(0, 2, 0) cont.SizeOffset = Vector2.new(0, 0.5) cont.Size = UDim2.new(0, 200, 0, 150) end cont.Adornee = head local clone = bubble:Clone() clone.TextLabel.Text = message clone.Parent = cont local xsize = clone.TextLabel.TextBounds.X + 40 if xsize > 400 then xsize = 400 end clone.Size = UDim2.new(0, xsize, 0, 50) if #cont:GetChildren() > 3 then cont:GetChildren()[1]:Destroy() end for i, v in pairs(cont:GetChildren()) do local xsize = v.TextLabel.TextBounds.X + 40 if xsize > 400 then xsize = 400 end v.Position = UDim2.new(0.5, -xsize / 2, 1, -(math.abs((i - 1) - #cont:GetChildren()) * 50)) end local cam = workspace.CurrentCamera local char = player.Character local head = char:FindFirstChild("Head") Routine(function() repeat if not head then break end local dist = (head.Position - cam.CFrame.p).Magnitude if dist <= 50 then clone.Visible = true else clone.Visible = false end wait(0.1) until not clone.Parent or not clone or not head or not head.Parent or not char end) wait(10) if clone then clone:Destroy() end end end end end end local textbox = service.UserInputService:GetFocusedTextBox() if textbox then textbox:ReleaseFocus() end end
--// Bullet Physics
BulletPhysics = Vector3.new(0,55,0); -- Drop fixation: Lower number = more drop BulletSpeed = 2000; -- Bullet Speed BulletSpread = 0; -- How much spread the bullet has ExploPhysics = Vector3.new(0,20,0); -- Drop for explosive rounds ExploSpeed = 600; -- Speed for explosive rounds BulletDecay = 10000; -- How far the bullet travels before slowing down and being deleted (BUGGY)
--[[Brakes]]
Tune.ABSEnabled = false -- Implements ABS Tune.ABSThreshold = 20 -- Slip speed allowed before ABS starts working (in SPS) Tune.FBrakeForce = 1500 -- Front brake force Tune.RBrakeForce = 2300 -- Rear brake force Tune.PBrakeForce = 6000 -- Handbrake force Tune.FLgcyBForce = 15000 -- Front brake force [PGS OFF] Tune.RLgcyBForce = 10000 -- Rear brake force [PGS OFF] Tune.LgcyPBForce = 25000 -- Handbrake force [PGS OFF]
--[=[ @param msg string Throws an error with `msg` as the error message if the value is _not_ None. ]=]
function Option:ExpectNone(msg) assert(self:IsNone(), msg) end
-- Indicates that a button for displaying a merch item (given its asset id) should appear above adornee
local function addProximityButton(id: string, adornee: BasePart | Attachment) return { id = id, adornee = adornee, } end return Rodux.makeActionCreator(script.Name, addProximityButton)
--Sounds
local OpenSound = script.Parent.OpenSound local CloseSound = script.Parent.CloseSound local Unlock = script.Parent.Unlock
--[[Wheel Stabilizer Gyro]]
Tune.FGyroDamp = 10 -- Front Wheel Non-Axial Dampening Tune.RGyroDamp = 100 -- Rear Wheel Non-Axial Dampening
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!
local hitPart = script.Parent local debounce = true local tool = game.ServerStorage.Scissors-- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage hitPart.Touched:Connect(function(hit) if debounce == true then if hit.Parent:FindFirstChild("Humanoid") then local plr = game.Players:FindFirstChild(hit.Parent.Name) if plr then debounce = false hitPart.BrickColor = BrickColor.new("Bright red") tool:Clone().Parent = plr.Backpack wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again debounce = true hitPart.BrickColor = BrickColor.new("Bright green") end end end end)
--//Voice commands
HUB.Voice.I.MouseButton1Click:connect(function() carSeat.Parent.Body.Lightbar.M.pullover1:Play() end) HUB.Voice.II.MouseButton1Click:connect(function() carSeat.Parent.Body.Lightbar.M.out:Play() end) HUB.Voice.III.MouseButton1Click:connect(function() carSeat.Parent.Body.Lightbar.M.pullover2:Play() end) HUB.Voice.IV.MouseButton1Click:connect(function() carSeat.Parent.Body.Lightbar.M.pullover3:Play() end) while wait() do carSeat.Parent.Body.Dash.S.G.Time.Text = game.Lighting.TimeOfDay end
--[=[ @class RemoteSignal @server Created via `ServerComm:CreateSignal()`. ]=]
local RemoteSignal = {} RemoteSignal.__index = RemoteSignal
-- setup emote chat hook
script.msg.Changed:connect(function(msg) script.msg.Value = "" local emote = "" if (string.sub(msg, 1, 3) == "/e ") then emote = string.sub(msg, 4) elseif (string.sub(msg, 1, 7) == "/emote ") then emote = string.sub(msg, 8) end if (pose == "Standing" and emoteNames[emote] ~= nil) then playAnimation(emote, 0.1, Humanoid) end
--// Above was taken directly from Util.GetStringTextBounds() in the old chat corescripts.
function methods:GetMessageHeight(BaseMessage, BaseFrame, xSize) xSize = xSize or BaseFrame.AbsoluteSize.X local textBoundsSize = self:GetStringTextBounds(BaseMessage.Text, BaseMessage.Font, BaseMessage.TextSize, Vector2.new(xSize, 1000)) return textBoundsSize.Y end function methods:GetNumberOfSpaces(str, font, textSize) local strSize = self:GetStringTextBounds(str, font, textSize) local singleSpaceSize = self:GetStringTextBounds(" ", font, textSize) return math.ceil(strSize.X / singleSpaceSize.X) end function methods:CreateBaseMessage(message, font, textSize, chatColor) local BaseFrame = self:GetFromObjectPool("Frame") BaseFrame.Selectable = false BaseFrame.Size = UDim2.new(1, 0, 0, 18) BaseFrame.Visible = true BaseFrame.BackgroundTransparency = 1 local messageBorder = 8 local BaseMessage = self:GetFromObjectPool("TextLabel") BaseMessage.Selectable = false BaseMessage.Size = UDim2.new(1, -(messageBorder + 6), 1, 0) BaseMessage.Position = UDim2.new(0, messageBorder, 0, 0) BaseMessage.BackgroundTransparency = 1 BaseMessage.Font = font BaseMessage.TextSize = textSize BaseMessage.TextXAlignment = Enum.TextXAlignment.Left BaseMessage.TextYAlignment = Enum.TextYAlignment.Top BaseMessage.TextTransparency = 0 BaseMessage.TextStrokeTransparency = 0.75 BaseMessage.TextColor3 = chatColor BaseMessage.TextWrapped = true BaseMessage.Text = message BaseMessage.Visible = true BaseMessage.Parent = BaseFrame return BaseFrame, BaseMessage end function methods:AddNameButtonToBaseMessage(BaseMessage, nameColor, formatName, playerName) local speakerNameSize = self:GetStringTextBounds(formatName, BaseMessage.Font, BaseMessage.TextSize) local NameButton = self:GetFromObjectPool("TextButton") NameButton.Selectable = false NameButton.Size = UDim2.new(0, speakerNameSize.X, 0, speakerNameSize.Y) NameButton.Position = UDim2.new(0, 0, 0, 0) NameButton.BackgroundTransparency = 1 NameButton.Font = BaseMessage.Font NameButton.TextSize = BaseMessage.TextSize NameButton.TextXAlignment = BaseMessage.TextXAlignment NameButton.TextYAlignment = BaseMessage.TextYAlignment NameButton.TextTransparency = BaseMessage.TextTransparency NameButton.TextStrokeTransparency = BaseMessage.TextStrokeTransparency NameButton.TextColor3 = nameColor NameButton.Text = formatName NameButton.Visible = true NameButton.Parent = BaseMessage local clickedConn = NameButton.MouseButton1Click:connect(function() self:NameButtonClicked(NameButton, playerName) end) local changedConn = nil changedConn = NameButton.Changed:connect(function(prop) if prop == "Parent" then clickedConn:Disconnect() changedConn:Disconnect() end end) return NameButton end function methods:AddChannelButtonToBaseMessage(BaseMessage, channelColor, formatChannelName, channelName) local channelNameSize = self:GetStringTextBounds(formatChannelName, BaseMessage.Font, BaseMessage.TextSize) local ChannelButton = self:GetFromObjectPool("TextButton") ChannelButton.Selectable = false ChannelButton.Size = UDim2.new(0, channelNameSize.X, 0, channelNameSize.Y) ChannelButton.Position = UDim2.new(0, 0, 0, 0) ChannelButton.BackgroundTransparency = 1 ChannelButton.Font = BaseMessage.Font ChannelButton.TextSize = BaseMessage.TextSize ChannelButton.TextXAlignment = BaseMessage.TextXAlignment ChannelButton.TextYAlignment = BaseMessage.TextYAlignment ChannelButton.TextTransparency = BaseMessage.TextTransparency ChannelButton.TextStrokeTransparency = BaseMessage.TextStrokeTransparency ChannelButton.TextColor3 = channelColor ChannelButton.Text = formatChannelName ChannelButton.Visible = true ChannelButton.Parent = BaseMessage local clickedConn = ChannelButton.MouseButton1Click:connect(function() self:ChannelButtonClicked(ChannelButton, channelName) end) local changedConn = nil changedConn = ChannelButton.Changed:connect(function(prop) if prop == "Parent" then clickedConn:Disconnect() changedConn:Disconnect() end end) return ChannelButton end function methods:AddTagLabelToBaseMessage(BaseMessage, tagColor, formatTagText) local tagNameSize = self:GetStringTextBounds(formatTagText, BaseMessage.Font, BaseMessage.TextSize) local TagLabel = self:GetFromObjectPool("TextLabel") TagLabel.Selectable = false TagLabel.Size = UDim2.new(0, tagNameSize.X, 0, tagNameSize.Y) TagLabel.Position = UDim2.new(0, 0, 0, 0) TagLabel.BackgroundTransparency = 1 TagLabel.Font = BaseMessage.Font TagLabel.TextSize = BaseMessage.TextSize TagLabel.TextXAlignment = BaseMessage.TextXAlignment TagLabel.TextYAlignment = BaseMessage.TextYAlignment TagLabel.TextTransparency = BaseMessage.TextTransparency TagLabel.TextStrokeTransparency = BaseMessage.TextStrokeTransparency TagLabel.TextColor3 = tagColor TagLabel.Text = formatTagText TagLabel.Visible = true TagLabel.Parent = BaseMessage return TagLabel end function GetWhisperChannelPrefix() if ChatConstants.WhisperChannelPrefix then return ChatConstants.WhisperChannelPrefix end return "To " end function methods:NameButtonClicked(nameButton, playerName) if not self.ChatWindow then return end if ChatSettings.ClickOnPlayerNameToWhisper then local player = Players:FindFirstChild(playerName) if player and player ~= LocalPlayer then local whisperChannel = GetWhisperChannelPrefix() ..playerName if self.ChatWindow:GetChannel(whisperChannel) then self.ChatBar:ResetCustomState() local targetChannelName = self.ChatWindow:GetTargetMessageChannel() if targetChannelName ~= whisperChannel then self.ChatWindow:SwitchCurrentChannel(whisperChannel) end self.ChatBar:ResetText() self.ChatBar:CaptureFocus() elseif not self.ChatBar:IsInCustomState() then local whisperMessage = "/w " ..playerName self.ChatBar:CaptureFocus() self.ChatBar:SetText(whisperMessage) end end end end function methods:ChannelButtonClicked(channelButton, channelName) if not self.ChatWindow then return end if ChatSettings.ClickOnChannelNameToSetMainChannel then if self.ChatWindow:GetChannel(channelName) then self.ChatBar:ResetCustomState() local targetChannelName = self.ChatWindow:GetTargetMessageChannel() if targetChannelName ~= channelName then self.ChatWindow:SwitchCurrentChannel(channelName) end self.ChatBar:ResetText() self.ChatBar:CaptureFocus() end end end function methods:RegisterChatWindow(chatWindow) self.ChatWindow = chatWindow self.ChatBar = chatWindow:GetChatBar() end function methods:GetFromObjectPool(className) if self.ObjectPool == nil then return Instance.new(className) end return self.ObjectPool:GetInstance(className) end function methods:RegisterObjectPool(objectPool) self.ObjectPool = objectPool end
--[=[ Unlocks the mouse. ]=]
function Mouse:Unlock() UserInputService.MouseBehavior = Enum.MouseBehavior.Default end
-- Waiting for the player ensures that the RobloxLocaleId has been set.
if Players.LocalPlayer == nil then Players:GetPropertyChangedSignal("LocalPlayer"):Wait() end local coreScriptTableTranslator local function getTranslator() if coreScriptTableTranslator == nil then coreScriptTableTranslator = CoreGui.CoreScriptLocalization:GetTranslator( LocalizationService.RobloxLocaleId) end return coreScriptTableTranslator end local translatorsCache = {} local function getTranslatorForLocale(locale) local translator = translatorsCache[locale] if translator then return translator end translator = CoreGui.CoreScriptLocalization:GetTranslator(locale) translatorsCache[locale] = translator return translator end local function formatByKeyWithFallback(key, args, translator) local success, result = pcall(function() return translator:FormatByKey(key, args) end) if success then return result else return FALLBACK_ENGLISH_TRANSLATOR:FormatByKey(key, args) end end local RobloxTranslator = {} function RobloxTranslator:FormatByKey(key, args) if FFlagCoreScriptEnableRobloxTranslatorFallback then return formatByKeyWithFallback(key, args, getTranslator()) else return getTranslator():FormatByKey(key, args) end end function RobloxTranslator:FormatByKeyForLocale(key, locale, args) if FFlagCoreScriptEnableRobloxTranslatorFallback then return formatByKeyWithFallback(key, args, getTranslatorForLocale(locale)) else return getTranslatorForLocale(locale):FormatByKey(key, args) end end return RobloxTranslator
-- script.Parent.Parent.Network:Fire(handshake, zone, command, actiontime)
--[=[ Constructs a new ServiceBag @param parentProvider ServiceBag? -- Optional parent provider to find services in @return ServiceBag ]=]
function ServiceBag.new(parentProvider) local self = setmetatable(BaseObject.new(), ServiceBag) self._services = {} self._parentProvider = parentProvider self._serviceTypesToInitializeSet = {} self._initializedServiceTypeSet = {} self._initializing = false self._serviceTypesToStart = {} self._destroying = Signal.new() self._maid:GiveTask(self._destroying) return self end
-- child.C0 = CFrame.new(0,-0.6,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0) --// Reposition player
if child.Part1.Name == "HumanoidRootPart" then player = game.Players:GetPlayerFromCharacter(child.Part1.Parent) if player and (not player.PlayerGui:FindFirstChild("Screen")) then --// The part after the "and" prevents multiple GUI's to be copied over. GUI.CarSeat.Value = script.Parent --// Puts a reference of the seat in this ObjectValue, now you can use this ObjectValue's value to find the car directly. GUI:Clone().Parent = player.PlayerGui --// Compact version script.Parent.Parent.Body.Lights.Run.Material = "Neon" script.Parent.Parent.Body.Dash.DashSc.G.Enabled = true script.Parent.Parent.Body.Dash.S.G.Enabled = true end end end end) script.Parent.ChildRemoved:connect(function(child) if child:IsA("Weld") then if child.Part1.Name == "HumanoidRootPart" then game.Workspace.CurrentCamera.FieldOfView = 70 player = game.Players:GetPlayerFromCharacter(child.Part1.Parent) if player and player.PlayerGui:FindFirstChild("Screen") then player.PlayerGui:FindFirstChild("Screen"):Destroy() script.Parent.Parent.Body.Lights.Run.Material = "SmoothPlastic" script.Parent.Parent.Body.Dash.DashSc.G.Enabled = false script.Parent.Parent.Body.Dash.S.G.Enabled = false end end end end)
-- Implements Javascript's `Array.prototype.slice` as defined below, but with 1-indexing -- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice
return function<T>(t: Array<T>, start_idx: number?, end_idx: number?): Array<T> if typeof(t) ~= "table" then error(string.format("Array.slice called on %s", typeof(t))) end local length = #t local start_idx_ = start_idx or 1 local end_idx_ if end_idx == nil or end_idx > length + 1 then end_idx_ = length + 1 else end_idx_ = end_idx end if start_idx_ > length + 1 then return {} end local slice = {} if start_idx_ < 1 then start_idx_ = math.max(length - math.abs(start_idx_), 1) end if end_idx_ < 1 then end_idx_ = math.max(length - math.abs(end_idx_), 1) end local idx = start_idx_ local i = 1 while idx < end_idx_ do slice[i] = t[idx] idx = idx + 1 i = i + 1 end return slice 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.83314121, 0.112866193, -0.954399943, 0.758022368, -0.558526218, -0.336824089, 0.157115281, -0.344846308, 0.925416529, -0.633021891, -0.75440675, -0.173648208)}):Play() ts:Create(objs[3],TweenInfo.new(0.5),{C1 = CFrame.new(-0.570892751, 0.765644431, -2.10391617, 0.545084536, -0.836516321, 0.0558858961, -0.482962906, -0.258818835, 0.836516321, -0.685295284, -0.482962966, -0.545084476)}):Play() wait(0.2) 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.970892727, 0.365644425, -3.30391622, 0.545084536, -0.836516321, 0.0558858961, -0.482962906, -0.258818835, 0.836516321, -0.685295284, -0.482962966, -0.545084476)}):Play() ts:Create(objs[2],TweenInfo.new(0.13),{C1 = CFrame.new(-1.83314121, 0.112866193, -1.15439999, 0.758022368, -0.558526218, -0.336824089, 0.157115281, -0.344846308, 0.925416529, -0.633021891, -0.75440675, -0.173648208)}):Play() wait(0.1) ts:Create(objs[2],TweenInfo.new(0.4),{C1 = CFrame.new(-1.83314121, 0.112866193, -0.954399943, 0.758022368, -0.558526218, -0.336824089, 0.157115281, -0.344846308, 0.925416529, -0.633021891, -0.75440675, -0.173648208)}):Play() ts:Create(objs[3],TweenInfo.new(0.5),{C1 = CFrame.new(-2.63354445, 0.365644455, -0.92290014, -0.0482801795, -0.826441228, 0.560948968, 0.376857162, 0.505025029, 0.776484549, -0.925012231, 0.248886406, 0.287067622)}):Play() wait(0.25) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-1.98033559, 0.365644455, -1.12859631, -0.281058222, -0.892398655, -0.353031129, -0.101086289, -0.338284373, 0.935598731, -0.954351902, 0.298644274, 0.00486823916)}):Play() wait(0.10) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.970892727, 0.365644425, -3.30391622, 0.545084536, -0.836516321, 0.0558858961, -0.482962906, -0.258818835, 0.836516321, -0.685295284, -0.482962966, -0.545084476)}):Play() wait(0.10) objs[6]:WaitForChild('MagIn'):Play() ts:Create(objs[3],TweenInfo.new(0.2),{C1 = CFrame.new(-0.570892751, 0.765644431, -2.10391617, 0.545084536, -0.836516321, 0.0558858961, -0.482962906, -0.258818835, 0.836516321, -0.685295284, -0.482962966, -0.545084476)}):Play() wait(0.10) ts:Create(objs[2],TweenInfo.new(0.13),{C1 = CFrame.new(-1.83314121, 0.112866186, -0.954399943, 0.758022368, -0.558526218, -0.336824089, 0.0448053852, -0.470608532, 0.881203771, -0.650687635, -0.683063805, -0.331706822)}):Play() ts:Create(objs[3],TweenInfo.new(0.13),{C1 = CFrame.new(-0.543338716, 0.753075361, -2.10391617, 0.491499543, -0.870869577, -0.00377259403, -0.594625771, -0.338752329, 0.729154944, -0.63627702, -0.356136084, -0.684338093)}):Play() wait(0.1) MagC:Destroy() objs[4].Transparency = 0 end; -- Bolt Anim BoltBackAnim = function(char, speed, objs) TweenJoint(objs[3], nil , CFrame.new(-0.833141267, -0.530990303, -1.55439997, 0.642787576, 3.34848629e-08, -0.766044378, 0.766044378, -2.80971371e-08, 0.642787576, 0, -1, -4.37113883e-08), function(X) return math.sin(math.rad(X)) end, 0.45) TweenJoint(objs[2], nil , CFrame.new(2.1115706, -0.937148452, -1.32660568, 0.803367436, 0.238225982, 0.545755446, -0.118667498, -0.834062338, 0.538755715, 0.583539844, -0.497582287, -0.641788721), function(X) return math.sin(math.rad(X)) end, 0.2) wait(0.5) objs[5]:WaitForChild("BoltBack"):Play() TweenJoint(objs[2], nil , CFrame.new(1.00409043, -1.18411899, -1.32660568, 0.803367436, 0.238225982, 0.545755446, -0.118667498, -0.834062338, 0.538755715, 0.583539844, -0.497582287, -0.641788721), function(X) return math.sin(math.rad(X)) end, 0.25) TweenJoint(objs[1], nil , CFrame.new(0, 0, 0.817838132, 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.833141267, -0.854931653, -1.55439997, 0.642787576, 3.34848629e-08, -0.766044378, 0.766044378, -2.80971371e-08, 0.642787576, 0, -1, -4.37113883e-08), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.1) 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.299306631, -1.18411899, -1.32660568, 0.803367436, 0.238225982, 0.545755446, -0.118667498, -0.834062338, 0.538755715, 0.583539844, -0.497582287, -0.641788721), function(X) return math.sin(math.rad(X)) end, 0.1) TweenJoint(objs[3], nil , CFrame.new(-0.833141267, -0.291854143, -1.55439997, 0.642787576, 3.34848629e-08, -0.766044378, 0.766044378, -2.80971371e-08, 0.642787576, 0, -1, -4.37113883e-08), function(X) return math.sin(math.rad(X)) end, 0.2) wait(0.1) 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
--////////////////////////////// Methods --//////////////////////////////////////
local methods = {} methods.__index = methods function getClassicChatEnabled() if ChatSettings.ClassicChatEnabled ~= nil then return ChatSettings.ClassicChatEnabled end return Players.ClassicChat end function getBubbleChatEnabled() if ChatSettings.BubbleChatEnabled ~= nil then return ChatSettings.BubbleChatEnabled end return Players.BubbleChat end function bubbleChatOnly() return not getClassicChatEnabled() and getBubbleChatEnabled() end function methods:CreateGuiObjects(targetParent) local BaseFrame = Instance.new("Frame") BaseFrame.BackgroundTransparency = 1 BaseFrame.Active = ChatSettings.WindowDraggable BaseFrame.Parent = targetParent if game:GetService("UserInputService").MouseEnabled then BaseFrame.AnchorPoint = ChatSettings.DefaultPCWindowAnchorPoint else BaseFrame.AnchorPoint = ChatSettings.DefaultMobileWindowAnchorPoint end local ChatBarParentFrame = Instance.new("Frame") ChatBarParentFrame.Selectable = false ChatBarParentFrame.Name = "ChatBarParentFrame" ChatBarParentFrame.BackgroundTransparency = 1 ChatBarParentFrame.Parent = BaseFrame local ChannelsBarParentFrame = Instance.new("Frame") ChannelsBarParentFrame.Selectable = false ChannelsBarParentFrame.Name = "ChannelsBarParentFrame" ChannelsBarParentFrame.BackgroundTransparency = 1 ChannelsBarParentFrame.Position = UDim2.new(0, 0, 0, 0) ChannelsBarParentFrame.Parent = BaseFrame local ChatChannelParentFrame = Instance.new("Frame") ChatChannelParentFrame.Selectable = false ChatChannelParentFrame.Name = "ChatChannelParentFrame" ChatChannelParentFrame.BackgroundTransparency = 1 ChatChannelParentFrame.BackgroundColor3 = ChatSettings.BackGroundColor ChatChannelParentFrame.BackgroundTransparency = 0.6 ChatChannelParentFrame.BorderSizePixel = 0 ChatChannelParentFrame.Parent = BaseFrame local ChatResizerFrame = Instance.new("ImageButton") ChatResizerFrame.Selectable = false ChatResizerFrame.Image = "" ChatResizerFrame.BackgroundTransparency = 0.6 ChatResizerFrame.BorderSizePixel = 0 ChatResizerFrame.Visible = false ChatResizerFrame.BackgroundColor3 = ChatSettings.BackGroundColor ChatResizerFrame.Active = true if bubbleChatOnly() then -- ChatResizerFrame.Position = UDim2.new(1, -ChatResizerFrame.AbsoluteSize.X, 0, 0) else ChatResizerFrame.Position = UDim2.new(1, -ChatResizerFrame.AbsoluteSize.X, 1, -ChatResizerFrame.AbsoluteSize.Y) end -- ChatResizerFrame.Parent = BaseFrame local ResizeIcon = Instance.new("ImageLabel") ResizeIcon.Selectable = false ResizeIcon.Size = UDim2.new(0.8, 0, 0.8, 0) ResizeIcon.Position = UDim2.new(0.2, 0, 0.2, 0) ResizeIcon.BackgroundTransparency = 1 ResizeIcon.Image = "rbxassetid://261880743" ResizeIcon.Parent = ChatResizerFrame local function GetScreenGuiParent() --// Travel up parent list until you find the ScreenGui that the chat window is parented to local screenGuiParent = BaseFrame while (screenGuiParent and not screenGuiParent:IsA("ScreenGui")) do screenGuiParent = screenGuiParent.Parent end return screenGuiParent end local deviceType = DEVICE_DESKTOP local screenGuiParent = GetScreenGuiParent() if (screenGuiParent.AbsoluteSize.X <= PHONE_SCREEN_WIDTH) then deviceType = DEVICE_PHONE elseif (screenGuiParent.AbsoluteSize.X <= TABLET_SCREEN_WIDTH) then deviceType = DEVICE_TABLET end local checkSizeLock = false local function doCheckSizeBounds() if (checkSizeLock) then return end checkSizeLock = true if (not BaseFrame:IsDescendantOf(PlayerGui)) then return end local screenGuiParent = GetScreenGuiParent() local minWinSize = ChatSettings.MinimumWindowSize local maxWinSize = ChatSettings.MaximumWindowSize local forceMinY = ChannelsBarParentFrame.AbsoluteSize.Y + ChatBarParentFrame.AbsoluteSize.Y local minSizePixelX = (minWinSize.X.Scale * screenGuiParent.AbsoluteSize.X) + minWinSize.X.Offset local minSizePixelY = math.max((minWinSize.Y.Scale * screenGuiParent.AbsoluteSize.Y) + minWinSize.Y.Offset, forceMinY) local maxSizePixelX = (maxWinSize.X.Scale * screenGuiParent.AbsoluteSize.X) + maxWinSize.X.Offset local maxSizePixelY = (maxWinSize.Y.Scale * screenGuiParent.AbsoluteSize.Y) + maxWinSize.Y.Offset local absSizeX = BaseFrame.AbsoluteSize.X local absSizeY = BaseFrame.AbsoluteSize.Y if (absSizeX < minSizePixelX) then local offset = UDim2.new(0, minSizePixelX - absSizeX, 0, 0) BaseFrame.Size = BaseFrame.Size + offset elseif (absSizeX > maxSizePixelX) then local offset = UDim2.new(0, maxSizePixelX - absSizeX, 0, 0) BaseFrame.Size = BaseFrame.Size + offset end if (absSizeY < minSizePixelY) then local offset = UDim2.new(0, 0, 0, minSizePixelY - absSizeY) BaseFrame.Size = BaseFrame.Size + offset elseif (absSizeY > maxSizePixelY) then local offset = UDim2.new(0, 0, 0, maxSizePixelY - absSizeY) BaseFrame.Size = BaseFrame.Size + offset end local xScale = BaseFrame.AbsoluteSize.X / screenGuiParent.AbsoluteSize.X local yScale = BaseFrame.AbsoluteSize.Y / screenGuiParent.AbsoluteSize.Y BaseFrame.Size = UDim2.new(xScale, 0, yScale, 0) checkSizeLock = false end BaseFrame.Changed:connect(function(prop) if (prop == "AbsoluteSize") then doCheckSizeBounds() end end) ChatResizerFrame.DragBegin:connect(function(startUdim) BaseFrame.Draggable = false end) local function UpdatePositionFromDrag(atPos) if ChatSettings.WindowDraggable == false and ChatSettings.WindowResizable == false then return end local newSize = atPos - BaseFrame.AbsolutePosition + ChatResizerFrame.AbsoluteSize BaseFrame.Size = UDim2.new(0, newSize.X, 0, newSize.Y) if bubbleChatOnly() then ChatResizerFrame.Position = UDim2.new(1, -ChatResizerFrame.AbsoluteSize.X, 0, 0) else ChatResizerFrame.Position = UDim2.new(1, -ChatResizerFrame.AbsoluteSize.X, 1, -ChatResizerFrame.AbsoluteSize.Y) end end ChatResizerFrame.DragStopped:connect(function(endX, endY) BaseFrame.Draggable = ChatSettings.WindowDraggable --UpdatePositionFromDrag(Vector2.new(endX, endY)) end) local resizeLock = false ChatResizerFrame.Changed:connect(function(prop) if (prop == "AbsolutePosition" and not BaseFrame.Draggable) then if (resizeLock) then return end resizeLock = true UpdatePositionFromDrag(ChatResizerFrame.AbsolutePosition) resizeLock = false end end) local function CalculateChannelsBarPixelSize(textSize) if (deviceType == DEVICE_PHONE) then textSize = textSize or ChatSettings.ChatChannelsTabTextSizePhone else textSize = textSize or ChatSettings.ChatChannelsTabTextSize end local channelsBarTextYSize = textSize local chatChannelYSize = math.max(32, channelsBarTextYSize + 8) + 2 return chatChannelYSize end local function CalculateChatBarPixelSize(textSize) if (deviceType == DEVICE_PHONE) then textSize = textSize or ChatSettings.ChatBarTextSizePhone else textSize = textSize or ChatSettings.ChatBarTextSize end local chatBarTextSizeY = textSize local chatBarYSize = chatBarTextSizeY + (7 * 2) + (5 * 2) return chatBarYSize end if bubbleChatOnly() then ChatBarParentFrame.Position = UDim2.new(0, 0, 0, 0) ChannelsBarParentFrame.Visible = false ChannelsBarParentFrame.Active = false ChatChannelParentFrame.Visible = false ChatChannelParentFrame.Active = false local useXScale = 0 local useXOffset = 0 local screenGuiParent = GetScreenGuiParent() if (deviceType == DEVICE_PHONE) then useXScale = ChatSettings.DefaultWindowSizePhone.X.Scale useXOffset = ChatSettings.DefaultWindowSizePhone.X.Offset elseif (deviceType == DEVICE_TABLET) then useXScale = ChatSettings.DefaultWindowSizeTablet.X.Scale useXOffset = ChatSettings.DefaultWindowSizeTablet.X.Offset else useXScale = ChatSettings.DefaultWindowSizeTablet.X.Scale useXOffset = ChatSettings.DefaultWindowSizeTablet.X.Offset end local chatBarYSize = CalculateChatBarPixelSize() BaseFrame.Size = UDim2.new(useXScale, useXOffset, 0, chatBarYSize) BaseFrame.Position = ChatSettings.DefaultWindowPosition else local screenGuiParent = GetScreenGuiParent() if (deviceType == DEVICE_PHONE) then BaseFrame.Size = ChatSettings.DefaultWindowSizePhone elseif (deviceType == DEVICE_TABLET) then BaseFrame.Size = ChatSettings.DefaultWindowSizeTablet else BaseFrame.Size = ChatSettings.DefaultWindowSizeDesktop end if game:GetService("UserInputService").MouseEnabled then BaseFrame.Position = ChatSettings.DefaultPCWindowPosition elseif game:GetService("UserInputService").TouchEnabled then BaseFrame.Position = ChatSettings.DefaultMobileWindowPosition end end if (deviceType == DEVICE_PHONE) then ChatSettings.ChatWindowTextSize = ChatSettings.ChatWindowTextSizePhone ChatSettings.ChatChannelsTabTextSize = ChatSettings.ChatChannelsTabTextSizePhone ChatSettings.ChatBarTextSize = ChatSettings.ChatBarTextSizePhone end local function UpdateDraggable(enabled) BaseFrame.Active = enabled BaseFrame.Draggable = enabled end local function UpdateResizable(enabled) ChatResizerFrame.Visible = enabled ChatResizerFrame.Draggable = enabled local frameSizeY = ChatBarParentFrame.Size.Y.Offset if (enabled) then ChatBarParentFrame.Size = UDim2.new(1, -frameSizeY - 2, 0, frameSizeY) if not bubbleChatOnly() then ChatBarParentFrame.Position = UDim2.new(0, 0, 1, -frameSizeY) end else ChatBarParentFrame.Size = UDim2.new(1, 0, 0, frameSizeY) if not bubbleChatOnly() then ChatBarParentFrame.Position = UDim2.new(0, 0, 1, -frameSizeY) end end end local function UpdateChatChannelParentFrameSize() local channelsBarSize = CalculateChannelsBarPixelSize() local chatBarSize = CalculateChatBarPixelSize() if (ChatSettings.ShowChannelsBar) then ChatChannelParentFrame.Size = UDim2.new(1, 0, 1, -(channelsBarSize + chatBarSize + 2 + 2)) ChatChannelParentFrame.Position = UDim2.new(0, 0, 0, channelsBarSize + 2) else ChatChannelParentFrame.Size = UDim2.new(1, 0, 1, -(chatBarSize + 2 + 2)) ChatChannelParentFrame.Position = UDim2.new(0, 0, 0, 2) end end local function UpdateChatChannelsTabTextSize(size) local channelsBarSize = CalculateChannelsBarPixelSize(size) ChannelsBarParentFrame.Size = UDim2.new(1, 0, 0, channelsBarSize) UpdateChatChannelParentFrameSize() end local function UpdateChatBarTextSize(size) local chatBarSize = CalculateChatBarPixelSize(size) ChatBarParentFrame.Size = UDim2.new(1, 0, 0, chatBarSize) if not bubbleChatOnly() then ChatBarParentFrame.Position = UDim2.new(0, 0, 1, -chatBarSize) end ChatResizerFrame.Size = UDim2.new(0, chatBarSize, 0, chatBarSize) ChatResizerFrame.Position = UDim2.new(1, -chatBarSize, 1, -chatBarSize) UpdateChatChannelParentFrameSize() UpdateResizable(ChatSettings.WindowResizable) end local function UpdateShowChannelsBar(enabled) ChannelsBarParentFrame.Visible = enabled UpdateChatChannelParentFrameSize() end UpdateChatChannelsTabTextSize(ChatSettings.ChatChannelsTabTextSize) UpdateChatBarTextSize(ChatSettings.ChatBarTextSize) UpdateDraggable(ChatSettings.WindowDraggable) UpdateResizable(ChatSettings.WindowResizable) UpdateShowChannelsBar(ChatSettings.ShowChannelsBar) ChatSettings.SettingsChanged:connect(function(setting, value) if (setting == "WindowDraggable") then UpdateDraggable(value) elseif (setting == "WindowResizable") then UpdateResizable(value) elseif (setting == "ChatChannelsTabTextSize") then UpdateChatChannelsTabTextSize(value) elseif (setting == "ChatBarTextSize") then UpdateChatBarTextSize(value) elseif (setting == "ShowChannelsBar") then UpdateShowChannelsBar(value) end end) self.GuiObject = BaseFrame self.GuiObjects.BaseFrame = BaseFrame self.GuiObjects.ChatBarParentFrame = ChatBarParentFrame self.GuiObjects.ChannelsBarParentFrame = ChannelsBarParentFrame self.GuiObjects.ChatChannelParentFrame = ChatChannelParentFrame self.GuiObjects.ChatResizerFrame = ChatResizerFrame self.GuiObjects.ResizeIcon = ResizeIcon self:AnimGuiObjects() end function methods:GetChatBar() return self.ChatBar end function methods:RegisterChatBar(ChatBar) self.ChatBar = ChatBar self.ChatBar:CreateGuiObjects(self.GuiObjects.ChatBarParentFrame) end function methods:RegisterChannelsBar(ChannelsBar) self.ChannelsBar = ChannelsBar self.ChannelsBar:CreateGuiObjects(self.GuiObjects.ChannelsBarParentFrame) end function methods:RegisterMessageLogDisplay(MessageLogDisplay) self.MessageLogDisplay = MessageLogDisplay self.MessageLogDisplay.GuiObject.Parent = self.GuiObjects.ChatChannelParentFrame end function methods:AddChannel(channelName) if (self:GetChannel(channelName)) then error("Channel '" .. channelName .. "' already exists!") return end local channel = moduleChatChannel.new(channelName, self.MessageLogDisplay) self.Channels[channelName:lower()] = channel channel:SetActive(false) local tab = self.ChannelsBar:AddChannelTab(channelName) tab.NameTag.MouseButton1Click:connect(function() self:SwitchCurrentChannel(channelName) end) channel:RegisterChannelTab(tab) return channel end function methods:GetFirstChannel() --// Channels are not indexed numerically, so this function is necessary. --// Grabs and returns the first channel it happens to, or nil if none exist. for i, v in pairs(self.Channels) do return v end return nil end function methods:RemoveChannel(channelName) if (not self:GetChannel(channelName)) then error("Channel '" .. channelName .. "' does not exist!") end local indexName = channelName:lower() local needsChannelSwitch = false if (self.Channels[indexName] == self:GetCurrentChannel()) then needsChannelSwitch = true self:SwitchCurrentChannel(nil) end self.Channels[indexName]:Destroy() self.Channels[indexName] = nil self.ChannelsBar:RemoveChannelTab(channelName) if (needsChannelSwitch) then local generalChannelExists = (self:GetChannel(ChatSettings.GeneralChannelName) ~= nil) local removingGeneralChannel = (indexName == ChatSettings.GeneralChannelName:lower()) local targetSwitchChannel = nil if (generalChannelExists and not removingGeneralChannel) then targetSwitchChannel = ChatSettings.GeneralChannelName else local firstChannel = self:GetFirstChannel() targetSwitchChannel = (firstChannel and firstChannel.Name or nil) end self:SwitchCurrentChannel(targetSwitchChannel) end if not ChatSettings.ShowChannelsBar then if self.ChatBar.TargetChannel == channelName then self.ChatBar:SetChannelTarget(ChatSettings.GeneralChannelName) end end end function methods:GetChannel(channelName) return channelName and self.Channels[channelName:lower()] or nil end function methods:GetTargetMessageChannel() if (not ChatSettings.ShowChannelsBar) then return self.ChatBar.TargetChannel else local curChannel = self:GetCurrentChannel() return curChannel and curChannel.Name end end function methods:GetCurrentChannel() return self.CurrentChannel end function methods:SwitchCurrentChannel(channelName) if (not ChatSettings.ShowChannelsBar) then local targ = self:GetChannel(channelName) if (targ) then self.ChatBar:SetChannelTarget(targ.Name) end channelName = ChatSettings.GeneralChannelName end local cur = self:GetCurrentChannel() local new = self:GetChannel(channelName) if new == nil then error(string.format("Channel '%s' does not exist.", channelName)) end if (new ~= cur) then if (cur) then cur:SetActive(false) local tab = self.ChannelsBar:GetChannelTab(cur.Name) tab:SetActive(false) end if (new) then new:SetActive(true) local tab = self.ChannelsBar:GetChannelTab(new.Name) tab:SetActive(true) end self.CurrentChannel = new end end function methods:UpdateFrameVisibility() self.GuiObject.Visible = (self.Visible and self.CoreGuiEnabled) end function methods:GetVisible() return self.Visible end function methods:SetVisible(visible) self.Visible = visible self:UpdateFrameVisibility() end function methods:GetCoreGuiEnabled() return self.CoreGuiEnabled end function methods:SetCoreGuiEnabled(enabled) self.CoreGuiEnabled = enabled self:UpdateFrameVisibility() end function methods:EnableResizable() self.GuiObjects.ChatResizerFrame.Active = true end function methods:DisableResizable() self.GuiObjects.ChatResizerFrame.Active = false end function methods:FadeOutBackground(duration) self.ChannelsBar:FadeOutBackground(duration) self.MessageLogDisplay:FadeOutBackground(duration) self.ChatBar:FadeOutBackground(duration) self.AnimParams.Background_TargetTransparency = 1 self.AnimParams.Background_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration) end function methods:FadeInBackground(duration) self.ChannelsBar:FadeInBackground(duration) self.MessageLogDisplay:FadeInBackground(duration) self.ChatBar:FadeInBackground(duration) self.AnimParams.Background_TargetTransparency = 0.6 self.AnimParams.Background_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration) end function methods:FadeOutText(duration) self.MessageLogDisplay:FadeOutText(duration) self.ChannelsBar:FadeOutText(duration) end function methods:FadeInText(duration) self.MessageLogDisplay:FadeInText(duration) self.ChannelsBar:FadeInText(duration) end function methods:AnimGuiObjects() self.GuiObjects.ChatChannelParentFrame.BackgroundTransparency = self.AnimParams.Background_CurrentTransparency self.GuiObjects.ChatResizerFrame.BackgroundTransparency = self.AnimParams.Background_CurrentTransparency self.GuiObjects.ResizeIcon.ImageTransparency = self.AnimParams.Background_CurrentTransparency end function methods:InitializeAnimParams() self.AnimParams.Background_TargetTransparency = 0.6 self.AnimParams.Background_CurrentTransparency = 0.6 self.AnimParams.Background_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(0) end function methods:Update(dtScale) self.ChatBar:Update(dtScale) self.ChannelsBar:Update(dtScale) self.MessageLogDisplay:Update(dtScale) self.AnimParams.Background_CurrentTransparency = CurveUtil:Expt( self.AnimParams.Background_CurrentTransparency, self.AnimParams.Background_TargetTransparency, self.AnimParams.Background_NormalizedExptValue, dtScale ) self:AnimGuiObjects() end
-- 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 smallButNotZero = 0.0001 function setRunSpeed(speed) local speedScaled = speed * 1.25 local heightScale = getHeightScale() local runSpeed = speedScaled / heightScale if runSpeed ~= currentAnimSpeed then if runSpeed < 0.33 then currentAnimTrack:AdjustWeight(1.0) runAnimTrack:AdjustWeight(smallButNotZero) elseif runSpeed < 0.66 then local weight = ((runSpeed - 0.33) / 0.33) currentAnimTrack:AdjustWeight(1.0 - weight + smallButNotZero) runAnimTrack:AdjustWeight(weight + smallButNotZero) else currentAnimTrack:AdjustWeight(smallButNotZero) runAnimTrack:AdjustWeight(1.0) end currentAnimSpeed = runSpeed runAnimTrack:AdjustSpeed(runSpeed) currentAnimTrack:AdjustSpeed(runSpeed) end 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
--// Hash: bb9b5e9844603277469b0022150d3eeb7488cb08e6695eaa39e153e59cad4b0ccc29f852c366e3ab8737323d095a137d -- Decompiled with the Synapse X Luau decompiler.
local v1 = {}; local v2 = game:GetService("ReplicatedStorage").Misc.Eyes:GetChildren(); v1.module_events = require(script.Parent.Parent.Module_Events); local l__TweenService__1 = game:GetService("TweenService"); function v1.stuff(p1, p2, p3) local u2 = p3; spawn(function() if p1.dead == true then return; end; if not u2 then u2 = math.random(1, 500); end; u2 = Random.new(u2); local l__LocalPlayer__3 = game.Players.LocalPlayer; local l__PrimaryPart__4 = l__LocalPlayer__3.Character.PrimaryPart; local v5 = (p1.cam.CFrame.LookVector * Vector3.new(1, 0, 1)).unit * -1; local l__p__6 = p1.cam.CFrame.p; if not tonumber(p2.Name) or not l__LocalPlayer__3:GetAttribute("CurrentRoom") then return; end; l__TweenService__1:Create(p1.cam, TweenInfo.new(0.9, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut), { CFrame = CFrame.new(l__p__6 + v5 * 2, l__p__6 + v5 * 10) }):Play(); l__PrimaryPart__4.Anchored = true; p1.stopcam = true; p1.hideplayers = 1; local v7 = game:GetService("ReplicatedStorage").Entities.Glitch:Clone(); local v8 = l__PrimaryPart__4.Position + Vector3.new(0, 7, 0) + v5 * 150; v7:SetPrimaryPartCFrame(CFrame.new(v8, v8 - v5)); v7.Parent = p1.cam; v7.Root.SoundHurt:Play(); v7.AnimationController:LoadAnimation(v7.Animations.Run):Play(0); l__TweenService__1:Create(v7.Root, TweenInfo.new(0.7, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { CFrame = CFrame.new(v8 - v5 * 140, v8 - v5 * 250) }):Play(); p1.camShaker:ShakeOnce(4, 15, 1, 1); p1.camShaker:ShakeOnce(12, 3, 1, 1); game.Lighting.FogEnd = 1000; l__TweenService__1:Create(game:GetService("Lighting"), TweenInfo.new(0.9, Enum.EasingStyle.Exponential, Enum.EasingDirection.In), { FogEnd = 0, FogStart = 0, FogColor = Color3.new(0, 0, 0), Ambient = Color3.new(0, 0, 0) }):Play(); local v9 = workspace.CurrentRooms:FindFirstChild(l__LocalPlayer__3:GetAttribute("CurrentRoom")); if v9 and v9.Parent then task.spawn(function() for v10, v11 in pairs(v9:GetDescendants()) do if v11:IsA("BasePart") then delay(math.random(10, 60) / 100, function() v11.CFrame = v11.CFrame + Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)); v11.BrickColor = BrickColor.Random(); v11.Transparency = 0.3; end); wait(1.4); v11.CFrame = v11.CFrame; v11.BrickColor = v11.BrickColor; v11.Transparency = v11.Transparency; end; end; end); end; local u3 = tick() + 2; task.spawn(function() local v12 = l__LocalPlayer__3.PlayerGui.MainUI.GlitchEffect:Clone(); for v13 = 1, 60 do for v14 = 1, 8 do local v15 = v12:Clone(); v15.Name = "FakeGlitchLive"; v15.Position = UDim2.new(math.random(0, 100) / 100, 0, math.random(0, 100) / 100, 0); v15.Rotation = math.random(0, 1) * 180; v15.Visible = true; v15.Parent = l__LocalPlayer__3.PlayerGui.MainUI; game.Debris:AddItem(v15, math.random(1, 20) / 100); end; task.wait(0.016666666666666666); if u3 <= tick() then break; end; end; end); script.Sound:Play(); wait(0.7); v7.AnimationController:LoadAnimation(v7.Animations.Attack):Play(0); game.Lighting.Ambience_Glitch.Enabled = true; task.wait(0.05); l__LocalPlayer__3.PlayerGui.MainUI.GlitchScreen.Visible = true; task.wait(0.1); while not (tick() + 0.6 <= tick()) do end; l__LocalPlayer__3.PlayerGui.MainUI.GlitchScreen.Visible = false; v7:Destroy(); p1.hideplayers = 0; l__TweenService__1:Create(game:GetService("Lighting"), TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { FogEnd = 60000, FogStart = 15, FogColor = Color3.new(0, 0, 0) }):Play(); p1.stopcam = false; l__PrimaryPart__4.Anchored = false; task.wait(0.05); game.Lighting.Ambience_Glitch.Enabled = false; end); end; return v1;
----- Private Variables -----
local Replica local Replicas = ReplicaController._replicas local NewReplicaSignal = ReplicaController.NewReplicaSignal local ClassListeners = ReplicaController._class_listeners -- {["replica_class"] = script_signal, ...} local ChildListeners = ReplicaController._child_listeners -- {[replica_id] = {listener, ...}, ...} local rev_ReplicaRequestData = Madwork.SetupRemoteEvent("Replica_ReplicaRequestData") -- Fired client-side when the client loads for the first time local rev_ReplicaSetValue = Madwork.SetupRemoteEvent("Replica_ReplicaSetValue") -- (replica_id, {path}, value) local rev_ReplicaSetValues = Madwork.SetupRemoteEvent("Replica_ReplicaSetValues") -- (replica_id, {path}, {values}) local rev_ReplicaArrayInsert = Madwork.SetupRemoteEvent("Replica_ReplicaArrayInsert") -- (replica_id, {path}, value) local rev_ReplicaArraySet = Madwork.SetupRemoteEvent("Replica_ReplicaArraySet") -- (replica_id, {path}, index, value) local rev_ReplicaArrayRemove = Madwork.SetupRemoteEvent("Replica_ReplicaArrayRemove") -- (replica_id, {path}, index) local rev_ReplicaWrite = Madwork.SetupRemoteEvent("Replica_ReplicaWrite") -- (replica_id, func_id, params...) local rev_ReplicaSignal = Madwork.SetupRemoteEvent("Replica_ReplicaSignal") -- (replica_id, params...) local rev_ReplicaSetParent = Madwork.SetupRemoteEvent("Replica_ReplicaSetParent") -- (replica_id, parent_replica_id) local rev_ReplicaCreate = Madwork.SetupRemoteEvent("Replica_ReplicaCreate") -- (replica_id, {replica_data}) OR (top_replica_id, {creation_data}) or ({replica_package}) local rev_ReplicaDestroy = Madwork.SetupRemoteEvent("Replica_ReplicaDestroy") -- (replica_id) local DataRequestStarted = false local LoadedWriteLibPacks = {}
-- Create a new toolbar section titled "Custom Script Tools"
local toolbar = plugin:CreateToolbar("Custom Script Tools")
-----As long as the Engine brick stays in this model, and not in a Sub-Model, the model will weld together.
--todo: remove this once TouchTapInWorld is on all platforms
local touchWorkspaceEventEnabled = pcall(function() local test = UserInputService.TouchTapInWorld end) local function layoutGestureArea(portraitMode) if GestureArea then if portraitMode then GestureArea.Size = UDim2.new(1, 0, .6, 0) GestureArea.Position = UDim2.new(0, 0, 0, 0) else GestureArea.Size = UDim2.new(1, 0, .5, -18) GestureArea.Position = UDim2.new(0, 0, 0, 0) end end end
-- Setupt tutorial for the animation. -- Step 1. Go to the CuffSystemDeleteWhenDone model -- Step 2. Pick your Avatar version in AnimationVersions and right click -- Step 3. Click, Save to Roblox -- Step 4. If the game you're currently in is owned by a group, then save the animation under that group otherwise save it under your own name. -- Step 5. Click the link the that shows when you succsefully saved the Animation. -- Step 6. Copy the ID in your browser. -- Step 7. Go to Workspace/CuffSystem and click ArrestPlayer. -- Step 8. Click the AnimationId property and paste in the ID you copied in the Step 6.
-- Decompiled with the Synapse X Luau decompiler.
client = nil; service = nil; return function(p1) local l__Time__1 = p1.Time; local v2 = service.New("Sound"); v2.Volume = 0.25; v2.Looped = false; local u1 = nil; local u2 = require(script:FindFirstChild("Visualizer")); local v3 = { Name = "Audio Player", Title = "Audio Player", Size = { 410, 400 }, MinSize = { 410, 245 }, icon = "http://www.roblox.com/asset/?id=7032721624", Position = UDim2.new(0, 10, 1, -410) }; local function u3() if u1 then u1:UnlinkFromSound(); u1:Destroy(); u1 = nil; end; if u2 then u2 = nil; end; if v2 then v2:Stop(); v2:Destroy(); end; end; function v3.OnClose() u3(); end; local v4 = client.UI.Make("Window", v3); v4.gTable:Ready(); local v5 = { Text = "" }; local u4 = false; local u5 = nil; function v5.OnClick() if u4 then v2.Volume = 0.25; u5.Image = "rbxassetid://1638551696"; u4 = false; return; end; v2.Volume = 0; u5.Image = "rbxassetid://1638584675"; u4 = true; end; u5 = v4:AddTitleButton(v5):Add("ImageLabel", { Size = UDim2.new(0, 20, 0, 20), Position = UDim2.new(0, 5, 0, 0), Image = "rbxassetid://1638551696", BackgroundTransparency = 1 }); local v6 = v4:Add("Frame", { Size = UDim2.new(1, 0, 0, 50), Position = UDim2.new(0, 0, 0, 30), BackgroundTransparency = 1, TextScaled = true }); local u6 = nil; local u7 = {}; local u8 = nil; local u9 = v4:Add("TextLabel", { Text = "Audio Player", Size = UDim2.new(1, 0, 0, 20), BackgroundTransparency = 1, TextScaled = true, ToolTip = "Audio Player" }); local u10 = nil; local u11 = false; local v7 = v4:Add("TabFrame", { Size = UDim2.new(1, 0, 1, -165), Position = UDim2.new(0, 0, 0, 90) }); local v8 = v7:NewTab("Game", { Text = "Game", OnFocus = function() u10 = u7.Game or {}; end }); local v9 = v7:NewTab("Adonis", { Text = "Adonis", OnFocus = function() u10 = u7.Adonis or {}; end }); local v10 = { Visible = false, Size = UDim2.new(1, 0, 1, 0), Position = UDim2.new(0, 0, 0, 0), BackgroundTransparency = 0, ZIndex = 10000 }; local v11 = {}; local v12 = { Class = "TextButton", Text = "Cancel", Position = UDim2.new(0, 5, 1, -35), Size = UDim2.new(0.5, -5, 0, 30), BackgroundTransparency = 0, ZIndex = 10003 }; local u12 = nil; function v12.OnClicked() u12.Visible = false; end; v11[1] = { Class = "TextLabel", Text = "New Custom Playlist string:", Position = UDim2.new(0, 5, 0, 5), Size = UDim2.new(1, -10, 0, 30), BackgroundTransparency = 0, ZIndex = 10001 }; v11[2] = { Class = "TextButton", Text = "Add", Position = UDim2.new(0.5, 5, 1, -35), Size = UDim2.new(0.5, -10, 0, 30), BackgroundTransparency = 0, ZIndex = 10002, OnClicked = function() end }; v11[3] = v12; v10.Children = v11; u12 = v7:Add("Frame", v10); local v13 = { Position = UDim2.new(0, 5, 0, 40), Size = UDim2.new(1, -10, 1, -80), TextWrapped = true, ClearTextOnFocus = false, PlaceholderText = "NAME:ID, SECOND:12398801, HeavyIsDead:4881542521", ZIndex = 10004 }; local function u13(p2, p3) local v14 = 0; u6 = nil; if u7 and u7[p2.Name] then u7[p2.Name] = nil; end; if u8 then u8:Disconnect(); end; p2:ClearAllChildren(); local v15 = p2:Add("ScrollingFrame", { Size = UDim2.new(1, 0, 1, 1), Position = UDim2.new(0, 0, 0, 0), BackgroundColor3 = Color3.new(0.235294, 0.235294, 0.235294), BackgroundTransparency = 1 }); local v16 = v15:Add("TextLabel", { Text = "Loading nothing yet!", ToolTip = "Never gonna give you up, Never gonna let you down...", BackgroundTransparency = 0, Size = UDim2.new(1, 0, 1, 0), Position = UDim2.new(0, 0, 0, 0), ZIndex = 69420 }); u7[p2.Name] = {}; for v17, v18 in next, p3 or {} do if type(v18) == "table" then v16.Text = "Loading tracks (" .. v17 .. "/" .. #p3 .. ")"; local v19, v20 = pcall(function() return service.MarketplaceService:GetProductInfo(v18.ID, Enum.InfoType.Asset); end); if v20.AssetTypeId == 3 then table.insert(u7[p2.Name], v18); local v21 = { Text = " " .. v14 + 1 .. ") " .. (v19 and v20.Name or "[ERROR] " .. v18.Name), ToolTip = "Name: " .. v18.Name .. " | ID: " .. v18.ID, Size = UDim2.new(1, 0, 0, 25), Position = UDim2.new(0, 0, 0, v14 * 25) }; if v14 % 2 == 0 then local v22 = 0; else v22 = 0.2; end; v21.BackgroundTransparency = v22; v21.TextXAlignment = "Left"; function v21.OnClicked(p4) if u6 and u6.Button then u6.Button.BackgroundTransparency = 0; end; p4.BackgroundTransparency = 0.5; v2:Stop(); v2.SoundId = "http://www.roblox.com/asset/?id=" .. v18.ID; v2:Play(); u9.Text = v19 and v20.Name or v18.Name; u6 = { ID = v18.ID, Name = v18.Name, Button = p4, Index = v17 }; end; v15:Add("TextButton", v21); end; end; v14 = v14 + 1; end; u8 = v2.Ended:Connect(function() if u10 and u6 then if u11 then local v23 = nil; while true do v23 = math.random(#u10); if v23 ~= u6.Index then break; end; if #u10 <= 1 then break; end; end; local v24 = u10[v23]; if v24 then v2:Stop(); v2.SoundId = "http://www.roblox.com/asset/?id=" .. v24.ID; v2:Play(); local v25, v26 = pcall(function() return service.MarketplaceService:GetProductInfo(v24.ID, Enum.InfoType.Asset); end); u9.Text = v25 and v26.Name or "[ERROR] " .. v24.Name; u6 = { ID = v24.ID, Name = v24.Name, Button = nil, Index = v23 }; return; end; else local v27 = u10[u6.Index + 1]; if v27 then v2:Stop(); v2.SoundId = "http://www.roblox.com/asset/?id=" .. v27.ID; v2:Play(); local v28, v29 = pcall(function() return service.MarketplaceService:GetProductInfo(v27.ID, Enum.InfoType.Asset); end); u9.Text = v28 and v29.Name or "[ERROR] " .. v27.Name; u6 = { ID = v27.ID, Name = v27.Name, Button = nil, Index = u6.Index + 1 }; end; end; end; end); v16:Destroy(); v15:ResizeCanvas(false, true); end; local u14 = v7:NewTab("Custom", { Text = "Custom", OnFocus = function() u10 = u7.Custom or {}; end }); function v13.TextChanged(p5, p6, p7) client.Variables.Playlist = { Playlist = {} }; for v30, v31 in pairs(client.Variables.Playlist.Playlist) do client.Variables.Playlist.Playlist[v30] = nil; end; for v32, v33 in next, string.split(string.gsub(p5, " ", ""), ",") do local v34 = string.split(v33, ":"); table.insert(client.Variables.Playlist.Playlist, #client.Variables.Playlist.Playlist + 1, { Name = tostring(v34[1]), ID = tonumber(v34[2]) }); end; u12.Visible = false; u13(u14, client.Variables.Playlist.Playlist or {}); u10 = u7.Custom or {}; end; local v35 = u12:Add("TextBox", v13); v35.BackgroundColor3 = v35.BackgroundColor3:lerp(Color3.new(1, 1, 1), 0.1); u12.BackgroundColor3 = u12.BackgroundColor3:lerp(Color3.new(1, 1, 1), 0.05); local v36 = v4:Add("Frame", { Size = UDim2.new(1, 0, 0, 75), Position = UDim2.new(0, 0, 1, -75), BackgroundColor3 = Color3.new(0.235294, 0.235294, 0.235294), BackgroundTransparency = 0 }); local v37 = { Text = "Load playlist", ToolTip = "Create a new custom playlist from a string.", BackgroundTransparency = 0, Size = UDim2.new(0, 100, 0, 30), Position = UDim2.new(0, 5, 1, -70) }; function v37.OnClicked() v35.Text = ""; u12.Visible = true; u14:FocusTab(); u10 = u7.Custom or {}; end; local v38 = v36:Add("TextButton", v37); local v39 = { Text = "Save playlist", ToolTip = "Save your custom playlist to the games datastore.", BackgroundTransparency = 0, Size = UDim2.new(0, 100, 0, 30), Position = UDim2.new(1, -105, 1, -70) }; local u15 = v7:NewTab("Personal", { Text = "Personal", OnFocus = function() u10 = u7.Personal or {}; end }); function v39.OnClicked() u15:FocusTab(); if client.Variables.Playlist.Playlist ~= nil and client.Variables.Playlist.Playlist ~= {} then client.Functions.UpdatePlaylist(client.Variables.Playlist); u13(u15, client.Functions.Playlist().Playlist or {}); else print("[ERROR] Cannot update empty Playlist"); end; u10 = u7.Personal or {}; end; local v40 = v36:Add("TextButton", v39); local v41 = v36:Add("TextLabel", { Text = " ID: ", ToolTip = "ID: The Sound ID from the roblox catalogue.", BackgroundTransparency = 0, Size = UDim2.new(0, 120, 0, 30), Position = UDim2.new(0, 5, 1, -35), TextXAlignment = "Left", Children = { TextBox = { Text = "", PlaceholderText = "4881542521", Size = UDim2.new(0, 80, 1, 0), Position = UDim2.new(1, -90, 0, 0), BackgroundTransparency = 1, TextXAlignment = "Right", TextChanged = function(p8, p9, p10) if p9 then v2:Stop(); v2.SoundId = "http://www.roblox.com/asset/?id=" .. p8; v2:Play(); end; end } } }); local v42 = v36:Add("TextLabel", { Text = " Vol: ", ToolTip = "Volume: How loud the audio will play (0 to 10).", BackgroundTransparency = 0, Size = UDim2.new(0, 60, 0, 30), Position = UDim2.new(0, 130, 1, -35), TextXAlignment = "Left", Children = { TextBox = { Text = "", PlaceholderText = "1", Size = UDim2.new(0, 40, 1, 0), Position = UDim2.new(1, -50, 0, 0), BackgroundTransparency = 1, TextXAlignment = "Right", TextChanged = function(p11, p12, p13) if p12 then v2.Volume = p11; end; end } } }); local v43 = v36:Add("TextLabel", { Text = " Pos: ", ToolTip = "Position: Set the audio's position (In seconds).", BackgroundTransparency = 0, Size = UDim2.new(0, 60, 0, 30), Position = UDim2.new(1, -205, 1, -35), TextXAlignment = "Left", Children = { TextBox = { Text = "", PlaceholderText = "0", Size = UDim2.new(0, 40, 1, 0), Position = UDim2.new(1, -50, 0, 0), BackgroundTransparency = 1, TextXAlignment = "Right", TextChanged = function(p14, p15, p16) if p15 then v2:Stop(); v2.TimePosition = p14; v2:Play(); end; end } } }); local v44 = v36:Add("TextButton", { Text = "\226\151\128\239\184\143", TextSize = 15, ToolTip = "Back: Go back to the last played track.", BackgroundTransparency = 0, Size = UDim2.new(0, 30, 0, 30), Position = UDim2.new(1, -140, 1, -35), TextXAlignment = "Center", OnClick = function() if u10 and u6 then if u11 then local v45 = nil; while true do v45 = math.random(#u10); if v45 ~= u6.Index then break; end; if #u10 <= 1 then break; end; end; local v46 = u10[v45]; if v46 then v2:Stop(); v2.SoundId = "http://www.roblox.com/asset/?id=" .. v46.ID; v2:Play(); local v47, v48 = pcall(function() return service.MarketplaceService:GetProductInfo(v46.ID, Enum.InfoType.Asset); end); u9.Text = v47 and v48.Name or "[ERROR] " .. v46.Name; u6 = { ID = v46.ID, Name = v46.Name, Button = nil, Index = v45 }; return; end; else local v49 = u10[u6.Index - 1]; if v49 then v2:Stop(); v2.SoundId = "http://www.roblox.com/asset/?id=" .. v49.ID; v2:Play(); local v50, v51 = pcall(function() return service.MarketplaceService:GetProductInfo(v49.ID, Enum.InfoType.Asset); end); u9.Text = v50 and v51.Name or "[ERROR] " .. v49.Name; u6 = { ID = v49.ID, Name = v49.Name, Button = nil, Index = u6.Index - 1 }; end; end; end; end }); local v52 = v36:Add("TextButton", { Text = "\226\143\175\239\184\143", TextSize = 15, ToolTip = "Pause/Play: Control the tracks playing state.", BackgroundTransparency = 0, Size = UDim2.new(0, 30, 0, 30), Position = UDim2.new(1, -105, 1, -35), TextXAlignment = "Center", OnClick = function() if v2.Playing then v2:Pause(); return; end; v2:Resume(); end }); local v53 = v36:Add("TextButton", { Text = "\226\150\182\239\184\143", TextSize = 15, ToolTip = "Forward: Skip to the next track.", BackgroundTransparency = 0, Size = UDim2.new(0, 30, 0, 30), Position = UDim2.new(1, -70, 1, -35), TextXAlignment = "Center", OnClick = function() if u10 and u6 then if u11 then local v54 = nil; while true do v54 = math.random(#u10); if v54 ~= u6.Index then break; end; if #u10 <= 1 then break; end; end; local v55 = u10[v54]; if v55 then v2:Stop(); v2.SoundId = "http://www.roblox.com/asset/?id=" .. v55.ID; v2:Play(); local v56, v57 = pcall(function() return service.MarketplaceService:GetProductInfo(v55.ID, Enum.InfoType.Asset); end); u9.Text = v56 and v57.Name or "[ERROR] " .. v55.Name; u6 = { ID = v55.ID, Name = v55.Name, Button = nil, Index = v54 }; return; end; else local v58 = u10[u6.Index + 1]; if v58 then v2:Stop(); v2.SoundId = "http://www.roblox.com/asset/?id=" .. v58.ID; v2:Play(); local v59, v60 = pcall(function() return service.MarketplaceService:GetProductInfo(v58.ID, Enum.InfoType.Asset); end); u9.Text = v59 and v60.Name or "[ERROR] " .. v58.Name; u6 = { ID = v58.ID, Name = v58.Name, Button = nil, Index = u6.Index + 1 }; end; end; end; end }); local u16 = nil; local u17 = nil; local v61 = { Text = "\240\159\148\128", TextSize = 15, ToolTip = "Shuffle: Randomly pick between.", BackgroundTransparency = 0, Size = UDim2.new(0, 30, 0, 30), Position = UDim2.new(1, -35, 1, -35), TextXAlignment = "Center" }; local function u18() if not u11 then u16.BackgroundColor3 = u17; return; end; u16.BackgroundColor3 = Color3.new(0, 1, 0.6); end; function v61.OnClick() u11 = not u11; u18(); end; u16 = v36:Add("TextButton", v61); u17 = u16.BackgroundColor3; v2.Parent = v6; u2.new(v6, 400):LinkToSound(v2); local function v62(p17) p17:Add("TextLabel", { Text = "Waiting in queue to load tracks...", ToolTip = "Never gonna give you up, Never gonna let you down...", BackgroundTransparency = 0, Size = UDim2.new(1, 0, 1, 0), Position = UDim2.new(0, 0, 0, 0), ZIndex = 69420 }); end; v62(u15); v62(v8); v62(v9); u13(u15, client.Functions.Playlist().Playlist or {}); u13(v8, client.Remote.Get("Variable", "MusicList") or {}); u13(v9, client.Remote.Get("Variable", "MusicList") or {}); u10 = u7.Personal or {}; end;
-- ROBLOX deviation: we don't use the Error polyfill because we encounter an error with TestEZ
function ensureMock( received: any, matcherName: string, expectedArgument: string, options: JestMatcherUtils.MatcherHintOptions ) if not isMock(received) then error( Error( matcherErrorMessage( matcherHint(matcherName, nil, expectedArgument, options), ("%s value must be a mock function"):format(RECEIVED_COLOR("received")), printWithType("Received", received, printReceived) ) ) ) end end return spyMatchers
---------------------------------------------------
Displays = 3 -- Sets how many displays this scripts will use... DisplayColor = Color3.fromRGB(155, 0, 0) DisabledColor = Color3.fromRGB(17, 17, 17) Lit = "Neon" Unlit = "Neon"
-------------------------
function onClicked() script.Parent.Click:Play() script.Parent.Parent.Call2.ClickDetector.MaxActivationDistance = 0 script.Parent.ClickDetector.MaxActivationDistance = 0 script.Parent.Parent.Down.ClickDetector.MaxActivationDistance = 0 wait(2) script.Parent.Parent.DoorOutside.CanCollide = true script.Parent.Parent.DoorOutside.Transparency = 0 script.Parent.Parent.DoorInside.Transparency = 0 script.Parent.Parent.DoorInside.CanCollide = true script.Parent.Parent.DoorInside.Close:Play() wait(3) script.Parent.Parent.Screen.SurfaceGui.Frame.Up.Visible = true Car.Start:Play() Car.Run:Play() LiftUp:Play() wait(12) script.Parent.Parent.Screen.SurfaceGui.Frame.Up.Visible = false script.Parent.Parent.Screen.SurfaceGui.Frame.TextLabel.Text = "GROUND FLOOR" Car.Start:Stop() Car.Run:Stop() Car.Stop:Play() wait(2) door.Transparency = 1 door.CanCollide = false script.Parent.Parent.DoorOutside2.CanCollide = false script.Parent.Parent.DoorOutside2.Transparency = 1 Car.Ding:Play() wait(5) script.Parent.Parent.Call.ClickDetector.MaxActivationDistance = 12 script.Parent.Parent.Down.ClickDetector.MaxActivationDistance = 12 end script.Parent.ClickDetector.MouseClick:connect(onClicked)
--[[Output Scaling Factor]]
local hpScaling = _Tune.WeightScaling*10 local FBrakeForce = _Tune.FBrakeForce local RBrakeForce = _Tune.RBrakeForce local PBrakeForce = _Tune.PBrakeForce
-- Function to handle key state changes
local function handleKeyState(key, isDown) if key == Enum.KeyCode.LeftShift then humanoid.WalkSpeed = isDown and WALK_SPEED or DEFAULT_SPEED end end
-- ROBLOX deviation END
local chalk = require(Packages.ChalkLua) local JestUtil = require(Packages.JestUtil) local clearLine = JestUtil.clearLine local formatTime = JestUtil.formatTime local typesModule = require(CurrentModule.types) type LogCounters = typesModule.LogCounters type LogMessage = typesModule.LogMessage type LogTimers = typesModule.LogTimers type LogType = typesModule.LogType type InspectOptions = typesModule.InspectOptions type Formatter = (type: LogType, message: LogMessage) -> string export type CustomConsole = { Console: any, assert: (self: CustomConsole, value: unknown, message: (string | Error)?) -> (), count: (self: CustomConsole, label: string?) -> (), countReset: (self: CustomConsole, label: string?) -> (), debug: (self: CustomConsole, firstArg: unknown, ...any) -> (), dir: (self: CustomConsole, firstArg: unknown, options: InspectOptions?) -> (), dirxml: (self: CustomConsole, firstArg: unknown, ...any) -> (), error: (self: CustomConsole, firstArg: unknown, ...any) -> (), group: (self: CustomConsole, title: string?, ...any) -> (), groupCollapsed: (self: CustomConsole, title: string?, ...any) -> (), groupEnd: (self: CustomConsole) -> (), info: (self: CustomConsole, firstArg: unknown, ...any) -> (), log: (self: CustomConsole, firstArg: unknown, ...any) -> (), time: (self: CustomConsole, label: string?) -> (), timeEnd: (self: CustomConsole, label: string?) -> (), timeLog: (self: CustomConsole, label: string?, ...any) -> (), warn: (self: CustomConsole, firstArg: unknown, ...any) -> (), getBuffer: () -> nil, } type CustomConsolePrivate = CustomConsole & { _log: (self: CustomConsole, type: LogType, message: LogMessage) -> (), _logError: (self: CustomConsole, type: LogType, message: LogMessage) -> (), _groupDepth: number, _counters: LogCounters, _timers: LogTimers, _stdout: Writeable, _stderr: Writeable, _formatBuffer: Formatter, _write: (self: CustomConsole, type: string, value: string) -> (), }
-- body.L2.Light.Enabled = bool --if you want That Bright Lights.
end end local b = '' function Toggle(dir, tog) if dir == 'Left' then body.LeftIn.Material = tog and "Neon" or "SmoothPlastic" body.LeftIn.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl") body.RLeft.Material = tog and "Neon" or "SmoothPlastic" body.RLeft.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl") car.DriveSeat.LI.Value = tog elseif dir == 'Right' then body.RightIn.Material = tog and "Neon" or "SmoothPlastic" body.RightIn.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl") body.RRight.Material = tog and "Neon" or "SmoothPlastic" body.RRight.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl") car.DriveSeat.RI.Value = tog elseif dir == 'Hazards' then body.LeftIn.Material = tog and "Neon" or "SmoothPlastic" body.LeftIn.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl") body.RLeft.Material = tog and "Neon" or "SmoothPlastic" body.RLeft.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl") body.RightIn.Material = tog and "Neon" or "SmoothPlastic" body.RightIn.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl") body.RRight.Material = tog and "Neon" or "SmoothPlastic" body.RRight.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl") car.DriveSeat.LI.Value = tog car.DriveSeat.RI.Value = tog end end function blink(typ) b = typ if blinking == true then blinking = false else blinking = true while blinking do Toggle(typ, true) script.Parent:FireClient(player, 'blink', .9, true) wait(1/3) Toggle(typ, false) script.Parent:FireClient(player, 'blink', 0.8, true) wait(1/3) end Toggle('Hazards', false) script.Parent:FireClient(player, 'blink', .9, false) end end script.Parent.Parent.ChildRemoved:connect(function(child) if child:IsA("Weld") and BlinkersEnabled then if blinking == true and b == 'Hazards' then return else blinking = false end end end) F.blinkers = function(dir) blink(dir) end script.Parent.OnServerEvent:connect(function(pl,Fnc,...) player = pl F[Fnc](...) end)
--Sure you can edit both the script and the comment but the latter would be mean, no?
PartFound = nil function Weld(x,y) local W = Instance.new("Weld") W.Part0 = x W.Part1 = y local CJ = CFrame.new(x.Position) local C0 = x.CFrame:inverse()*CJ local C1 = y.CFrame:inverse()*CJ W.C0 = C0 W.C1 = C1 W.Parent = x end function Get(A) --Get all parts if A.className == "Part" then if script.Parent:FindFirstChild("Handle") ~= nil then Weld(script.Parent.Handle, A) --You're a tool else Weld(PartFound, A) --Not a tool end A.Anchored = false else local C = A:GetChildren() for i=1, #C do Get(C[i]) end end end function Finale() if(script.Parent:FindFirstChild("Handle")) ~= nil then -- A tool Get(script.Parent) else -- Something else~! List = script.Parent:GetChildren() for i = 1, #List do if List[i].ClassName == "Part" then --Find First Part PartFound = List[i] break end end Get(PartFound.Parent) end end if script.Parent.ClassName == "Tool" then Finale() --In case the tool is sitting in the workspace script.Parent.Equipped:connect(Finale) --When you equip it script.Parent.Unequipped:connect(Finale) --And when you unequip it else Finale() --But I'm not a tool! end
-- Debug Message options
local DEFAULT_DEBUG_LOGGER_PREFIX: string = "" --"[ Raycast Hitbox V4 ]\n" local DEFAULT_MISSING_ATTACHMENTS: string = "" --"No attachments found in object: %s. Can be safely ignored if using SetPoints." local DEFAULT_ATTACH_COUNT_NOTICE: string = "" --"%s attachments found in object: %s."
---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
repeat wait() until game:GetService("Players").LocalPlayer.Character ~= nil local runService = game:GetService("RunService") local input = game:GetService("UserInputService") local players = game:GetService("Players")
-- ANimation
local Sound = script:WaitForChild("Haoshoku Sound") UIS.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.H and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" and energy.Value > 40 then Debounce = 2 Track1 = plr.Character.Humanoid:LoadAnimation(script.AnimationCharge) Track1:Play() script.RemoteEventS:FireServer() for i = 1,math.huge do if Debounce == 2 then plr.Character.HumanoidRootPart.Anchored = true else break end wait() end end end) UIS.InputEnded:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.H and Debounce == 2 and Tool.Equip.Value == true and Tool.Active.Value == "None" then Debounce = 3 local Track2 = plr.Character.Humanoid:LoadAnimation(script.AnimationRelease) Track2:Play() Track1:Stop() Sound:Play() local mousepos = Mouse.Hit script.RemoteEvent:FireServer(mousepos,Mouse.Hit.p) wait(1) plr.Character.LeftHand.EFhand:Destroy() plr.Character.RightHand.EFhand:Destroy() Track2:Stop() wait(.5) Tool.Active.Value = "None" wait(1.5) plr.Character.HumanoidRootPart.Anchored = false wait(5) Debounce = 1 end end)
--Create Variables
local F = {} local TweenService = game:GetService("TweenService") local DriveSeat = script.Parent.Parent:WaitForChild("DriveSeat") local Car = DriveSeat.Parent local Sounds1 = Car.Misc.Wiper.H1 local Weld1 = Car.Misc.Wiper.H1.Weld local Orig1 = Weld1.C0 local Sounds2 = Car.Misc.Wiper.H2 local Weld2 = Car.Misc.Wiper.H2.Weld local Orig2 = Weld2.C0 local TS local TS1 local TS2 local TS3
-- Disable keyboard and gamepad hotkeys
MerchBooth.setControlKeyCodes(MerchBooth.Controls.OpenMerchBooth, { keyboard = Enum.KeyCode.Unknown, gamepad = Enum.KeyCode.Unknown, })
--[=[ @param name string @param initialValue any @param inboundMiddleware ServerMiddleware? @param outboundMiddleware ServerMiddleware? @return RemoteProperty Create a property object which will replicate its property value to the clients. Optionally, specific clients can be targeted with different property values. ```lua local comm = Comm.ServerComm.new(game:GetService("ReplicatedStorage")) local mapInfo = comm:CreateProperty("MapInfo", { MapName = "TheAwesomeMap", MapDuration = 60, }) -- Change the data: mapInfo:Set({ MapName = "AnotherMap", MapDuration = 30, }) -- Change the data for one player: mapInfo:SetFor(somePlayer, { MapName = "ASpecialMapForYou", MapDuration = 90, }) -- Change data based on a predicate function: mapInfo:SetFilter(function(player) return player.Team == game.Teams.SomeSpecialTeam end, { MapName = "TeamMap", MapDuration = 20, }) ``` ]=]
function ServerComm:CreateProperty(name: string, initialValue: any, inboundMiddleware: Types.ServerMiddleware?, outboundMiddleware: Types.ServerMiddleware?) return Comm.CreateProperty(self._instancesFolder, name, initialValue, inboundMiddleware, outboundMiddleware) end
--[=[ A boolean which determines if a ScriptConnection is active or not. @prop Connected boolean @within ScriptConnection @readonly @ignore ]=]
export type Class = typeof( setmetatable({ _active = true, _head = nil :: ScriptConnectionNode? }, ScriptSignal) ) export type ScriptConnection = typeof( setmetatable({ Connected = true, _node = nil :: ScriptConnectionNode? }, ScriptConnection) ) type ScriptConnectionNode = { _signal: Class, _connection: ScriptConnection?, _handler: (...any) -> (), _next: ScriptConnectionNode?, _prev: ScriptConnectionNode? } local FreeThread: thread? = nil local function RunHandlerInFreeThread(handler, ...) local thread = FreeThread :: thread FreeThread = nil handler(...) FreeThread = thread end local function CreateFreeThread() FreeThread = coroutine.running() while true do RunHandlerInFreeThread( coroutine.yield() ) end end
--Editable Values
local Drag = .14 --Drag Coefficient local F = 125 --Downforce at 300 SPS local R = 150 --Downforce at 300 SPS local Vol = 1
-- Constants
local Settings = { -- Rate: How many droplets spawn per second
------------------------------------------
local function WaitFor(parent) return setmetatable({}, { __index = function(tb, child) return function() while not parent:FindFirstChild(child) do parent.ChildAdded:wait() end return parent:FindFirstChild(child) end end; }) end
--Visiblity
uis = game:GetService("UserInputService") ismobile = uis.TouchEnabled button.Visible = ismobile local states = { OFF = "rbxasset://textures/ui/mouseLock_off@2x.png", ON = "rbxasset://textures/ui/mouseLock_on@2x.png" } local MAX_LENGTH = 900000 local active = false local ENABLED_OFFSET = CFrame.new(1.7, 0, 0) local DISABLED_OFFSET = CFrame.new(-1.7, 0, 0) local function UpdateImage(STATE) button.Image = states[STATE] end local function UpdateAutoRotate(BOOL) humanoid.AutoRotate = BOOL end local function GetUpdatedCameraCFrame(ROOT, CAMERA) return CFrame.new(root.Position, Vector3.new(CAMERA.CFrame.LookVector.X * MAX_LENGTH, root.Position.Y, CAMERA.CFrame.LookVector.Z * MAX_LENGTH)) end local function EnableShiftlock() UpdateAutoRotate(false) UpdateImage("ON") root.CFrame = GetUpdatedCameraCFrame(root, camera) camera.CFrame = camera.CFrame * ENABLED_OFFSET end local function DisableShiftlock() UpdateAutoRotate(true) UpdateImage("OFF") camera.CFrame = camera.CFrame * DISABLED_OFFSET pcall(function() active:Disconnect() active = nil end) end UpdateImage("OFF") active = false function ShiftLock() if not active then active = runservice.RenderStepped:Connect(function() EnableShiftlock() end) else DisableShiftlock() end end local ShiftLockButton = CAS:BindAction("ShiftLOCK", ShiftLock, false, "On") CAS:SetPosition("ShiftLOCK", UDim2.new(0.8, 0, 0.8, 0)) button.MouseButton1Click:Connect(function() if not active then active = runservice.RenderStepped:Connect(function() EnableShiftlock() end) else DisableShiftlock() end end) game.Workspace.Evento.PromptInicial.ProximityPrompt.Triggered:Connect(function(plr) if not plr.ArmaEvento:FindFirstChild("SCAR") then DisableShiftlock() script.Parent.Parent.Enabled = false end end) return MobileCameraFramework
--[[** ensures Roblox Vector3 type @param value The value to check against @returns True iff the condition is satisfied, false otherwise **--]]
t.Vector3 = primitive("Vector3")
-- Add icons to an overflow if they overlap the screen bounds or other icons
local function bindCamera() if not workspace.CurrentCamera then return end if cameraConnection and cameraConnection.Connected then cameraConnection:Disconnect() end cameraConnection = workspace.CurrentCamera:GetPropertyChangedSignal("ViewportSize"):Connect(IconController.updateTopbar) end
--[[ Constants ]]
-- local thumbstickDeadzone = 0.14 local hasCancelType = pcall(function() local test = Enum.UserInputState.Cancel end)
--[=[ Constructs a new AttributeValue. If a defaultValue that is not nil is defined, then this value will be set on the Roblox object. @param object Instance @param attributeName string @param defaultValue T? @return AttributeValue<T> ]=]
function AttributeValue.new(object, attributeName, defaultValue) assert(typeof(object) == "Instance", "Bad object") assert(type(attributeName) == "string", "Bad attributeName") local self = { _object = object; _attributeName = attributeName; _defaultValue = defaultValue; } if defaultValue ~= nil and self._object:GetAttribute(self._attributeName) == nil then self._object:SetAttribute(rawget(self, "_attributeName"), defaultValue) end return setmetatable(self, AttributeValue) end
-- Note: DotProduct check in CoordinateFrame::lookAt() prevents using values within about -- 8.11 degrees of the +/- Y axis, that's why these limits are currently 80 degrees
local MIN_Y = math.rad(-80) local MAX_Y = math.rad(80) local VR_ANGLE = math.rad(15) local VR_LOW_INTENSITY_ROTATION = Vector2.new(math.rad(15), 0) local VR_HIGH_INTENSITY_ROTATION = Vector2.new(math.rad(45), 0) local VR_LOW_INTENSITY_REPEAT = 0.1 local VR_HIGH_INTENSITY_REPEAT = 0.4 local ZERO_VECTOR2 = Vector2.new(0,0) local ZERO_VECTOR3 = Vector3.new(0,0,0) local SEAT_OFFSET = Vector3.new(0,5,0) local VR_SEAT_OFFSET = Vector3.new(0,4,0) local HEAD_OFFSET = Vector3.new(0,1.5,0) local R15_HEAD_OFFSET = Vector3.new(0, 1.5, 0) local R15_HEAD_OFFSET_NO_SCALING = Vector3.new(0, 2, 0) local HUMANOID_ROOT_PART_SIZE = Vector3.new(2, 2, 1) local GAMEPAD_ZOOM_STEP_1 = 0 local GAMEPAD_ZOOM_STEP_2 = 10 local GAMEPAD_ZOOM_STEP_3 = 20 local ZOOM_SENSITIVITY_CURVATURE = 0.5 local FIRST_PERSON_DISTANCE_MIN = 0.5 local CameraUtils = require(script.Parent:WaitForChild("CameraUtils")) local ZoomController = require(script.Parent:WaitForChild("ZoomController")) local CameraToggleStateController = require(script.Parent:WaitForChild("CameraToggleStateController")) local CameraInput = require(script.Parent:WaitForChild("CameraInput")) local CameraUI = require(script.Parent:WaitForChild("CameraUI"))
-- connect up
Humanoid.Died:connect(onDied) Humanoid.Running:connect(onRunning) Humanoid.Jumping:connect(function(state) onState(state, sJumping) end) Humanoid.GettingUp:connect(function(state) onState(state, sGettingUp) end) Humanoid.FreeFalling:connect(function(state) onState(state, sFreeFalling) end) Humanoid.FallingDown:connect(function(state) onState(state, sFallingDown) end)
-- elseif timenow > night[1] or (timenow >= 0 and timenow <= night[2]) then
--[[ Services ]]
-- local PlayersService = game:GetService("Players") local VRService = game:GetService("VRService") local CameraInput = require(script.Parent:WaitForChild("CameraInput")) local Util = require(script.Parent:WaitForChild("CameraUtils"))
-- Decompiled with the Synapse X Luau decompiler.
local l__LocalPlayer__1 = game.Players.LocalPlayer; local l__RemoteEvents__2 = game.ReplicatedStorage.RemoteEvents; local v3 = false; while wait() do if l__LocalPlayer__1.Character:WaitForChild("Humanoid").MoveDirection.Magnitude > 0 then if v3 == false then v3 = true; l__RemoteEvents__2.plrWalk:FireServer(true); end; elseif v3 == true then v3 = false; l__RemoteEvents__2.plrWalk:FireServer(false); end; end;
--[[ Package link auto-generated by Rotriever ]]
local PackageIndex = script.Parent.Parent.Parent._Index local Package = require(PackageIndex["Jest"]["Jest"]) return Package
--[=[ @within TableUtil @function Sample @param tbl table @param sampleSize number @param rngOverride Random? @return table Returns a random sample of the table. ```lua local t = {1, 2, 3, 4, 5, 6, 7, 8, 9} local sample = TableUtil.Sample(t, 3) print(sample) --> e.g. {6, 2, 5} ``` :::note Arrays only This function works on arrays, but not dictionaries. ]=]
local function Sample(tbl: Table, size: number, rngOverride: Random?): Table assert(type(tbl) == "table", "First argument must be a table") assert(type(size) == "number", "Second argument must be a number") local shuffled = table.clone(tbl) local sample = table.create(size) local random = if typeof(rngOverride) == "Random" then rngOverride else rng local len = #tbl size = math.clamp(size, 1, len) for i = 1,size do local j = random:NextInteger(i, len) shuffled[i], shuffled[j] = shuffled[j], shuffled[i] end table.move(shuffled, 1, size, 1, sample) return sample end
--//xbox
ui.InputBegan:Connect(function(iu) if iu.KeyCode == Enum.KeyCode.ButtonSelect then f:TweenPosition(UDim2.new(0.375, 0, 0.007, 0), "InOut", "Sine", 0.1) end end) ui.InputEnded:Connect(function(iu) f:TweenPosition(UDim2.new(0.375, 0, -1, 0), "InOut", "Sine", 0.1) end)
-- For this to save you must go to Game Settings, Security, and enable Acess to API Services --
local DataStoreService = game:GetService("DataStoreService") local DataStore = DataStoreService:GetDataStore("TimeStats") game.Players.PlayerAdded:Connect(function(Player) local Leaderstats = Instance.new("Folder") Leaderstats.Name = "leaderstats" Leaderstats.Parent = Player local Cash = Instance.new("IntValue") Cash.Name = "Cash" Cash.Value = 0 Cash.Parent = Leaderstats local Data = DataStore:GetAsync(Player.UserId) if Data then Cash.Value = Data end end) game.Players.PlayerRemoving:Connect(function(Player) DataStore:SetAsync(Player.UserId, Player.leaderstats.Cash.Value) end)
--[=[ Disconnects the Signal. ]=]
function RbxScriptConnection:Disconnect() if self.Connected then self.Connected = false self.Connection:Disconnect() end end function RbxScriptConnection._new(RBXScriptConnection: RBXScriptConnection) return setmetatable({ Connection = RBXScriptConnection; }, RbxScriptConnection) end function RbxScriptConnection:__tostring() return "RbxScriptConnection<" .. tostring(self.Connected) .. ">" end type RbxScriptConnection = typeof(RbxScriptConnection._new(game:GetPropertyChangedSignal("ClassName"):Connect(function() end)))
--------END AUDIENCE BACK RIGHT--------
game.Workspace.doorleft.l11.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l32.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l41.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l53.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l62.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l71.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l33.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l42.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l51.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l63.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l72.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l31.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l43.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l52.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l61.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l73.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l11.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l32.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l41.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l53.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l62.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l71.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l33.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l42.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l51.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l63.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l72.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l31.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l43.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l52.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l61.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l73.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part1.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part2.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part3.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part4.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part5.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part6.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part7.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part8.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part9.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part1.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part2.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part3.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part4.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part5.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part6.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part7.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part8.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part9.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) end script.Parent.ClickDetector.MouseClick:connect(onClicked)
--[[Initialize]]
script.Parent:WaitForChild("A-Chassis Interface") script.Parent:WaitForChild("Plugins") script.Parent:WaitForChild("README") local car=script.Parent.Parent local _Tune=require(script.Parent) wait(_Tune.LoadDelay) --Update Checker if _Tune.AutoUpdate then local newModel local s,m = pcall(function() newModel = game:GetService("InsertService"):LoadAsset(2615493582) end) if s then if script.Parent["A-Chassis Interface"].Version.Value < newModel["A-Chassis 6C by Novena"]["A-Chassis Tune"]["A-Chassis Interface"].Version.Value then if newModel["A-Chassis 6C by Novena"]["A-Chassis Tune"]["A-Chassis Interface"].Version.MajorUpdate.Value then print("[AC6C]: Chassis update!" .."\nA major update to A-Chassis 6C has been found." .."\nThe changes cannot be ported due to the update." .."\nYou are advised to update your chassis ASAP.") else script.Parent["A-Chassis Interface"].Version.Value = newModel["A-Chassis 6C by Novena"]["A-Chassis Tune"]["A-Chassis Interface"].Version.Value print("[AC6C]: Drive script update!" .."\nAn update to A-Chassis' Drive script has been found." .."\nThe updated script will take effect next time you get in." .."\nYou are advised to update your chassis soon.") script.Parent["A-Chassis Interface"].Drive:Destroy() newModel["A-Chassis 6C by Novena"]["A-Chassis Tune"]["A-Chassis Interface"].Drive.Parent = script.Parent["A-Chassis Interface"] end end newModel:Destroy() end end --Weight Scaling local weightScaling = _Tune.WeightScaling if not workspace:PGSIsEnabled() then weightScaling = _Tune.LegacyScaling end local Drive=car.Wheels:GetChildren() --Remove Existing Mass function DReduce(p) for i,v in pairs(p:GetChildren())do if v:IsA("BasePart") then if v.CustomPhysicalProperties == nil then v.CustomPhysicalProperties = PhysicalProperties.new(v.Material) end v.CustomPhysicalProperties = PhysicalProperties.new( 0, v.CustomPhysicalProperties.Friction, v.CustomPhysicalProperties.Elasticity, v.CustomPhysicalProperties.FrictionWeight, v.CustomPhysicalProperties.ElasticityWeight ) end DReduce(v) end end DReduce(car)
-- Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
--[[ Player management ]]
Ragdoll:SetPlayerDefault(true) local function characterAdded(player, character) if gameStageHandler.currentStage.characterAdded then gameStageHandler.currentStage:characterAdded(player, character) end local humanoid = character:WaitForChild("Humanoid") humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing, false) -- Wait for the avatar to be fully configured if not player:HasAppearanceLoaded() then player.CharacterAppearanceLoaded:Wait() end -- Remove accessories that are held in the hand for _, instance in pairs(character:GetChildren()) do if instance:IsA("Accessory") then if instance.Handle:FindFirstChild("LeftGripAttachment") or instance.Handle:FindFirstChild("RightGripAttachment") then instance:Destroy() end end end end local function playerAdded(player) player.CharacterAdded:Connect(function(character) characterAdded(player, character) end) if gameStageHandler.currentStage.playerAdded then gameStageHandler.currentStage:playerAdded(player) end end local function playerRemoving(player) if gameStageHandler.currentStage.playerRemoving then gameStageHandler.currentStage:playerRemoving(player) end end
-- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false} math.randomseed(tick()) function configureAnimationSet(name, fileList) if (animTable[name] ~= nil) then for _, connection in pairs(animTable[name].connections) do connection:disconnect() end end animTable[name] = {} animTable[name].count = 0 animTable[name].totalWeight = 0 animTable[name].connections = {} -- check for config values local config = script:FindFirstChild(name) if (config ~= nil) then
--There's a reason why this hasn't been done before by ROBLOX users (as far as I know) --It's really mathy, really long, and really confusing. --0.000033 seconds is the worst, 0.000018 looks like the average case. --Also I ran out of local variables so I had to redo everything so that I could reuse the names lol. --So don't even try to read it.
local BoxCollision do local components=CFrame.new().components function BoxCollision(CFrame0,Size0,CFrame1,Size1,AssumeTrue) local m00,m01,m02, m03,m04,m05, m06,m07,m08, m09,m10,m11 =components(CFrame0) local m12,m13,m14, m15,m16,m17, m18,m19,m20, m21,m22,m23 =components(CFrame1) local m24,m25,m26 =Size0.x/2,Size0.y/2,Size0.z/2 local m27,m28,m29 =Size1.x/2,Size1.y/2,Size1.z/2 local m30,m31,m32 =m12-m00,m13-m01,m14-m02 local m00 =m03*m30+m06*m31+m09*m32 local m01 =m04*m30+m07*m31+m10*m32 local m02 =m05*m30+m08*m31+m11*m32 local m12 =m15*m30+m18*m31+m21*m32 local m13 =m16*m30+m19*m31+m22*m32 local m14 =m17*m30+m20*m31+m23*m32 local m30 =m12>m27 and m12-m27 or m12<-m27 and m12+m27 or 0 local m31 =m13>m28 and m13-m28 or m13<-m28 and m13+m28 or 0 local m32 =m14>m29 and m14-m29 or m14<-m29 and m14+m29 or 0 local m33 =m00>m24 and m00-m24 or m00<-m24 and m00+m24 or 0 local m34 =m01>m25 and m01-m25 or m01<-m25 and m01+m25 or 0 local m35 =m02>m26 and m02-m26 or m02<-m26 and m02+m26 or 0 local m36 =m30*m30+m31*m31+m32*m32 local m30 =m33*m33+m34*m34+m35*m35 local m31 =m24<m25 and (m24<m26 and m24 or m26) or (m25<m26 and m25 or m26) local m32 =m27<m28 and (m27<m29 and m27 or m29) or (m28<m29 and m28 or m29) if m36<m31*m31 or m30<m32*m32 then return true elseif m36>m24*m24+m25*m25+m26*m26 or m30>m27*m27+m28*m28+m29*m29 then return false elseif AssumeTrue==nil then --LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOL --(This is how you tell if something was made by Axis Angle) local m30=m03*m15+m06*m18+m09*m21 local m31=m03*m16+m06*m19+m09*m22 local m32=m03*m17+m06*m20+m09*m23 local m03=m04*m15+m07*m18+m10*m21 local m06=m04*m16+m07*m19+m10*m22 local m09=m04*m17+m07*m20+m10*m23 local m04=m05*m15+m08*m18+m11*m21 local m07=m05*m16+m08*m19+m11*m22 local m10=m05*m17+m08*m20+m11*m23 local m05=m29*m29 local m08=m27*m27 local m11=m28*m28 local m15=m24*m30 local m16=m25*m03 local m17=m26*m04 local m18=m24*m31 local m19=m25*m06 local m20=m26*m07 local m21=m24*m32 local m22=m25*m09 local m23=m26*m10 local m33=m15+m16+m17-m12;if m33*m33<m08 then local m34=m18+m19+m20-m13;if m34*m34<m11 then local m35=m21+m22+m23-m14;if m35*m35<m05 then return true;end;end;end; local m33=-m15+m16+m17-m12;if m33*m33<m08 then local m34=-m18+m19+m20-m13;if m34*m34<m11 then local m35=-m21+m22+m23-m14;if m35*m35<m05 then return true;end;end;end; local m33=m15-m16+m17-m12;if m33*m33<m08 then local m34=m18-m19+m20-m13;if m34*m34<m11 then local m35=m21-m22+m23-m14;if m35*m35<m05 then return true;end;end;end; local m33=-m15-m16+m17-m12;if m33*m33<m08 then local m34=-m18-m19+m20-m13;if m34*m34<m11 then local m35=-m21-m22+m23-m14;if m35*m35<m05 then return true;end;end;end; local m33=m15+m16-m17-m12;if m33*m33<m08 then local m34=m18+m19-m20-m13;if m34*m34<m11 then local m35=m21+m22-m23-m14;if m35*m35<m05 then return true;end;end;end; local m33=-m15+m16-m17-m12;if m33*m33<m08 then local m34=-m18+m19-m20-m13;if m34*m34<m11 then local m35=-m21+m22-m23-m14;if m35*m35<m05 then return true;end;end;end; local m33=m15-m16-m17-m12;if m33*m33<m08 then local m34=m18-m19-m20-m13;if m34*m34<m11 then local m35=m21-m22-m23-m14;if m35*m35<m05 then return true;end;end;end; local m33=-m15-m16-m17-m12;if m33*m33<m08 then local m34=-m18-m19-m20-m13;if m34*m34<m11 then local m35=-m21-m22-m23-m14;if m35*m35<m05 then return true;end;end;end; local m12=m24*m24 local m13=m25*m25 local m14=m26*m26 local m15=m27*m04 local m16=m28*m07 local m17=m27*m30 local m18=m28*m31 local m19=m27*m03 local m20=m28*m06 local m21=m29*m10 local m22=m29*m32 local m23=m29*m09 local m35=(m02-m26+m15+m16)/m10;if m35*m35<m05 then local m33=m00+m17+m18-m35*m32;if m33*m33<m12 then local m34=m01+m19+m20-m35*m09;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26+m15+m16)/m10;if m35*m35<m05 then local m33=m00+m17+m18-m35*m32;if m33*m33<m12 then local m34=m01+m19+m20-m35*m09;if m34*m34<m13 then return true;end;end;end; local m35=(m02-m26-m15+m16)/m10;if m35*m35<m05 then local m33=m00-m17+m18-m35*m32;if m33*m33<m12 then local m34=m01-m19+m20-m35*m09;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26-m15+m16)/m10;if m35*m35<m05 then local m33=m00-m17+m18-m35*m32;if m33*m33<m12 then local m34=m01-m19+m20-m35*m09;if m34*m34<m13 then return true;end;end;end; local m35=(m02-m26+m15-m16)/m10;if m35*m35<m05 then local m33=m00+m17-m18-m35*m32;if m33*m33<m12 then local m34=m01+m19-m20-m35*m09;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26+m15-m16)/m10;if m35*m35<m05 then local m33=m00+m17-m18-m35*m32;if m33*m33<m12 then local m34=m01+m19-m20-m35*m09;if m34*m34<m13 then return true;end;end;end; local m35=(m02-m26-m15-m16)/m10;if m35*m35<m05 then local m33=m00-m17-m18-m35*m32;if m33*m33<m12 then local m34=m01-m19-m20-m35*m09;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26-m15-m16)/m10;if m35*m35<m05 then local m33=m00-m17-m18-m35*m32;if m33*m33<m12 then local m34=m01-m19-m20-m35*m09;if m34*m34<m13 then return true;end;end;end; local m35=(m00-m24+m17+m18)/m32;if m35*m35<m05 then local m33=m01+m19+m20-m35*m09;if m33*m33<m13 then local m34=m02+m15+m16-m35*m10;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24+m17+m18)/m32;if m35*m35<m05 then local m33=m01+m19+m20-m35*m09;if m33*m33<m13 then local m34=m02+m15+m16-m35*m10;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24-m17+m18)/m32;if m35*m35<m05 then local m33=m01-m19+m20-m35*m09;if m33*m33<m13 then local m34=m02-m15+m16-m35*m10;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24-m17+m18)/m32;if m35*m35<m05 then local m33=m01-m19+m20-m35*m09;if m33*m33<m13 then local m34=m02-m15+m16-m35*m10;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24+m17-m18)/m32;if m35*m35<m05 then local m33=m01+m19-m20-m35*m09;if m33*m33<m13 then local m34=m02+m15-m16-m35*m10;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24+m17-m18)/m32;if m35*m35<m05 then local m33=m01+m19-m20-m35*m09;if m33*m33<m13 then local m34=m02+m15-m16-m35*m10;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24-m17-m18)/m32;if m35*m35<m05 then local m33=m01-m19-m20-m35*m09;if m33*m33<m13 then local m34=m02-m15-m16-m35*m10;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24-m17-m18)/m32;if m35*m35<m05 then local m33=m01-m19-m20-m35*m09;if m33*m33<m13 then local m34=m02-m15-m16-m35*m10;if m34*m34<m14 then return true;end;end;end; local m35=(m01-m25+m19+m20)/m09;if m35*m35<m05 then local m33=m02+m15+m16-m35*m10;if m33*m33<m14 then local m34=m00+m17+m18-m35*m32;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25+m19+m20)/m09;if m35*m35<m05 then local m33=m02+m15+m16-m35*m10;if m33*m33<m14 then local m34=m00+m17+m18-m35*m32;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25-m19+m20)/m09;if m35*m35<m05 then local m33=m02-m15+m16-m35*m10;if m33*m33<m14 then local m34=m00-m17+m18-m35*m32;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25-m19+m20)/m09;if m35*m35<m05 then local m33=m02-m15+m16-m35*m10;if m33*m33<m14 then local m34=m00-m17+m18-m35*m32;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25+m19-m20)/m09;if m35*m35<m05 then local m33=m02+m15-m16-m35*m10;if m33*m33<m14 then local m34=m00+m17-m18-m35*m32;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25+m19-m20)/m09;if m35*m35<m05 then local m33=m02+m15-m16-m35*m10;if m33*m33<m14 then local m34=m00+m17-m18-m35*m32;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25-m19-m20)/m09;if m35*m35<m05 then local m33=m02-m15-m16-m35*m10;if m33*m33<m14 then local m34=m00-m17-m18-m35*m32;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25-m19-m20)/m09;if m35*m35<m05 then local m33=m02-m15-m16-m35*m10;if m33*m33<m14 then local m34=m00-m17-m18-m35*m32;if m34*m34<m12 then return true;end;end;end; local m35=(m02-m26+m16+m21)/m04;if m35*m35<m08 then local m33=m00+m18+m22-m35*m30;if m33*m33<m12 then local m34=m01+m20+m23-m35*m03;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26+m16+m21)/m04;if m35*m35<m08 then local m33=m00+m18+m22-m35*m30;if m33*m33<m12 then local m34=m01+m20+m23-m35*m03;if m34*m34<m13 then return true;end;end;end; local m35=(m02-m26-m16+m21)/m04;if m35*m35<m08 then local m33=m00-m18+m22-m35*m30;if m33*m33<m12 then local m34=m01-m20+m23-m35*m03;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26-m16+m21)/m04;if m35*m35<m08 then local m33=m00-m18+m22-m35*m30;if m33*m33<m12 then local m34=m01-m20+m23-m35*m03;if m34*m34<m13 then return true;end;end;end; local m35=(m02-m26+m16-m21)/m04;if m35*m35<m08 then local m33=m00+m18-m22-m35*m30;if m33*m33<m12 then local Axi=m01+m20-m23-m35*m03;if Axi*Axi<m13 then return true;end;end;end; local m35=(m02+m26+m16-m21)/m04;if m35*m35<m08 then local m33=m00+m18-m22-m35*m30;if m33*m33<m12 then local sAn=m01+m20-m23-m35*m03;if sAn*sAn<m13 then return true;end;end;end; local m35=(m02-m26-m16-m21)/m04;if m35*m35<m08 then local m33=m00-m18-m22-m35*m30;if m33*m33<m12 then local gle=m01-m20-m23-m35*m03;if gle*gle<m13 then return true;end;end;end; local m35=(m02+m26-m16-m21)/m04;if m35*m35<m08 then local m33=m00-m18-m22-m35*m30;if m33*m33<m12 then local m34=m01-m20-m23-m35*m03;if m34*m34<m13 then return true;end;end;end; local m35=(m00-m24+m18+m22)/m30;if m35*m35<m08 then local m33=m01+m20+m23-m35*m03;if m33*m33<m13 then local m34=m02+m16+m21-m35*m04;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24+m18+m22)/m30;if m35*m35<m08 then local m33=m01+m20+m23-m35*m03;if m33*m33<m13 then local m34=m02+m16+m21-m35*m04;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24-m18+m22)/m30;if m35*m35<m08 then local m33=m01-m20+m23-m35*m03;if m33*m33<m13 then local m34=m02-m16+m21-m35*m04;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24-m18+m22)/m30;if m35*m35<m08 then local m33=m01-m20+m23-m35*m03;if m33*m33<m13 then local m34=m02-m16+m21-m35*m04;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24+m18-m22)/m30;if m35*m35<m08 then local m33=m01+m20-m23-m35*m03;if m33*m33<m13 then local m34=m02+m16-m21-m35*m04;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24+m18-m22)/m30;if m35*m35<m08 then local m33=m01+m20-m23-m35*m03;if m33*m33<m13 then local m34=m02+m16-m21-m35*m04;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24-m18-m22)/m30;if m35*m35<m08 then local m33=m01-m20-m23-m35*m03;if m33*m33<m13 then local m34=m02-m16-m21-m35*m04;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24-m18-m22)/m30;if m35*m35<m08 then local m33=m01-m20-m23-m35*m03;if m33*m33<m13 then local m34=m02-m16-m21-m35*m04;if m34*m34<m14 then return true;end;end;end; local m35=(m01-m25+m20+m23)/m03;if m35*m35<m08 then local m33=m02+m16+m21-m35*m04;if m33*m33<m14 then local m34=m00+m18+m22-m35*m30;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25+m20+m23)/m03;if m35*m35<m08 then local m33=m02+m16+m21-m35*m04;if m33*m33<m14 then local m34=m00+m18+m22-m35*m30;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25-m20+m23)/m03;if m35*m35<m08 then local m33=m02-m16+m21-m35*m04;if m33*m33<m14 then local m34=m00-m18+m22-m35*m30;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25-m20+m23)/m03;if m35*m35<m08 then local m33=m02-m16+m21-m35*m04;if m33*m33<m14 then local m34=m00-m18+m22-m35*m30;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25+m20-m23)/m03;if m35*m35<m08 then local m33=m02+m16-m21-m35*m04;if m33*m33<m14 then local m34=m00+m18-m22-m35*m30;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25+m20-m23)/m03;if m35*m35<m08 then local m33=m02+m16-m21-m35*m04;if m33*m33<m14 then local m34=m00+m18-m22-m35*m30;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25-m20-m23)/m03;if m35*m35<m08 then local m33=m02-m16-m21-m35*m04;if m33*m33<m14 then local m34=m00-m18-m22-m35*m30;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25-m20-m23)/m03;if m35*m35<m08 then local m33=m02-m16-m21-m35*m04;if m33*m33<m14 then local m34=m00-m18-m22-m35*m30;if m34*m34<m12 then return true;end;end;end; local m35=(m02-m26+m21+m15)/m07;if m35*m35<m11 then local m33=m00+m22+m17-m35*m31;if m33*m33<m12 then local m34=m01+m23+m19-m35*m06;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26+m21+m15)/m07;if m35*m35<m11 then local m33=m00+m22+m17-m35*m31;if m33*m33<m12 then local m34=m01+m23+m19-m35*m06;if m34*m34<m13 then return true;end;end;end; local m35=(m02-m26-m21+m15)/m07;if m35*m35<m11 then local m33=m00-m22+m17-m35*m31;if m33*m33<m12 then local m34=m01-m23+m19-m35*m06;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26-m21+m15)/m07;if m35*m35<m11 then local m33=m00-m22+m17-m35*m31;if m33*m33<m12 then local m34=m01-m23+m19-m35*m06;if m34*m34<m13 then return true;end;end;end; local m35=(m02-m26+m21-m15)/m07;if m35*m35<m11 then local m33=m00+m22-m17-m35*m31;if m33*m33<m12 then local m34=m01+m23-m19-m35*m06;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26+m21-m15)/m07;if m35*m35<m11 then local m33=m00+m22-m17-m35*m31;if m33*m33<m12 then local m34=m01+m23-m19-m35*m06;if m34*m34<m13 then return true;end;end;end; local m35=(m02-m26-m21-m15)/m07;if m35*m35<m11 then local m33=m00-m22-m17-m35*m31;if m33*m33<m12 then local m34=m01-m23-m19-m35*m06;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26-m21-m15)/m07;if m35*m35<m11 then local m33=m00-m22-m17-m35*m31;if m33*m33<m12 then local m34=m01-m23-m19-m35*m06;if m34*m34<m13 then return true;end;end;end; local m35=(m00-m24+m22+m17)/m31;if m35*m35<m11 then local m33=m01+m23+m19-m35*m06;if m33*m33<m13 then local m34=m02+m21+m15-m35*m07;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24+m22+m17)/m31;if m35*m35<m11 then local m33=m01+m23+m19-m35*m06;if m33*m33<m13 then local m34=m02+m21+m15-m35*m07;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24-m22+m17)/m31;if m35*m35<m11 then local m33=m01-m23+m19-m35*m06;if m33*m33<m13 then local m34=m02-m21+m15-m35*m07;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24-m22+m17)/m31;if m35*m35<m11 then local m33=m01-m23+m19-m35*m06;if m33*m33<m13 then local m34=m02-m21+m15-m35*m07;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24+m22-m17)/m31;if m35*m35<m11 then local m33=m01+m23-m19-m35*m06;if m33*m33<m13 then local m34=m02+m21-m15-m35*m07;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24+m22-m17)/m31;if m35*m35<m11 then local m33=m01+m23-m19-m35*m06;if m33*m33<m13 then local m34=m02+m21-m15-m35*m07;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24-m22-m17)/m31;if m35*m35<m11 then local m33=m01-m23-m19-m35*m06;if m33*m33<m13 then local m34=m02-m21-m15-m35*m07;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24-m22-m17)/m31;if m35*m35<m11 then local m33=m01-m23-m19-m35*m06;if m33*m33<m13 then local m34=m02-m21-m15-m35*m07;if m34*m34<m14 then return true;end;end;end; local m35=(m01-m25+m23+m19)/m06;if m35*m35<m11 then local m33=m02+m21+m15-m35*m07;if m33*m33<m14 then local m34=m00+m22+m17-m35*m31;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25+m23+m19)/m06;if m35*m35<m11 then local m33=m02+m21+m15-m35*m07;if m33*m33<m14 then local m34=m00+m22+m17-m35*m31;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25-m23+m19)/m06;if m35*m35<m11 then local m33=m02-m21+m15-m35*m07;if m33*m33<m14 then local m34=m00-m22+m17-m35*m31;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25-m23+m19)/m06;if m35*m35<m11 then local m33=m02-m21+m15-m35*m07;if m33*m33<m14 then local m34=m00-m22+m17-m35*m31;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25+m23-m19)/m06;if m35*m35<m11 then local m33=m02+m21-m15-m35*m07;if m33*m33<m14 then local m34=m00+m22-m17-m35*m31;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25+m23-m19)/m06;if m35*m35<m11 then local m33=m02+m21-m15-m35*m07;if m33*m33<m14 then local m34=m00+m22-m17-m35*m31;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25-m23-m19)/m06;if m35*m35<m11 then local m33=m02-m21-m15-m35*m07;if m33*m33<m14 then local m34=m00-m22-m17-m35*m31;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25-m23-m19)/m06;if m35*m35<m11 then local m33=m02-m21-m15-m35*m07;if m33*m33<m14 then local m34=m00-m22-m17-m35*m31;if m34*m34<m12 then return true;end;end;end; return false else return AssumeTrue end end end local setmetatable =setmetatable local components =CFrame.new().components local Workspace =Workspace local BoxCast =Workspace.FindPartsInRegion3WithIgnoreList local unpack =unpack local type =type local IsA =game.IsA local r3 =Region3.new local v3 =Vector3.new local function Region3BoundingBox(CFrame,Size) local x,y,z, xx,yx,zx, xy,yy,zy, xz,yz,zz=components(CFrame) local sx,sy,sz=Size.x/2,Size.y/2,Size.z/2 local px =sx*(xx<0 and -xx or xx) +sy*(yx<0 and -yx or yx) +sz*(zx<0 and -zx or zx) local py =sx*(xy<0 and -xy or xy) +sy*(yy<0 and -yy or yy) +sz*(zy<0 and -zy or zy) local pz =sx*(xz<0 and -xz or xz) +sy*(yz<0 and -yz or yz) +sz*(zz<0 and -zz or zz) return r3(v3(x-px,y-py,z-pz),v3(x+px,y+py,z+pz)) end local function FindAllPartsInRegion3(Region3,Ignore) local Ignore=type(Ignore)=="table" and Ignore or {Ignore} local Last=#Ignore repeat local Parts=BoxCast(Workspace,Region3,Ignore,100) local Start=#Ignore for i=1,#Parts do Ignore[Start+i]=Parts[i] end until #Parts<100; return {unpack(Ignore,Last+1,#Ignore)} end local function CastPoint(Region,Point) return BoxPointCollision(Region.CFrame,Region.Size,Point) end local function CastSphere(Region,Center,Radius) return BoxSphereCollision(Region.CFrame,Region.Size,Center,Radius) end local function CastBox(Region,CFrame,Size) return BoxCollision(Region.CFrame,Region.Size,CFrame,Size) end local function CastPart(Region,Part) local result = BoxCollision(Region.CFrame,Region.Size,Part.CFrame,Part.Size); return result; end local function CastParts(Region,Parts) local Inside={} for i=1,#Parts do if CastPart(Region,Parts[i]) then Inside[#Inside+1]=Parts[i] end end return Inside end local function Cast(Region,Ignore) local Inside={} local Parts=FindAllPartsInRegion3(Region.Region3,Ignore) for i=1,#Parts do if CastPart(Region,Parts[i]) then Inside[#Inside+1]=Parts[i] end end return Inside end local function NewRegion(CFrame,Size) local Object ={ CFrame =CFrame; Size =Size; Region3 =Region3BoundingBox(CFrame,Size); Cast =Cast; CastPart =CastPart; CastParts =CastParts; CastPoint =CastPoint; CastSphere =CastSphere; CastBox =CastBox; } return setmetatable({},{ __index=Object; __newindex=function(_,Index,Value) Object[Index]=Value Object.Region3=Region3BoundingBox(Object.CFrame,Object.Size) end; }) end Region.Region3BoundingBox =Region3BoundingBox Region.FindAllPartsInRegion3=FindAllPartsInRegion3 Region.BoxPointCollision =BoxPointCollision Region.BoxSphereCollision =BoxSphereCollision Region.BoxCollision =BoxCollision Region.new =NewRegion function Region.FromPart(Part) return NewRegion(Part.CFrame,Part.Size) end return Region
--[=[ @type ClientMiddleware {ClientMiddlewareFn} @within KnitClient An array of client middleware functions. ]=]
type ClientMiddleware = { ClientMiddlewareFn }
-- RemoteEvents
local RE_UpdateSpine = ReplicatedStorage.RemoteEvents.UpdateSpine
--[[ Local Constants ]]
-- local VR_ANGLE = math.rad(15) local VR_PANEL_SIZE = 512 local VR_ZOOM = 7 local VR_FADE_SPEED = 10 -- 1/10 second local VR_SCREEN_EGDE_BLEND_TIME = 0.14 local VR_SEAT_OFFSET = Vector3.new(0,4,0) local VRService = game:GetService("VRService") local CameraInput = require(script.Parent:WaitForChild("CameraInput")) local ZoomController = require(script.Parent:WaitForChild("ZoomController")) local Players = game:GetService("Players") local player = Players.LocalPlayer local Lighting = game:GetService("Lighting") local RunService = game:GetService("RunService") local UserGameSettings = UserSettings():GetService("UserGameSettings")
--//Server Animations
RightHighReady = CFrame.new(-1, -.5, -1.25) * CFrame.Angles(math.rad(-160), math.rad(0), math.rad(0)); LeftHighReady = CFrame.new(.85,-0.35,-1.15) * CFrame.Angles(math.rad(-170),math.rad(60),math.rad(15)); RightLowReady = CFrame.new(-1, 0.85, -1.15) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0)); LeftLowReady = CFrame.new(.95,.75,-1.35) * CFrame.Angles(math.rad(-60),math.rad(35),math.rad(-25)); RightPatrol = CFrame.new(-1, 1.5, -0.45) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(0)); LeftPatrol = CFrame.new(1,1.35,-0.75) * CFrame.Angles(math.rad(-30),math.rad(35),math.rad(-25)); RightAim = CFrame.new(-.575, 1, -.65) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)); LeftAim = CFrame.new(1.3,0.35,-1.45) * CFrame.Angles(math.rad(-120),math.rad(35),math.rad(-25)); RightSprint = CFrame.new(-1, 1.5, -0.45) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(0)); LeftSprint = CFrame.new(1,1.35,-0.75) * CFrame.Angles(math.rad(-30),math.rad(35),math.rad(-25)); ShootPos = CFrame.new(0,0,.25); } return module
--[[ Constants ]]
-- local DEFAULT_MOUSE_LOCK_CURSOR = "rbxasset://textures/MouseLockedCursor.png" local CONTEXT_ACTION_NAME = "MouseLockSwitchAction" local MOUSELOCK_ACTION_PRIORITY = Enum.ContextActionPriority.Default.Value
-- Get the valid destinations by checking their name for the string "Destination " (with a space at the end).
for index, value in pairs(mainFolder:GetChildren()) do local valueName = value.Name if string.match(valueName, "Destination ") then table.insert(destinationList, valueName) end end local sortedList = {} repeat -- Sort the list local lowestValue = {nil, math.huge} -- Table describing the index of the destination of the lowest value, followed by its value. for index, value in pairs(destinationList) do local nameSplit = string.split(destinationList[index], " ") -- Split the name to isolate its destination number local stringToNumber = tonumber(nameSplit[2]) -- Convert the destination number to an actual number if stringToNumber < lowestValue[2] then lowestValue = {index, stringToNumber} -- Overwrite the lowestValue table with the new lowest value. end end table.insert(sortedList, destinationList[lowestValue[1]]) -- Insert the lowest value into the sorted list destinationList[lowestValue[1]] = "Destination 999999" -- Don't remove the lowest value because it will end the loop early. until #sortedList == #destinationList -- Repeat until the sorted list has all the destinations.
--[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]
--
--EDIT BELOW----------------------------------------------------------------------
settings.PianoSoundRange = 75 settings.KeyAesthetics = true settings.PianoSounds = { "233836579", --C/C# "233844049", --D/D# "233845680", --E/F "233852841", --F#/G "233854135", --G#/A "233856105", --A#/B }
--[=[ Formats or errors if the cloud translations are not loaded. @param key string @param args table? @return string ]=]
function JSONTranslator:FormatByKey(key, args) assert(self ~= JSONTranslator, "Construct a new version of this class to use it") assert(type(key) == "string", "Key must be a string") if not RunService:IsRunning() then return self:_formatByKeyTestMode(key, args) end local clientTranslator = self:_getClientTranslatorOrError() local result local ok, err = pcall(function() result = clientTranslator:FormatByKey(key, args) end) if ok and not err then return result end if err then warn(err) else warn("Failed to localize '" .. key .. "'") end -- Fallback to English if clientTranslator.LocaleId ~= self._englishTranslator.LocaleId then -- Ignore results as we know this may error ok, err = pcall(function() result = self._englishTranslator:FormatByKey(key, args) end) if ok and not err then return result end end return key end function JSONTranslator:_getClientTranslatorOrError() assert(self._promiseTranslator, "ClientTranslator is not initialized") if self._promiseTranslator:IsFulfilled() then return assert(self._promiseTranslator:Wait(), "Failed to get translator") else error("Translator is not yet acquired yet") return nil end end function JSONTranslator:_formatByKeyTestMode(key, args) -- Can't read LocalizationService.ForcePlayModeRobloxLocaleId :( local translator = self._localizationTable:GetTranslator("en") local result local ok, err = pcall(function() result = translator:FormatByKey(key, args) end) if ok and not err then return result end for _, fallback in pairs(self._fallbacks) do local value = fallback:FormatByKey(key, args) if value then return value end end if err then warn(err) else warn("Failed to localize '" .. key .. "'") end return key end
-- // Assigning variables //
local DataStoreService = game:GetService("DataStoreService") local dataStore = DataStoreService:GetDataStore("HXDS") -- This can be changed to whatever you want local function saveData(player) -- The functions that saves data local tableToSave = { player.leaderstats.Points.Value; -- First value from the table player.leaderstats.Gems.Value -- Second value from the table } local success, err = pcall(function() dataStore:SetAsync(player.UserId, tableToSave) -- Save the data with the player UserId, and the table we wanna save end) if success then -- If the data has been saved print("Data has been saved!") else -- Else if the save failed print("Data hasn't been saved!") warn(err) end end game.Players.PlayerAdded:Connect(function(player) -- When a player joins the game -- // Assigning player stats // local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player local Points = Instance.new("IntValue") Points.Name = "Points" Points.Parent = leaderstats local Gems = Instance.new("IntValue") Gems.Name = "Gems" Gems.Parent = leaderstats local data -- We will define the data here so we can use it later, this data is the table we saved local success, err = pcall(function() data = dataStore:GetAsync(player.UserId) -- Get the data from the datastore end) if success and data then -- If there were no errors and player loaded the data Points.Value = data[1] -- Set the money to the first value of the table (data) Gems.Value = data[2] -- Set the coins to the second value of the table (data) else -- The player didn't load in the data, and probably is a new player print("The player has no data!") -- The default will be set to 0 end end) game.Players.PlayerRemoving:Connect(function(player) -- When a player leaves local success, err = pcall(function() saveData(player) -- Save the data end) if success then print("Data has been saved") else print("Data has not been saved!") end end) game:BindToClose(function() -- When the server shuts down for _, player in pairs(game.Players:GetPlayers()) do -- Loop through all the players local success, err = pcall(function() saveData(player) -- Save the data end) if success then print("Data has been saved") else print("Data has not been saved!") end end end)
-- change timer event
local changeTimerEvent = replicatedStorage.Events.ChangeTimer changeTimerEvent.OnServerEvent:Connect((function(player, timer) timer = tonumber(timer) if typeof(timer) ~= "number" then return end Timer = timer changeTimerEvent:FireAllClients(timer) end))
--DO NOT CHANGE ANYTHING IN THIS SCRIPT! IT WILL BREAK THE SYSTEM!!
local sound = script.Parent.Parent.Sound local muted = false script.Parent.MouseButton1Click:connect(function() if muted then sound.Volume = 0.3 muted = false script.Parent.Text = "Mute" else sound.Volume = 0 muted = true script.Parent.Text = "Unmute" end end)
--[[Susupension]]
Tune.SusEnabled = true -- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled --Front Suspension Tune.FSusDamping = 500 -- Spring Dampening Tune.FSusStiffness = 9000 -- Spring Force Tune.FSusLength = 2 -- Suspension length (in studs) Tune.FSusMaxExt = .3 -- Max Extension Travel (in studs) Tune.FSusMaxComp = .1 -- Max Compression Travel (in studs) Tune.FSusAngle = 80 -- Suspension Angle (degrees from horizontal) Tune.FWsBoneLen = 5 -- Wishbone Length Tune.FWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal) Tune.FAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -.5 , -- positive = upward --[[Forward]] 0 } -- positive = forward --Rear Suspension Tune.RSusDamping = 500 -- Spring Dampening Tune.RSusStiffness = 9000 -- Spring Force Tune.RSusLength = 2 -- Suspension length (in studs) Tune.RSusMaxExt = .3 -- Max Extension Travel (in studs) Tune.RSusMaxComp = .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 --Aesthetics Tune.SusVisible = false -- Spring Visible Tune.WsBVisible = false -- Wishbone Visible Tune.SusRadius = .2 -- Suspension Coil Radius Tune.SusThickness = .1 -- Suspension Coil Thickness Tune.SusColor = "Really black" -- Suspension Color [BrickColor] Tune.SusCoilCount = 6 -- Suspension Coil Count Tune.WsColor = "Black" -- Wishbone Color [BrickColor] Tune.WsThickness = .1 -- Wishbone Rod Thickness