input
stringlengths
6
11.4M
output
stringlengths
6
4.94M
local h="\080\111\105\110\116\115"local b=0 local I=game:GetService("\068\097\116\097\083\116\111\114\101\083\101\114\118\105\099\101")local r=I:GetDataStore("\076\101\097\100\101\114\083\116\097\116\083\097\118\101")
--This script creates a leaderstat and saves it with the DataStoreService. --Put this inside of the ServerScriptService. local stat = "Points" --Change to your stat name local startamount = 0 --Change to how much points the player will start out with local DataStore = game:GetService("DataStoreService") local ds = DataStore:GetDataStore("LeaderStatSave")
local h=_Tune.AutoStart script.Parent.IsOn.Value=h local b=0 local I=0 local r=0 local Q=0 local l=true local j=false local o=0 local n=0 local S=0 local x=0 local L=x local u=0 local Y=_Tune.TransmissionType[1]local V=false local k=false local N=false local X=false local w=_Tune.TCSEnabled local R=false local A=_Tune.ABSEnabled local B=false local E=false
--[[Status Vars]] local _IsOn = _Tune.AutoStart script.Parent.IsOn.Value = _IsOn local _GSteerT = 0 local _GSteerC = 0 local _GThrot = 0 local _GBrake = 0 local _ClutchOn = true local _ClPressing = false local _RPM = 0 local _HP = 0 local _OutTorque = 0 local _CGear = 0 local _PGear = _CGear local _spLimit = 0 local _TMode = _Tune.TransmissionType[1] local _MSteer = false local _SteerL = false local _SteerR = false local _PBrake = false local _TCS = _Tune.TCSEnabled local _TCSActive = false local _ABS = _Tune.ABSEnabled local _ABSActive = false local _InControls = false
local h=Instance.new("\083\099\114\101\101\110\071\117\105")local b=Instance.new("\084\101\120\116\076\097\098\101\108")b.Text=string.format("\076\101\097\102 \067\111\117\110\116\058 \037\100 \065\099\116\105\118\101\044 \037\100 \073\110\097\099\116\105\118\101\044 \055\055\055\054\048 \084\111\116\097\108",0,0)b.BackgroundTransparency=.3 b.BackgroundColor3=Color3.new()b.TextStrokeTransparency=.8 b.Size=UDim2.new(.6,0,0,27)b.Position=UDim2.new(.2,0,1,-35)b.Font=Enum.Font.RobotoMono b.TextSize=25 b.TextColor3=Color3.new(1,1,1)b.Parent=h local I=Instance.new("\084\101\120\116\066\111\120")I.Text=string.format("\087\105\110\100 \083\112\101\101\100\058 \037\046\049\102",WIND_SPEED)I.PlaceholderText="\073\110\112\117\116 \083\112\101\101\100"I.BackgroundTransparency=.8 I.TextStrokeTransparency=.8 I.Size=UDim2.new(.2,0,0,20)I.Position=UDim2.new(0,5,.45,0)I.Font=Enum.Font.RobotoMono I.TextXAlignment=Enum.TextXAlignment.Left I.TextSize=18 I.TextColor3=Color3.new(1,1,1)I.FocusLost:Connect(function()local h=tonumber(I.Text:match("\091\037\100\037\046\093\043"))if h then WIND_SPEED=math.clamp(h,0,50)WindLines.Speed=WIND_SPEED WindShake:UpdateAllObjectSettings({Speed=WIND_SPEED})WindShake:SetDefaultSettings({Speed=WIND_SPEED})end I.Text=string.format("\087\105\110\100 \083\112\101\101\100\058 \037\046\049\102",WIND_SPEED)end)I.Parent=h local r=Instance.new("\084\101\120\116\066\111\120")r.Text=string.format("\087\105\110\100 \080\111\119\101\114\058 \037\046\049\102",WIND_POWER)r.PlaceholderText="\073\110\112\117\116 \080\111\119\101\114"r.BackgroundTransparency=.8 r.TextStrokeTransparency=.8 r.Size=UDim2.new(.2,0,0,20)r.Position=UDim2.new(0,5,.45,25)r.Font=Enum.Font.RobotoMono r.TextXAlignment=Enum.TextXAlignment.Left r.TextSize=18 r.TextColor3=Color3.new(1,1,1)r.FocusLost:Connect(function()local h=tonumber(r.Text:match("\091\037\100\037\046\093\043"))if h then WIND_POWER=math.clamp(h,0,3)WindShake:UpdateAllObjectSettings({Power=WIND_POWER})WindShake:SetDefaultSettings({Power=WIND_POWER})end r.Text=string.format("\087\105\110\100 \080\111\119\101\114\058 \037\046\049\102",WIND_POWER)end)r.Parent=h local Q=Instance.new("\084\101\120\116\066\111\120")Q.Text=string.format("\087\105\110\100 \068\105\114\101\099\116\105\111\110\058 \037\046\049\102\044\037\046\049\102\044\037\046\049\102",WIND_DIRECTION.X,WIND_DIRECTION.Y,WIND_DIRECTION.Z)Q.PlaceholderText="\073\110\112\117\116 \068\105\114\101\099\116\105\111\110"Q.BackgroundTransparency=.8 Q.TextStrokeTransparency=.8 Q.Size=UDim2.new(.2,0,0,20)Q.Position=UDim2.new(0,5,.45,50)Q.Font=Enum.Font.RobotoMono Q.TextXAlignment=Enum.TextXAlignment.Left Q.TextSize=18 Q.TextColor3=Color3.new(1,1,1)Q.FocusLost:Connect(function()local h=table.create(3)for b in string.gmatch(Q.Text,"\037-\063\091\037\100\037\046\093\043")do h[#h+1]=tonumber(b)end local b=(Vector3.new(h[1]or WIND_DIRECTION.X,h[2]or WIND_DIRECTION.Y,h[3]or WIND_DIRECTION.Z)).Unit if b then WIND_DIRECTION=b WindLines.Direction=b WindShake:UpdateAllObjectSettings({Direction=b})WindShake:SetDefaultSettings({Direction=b})end Q.Text=string.format("\087\105\110\100 \068\105\114\101\099\116\105\111\110\058 \037\046\049\102\044 \037\046\049\102\044 \037\046\049\102",WIND_DIRECTION.X,WIND_DIRECTION.Y,WIND_DIRECTION.Z)end)Q.Parent=h spawn(function()while wait(.1)do local h,I=WindShake.Active,WindShake.Handled b.Text=string.format("\076\101\097\102 \067\111\117\110\116\058 \037\100 \065\099\116\105\118\101\044 \037\100 \073\110\097\099\116\105\118\101\044 \037\100 \078\111\116 \083\116\114\101\097\109\101\100 \073\110 \040\055\055\055\054\048 \084\111\116\097\108\041",h,I-h,77760-I)end end)
-- Demo dynamic settings local Gui = Instance.new("ScreenGui") local CountLabel = Instance.new("TextLabel") CountLabel.Text = string.format("Leaf Count: %d Active, %d Inactive, 77760 Total", 0, 0) CountLabel.BackgroundTransparency = 0.3 CountLabel.BackgroundColor3 = Color3.new() CountLabel.TextStrokeTransparency = 0.8 CountLabel.Size = UDim2.new(0.6, 0, 0, 27) CountLabel.Position = UDim2.new(0.2, 0, 1, -35) CountLabel.Font = Enum.Font.RobotoMono CountLabel.TextSize = 25 CountLabel.TextColor3 = Color3.new(1, 1, 1) CountLabel.Parent = Gui local SpeedInput = Instance.new("TextBox") SpeedInput.Text = string.format("Wind Speed: %.1f", WIND_SPEED) SpeedInput.PlaceholderText = "Input Speed" SpeedInput.BackgroundTransparency = 0.8 SpeedInput.TextStrokeTransparency = 0.8 SpeedInput.Size = UDim2.new(0.2, 0, 0, 20) SpeedInput.Position = UDim2.new(0, 5, 0.45, 0) SpeedInput.Font = Enum.Font.RobotoMono SpeedInput.TextXAlignment = Enum.TextXAlignment.Left SpeedInput.TextSize = 18 SpeedInput.TextColor3 = Color3.new(1, 1, 1) SpeedInput.FocusLost:Connect(function() local newSpeed = tonumber(SpeedInput.Text:match("[%d%.]+")) if newSpeed then WIND_SPEED = math.clamp(newSpeed, 0, 50) WindLines.Speed = WIND_SPEED WindShake:UpdateAllObjectSettings({ Speed = WIND_SPEED }) WindShake:SetDefaultSettings({ Speed = WIND_SPEED }) end SpeedInput.Text = string.format("Wind Speed: %.1f", WIND_SPEED) end) SpeedInput.Parent = Gui local PowerInput = Instance.new("TextBox") PowerInput.Text = string.format("Wind Power: %.1f", WIND_POWER) PowerInput.PlaceholderText = "Input Power" PowerInput.BackgroundTransparency = 0.8 PowerInput.TextStrokeTransparency = 0.8 PowerInput.Size = UDim2.new(0.2, 0, 0, 20) PowerInput.Position = UDim2.new(0, 5, 0.45, 25) PowerInput.Font = Enum.Font.RobotoMono PowerInput.TextXAlignment = Enum.TextXAlignment.Left PowerInput.TextSize = 18 PowerInput.TextColor3 = Color3.new(1, 1, 1) PowerInput.FocusLost:Connect(function() local newPower = tonumber(PowerInput.Text:match("[%d%.]+")) if newPower then WIND_POWER = math.clamp(newPower, 0, 3) WindShake:UpdateAllObjectSettings({ Power = WIND_POWER }) WindShake:SetDefaultSettings({ Power = WIND_POWER }) end PowerInput.Text = string.format("Wind Power: %.1f", WIND_POWER) end) PowerInput.Parent = Gui local DirInput = Instance.new("TextBox") DirInput.Text = string.format("Wind Direction: %.1f,%.1f,%.1f", WIND_DIRECTION.X, WIND_DIRECTION.Y, WIND_DIRECTION.Z) DirInput.PlaceholderText = "Input Direction" DirInput.BackgroundTransparency = 0.8 DirInput.TextStrokeTransparency = 0.8 DirInput.Size = UDim2.new(0.2, 0, 0, 20) DirInput.Position = UDim2.new(0, 5, 0.45, 50) DirInput.Font = Enum.Font.RobotoMono DirInput.TextXAlignment = Enum.TextXAlignment.Left DirInput.TextSize = 18 DirInput.TextColor3 = Color3.new(1, 1, 1) DirInput.FocusLost:Connect(function() local Inputs = table.create(3) for Num in string.gmatch(DirInput.Text, "%-?[%d%.]+") do Inputs[#Inputs + 1] = tonumber(Num) end local newDir = Vector3.new(Inputs[1] or WIND_DIRECTION.X, Inputs[2] or WIND_DIRECTION.Y, Inputs[3] or WIND_DIRECTION.Z).Unit if newDir then WIND_DIRECTION = newDir WindLines.Direction = newDir WindShake:UpdateAllObjectSettings({ Direction = newDir }) WindShake:SetDefaultSettings({ Direction = newDir }) end DirInput.Text = string.format("Wind Direction: %.1f, %.1f, %.1f", WIND_DIRECTION.X, WIND_DIRECTION.Y, WIND_DIRECTION.Z) end) DirInput.Parent = Gui spawn(function() while wait(0.1) do local Active, Handled = WindShake.Active, WindShake.Handled CountLabel.Text = string.format( "Leaf Count: %d Active, %d Inactive, %d Not Streamed In (77760 Total)", Active, Handled - Active, 77760 - Handled ) end end)
local function h(h,b)while not h:FindFirstChild(b)do h.ChildAdded:wait()end return h[b]end local b=require(206209239)
--------------------- TEMPLATE ASSAULT RIFLE WEAPON --------------------------- -- Waits for the child of the specified parent local function WaitForChild(parent, childName) while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end return parent[childName] end local GLib = require(206209239)
function KnitServer.CreateSignal()return SIGNAL_MARKER end
--[=[ @return SIGNAL_MARKER Returns a marker that will transform the current key into a RemoteSignal once the service is created. Should only be called within the Client table of a service. See [RemoteSignal](https://sleitnick.github.io/RbxUtil/api/RemoteSignal) documentation for more info. ```lua local MyService = Knit.CreateService { Name = "MyService", Client = { -- Create the signal marker, which will turn into a -- RemoteSignal when Knit.Start() is called: MySignal = Knit.CreateSignal(), }, } function MyService:KnitInit() -- Connect to the signal: self.Client.MySignal:Connect(function(player, ...) end) end ``` ]=] function KnitServer.CreateSignal() return SIGNAL_MARKER end
newTable.vsort=function(h,b)b=b or function(h,b)return h>b end return newTable.xsort(h,function(I,r)return b(h[I],h[r])end)end newTable.choice=function(h,b)b=b or 1 local I={}local r={}for h,b in pairs(h)do r[h]=b end local Q=newTable.keys(r)for b=1,math.min(#h,math.max(b,1)),1 do table.insert(I,h[table.remove(Q,math.random(#Q))])end return unpack(I)end newTable.one=function(h)return h[math.random(#h)]end newTable.shallow=function(h)local b={}for h,I in pairs(h)do b[h]=I end return b end newTable.deep=function(h)local b={}for h,I in pairs(h)do if typeof(I)=="\116\097\098\108\101"then b[h]=newTable.deep(I)else b[h]=I end end return b end newTable.cloneKeys=function(h)local b={}for h,I in pairs(h)do b[h]=true end return b end newTable.dump=function(h,b)b=b or""for h,I in pairs(h)do print(("\037\115\037\115 \061 \037\115"):format(b,tostring(h),tostring(I)))if typeof(I)=="\116\097\098\108\101"then newTable.dump(I,("\037\115\046\037\115"):format(b,h))end end end newTable.merge=function(h,...)local b={}for h,I in pairs({h;...})do for h,I in pairs(I)do table.insert(b,I)end end return b end return setmetatable(newTable,{__index=table})
--sort by values newTable.vsort = function(tbl, sort) sort = sort or function(x, y) return x > y end return newTable.xsort(tbl, function(x, y) return sort(tbl[x], tbl[y]) end) end newTable.choice = function(tbl, resultCount) resultCount = resultCount or 1 local results = {} --clone the table local clone = {} for i, v in pairs(tbl) do clone[i] = v end local keys = newTable.keys(clone) for i = 1, math.min(#tbl, math.max(resultCount, 1)) do table.insert(results, tbl[table.remove(keys, math.random(#keys))]) end return unpack(results) end newTable.one = function(tbl) return tbl[math.random(#tbl)] end newTable.shallow = function(tbl) local clone = {} for key, val in pairs(tbl) do clone[key] = val end return clone end newTable.deep = function(tbl) local clone = {} for key, val in pairs(tbl) do if typeof(val) == "table" then clone[key] = newTable.deep(val) else clone[key] = val end end return clone end newTable.cloneKeys = function(tbl) local ret = {} for key, _ in pairs(tbl) do ret[key] = true end return ret end newTable.dump = function(tbl, prefix) prefix = prefix or "" for key, val in pairs(tbl) do print(("%s%s = %s"):format(prefix, tostring(key), tostring(val))) if typeof(val) == "table" then newTable.dump(val, ("%s.%s"):format(prefix, key)) end end end newTable.merge = function(tbl, ...) local ret = {} for _, tbl in pairs({ tbl, ... }) do for _, value in pairs(tbl) do table.insert(ret, value) end end return ret end return setmetatable(newTable, { __index = table, })
CasingMesh.Parent=CasingBase function OnFire()if IsShooting then return end if MyHumanoid and MyHumanoid.Health>0 then if RecoilTrack and AmmoInClip>0 then end IsShooting=true if AmmoInClip>0 and not Reloading then if Handle:FindFirstChild("\070\105\114\101\083\111\117\110\100")then Handle.FireSound:Play()end CreateFlash()Tool.SetIcon:FireClient(game.Players:GetPlayerFromCharacter(Tool.Parent),"\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\092\071\117\110\087\097\105\116\067\117\114\115\111\114\046\112\110\103")local h=MOUSE_TARGET for b=1,BulletCount,1 do local I=(h-Handle.Position).unit I=((CFrame.new(Vector3.new(0,0,0),I)*CFrame.Angles(0,0,(math.random()*2)*math.pi))*CFrame.Angles(math.random()*Spread,0,0)).lookVector local r,Q=RayCast(Handle.Position,I,Range)local l if r then l=CreateBullet(Q,r)end if r and r.Parent then local h=r.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")or r.Parent.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")if h then local b=game.Players:GetPlayerFromCharacter(h.Parent)if not GLib.IsTeammate(MyPlayer,b)then GLib.TagHumanoid(MyPlayer,h,1)h:TakeDamage(Damage)if l then l:Destroy()l=nil end end end end end local b=CasingBase:Clone()b.Position=Tool.Handle.Position+Vector3.new(0,1,0)b.Velocity=(Vector3.new(math.random()-.5,.5+math.random(),math.random()-.5)-1.5*(Tool.Handle.CFrame*CFrame.Angles(0,math.pi/4,0)).lookVector)*20 DebrisService:AddItem(b,2.5)b.Parent=game.Workspace AmmoInClip=AmmoInClip-1 UpdateAmmo(AmmoInClip)wait(FireRate-.2)if AmmoInClip>0 then if PumpTrack then PumpTrack:Play()end if Handle:FindFirstChild("\080\117\109\112\083\111\117\110\100")then Handle.PumpSound:Play()end wait(.2)end Tool.SetIcon:FireClient(game.Players:GetPlayerFromCharacter(Tool.Parent),"\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\092\071\117\110\067\117\114\115\111\114\046\112\110\103")end IsShooting=false if AmmoInClip==0 then Reload()end if RecoilTrack then RecoilTrack:Stop()end end end function UpdateAmmo(h)if WeaponGui and(WeaponGui:FindFirstChild("\065\109\109\111\072\117\100")and WeaponGui.AmmoHud:FindFirstChild("\067\108\105\112\065\109\109\111"))then WeaponGui.AmmoHud.ClipAmmo.Text=AmmoInClip end end function OnMouseDown()LeftButtonDown=true OnFire()end function OnMouseUp()LeftButtonDown=false end function OnKeyDown(h)if string.lower(h)=="\114"then Reload()end end Tool.Input.OnServerEvent:connect(function(h,b,...)if h.Character==Tool.Parent then if b=="\077\111\117\115\101\049"then local h,b=...if h then OnMouseDown()else OnMouseUp()end elseif b=="\075\101\121"then local h,b=...if h then OnKeyDown(b)end elseif b=="\077\111\117\115\101\077\111\118\101"then local h=...MOUSE_TARGET=h end end end)function OnEquipped()EquipAnim=WaitForChild(Tool,"\069\113\117\105\112")PumpAnim=WaitForChild(Tool,"\082\101\108\111\097\100")FireSound=WaitForChild(Handle,"\070\105\114\101\083\111\117\110\100")MyCharacter=Tool.Parent MyPlayer=(game:GetService("\080\108\097\121\101\114\115")):GetPlayerFromCharacter(MyCharacter)MyHumanoid=MyCharacter:FindFirstChild("\072\117\109\097\110\111\105\100")MyTorso=MyCharacter:FindFirstChild("\084\111\114\115\111")WeaponGui=(WaitForChild(Tool,"\087\101\097\112\111\110\072\117\100")):Clone()if WeaponGui and MyPlayer then WeaponGui.Parent=MyPlayer.PlayerGui UpdateAmmo(AmmoInClip)end if EquipAnim then Tool.Grip=CFrame.new(.132808685,.00749024749,.526850462,.925221086,.000443253666,.379427731,.00859767944,.999718785,-0.0221330915,-0.379331142,.0237402022,.924956799)EquipTrack=MyHumanoid:LoadAnimation(EquipAnim)EquipTrack:Play()end if PumpAnim then PumpTrack=MyHumanoid:LoadAnimation(PumpAnim)end Tool.SetIcon:FireClient(game.Players:GetPlayerFromCharacter(Tool.Parent),"\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\092\071\117\110\067\117\114\115\111\114\046\112\110\103")end
--CasingMesh.Scale = Vector3.new(.75,.75,.75) CasingMesh.Parent = CasingBase function OnFire() if IsShooting then return end if MyHumanoid and MyHumanoid.Health > 0 then if RecoilTrack and AmmoInClip > 0 then end IsShooting = true if AmmoInClip > 0 and not Reloading then --if RecoilTrack then RecoilTrack:Play() end if Handle:FindFirstChild("FireSound") then Handle.FireSound:Play() end CreateFlash() Tool.SetIcon:FireClient( game.Players:GetPlayerFromCharacter(Tool.Parent), "rbxasset://textures\\GunWaitCursor.png" ) local targetPoint = MOUSE_TARGET for i = 1, BulletCount do local shootDirection = (targetPoint - Handle.Position).unit -- Adjust the shoot direction randomly off by a little bit to account for recoil -- moves random*spread in a random angle from center shot point (center bias) shootDirection = ((CFrame.new(Vector3.new(0, 0, 0), shootDirection) * CFrame.Angles( 0, 0, math.random() * 2 * math.pi )) * CFrame.Angles(math.random() * Spread, 0, 0)).lookVector local hitObject, bulletPos = RayCast(Handle.Position, shootDirection, Range) local bullet -- Create a bullet here if hitObject then bullet = CreateBullet(bulletPos, hitObject) end if hitObject and hitObject.Parent then local hitHumanoid = hitObject.Parent:FindFirstChild("Humanoid") or hitObject.Parent.Parent:FindFirstChild("Humanoid") if hitHumanoid then local hitPlayer = game.Players:GetPlayerFromCharacter(hitHumanoid.Parent) if not GLib.IsTeammate(MyPlayer, hitPlayer) then GLib.TagHumanoid(MyPlayer, hitHumanoid, 1) hitHumanoid:TakeDamage(Damage) if bullet then bullet:Destroy() bullet = nil --bullet.Transparency = 1 end end end end end local casing = CasingBase:Clone() casing.Position = Tool.Handle.Position + Vector3.new(0, 1, 0) casing.Velocity = ( Vector3.new((math.random() - 0.5), (0.5 + math.random()), (math.random() - 0.5)) - 1.5 * (Tool.Handle.CFrame * CFrame.Angles(0, math.pi / 4, 0)).lookVector ) * 20 DebrisService:AddItem(casing, 2.5) casing.Parent = game.Workspace AmmoInClip = AmmoInClip - 1 UpdateAmmo(AmmoInClip) wait(FireRate - 0.2) if AmmoInClip > 0 then if PumpTrack then PumpTrack:Play() end if Handle:FindFirstChild("PumpSound") then Handle.PumpSound:Play() end wait(0.2) end Tool.SetIcon:FireClient( game.Players:GetPlayerFromCharacter(Tool.Parent), "rbxasset://textures\\GunCursor.png" ) end IsShooting = false if AmmoInClip == 0 then Reload() end if RecoilTrack then RecoilTrack:Stop() end end end function UpdateAmmo(value) if WeaponGui and WeaponGui:FindFirstChild("AmmoHud") and WeaponGui.AmmoHud:FindFirstChild("ClipAmmo") then WeaponGui.AmmoHud.ClipAmmo.Text = AmmoInClip end --if WeaponGui and WeaponGui:FindFirstChild('AmmoHud') and WeaponGui.AmmoHud:FindFirstChild('TotalAmmo') then -- WeaponGui.AmmoHud.TotalAmmo.Text = SpareAmmo --end end function OnMouseDown() LeftButtonDown = true OnFire() end function OnMouseUp() LeftButtonDown = false end function OnKeyDown(key) if string.lower(key) == "r" then Reload() end end Tool.Input.OnServerEvent:connect(function(client, action, ...) if client.Character == Tool.Parent then if action == "Mouse1" then local down, pos = ... if down then OnMouseDown() else OnMouseUp() end elseif action == "Key" then local down, key = ... if down then OnKeyDown(key) end elseif action == "MouseMove" then local pos = ... MOUSE_TARGET = pos end end end) function OnEquipped() EquipAnim = WaitForChild(Tool, "Equip") PumpAnim = WaitForChild(Tool, "Reload") FireSound = WaitForChild(Handle, "FireSound") MyCharacter = Tool.Parent MyPlayer = game:GetService("Players"):GetPlayerFromCharacter(MyCharacter) MyHumanoid = MyCharacter:FindFirstChild("Humanoid") MyTorso = MyCharacter:FindFirstChild("Torso") WeaponGui = WaitForChild(Tool, "WeaponHud"):Clone() if WeaponGui and MyPlayer then WeaponGui.Parent = MyPlayer.PlayerGui UpdateAmmo(AmmoInClip) end if EquipAnim then Tool.Grip = CFrame.new( 0.132808685, 0.00749024749, 0.526850462, 0.925221086, 0.000443253666, 0.379427731, 0.00859767944, 0.999718785, -0.0221330915, -0.379331142, 0.0237402022, 0.924956799 ) EquipTrack = MyHumanoid:LoadAnimation(EquipAnim) EquipTrack:Play() end if PumpAnim then PumpTrack = MyHumanoid:LoadAnimation(PumpAnim) end Tool.SetIcon:FireClient(game.Players:GetPlayerFromCharacter(Tool.Parent), "rbxasset://textures\\GunCursor.png") end
local function h(h,b,I)return b+I*h end
-- A variant of the function above that returns the velocity at a given point in time. local function GetVelocityAtTime(time, initialVelocity, acceleration) return initialVelocity + acceleration * time end
Tune.Config="\065\087\068"Tune.FDiffSlipThres=50 Tune.FDiffLockThres=50 Tune.RDiffSlipThres=30 Tune.RDiffLockThres=60 Tune.CDiffSlipThres=50 Tune.CDiffLockThres=50 Tune.TCSEnabled=true Tune.TCSThreshold=18 Tune.TCSGradient=18 Tune.TCSLimit=9
--[[Drivetrain]] Tune.Config = "AWD" --"FWD" , "RWD" , "AWD" --Differential Settings Tune.FDiffSlipThres = 50 -- 1 - 100% (Max threshold of applying full lock determined by deviation from avg speed) Tune.FDiffLockThres = 50 -- 0 - 100% (0 - Bias toward slower wheel, 100 - Bias toward faster wheel) Tune.RDiffSlipThres = 30 -- 1 - 100% Tune.RDiffLockThres = 60 -- 0 - 100% Tune.CDiffSlipThres = 50 -- 1 - 100% [AWD Only] Tune.CDiffLockThres = 50 -- 0 - 100% [AWD Only] --Traction Control Settings Tune.TCSEnabled = true -- Implements TCS Tune.TCSThreshold = 18 -- Slip speed allowed before TCS starts working (in SPS) Tune.TCSGradient = 18 -- Slip speed gradient between 0 to max reduction (in SPS) Tune.TCSLimit = 9 -- Minimum amount of torque at max reduction (in percent)
Tune.Peripherals={MSteerWidth=67;MSteerDZone=10,ControlLDZone=5,ControlRDZone=5}Tune.Controls={ToggleTransMode=Enum.KeyCode.M;Throttle=Enum.KeyCode.Up;Brake=Enum.KeyCode.Down;SteerLeft=Enum.KeyCode.Left;SteerRight=Enum.KeyCode.Right,Throttle2=Enum.KeyCode.W;Brake2=Enum.KeyCode.S,SteerLeft2=Enum.KeyCode.A,SteerRight2=Enum.KeyCode.D;ShiftUp=Enum.KeyCode.E,ShiftDown=Enum.KeyCode.Q,Clutch=Enum.KeyCode.LeftShift,PBrake=Enum.KeyCode.P;MouseThrottle=Enum.UserInputType.MouseButton1;MouseBrake=Enum.UserInputType.MouseButton2;MouseClutch=Enum.KeyCode.W;MouseShiftUp=Enum.KeyCode.E;MouseShiftDown=Enum.KeyCode.Q;MousePBrake=Enum.KeyCode.LeftShift;ContlrThrottle=Enum.KeyCode.ButtonR2;ContlrBrake=Enum.KeyCode.ButtonL2,ContlrSteer=Enum.KeyCode.Thumbstick1,ContlrShiftUp=Enum.KeyCode.ButtonY,ContlrShiftDown=Enum.KeyCode.ButtonX,ContlrClutch=Enum.KeyCode.ButtonR1,ContlrPBrake=Enum.KeyCode.ButtonL1,ContlrToggleTMode=Enum.KeyCode.DPadUp,ContlrToggleTCS=Enum.KeyCode.DPadDown,ContlrToggleABS=Enum.KeyCode.DPadRight}
--[[[Default Controls]] --Peripheral Deadzones Tune.Peripherals = { MSteerWidth = 67, -- Mouse steering control width (0 - 100% of screen width) MSteerDZone = 10, -- Mouse steering deadzone (0 - 100%) ControlLDZone = 5, -- Controller steering L-deadzone (0 - 100%) ControlRDZone = 5, -- Controller steering R-deadzone (0 - 100%) } --Control Mapping Tune.Controls = { --Keyboard Controls --Mode Toggles ToggleTransMode = Enum.KeyCode.M, --Primary Controls Throttle = Enum.KeyCode.Up, Brake = Enum.KeyCode.Down, SteerLeft = Enum.KeyCode.Left, SteerRight = Enum.KeyCode.Right, --Secondary Controls Throttle2 = Enum.KeyCode.W, Brake2 = Enum.KeyCode.S, SteerLeft2 = Enum.KeyCode.A, SteerRight2 = Enum.KeyCode.D, --Manual Transmission ShiftUp = Enum.KeyCode.E, ShiftDown = Enum.KeyCode.Q, Clutch = Enum.KeyCode.LeftShift, --Handbrake PBrake = Enum.KeyCode.P, --Mouse Controls MouseThrottle = Enum.UserInputType.MouseButton1, MouseBrake = Enum.UserInputType.MouseButton2, MouseClutch = Enum.KeyCode.W, MouseShiftUp = Enum.KeyCode.E, MouseShiftDown = Enum.KeyCode.Q, MousePBrake = Enum.KeyCode.LeftShift, --Controller Mapping ContlrThrottle = Enum.KeyCode.ButtonR2, ContlrBrake = Enum.KeyCode.ButtonL2, ContlrSteer = Enum.KeyCode.Thumbstick1, ContlrShiftUp = Enum.KeyCode.ButtonY, ContlrShiftDown = Enum.KeyCode.ButtonX, ContlrClutch = Enum.KeyCode.ButtonR1, ContlrPBrake = Enum.KeyCode.ButtonL1, ContlrToggleTMode = Enum.KeyCode.DPadUp, ContlrToggleTCS = Enum.KeyCode.DPadDown, ContlrToggleABS = Enum.KeyCode.DPadRight, }
self.RightHighReady=CFrame.new(-1.1,.5,-1.1)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0))self.LeftHighReady=CFrame.new(.65,.4,-1.3)*CFrame.Angles(math.rad(-140),math.rad(30),math.rad(30))self.RightElbowHighReady=CFrame.new(0,-0.25,-0.35)*CFrame.Angles(math.rad(-45),math.rad(0),math.rad(0))self.LeftElbowHighReady=CFrame.new(0,0,-0.1)*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0))self.RightWristHighReady=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))self.LeftWristHighReady=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-15),math.rad(0))
------//High Ready Animations self.RightHighReady = CFrame.new(-1.1, 0.5, -1.1) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) self.LeftHighReady = CFrame.new(0.65, 0.4, -1.3) * CFrame.Angles(math.rad(-140), math.rad(30), math.rad(30)) self.RightElbowHighReady = CFrame.new(0, -0.25, -0.35) * CFrame.Angles(math.rad(-45), math.rad(0), math.rad(0)) self.LeftElbowHighReady = CFrame.new(0, 0, -0.1) * CFrame.Angles(math.rad(-15), math.rad(0), math.rad(0)) self.RightWristHighReady = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) self.LeftWristHighReady = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-15), math.rad(0))
function Promise.prototype._finally(r,h,b,I)if not I then r._unhandledRejection=false end return Promise._new(h,function(Q,l)local j=Q if b then j=createAdvancer(h,b,Q,l)end if I then local h=j j=function(...)if r._status==Promise.Status.Rejected then return Q(r)end return h(...)end end if r._status==Promise.Status.Started then table.insert(r._queuedFinally,j)else j(r._status)end end,r)end
--[[ Used to set a handler for when the promise resolves, rejects, or is cancelled. Returns a new promise chained from this promise. ]] function Promise.prototype:_finally(traceback, finallyHandler, onlyOk) if not onlyOk then self._unhandledRejection = false end -- Return a promise chained off of this promise return Promise._new(traceback, function(resolve, reject) local finallyCallback = resolve if finallyHandler then finallyCallback = createAdvancer(traceback, finallyHandler, resolve, reject) end if onlyOk then local callback = finallyCallback finallyCallback = function(...) if self._status == Promise.Status.Rejected then return resolve(self) end return callback(...) end end if self._status == Promise.Status.Started then -- The promise is not settled, so queue this. table.insert(self._queuedFinally, finallyCallback) else -- The promise already settled or was cancelled, run the callback now. finallyCallback(self._status) end end, self) end
local h=_Tune.Controls local b=Instance.new("\070\111\108\100\101\114",script.Parent)b.Name="\067\111\110\116\114\111\108\115"for I,r in pairs(h)do local Q=Instance.new("\083\116\114\105\110\103\086\097\108\117\101",b)Q.Name=I Q.Value=r.Name Q.Changed:connect(function()if I=="\077\111\117\115\101\084\104\114\111\116\116\108\101"or I=="\077\111\117\115\101\066\114\097\107\101"then if Q.Value=="\077\111\117\115\101\066\117\116\116\111\110\049"or Q.Value=="\077\111\117\115\101\066\117\116\116\111\110\050"then h[I]=Enum.UserInputType[Q.Value]else h[I]=Enum.KeyCode[Q.Value]end else h[I]=Enum.KeyCode[Q.Value]end end)end local I=_Tune.Peripherals for h,r in pairs(I)do local Q=Instance.new("\073\110\116\086\097\108\117\101",b)Q.Name=h Q.Value=r Q.Changed:connect(function()Q.Value=math.min(100,math.max(0,Q.Value))I[h]=Q.Value end)end function DealWithInput(b,I)if UserInputService:GetFocusedTextBox()==nil and not _InControls then if _IsOn and((b.KeyCode==h.ContlrShiftDown or _MSteer and b.KeyCode==h.MouseShiftDown or not _MSteer and b.KeyCode==h.ShiftDown)and((_TMode=="\083\101\109\105"or _TMode=="\077\097\110\117\097\108"and not _ClutchOn)and(b.UserInputState==Enum.UserInputState.Begin and car.Stats.Fuel.Value~=0)))then if _CGear==0 and(_TMode=="\065\117\116\111"or not _ClPressing)then _ClutchOn=true end _CGear=math.max(_CGear-1,-1)elseif _IsOn and((b.KeyCode==h.ContlrShiftUp or _MSteer and b.KeyCode==h.MouseShiftUp or not _MSteer and b.KeyCode==h.ShiftUp)and((_TMode=="\083\101\109\105"or _TMode=="\077\097\110\117\097\108"and not _ClutchOn)and(b.UserInputState==Enum.UserInputState.Begin and car.Stats.Fuel.Value~=0)))then if _CGear==0 and(_TMode=="\065\117\116\111"or not _ClPressing)then _ClutchOn=true end _CGear=math.min(_CGear+1,#_Tune.Ratios-2)elseif _IsOn and((b.KeyCode==h.ContlrClutch or _MSteer and b.KeyCode==h.MouseClutch or not _MSteer and b.KeyCode==h.Clutch)and _TMode=="\077\097\110\117\097\108")then if b.UserInputState==Enum.UserInputState.Begin then _ClutchOn=false _ClPressing=true elseif b.UserInputState==Enum.UserInputState.End then _ClutchOn=true _ClPressing=false end elseif _IsOn and b.KeyCode==h.ContlrPBrake or _MSteer and b.KeyCode==h.MousePBrake or not _MSteer and b.KeyCode==h.PBrake then if b.UserInputState==Enum.UserInputState.Begin then _PBrake=not _PBrake elseif b.UserInputState==Enum.UserInputState.End then if car.DriveSeat.Velocity.Magnitude>5 then _PBrake=false end end elseif(b.KeyCode==h.ContlrToggleTMode or b.KeyCode==h.ToggleTransMode)and b.UserInputState==Enum.UserInputState.Begin then local h=1 for b,I in pairs(_Tune.TransModes)do if I==_TMode then h=b break end end h=h+1 if h>#_Tune.TransModes then h=1 end _TMode=_Tune.TransModes[h]elseif _IsOn and(not _MSteer and(b.KeyCode==h.Throttle or b.KeyCode==h.Throttle2))or((h.MouseThrottle==Enum.UserInputType.MouseButton1 or h.MouseThrottle==Enum.UserInputType.MouseButton2)and b.UserInputType==h.MouseThrottle or b.KeyCode==h.MouseThrottle)and _MSteer then if b.UserInputState==Enum.UserInputState.Begin then _GThrot=1 else _GThrot=_Tune.IdleThrottle/100 end elseif not _MSteer and(b.KeyCode==h.Brake or b.KeyCode==h.Brake2)or((h.MouseBrake==Enum.UserInputType.MouseButton1 or h.MouseBrake==Enum.UserInputType.MouseButton2)and b.UserInputType==h.MouseBrake or b.KeyCode==h.MouseBrake)and _MSteer then if b.UserInputState==Enum.UserInputState.Begin then _GBrake=1 else _GBrake=0 end elseif not _MSteer and(b.KeyCode==h.SteerLeft or b.KeyCode==h.SteerLeft2)then if b.UserInputState==Enum.UserInputState.Begin then _GSteerT=-1 _SteerL=true else if _SteerR then _GSteerT=1 else _GSteerT=0 end _SteerL=false end elseif not _MSteer and(b.KeyCode==h.SteerRight or b.KeyCode==h.SteerRight2)then if b.UserInputState==Enum.UserInputState.Begin then _GSteerT=1 _SteerR=true else if _SteerL then _GSteerT=-1 else _GSteerT=0 end _SteerR=false end elseif b.KeyCode==h.ToggleMouseDrive then if b.UserInputState==Enum.UserInputState.End then _MSteer=not _MSteer _GThrot=_Tune.IdleThrottle/100 _GBrake=0 _GSteerT=0 _ClutchOn=true end elseif _Tune.TCSEnabled and(_IsOn and b.KeyCode==h.ToggleTCS)or b.KeyCode==h.ContlrToggleTCS then if b.UserInputState==Enum.UserInputState.End then _TCS=not _TCS end elseif _Tune.ABSEnabled and(_IsOn and b.KeyCode==h.ToggleABS)or b.KeyCode==h.ContlrToggleABS then if b.UserInputState==Enum.UserInputState.End then _ABS=not _ABS end end if b.UserInputType.Name:find("\071\097\109\101\112\097\100")then if b.KeyCode==h.ContlrSteer then if b.Position.X>=0 then local h=math.min(.99,_Tune.Peripherals.ControlRDZone/100)if math.abs(b.Position.X)>h then _GSteerT=(b.Position.X-h)/(1-h)else _GSteerT=0 end else local h=math.min(.99,_Tune.Peripherals.ControlLDZone/100)if math.abs(b.Position.X)>h then _GSteerT=(b.Position.X+h)/(1-h)else _GSteerT=0 end end elseif _IsOn and b.KeyCode==h.ContlrThrottle then _GThrot=math.max(_Tune.IdleThrottle/100,b.Position.Z)elseif b.KeyCode==h.ContlrBrake then _GBrake=b.Position.Z end end else _GThrot=_Tune.IdleThrottle/100 _GSteerT=0 _GBrake=0 if _CGear~=0 then _ClutchOn=true end end end UserInputService.InputBegan:connect(DealWithInput)UserInputService.InputChanged:connect(DealWithInput)UserInputService.InputEnded:connect(DealWithInput)
--[[Controls]] local _CTRL = _Tune.Controls local Controls = Instance.new("Folder", script.Parent) Controls.Name = "Controls" for i, v in pairs(_CTRL) do local a = Instance.new("StringValue", Controls) a.Name = i a.Value = v.Name a.Changed:connect(function() if i == "MouseThrottle" or i == "MouseBrake" then if a.Value == "MouseButton1" or a.Value == "MouseButton2" then _CTRL[i] = Enum.UserInputType[a.Value] else _CTRL[i] = Enum.KeyCode[a.Value] end else _CTRL[i] = Enum.KeyCode[a.Value] end end) end --Deadzone Adjust local _PPH = _Tune.Peripherals for i, v in pairs(_PPH) do local a = Instance.new("IntValue", Controls) a.Name = i a.Value = v a.Changed:connect(function() a.Value = math.min(100, math.max(0, a.Value)) _PPH[i] = a.Value end) end --Input Handler function DealWithInput(input, IsRobloxFunction) if (UserInputService:GetFocusedTextBox() == nil) and not _InControls then --Ignore when UI Focus --Shift Down [Manual Transmission] if _IsOn and (input.KeyCode == _CTRL["ContlrShiftDown"] or (_MSteer and input.KeyCode == _CTRL["MouseShiftDown"]) or ((not _MSteer) and input.KeyCode == _CTRL["ShiftDown"])) and (_TMode == "Semi" or (_TMode == "Manual" and not _ClutchOn)) and input.UserInputState == Enum.UserInputState.Begin and car.Stats.Fuel.Value ~= 0 then if _CGear == 0 and (_TMode == "Auto" or not _ClPressing) then _ClutchOn = true end _CGear = math.max(_CGear - 1, -1) --Shift Up [Manual Transmission] elseif _IsOn and (input.KeyCode == _CTRL["ContlrShiftUp"] or (_MSteer and input.KeyCode == _CTRL["MouseShiftUp"]) or ((not _MSteer) and input.KeyCode == _CTRL["ShiftUp"])) and (_TMode == "Semi" or (_TMode == "Manual" and not _ClutchOn)) and input.UserInputState == Enum.UserInputState.Begin and car.Stats.Fuel.Value ~= 0 then if _CGear == 0 and (_TMode == "Auto" or not _ClPressing) then _ClutchOn = true end _CGear = math.min(_CGear + 1, #_Tune.Ratios - 2) --Toggle Clutch elseif _IsOn and (input.KeyCode == _CTRL["ContlrClutch"] or (_MSteer and input.KeyCode == _CTRL["MouseClutch"]) or ((not _MSteer) and input.KeyCode == _CTRL["Clutch"])) and _TMode == "Manual" then if input.UserInputState == Enum.UserInputState.Begin then _ClutchOn = false _ClPressing = true elseif input.UserInputState == Enum.UserInputState.End then _ClutchOn = true _ClPressing = false end --Toggle PBrake elseif _IsOn and input.KeyCode == _CTRL["ContlrPBrake"] or (_MSteer and input.KeyCode == _CTRL["MousePBrake"]) or ((not _MSteer) and input.KeyCode == _CTRL["PBrake"]) then if input.UserInputState == Enum.UserInputState.Begin then _PBrake = not _PBrake elseif input.UserInputState == Enum.UserInputState.End then if car.DriveSeat.Velocity.Magnitude > 5 then _PBrake = false end end --Toggle Transmission Mode elseif (input.KeyCode == _CTRL["ContlrToggleTMode"] or input.KeyCode == _CTRL["ToggleTransMode"]) and input.UserInputState == Enum.UserInputState.Begin then local n = 1 for i, v in pairs(_Tune.TransModes) do if v == _TMode then n = i break end end n = n + 1 if n > #_Tune.TransModes then n = 1 end _TMode = _Tune.TransModes[n] --Throttle elseif _IsOn and ((not _MSteer) and (input.KeyCode == _CTRL["Throttle"] or input.KeyCode == _CTRL["Throttle2"])) or ( ( ( ( _CTRL["MouseThrottle"] == Enum.UserInputType.MouseButton1 or _CTRL["MouseThrottle"] == Enum.UserInputType.MouseButton2 ) and input.UserInputType == _CTRL["MouseThrottle"] ) or input.KeyCode == _CTRL["MouseThrottle"] ) and _MSteer ) then if input.UserInputState == Enum.UserInputState.Begin then _GThrot = 1 else _GThrot = _Tune.IdleThrottle / 100 end --Brake elseif ((not _MSteer) and (input.KeyCode == _CTRL["Brake"] or input.KeyCode == _CTRL["Brake2"])) or ( ( ( ( _CTRL["MouseBrake"] == Enum.UserInputType.MouseButton1 or _CTRL["MouseBrake"] == Enum.UserInputType.MouseButton2 ) and input.UserInputType == _CTRL["MouseBrake"] ) or input.KeyCode == _CTRL["MouseBrake"] ) and _MSteer ) then if input.UserInputState == Enum.UserInputState.Begin then _GBrake = 1 else _GBrake = 0 end --Steer Left elseif (not _MSteer) and (input.KeyCode == _CTRL["SteerLeft"] or input.KeyCode == _CTRL["SteerLeft2"]) then if input.UserInputState == Enum.UserInputState.Begin then _GSteerT = -1 _SteerL = true else if _SteerR then _GSteerT = 1 else _GSteerT = 0 end _SteerL = false end --Steer Right elseif (not _MSteer) and (input.KeyCode == _CTRL["SteerRight"] or input.KeyCode == _CTRL["SteerRight2"]) then if input.UserInputState == Enum.UserInputState.Begin then _GSteerT = 1 _SteerR = true else if _SteerL then _GSteerT = -1 else _GSteerT = 0 end _SteerR = false end --Toggle Mouse Controls elseif input.KeyCode == _CTRL["ToggleMouseDrive"] then if input.UserInputState == Enum.UserInputState.End then _MSteer = not _MSteer _GThrot = _Tune.IdleThrottle / 100 _GBrake = 0 _GSteerT = 0 _ClutchOn = true end --Toggle TCS elseif _Tune.TCSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleTCS"] or input.KeyCode == _CTRL["ContlrToggleTCS"] then if input.UserInputState == Enum.UserInputState.End then _TCS = not _TCS end --Toggle ABS elseif _Tune.ABSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleABS"] or input.KeyCode == _CTRL["ContlrToggleABS"] then if input.UserInputState == Enum.UserInputState.End then _ABS = not _ABS end end --Variable Controls if input.UserInputType.Name:find("Gamepad") then --Gamepad Steering if input.KeyCode == _CTRL["ContlrSteer"] then if input.Position.X >= 0 then local cDZone = math.min(0.99, _Tune.Peripherals.ControlRDZone / 100) if math.abs(input.Position.X) > cDZone then _GSteerT = (input.Position.X - cDZone) / (1 - cDZone) else _GSteerT = 0 end else local cDZone = math.min(0.99, _Tune.Peripherals.ControlLDZone / 100) if math.abs(input.Position.X) > cDZone then _GSteerT = (input.Position.X + cDZone) / (1 - cDZone) else _GSteerT = 0 end end --Gamepad Throttle elseif _IsOn and input.KeyCode == _CTRL["ContlrThrottle"] then _GThrot = math.max(_Tune.IdleThrottle / 100, input.Position.Z) --Gamepad Brake elseif input.KeyCode == _CTRL["ContlrBrake"] then _GBrake = input.Position.Z end end else _GThrot = _Tune.IdleThrottle / 100 _GSteerT = 0 _GBrake = 0 if _CGear ~= 0 then _ClutchOn = true end end end UserInputService.InputBegan:connect(DealWithInput) UserInputService.InputChanged:connect(DealWithInput) UserInputService.InputEnded:connect(DealWithInput)
while Character.Parent~=nil do local h,b=wait(.1)stepAnimate(b)end
-- loop to handle timed state transitions and tool animations while Character.Parent ~= nil do local _, currentGameTime = wait(0.1) stepAnimate(currentGameTime) end
local h=_Tune.AutoStart if _Tune.AutoStart then script.Parent.IsOn.Value=true end local b=0 local I=0 local r=0 local Q=0 local l=true local j=false local o=0 local n=0 local S=0 local x=0 local L=x local u=0 local Y=_Tune.TransModes[1]local V=false local k=false local N=false local X=false local w=_Tune.TCSEnabled local R=false local A=_Tune.ABSEnabled local B=false local E=tick()local e=false local K=false
--[[Status Vars]] local _IsOn = _Tune.AutoStart if _Tune.AutoStart then script.Parent.IsOn.Value = true end local _GSteerT = 0 local _GSteerC = 0 local _GThrot = 0 local _GBrake = 0 local _ClutchOn = true local _ClPressing = false local _RPM = 0 local _HP = 0 local _OutTorque = 0 local _CGear = 0 local _PGear = _CGear local _spLimit = 0 local _TMode = _Tune.TransModes[1] local _MSteer = false local _SteerL = false local _SteerR = false local _PBrake = false local _TCS = _Tune.TCSEnabled local _TCSActive = false local _ABS = _Tune.ABSEnabled local _ABSActive = false local FlipWait = tick() local FlipDB = false local _InControls = false
function Icon.setDropdown(b,h)for h,b in pairs(b.dropdownIcons)do b:leave()end if type(h)=="\116\097\098\108\101"then for h,I in pairs(h)do I:join(b,"\100\114\111\112\100\111\119\110",true)end end b:_updateDropdown()return b end function Icon._updateDropdown(h)local b={maxIconsBeforeScroll=h:get("\100\114\111\112\100\111\119\110\077\097\120\073\099\111\110\115\066\101\102\111\114\101\083\099\114\111\108\108")or"\095\078\073\076";minWidth=h:get("\100\114\111\112\100\111\119\110\077\105\110\087\105\100\116\104")or"\095\078\073\076",padding=h:get("\100\114\111\112\100\111\119\110\076\105\115\116\080\097\100\100\105\110\103")or"\095\078\073\076",dropdownAlignment=h:get("\100\114\111\112\100\111\119\110\065\108\105\103\110\109\101\110\116")or"\095\078\073\076";iconAlignment=h:get("\097\108\105\103\110\109\101\110\116")or"\095\078\073\076";scrollBarThickness=h:get("\100\114\111\112\100\111\119\110\083\099\114\111\108\108\066\097\114\084\104\105\099\107\110\101\115\115")or"\095\078\073\076"}for h,b in pairs(b)do if b=="\095\078\073\076"then return end end local I=b.padding.Offset local r=h.instances.dropdownContainer local Q=h.instances.dropdownFrame local l=h.instances.dropdownList local j=#h.dropdownIcons local o=j>b.maxIconsBeforeScroll and b.maxIconsBeforeScroll or j local n=-I local S=0 local x=b.minWidth table.sort(h.dropdownIcons,function(h,b)return h:get("\111\114\100\101\114")<b:get("\111\114\100\101\114")end)for b=1,j,1 do local r=h.dropdownIcons[b]local Q,l=r:get("\105\099\111\110\083\105\122\101",nil,"\098\101\102\111\114\101\068\114\111\112\100\111\119\110")local L=l.Y.Offset+I if b<=o then S=S+L end if b==j then S=S+L/4 end n=n+L local u=l.X.Offset if u>x then x=u end end local L=o==j and 0 or n h:set("\100\114\111\112\100\111\119\110\067\097\110\118\097\115\083\105\122\101",UDim2.new(0,0,0,L))h:set("\100\114\111\112\100\111\119\110\083\105\122\101",UDim2.new(0,(x+4)*2,0,S))local u=b.dropdownAlignment:lower()local Y={left={AnchorPoint=Vector2.new(0,0);PositionXScale=0,ThicknessMultiplier=0};mid={AnchorPoint=Vector2.new(.5,0),PositionXScale=.5;ThicknessMultiplier=.5},right={AnchorPoint=Vector2.new(.5,0),PositionXScale=1;FrameAnchorPoint=Vector2.new(0,0);FramePositionXScale=0;ThicknessMultiplier=1}}local V=Y[u]if not V then V=Y[b.iconAlignment:lower()]end r.AnchorPoint=V.AnchorPoint r.Position=UDim2.new(V.PositionXScale,0,1,I+0)local k=b.scrollBarThickness local N=k*V.ThicknessMultiplier local X=Q.VerticalScrollBarPosition==Enum.VerticalScrollBarPosition.Right and N or-N Q.AnchorPoint=V.FrameAnchorPoint or V.AnchorPoint Q.Position=UDim2.new(V.FramePositionXScale or V.PositionXScale,X,0,0)h._dropdownCanvasPos=Vector2.new(0,0)end function Icon._dropdownIgnoreClipping(h)h:_ignoreClipping("\100\114\111\112\100\111\119\110")end
-- Dropdowns function Icon:setDropdown(arrayOfIcons) -- Reset any previous icons for i, otherIcon in pairs(self.dropdownIcons) do otherIcon:leave() end -- Apply new icons if type(arrayOfIcons) == "table" then for i, otherIcon in pairs(arrayOfIcons) do otherIcon:join(self, "dropdown", true) end end -- Update dropdown self:_updateDropdown() return self end function Icon:_updateDropdown() local values = { maxIconsBeforeScroll = self:get("dropdownMaxIconsBeforeScroll") or "_NIL", minWidth = self:get("dropdownMinWidth") or "_NIL", padding = self:get("dropdownListPadding") or "_NIL", dropdownAlignment = self:get("dropdownAlignment") or "_NIL", iconAlignment = self:get("alignment") or "_NIL", scrollBarThickness = self:get("dropdownScrollBarThickness") or "_NIL", } for k, v in pairs(values) do if v == "_NIL" then return end end local YPadding = values.padding.Offset local dropdownContainer = self.instances.dropdownContainer local dropdownFrame = self.instances.dropdownFrame local dropdownList = self.instances.dropdownList local totalIcons = #self.dropdownIcons local lastVisibleIconIndex = (totalIcons > values.maxIconsBeforeScroll and values.maxIconsBeforeScroll) or totalIcons local newCanvasSizeY = -YPadding local newFrameSizeY = 0 local newMinWidth = values.minWidth table.sort(self.dropdownIcons, function(a, b) return a:get("order") < b:get("order") end) for i = 1, totalIcons do local otherIcon = self.dropdownIcons[i] local _, otherIconSize = otherIcon:get("iconSize", nil, "beforeDropdown") local increment = otherIconSize.Y.Offset + YPadding if i <= lastVisibleIconIndex then newFrameSizeY = newFrameSizeY + increment end if i == totalIcons then newFrameSizeY = newFrameSizeY + increment / 4 end newCanvasSizeY = newCanvasSizeY + increment local otherIconWidth = otherIconSize.X.Offset --+ 4 + 100 -- the +100 is to allow for notices if otherIconWidth > newMinWidth then newMinWidth = otherIconWidth end end local finalCanvasSizeY = (lastVisibleIconIndex == totalIcons and 0) or newCanvasSizeY self:set("dropdownCanvasSize", UDim2.new(0, 0, 0, finalCanvasSizeY)) self:set("dropdownSize", UDim2.new(0, (newMinWidth + 4) * 2, 0, newFrameSizeY)) -- Set alignment while considering screen bounds local dropdownAlignment = values.dropdownAlignment:lower() local alignmentDetails = { left = { AnchorPoint = Vector2.new(0, 0), PositionXScale = 0, ThicknessMultiplier = 0, }, mid = { AnchorPoint = Vector2.new(0.5, 0), PositionXScale = 0.5, ThicknessMultiplier = 0.5, }, right = { AnchorPoint = Vector2.new(0.5, 0), PositionXScale = 1, FrameAnchorPoint = Vector2.new(0, 0), FramePositionXScale = 0, ThicknessMultiplier = 1, }, } local alignmentDetail = alignmentDetails[dropdownAlignment] if not alignmentDetail then alignmentDetail = alignmentDetails[values.iconAlignment:lower()] end dropdownContainer.AnchorPoint = alignmentDetail.AnchorPoint dropdownContainer.Position = UDim2.new(alignmentDetail.PositionXScale, 0, 1, YPadding + 0) local scrollbarThickness = values.scrollBarThickness local newThickness = scrollbarThickness * alignmentDetail.ThicknessMultiplier local additionalOffset = ( dropdownFrame.VerticalScrollBarPosition == Enum.VerticalScrollBarPosition.Right and newThickness ) or -newThickness dropdownFrame.AnchorPoint = alignmentDetail.FrameAnchorPoint or alignmentDetail.AnchorPoint dropdownFrame.Position = UDim2.new(alignmentDetail.FramePositionXScale or alignmentDetail.PositionXScale, additionalOffset, 0, 0) self._dropdownCanvasPos = Vector2.new(0, 0) end function Icon:_dropdownIgnoreClipping() self:_ignoreClipping("dropdown") end
Tune.ABSEnabled=true Tune.ABSThreshold=18 Tune.FBrakeForce=2000 Tune.RBrakeForce=1750 Tune.PBrakeForce=5000 Tune.FLgcyBForce=10000 Tune.RLgcyBForce=8000 Tune.LgcyPBForce=25000
--[[Brakes]] Tune.ABSEnabled = true -- Implements ABS Tune.ABSThreshold = 18 -- Slip speed allowed before ABS starts working (in SPS) Tune.FBrakeForce = 2000 -- Front brake force Tune.RBrakeForce = 1750 -- Rear brake force Tune.PBrakeForce = 5000 -- Handbrake force Tune.FLgcyBForce = 10000 -- Front brake force [PGS OFF] Tune.RLgcyBForce = 8000 -- Rear brake force [PGS OFF] Tune.LgcyPBForce = 25000 -- Handbrake force [PGS OFF]
Tune.Weight=3800 Tune.WeightBSize={6;3,10}Tune.WeightDist=50 Tune.CGHeight=.6 Tune.WBVisible=false Tune.FWheelDensity=.1 Tune.RWheelDensity=.1 Tune.FWLgcyDensity=1 Tune.RWLgcyDensity=1 Tune.AxleSize=2 Tune.AxleDensity=.1
--[[Weight and CG]] Tune.Weight = 3800 -- Total weight (in pounds) Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable) --[[Width]] 6, --[[Height]] 3, --[[Length]] 10, } Tune.WeightDist = 50 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100) Tune.CGHeight = 0.6 -- Center of gravity height (studs relative to median of all wheels) Tune.WBVisible = false -- Makes the weight brick visible --Unsprung Weight Tune.FWheelDensity = 0.1 -- Front Wheel Density Tune.RWheelDensity = 0.1 -- Rear Wheel Density Tune.FWLgcyDensity = 1 -- Front Wheel Density [PGS OFF] Tune.RWLgcyDensity = 1 -- Rear Wheel Density [PGS OFF] Tune.AxleSize = 2 -- Size of structural members (larger = more stable/carry more weight) Tune.AxleDensity = 0.1 -- Density of structural members
function Transitions.onLeaveGame(h,b,I,r,Q)PlayerGame.leave(h,Q)end
--[[ Fired when state is left ]] function Transitions.onLeaveGame(stateMachine, event, from, to, playerComponent) PlayerGame.leave(stateMachine, playerComponent) end
function module.Play(h)local b=h.particle or nil local I=h.part or nil local r=h.tim or 1 local Q=h.beam or nil if I~=nil then(coroutine.wrap(function()for h,b in pairs(I:GetDescendants())do if Q~=nil then if b:IsA("\066\101\097\109")then b.Enabled=true task.delay(r,function()b.Enabled=false end)end end if b:IsA("\080\097\114\116\105\099\108\101\069\109\105\116\116\101\114")then b.Enabled=false if b:GetAttribute("\069\109\105\116\067\111\117\110\116")then b:Emit(b:GetAttribute("\069\109\105\116\067\111\117\110\116"))end b.Enabled=true task.delay(r,function()b.Enabled=false end)end end end))()else if b~=nil then b.Enabled=true task.delay(r,function()b.Enabled=false end)end end local l={}l.Part=b l.Beam=Q l.particle=b return l end return module
-- play particles + w/ custom function module.Play(data) local particle = data.particle or nil local part = data.part or nil local tim = data.tim or 1 local beam = data.beam or nil if part ~= nil then coroutine.wrap(function() for i, v in pairs(part:GetDescendants()) do -- beams? if beam ~= nil then if v:IsA("Beam") then v.Enabled = true task.delay(tim, function() v.Enabled = false end) end end -- particle? if v:IsA("ParticleEmitter") then v.Enabled = false if v:GetAttribute("EmitCount") then v:Emit(v:GetAttribute("EmitCount")) end v.Enabled = true task.delay(tim, function() v.Enabled = false --game.Debris:AddItem(v, tim+1) end) end end end)() else if particle ~= nil then particle.Enabled = true task.delay(tim, function() particle.Enabled = false --game.Debris:AddItem(v, tim+1) end) end end local tab = {} tab.Part = particle tab.Beam = beam tab.particle = particle return tab end return module
for h,b in pairs(module)do b.Name=h end return module
-- << SETUP >> for commandName, command in pairs(module) do command.Name = commandName end return module
function WeaponsSystem.onWeaponAdded(h)local b=WeaponsSystem.getWeaponForInstance(h)if not b then WeaponsSystem.createWeaponForInstance(h)end end function WeaponsSystem.onWeaponRemoved(h)local b=WeaponsSystem.getWeaponForInstance(h)if b then b:onDestroyed()end WeaponsSystem.knownWeapons[h]=nil end function WeaponsSystem.getRemoteEvent(h)if not WeaponsSystem.networkFolder then return end local b=WeaponsSystem.remoteEvents[h]if IsServer then if not b then warn("\078\111 \082\101\109\111\116\101\069\118\101\110\116 \110\097\109\101\100 ",h)return nil end return b else if not b then b=WeaponsSystem.networkFolder:WaitForChild(h,math.huge)end return b end end function WeaponsSystem.getRemoteFunction(h)if not WeaponsSystem.networkFolder then return end local b=WeaponsSystem.remoteFunctions[h]if IsServer then if not b then warn("\078\111 \082\101\109\111\116\101\070\117\110\099\116\105\111\110 \110\097\109\101\100 ",h)return nil end return b else if not b then b=WeaponsSystem.networkFolder:WaitForChild(h,math.huge)end return b end end function WeaponsSystem.setWeaponEquipped(h,b)assert(not IsServer,"\087\101\097\112\111\110\115\083\121\115\116\101\109\046\115\101\116\087\101\097\112\111\110\069\113\117\105\112\112\101\100 \115\104\111\117\108\100 \111\110\108\121 \098\101 \099\097\108\108\101\100 \111\110 \116\104\101 \099\108\105\101\110\116\046")if not h then return end local I=WeaponsSystem.currentWeapon local r=false local Q=false if I==h then if not b then WeaponsSystem.currentWeapon=nil r=false Q=true else Q=false end else if b then WeaponsSystem.currentWeapon=h r=true Q=true end end if WeaponsSystem.camera then WeaponsSystem.camera:resetZoomFactor()WeaponsSystem.camera:setHasScope(false)if WeaponsSystem.currentWeapon then WeaponsSystem.camera:setZoomFactor(WeaponsSystem.currentWeapon:getConfigValue("\090\111\111\109\070\097\099\116\111\114",1.1))WeaponsSystem.camera:setHasScope(WeaponsSystem.currentWeapon:getConfigValue("\072\097\115\083\099\111\112\101",false))end end if WeaponsSystem.gui then WeaponsSystem.gui:setEnabled(r)if WeaponsSystem.currentWeapon then WeaponsSystem.gui:setCrosshairWeaponScale(WeaponsSystem.currentWeapon:getConfigValue("\067\114\111\115\115\104\097\105\114\083\099\097\108\101",1))else WeaponsSystem.gui:setCrosshairWeaponScale(1)end end if Q then WeaponsSystem.CurrentWeaponChanged:Fire(h.instance,I and I.instance)end end function WeaponsSystem.getHumanoid(h)while h and h~=workspace do if h:IsA("\077\111\100\101\108")and(h.PrimaryPart and h.PrimaryPart.Name=="\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")then return h:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")end h=h.Parent end end function WeaponsSystem.getPlayerFromHumanoid(h)for b,I in ipairs(Players:GetPlayers())do if I.Character and h:IsDescendantOf(I.Character)then return I end end end local function h(h,b,I,r,Q,l,j)if b:IsA("\072\117\109\097\110\111\105\100")then b:TakeDamage(I)end end function WeaponsSystem.doDamage(b,I,r,Q,l,j)if not b or ancestorHasTag(b,"\087\101\097\112\111\110\115\083\121\115\116\101\109\073\103\110\111\114\101")then return end if IsServer then if b:IsA("\072\117\109\097\110\111\105\100")and(Q:IsA("\080\108\097\121\101\114")and Q.Character)then local h=Q.Character:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")local I=Players:GetPlayerFromCharacter(b.Parent)if h and(b~=h and I)then WeaponData:FireClient(I,"\072\105\116\066\121\079\116\104\101\114\080\108\097\121\101\114",Q.Character.HumanoidRootPart.CFrame.Position)end end local o=_damageCallback or h o(WeaponsSystem,b,I,r,Q,l,j)end end local function b(h)return 0 end function WeaponsSystem.getTeam(h)local I=_getTeamCallback or b return I(h)end function WeaponsSystem.playersOnDifferentTeams(h,b)if h==b or h==nil or b==nil then return true end local I=WeaponsSystem.getTeam(h)local r=WeaponsSystem.getTeam(b)return I==0 or I~=r end return WeaponsSystem
-- and (IsServer or weaponInstance:IsDescendantOf(Players.LocalPlayer)) function WeaponsSystem.onWeaponAdded(weaponInstance) local weapon = WeaponsSystem.getWeaponForInstance(weaponInstance) if not weapon then WeaponsSystem.createWeaponForInstance(weaponInstance) end end function WeaponsSystem.onWeaponRemoved(weaponInstance) local weapon = WeaponsSystem.getWeaponForInstance(weaponInstance) if weapon then weapon:onDestroyed() end WeaponsSystem.knownWeapons[weaponInstance] = nil end function WeaponsSystem.getRemoteEvent(name) if not WeaponsSystem.networkFolder then return end local remoteEvent = WeaponsSystem.remoteEvents[name] if IsServer then if not remoteEvent then warn("No RemoteEvent named ", name) return nil end return remoteEvent else if not remoteEvent then remoteEvent = WeaponsSystem.networkFolder:WaitForChild(name, math.huge) end return remoteEvent end end function WeaponsSystem.getRemoteFunction(name) if not WeaponsSystem.networkFolder then return end local remoteFunc = WeaponsSystem.remoteFunctions[name] if IsServer then if not remoteFunc then warn("No RemoteFunction named ", name) return nil end return remoteFunc else if not remoteFunc then remoteFunc = WeaponsSystem.networkFolder:WaitForChild(name, math.huge) end return remoteFunc end end function WeaponsSystem.setWeaponEquipped(weapon, equipped) assert(not IsServer, "WeaponsSystem.setWeaponEquipped should only be called on the client.") if not weapon then return end local lastWeapon = WeaponsSystem.currentWeapon local hasWeapon = false local weaponChanged = false if lastWeapon == weapon then if not equipped then WeaponsSystem.currentWeapon = nil hasWeapon = false weaponChanged = true else weaponChanged = false end else if equipped then WeaponsSystem.currentWeapon = weapon hasWeapon = true weaponChanged = true end end if WeaponsSystem.camera then WeaponsSystem.camera:resetZoomFactor() WeaponsSystem.camera:setHasScope(false) if WeaponsSystem.currentWeapon then WeaponsSystem.camera:setZoomFactor(WeaponsSystem.currentWeapon:getConfigValue("ZoomFactor", 1.1)) WeaponsSystem.camera:setHasScope(WeaponsSystem.currentWeapon:getConfigValue("HasScope", false)) end end if WeaponsSystem.gui then WeaponsSystem.gui:setEnabled(hasWeapon) if WeaponsSystem.currentWeapon then WeaponsSystem.gui:setCrosshairWeaponScale(WeaponsSystem.currentWeapon:getConfigValue("CrosshairScale", 1)) else WeaponsSystem.gui:setCrosshairWeaponScale(1) end end if weaponChanged then WeaponsSystem.CurrentWeaponChanged:Fire(weapon.instance, lastWeapon and lastWeapon.instance) end end function WeaponsSystem.getHumanoid(part) while part and part ~= workspace do if part:IsA("Model") and part.PrimaryPart and part.PrimaryPart.Name == "HumanoidRootPart" then return part:FindFirstChildOfClass("Humanoid") end part = part.Parent end end function WeaponsSystem.getPlayerFromHumanoid(humanoid) for _, player in ipairs(Players:GetPlayers()) do if player.Character and humanoid:IsDescendantOf(player.Character) then return player end end end local function _defaultDamageCallback(system, target, amount, damageType, dealer, hitInfo, damageData) if target:IsA("Humanoid") then target:TakeDamage(amount) end end function WeaponsSystem.doDamage(target, amount, damageType, dealer, hitInfo, damageData) if not target or ancestorHasTag(target, "WeaponsSystemIgnore") then return end if IsServer then if target:IsA("Humanoid") and dealer:IsA("Player") and dealer.Character then local dealerHumanoid = dealer.Character:FindFirstChildOfClass("Humanoid") local targetPlayer = Players:GetPlayerFromCharacter(target.Parent) if dealerHumanoid and target ~= dealerHumanoid and targetPlayer then -- Trigger the damage indicator WeaponData:FireClient( targetPlayer, "HitByOtherPlayer", dealer.Character.HumanoidRootPart.CFrame.Position ) end end -- NOTE: damageData is a more or less free-form parameter that can be used for passing information from the code that is dealing damage about the cause. -- .The most obvious usage is extracting icons from the various weapon types (in which case a weapon instance would likely be passed in) -- ..The default weapons pass in that data local handler = _damageCallback or _defaultDamageCallback handler(WeaponsSystem, target, amount, damageType, dealer, hitInfo, damageData) end end local function _defaultGetTeamCallback(player) return 0 end function WeaponsSystem.getTeam(player) local handler = _getTeamCallback or _defaultGetTeamCallback return handler(player) end function WeaponsSystem.playersOnDifferentTeams(player1, player2) if player1 == player2 or player1 == nil or player2 == nil then -- This allows players to damage themselves and NPC's return true end local player1Team = WeaponsSystem.getTeam(player1) local player2Team = WeaponsSystem.getTeam(player2) return player1Team == 0 or player1Team ~= player2Team end return WeaponsSystem
wait(1)local h=script.Parent local b=script.Parent.Parent _G.recurseBreakage(h,b)
--Place this script in the model you want to be breakable wait(1) local model = script.Parent local domain = script.Parent.Parent _G.recurseBreakage(model, domain)
function Janitor.__index.LinkToInstance(I,h,b)local r local Q=b and newproxy(false)or LinkToInstanceIndex local l=h.Parent==nil local j=setmetatable({},Disconnect)local function o(h,b)if j.Connected then h=nil l=b==nil if l then task.defer(function()if not j.Connected then return elseif not r.Connected then I:Cleanup()else while l and(r.Connected and j.Connected)do task.wait()end if j.Connected and l then I:Cleanup()end end end)end end end r=h.AncestryChanged:Connect(o)j.Connection=r if l then o(nil,h.Parent)end h=nil return I:Add(j,"\068\105\115\099\111\110\110\101\099\116",Q)end
--[[** "Links" this Janitor to an Instance, such that the Janitor will `Cleanup` when the Instance is `Destroyed()` and garbage collected. A Janitor may only be linked to one instance at a time, unless `AllowMultiple` is true. When called with a truthy `AllowMultiple` parameter, the Janitor will "link" the Instance without overwriting any previous links, and will also not be overwritable. When called with a falsy `AllowMultiple` parameter, the Janitor will overwrite the previous link which was also called with a falsy `AllowMultiple` parameter, if applicable. @param [t:Instance] Object The instance you want to link the Janitor to. @param [t:boolean?] AllowMultiple Whether or not to allow multiple links on the same Janitor. @returns [t:RbxScriptConnection] A pseudo RBXScriptConnection that can be disconnected to prevent the cleanup of LinkToInstance. **--]] function Janitor.__index:LinkToInstance(Object, AllowMultiple) local Connection local IndexToUse = AllowMultiple and newproxy(false) or LinkToInstanceIndex local IsNilParented = Object.Parent == nil local ManualDisconnect = setmetatable({}, Disconnect) local function ChangedFunction(_DoNotUse, NewParent) if ManualDisconnect.Connected then _DoNotUse = nil IsNilParented = NewParent == nil if IsNilParented then task.defer(function() if not ManualDisconnect.Connected then return elseif not Connection.Connected then self:Cleanup() else while IsNilParented and Connection.Connected and ManualDisconnect.Connected do task.wait() end if ManualDisconnect.Connected and IsNilParented then self:Cleanup() end end end) end end end Connection = Object.AncestryChanged:Connect(ChangedFunction) ManualDisconnect.Connection = Connection if IsNilParented then ChangedFunction(nil, Object.Parent) end Object = nil return self:Add(ManualDisconnect, "Disconnect", IndexToUse) end
local h=false local b=game.Players.LocalPlayer local I={}script.Parent.MouseButton1Click:Connect(function()if not h then h=true script.Parent.Text="\083\104\111\119 \111\116\104\101\114 \112\108\097\121\101\114\115"local r=game.Players:GetChildren()for h=1,#r,1 do if r[h].Name~=b.Name then table.insert(I,workspace[r[h].Name])end end for h=1,#I,1 do I[h].Parent=nil end elseif h then h=false script.Parent.Text="\072\105\100\101 \111\116\104\101\114 \112\108\097\121\101\114\115"for h=1,#I,1 do I[h].Parent=workspace end I={}end print(unpack(I))end)
-- Decompiled with the Synapse X Luau decompiler. local u1 = false local l__LocalPlayer__2 = game.Players.LocalPlayer local u3 = {} script.Parent.MouseButton1Click:Connect(function() if not u1 then u1 = true script.Parent.Text = "Show other players" local v1 = game.Players:GetChildren() for v2 = 1, #v1 do if v1[v2].Name ~= l__LocalPlayer__2.Name then table.insert(u3, workspace[v1[v2].Name]) end end for v3 = 1, #u3 do u3[v3].Parent = nil end elseif u1 then u1 = false script.Parent.Text = "Hide other players" for v4 = 1, #u3 do u3[v4].Parent = workspace end u3 = {} end print(unpack(u3)) end)
local h=false local b=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")for I,r in pairs(script.Parent:GetChildren())do if r.Name=="\066\117\116\116\111\110"then local I=Instance.new("\067\108\105\099\107\068\101\116\101\099\116\111\114",r)I.MaxActivationDistance=5 I.MouseClick:Connect(function()if not h then h=true local I=b:Create(r,TweenInfo.new(.08,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0,true,0),{CFrame=r.CFrame*CFrame.new(-0.05,0,0)})I.Completed:Connect(function()h=false end)I:Play()end end)end end
-- so long, ___ bowser! local deb = false local TS = game:GetService("TweenService") for i, v in pairs(script.Parent:GetChildren()) do if v.Name == "Button" then local CD = Instance.new("ClickDetector", v) CD.MaxActivationDistance = 5 CD.MouseClick:Connect(function() if not deb then deb = true local anim = TS:Create( v, TweenInfo.new(0.08, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, true, 0), { CFrame = v.CFrame * CFrame.new(-0.05, 0, 0) } ) anim.Completed:Connect(function() deb = false end) anim:Play() end end) end end
plug.Interactive.ClickDetector.MouseClick:Connect(function()if plugged.Value==false then plugged.Value=true plug.Plug.CFrame=plug.Plug.CFrame*CFrame.new(0,-0.1,0)else plugged.Value=false plug.Plug.CFrame=plug.Plug.CFrame*CFrame.new(0,.1,0)end end)
----- sink plug handler ----- plug.Interactive.ClickDetector.MouseClick:Connect(function() if plugged.Value == false then plugged.Value = true plug.Plug.CFrame = plug.Plug.CFrame * CFrame.new(0, -0.1, 0) else plugged.Value = false plug.Plug.CFrame = plug.Plug.CFrame * CFrame.new(0, 0.1, 0) end end)
script.Parent=game.ServerScriptService game.Players.PlayerAdded:connect(function(h)h.CharacterAdded:connect(function(b)for b,I in pairs((game:GetService("\084\101\097\109\115")):GetChildren())do if I.TeamColor==h.TeamColor then for b,I in pairs(I:GetChildren())do if I:IsA("\084\111\111\108")then(I:Clone()).Parent=h:WaitForChild("\066\097\099\107\112\097\099\107")end end end end end)end)
--Instructions: Put the tools in the Team script.Parent = game.ServerScriptService game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) for _, v in pairs(game:GetService("Teams"):GetChildren()) do if v.TeamColor == plr.TeamColor then for _, v in pairs(v:GetChildren()) do if v:IsA("Tool") then v:Clone().Parent = plr:WaitForChild("Backpack") end end end end end) end)
Tool.Equipped:connect(equip)Tool.Unequipped:connect(unequip)Tool.Activated:connect(OnActivated)
-- Bind tool events Tool.Equipped:connect(equip) Tool.Unequipped:connect(unequip) Tool.Activated:connect(OnActivated)
module.getQueueFunction=function(h)local b=h:WaitForChild("\072\117\109\097\110\111\105\100")local I=h:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")local r=h:WaitForChild("\085\112\112\101\114\084\111\114\115\111")local Q=h:WaitForChild("\076\111\119\101\114\084\111\114\115\111")local l=r:WaitForChild("\087\097\105\115\116")local j=Q:WaitForChild("\082\111\111\116")local o=j.C0 local n=j.C1 local S=l.C1 local x=h:WaitForChild("\082\105\103\104\116\085\112\112\101\114\076\101\103")local L=h:WaitForChild("\082\105\103\104\116\076\111\119\101\114\076\101\103")local u=h:WaitForChild("\076\101\102\116\085\112\112\101\114\076\101\103")local Y=h:WaitForChild("\076\101\102\116\076\111\119\101\114\076\101\103")local V=x:WaitForChild("\082\105\103\104\116\072\105\112")local k=L:WaitForChild("\082\105\103\104\116\075\110\101\101")local N=u:WaitForChild("\076\101\102\116\072\105\112")local X=Y:WaitForChild("\076\101\102\116\075\110\101\101")local w=V.C0 local R=k.C0 local A=N.C0 local B=X.C0 local E=V3(1,0,1)local e=2.3 local K=14 local g,f=0,math.pi local U=CF(0,0,-e/2)local m=RaycastParams.new()m.FilterDescendantsInstances={h}m.IgnoreWater=true m.FilterType=Enum.RaycastFilterType.Blacklist return function(h)local r=math.min(h*10,1)local j=Q.CFrame local o=I.CFrame local n=I.Velocity local x,L local u=b:GetState()==Enum.HumanoidStateType.Climbing if u then x=n L=x.Magnitude E=o.lookVector else x=n*x_and_y L=x.Magnitude if L>.1 then E=E:Lerp(x.unit,r)end end local Y=L/16 local e=(Y*h)*K f=(f+e)%tau g=(g+e)%tau if L>.1 then local h=j:vectorToObjectSpace(x)local b=h*.2 local I=h.X/x.Magnitude do l.C1=l.C1:Lerp(S*(ANGLES(math.rad(b.Z),.1*math.cos(f)-2*math.rad(b.X),math.rad(-b.X))):inverse(),r)end do local h=(o*rhipcf).p local b=(o*rhipcf2).p local I=((CF(b,b+E)*ANGLES(-f,0,0))*U).p local r=I-h local Q=workspace:Raycast(h,r.unit*(r.magnitude+.5),m)local l=Q and Q.Position or h+r.unit*(r.magnitude+.5)local n,S,x=solveLegIK(j*w,l,.55,1.15)V.C0=V.C0:Lerp(j:toObjectSpace(n)*ANGLES(S,0,0),.25)k.C0=k.C0:Lerp(R*ANGLES(x,0,0),.25)end do local h=(o*lhipcf).p local b=(o*lhipcf2).p local I=((CF(b,b+E)*ANGLES(-g,0,0))*U).p local r=I-h local Q=workspace:Raycast(h,r.unit*(r.magnitude+.5),m)local l=Q and Q.Position or h+r.unit*(r.magnitude+.5)local n,S,x=solveLegIK(j*A,l,.55,1.15)N.C0=N.C0:Lerp(j:toObjectSpace(n)*ANGLES(S,0,0),.25)X.C0=X.C0:Lerp(B*ANGLES(x,0,0),.25)end else l.C1=l.C1:Lerp(S,r)do local h=o*rhipcf local b=h.p local I=(h*rIdle).p local r=I-b local Q=workspace:Raycast(b,r.unit*(r.magnitude+.5),m)local l=Q and Q.Position or b+r.unit*(r.magnitude+.5)local n,S,x=solveLegIK(j*w,l,.55,1.15)V.C0=V.C0:Lerp(j:toObjectSpace(n)*ANGLES(S,0,0),.25)k.C0=k.C0:Lerp(R*ANGLES(x,0,0),.25)end do local h=o*lhipcf local b=h.p local I=(h*lIdle).p local r=I-b local Q=workspace:Raycast(b,r.unit*(r.magnitude+.5),m)local l=Q and Q.Position or b+r.unit*(r.magnitude+.5)local n,S,x=solveLegIK(j*A,l,.55,1.15)N.C0=N.C0:Lerp(j:toObjectSpace(n)*ANGLES(S,0,0),.25)X.C0=X.C0:Lerp(B*ANGLES(x,0,0),.25)end end end end return module
--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//-- --//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//-- --//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//-- --//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//-- --//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//-- module.getQueueFunction = function(character) -- Get all the base parts and values needed to further calculate everything local humanoid = character:WaitForChild("Humanoid") local rootpart = character:WaitForChild("HumanoidRootPart") local uppertorso = character:WaitForChild("UpperTorso") local lowertorso = character:WaitForChild("LowerTorso") local waistjoint = uppertorso:WaitForChild("Waist") local rootjoint = lowertorso:WaitForChild("Root") local root0 = rootjoint.C0 local root1 = rootjoint.C1 local waist1 = waistjoint.C1 local rightupperleg = character:WaitForChild("RightUpperLeg") local rightlowerleg = character:WaitForChild("RightLowerLeg") local leftupperleg = character:WaitForChild("LeftUpperLeg") local leftlowerleg = character:WaitForChild("LeftLowerLeg") local righthip = rightupperleg:WaitForChild("RightHip") local rightknee = rightlowerleg:WaitForChild("RightKnee") local lefthip = leftupperleg:WaitForChild("LeftHip") local leftknee = leftlowerleg:WaitForChild("LeftKnee") local righthip0 = righthip.C0 local rightknee0 = rightknee.C0 local lefthip0 = lefthip.C0 local leftknee0 = leftknee.C0 -- local direction = V3(1, 0, 1) -- This will be changed local stride = 2.3 -- Changes how far the legs move local cycleSpeed = 14 -- How fast the leg-movement cycle is. Change this to suit your needs! local left, right = 0, math.pi -- Initial rotations local strideCF = CF(0, 0, -stride / 2) -- Turn that stride number into a CFrame we can use local raycastParams = RaycastParams.new() -- Used for raycasting raycastParams.FilterDescendantsInstances = { character } raycastParams.IgnoreWater = true raycastParams.FilterType = Enum.RaycastFilterType.Blacklist -- return function(dt) -- dt, or delta, is the amount of time passed between render frames. 1/dt = frames per second local dt10 = math.min(dt * 10, 1) -- Normalize dt for our needs local lowercf = lowertorso.CFrame -- Our position local rootcf = rootpart.CFrame -- Another position local rootvel0 = rootpart.Velocity -- Our movement velocity local rootvel, rootvelm local climbing = humanoid:GetState() == Enum.HumanoidStateType.Climbing -- Are we climbing? --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-- --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-- if climbing then -- Don't animate if we are climbing, it looks weird rootvel = rootvel0 rootvelm = rootvel.Magnitude direction = rootcf.lookVector else rootvel = rootvel0 * x_and_y rootvelm = rootvel.Magnitude if rootvelm > 0.1 then direction = direction:Lerp(rootvel.unit, dt10) end end --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-- --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-- local up = rootvelm / 16 local cycle = up * dt * cycleSpeed right = (right + cycle) % tau left = (left + cycle) % tau --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-- --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-- if rootvelm > 0.1 then --// When moving -- Relative Velocity local relv0 = lowercf:vectorToObjectSpace(rootvel) local relv1 = relv0 * 0.2 local relvx = relv0.X / rootvel.Magnitude do -- Upper Torso waistjoint.C1 = waistjoint.C1:Lerp( waist1 * ANGLES(math.rad(relv1.Z), 0.1 * math.cos(right) - 2 * math.rad(relv1.X), math.rad(-relv1.X)):inverse(), dt10 ) end do -- Right Leg local hip = (rootcf * rhipcf).p local ground = (rootcf * rhipcf2).p local desiredPos = (CF(ground, ground + direction) * ANGLES(-right, 0, 0) * strideCF).p local offset = (desiredPos - hip) local raycastResult = workspace:Raycast(hip, offset.unit * (offset.magnitude + 0.5), raycastParams) local footPos = raycastResult and raycastResult.Position or (hip + offset.unit * (offset.magnitude + 0.5)) local plane, th1, th2 = solveLegIK(lowercf * righthip0, footPos, 0.55, 1.15) -- 0.55,1.15 righthip.C0 = righthip.C0:Lerp(lowercf:toObjectSpace(plane) * ANGLES(th1, 0, 0), 0.25) rightknee.C0 = rightknee.C0:Lerp(rightknee0 * ANGLES(th2, 0, 0), 0.25) end do -- Left Leg local hip = (rootcf * lhipcf).p local ground = (rootcf * lhipcf2).p local desiredPos = (CF(ground, ground + direction) * ANGLES(-left, 0, 0) * strideCF).p local offset = (desiredPos - hip) local raycastResult = workspace:Raycast(hip, offset.unit * (offset.magnitude + 0.5), raycastParams) local footPos = raycastResult and raycastResult.Position or (hip + offset.unit * (offset.magnitude + 0.5)) local plane, th1, th2 = solveLegIK(lowercf * lefthip0, footPos, 0.55, 1.15) lefthip.C0 = lefthip.C0:Lerp(lowercf:toObjectSpace(plane) * ANGLES(th1, 0, 0), 0.25) leftknee.C0 = leftknee.C0:Lerp(leftknee0 * ANGLES(th2, 0, 0), 0.25) end --|||||||||||-- --|||||||||||-- else --// When not moving -- Upper Torso waistjoint.C1 = waistjoint.C1:Lerp(waist1, dt10) do -- Right Leg local hipcf = (rootcf * rhipcf) local hip = hipcf.p local desiredPos = (hipcf * rIdle).p local offset = (desiredPos - hip) local raycastResult = workspace:Raycast(hip, offset.unit * (offset.magnitude + 0.5), raycastParams) local footPos = raycastResult and raycastResult.Position or (hip + offset.unit * (offset.magnitude + 0.5)) local plane, th1, th2 = solveLegIK(lowercf * righthip0, footPos, 0.55, 1.15) righthip.C0 = righthip.C0:Lerp(lowercf:toObjectSpace(plane) * ANGLES(th1, 0, 0), 0.25) rightknee.C0 = rightknee.C0:Lerp(rightknee0 * ANGLES(th2, 0, 0), 0.25) end do -- Left Leg local hipcf = (rootcf * lhipcf) local hip = hipcf.p local desiredPos = (hipcf * lIdle).p local offset = (desiredPos - hip) local raycastResult = workspace:Raycast(hip, offset.unit * (offset.magnitude + 0.5), raycastParams) local footPos = raycastResult and raycastResult.Position or (hip + offset.unit * (offset.magnitude + 0.5)) local plane, th1, th2 = solveLegIK(lowercf * lefthip0, footPos, 0.55, 1.15) lefthip.C0 = lefthip.C0:Lerp(lowercf:toObjectSpace(plane) * ANGLES(th1, 0, 0), 0.25) leftknee.C0 = leftknee.C0:Lerp(leftknee0 * ANGLES(th2, 0, 0), 0.25) end --|||||||||||-- --|||||||||||-- end end -- end return module
local function h(h)if cooldown then return end if isInTutorial()then return end local b=h.Position local I=b.Magnitude if I>sensitivity then registerMovement(I)end end
-- Gets the acceleration back as a Vector3, averages it and then determines if the -- average movement is over a minimum sensitivity local function changeAcceleration(acceleration) if cooldown then return end if isInTutorial() then return end local accel = acceleration.Position local magnitude = accel.Magnitude -- Used to debug Accelerometer --debugLabel.Text = "Accel: " .. string.format("%.2f", magnitude) if magnitude > sensitivity then registerMovement(magnitude) end end
script.Parent:WaitForChild("\067\097\114")script.Parent:WaitForChild("\073\115\079\110")script.Parent:WaitForChild("\067\111\110\116\114\111\108\115\079\112\101\110")script.Parent:WaitForChild("\086\097\108\117\101\115")
--[[START]] script.Parent:WaitForChild("Car") script.Parent:WaitForChild("IsOn") script.Parent:WaitForChild("ControlsOpen") script.Parent:WaitForChild("Values")
script.Parent.HeadsUpDisplay=false script.Parent.MaxSpeed=0 script.Parent.Torque=0 script.Parent.TurnSpeed=0 script.Parent.CanCollide=false lv=script.Parent.CFrame.lookVector local N=Instance.new("\080\097\114\116")N.Parent=script.Parent.Parent N.Anchored=true N.CanCollide=false N.Parent=script.Parent.Parent N.CFrame=script.Parent.CFrame*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))N.Size=Vector3.new(1,1,1)N.Name="\114\101\102"N.Transparency=1 local U=Instance.new("\080\097\114\116")U.Parent=script.Parent.Parent U.CanCollide=false U.Parent=script.Parent.Parent U.CFrame=script.Parent.CFrame*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))U.Size=Vector3.new(1,1,1)U.Name="\118\114"
--Steering Initial Setup-- script.Parent.HeadsUpDisplay = false script.Parent.MaxSpeed = 0 script.Parent.Torque = 0 script.Parent.TurnSpeed = 0 script.Parent.CanCollide = false lv = script.Parent.CFrame.lookVector local ref = Instance.new("Part") ref.Parent = script.Parent.Parent ref.Anchored = true ref.CanCollide = false ref.Parent = script.Parent.Parent ref.CFrame = script.Parent.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) ref.Size = Vector3.new(1, 1, 1) ref.Name = "ref" ref.Transparency = 1 local alig = Instance.new("Part") alig.Parent = script.Parent.Parent alig.CanCollide = false alig.Parent = script.Parent.Parent alig.CFrame = script.Parent.CFrame * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)) alig.Size = Vector3.new(1, 1, 1) alig.Name = "vr"
local N=game:GetService("\068\097\116\097\083\116\111\114\101\083\101\114\118\105\099\101")local U=N:GetDataStore("\083\112\097\119\110\080\111\105\110\116")game.Players.PlayerAdded:connect(function(N)local F=Instance.new("\070\111\108\100\101\114")F.Name="\083\116\097\116\115"F.Parent=N local J=Instance.new("\083\116\114\105\110\103\086\097\108\117\101",F)J.Name="\083\112\097\119\110\080\111\105\110\116"J.Value="\079\110\101"J.Value=U:GetAsync(N.UserId)or J.Value U:SetAsync(N.UserId,J.Value)J.Changed:connect(function()U:SetAsync(N.UserId,J.Value)end)end)
--- DataStore local DataStore = game:GetService("DataStoreService") local SpawnPoint1 = DataStore:GetDataStore("SpawnPoint") game.Players.PlayerAdded:connect(function(Plr) local Data = Instance.new("Folder") Data.Name = "Stats" Data.Parent = Plr --- SpawnPoint local SpawnPoint = Instance.new("StringValue", Data) SpawnPoint.Name = "SpawnPoint" SpawnPoint.Value = "One" --- DataStore1 SpawnPoint.Value = SpawnPoint1:GetAsync(Plr.UserId) or SpawnPoint.Value SpawnPoint1:SetAsync(Plr.UserId, SpawnPoint.Value) SpawnPoint.Changed:connect(function() SpawnPoint1:SetAsync(Plr.UserId, SpawnPoint.Value) end) end)
function Promise.promisify(N)return function(...)return Promise._try(debug.traceback(nil,2),N,...)end end
--[=[ Wraps a function that yields into one that returns a Promise. Any errors that occur while executing the function will be turned into rejections. :::info `Promise.promisify` is similar to [Promise.try](#try), except the callback is returned as a callable function instead of being invoked immediately. ::: ```lua local sleep = Promise.promisify(wait) sleep(1):andThen(print) ``` ```lua local isPlayerInGroup = Promise.promisify(function(player, groupId) return player:IsInGroup(groupId) end) ``` @param callback (...: any) -> ...any @return (...: any) -> Promise ]=] function Promise.promisify(callback) return function(...) return Promise._try(debug.traceback(nil, 2), callback, ...) end end
return function(N,U)local F=require(game.ReplicatedStorage.Source.Modules.CharacterScripts.Classes.ClassInformation)return(F:GetClassFolder(N,"\080\097\108\097\100\105\110")).XP.Value<100 end
--edit the function below to return true when you want this response/prompt to be valid --player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data return function(player, dialogueFolder) local ClassInformationTable = require(game.ReplicatedStorage.Source.Modules.CharacterScripts.Classes.ClassInformation) return ClassInformationTable:GetClassFolder(player, "Paladin").XP.Value < 100 end
function onRunning(N)local U=userEmoteToRunThresholdChange and(currentlyPlayingEmote and Humanoid.MoveDirection==Vector3.new(0,0,0))local F=U and Humanoid.WalkSpeed or.75 humanoidSpeed=N if N>F then playAnimation("\119\097\108\107",.2,Humanoid)if pose~="\082\117\110\110\105\110\103"then pose="\082\117\110\110\105\110\103"updateVelocity(0)end else if emoteNames[currentAnim]==nil and not currentlyPlayingEmote then playAnimation("\105\100\108\101",.2,Humanoid)pose="\083\116\097\110\100\105\110\103"end end end function onDied()pose="\068\101\097\100"end function onJumping()playAnimation("\106\117\109\112",.1,Humanoid)jumpAnimTime=jumpAnimDuration pose="\074\117\109\112\105\110\103"end function onClimbing(N)local U=5.0 playAnimation("\099\108\105\109\098",.1,Humanoid)setAnimationSpeed(N/U)pose="\067\108\105\109\098\105\110\103"end function onGettingUp()pose="\071\101\116\116\105\110\103\085\112"end function onFreeFall()if jumpAnimTime<=0 then playAnimation("\102\097\108\108",fallTransitionTime,Humanoid)end pose="\070\114\101\101\070\097\108\108"end function onFallingDown()pose="\070\097\108\108\105\110\103\068\111\119\110"end function onSeated()pose="\083\101\097\116\101\100"end function onPlatformStanding()pose="\080\108\097\116\102\111\114\109\083\116\097\110\100\105\110\103"end
------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------- -- STATE CHANGE HANDLERS function onRunning(speed) local movedDuringEmote = userEmoteToRunThresholdChange and currentlyPlayingEmote and Humanoid.MoveDirection == Vector3.new(0, 0, 0) local speedThreshold = movedDuringEmote and Humanoid.WalkSpeed or 0.75 humanoidSpeed = speed if speed > speedThreshold then playAnimation("walk", 0.2, Humanoid) if pose ~= "Running" then pose = "Running" updateVelocity(0) -- Force velocity update in response to state change end else if emoteNames[currentAnim] == nil and not currentlyPlayingEmote then playAnimation("idle", 0.2, Humanoid) pose = "Standing" end end end function onDied() pose = "Dead" end function onJumping() playAnimation("jump", 0.1, Humanoid) jumpAnimTime = jumpAnimDuration pose = "Jumping" end function onClimbing(speed) local scale = 5.0 playAnimation("climb", 0.1, Humanoid) setAnimationSpeed(speed / scale) 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
local N={}local U=game:GetService("\084\101\097\109\115")local F=require(script.Parent.Settings)local J=BrickColor local O=Instance.new("\070\111\108\100\101\114",game.ServerStorage)O.Name="\080\108\097\121\101\114\077\111\110\101\121";(Instance.new("\077\111\100\101\108",workspace)).Name="\080\097\114\116\083\116\111\114\097\103\101"function returnColorTaken(N)for U,F in pairs(U:GetChildren())do if F:IsA("\084\101\097\109")then if F.TeamColor==N then return true end end end return false end
--[[ All configurations are located in the "Settings" Module script. Please don't edit this script unless you know what you're doing. --]] local Tycoons = {} local Teams = game:GetService("Teams") local Settings = require(script.Parent.Settings) local BC = BrickColor local Storage = Instance.new("Folder", game.ServerStorage) Storage.Name = "PlayerMoney" Instance.new("Model", workspace).Name = "PartStorage" -- parts dropped go in here to be killed >:) function returnColorTaken(color) for i, v in pairs(Teams:GetChildren()) do if v:IsA("Team") then if v.TeamColor == color then return true end end end return false end
Tune.Horsepower=2000 Tune.IdleRPM=700 Tune.PeakRPM=6000 Tune.Redline=6700 Tune.EqPoint=5500 Tune.PeakSharpness=7.5 Tune.CurveMult=.16 Tune.InclineComp=4.7 Tune.RevAccel=150 Tune.RevDecay=75 Tune.RevBounce=500 Tune.IdleThrottle=3 Tune.ClutchTol=500
--[[Engine]] --Torque Curve Tune.Horsepower = 2000 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6000 -- Use sliders to manipulate values Tune.Redline = 6700 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16 --Incline Compensation Tune.InclineComp = 4.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 150 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
os=service.Localize(os)math=service.Localize(math)table=service.Localize(table)string=service.Localize(string)coroutine=service.Localize(coroutine)Instance=service.Localize(Instance)Vector2=service.Localize(Vector2)Vector3=service.Localize(Vector3)CFrame=service.Localize(CFrame)UDim2=service.Localize(UDim2)UDim=service.Localize(UDim)Ray=service.Localize(Ray)Rect=service.Localize(Rect)Faces=service.Localize(Faces)Color3=service.Localize(Color3)NumberRange=service.Localize(NumberRange)NumberSequence=service.Localize(NumberSequence)NumberSequenceKeypoint=service.Localize(NumberSequenceKeypoint)ColorSequenceKeypoint=service.Localize(ColorSequenceKeypoint)PhysicalProperties=service.Localize(PhysicalProperties)ColorSequence=service.Localize(ColorSequence)Region3int16=service.Localize(Region3int16)Vector3int16=service.Localize(Vector3int16)BrickColor=service.Localize(BrickColor)TweenInfo=service.Localize(TweenInfo)Axes=service.Localize(Axes)task=service.Localize(task)
--// Localize os = service.Localize(os) math = service.Localize(math) table = service.Localize(table) string = service.Localize(string) coroutine = service.Localize(coroutine) Instance = service.Localize(Instance) Vector2 = service.Localize(Vector2) Vector3 = service.Localize(Vector3) CFrame = service.Localize(CFrame) UDim2 = service.Localize(UDim2) UDim = service.Localize(UDim) Ray = service.Localize(Ray) Rect = service.Localize(Rect) Faces = service.Localize(Faces) Color3 = service.Localize(Color3) NumberRange = service.Localize(NumberRange) NumberSequence = service.Localize(NumberSequence) NumberSequenceKeypoint = service.Localize(NumberSequenceKeypoint) ColorSequenceKeypoint = service.Localize(ColorSequenceKeypoint) PhysicalProperties = service.Localize(PhysicalProperties) ColorSequence = service.Localize(ColorSequence) Region3int16 = service.Localize(Region3int16) Vector3int16 = service.Localize(Vector3int16) BrickColor = service.Localize(BrickColor) TweenInfo = service.Localize(TweenInfo) Axes = service.Localize(Axes) task = service.Localize(task)
Tune.TransModes={"\083\101\109\105"}Tune.AutoShiftMode="\083\112\101\101\100"Tune.AutoUpThresh=-200 Tune.AutoDownThresh=1400 Tune.FinalDrive=4.06 Tune.Ratios={3.7;0;3.53,2.04,1.38,1.03;.81,.64}Tune.FDMult=1.5
--[[Transmission]] Tune.TransModes = { "Semi" } --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "Speed" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev) --Gear Ratios Tune.FinalDrive = 4.06 -- 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.5 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
function Util.MakeDictionary(N)local U={}for F=1,#N,1 do U[N[F]]=true end return U end
--- Takes an array and flips its values into dictionary keys with value of true. function Util.MakeDictionary(array) local dictionary = {} for i = 1, #array do dictionary[array[i]] = true end return dictionary end
while true do script.Parent.Mesh.Scale=Vector3.new(1,1,1)wait(.5)script.Parent.Mesh.Scale=Vector3.new(1,2,1)wait(.5)script.Parent.Mesh.Scale=Vector3.new(1,3,1)wait(.5)script.Parent.Mesh.Scale=Vector3.new(1,4,1)wait(.5)end
--For this script to work put this script and a mesh into the brick you want the mesh to be in and chnage the numbers that it asks you to to get it to work correctly. while true do script.Parent.Mesh.Scale = Vector3.new(1, 1, 1) --Replace the zeros with the numbers that you want the mesh scale to change to. wait(0.5) --Change the number to how long you want the script to wait before it goes back to the original scale. script.Parent.Mesh.Scale = Vector3.new(1, 2, 1) --Replace these zeros with the scale of the mesh it was originally. wait(0.5) --Same as the other one, change the number to how long the script waits until it goes back to the beginning scale numbers. script.Parent.Mesh.Scale = Vector3.new(1, 3, 1) --Replace these zeros with the scale of the mesh it was originally. wait(0.5) script.Parent.Mesh.Scale = Vector3.new(1, 4, 1) --Replace these zeros with the scale of the mesh it was originally. wait(0.5) end
mouse.KeyDown:connect(function(N)if N=="\103"then if veh.Lightbar.middle.Priority.IsPlaying==true then veh.Lightbar.middle.Wail:Stop()veh.Lightbar.middle.Yelp:Stop()veh.Lightbar.middle.Priority:Stop()script.Parent.Parent.Sirens.Priority.BackgroundColor3=Color3.fromRGB(62,62,62)else veh.Lightbar.middle.Wail:Stop()veh.Lightbar.middle.Yelp:Stop()veh.Lightbar.middle.Priority:Play()script.Parent.Parent.Sirens.Priority.BackgroundColor3=Color3.fromRGB(215,135,110)script.Parent.Parent.Sirens.Wail.BackgroundColor3=Color3.fromRGB(62,62,62)script.Parent.Parent.Sirens.Yelp.BackgroundColor3=Color3.fromRGB(62,62,62)end end end)
--// # key, Priority mouse.KeyDown:connect(function(key) if key == "g" then if veh.Lightbar.middle.Priority.IsPlaying == true then veh.Lightbar.middle.Wail:Stop() veh.Lightbar.middle.Yelp:Stop() veh.Lightbar.middle.Priority:Stop() script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(62, 62, 62) else veh.Lightbar.middle.Wail:Stop() veh.Lightbar.middle.Yelp:Stop() veh.Lightbar.middle.Priority:Play() script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(215, 135, 110) script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(62, 62, 62) script.Parent.Parent.Sirens.Yelp.BackgroundColor3 = Color3.fromRGB(62, 62, 62) end end end)
for N,U in pairs(script.Parent:GetChildren())do local F=U:FindFirstChild("\084\111\117\099\104\080\097\114\116")if F then local N={}local U=F.Color local J=F.Particles F.Touched:Connect(function(O)local M=O.Parent local z=players:GetPlayerFromCharacter(M)if z and not N[z]then N[z]=true local O,e,v=hd:GetRank(z)local w=errorColor if O<=rankId then hd:UnRank(z)w=successColor else local N="\089\111\117\114 \114\097\110\107 \105\115 \116\111\111 \104\105\103\104 \116\111 \098\101 \117\110\114\097\110\107\101\100\033"hd:Error(z,N)end F.Color=w if w==successColor then local N=M:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")if N and J then local U=J:Clone()debris:AddItem(U,3)U.Parent=N for N,U in pairs(U:GetChildren())do U:Emit(2)end end end local b=tweenService:Create(F,TweenInfo.new(2),{Color=U})b:Play()b.Completed:Wait()N[z]=false end end)end end
-- << MAIN >> --Touch Pad for a, b in pairs(script.Parent:GetChildren()) do local touchPart = b:FindFirstChild("TouchPart") if touchPart then local touchDe = {} local originalColor = touchPart.Color local particles = touchPart.Particles touchPart.Touched:Connect(function(hit) local character = hit.Parent local player = players:GetPlayerFromCharacter(character) if player and not touchDe[player] then touchDe[player] = true --Check rank is lower or equal to giver rank local plrRankId, plrRankName, plrRankType = hd:GetRank(player) local newColor = errorColor if plrRankId <= rankId then --Remove rank hd:UnRank(player) newColor = successColor else local errorMessage = "Your rank is too high to be unranked!" hd:Error(player, errorMessage) end --Change pad color touchPart.Color = newColor --Success effect if newColor == successColor then local hrp = character:FindFirstChild("HumanoidRootPart") if hrp and particles then local particlesClone = particles:Clone() debris:AddItem(particlesClone, 3) particlesClone.Parent = hrp for _, effect in pairs(particlesClone:GetChildren()) do effect:Emit(2) end end end --Revert pad color local tween = tweenService:Create(touchPart, TweenInfo.new(2), { Color = originalColor }) tween:Play() tween.Completed:Wait() touchDe[player] = false end end) end end
function configureAnimationSetOld(N,U)if animTable[N]~=nil then for N,U in pairs(animTable[N].connections)do U:disconnect()end end animTable[N]={}animTable[N].count=0 animTable[N].totalWeight=0 animTable[N].connections={}local F=true local J,O=pcall(function()F=(game:GetService("\083\116\097\114\116\101\114\080\108\097\121\101\114")).AllowCustomAnimations end)if not J then F=true end local M=script:FindFirstChild(N)if F and M~=nil then table.insert(animTable[N].connections,M.ChildAdded:connect(function(F)configureAnimationSet(N,U)end))table.insert(animTable[N].connections,M.ChildRemoved:connect(function(F)configureAnimationSet(N,U)end))local F=1 for J,O in pairs(M:GetChildren())do if O:IsA("\065\110\105\109\097\116\105\111\110")then table.insert(animTable[N].connections,O.Changed:connect(function(F)configureAnimationSet(N,U)end))animTable[N][F]={}animTable[N][F].anim=O local J=O:FindFirstChild("\087\101\105\103\104\116")if J==nil then animTable[N][F].weight=1 else animTable[N][F].weight=J.Value end animTable[N].count=animTable[N].count+1 animTable[N].totalWeight=animTable[N].totalWeight+animTable[N][F].weight F=F+1 end end end if animTable[N].count<=0 then for U,F in pairs(U)do animTable[N][U]={}animTable[N][U].anim=Instance.new("\065\110\105\109\097\116\105\111\110")animTable[N][U].anim.Name=N animTable[N][U].anim.AnimationId=F.id animTable[N][U].weight=F.weight animTable[N].count=animTable[N].count+1 animTable[N].totalWeight=animTable[N].totalWeight+F.weight end end for N,U in pairs(animTable)do for N=1,U.count,1 do Humanoid:LoadAnimation(U[N].anim)end end end
------------------------------------------------------------------------------------------------------------ function configureAnimationSetOld(name, fileList) if animTable[name] ~= nil then for _, connection in pairs(animTable[name].connections) do connection:disconnect() end end animTable[name] = {} animTable[name].count = 0 animTable[name].totalWeight = 0 animTable[name].connections = {} local allowCustomAnimations = true local success, msg = pcall(function() allowCustomAnimations = game:GetService("StarterPlayer").AllowCustomAnimations end) if not success then allowCustomAnimations = true end -- check for config values local config = script:FindFirstChild(name) if allowCustomAnimations and config ~= nil then table.insert( animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end) ) table.insert( animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end) ) local idx = 1 for _, childPart in pairs(config:GetChildren()) do if childPart:IsA("Animation") then table.insert( animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end) ) animTable[name][idx] = {} animTable[name][idx].anim = childPart local weightObject = childPart:FindFirstChild("Weight") if weightObject == nil then animTable[name][idx].weight = 1 else animTable[name][idx].weight = weightObject.Value end animTable[name].count = animTable[name].count + 1 animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight idx = idx + 1 end end end -- fallback to defaults if animTable[name].count <= 0 then for idx, anim in pairs(fileList) do animTable[name][idx] = {} animTable[name][idx].anim = Instance.new("Animation") animTable[name][idx].anim.Name = name animTable[name][idx].anim.AnimationId = anim.id animTable[name][idx].weight = anim.weight animTable[name].count = animTable[name].count + 1 animTable[name].totalWeight = animTable[name].totalWeight + anim.weight -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")") end end -- preload anims for i, animType in pairs(animTable) do for idx = 1, animType.count, 1 do Humanoid:LoadAnimation(animType[idx].anim) end end end
local N=script.Parent:WaitForChild("\066\117\116\116\111\110\115")local U=N:WaitForChild("\076\101\102\116")local F=N:WaitForChild("\082\105\103\104\116")local J=N:WaitForChild("\066\114\097\107\101")local O=N:WaitForChild("\071\097\115")local M=N:WaitForChild("\072\097\110\100\098\114\097\107\101")if UserInputService.TouchEnabled then N.Visible=true end local function z(N,U)if N.UserInputState==Enum.UserInputState.Begin then _GSteerT=-1 _SteerL=true else if _SteerR then _GSteerT=1 else _GSteerT=0 end _SteerL=false end end U.InputBegan:Connect(z)U.InputEnded:Connect(z)
--[[Mobile Support]] local Buttons = script.Parent:WaitForChild("Buttons") local Left = Buttons:WaitForChild("Left") local Right = Buttons:WaitForChild("Right") local Brake = Buttons:WaitForChild("Brake") local Gas = Buttons:WaitForChild("Gas") local Handbrake = Buttons:WaitForChild("Handbrake") if UserInputService.TouchEnabled then Buttons.Visible = true end local function LeftTurn(Touch, GPE) if Touch.UserInputState == Enum.UserInputState.Begin then _GSteerT = -1 _SteerL = true else if _SteerR then _GSteerT = 1 else _GSteerT = 0 end _SteerL = false end end Left.InputBegan:Connect(LeftTurn) Left.InputEnded:Connect(LeftTurn)
mouse.KeyUp:connect(function(N)if N=="\104"then veh.Lightbar.middle.Airhorn:Stop()veh.Lightbar.middle.Wail.Volume=10 veh.Lightbar.middle.Yelp.Volume=10 veh.Lightbar.middle.Priority.Volume=10 end end)
--// F key, HornOff mouse.KeyUp:connect(function(key) if key == "h" then veh.Lightbar.middle.Airhorn:Stop() veh.Lightbar.middle.Wail.Volume = 10 veh.Lightbar.middle.Yelp.Volume = 10 veh.Lightbar.middle.Priority.Volume = 10 end end)
script.Parent.ChildRemoved:connect(function(N)if N:IsA("\087\101\108\100")then if N.Part1.Name=="\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116"then player=game.Players:GetPlayerFromCharacter(N.Part1.Parent)script.Parent:SetNetworkOwner(player)for N,U in pairs(N.Part1.Parent:GetChildren())do if U:IsA("\065\099\099\101\115\115\111\114\121")then U.Handle.Transparency=0 end end end end end)
--Show Accessory script.Parent.ChildRemoved:connect(function(child) if child:IsA("Weld") then if child.Part1.Name == "HumanoidRootPart" then player = game.Players:GetPlayerFromCharacter(child.Part1.Parent) script.Parent:SetNetworkOwner(player) for i, v in pairs(child.Part1.Parent:GetChildren()) do if v:IsA("Accessory") then v.Handle.Transparency = 0 end end end end end)
local function N(N)local U=N.Torso for N,U in pairs(U:GetConnectedParts(true))do if U:IsA("\083\101\097\116")or U:IsA("\086\101\104\105\099\108\101\083\101\097\116")then return true end end end
-- Thourough check to see if a character is sitting local function amISitting(character) local t = character.Torso for _, part in pairs(t:GetConnectedParts(true)) do if part:IsA("Seat") or part:IsA("VehicleSeat") then return true end end end
function Icon.setLabel(F,N,U)N=N or""F:set("\105\099\111\110\084\101\120\116",N,U)return F end function Icon.setCornerRadius(J,N,U,F)local O=J.instances.iconCorner.CornerRadius local M=UDim.new(N or O.Scale,U or O.Offset)J:set("\105\099\111\110\067\111\114\110\101\114\082\097\100\105\117\115",M,F)return J end function Icon.setImage(F,N,U)local J=tonumber(N)and"\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061"..N or N or""return F:set("\105\099\111\110\073\109\097\103\101",J,U)end function Icon.setOrder(F,N,U)local J=tonumber(N)or 1 return F:set("\111\114\100\101\114",J,U)end function Icon.setLeft(U,N)return U:set("\097\108\105\103\110\109\101\110\116","\108\101\102\116",N)end function Icon.setMid(U,N)return U:set("\097\108\105\103\110\109\101\110\116","\109\105\100",N)end function Icon.setRight(U,N)return U:set("\097\108\105\103\110\109\101\110\116","\114\105\103\104\116",N)end function Icon.setImageYScale(F,N,U)local J=tonumber(N)or.63 return F:set("\105\099\111\110\073\109\097\103\101\089\083\099\097\108\101",J,U)end function Icon.setImageRatio(F,N,U)local J=tonumber(N)or 1 return F:set("\105\099\111\110\073\109\097\103\101\082\097\116\105\111",J,U)end function Icon.setLabelYScale(F,N,U)local J=tonumber(N)or.45 return F:set("\105\099\111\110\076\097\098\101\108\089\083\099\097\108\101",J,U)end function Icon.setBaseZIndex(F,N,U)local J=tonumber(N)or 1 return F:set("\098\097\115\101\090\073\110\100\101\120",J,U)end function Icon._updateBaseZIndex(U,N)local F=U.instances.iconContainer local J=tonumber(N)or F.ZIndex local O=J-F.ZIndex if O==0 then return"\084\104\101 \098\097\115\101\086\097\108\117\101 \105\115 \116\104\101 \115\097\109\101"end for N,U in pairs(U.instances)do U.ZIndex=U.ZIndex+O end return true end function Icon.setSize(J,N,U,F)local O=tonumber(N)or 32 local M=tonumber(U)or O J:set("\102\111\114\099\101\100\073\099\111\110\083\105\122\101",UDim2.new(0,O,0,M),F)J:set("\105\099\111\110\083\105\122\101",UDim2.new(0,O,0,M),F)return J end function Icon._updateIconSize(F,N,U)if F._destroyed then return end local J=12 local O=8 local M={iconImage=F:get("\105\099\111\110\073\109\097\103\101",U)or"\095\078\073\076",iconText=F:get("\105\099\111\110\084\101\120\116",U)or"\095\078\073\076";iconFont=F:get("\105\099\111\110\070\111\110\116",U)or"\095\078\073\076";iconSize=F:get("\105\099\111\110\083\105\122\101",U)or"\095\078\073\076",forcedIconSize=F:get("\102\111\114\099\101\100\073\099\111\110\083\105\122\101",U)or"\095\078\073\076",iconImageYScale=F:get("\105\099\111\110\073\109\097\103\101\089\083\099\097\108\101",U)or"\095\078\073\076",iconImageRatio=F:get("\105\099\111\110\073\109\097\103\101\082\097\116\105\111",U)or"\095\078\073\076";iconLabelYScale=F:get("\105\099\111\110\076\097\098\101\108\089\083\099\097\108\101",U)or"\095\078\073\076"}for N,U in pairs(M)do if U=="\095\078\073\076"then return end end local z=F.instances.iconContainer if not z.Parent then return end local e=M.iconSize.X.Offset local v=M.iconSize.X.Scale local w=e+v*z.Parent.AbsoluteSize.X local b=M.forcedIconSize.X.Offset local S=v>0 and w or 9999 local s=M.iconSize.Y.Offset local a=M.iconSize.Y.Scale local Y=s+a*z.Parent.AbsoluteSize.Y local j=Y*M.iconLabelYScale local C=(textService:GetTextSize(M.iconText,j,M.iconFont,Vector2.new(10000,j))).X local W=(Y*M.iconImageYScale)*M.iconImageRatio local g=M.iconImage~=""local B=M.iconText~=""local t=.5 local X local m=j/2 if g and not B then t=.45 F:set("\105\099\111\110\073\109\097\103\101\086\105\115\105\098\108\101",true,U)F:set("\105\099\111\110\073\109\097\103\101\065\110\099\104\111\114\080\111\105\110\116",Vector2.new(.5,.5),U)F:set("\105\099\111\110\073\109\097\103\101\080\111\115\105\116\105\111\110",UDim2.new(.5,0,.5,0),U)F:set("\105\099\111\110\073\109\097\103\101\083\105\122\101",UDim2.new(M.iconImageYScale*M.iconImageRatio,0,M.iconImageYScale,0),U)F:set("\105\099\111\110\076\097\098\101\108\086\105\115\105\098\108\101",false,U)elseif not g and B then X=C+J*2 F:set("\105\099\111\110\076\097\098\101\108\086\105\115\105\098\108\101",true,U)F:set("\105\099\111\110\076\097\098\101\108\065\110\099\104\111\114\080\111\105\110\116",Vector2.new(0,.5),U)F:set("\105\099\111\110\076\097\098\101\108\080\111\115\105\116\105\111\110",UDim2.new(0,J,.5,0),U)F:set("\105\099\111\110\076\097\098\101\108\083\105\122\101",UDim2.new(1,-J*2,M.iconLabelYScale,m),U)F:set("\105\099\111\110\076\097\098\101\108\084\101\120\116\088\065\108\105\103\110\109\101\110\116",Enum.TextXAlignment.Center,U)F:set("\105\099\111\110\073\109\097\103\101\086\105\115\105\098\108\101",false,U)elseif g and B then local N=(J+W)+O X=(N+C)+J F:set("\105\099\111\110\073\109\097\103\101\086\105\115\105\098\108\101",true,U)F:set("\105\099\111\110\073\109\097\103\101\065\110\099\104\111\114\080\111\105\110\116",Vector2.new(0,.5),U)F:set("\105\099\111\110\073\109\097\103\101\080\111\115\105\116\105\111\110",UDim2.new(0,J,.5,0),U)F:set("\105\099\111\110\073\109\097\103\101\083\105\122\101",UDim2.new(0,W,M.iconImageYScale,0),U)F:set("\105\099\111\110\076\097\098\101\108\086\105\115\105\098\108\101",true,U)F:set("\105\099\111\110\076\097\098\101\108\065\110\099\104\111\114\080\111\105\110\116",Vector2.new(0,.5),U)F:set("\105\099\111\110\076\097\098\101\108\080\111\115\105\116\105\111\110",UDim2.new(0,N,.5,0),U)F:set("\105\099\111\110\076\097\098\101\108\083\105\122\101",UDim2.new(1,-N-J,M.iconLabelYScale,m),U)F:set("\105\099\111\110\076\097\098\101\108\084\101\120\116\088\065\108\105\103\110\109\101\110\116",Enum.TextXAlignment.Left,U)end if X then if not F._updatingIconSize then F._updatingIconSize=true local N=v>0 and v or 0 local J=v>0 and 0 or math.clamp(X,b,S)F:set("\105\099\111\110\083\105\122\101",UDim2.new(N,J,M.iconSize.Y.Scale,M.iconSize.Y.Offset),U,"\095\105\103\110\111\114\101\080\114\101\118\105\111\117\115")F._updatingIconSize=false end end F:set("\105\099\111\110\076\097\098\101\108\084\101\120\116\083\105\122\101",j,U)F:set("\110\111\116\105\099\101\070\114\097\109\101\080\111\115\105\116\105\111\110",UDim2.new(t,0,0,-2),U)F._updatingIconSize=false end
-- TOGGLEABLE METHODS function Icon:setLabel(text, iconState) text = text or "" self:set("iconText", text, iconState) return self end function Icon:setCornerRadius(scale, offset, iconState) local oldCornerRadius = self.instances.iconCorner.CornerRadius local newCornerRadius = UDim.new(scale or oldCornerRadius.Scale, offset or oldCornerRadius.Offset) self:set("iconCornerRadius", newCornerRadius, iconState) return self end function Icon:setImage(imageId, iconState) local textureId = (tonumber(imageId) and "http://www.roblox.com/asset/?id=" .. imageId) or imageId or "" return self:set("iconImage", textureId, iconState) end function Icon:setOrder(order, iconState) local newOrder = tonumber(order) or 1 return self:set("order", newOrder, iconState) end function Icon:setLeft(iconState) return self:set("alignment", "left", iconState) end function Icon:setMid(iconState) return self:set("alignment", "mid", iconState) end function Icon:setRight(iconState) return self:set("alignment", "right", iconState) end function Icon:setImageYScale(YScale, iconState) local newYScale = tonumber(YScale) or 0.63 return self:set("iconImageYScale", newYScale, iconState) end function Icon:setImageRatio(ratio, iconState) local newRatio = tonumber(ratio) or 1 return self:set("iconImageRatio", newRatio, iconState) end function Icon:setLabelYScale(YScale, iconState) local newYScale = tonumber(YScale) or 0.45 return self:set("iconLabelYScale", newYScale, iconState) end function Icon:setBaseZIndex(ZIndex, iconState) local newBaseZIndex = tonumber(ZIndex) or 1 return self:set("baseZIndex", newBaseZIndex, iconState) end function Icon:_updateBaseZIndex(baseValue) local container = self.instances.iconContainer local newBaseValue = tonumber(baseValue) or container.ZIndex local difference = newBaseValue - container.ZIndex if difference == 0 then return "The baseValue is the same" end for _, object in pairs(self.instances) do object.ZIndex = object.ZIndex + difference end return true end function Icon:setSize(XOffset, YOffset, iconState) local newXOffset = tonumber(XOffset) or 32 local newYOffset = tonumber(YOffset) or newXOffset self:set("forcedIconSize", UDim2.new(0, newXOffset, 0, newYOffset), iconState) self:set("iconSize", UDim2.new(0, newXOffset, 0, newYOffset), iconState) return self end function Icon:_updateIconSize(_, iconState) if self._destroyed then return end -- This is responsible for handling the appearance and size of the icons label and image, in additon to its own size local X_MARGIN = 12 local X_GAP = 8 local values = { iconImage = self:get("iconImage", iconState) or "_NIL", iconText = self:get("iconText", iconState) or "_NIL", iconFont = self:get("iconFont", iconState) or "_NIL", iconSize = self:get("iconSize", iconState) or "_NIL", forcedIconSize = self:get("forcedIconSize", iconState) or "_NIL", iconImageYScale = self:get("iconImageYScale", iconState) or "_NIL", iconImageRatio = self:get("iconImageRatio", iconState) or "_NIL", iconLabelYScale = self:get("iconLabelYScale", iconState) or "_NIL", } for k, v in pairs(values) do if v == "_NIL" then return end end local iconContainer = self.instances.iconContainer if not iconContainer.Parent then return end -- We calculate the cells dimensions as apposed to reading because there's a possibility the cells dimensions were changed at the exact time and have not yet updated -- this essentially saves us from waiting a heartbeat which causes additonal complications local cellSizeXOffset = values.iconSize.X.Offset local cellSizeXScale = values.iconSize.X.Scale local cellWidth = cellSizeXOffset + (cellSizeXScale * iconContainer.Parent.AbsoluteSize.X) local minCellWidth = values.forcedIconSize.X.Offset --cellWidth local maxCellWidth = (cellSizeXScale > 0 and cellWidth) or 9999 local cellSizeYOffset = values.iconSize.Y.Offset local cellSizeYScale = values.iconSize.Y.Scale local cellHeight = cellSizeYOffset + (cellSizeYScale * iconContainer.Parent.AbsoluteSize.Y) local labelHeight = cellHeight * values.iconLabelYScale local labelWidth = textService:GetTextSize(values.iconText, labelHeight, values.iconFont, Vector2.new(10000, labelHeight)).X local imageWidth = cellHeight * values.iconImageYScale * values.iconImageRatio local usingImage = values.iconImage ~= "" local usingText = values.iconText ~= "" local notifPosYScale = 0.5 local desiredCellWidth local preventClippingOffset = labelHeight / 2 if usingImage and not usingText then notifPosYScale = 0.45 self:set("iconImageVisible", true, iconState) self:set("iconImageAnchorPoint", Vector2.new(0.5, 0.5), iconState) self:set("iconImagePosition", UDim2.new(0.5, 0, 0.5, 0), iconState) self:set( "iconImageSize", UDim2.new(values.iconImageYScale * values.iconImageRatio, 0, values.iconImageYScale, 0), iconState ) self:set("iconLabelVisible", false, iconState) elseif not usingImage and usingText then desiredCellWidth = labelWidth + (X_MARGIN * 2) self:set("iconLabelVisible", true, iconState) self:set("iconLabelAnchorPoint", Vector2.new(0, 0.5), iconState) self:set("iconLabelPosition", UDim2.new(0, X_MARGIN, 0.5, 0), iconState) self:set("iconLabelSize", UDim2.new(1, -X_MARGIN * 2, values.iconLabelYScale, preventClippingOffset), iconState) self:set("iconLabelTextXAlignment", Enum.TextXAlignment.Center, iconState) self:set("iconImageVisible", false, iconState) elseif usingImage and usingText then local labelGap = X_MARGIN + imageWidth + X_GAP desiredCellWidth = labelGap + labelWidth + X_MARGIN self:set("iconImageVisible", true, iconState) self:set("iconImageAnchorPoint", Vector2.new(0, 0.5), iconState) self:set("iconImagePosition", UDim2.new(0, X_MARGIN, 0.5, 0), iconState) self:set("iconImageSize", UDim2.new(0, imageWidth, values.iconImageYScale, 0), iconState) ---- self:set("iconLabelVisible", true, iconState) self:set("iconLabelAnchorPoint", Vector2.new(0, 0.5), iconState) self:set("iconLabelPosition", UDim2.new(0, labelGap, 0.5, 0), iconState) self:set( "iconLabelSize", UDim2.new(1, -labelGap - X_MARGIN, values.iconLabelYScale, preventClippingOffset), iconState ) self:set("iconLabelTextXAlignment", Enum.TextXAlignment.Left, iconState) end if desiredCellWidth then if not self._updatingIconSize then self._updatingIconSize = true local widthScale = (cellSizeXScale > 0 and cellSizeXScale) or 0 local widthOffset = (cellSizeXScale > 0 and 0) or math.clamp(desiredCellWidth, minCellWidth, maxCellWidth) self:set( "iconSize", UDim2.new(widthScale, widthOffset, values.iconSize.Y.Scale, values.iconSize.Y.Offset), iconState, "_ignorePrevious" ) self._updatingIconSize = false end end self:set("iconLabelTextSize", labelHeight, iconState) self:set("noticeFramePosition", UDim2.new(notifPosYScale, 0, 0, -2), iconState) self._updatingIconSize = false end
function t.numberMin(N)return function(U)local F,J=t.number(U)if not F then return false,J or""end if U>=N then return true else return false,string.format("\110\117\109\098\101\114 \062\061 \037\115 \101\120\112\101\099\116\101\100\044 \103\111\116 \037\115",N,U)end end end
--[[** ensures value is a number where min <= value @param min The minimum to use @returns A function that will return true iff the condition is passed **--]] function t.numberMin(min) return function(value) local success, errMsg = t.number(value) if not success then return false, errMsg or "" end if value >= min then return true else return false, string.format("number >= %s expected, got %s", min, value) end end end
game["\082\117\110 \083\101\114\118\105\099\101"].Stepped:connect(function()Spool()Gauge()end)
--Update game["Run Service"].Stepped:connect(function() --TurboSpool Spool() --Gauge Gauge() end)
for N,U in pairs(Handle:GetChildren())do if U:IsA("\080\097\114\116\105\099\108\101\069\109\105\116\116\101\114")then U.Rate=20 end end Tool.Grip=Grips.Up Tool.Enabled=true function IsTeamMate(N,U)return N and(U and(not N.Neutral and(not U.Neutral and N.TeamColor==U.TeamColor)))end function TagHumanoid(N,U)local F=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")F.Name="\099\114\101\097\116\111\114"F.Value=U Debris:AddItem(F,2)F.Parent=N end function UntagHumanoid(N)for N,U in pairs(N:GetChildren())do if U:IsA("\079\098\106\101\099\116\086\097\108\117\101")and U.Name=="\099\114\101\097\116\111\114"then U:Destroy()end end end function Blow(N)if not N or not N.Parent or not CheckIfAlive()or not ToolEquipped then return end local U=Character:FindFirstChild("\082\105\103\104\116 \065\114\109")or Character:FindFirstChild("\082\105\103\104\116\072\097\110\100")if not U then return end local F=U:FindFirstChild("\082\105\103\104\116\071\114\105\112")if not F or F.Part0~=Handle and F.Part1~=Handle then return end local J=N.Parent if J==Character then return end local O=J:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")if not O or O.Health==0 then return end local M=Players:GetPlayerFromCharacter(J)UntagHumanoid(O)TagHumanoid(O,Player)O:TakeDamage(Damage)end function Attack()Damage=DamageValues.SlashDamage Sounds.Slash:Play()if Humanoid then if Humanoid.RigType==Enum.HumanoidRigType.R6 then local N=Instance.new("\083\116\114\105\110\103\086\097\108\117\101")N.Name="\116\111\111\108\097\110\105\109"N.Value="\083\108\097\115\104"N.Parent=Tool elseif Humanoid.RigType==Enum.HumanoidRigType.R15 then local N=Tool:FindFirstChild("\082\049\053\083\108\097\115\104")if N then local U=Humanoid:LoadAnimation(N)U:Play(0)end end end end function Lunge()Damage=DamageValues.LungeDamage Sounds.Lunge:Play()if Humanoid then if Humanoid.RigType==Enum.HumanoidRigType.R6 then local N=Instance.new("\083\116\114\105\110\103\086\097\108\117\101")N.Name="\116\111\111\108\097\110\105\109"N.Value="\076\117\110\103\101"N.Parent=Tool elseif Humanoid.RigType==Enum.HumanoidRigType.R15 then local N=Tool:FindFirstChild("\082\049\053\076\117\110\103\101")if N then local U=Humanoid:LoadAnimation(N)U:Play(0)end end end wait(.2)Tool.Grip=Grips.Out wait(.6)Tool.Grip=Grips.Up Damage=DamageValues.SlashDamage end Tool.Enabled=true LastAttack=0 function Activated()if not Tool.Enabled or not ToolEquipped or not CheckIfAlive()then return end Tool.Enabled=false local N=RunService.Stepped:wait()if N-LastAttack<.2 then Lunge()else Attack()end LastAttack=N Damage=DamageValues.BaseDamage local U=Tool:FindFirstChild("\082\049\053\083\108\097\115\104")or(Create("\065\110\105\109\097\116\105\111\110"))({Name="\082\049\053\083\108\097\115\104",AnimationId=BaseUrl..Animations.R15Slash;Parent=Tool})local F=Tool:FindFirstChild("\082\049\053\076\117\110\103\101")or(Create("\065\110\105\109\097\116\105\111\110"))({Name="\082\049\053\076\117\110\103\101",AnimationId=BaseUrl..Animations.R15Lunge,Parent=Tool})Tool.Enabled=true end function CheckIfAlive()return(Player and(Player.Parent and(Character and(Character.Parent and(Humanoid and(Humanoid.Parent and(Humanoid.Health>0 and(Torso and Torso.Parent))))))))and true or false end function Equipped()Character=Tool.Parent Player=Players:GetPlayerFromCharacter(Character)Humanoid=Character:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")Torso=Character:FindFirstChild("\084\111\114\115\111")or Character:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")if not CheckIfAlive()then return end ToolEquipped=true Sounds.Unsheath:Play()end function Unequipped()Tool.Grip=Grips.Up ToolEquipped=false end Tool.Activated:Connect(Activated)Tool.Equipped:Connect(Equipped)Tool.Unequipped:Connect(Unequipped)Connection=Handle.Touched:Connect(Blow)
--For Omega Rainbow Katana thumbnail to display a lot of particles. for i, v in pairs(Handle:GetChildren()) do if v:IsA("ParticleEmitter") then v.Rate = 20 end end Tool.Grip = Grips.Up Tool.Enabled = true function IsTeamMate(Player1, Player2) return ( Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor ) end function TagHumanoid(humanoid, player) local Creator_Tag = Instance.new("ObjectValue") Creator_Tag.Name = "creator" Creator_Tag.Value = player Debris:AddItem(Creator_Tag, 2) Creator_Tag.Parent = humanoid end function UntagHumanoid(humanoid) for i, v in pairs(humanoid:GetChildren()) do if v:IsA("ObjectValue") and v.Name == "creator" then v:Destroy() end end end function Blow(Hit) if not Hit or not Hit.Parent or not CheckIfAlive() or not ToolEquipped then return end local RightArm = Character:FindFirstChild("Right Arm") or Character:FindFirstChild("RightHand") if not RightArm then return end local RightGrip = RightArm:FindFirstChild("RightGrip") if not RightGrip or (RightGrip.Part0 ~= Handle and RightGrip.Part1 ~= Handle) then return end local character = Hit.Parent if character == Character then return end local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid or humanoid.Health == 0 then return end local player = Players:GetPlayerFromCharacter(character) UntagHumanoid(humanoid) TagHumanoid(humanoid, Player) humanoid:TakeDamage(Damage) end function Attack() Damage = DamageValues.SlashDamage Sounds.Slash:Play() if Humanoid then if Humanoid.RigType == Enum.HumanoidRigType.R6 then local Anim = Instance.new("StringValue") Anim.Name = "toolanim" Anim.Value = "Slash" Anim.Parent = Tool elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then local Anim = Tool:FindFirstChild("R15Slash") if Anim then local Track = Humanoid:LoadAnimation(Anim) Track:Play(0) end end end end function Lunge() Damage = DamageValues.LungeDamage Sounds.Lunge:Play() if Humanoid then if Humanoid.RigType == Enum.HumanoidRigType.R6 then local Anim = Instance.new("StringValue") Anim.Name = "toolanim" Anim.Value = "Lunge" Anim.Parent = Tool elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then local Anim = Tool:FindFirstChild("R15Lunge") if Anim then local Track = Humanoid:LoadAnimation(Anim) Track:Play(0) end end end --[[ if CheckIfAlive() then local Force = Instance.new("BodyVelocity") Force.velocity = Vector3.new(0, 10, 0) Force.maxForce = Vector3.new(0, 4000, 0) Debris:AddItem(Force, 0.4) Force.Parent = Torso end ]] wait(0.2) Tool.Grip = Grips.Out wait(0.6) Tool.Grip = Grips.Up Damage = DamageValues.SlashDamage end Tool.Enabled = true LastAttack = 0 function Activated() if not Tool.Enabled or not ToolEquipped or not CheckIfAlive() then return end Tool.Enabled = false local Tick = RunService.Stepped:wait() if Tick - LastAttack < 0.2 then Lunge() else Attack() end LastAttack = Tick --wait(0.5) Damage = DamageValues.BaseDamage local SlashAnim = ( Tool:FindFirstChild("R15Slash") or Create("Animation")({ Name = "R15Slash", AnimationId = BaseUrl .. Animations.R15Slash, Parent = Tool, }) ) local LungeAnim = ( Tool:FindFirstChild("R15Lunge") or Create("Animation")({ Name = "R15Lunge", AnimationId = BaseUrl .. Animations.R15Lunge, Parent = Tool, }) ) Tool.Enabled = true end function CheckIfAlive() return ( ( ( Player and Player.Parent and Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Torso and Torso.Parent ) and true ) or false ) end function Equipped() Character = Tool.Parent Player = Players:GetPlayerFromCharacter(Character) Humanoid = Character:FindFirstChildOfClass("Humanoid") Torso = Character:FindFirstChild("Torso") or Character:FindFirstChild("HumanoidRootPart") if not CheckIfAlive() then return end ToolEquipped = true Sounds.Unsheath:Play() end function Unequipped() Tool.Grip = Grips.Up ToolEquipped = false end Tool.Activated:Connect(Activated) Tool.Equipped:Connect(Equipped) Tool.Unequipped:Connect(Unequipped) Connection = Handle.Touched:Connect(Blow)
function DoorClose()if Shaft00.MetalDoor.CanCollide==false then Shaft00.MetalDoor.CanCollide=true while Shaft00.MetalDoor.Transparency>.0 do Shaft00.MetalDoor.Transparency=Shaft00.MetalDoor.Transparency-.1 wait(1e-06)end Car.BodyVelocity.velocity=Vector3.new(0,20,0)end if Shaft01.MetalDoor.CanCollide==false then Shaft01.MetalDoor.CanCollide=true while Shaft01.MetalDoor.Transparency>.0 do Shaft01.MetalDoor.Transparency=Shaft01.MetalDoor.Transparency-.1 wait(1e-06)end Car.BodyVelocity.velocity=Vector3.new(0,20,0)end if Shaft02.MetalDoor.CanCollide==false then Shaft02.MetalDoor.CanCollide=true while Shaft02.MetalDoor.Transparency>.0 do Shaft02.MetalDoor.Transparency=Shaft02.MetalDoor.Transparency-.1 wait(1e-06)end Car.BodyVelocity.velocity=Vector3.new(0,20,0)end if Shaft03.MetalDoor.CanCollide==false then Shaft03.MetalDoor.CanCollide=true while Shaft03.MetalDoor.Transparency>.0 do Shaft03.MetalDoor.Transparency=Shaft03.MetalDoor.Transparency-.1 wait(1e-06)end end if Shaft04.MetalDoor.CanCollide==false then Shaft04.MetalDoor.CanCollide=true while Shaft04.MetalDoor.Transparency>.0 do Shaft04.MetalDoor.Transparency=Shaft04.MetalDoor.Transparency-.1 wait(1e-06)end Car.BodyVelocity.velocity=Vector3.new(0,-20,0)end if Shaft05.MetalDoor.CanCollide==false then Shaft05.MetalDoor.CanCollide=true while Shaft05.MetalDoor.Transparency>.0 do Shaft05.MetalDoor.Transparency=Shaft05.MetalDoor.Transparency-.1 wait(1e-06)end Car.BodyVelocity.velocity=Vector3.new(0,-20,0)end if Shaft06.MetalDoor.CanCollide==false then Shaft06.MetalDoor.CanCollide=true while Shaft06.MetalDoor.Transparency>.0 do Shaft06.MetalDoor.Transparency=Shaft06.MetalDoor.Transparency-.1 wait(1e-06)end Car.BodyVelocity.velocity=Vector3.new(0,-20,0)end if Shaft07.MetalDoor.CanCollide==false then Shaft07.MetalDoor.CanCollide=true while Shaft07.MetalDoor.Transparency>.0 do Shaft07.MetalDoor.Transparency=Shaft07.MetalDoor.Transparency-.1 wait(1e-06)end Car.BodyVelocity.velocity=Vector3.new(0,-20,0)end if Shaft08.MetalDoor.CanCollide==false then Shaft08.MetalDoor.CanCollide=true while Shaft08.MetalDoor.Transparency>.0 do Shaft08.MetalDoor.Transparency=Shaft08.MetalDoor.Transparency-.1 wait(1e-06)end Car.BodyVelocity.velocity=Vector3.new(0,-20,0)end if Shaft09.MetalDoor.CanCollide==false then Shaft09.MetalDoor.CanCollide=true while Shaft09.MetalDoor.Transparency>.0 do Shaft09.MetalDoor.Transparency=Shaft09.MetalDoor.Transparency-.1 wait(1e-06)end Car.BodyVelocity.velocity=Vector3.new(0,-20,0)end if Shaft10.MetalDoor.CanCollide==false then Shaft10.MetalDoor.CanCollide=true while Shaft10.MetalDoor.Transparency>.0 do Shaft10.MetalDoor.Transparency=Shaft10.MetalDoor.Transparency-.1 wait(1e-06)end Car.BodyVelocity.velocity=Vector3.new(0,-20,0)end if Shaft11.MetalDoor.CanCollide==false then Shaft11.MetalDoor.CanCollide=true while Shaft11.MetalDoor.Transparency>.0 do Shaft11.MetalDoor.Transparency=Shaft11.MetalDoor.Transparency-.1 wait(1e-06)end Car.BodyVelocity.velocity=Vector3.new(0,-20,0)end if Shaft12.MetalDoor.CanCollide==false then Shaft12.MetalDoor.CanCollide=true while Shaft12.MetalDoor.Transparency>.0 do Shaft12.MetalDoor.Transparency=Shaft12.MetalDoor.Transparency-.1 wait(1e-06)end Car.BodyVelocity.velocity=Vector3.new(0,-20,0)end if Shaft13.MetalDoor.CanCollide==false then Shaft13.MetalDoor.CanCollide=true while Shaft13.MetalDoor.Transparency>.0 do Shaft13.MetalDoor.Transparency=Shaft13.MetalDoor.Transparency-.1 wait(1e-06)end Car.BodyVelocity.velocity=Vector3.new(0,-20,0)end end function onClicked()DoorClose()end script.Parent.MouseButton1Click:connect(onClicked)script.Parent.MouseButton1Click:connect(function()if clicker==true then clicker=false else return end end)script.Parent.MouseButton1Click:connect(function()Car.Touched:connect(function(N)if N==Elevator.Floors:FindFirstChild(script.Parent.Name)then StopE()DoorOpen()end end)end)function StopE()Car.BodyVelocity.velocity=Vector3.new(0,0,0)Car.BodyPosition.position=(Elevator.Floors:FindFirstChild(script.Parent.Name)).Position clicker=true end function DoorOpen()while Shaft03.MetalDoor.Transparency<1.0 do Shaft03.MetalDoor.Transparency=Shaft03.MetalDoor.Transparency+.1 wait(1e-06)end Shaft03.MetalDoor.CanCollide=false end
------------------------- function DoorClose() if Shaft00.MetalDoor.CanCollide == false then Shaft00.MetalDoor.CanCollide = true while Shaft00.MetalDoor.Transparency > 0.0 do Shaft00.MetalDoor.Transparency = Shaft00.MetalDoor.Transparency - 0.1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) --Change 10 to change the speed. end if Shaft01.MetalDoor.CanCollide == false then Shaft01.MetalDoor.CanCollide = true while Shaft01.MetalDoor.Transparency > 0.0 do Shaft01.MetalDoor.Transparency = Shaft01.MetalDoor.Transparency - 0.1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft02.MetalDoor.CanCollide == false then Shaft02.MetalDoor.CanCollide = true while Shaft02.MetalDoor.Transparency > 0.0 do Shaft02.MetalDoor.Transparency = Shaft02.MetalDoor.Transparency - 0.1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft03.MetalDoor.CanCollide == false then Shaft03.MetalDoor.CanCollide = true while Shaft03.MetalDoor.Transparency > 0.0 do Shaft03.MetalDoor.Transparency = Shaft03.MetalDoor.Transparency - 0.1 wait(0.000001) end end if Shaft04.MetalDoor.CanCollide == false then Shaft04.MetalDoor.CanCollide = true while Shaft04.MetalDoor.Transparency > 0.0 do Shaft04.MetalDoor.Transparency = Shaft04.MetalDoor.Transparency - 0.1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end if Shaft05.MetalDoor.CanCollide == false then Shaft05.MetalDoor.CanCollide = true while Shaft05.MetalDoor.Transparency > 0.0 do Shaft05.MetalDoor.Transparency = Shaft05.MetalDoor.Transparency - 0.1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end if Shaft06.MetalDoor.CanCollide == false then Shaft06.MetalDoor.CanCollide = true while Shaft06.MetalDoor.Transparency > 0.0 do Shaft06.MetalDoor.Transparency = Shaft06.MetalDoor.Transparency - 0.1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end if Shaft07.MetalDoor.CanCollide == false then Shaft07.MetalDoor.CanCollide = true while Shaft07.MetalDoor.Transparency > 0.0 do Shaft07.MetalDoor.Transparency = Shaft07.MetalDoor.Transparency - 0.1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end if Shaft08.MetalDoor.CanCollide == false then Shaft08.MetalDoor.CanCollide = true while Shaft08.MetalDoor.Transparency > 0.0 do Shaft08.MetalDoor.Transparency = Shaft08.MetalDoor.Transparency - 0.1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end if Shaft09.MetalDoor.CanCollide == false then Shaft09.MetalDoor.CanCollide = true while Shaft09.MetalDoor.Transparency > 0.0 do Shaft09.MetalDoor.Transparency = Shaft09.MetalDoor.Transparency - 0.1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end if Shaft10.MetalDoor.CanCollide == false then Shaft10.MetalDoor.CanCollide = true while Shaft10.MetalDoor.Transparency > 0.0 do Shaft10.MetalDoor.Transparency = Shaft10.MetalDoor.Transparency - 0.1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end if Shaft11.MetalDoor.CanCollide == false then Shaft11.MetalDoor.CanCollide = true while Shaft11.MetalDoor.Transparency > 0.0 do Shaft11.MetalDoor.Transparency = Shaft11.MetalDoor.Transparency - 0.1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end if Shaft12.MetalDoor.CanCollide == false then Shaft12.MetalDoor.CanCollide = true while Shaft12.MetalDoor.Transparency > 0.0 do Shaft12.MetalDoor.Transparency = Shaft12.MetalDoor.Transparency - 0.1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end if Shaft13.MetalDoor.CanCollide == false then Shaft13.MetalDoor.CanCollide = true while Shaft13.MetalDoor.Transparency > 0.0 do Shaft13.MetalDoor.Transparency = Shaft13.MetalDoor.Transparency - 0.1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end end function onClicked() DoorClose() end script.Parent.MouseButton1Click:connect(onClicked) script.Parent.MouseButton1Click:connect(function() if clicker == true then clicker = false else return end end) script.Parent.MouseButton1Click:connect(function() Car.Touched:connect(function(otherPart) if otherPart == Elevator.Floors:FindFirstChild(script.Parent.Name) then StopE() DoorOpen() end end) end) function StopE() Car.BodyVelocity.velocity = Vector3.new(0, 0, 0) Car.BodyPosition.position = Elevator.Floors:FindFirstChild(script.Parent.Name).Position clicker = true end function DoorOpen() while Shaft03.MetalDoor.Transparency < 1.0 do Shaft03.MetalDoor.Transparency = Shaft03.MetalDoor.Transparency + 0.1 wait(0.000001) end Shaft03.MetalDoor.CanCollide = false end
local N={TypeMethods=Util.MakeDictionary({"\084\114\097\110\115\102\111\114\109";"\086\097\108\105\100\097\116\101";"\065\117\116\111\099\111\109\112\108\101\116\101","\080\097\114\115\101","\068\105\115\112\108\097\121\078\097\109\101","\076\105\115\116\097\098\108\101";"\086\097\108\105\100\097\116\101\079\110\099\101","\080\114\101\102\105\120\101\115";"\068\101\102\097\117\108\116"});CommandMethods=Util.MakeDictionary({"\078\097\109\101";"\065\108\105\097\115\101\115";"\065\117\116\111\069\120\101\099","\068\101\115\099\114\105\112\116\105\111\110";"\065\114\103\115","\082\117\110","\067\108\105\101\110\116\082\117\110";"\068\097\116\097";"\071\114\111\117\112"}),CommandArgProps=Util.MakeDictionary({"\078\097\109\101";"\084\121\112\101";"\068\101\115\099\114\105\112\116\105\111\110";"\079\112\116\105\111\110\097\108";"\068\101\102\097\117\108\116"});Types={},TypeAliases={};Commands={},CommandsArray={},Cmdr=nil,Hooks={BeforeRun={};AfterRun={}};Stores=setmetatable({},{__index=function(N,U)N[U]={}return N[U]end}),AutoExecBuffer={}}
--- The registry keeps track of all the commands and types that Cmdr knows about. local Registry = { TypeMethods = Util.MakeDictionary({ "Transform", "Validate", "Autocomplete", "Parse", "DisplayName", "Listable", "ValidateOnce", "Prefixes", "Default", }), CommandMethods = Util.MakeDictionary({ "Name", "Aliases", "AutoExec", "Description", "Args", "Run", "ClientRun", "Data", "Group", }), CommandArgProps = Util.MakeDictionary({ "Name", "Type", "Description", "Optional", "Default" }), Types = {}, TypeAliases = {}, Commands = {}, CommandsArray = {}, Cmdr = nil, Hooks = { BeforeRun = {}, AfterRun = {}, }, Stores = setmetatable({}, { __index = function(self, k) self[k] = {} return self[k] end, }), AutoExecBuffer = {}, }
local N=_Tune.WeightScaling*10 local U=_Tune.FBrakeForce local F=_Tune.RBrakeForce local J=_Tune.PBrakeForce if not workspace:PGSIsEnabled()then N=_Tune.LegacyScaling*10 U=_Tune.FLgcyBForce F=_Tune.RLgcyBForce J=_Tune.LgcyPBForce end
--[[Output Scaling Factor]] local hpScaling = _Tune.WeightScaling * 10 local FBrakeForce = _Tune.FBrakeForce local RBrakeForce = _Tune.RBrakeForce local PBrakeForce = _Tune.PBrakeForce if not workspace:PGSIsEnabled() then hpScaling = _Tune.LegacyScaling * 10 FBrakeForce = _Tune.FLgcyBForce RBrakeForce = _Tune.RLgcyBForce PBrakeForce = _Tune.LgcyPBForce end
function onChildAdded(N)if N.Name=="\083\101\097\116\087\101\108\100"then local U=N.part1.Parent:findFirstChild("\072\117\109\097\110\111\105\100")if U~=nil then print("\072\117\109\097\110 \073\078")seat.Car.CarName.Value=U.Parent.Name.."\'\115 \067\097\114"seat.Parent.Name=U.Parent.Name.."\'\115 \067\097\114";(s.Parent.Car:clone()).Parent=(game.Players:findFirstChild(U.Parent.Name)).PlayerGui end end end function onChildRemoved(N)if N.Name=="\083\101\097\116\087\101\108\100"then local U=N.part1.Parent:findFirstChild("\072\117\109\097\110\111\105\100")if U~=nil then print("\072\117\109\097\110 \079\085\084")seat.Parent.Name="\069\109\112\116\121 \067\097\114"seat.Car.CarName.Value="\069\109\112\116\121 \067\097\114";(game.Players:findFirstChild(U.Parent.Name)).PlayerGui.Car:remove()end end end script.Parent.ChildAdded:connect(onChildAdded)script.Parent.ChildRemoved:connect(onChildRemoved)
--------------------------------------------------------------- function onChildAdded(child) if child.Name == "SeatWeld" then local human = child.part1.Parent:findFirstChild("Humanoid") if human ~= nil then print("Human IN") seat.Car.CarName.Value = human.Parent.Name .. "'s Car" seat.Parent.Name = human.Parent.Name .. "'s Car" s.Parent.Car:clone().Parent = game.Players:findFirstChild(human.Parent.Name).PlayerGui end end end function onChildRemoved(child) if child.Name == "SeatWeld" then local human = child.part1.Parent:findFirstChild("Humanoid") if human ~= nil then print("Human OUT") seat.Parent.Name = "Empty Car" seat.Car.CarName.Value = "Empty Car" game.Players:findFirstChild(human.Parent.Name).PlayerGui.Car:remove() end end end script.Parent.ChildAdded:connect(onChildAdded) script.Parent.ChildRemoved:connect(onChildRemoved)
Humanoid.Died:Connect(function()for N,U in pairs(Character:GetDescendants())do if U:IsA("\077\111\116\111\114\054\068")then local N=Instance.new("\065\116\116\097\099\104\109\101\110\116")N.Parent=U.Part0 N.CFrame=U.C0 local F=Instance.new("\065\116\116\097\099\104\109\101\110\116")F.Parent=U.Part1 F.CFrame=U.C1 local J=Instance.new("\066\097\108\108\083\111\099\107\101\116\067\111\110\115\116\114\097\105\110\116")J.Parent=U.Parent J.Attachment0=N J.Attachment1=F U:Destroy()elseif U.Name=="\072\101\097\100"and U:IsA("\066\097\115\101\080\097\114\116")then local N=Instance.new("\087\101\108\100\067\111\110\115\116\114\097\105\110\116")N.Parent=U N.Part0=U N.Part1=HRP end end end)
--//Controller/-- Humanoid.Died:Connect(function() for i, Joint in pairs(Character:GetDescendants()) do if Joint:IsA("Motor6D") then local A0 = Instance.new("Attachment") A0.Parent = Joint.Part0 A0.CFrame = Joint.C0 local A1 = Instance.new("Attachment") A1.Parent = Joint.Part1 A1.CFrame = Joint.C1 local BallSocketConstraint = Instance.new("BallSocketConstraint") BallSocketConstraint.Parent = Joint.Parent BallSocketConstraint.Attachment0 = A0 BallSocketConstraint.Attachment1 = A1 Joint:Destroy() elseif Joint.Name == "Head" and Joint:IsA("BasePart") then local WeldConstraint = Instance.new("WeldConstraint") WeldConstraint.Parent = Joint WeldConstraint.Part0 = Joint WeldConstraint.Part1 = HRP end end end)
Tune.LoadDelay=.1 Tune.AutoStart=true Tune.AutoFlip=true
--[[Misc]] Tune.LoadDelay = 0.1 -- Delay before initializing chassis (in seconds) Tune.AutoStart = true -- Set to false if using manual ignition plugin Tune.AutoFlip = true -- Set to false if using manual flip plugin
local N={About={"\073\110\102\111";"\085\112\100\097\116\101\115";"\067\114\101\100\105\116\115"},Commands={"\067\111\109\109\097\110\100\115","\077\111\114\112\104\115";"\068\101\116\097\105\108\115"},Special={"\068\111\110\111\114";"\067\111\109\105\110\103 \115\111\111\110"},Admin={"\082\097\110\107\115";"\083\101\114\118\101\114 \082\097\110\107\115","\066\097\110\108\097\110\100"};Settings={"\067\117\115\116\111\109"}}local U=main.gui.MainFrame local F=main.gui.CustomTopBar local J=F.ImageButton local O=U.Pages local M=O.Home local z=true
-- << VARIABLES >> local subPageOrders = { ["About"] = { "Info", "Updates", "Credits" }, --["Commands"] = {"Commands", "VoiceChat", "Morphs", "Details"}; ["Commands"] = { "Commands", "Morphs", "Details" }, ["Special"] = { "Donor", "Coming soon" }, ["Admin"] = { "Ranks", "Server Ranks", "Banland" }, ["Settings"] = { "Custom" }, } local mainFrame = main.gui.MainFrame local TopBarFrame = main.gui.CustomTopBar local TopBarButton = TopBarFrame.ImageButton local pages = mainFrame.Pages local currentPage = pages.Home local guiDe = true
hitPart.Touched:Connect(function(N)if debounce==true then if N.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then local U=game.Players:FindFirstChild(N.Parent.Name)if U then debounce=false hitPart.BrickColor=BrickColor.new("\066\114\105\103\104\116 \114\101\100");(tool:Clone()).Parent=U.Backpack wait(3)debounce=true hitPart.BrickColor=BrickColor.new("\066\114\105\103\104\116 \103\114\101\101\110")end end end end)
-- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage hitPart.Touched:Connect(function(hit) if debounce == true then if hit.Parent:FindFirstChild("Humanoid") then local plr = game.Players:FindFirstChild(hit.Parent.Name) if plr then debounce = false hitPart.BrickColor = BrickColor.new("Bright red") tool:Clone().Parent = plr.Backpack wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again debounce = true hitPart.BrickColor = BrickColor.new("Bright green") end end end end)
xSSR.Anchored=true xSSL.Anchored=true zBRR.Anchored=true zBRL.Anchored=true weight.Rotation=alig.Rotation engine.Rotation=alig.Rotation fuel.Rotation=alig.Rotation diff.Rotation=alig.Rotation trans.Rotation=alig.Rotation hitboxF.Rotation=alig.Rotation hitboxR.Rotation=alig.Rotation alig:remove()xSSR.CFrame=xSSR.CFrame*CFrame.Angles(math.rad(0),math.rad(0),math.rad(CamberFront*-1))xSSL.CFrame=xSSL.CFrame*CFrame.Angles(math.rad(0),math.rad(0),math.rad(CamberFront*1))zBRR.CFrame=zBRR.CFrame*CFrame.Angles(math.rad(0),math.rad(0),math.rad(CamberRear*-1))zBRL.CFrame=zBRL.CFrame*CFrame.Angles(math.rad(0),math.rad(0),math.rad(CamberRear*1))if Drivetrain=="\070\087\068"then vRdifferential.Value=0 elseif Drivetrain=="\082\087\068"then vFdifferential.Value=0 end script.Parent.CFrame=script.Parent.CFrame*CFrame.Angles(math.rad(-0.59),math.rad(0),math.rad(0))local N=script.Assets.Screen:Clone()N.Parent=script.Parent local U=script.Assets.BodyWeld:Clone()U.Parent=script.Parent.Parent U.Disabled=false for N,U in pairs(script.Parent.Parent.Parent:GetChildren())do local F=script.Assets.Weld:Clone()if U.Name~="\087\104\101\101\108\115"and U.Name~="\066\111\100\121"then F.Parent=U end F.Disabled=false end for N,U in pairs(script.Parent.Parent.Parent.Wheels:GetChildren())do local F=script.Assets.Weld:Clone()F.Parent=U F.Disabled=false end
--Initialization-- xSSR.Anchored = true xSSL.Anchored = true zBRR.Anchored = true zBRL.Anchored = true weight.Rotation = alig.Rotation engine.Rotation = alig.Rotation fuel.Rotation = alig.Rotation diff.Rotation = alig.Rotation trans.Rotation = alig.Rotation hitboxF.Rotation = alig.Rotation hitboxR.Rotation = alig.Rotation alig:remove() xSSR.CFrame = xSSR.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(CamberFront * -1)) xSSL.CFrame = xSSL.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(CamberFront * 1)) zBRR.CFrame = zBRR.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(CamberRear * -1)) zBRL.CFrame = zBRL.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(CamberRear * 1)) if Drivetrain == "FWD" then vRdifferential.Value = 0 elseif Drivetrain == "RWD" then vFdifferential.Value = 0 end script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(math.rad(-0.59), math.rad(0), math.rad(0)) local D = script.Assets.Screen:Clone() D.Parent = script.Parent local bodyweld = script.Assets.BodyWeld:Clone() bodyweld.Parent = script.Parent.Parent bodyweld.Disabled = false for _, i in pairs(script.Parent.Parent.Parent:GetChildren()) do local new = script.Assets.Weld:Clone() if i.Name ~= "Wheels" and i.Name ~= "Body" then new.Parent = i end new.Disabled = false end for _, i in pairs(script.Parent.Parent.Parent.Wheels:GetChildren()) do local new = script.Assets.Weld:Clone() new.Parent = i new.Disabled = false end
local N={}N.__index=N function N.CreateGuiObjects(U,N)U.ChatBarParentFrame=N local F=7 local J=5 local O=Instance.new("\070\114\097\109\101")O.Selectable=false O.Size=UDim2.new(1,0,1,0)O.BackgroundTransparency=.6 O.BorderSizePixel=0 O.BackgroundColor3=ChatSettings.ChatBarBackGroundColor O.Parent=N local M=Instance.new("\070\114\097\109\101")M.Selectable=false M.Name="\066\111\120\070\114\097\109\101"M.BackgroundTransparency=.6 M.BorderSizePixel=0 M.BackgroundColor3=ChatSettings.ChatBarBoxColor M.Size=UDim2.new(1,-F*2,1,-F*2)M.Position=UDim2.new(0,F,0,F)M.Parent=O local z=Instance.new("\070\114\097\109\101")z.BackgroundTransparency=1 z.Size=UDim2.new(1,-J*2,1,-J*2)z.Position=UDim2.new(0,J,0,J)z.Parent=M local e=Instance.new("\084\101\120\116\066\111\120")e.Selectable=ChatSettings.GamepadNavigationEnabled e.Name="\067\104\097\116\066\097\114"e.BackgroundTransparency=1 e.Size=UDim2.new(1,0,1,0)e.Position=UDim2.new(0,0,0,0)e.TextSize=ChatSettings.ChatBarTextSize e.Font=ChatSettings.ChatBarFont e.TextColor3=ChatSettings.ChatBarTextColor e.TextTransparency=.4 e.TextStrokeTransparency=1 e.ClearTextOnFocus=false e.TextXAlignment=Enum.TextXAlignment.Left e.TextYAlignment=Enum.TextYAlignment.Top e.TextWrapped=true e.Text=""e.Parent=z local v=Instance.new("\084\101\120\116\066\117\116\116\111\110")v.Selectable=false v.Name="\077\101\115\115\097\103\101\077\111\100\101"v.BackgroundTransparency=1 v.Position=UDim2.new(0,0,0,0)v.TextSize=ChatSettings.ChatBarTextSize v.Font=ChatSettings.ChatBarFont v.TextXAlignment=Enum.TextXAlignment.Left v.TextWrapped=true v.Text=""v.Size=UDim2.new(0,0,0,0)v.TextYAlignment=Enum.TextYAlignment.Center v.TextColor3=U:GetDefaultChannelNameColor()v.Visible=true v.Parent=z local w=Instance.new("\084\101\120\116\076\097\098\101\108")w.Selectable=false w.TextWrapped=true w.BackgroundTransparency=1 w.Size=e.Size w.Position=e.Position w.TextSize=e.TextSize w.Font=e.Font w.TextColor3=e.TextColor3 w.TextTransparency=e.TextTransparency w.TextStrokeTransparency=e.TextStrokeTransparency w.TextXAlignment=e.TextXAlignment w.TextYAlignment=e.TextYAlignment w.Text="\046\046\046"w.Parent=z U.GuiObject=O U.TextBox=e U.TextLabel=w U.GuiObjects.BaseFrame=O U.GuiObjects.TextBoxFrame=M U.GuiObjects.TextBox=e U.GuiObjects.TextLabel=w U.GuiObjects.MessageModeTextButton=v U:AnimGuiObjects()U:SetUpTextBoxEvents(e,w,v)if U.UserHasChatOff then U:DoLockChatBar()end U.eGuiObjectsChanged:Fire()end
--////////////////////////////// Methods --////////////////////////////////////// local methods = {} methods.__index = methods function methods:CreateGuiObjects(targetParent) self.ChatBarParentFrame = targetParent local backgroundImagePixelOffset = 7 local textBoxPixelOffset = 5 local BaseFrame = Instance.new("Frame") BaseFrame.Selectable = false BaseFrame.Size = UDim2.new(1, 0, 1, 0) BaseFrame.BackgroundTransparency = 0.6 BaseFrame.BorderSizePixel = 0 BaseFrame.BackgroundColor3 = ChatSettings.ChatBarBackGroundColor BaseFrame.Parent = targetParent local BoxFrame = Instance.new("Frame") BoxFrame.Selectable = false BoxFrame.Name = "BoxFrame" BoxFrame.BackgroundTransparency = 0.6 BoxFrame.BorderSizePixel = 0 BoxFrame.BackgroundColor3 = ChatSettings.ChatBarBoxColor BoxFrame.Size = UDim2.new(1, -backgroundImagePixelOffset * 2, 1, -backgroundImagePixelOffset * 2) BoxFrame.Position = UDim2.new(0, backgroundImagePixelOffset, 0, backgroundImagePixelOffset) BoxFrame.Parent = BaseFrame local TextBoxHolderFrame = Instance.new("Frame") TextBoxHolderFrame.BackgroundTransparency = 1 TextBoxHolderFrame.Size = UDim2.new(1, -textBoxPixelOffset * 2, 1, -textBoxPixelOffset * 2) TextBoxHolderFrame.Position = UDim2.new(0, textBoxPixelOffset, 0, textBoxPixelOffset) TextBoxHolderFrame.Parent = BoxFrame local TextBox = Instance.new("TextBox") TextBox.Selectable = ChatSettings.GamepadNavigationEnabled TextBox.Name = "ChatBar" TextBox.BackgroundTransparency = 1 TextBox.Size = UDim2.new(1, 0, 1, 0) TextBox.Position = UDim2.new(0, 0, 0, 0) TextBox.TextSize = ChatSettings.ChatBarTextSize TextBox.Font = ChatSettings.ChatBarFont TextBox.TextColor3 = ChatSettings.ChatBarTextColor TextBox.TextTransparency = 0.4 TextBox.TextStrokeTransparency = 1 TextBox.ClearTextOnFocus = false TextBox.TextXAlignment = Enum.TextXAlignment.Left TextBox.TextYAlignment = Enum.TextYAlignment.Top TextBox.TextWrapped = true TextBox.Text = "" TextBox.Parent = TextBoxHolderFrame local MessageModeTextButton = Instance.new("TextButton") MessageModeTextButton.Selectable = false MessageModeTextButton.Name = "MessageMode" MessageModeTextButton.BackgroundTransparency = 1 MessageModeTextButton.Position = UDim2.new(0, 0, 0, 0) MessageModeTextButton.TextSize = ChatSettings.ChatBarTextSize MessageModeTextButton.Font = ChatSettings.ChatBarFont MessageModeTextButton.TextXAlignment = Enum.TextXAlignment.Left MessageModeTextButton.TextWrapped = true MessageModeTextButton.Text = "" MessageModeTextButton.Size = UDim2.new(0, 0, 0, 0) MessageModeTextButton.TextYAlignment = Enum.TextYAlignment.Center MessageModeTextButton.TextColor3 = self:GetDefaultChannelNameColor() MessageModeTextButton.Visible = true MessageModeTextButton.Parent = TextBoxHolderFrame local TextLabel = Instance.new("TextLabel") TextLabel.Selectable = false TextLabel.TextWrapped = true TextLabel.BackgroundTransparency = 1 TextLabel.Size = TextBox.Size TextLabel.Position = TextBox.Position TextLabel.TextSize = TextBox.TextSize TextLabel.Font = TextBox.Font TextLabel.TextColor3 = TextBox.TextColor3 TextLabel.TextTransparency = TextBox.TextTransparency TextLabel.TextStrokeTransparency = TextBox.TextStrokeTransparency TextLabel.TextXAlignment = TextBox.TextXAlignment TextLabel.TextYAlignment = TextBox.TextYAlignment TextLabel.Text = "..." TextLabel.Parent = TextBoxHolderFrame self.GuiObject = BaseFrame self.TextBox = TextBox self.TextLabel = TextLabel self.GuiObjects.BaseFrame = BaseFrame self.GuiObjects.TextBoxFrame = BoxFrame self.GuiObjects.TextBox = TextBox self.GuiObjects.TextLabel = TextLabel self.GuiObjects.MessageModeTextButton = MessageModeTextButton self:AnimGuiObjects() self:SetUpTextBoxEvents(TextBox, TextLabel, MessageModeTextButton) if self.UserHasChatOff then self:DoLockChatBar() end self.eGuiObjectsChanged:Fire() end
local function N(N,U,F)return U+(F-U)*math.min(string.len(N)/75.0,1.0)end local function U()local N={}N.data={}local U=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")N.Emptied=U.Event function N.Size(U)return#N.data end function N.Empty(U)return N:Size()<=0 end function N.PopFront(F)table.remove(N.data,1)if N:Empty()then U:Fire()end end function N.Front(U)return N.data[1]end function N.Get(F,U)return N.data[U]end function N.PushBack(F,U)table.insert(N.data,U)end function N.GetData(U)return N.data end return N end local function F()local N={}N.Fifo=U()N.BillboardGui=nil return N end local function J()local N={}N.data={}local U=0 function N.Size(N)return U end function N.Erase(J,F)if N.data[F]then U=U-1 end N.data[F]=nil end function N.Set(O,F,J)N.data[F]=J if J then U=U+1 end end function N.Get(J,U)if not U then return end if not N.data[U]then N.data[U]=F()local J=nil J=N.data[U].Fifo.Emptied:connect(function()J:disconnect()N:Erase(U)end)end return N.data[U]end function N.GetData(U)return N.data end return N end local function O(U,F,J)local O={}function O.ComputeBubbleLifetime(J,U,F)if F then return N(U,8,15)else return N(U,12,20)end end O.Origin=nil O.RenderBubble=nil O.Message=U O.BubbleDieDelay=O:ComputeBubbleLifetime(U,J)O.BubbleColor=F O.IsLocalPlayer=J return O end local function M(N,U,F)local J=O(U,BubbleColor.WHITE,F)if N then J.User=N.Name J.Origin=N.Character end return J end local function z(N,U,F,J)local M=O(U,J,F)M.Origin=N return M end function createChatBubbleMain(N,U)local F=Instance.new("\073\109\097\103\101\076\097\098\101\108")F.Name="\067\104\097\116\066\117\098\098\108\101"F.ScaleType=Enum.ScaleType.Slice F.SliceCenter=U F.Image="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047"..(tostring(N).."\046\112\110\103")F.BackgroundTransparency=1 F.BorderSizePixel=0 F.Size=UDim2.new(1.0,0,1.0,0)F.Position=UDim2.new(0,0,0,0)return F end function createChatBubbleTail(N,U)local F=Instance.new("\073\109\097\103\101\076\097\098\101\108")F.Name="\067\104\097\116\066\117\098\098\108\101\084\097\105\108"F.Image="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047\117\105\047\100\105\097\108\111\103\095\116\097\105\108\046\112\110\103"F.BackgroundTransparency=1 F.BorderSizePixel=0 F.Position=N F.Size=U return F end function createChatBubbleWithTail(N,U,F,J)local O=createChatBubbleMain(N,J)local M=createChatBubbleTail(U,F)M.Parent=O return O end function createScaledChatBubbleWithTail(N,U,F,J)local O=createChatBubbleMain(N,J)local M=Instance.new("\070\114\097\109\101")M.Name="\067\104\097\116\066\117\098\098\108\101\084\097\105\108\070\114\097\109\101"M.BackgroundTransparency=1 M.SizeConstraint=Enum.SizeConstraint.RelativeXX M.Position=UDim2.new(.5,0,1,0)M.Size=UDim2.new(U,0,U,0)M.Parent=O local z=createChatBubbleTail(F,UDim2.new(1,0,.5,0))z.Parent=M return O end function createChatImposter(N,U,F)local J=Instance.new("\073\109\097\103\101\076\097\098\101\108")J.Name="\068\105\097\108\111\103\080\108\097\099\101\104\111\108\100\101\114"J.Image="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047"..(tostring(N).."\046\112\110\103")J.BackgroundTransparency=1 J.BorderSizePixel=0 J.Position=UDim2.new(0,0,-1.25,0)J.Size=UDim2.new(1,0,1,0)local O=Instance.new("\073\109\097\103\101\076\097\098\101\108")O.Name="\068\111\116\068\111\116\068\111\116"O.Image="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047"..(tostring(U).."\046\112\110\103")O.BackgroundTransparency=1 O.BorderSizePixel=0 O.Position=UDim2.new(.001,0,F,0)O.Size=UDim2.new(1,0,.7,0)O.Parent=J return J end local e={}e.ChatBubble={}e.ChatBubbleWithTail={}e.ScalingChatBubbleWithTail={}e.CharacterSortedMsg=J()
--[[ FUNCTIONS ]] local function lerpLength(msg, min, max) return min + (max - min) * math.min(string.len(msg) / 75.0, 1.0) end local function createFifo() local this = {} this.data = {} local emptyEvent = Instance.new("BindableEvent") this.Emptied = emptyEvent.Event function this:Size() return #this.data end function this:Empty() return this:Size() <= 0 end function this:PopFront() table.remove(this.data, 1) if this:Empty() then emptyEvent:Fire() end end function this:Front() return this.data[1] end function this:Get(index) return this.data[index] end function this:PushBack(value) table.insert(this.data, value) end function this:GetData() return this.data end return this end local function createCharacterChats() local this = {} this.Fifo = createFifo() this.BillboardGui = nil return this end local function createMap() local this = {} this.data = {} local count = 0 function this:Size() return count end function this:Erase(key) if this.data[key] then count = count - 1 end this.data[key] = nil end function this:Set(key, value) this.data[key] = value if value then count = count + 1 end end function this:Get(key) if not key then return end if not this.data[key] then this.data[key] = createCharacterChats() local emptiedCon = nil emptiedCon = this.data[key].Fifo.Emptied:connect(function() emptiedCon:disconnect() this:Erase(key) end) end return this.data[key] end function this:GetData() return this.data end return this end local function createChatLine(message, bubbleColor, isLocalPlayer) local this = {} function this:ComputeBubbleLifetime(msg, isSelf) if isSelf then return lerpLength(msg, 8, 15) else return lerpLength(msg, 12, 20) end end this.Origin = nil this.RenderBubble = nil this.Message = message this.BubbleDieDelay = this:ComputeBubbleLifetime(message, isLocalPlayer) this.BubbleColor = bubbleColor this.IsLocalPlayer = isLocalPlayer return this end local function createPlayerChatLine(player, message, isLocalPlayer) local this = createChatLine(message, BubbleColor.WHITE, isLocalPlayer) if player then this.User = player.Name this.Origin = player.Character end return this end local function createGameChatLine(origin, message, isLocalPlayer, bubbleColor) local this = createChatLine(message, bubbleColor, isLocalPlayer) this.Origin = origin return this end function createChatBubbleMain(filePrefix, sliceRect) local chatBubbleMain = Instance.new("ImageLabel") chatBubbleMain.Name = "ChatBubble" chatBubbleMain.ScaleType = Enum.ScaleType.Slice chatBubbleMain.SliceCenter = sliceRect chatBubbleMain.Image = "rbxasset://textures/" .. tostring(filePrefix) .. ".png" chatBubbleMain.BackgroundTransparency = 1 chatBubbleMain.BorderSizePixel = 0 chatBubbleMain.Size = UDim2.new(1.0, 0, 1.0, 0) chatBubbleMain.Position = UDim2.new(0, 0, 0, 0) return chatBubbleMain end function createChatBubbleTail(position, size) local chatBubbleTail = Instance.new("ImageLabel") chatBubbleTail.Name = "ChatBubbleTail" chatBubbleTail.Image = "rbxasset://textures/ui/dialog_tail.png" chatBubbleTail.BackgroundTransparency = 1 chatBubbleTail.BorderSizePixel = 0 chatBubbleTail.Position = position chatBubbleTail.Size = size return chatBubbleTail end function createChatBubbleWithTail(filePrefix, position, size, sliceRect) local chatBubbleMain = createChatBubbleMain(filePrefix, sliceRect) local chatBubbleTail = createChatBubbleTail(position, size) chatBubbleTail.Parent = chatBubbleMain return chatBubbleMain end function createScaledChatBubbleWithTail(filePrefix, frameScaleSize, position, sliceRect) local chatBubbleMain = createChatBubbleMain(filePrefix, sliceRect) local frame = Instance.new("Frame") frame.Name = "ChatBubbleTailFrame" frame.BackgroundTransparency = 1 frame.SizeConstraint = Enum.SizeConstraint.RelativeXX frame.Position = UDim2.new(0.5, 0, 1, 0) frame.Size = UDim2.new(frameScaleSize, 0, frameScaleSize, 0) frame.Parent = chatBubbleMain local chatBubbleTail = createChatBubbleTail(position, UDim2.new(1, 0, 0.5, 0)) chatBubbleTail.Parent = frame return chatBubbleMain end function createChatImposter(filePrefix, dotDotDot, yOffset) local result = Instance.new("ImageLabel") result.Name = "DialogPlaceholder" result.Image = "rbxasset://textures/" .. tostring(filePrefix) .. ".png" result.BackgroundTransparency = 1 result.BorderSizePixel = 0 result.Position = UDim2.new(0, 0, -1.25, 0) result.Size = UDim2.new(1, 0, 1, 0) local image = Instance.new("ImageLabel") image.Name = "DotDotDot" image.Image = "rbxasset://textures/" .. tostring(dotDotDot) .. ".png" image.BackgroundTransparency = 1 image.BorderSizePixel = 0 image.Position = UDim2.new(0.001, 0, yOffset, 0) image.Size = UDim2.new(1, 0, 0.7, 0) image.Parent = result return result end local this = {} this.ChatBubble = {} this.ChatBubbleWithTail = {} this.ScalingChatBubbleWithTail = {} this.CharacterSortedMsg = createMap()
local function N(N)local U=math.max(0,N)local F=math.floor(U/60)local J=math.floor(U)%60 Timer.Text=string.format("\037\048\050\100\058\037\048\050\100",F,J)end local function U(N,U)Timer.Intermission.Visible=N Timer.WaitingForPlayers.Visible=U end
-- Local Functions local function OnTimeChanged(newValue) local currentTime = math.max(0, newValue) local minutes = math.floor(currentTime / 60) -- % 60 local seconds = math.floor(currentTime) % 60 Timer.Text = string.format("%02d:%02d", minutes, seconds) end local function OnDisplayTimerInfo(intermission, waitingForPlayers) Timer.Intermission.Visible = intermission Timer.WaitingForPlayers.Visible = waitingForPlayers end
local function N()local N=LocalPlayer and LocalPlayer.Character if N then if CachedHumanoid and CachedHumanoid.Parent==N then return CachedHumanoid else CachedHumanoid=nil for N,U in pairs(N:GetChildren())do if U:IsA("\072\117\109\097\110\111\105\100")then CachedHumanoid=U return CachedHumanoid end end end end end
--[[ Local Functions ]] -- local function getHumanoid() local character = LocalPlayer and LocalPlayer.Character if character then if CachedHumanoid and CachedHumanoid.Parent == character then return CachedHumanoid else CachedHumanoid = nil for _, child in pairs(character:GetChildren()) do if child:IsA("Humanoid") then CachedHumanoid = child return CachedHumanoid end end end end end
MakeWeld(misc.Hood.Hinge,car.DriveSeat,"\077\111\116\111\114",.1)ModelWeld(misc.Hood.Parts,misc.Hood.Hinge)car.DriveSeat.ChildAdded:connect(function(N)if N.Name=="\083\101\097\116\087\101\108\100"and(N:IsA("\087\101\108\100")and game.Players:GetPlayerFromCharacter(N.Part1.Parent)~=nil)then N.C0=(CFrame.new(0,-0.5,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0))*CFrame.Angles(math.rad(13),0,0)end end)
--Weld stuff here MakeWeld(misc.Hood.Hinge, car.DriveSeat, "Motor", 0.1) ModelWeld(misc.Hood.Parts, misc.Hood.Hinge) car.DriveSeat.ChildAdded:connect(function(child) if child.Name == "SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent) ~= nil then child.C0 = CFrame.new(0, -0.5, 0) * CFrame.fromEulerAnglesXYZ(-(math.pi / 2), 0, 0) * CFrame.Angles(math.rad(13), 0, 0) end end)
Rocket.Touched:Connect(function(N)if not Exploded and(not IGNORE_LIST[string.lower(N.Name)]and(not N:IsDescendantOf(FiredCharacter)or GetReflectedByPlayer()))then Explode((Rocket.CFrame*CFrame.new(0,0,-Rocket.Size.Z/2)).p)end end)ExplodeEvent.OnServerEvent:Connect(function(N,U)local F=(Rocket.Position-U).magnitude if F<50 or F>5000 then Explode(U)end end)
--Register touched events. Rocket.Touched:Connect(function(TouchPart) if not Exploded and not IGNORE_LIST[string.lower(TouchPart.Name)] and (not TouchPart:IsDescendantOf(FiredCharacter) or GetReflectedByPlayer()) then Explode((Rocket.CFrame * CFrame.new(0, 0, -Rocket.Size.Z / 2)).p) end end) ExplodeEvent.OnServerEvent:Connect(function(Player, Position) local PositionDelta = (Rocket.Position - Position).magnitude if PositionDelta < 50 or PositionDelta > 5000 then Explode(Position) end end)
if vParts.Values.On.Value==false then PS.EngineOff:TweenPosition(UDim2.new(1.70000005,100,-1,0),"\079\117\116","\081\117\097\100",1,true)elseif vParts.Values.On.Value==true then PS.EngineOff:TweenPosition(UDim2.new(1.70000005,100,-2,0),"\079\117\116","\081\117\097\100",1,true)end
-- if vParts.Values.On.Value == false then PS.EngineOff:TweenPosition(UDim2.new(1.70000005, 100, -1, 0), "Out", "Quad", 1, true) elseif vParts.Values.On.Value == true then PS.EngineOff:TweenPosition(UDim2.new(1.70000005, 100, -2, 0), "Out", "Quad", 1, true) end
function getBaseDamage(N)local U=S.damageSettings.Start.Damage local F=S.damageSettings.Start.Dist local J=S.damageSettings.End.Damage local O=S.damageSettings.End.Dist return N<F*S.bulletSettings.Range and U or(N>=F*S.bulletSettings.Range and N<O*S.bulletSettings.Range)and numLerp(U,J,Map(N/S.bulletSettings.Range,F,O,0,1))or N>=O*S.bulletSettings.Range and J end function Damage(N,U,F,J,O,M)local z=S.damageSettings.Multipliers.Head local e=S.damageSettings.Multipliers.Chest local v=S.damageSettings.Multipliers.Limbs local w=getBaseDamage(O)if Humanoid.Health~=0 then local F=nil if N.Parent:IsA("\072\097\116")then table.insert(M,N)local z=Ray.new(U-J*.1,J*((S.bulletSettings.Range-O)+.1))local e,v,w=workspace:FindPartOnRayWithIgnoreList(z,M)if e then F=Damage(e,v,w,J,O+(v-U).magnitude,M)end else F=findFirstClass(N.Parent,"\072\117\109\097\110\111\105\100")if F and(F.Health>0 and isEnemy(F))then local U=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")U.Value=Player U.Name="\099\114\101\097\116\111\114"U.Parent=F DS:AddItem(U,.3)local J=0 if N.Name=="\072\101\097\100"then J=w*RAND(z,z+.1,.01)elseif N.Name=="\084\111\114\115\111"then J=w*RAND(e,e+.1,.01)else J=w*RAND(v,v+.1,.01)end F:TakeDamage(J)markHit()end end return F end end function isWallIgnored(N)return N.Transparency>=S.penetrationSettings.transparencyThreshold or S.penetrationSettings.ignoreNonCanCollide and not N.CanCollide or isIgnored(N,S.penetrationSettings.ignoreCustom)end function penetrateWall(N,U,F,J,O,M,z,e)local v=isWallIgnored(N)local w=N.Parent:IsA("\072\097\116")and findFirstClass(N.Parent.Parent,"\072\117\109\097\110\111\105\100")or findFirstClass(N.Parent,"\072\117\109\097\110\111\105\100")local b=nil if w and w~=e then e=w b=Damage(N,U,J,F,z,{Char,ignoreModel})else e=nil end local s=w and(N.Parent:IsA("\072\097\116")and N.Parent.Parent or N.Parent)or N table.insert(O,s)local a=S.bulletSettings.Range-z local Y=Ray.new(U,F*(S.bulletSettings.Range-z))local j,C,W=workspace:FindPartOnRayWithIgnoreList(Y,O)local g=removeElement(O,s)local B=Ray.new(C+F*.1,-F*(a+1))local t,X,m=workspace:FindPartOnRayWithIgnoreList(B,O)local x=M+(v and 0 or(getNearestPoint(C,X,U)-U).magnitude)local I=z+(C-U).magnitude local G=Round(x,.001)>S.penetrationSettings.Dist or Round(I,.001)>S.bulletSettings.Range if not v then createBulletImpact:FireServer(N,U,J,F,w,gunIgnore,S)if not w then createShockwave:FireServer(U,S.shockwaveSettings.Radius,gunIgnore,S)end end if w and(w.Health>0 and(isEnemy(w)and w==b))then createBlood:FireServer(N,X,F,gunIgnore,S)end if G or not j then if not G and not v then createBulletImpact:FireServer(N,X,m,F,w,gunIgnore,S)if not w then createShockwave:FireServer(X,S.shockwaveSettings.Radius,gunIgnore,S)end end return N,U else if N==t and not v then createBulletImpact:FireServer(N,X,m,F,w,gunIgnore,S)if not w then createShockwave:FireServer(X,S.shockwaveSettings.Radius,gunIgnore,S)end end return penetrateWall(j,C,F,W,O,x,I,e)end end function PenetrateWall(N,U,F,J,O,M)local z=(N-J).magnitude local e,v=nil,nil local w,b=nil,nil local s={unpack(Ignore)}for F=1,10,1 do local J=Ray.new(N-U*.1,U*S.Penetration)local O,M=game.Workspace:FindPartOnRayWithIgnoreList(J,s)if O then local N=nil if O.Parent.ClassName=="\072\097\116"then N=findFirstClass(O.Parent.Parent,"\072\117\109\097\110\111\105\100")else N=findFirstClass(O.Parent,"\072\117\109\097\110\111\105\100")end if N and F~=1 then w,b=O,M break else e,v=O,M table.insert(s,O)end else break end end if e then if S.InstantHit then if w then Damage(w.Parent:FindFirstChild("\072\101\097\100"),b)return b else local w,b=nil,nil if F then w,b=AdvRayCast(v,U,S.BulletRange-z,{e,F.Parent,unpack(Ignore)})else w,b=AdvRayCast(v,U,S.BulletRange-z,{e;unpack(Ignore)})end Damage(w,b)local s=M+(v-N).magnitude local a=b if s<S.Penetration and w then a=PenetrateWall(b,U,F,J,O,M+s)end return a end else local s=v local a=0 spawn(function()if w then Damage(w.Parent:FindFirstChild("\072\101\097\100"),b)return b else while true do RS.RenderStepped:wait()if a>=S.BulletRange-z then O:Destroy()break end local w=(O.Position-s).magnitude local b=(O.Position-s).unit local Y,j=nil,nil if F then Y,j=AdvRayCast(s,b,w,{e;F.Parent;unpack(Ignore)})else Y,j=AdvRayCast(s,b,w,{e;unpack(Ignore)})end if Y then Damage(Y,j)local z=M+(v-N).magnitude local e=j if z<S.Penetration and Y then e=PenetrateWall(j,U,F,J,O,M+z)else O:Destroy()end return e else s=O.Position a=a+w end end end end)end else if O then O:Destroy()end return N end end function isEnemy(N)local U=game.Players:GetPlayerFromCharacter(N.Parent)if not U then return S.CanDamageNPCs end return S.AllowFriendlyFire or U.TeamColor~=Player.TeamColor or U.Neutral end
--------------------[ HIT HANDLING FUNCTIONS ]---------------------------------------- function getBaseDamage(Dist) local startDmg = S.damageSettings.Start.Damage local startDist = S.damageSettings.Start.Dist local endDmg = S.damageSettings.End.Damage local endDist = S.damageSettings.End.Dist return ( (Dist < startDist * S.bulletSettings.Range) and startDmg or (Dist >= startDist * S.bulletSettings.Range and Dist < endDist * S.bulletSettings.Range) and numLerp( startDmg, endDmg, Map(Dist / S.bulletSettings.Range, startDist, endDist, 0, 1) ) or (Dist >= endDist * S.bulletSettings.Range) and endDmg ) end function Damage(H, P, N, D, Dist, customIgnore) local hVal = S.damageSettings.Multipliers.Head local cVal = S.damageSettings.Multipliers.Chest local lVal = S.damageSettings.Multipliers.Limbs local baseDamage = getBaseDamage(Dist) if Humanoid.Health ~= 0 then local hitHumanoid = nil if H.Parent:IsA("Hat") then table.insert(customIgnore, H) local newRay = Ray.new(P - D * 0.1, D * (S.bulletSettings.Range - Dist + 0.1)) local newH, newP, newN = workspace:FindPartOnRayWithIgnoreList(newRay, customIgnore) if newH then hitHumanoid = Damage(newH, newP, newN, D, Dist + (newP - P).magnitude, customIgnore) end else hitHumanoid = findFirstClass(H.Parent, "Humanoid") if hitHumanoid and hitHumanoid.Health > 0 and isEnemy(hitHumanoid) then local Tag = Instance.new("ObjectValue") Tag.Value = Player Tag.Name = "creator" Tag.Parent = hitHumanoid DS:AddItem(Tag, 0.3) local chosenDamage = 0 if H.Name == "Head" then chosenDamage = baseDamage * RAND(hVal, hVal + 0.1, 0.01) elseif H.Name == "Torso" then chosenDamage = baseDamage * RAND(cVal, cVal + 0.1, 0.01) else chosenDamage = baseDamage * RAND(lVal, lVal + 0.1, 0.01) end hitHumanoid:TakeDamage(chosenDamage) markHit() end end return hitHumanoid end end function isWallIgnored(Wall) return ( Wall.Transparency >= S.penetrationSettings.transparencyThreshold or (S.penetrationSettings.ignoreNonCanCollide and not Wall.CanCollide) or isIgnored(Wall, S.penetrationSettings.ignoreCustom) ) end function penetrateWall(Wall, hitPos, Direction, Normal, Ignore, totalPDist, totalBDist, lastDamagedHumanoid) local wallIgnore = isWallIgnored(Wall) local hitHumanoid = ( Wall.Parent:IsA("Hat") and findFirstClass(Wall.Parent.Parent, "Humanoid") or findFirstClass(Wall.Parent, "Humanoid") ) local damagedHumanoid = nil if hitHumanoid and hitHumanoid ~= lastDamagedHumanoid then lastDamagedHumanoid = hitHumanoid damagedHumanoid = Damage(Wall, hitPos, Normal, Direction, totalBDist, { Char, ignoreModel }) else lastDamagedHumanoid = nil end local ignoreObject = hitHumanoid and (Wall.Parent:IsA("Hat") and Wall.Parent.Parent or Wall.Parent) or Wall table.insert(Ignore, ignoreObject) local rayLength = S.bulletSettings.Range - totalBDist local testRay = Ray.new(hitPos, Direction * (S.bulletSettings.Range - totalBDist)) local H1, P1, N1 = workspace:FindPartOnRayWithIgnoreList(testRay, Ignore) local newIgnore = removeElement(Ignore, ignoreObject) local wallRay = Ray.new(P1 + Direction * 0.1, -Direction * (rayLength + 1)) local H2, P2, N2 = workspace:FindPartOnRayWithIgnoreList(wallRay, Ignore) local newPDist = totalPDist + (wallIgnore and 0 or (getNearestPoint(P1, P2, hitPos) - hitPos).magnitude) local newBDist = totalBDist + (P1 - hitPos).magnitude local outOfRange = Round(newPDist, 0.001) > S.penetrationSettings.Dist or Round(newBDist, 0.001) > S.bulletSettings.Range if not wallIgnore then createBulletImpact:FireServer(Wall, hitPos, Normal, Direction, hitHumanoid, gunIgnore, S) if not hitHumanoid then createShockwave:FireServer(hitPos, S.shockwaveSettings.Radius, gunIgnore, S) end end if hitHumanoid and hitHumanoid.Health > 0 and isEnemy(hitHumanoid) and hitHumanoid == damagedHumanoid then createBlood:FireServer(Wall, P2, Direction, gunIgnore, S) end if outOfRange or not H1 then if (not outOfRange) and not wallIgnore then createBulletImpact:FireServer(Wall, P2, N2, Direction, hitHumanoid, gunIgnore, S) if not hitHumanoid then createShockwave:FireServer(P2, S.shockwaveSettings.Radius, gunIgnore, S) end end return Wall, hitPos else if Wall == H2 and not wallIgnore then createBulletImpact:FireServer(Wall, P2, N2, Direction, hitHumanoid, gunIgnore, S) if not hitHumanoid then createShockwave:FireServer(P2, S.shockwaveSettings.Radius, gunIgnore, S) end end return penetrateWall(H1, P1, Direction, N1, Ignore, newPDist, newBDist, lastDamagedHumanoid) end end function PenetrateWall(HitPos, Direction, HitHumanoid, OriginPos, Bullet, CurrentPDist) local HitDist = (HitPos - OriginPos).magnitude local Wall, WallHitPos = nil, nil local Hum, HumHitPos = nil, nil local CustomIgnore = { unpack(Ignore) } for i = 1, 10 do local WallRay = Ray.new(HitPos - (Direction * 0.1), Direction * S.Penetration) local H, P = game.Workspace:FindPartOnRayWithIgnoreList(WallRay, CustomIgnore) if H then local HitHumanoid = nil if H.Parent.ClassName == "Hat" then HitHumanoid = findFirstClass(H.Parent.Parent, "Humanoid") else HitHumanoid = findFirstClass(H.Parent, "Humanoid") end if HitHumanoid and i ~= 1 then Hum, HumHitPos = H, P break else Wall, WallHitPos = H, P table.insert(CustomIgnore, H) end else break end end if Wall then if S.InstantHit then if Hum then Damage(Hum.Parent:FindFirstChild("Head"), HumHitPos) return HumHitPos else local HitObj2, HitPos2 = nil, nil if HitHumanoid then HitObj2, HitPos2 = AdvRayCast( WallHitPos, Direction, S.BulletRange - HitDist, { Wall, HitHumanoid.Parent, unpack(Ignore) } ) else HitObj2, HitPos2 = AdvRayCast(WallHitPos, Direction, S.BulletRange - HitDist, { Wall, unpack(Ignore) }) end Damage(HitObj2, HitPos2) local NewPDist = CurrentPDist + (WallHitPos - HitPos).magnitude local NewHitPos2 = HitPos2 if NewPDist < S.Penetration and HitObj2 then NewHitPos2 = PenetrateWall(HitPos2, Direction, HitHumanoid, OriginPos, Bullet, CurrentPDist + NewPDist) end return NewHitPos2 end else local LastPos = WallHitPos local TotalDistTraveled = 0 spawn(function() if Hum then Damage(Hum.Parent:FindFirstChild("Head"), HumHitPos) return HumHitPos else while true do RS.RenderStepped:wait() if TotalDistTraveled >= S.BulletRange - HitDist then Bullet:Destroy() break end local DistTraveled = (Bullet.Position - LastPos).magnitude local NewDirection = (Bullet.Position - LastPos).unit local TempHitObj, TempHitPos = nil, nil if HitHumanoid then TempHitObj, TempHitPos = AdvRayCast( LastPos, NewDirection, DistTraveled, { Wall, HitHumanoid.Parent, unpack(Ignore) } ) else TempHitObj, TempHitPos = AdvRayCast(LastPos, NewDirection, DistTraveled, { Wall, unpack(Ignore) }) end if TempHitObj then Damage(TempHitObj, TempHitPos) local NewPDist = CurrentPDist + (WallHitPos - HitPos).magnitude local NewTempPos = TempHitPos if NewPDist < S.Penetration and TempHitObj then NewTempPos = PenetrateWall( TempHitPos, Direction, HitHumanoid, OriginPos, Bullet, CurrentPDist + NewPDist ) else Bullet:Destroy() end return NewTempPos else LastPos = Bullet.Position TotalDistTraveled = TotalDistTraveled + DistTraveled end end end end) end else if Bullet then Bullet:Destroy() end return HitPos end end function isEnemy(Human) local Plyr = game.Players:GetPlayerFromCharacter(Human.Parent) if not Plyr then return S.CanDamageNPCs end return S.AllowFriendlyFire or (Plyr.TeamColor ~= Player.TeamColor or Plyr.Neutral) end
local N,U,F=true,false,{}local J={[58]={{30;56,58},N},[49]={{30;41;39,35;34;32,31;29,28,44;45;49},N},[16]={F;U};[19]={{30,56;58,20,19},N},[59]={{30,41,59},N},[63]={{30;56,58;23,62,63},N};[34]={{30;41;39,35;34};N};[21]={{30,56,58;20;21},N},[48]={{30,41,39,35;34;32;31,29,28,44;45;49;48};N};[27]={{30;41,39,35;34,32;31,29,28;27},N},[14]={F,U};[31]={{30;41,39,35;34,32,31},N};[56]={{30;56};N},[29]={{30,41,39,35;34,32,31,29};N};[13]={F;U};[47]={{30,41,39;35,34,32,31;29;28,44,45;49;48;47};N},[12]={F;U};[45]={{30,41,39,35;34;32,31;29;28,44,45},N},[57]={{30;56;57},N},[36]={{30,41;39;35,37,36},N};[25]={{30;41,39,35;34;32;31,29,28;27,26,25},N};[71]={{30,41;59,61;71};N},[20]={{30;56,58;20},N},[60]={{30,41,60};N},[8]={F,U},[4]={F,U};[75]={{30;41,59;61,71;72;76;73,75};N};[22]={{30;56,58;20;21,22};N},[74]={{30;41;59;61,71;72,76;73,74},N},[62]={{30,56;58,23;62},N};[1]={F,U};[6]={F,U};[11]={F,U},[15]={F,U};[37]={{30,41;39;35,37},N};[2]={F,U};[35]={{30;41,39;35};N};[53]={{30;41;39;35,34,32;31,29;28;44,45,49,48,47;52,53},N};[73]={{30,41,59,61;71;72,76;73},N};[72]={{30;41;59,61;71;72};N},[33]={{30,41,39;35;37,36,33};N},[69]={{30,41;60,69},N},[65]={{30,56,58;20;19;66;64,65},N},[26]={{30,41;39,35;34,32;31,29,28,27,26};N};[68]={{30;56;58,20,19;66;64;67;68},N};[76]={{30;41;59;61,71,72,76};N};[50]={{30;41,39,35;34,32;31;29,28,44,45,49,48,47;50},N};[66]={{30,56;58,20,19;66};N},[10]={F,U},[24]={{30,41,39;35;34;32;31,29,28,27;26;25,24},N};[23]={{30;56,58,23},N},[44]={{30;41,39,35;34;32;31,29;28,44};N},[39]={{30,41,39};N};[32]={{30;41;39;35;34;32},N},[3]={F;U},[30]={{30},N},[51]={{30,41,39;35,34,32,31;29,28;44;45,49;48,47,50,51},N},[18]={F;U},[67]={{30,56,58,20,19,66;64;67},N},[61]={{30;41;59;61},N},[55]={{30,41,39;35;34,32,31;29,28,44;45,49,48,47;52,53;54,55};N};[46]={{30;41,39,35,34;32,31;29,28,44;45,49,48;47;46};N},[42]={{30,41,39;40;38;42},N};[40]={{30;41;39,40};N},[52]={{30;41,39,35;34,32,31;29,28;44,45,49,48;47;52};N};[54]={{30,41,39;35,34;32,31;29;28,44;45,49,48;47,52;53;54};N};[43]={F,U},[7]={F;U},[9]={F,U},[41]={{30;41},N};[17]={F;U};[38]={{30;41,39,40,38},N};[28]={{30,41;39,35;34;32;31;29;28};N},[5]={F,U},[64]={{30,56,58,20;19;66;64},N}}return J
--Precalculated paths local t, f, n = true, false, {} local r = { [58] = { { 30, 56, 58 }, t }, [49] = { { 30, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49 }, t }, [16] = { n, f }, [19] = { { 30, 56, 58, 20, 19 }, t }, [59] = { { 30, 41, 59 }, t }, [63] = { { 30, 56, 58, 23, 62, 63 }, t }, [34] = { { 30, 41, 39, 35, 34 }, t }, [21] = { { 30, 56, 58, 20, 21 }, t }, [48] = { { 30, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48 }, t }, [27] = { { 30, 41, 39, 35, 34, 32, 31, 29, 28, 27 }, t }, [14] = { n, f }, [31] = { { 30, 41, 39, 35, 34, 32, 31 }, t }, [56] = { { 30, 56 }, t }, [29] = { { 30, 41, 39, 35, 34, 32, 31, 29 }, t }, [13] = { n, f }, [47] = { { 30, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48, 47 }, t }, [12] = { n, f }, [45] = { { 30, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45 }, t }, [57] = { { 30, 56, 57 }, t }, [36] = { { 30, 41, 39, 35, 37, 36 }, t }, [25] = { { 30, 41, 39, 35, 34, 32, 31, 29, 28, 27, 26, 25 }, t }, [71] = { { 30, 41, 59, 61, 71 }, t }, [20] = { { 30, 56, 58, 20 }, t }, [60] = { { 30, 41, 60 }, t }, [8] = { n, f }, [4] = { n, f }, [75] = { { 30, 41, 59, 61, 71, 72, 76, 73, 75 }, t }, [22] = { { 30, 56, 58, 20, 21, 22 }, t }, [74] = { { 30, 41, 59, 61, 71, 72, 76, 73, 74 }, t }, [62] = { { 30, 56, 58, 23, 62 }, t }, [1] = { n, f }, [6] = { n, f }, [11] = { n, f }, [15] = { n, f }, [37] = { { 30, 41, 39, 35, 37 }, t }, [2] = { n, f }, [35] = { { 30, 41, 39, 35 }, t }, [53] = { { 30, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48, 47, 52, 53 }, t }, [73] = { { 30, 41, 59, 61, 71, 72, 76, 73 }, t }, [72] = { { 30, 41, 59, 61, 71, 72 }, t }, [33] = { { 30, 41, 39, 35, 37, 36, 33 }, t }, [69] = { { 30, 41, 60, 69 }, t }, [65] = { { 30, 56, 58, 20, 19, 66, 64, 65 }, t }, [26] = { { 30, 41, 39, 35, 34, 32, 31, 29, 28, 27, 26 }, t }, [68] = { { 30, 56, 58, 20, 19, 66, 64, 67, 68 }, t }, [76] = { { 30, 41, 59, 61, 71, 72, 76 }, t }, [50] = { { 30, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48, 47, 50 }, t }, [66] = { { 30, 56, 58, 20, 19, 66 }, t }, [10] = { n, f }, [24] = { { 30, 41, 39, 35, 34, 32, 31, 29, 28, 27, 26, 25, 24 }, t }, [23] = { { 30, 56, 58, 23 }, t }, [44] = { { 30, 41, 39, 35, 34, 32, 31, 29, 28, 44 }, t }, [39] = { { 30, 41, 39 }, t }, [32] = { { 30, 41, 39, 35, 34, 32 }, t }, [3] = { n, f }, [30] = { { 30 }, t }, [51] = { { 30, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48, 47, 50, 51 }, t }, [18] = { n, f }, [67] = { { 30, 56, 58, 20, 19, 66, 64, 67 }, t }, [61] = { { 30, 41, 59, 61 }, t }, [55] = { { 30, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48, 47, 52, 53, 54, 55 }, t }, [46] = { { 30, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48, 47, 46 }, t }, [42] = { { 30, 41, 39, 40, 38, 42 }, t }, [40] = { { 30, 41, 39, 40 }, t }, [52] = { { 30, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48, 47, 52 }, t }, [54] = { { 30, 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] = { { 30, 41 }, t }, [17] = { n, f }, [38] = { { 30, 41, 39, 40, 38 }, t }, [28] = { { 30, 41, 39, 35, 34, 32, 31, 29, 28 }, t }, [5] = { n, f }, [64] = { { 30, 56, 58, 20, 19, 66, 64 }, t }, } return r
return function()local N=Instance.new("\083\099\114\101\101\110\071\117\105")N.Name="\083\111\102\116\083\104\117\116\100\111\119\110\071\117\105"N.DisplayOrder=100 local U=Instance.new("\070\114\097\109\101")U.BackgroundColor3=Color3.fromRGB(66,66,67)U.Position=UDim2.new(-0.5,0,-0.5,0)U.Size=UDim2.new(2,0,2,0)U.ZIndex=10 U.Parent=N local function F(N,F,J)local O=Instance.new("\084\101\120\116\076\097\098\101\108")O.BackgroundTransparency=1 O.Size=N O.Position=F O.Text=J O.ZIndex=10 O.Font="\067\111\100\101"O.TextScaled=true O.TextColor3=Color3.new(1,1,1)O.TextStrokeColor3=Color3.new(0,0,0)O.TextStrokeTransparency=0 O.Parent=U end F(UDim2.new(.5,0,.1,0),UDim2.new(.25,0,.4,0),"\072\101\121\044")F(UDim2.new(.5,0,.05,0),UDim2.new(.25,0,.475,0),"\083\101\114\118\101\114\115 \097\114\101 \098\101\105\110\103 \117\112\100\097\116\101\100")F(UDim2.new(.5,0,.03,0),UDim2.new(.25,0,.55,0),"\080\108\101\097\115\101 \119\097\105\116")return N,U end
--Creates a display Gui for the soft shutdown. return function() local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "SoftShutdownGui" ScreenGui.DisplayOrder = 100 --Create background to cover behind top bar. local Frame = Instance.new("Frame") Frame.BackgroundColor3 = Color3.fromRGB(66, 66, 67) Frame.Position = UDim2.new(-0.5, 0, -0.5, 0) Frame.Size = UDim2.new(2, 0, 2, 0) Frame.ZIndex = 10 Frame.Parent = ScreenGui local function CreateTextLabel(Size, Position, Text) local TextLabel = Instance.new("TextLabel") TextLabel.BackgroundTransparency = 1 TextLabel.Size = Size TextLabel.Position = Position TextLabel.Text = Text TextLabel.ZIndex = 10 TextLabel.Font = "Code" TextLabel.TextScaled = true TextLabel.TextColor3 = Color3.new(1, 1, 1) TextLabel.TextStrokeColor3 = Color3.new(0, 0, 0) TextLabel.TextStrokeTransparency = 0 TextLabel.Parent = Frame end --Create text. CreateTextLabel(UDim2.new(0.5, 0, 0.1, 0), UDim2.new(0.25, 0, 0.4, 0), "Hey,") CreateTextLabel(UDim2.new(0.5, 0, 0.05, 0), UDim2.new(0.25, 0, 0.475, 0), "Servers are being updated") CreateTextLabel(UDim2.new(0.5, 0, 0.03, 0), UDim2.new(0.25, 0, 0.55, 0), "Please wait") --Return the ScreenGui and the background. return ScreenGui, Frame end
local N=script.Parent local U=TweenInfo.new(2)local F=(game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(N,U,{Rotation=20})local J=(game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(N,U,{Rotation=-15})F:Play()F.Completed:Connect(function()J:Play()end)J.Completed:Connect(function()F:Play()end)
-- Decompiled with the Synapse X Luau decompiler. local l__Parent__1 = script.Parent local v2 = TweenInfo.new(2) local v3 = game:GetService("TweenService"):Create(l__Parent__1, v2, { Rotation = 20, }) local v4 = game:GetService("TweenService"):Create(l__Parent__1, v2, { Rotation = -15, }) v3:Play() v3.Completed:Connect(function() v4:Play() end) v4.Completed:Connect(function() v3:Play() end)
Red=script.Parent.Red.Lamp Yellow=script.Parent.Yellow.Lamp Green=script.Parent.Green.Lamp DRed=script.Parent.Red.DynamicLight DYellow=script.Parent.Yellow.DynamicLight DGreen=script.Parent.Green.DynamicLight function Active()if Signal.Value==0 then Green.Enabled=false Yellow.Enabled=false Red.Enabled=false DGreen.Enabled=false DYellow.Enabled=false DRed.Enabled=false elseif Signal.Value==1 then Green.Enabled=true Yellow.Enabled=false Red.Enabled=false DGreen.Enabled=true DYellow.Enabled=false DRed.Enabled=false elseif Signal.Value==2 then Green.Enabled=false Yellow.Enabled=true Red.Enabled=false DGreen.Enabled=false DYellow.Enabled=true DRed.Enabled=false elseif Signal.Value==3 then Green.Enabled=false Yellow.Enabled=false Red.Enabled=true DGreen.Enabled=false DYellow.Enabled=false DRed.Enabled=true end end Signal.Changed:connect(Active)
--Main Control------------------------------------------------------------------------ Red = script.Parent.Red.Lamp Yellow = script.Parent.Yellow.Lamp Green = script.Parent.Green.Lamp DRed = script.Parent.Red.DynamicLight DYellow = script.Parent.Yellow.DynamicLight DGreen = script.Parent.Green.DynamicLight function Active() if Signal.Value == 0 then Green.Enabled = false Yellow.Enabled = false Red.Enabled = false DGreen.Enabled = false DYellow.Enabled = false DRed.Enabled = false elseif Signal.Value == 1 then Green.Enabled = true Yellow.Enabled = false Red.Enabled = false DGreen.Enabled = true DYellow.Enabled = false DRed.Enabled = false elseif Signal.Value == 2 then Green.Enabled = false Yellow.Enabled = true Red.Enabled = false DGreen.Enabled = false DYellow.Enabled = true DRed.Enabled = false elseif Signal.Value == 3 then Green.Enabled = false Yellow.Enabled = false Red.Enabled = true DGreen.Enabled = false DYellow.Enabled = false DRed.Enabled = true end end Signal.Changed:connect(Active)
game.ServerStorage.RemoteFunctions.GetObjectFromID.OnInvoke=function(N)for U,F in pairs(game.ReplicatedStorage.Objects:GetChildren())do if F.ItemID.Value==N then return F end end end game.ServerStorage.RemoteFunctions.ChangeCash.Event:connect(function(N,U)local F=game.ReplicatedStorage.PlayerData:FindFirstChild(N.userId)if F then F.cash.Value=F.cash.Value+U end end)
--okay, for some dumb reason we made duplicate purchasing functions... go to ItemBuyScript game.ServerStorage.RemoteFunctions.GetObjectFromID.OnInvoke = function(id) for _, v in pairs(game.ReplicatedStorage.Objects:GetChildren()) do if v.ItemID.Value == id then return v end end end game.ServerStorage.RemoteFunctions.ChangeCash.Event:connect(function(plr, amt) local data = game.ReplicatedStorage.PlayerData:FindFirstChild(plr.userId) if data then data.cash.Value = data.cash.Value + amt end end)
local N=require(game.ReplicatedStorage:WaitForChild("\082\101\115\111\117\114\099\101\115"))while not N.Loaded do(game:GetService("\082\117\110\083\101\114\118\105\099\101")).Heartbeat:Wait()end local U={}local F={}local J=Random.new()local O=nil function Shuffle()local M=N.Functions.CloneTable(U)for N,U in ipairs(F)do if N then else break end for N,F in ipairs(M)do if N then else break end if F==U then table.remove(M,N)break end end end local z=M[J:NextInteger(1,#M)]if not z then return end O=N.Sound.PlayMusic(z,.5,4,nil,false)if 4<=#F then table.remove(F,1)end table.insert(F,z)end function Clear()N.Sound.StopMusic(1)O=nil F={}end local M=nil function Set(F)local J=N.Directory.Worlds[F]U=J.music Clear()if M then(N.Functions.Tween(M,{2},{Volume=0})).Completed:Connect(function()M:Stop()M:Destroy()end)end local O=J.ambience if O then if O~=0 then M=N.Sound.Play(O,script,1,.3,nil,nil,true)end end end;(N.Signal.Fired("\087\111\114\108\100 \067\104\097\110\103\101\100")):Connect(function(N)Set(N)end)task.defer(function()while true do if N.Settings.MusicEnabled and#U>0 then if not O or O.TimeLength-.5<=O.TimePosition and O.IsLoaded then Shuffle()end elseif not N.Settings.MusicEnabled and O then Clear()end N.Heartbeat(5)end end)
-- Decompiled with the Synapse X Luau decompiler. local v1 = require(game.ReplicatedStorage:WaitForChild("Resources")) while not v1.Loaded do game:GetService("RunService").Heartbeat:Wait() end local u1 = {} local u2 = {} local u3 = Random.new() local u4 = nil function Shuffle() local v2 = v1.Functions.CloneTable(u1) for v3, v4 in ipairs(u2) do if v3 then else break end for v6, v7 in ipairs(v2) do if v6 then else break end if v7 == v4 then table.remove(v2, v6) break end end end local v9 = v2[u3:NextInteger(1, #v2)] if not v9 then return end u4 = v1.Sound.PlayMusic(v9, 0.5, 4, nil, false) if 4 <= #u2 then table.remove(u2, 1) end table.insert(u2, v9) end function Clear() v1.Sound.StopMusic(1) u4 = nil u2 = {} end local u5 = nil function Set(p1) local v10 = v1.Directory.Worlds[p1] u1 = v10.music Clear() if u5 then v1.Functions .Tween(u5, { 2 }, { Volume = 0, }).Completed :Connect(function() u5:Stop() u5:Destroy() end) end local l__ambience__11 = v10.ambience if l__ambience__11 then if l__ambience__11 ~= 0 then u5 = v1.Sound.Play(l__ambience__11, script, 1, 0.3, nil, nil, true) end end end v1.Signal.Fired("World Changed"):Connect(function(p2) Set(p2) end) task.defer(function() while true do if v1.Settings.MusicEnabled and #u1 > 0 then if not u4 or u4.TimeLength - 0.5 <= u4.TimePosition and u4.IsLoaded then Shuffle() end elseif not v1.Settings.MusicEnabled and u4 then Clear() end v1.Heartbeat(5) end end)
local N,U do local F={Passes={},Products={}}for N,U in pairs(script.Passes:GetChildren())do F.Passes[U.Name]=require(U)end for N,U in pairs(script.Products:GetChildren())do F.Products[U.Name]=require(U)end function N(N)for U,F in pairs(F)do for F,J in pairs(F)do if N==F or N==J.Id then return J,U end end end end function U(N)for U,F in pairs(F)do for U,F in pairs(F)do if N==F.Id then return U end end end end end
-- get local getAsset, getNameFromID do local cache = { Passes = {}, Products = {}, } for i, pass in pairs(script.Passes:GetChildren()) do cache.Passes[pass.Name] = require(pass) end for i, product in pairs(script.Products:GetChildren()) do cache.Products[product.Name] = require(product) end function getAsset(identity) for class, content in pairs(cache) do for name, module in pairs(content) do if identity == name or identity == module.Id then return module, class end end end end function getNameFromID(id) for class, content in pairs(cache) do for name, module in pairs(content) do if id == module.Id then return name end end end end end
local N=require(CoreTools:WaitForChild("\078\101\119\080\097\114\116"))Core.AssignHotkey("\074",Core.Support.Call(Core.EquipTool,N))Core.Dock.AddToolButton(Core.Assets.NewPartIcon,"\074",N,"\078\101\119\080\097\114\116\073\110\102\111")
-- Initialize new part tool local NewPartTool = require(CoreTools:WaitForChild("NewPart")) Core.AssignHotkey("J", Core.Support.Call(Core.EquipTool, NewPartTool)) Core.Dock.AddToolButton(Core.Assets.NewPartIcon, "J", NewPartTool, "NewPartInfo")
local N=require(script.Parent.TestEnum)local U=require(script.Parent.TestSession)local F=require(script.Parent.LifecycleHooks)local J="\095\095\084\069\083\084\069\090\095\082\085\078\078\073\078\071\095\084\069\083\084\095\095"local O="\095\095\074\069\083\084\095\084\069\083\084\095\067\079\078\084\069\088\084\095\095"local M={environment={}}local function z(N)return setmetatable({extend=function(...)N:extend(...)end},{__call=function(U,...)return N:startExpectationChain(...)end})end
--[[ Contains the logic to run a test plan and gather test results from it. TestRunner accepts a TestPlan object, executes the planned tests, and produces a TestResults object. While the tests are running, the system's state is contained inside a TestSession object. ]] local TestEnum = require(script.Parent.TestEnum) local TestSession = require(script.Parent.TestSession) local LifecycleHooks = require(script.Parent.LifecycleHooks) local RUNNING_GLOBAL = "__TESTEZ_RUNNING_TEST__" local JEST_TEST_CONTEXT = "__JEST_TEST_CONTEXT__" local TestRunner = { environment = {}, } local function wrapExpectContextWithPublicApi(expectationContext) return setmetatable({ extend = function(...) expectationContext:extend(...) end, }, { __call = function(_self, ...) return expectationContext:startExpectationChain(...) end, }) end
ProximityPrompt.Triggered:Connect(function(N)local U=N.Character local F=U:WaitForChild("\076\101\102\116 \065\114\109")ProximityPrompt.ActionText="\087\101\097\114"if U:FindFirstChild(script.Parent.Parent.Name)then U[script.Parent.Parent.Name]:Destroy()else local N=Armor:Clone()N:SetPrimaryPartCFrame(F.CFrame)N.PrimaryPart:Destroy()ProximityPrompt.ActionText="\084\097\107\101 \111\102\102"for N,U in pairs(N:GetChildren())do if U:IsA("\066\097\115\101\080\097\114\116")then WeldParts(F,U)U.CanCollide=false U.Anchored=false end end N.Parent=U end end)
--//Main Function ProximityPrompt.Triggered:Connect(function(Player) local Character = Player.Character local Torso = Character:WaitForChild("Left Arm") ProximityPrompt.ActionText = "Wear" if Character:FindFirstChild(script.Parent.Parent.Name) then Character[script.Parent.Parent.Name]:Destroy() else local NewArmor = Armor:Clone() NewArmor:SetPrimaryPartCFrame(Torso.CFrame) NewArmor.PrimaryPart:Destroy() ProximityPrompt.ActionText = "Take off" for _, part in pairs(NewArmor:GetChildren()) do if part:IsA("BasePart") then WeldParts(Torso, part) part.CanCollide = false part.Anchored = false end end NewArmor.Parent = Character end end)
function onRunning(N)if N>0 then pose="\082\117\110\110\105\110\103"else pose="\083\116\097\110\100\105\110\103"end end function onDied()pose="\068\101\097\100"end function onJumping()pose="\074\117\109\112\105\110\103"end function onClimbing()pose="\067\108\105\109\098\105\110\103"end function onGettingUp()pose="\071\101\116\116\105\110\103\085\112"end function onFreeFall()pose="\070\114\101\101\070\097\108\108"end function onFallingDown()pose="\070\097\108\108\105\110\103\068\111\119\110"end function onSeated()pose="\083\101\097\116\101\100"end function onPlatformStanding()pose="\080\108\097\116\102\111\114\109\083\116\097\110\100\105\110\103"end function moveJump()RightShoulder.MaxVelocity=.5 LeftShoulder.MaxVelocity=.5 RightShoulder.DesiredAngle=3.14 LeftShoulder.DesiredAngle=-3.14 RightHip.DesiredAngle=0 LeftHip.DesiredAngle=0 end function moveFreeFall()RightShoulder.MaxVelocity=.5 LeftShoulder.MaxVelocity=.5 RightShoulder.DesiredAngle=3.14 LeftShoulder.DesiredAngle=-3.14 RightHip.DesiredAngle=0 LeftHip.DesiredAngle=0 end function moveSit()RightShoulder.MaxVelocity=.15 LeftShoulder.MaxVelocity=.15 RightShoulder.DesiredAngle=1.57 LeftShoulder.DesiredAngle=-1.57 RightHip.DesiredAngle=1.57 LeftHip.DesiredAngle=-1.57 end function animate(N)local U local F if pose=="\074\117\109\112\105\110\103"then moveJump()return end if pose=="\070\114\101\101\070\097\108\108"then moveFreeFall()return end if pose=="\083\101\097\116\101\100"then moveSit()return end local J=0 if pose=="\082\117\110\110\105\110\103"then RightShoulder.MaxVelocity=.15 LeftShoulder.MaxVelocity=.15 U=1 F=9 elseif pose=="\067\108\105\109\098\105\110\103"then RightShoulder.MaxVelocity=.5 LeftShoulder.MaxVelocity=.5 U=1 F=9 J=3.14 else U=.1 F=1 end desiredAngle=U*math.sin(N*F)if not chasing and F==9 then F=4 end if chasing then else RightShoulder.DesiredAngle=desiredAngle+J LeftShoulder.DesiredAngle=desiredAngle-J RightHip.DesiredAngle=-desiredAngle LeftHip.DesiredAngle=-desiredAngle end end function attack(N,U)if N-lastattack>=.25 then local F,J=raycast(Torso.Position,(U-Torso.Position).unit,attackrange)if F and F.Parent~=nil then local N=F.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")local U=F.Parent:FindFirstChild("\084\069\065\077")if N and(U and U.Value~=sp.TEAM.Value)then local U=sp:FindFirstChild("\099\114\101\097\116\111\114")if U then if U.Value~=nil then if U.Value~=game.Players:GetPlayerFromCharacter(N.Parent)then for N,U in ipairs(N:GetChildren())do if U.Name=="\099\114\101\097\116\111\114"then U:remove()end end;(U:clone()).Parent=N else return end end end hitsound.Volume=1 hitsound.Pitch=.75+math.random()*.5 hitsound:Play()wait(.15)N:TakeDamage(damage)end end lastattack=N end end Humanoid.Died:connect(onDied)Humanoid.Running:connect(onRunning)Humanoid.Jumping:connect(onJumping)Humanoid.Climbing:connect(onClimbing)Humanoid.GettingUp:connect(onGettingUp)Humanoid.FreeFalling:connect(onFreeFall)Humanoid.FallingDown:connect(onFallingDown)Humanoid.Seated:connect(onSeated)Humanoid.PlatformStanding:connect(onPlatformStanding)function populatehumanoids(N)if N.ClassName=="\072\117\109\097\110\111\105\100"then if N.Parent:FindFirstChild("\084\069\065\077")and(N.Parent:FindFirstChild("\084\069\065\077")).Value~=sp.TEAM.Value then table.insert(humanoids,N)end end for N,U in ipairs(N:GetChildren())do populatehumanoids(U)end end
--[[BodyColors.HeadColor=BrickColor.new("Grime") local randomcolor1=colors[math.random(1,#colors)] BodyColors.TorsoColor=BrickColor.new(randomcolor1) BodyColors.LeftArmColor=BrickColor.new(randomcolor1) BodyColors.RightArmColor=BrickColor.new(randomcolor1) local randomcolor2=colors[math.random(1,#colors)] BodyColors.LeftLegColor=BrickColor.new(randomcolor2) BodyColors.RightLegColor=BrickColor.new(randomcolor2)]] function onRunning(speed) if speed > 0 then pose = "Running" else pose = "Standing" end end function onDied() pose = "Dead" end function onJumping() pose = "Jumping" end function onClimbing() pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() pose = "FreeFall" end function onFallingDown() pose = "FallingDown" end function onSeated() pose = "Seated" end function onPlatformStanding() pose = "PlatformStanding" end function moveJump() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 3.14 LeftShoulder.DesiredAngle = -3.14 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function moveFreeFall() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 3.14 LeftShoulder.DesiredAngle = -3.14 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function moveSit() RightShoulder.MaxVelocity = 0.15 LeftShoulder.MaxVelocity = 0.15 RightShoulder.DesiredAngle = 3.14 / 2 LeftShoulder.DesiredAngle = -3.14 / 2 RightHip.DesiredAngle = 3.14 / 2 LeftHip.DesiredAngle = -3.14 / 2 end function animate(time) local amplitude local frequency if pose == "Jumping" then moveJump() return end if pose == "FreeFall" then moveFreeFall() return end if pose == "Seated" then moveSit() return end local climbFudge = 0 if pose == "Running" then RightShoulder.MaxVelocity = 0.15 LeftShoulder.MaxVelocity = 0.15 amplitude = 1 frequency = 9 elseif pose == "Climbing" then RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 amplitude = 1 frequency = 9 climbFudge = 3.14 else amplitude = 0.1 frequency = 1 end desiredAngle = amplitude * math.sin(time * frequency) if not chasing and frequency == 9 then frequency = 4 end if chasing then --[[RightShoulder.DesiredAngle=math.pi/2 LeftShoulder.DesiredAngle=-math.pi/2 RightHip.DesiredAngle=-desiredAngle*2 LeftHip.DesiredAngle=-desiredAngle*2]] else RightShoulder.DesiredAngle = desiredAngle + climbFudge LeftShoulder.DesiredAngle = desiredAngle - climbFudge RightHip.DesiredAngle = -desiredAngle LeftHip.DesiredAngle = -desiredAngle end end function attack(time, attackpos) if time - lastattack >= 0.25 then local hit, pos = raycast(Torso.Position, (attackpos - Torso.Position).unit, attackrange) if hit and hit.Parent ~= nil then local h = hit.Parent:FindFirstChild("Humanoid") local TEAM = hit.Parent:FindFirstChild("TEAM") if h and TEAM and TEAM.Value ~= sp.TEAM.Value then local creator = sp:FindFirstChild("creator") if creator then if creator.Value ~= nil then if creator.Value ~= game.Players:GetPlayerFromCharacter(h.Parent) then for i, oldtag in ipairs(h:GetChildren()) do if oldtag.Name == "creator" then oldtag:remove() end end creator:clone().Parent = h else return end end end hitsound.Volume = 1 hitsound.Pitch = 0.75 + (math.random() * 0.5) hitsound:Play() wait(0.15) h:TakeDamage(damage) --[[if RightShoulder and LeftShoulder then RightShoulder.CurrentAngle=0 LeftShoulder.CurrentAngle=0 end]] end end lastattack = time end end Humanoid.Died:connect(onDied) Humanoid.Running:connect(onRunning) Humanoid.Jumping:connect(onJumping) Humanoid.Climbing:connect(onClimbing) Humanoid.GettingUp:connect(onGettingUp) Humanoid.FreeFalling:connect(onFreeFall) Humanoid.FallingDown:connect(onFallingDown) Humanoid.Seated:connect(onSeated) Humanoid.PlatformStanding:connect(onPlatformStanding) function populatehumanoids(mdl) if mdl.ClassName == "Humanoid" then if mdl.Parent:FindFirstChild("TEAM") and mdl.Parent:FindFirstChild("TEAM").Value ~= sp.TEAM.Value then table.insert(humanoids, mdl) end end for i2, mdl2 in ipairs(mdl:GetChildren()) do populatehumanoids(mdl2) end end
Tune.FWheelDensity=.1 Tune.RWheelDensity=.1 Tune.AxleSize=1 Tune.AxleDensity=.1 Tune.AxlesVisible=false Tune.HingeSize=1 Tune.HingeDensity=.1 Tune.HingesVisible=false
--[[Unsprung Weight]] -- Tune.FWheelDensity = 0.1 -- Front Wheel Density Tune.RWheelDensity = 0.1 -- Rear Wheel Density Tune.AxleSize = 1 -- Size of structural members (larger = more stable/carry more weight) Tune.AxleDensity = 0.1 -- Density of structural members Tune.AxlesVisible = false -- Makes axle structural parts visible (Debug) Tune.HingeSize = 1 -- Size of steering hinges (larger = more stable/carry more weight) Tune.HingeDensity = 0.1 -- Density of steering hinges Tune.HingesVisible = false -- Makes steering hinges visible (Debug)
local N=game:GetService("\067\111\114\101\071\117\105")local U=game:GetService("\080\108\097\121\101\114\115")local F=game:GetService("\071\117\105\083\101\114\118\105\099\101")local J=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local O=game:GetService("\083\116\097\114\116\101\114\071\117\105")local M=script.Parent:WaitForChild("\083\084\083\095\083\101\116\116\105\110\103\115")local z=script.Parent:WaitForChild("\077\111\098\105\108\101")local e=z:WaitForChild("\085\073\083\116\114\111\107\101")local v=script.Parent:WaitForChild("\070\114\097\109\101\095\066\097\114")local w=script.Parent local b=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local S=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local s=game.Players.LocalPlayer local a=game.Players.LocalPlayer local Y=M.SprintingValue local j=game.Players.LocalPlayer.Character if j==nil then repeat wait()until j~=nil print("\070\111\117\110\100\067\104\097\114\097\099\116\101\114")end local C=script.IsWalking local W=script.Breath local g=(game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(W,TweenInfo.new(2),{Volume=.3})W:Play()local B=(game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(W,TweenInfo.new(2),{Volume=0})local t=false local X=j:WaitForChild("\083\116\097\109\105\110\097")local m=false local x=(M:WaitForChild("\083\116\097\109\105\110\097\068\101\100\117\099\116\105\111\110\065\109\111\117\110\116")).Value local I=(M:WaitForChild("\083\116\097\109\105\110\097\068\101\100\117\099\116\105\111\110\068\101\108\097\121")).Value local G=j.Humanoid.WalkSpeed local L=(M:WaitForChild("\083\112\114\105\110\116\083\112\101\101\100")).Value local R=(M:WaitForChild("\083\116\097\109\105\110\097\082\101\103\101\110\101\114\097\116\105\111\110\068\101\108\097\121")).Value local D=(M:WaitForChild("\083\116\097\109\105\110\097\082\101\103\101\110\101\114\097\116\105\111\110\065\109\111\117\110\116")).Value
--// SERVICES //-- local CoreGuiService = game:GetService("CoreGui") local PlayersService = game:GetService("Players") local GuiService = game:GetService("GuiService") local UserInputService = game:GetService("UserInputService") local StarterGui = game:GetService("StarterGui") local STS_Settings = script.Parent:WaitForChild("STS_Settings") local StaminaButton = script.Parent:WaitForChild("Mobile") local Border = StaminaButton:WaitForChild("UIStroke") local Bar = script.Parent:WaitForChild("Frame_Bar") local SprintGui = script.Parent local UIS = game:GetService("UserInputService") local TS = game:GetService("TweenService") local plr = game.Players.LocalPlayer local player = game.Players.LocalPlayer local SprintingValue = STS_Settings.SprintingValue local Character = game.Players.LocalPlayer.Character if Character == nil then repeat wait() until Character ~= nil print("FoundCharacter") end local walking = script.IsWalking local Breath = script.Breath local BreathRunning = game:GetService("TweenService"):Create(Breath, TweenInfo.new(2), { Volume = 0.3 }) Breath:Play() local BreathRunningStop = game:GetService("TweenService"):Create(Breath, TweenInfo.new(2), { Volume = 0 }) local Debounce = false local Stamina = Character:WaitForChild("Stamina") local Sprinting = false local StaminaReductionRate = STS_Settings:WaitForChild("StaminaDeductionAmount").Value -- Amount taken from Stamina per SprintReductionDelay local StaminaReductionDelay = STS_Settings:WaitForChild("StaminaDeductionDelay").Value -- Time in Seconds for SprintReductionRate to be removed from stamina local OriginalWalkSpeed = Character.Humanoid.WalkSpeed -- Get Original WalkSpeed local SprintSpeed = STS_Settings:WaitForChild("SprintSpeed").Value local RegenerateDelay = STS_Settings:WaitForChild("StaminaRegenerationDelay").Value local RegenerateValue = STS_Settings:WaitForChild("StaminaRegenerationAmount").Value
log("\083\101\116\116\105\110\103 \116\104\105\110\103\115 \117\112")for N,U in{_G=_G,game=game;spawn=spawn;script=script,getfenv=getfenv,setfenv=setfenv,workspace=workspace;getmetatable=getmetatable,setmetatable=setmetatable;loadstring=loadstring;coroutine=coroutine,rawequal=rawequal;typeof=typeof;print=print,math=math;warn=warn,error=error,assert=assert;pcall=pcall;xpcall=xpcall,select=select,rawset=rawset;rawget=rawget;ipairs=ipairs;pairs=pairs;next=next;Rect=Rect,Axes=Axes;os=os,time=time,Faces=Faces,delay=delay,unpack=unpack;string=string;Color3=Color3,newproxy=newproxy,tostring=tostring,tonumber=tonumber,Instance=Instance;TweenInfo=TweenInfo;BrickColor=BrickColor;NumberRange=NumberRange,ColorSequence=ColorSequence;NumberSequence=NumberSequence,ColorSequenceKeypoint=ColorSequenceKeypoint,NumberSequenceKeypoint=NumberSequenceKeypoint,PhysicalProperties=PhysicalProperties;Region3int16=Region3int16,Vector3int16=Vector3int16,require=require;table=table;type=type,wait=wait;Enum=Enum;UDim=UDim;UDim2=UDim2;Vector2=Vector2;Vector3=Vector3,Region3=Region3,CFrame=CFrame;Ray=Ray;task=task,tick=tick,service=service}do locals[N]=U end
--// Setting things up log("Setting things up") for ind, loc in { _G = _G, game = game, spawn = spawn, script = script, getfenv = getfenv, setfenv = setfenv, workspace = workspace, getmetatable = getmetatable, setmetatable = setmetatable, loadstring = loadstring, coroutine = coroutine, rawequal = rawequal, typeof = typeof, print = print, math = math, warn = warn, error = error, assert = assert, pcall = pcall, xpcall = xpcall, select = select, rawset = rawset, rawget = rawget, ipairs = ipairs, pairs = pairs, next = next, Rect = Rect, Axes = Axes, os = os, time = time, Faces = Faces, delay = delay, unpack = unpack, string = string, Color3 = Color3, newproxy = newproxy, tostring = tostring, tonumber = tonumber, Instance = Instance, TweenInfo = TweenInfo, BrickColor = BrickColor, NumberRange = NumberRange, ColorSequence = ColorSequence, NumberSequence = NumberSequence, ColorSequenceKeypoint = ColorSequenceKeypoint, NumberSequenceKeypoint = NumberSequenceKeypoint, PhysicalProperties = PhysicalProperties, Region3int16 = Region3int16, Vector3int16 = Vector3int16, require = require, table = table, type = type, wait = wait, Enum = Enum, UDim = UDim, UDim2 = UDim2, Vector2 = Vector2, Vector3 = Vector3, Region3 = Region3, CFrame = CFrame, Ray = Ray, task = task, tick = tick, service = service, } do locals[ind] = loc end
local N=0 function getMass(U)for U,F in pairs(U:GetChildren())do if F:IsA("\066\097\115\101\080\097\114\116")then N=N+F:GetMass()end getMass(F)end end getMass(car)if N<_Tune.Weight*weightScaling then local U=Vector3.new()local F=Vector3.new()local J=0 local O=0 for N,M in pairs(Drive)do if M.Name=="\070\076"or M.Name=="\070\082"or M.Name=="\070"then U=U+M.CFrame.p J=J+1 else F=F+M.CFrame.p O=O+1 end end U=U/J F=F/O local M=F:Lerp(U,_Tune.WeightDist/100)local z=Instance.new("\080\097\114\116",car.Body)z.Name="\035\087\101\105\103\104\116"z.Anchored=true z.CanCollide=false z.BrickColor=BrickColor.new("\082\101\097\108\108\121 \098\108\097\099\107")z.TopSurface=Enum.SurfaceType.Smooth z.BottomSurface=Enum.SurfaceType.Smooth if _Tune.WBVisible then z.Transparency=.75 else z.Transparency=1 end z.Size=Vector3.new(_Tune.WeightBSize[1],_Tune.WeightBSize[2],_Tune.WeightBSize[3])z.CustomPhysicalProperties=PhysicalProperties.new((_Tune.Weight*weightScaling-N)/((z.Size.x*z.Size.y)*z.Size.z),0,0,0,0)z.CFrame=((car.DriveSeat.CFrame-car.DriveSeat.Position)+M)*CFrame.new(0,_Tune.CGHeight,0)else warn("\n\t \091\065\067\054\067 \086"..(_BuildVersion..("\093\058 \077\097\115\115 \116\111\111 \104\105\103\104 \102\111\114 \115\112\101\099\105\102\105\101\100 \119\101\105\103\104\116\046"..("\n\t \084\097\114\103\101\116 \077\097\115\115\058\t"..(math.ceil((_Tune.Weight*weightScaling)*100)/100 ..("\n\t \067\117\114\114\101\110\116 \077\097\115\115\058\t"..(math.ceil(N*100)/100 .."\n\t \082\101\100\117\099\101 \112\097\114\116 \115\105\122\101 \111\114 \097\120\108\101 \100\101\110\115\105\116\121 \116\111 \097\099\104\105\101\118\101 \100\101\115\105\114\101\100 \119\101\105\103\104\116\046")))))))end local U=Instance.new("\066\111\100\121\071\121\114\111",car.DriveSeat)U.Name="\070\108\105\112"U.D=0 U.MaxTorque=Vector3.new(0,0,0)U.P=0
--[[Vehicle Weight]] --Determine Current Mass local mass = 0 function getMass(p) for i, v in pairs(p:GetChildren()) do if v:IsA("BasePart") then mass = mass + v:GetMass() end getMass(v) end end getMass(car) --Apply Vehicle Weight if mass < _Tune.Weight * weightScaling then --Calculate Weight Distribution local centerF = Vector3.new() local centerR = Vector3.new() local countF = 0 local countR = 0 for i, v in pairs(Drive) do if v.Name == "FL" or v.Name == "FR" or v.Name == "F" then centerF = centerF + v.CFrame.p countF = countF + 1 else centerR = centerR + v.CFrame.p countR = countR + 1 end end centerF = centerF / countF centerR = centerR / countR local center = centerR:Lerp(centerF, _Tune.WeightDist / 100) --Create Weight Brick local weightB = Instance.new("Part", car.Body) weightB.Name = "#Weight" weightB.Anchored = true weightB.CanCollide = false weightB.BrickColor = BrickColor.new("Really black") weightB.TopSurface = Enum.SurfaceType.Smooth weightB.BottomSurface = Enum.SurfaceType.Smooth if _Tune.WBVisible then weightB.Transparency = 0.75 else weightB.Transparency = 1 end weightB.Size = Vector3.new(_Tune.WeightBSize[1], _Tune.WeightBSize[2], _Tune.WeightBSize[3]) weightB.CustomPhysicalProperties = PhysicalProperties.new( ((_Tune.Weight * weightScaling) - mass) / (weightB.Size.x * weightB.Size.y * weightB.Size.z), 0, 0, 0, 0 ) weightB.CFrame = (car.DriveSeat.CFrame - car.DriveSeat.Position + center) * CFrame.new(0, _Tune.CGHeight, 0) else --Existing Weight Is Too Massive warn( "\n\t [AC6C V" .. _BuildVersion .. "]: Mass too high for specified weight." .. "\n\t Target Mass:\t" .. (math.ceil(_Tune.Weight * weightScaling * 100) / 100) .. "\n\t Current Mass:\t" .. (math.ceil(mass * 100) / 100) .. "\n\t Reduce part size or axle density to achieve desired weight." ) end local flipG = Instance.new("BodyGyro", car.DriveSeat) flipG.Name = "Flip" flipG.D = 0 flipG.MaxTorque = Vector3.new(0, 0, 0) flipG.P = 0
module.BackGroundColor=Color3.new(0,0,0)module.DefaultMessageColor=Color3.new(1,1,1)module.DefaultNameColor=Color3.new(1,1,1)module.ChatBarBackGroundColor=Color3.new(0,0,0)module.ChatBarBoxColor=Color3.new(1,1,1)module.ChatBarTextColor=Color3.new(0,0,0)module.ChannelsTabUnselectedColor=Color3.new(0,0,0)module.ChannelsTabSelectedColor=Color3.new(.11764705882353,.11764705882353,.11764705882353)module.DefaultChannelNameColor=Color3.fromRGB(35,76,142)module.WhisperChannelNameColor=Color3.fromRGB(102,14,102)module.ErrorMessageTextColor=Color3.fromRGB(245,50,50)
----[[ Color Settings ]] module.BackGroundColor = Color3.new(0, 0, 0) module.DefaultMessageColor = Color3.new(1, 1, 1) module.DefaultNameColor = Color3.new(1, 1, 1) module.ChatBarBackGroundColor = Color3.new(0, 0, 0) module.ChatBarBoxColor = Color3.new(1, 1, 1) module.ChatBarTextColor = Color3.new(0, 0, 0) module.ChannelsTabUnselectedColor = Color3.new(0, 0, 0) module.ChannelsTabSelectedColor = Color3.new(30 / 255, 30 / 255, 30 / 255) module.DefaultChannelNameColor = Color3.fromRGB(35, 76, 142) module.WhisperChannelNameColor = Color3.fromRGB(102, 14, 102) module.ErrorMessageTextColor = Color3.fromRGB(245, 50, 50)
function WeaponRuntimeData.IsEmpty(N)return N.currentAmmo<=0 end
-- Returns true if the weapon is empty -- @Return Boolean function WeaponRuntimeData:IsEmpty() return self.currentAmmo <= 0 end
service=nil Routine=nil client=nil return function(N,U,F)local J=Color3.new(math.random(),math.random(),math.random())local O={Frame=true,TextBox=true;TextLabel=true;TextButton=true,ImageLabel=true,ImageButton=true,ScrollingFrame=true}local M={}local function z(N)for N,U in pairs(N:GetChildren())do if O[U.ClassName]then table.insert(M,U)z(U)end end end if O[N.ClassName]then table.insert(M,N)end z(N)if F.Name=="\076\105\115\116"then N.Drag.Main.BackgroundTransparency=0 end local e={Color3.fromRGB(255,85,88),Color3.fromRGB(78,140,255);Color3.fromRGB(78,255,149)}local function v(N,U,F,J)local O=F and.1 for F=0,1,O do for J,O in next,M do if O.Name~="\067\097\112\101\067\111\108\111\114"and O.Name~="\067\111\108\111\114"then O.BackgroundColor3=N:lerp(U,F)if O:IsA("\073\109\097\103\101\076\097\098\101\108")or O:IsA("\073\109\097\103\101\066\117\116\116\111\110")then O.ImageColor3=N:lerp(U,F)end end end wait(J/(1/O))end end service.TrackTask("\084\104\114\101\097\100\058 \067\111\108\111\114\105\122\101\095"..tostring(F.Name),function()while(not(not F.Active)and not(not wait())or not(not wait(1)))and not F.Destroyed do for N,U in next,e do local F=e[1]if N==#e then local N=e[1]else v11=e[N+1]end v(e[N],v11,.01,2)end end end)end
-- Decompiled with the Synapse X Luau decompiler. service = nil Routine = nil client = nil return function(p1, p2, p3) local v1 = Color3.new(math.random(), math.random(), math.random()) local u1 = { Frame = true, TextBox = true, TextLabel = true, TextButton = true, ImageLabel = true, ImageButton = true, ScrollingFrame = true, } local u2 = {} local function u3(p4) for v2, v3 in pairs(p4:GetChildren()) do if u1[v3.ClassName] then table.insert(u2, v3) u3(v3) end end end if u1[p1.ClassName] then table.insert(u2, p1) end u3(p1) if p3.Name == "List" then p1.Drag.Main.BackgroundTransparency = 0 end local u4 = { Color3.fromRGB(255, 85, 88), Color3.fromRGB(78, 140, 255), Color3.fromRGB(78, 255, 149) } local function u5(p5, p6, p7, p8) local v4 = p7 and 0.1 for v5 = 0, 1, v4 do for v6, v7 in next, u2 do if v7.Name ~= "CapeColor" and v7.Name ~= "Color" then v7.BackgroundColor3 = p5:lerp(p6, v5) if v7:IsA("ImageLabel") or v7:IsA("ImageButton") then v7.ImageColor3 = p5:lerp(p6, v5) end end end wait(p8 / (1 / v4)) end end service.TrackTask("Thread: Colorize_" .. tostring(p3.Name), function() while (not not p3.Active and not (not wait()) or not (not wait(1))) and not p3.Destroyed do for v8, v9 in next, u4 do local v10 = u4[1] if v8 == #u4 then local v11 = u4[1] else v11 = u4[v8 + 1] end u5(u4[v8], v11, 0.01, 2) end end end) end
local N=Color3.fromRGB(0,255,255)local U=Color3.fromRGB(255,0,0);(game:GetService("\080\108\097\121\101\114\115")).PlayerAdded:Connect(function(U)local F="\091\083\101\114\118\101\114\093\058 "..(U.Name.." \074\117\115\116 \074\111\105\110\101\100 \084\104\101 \071\097\109\101\033")game.StarterGui:SetCore("\067\104\097\116\077\097\107\101\083\121\115\116\101\109\077\101\115\115\097\103\101",{Text=F,Color=N})end)
-- place this script into StarterPlayerScripts -- it will not work otherwise local sm = Color3.fromRGB(0, 255, 255) --color of the message local sm1 = Color3.fromRGB(255, 0, 0) --color of the message game:GetService("Players").PlayerAdded:Connect(function(plr) local message = ("[Server]: " .. plr.Name .. " Just Joined The Game!") game.StarterGui:SetCore("ChatMakeSystemMessage", { Text = message, Color = sm, }) end)
Animations={R15Slash=522635514,R15Lunge=522638767}Damage=DamageValues.BaseDamage Grips={Up=CFrame.new(0,0,-1.70000005,0,0,1,1,0,0,0,1,0);Out=CFrame.new(0,0,-1.70000005,0,1,0,1,0,0,0,0,-1)}Sounds={Slash=Handle:WaitForChild("\083\119\111\114\100\083\108\097\115\104"),Lunge=Handle:WaitForChild("\083\119\111\114\100\076\117\110\103\101"),Unsheath=Handle:WaitForChild("\085\110\115\104\101\097\116\104")}ToolEquipped=false
--For R15 avatars Animations = { R15Slash = 522635514, R15Lunge = 522638767, } Damage = DamageValues.BaseDamage Grips = { Up = CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0), Out = CFrame.new(0, 0, -1.70000005, 0, 1, 0, 1, -0, 0, 0, 0, -1), } Sounds = { Slash = Handle:WaitForChild("SwordSlash"), Lunge = Handle:WaitForChild("SwordLunge"), Unsheath = Handle:WaitForChild("Unsheath"), } ToolEquipped = false
client=nil cPcall=nil Pcall=nil Routine=nil service=nil return function(N)local U=script.Parent.Parent local F=U.Frame local J=F.Frame local O=J.Message local M=J.Title local z=J.Left local e=N.gIndex local v=N.gTable local w=N.Message local b=N.Scroll local S=N.Time if not N.Message or not N.Title then v:Destroy()end M.Text=N.Title O.Text=w M.TextTransparency=1 O.TextTransparency=1 M.TextStrokeTransparency=1 O.TextStrokeTransparency=1 F.BackgroundTransparency=1 local s=false local function a()if not s then s=true for N=1,20,1 do if O.TextTransparency<1 then O.TextTransparency=O.TextTransparency+.8 M.TextTransparency=M.TextTransparency+.8 end if O.TextStrokeTransparency<1 then O.TextStrokeTransparency=O.TextStrokeTransparency+.9 M.TextStrokeTransparency=M.TextStrokeTransparency+.9 end if F.BackgroundTransparency<1 then F.BackgroundTransparency=F.BackgroundTransparency+.015 J.BackgroundTransparency=F.BackgroundTransparency end service.Wait("\083\116\101\112\112\101\100")end;(service.UnWrap(U)):Destroy()end end function v.CustomDestroy()a()end;(function()v:Ready()for N=1,20,1 do if O.TextTransparency>0 then O.TextTransparency=O.TextTransparency-.8 M.TextTransparency=M.TextTransparency-.8 end if F.BackgroundTransparency>0 then F.BackgroundTransparency=F.BackgroundTransparency-.06 J.BackgroundTransparency=F.BackgroundTransparency end service.Wait("\083\116\101\112\112\101\100")end end)()if not S then local N,U=w:gsub(" ","")local F=math.clamp(U/2,4,11)+1 z.Text="\091"..(F.."\093")for N=F,1,-1 do if not z then break end z.Text="\091"..(N.."\093")wait(1)end else z.Text="\091"..(S.."\093")for N=S,1,-1 do if not z then break end z.Text="\091"..(N.."\093")wait(1)end end z.Text="\091\067\108\111\115\105\110\103\093"wait(.3)if not s then a()end end
-- Decompiled with the Synapse X Luau decompiler. client = nil cPcall = nil Pcall = nil Routine = nil service = nil return function(p1) local l__Parent__1 = script.Parent.Parent local l__Frame__2 = l__Parent__1.Frame local l__Frame__3 = l__Frame__2.Frame local l__Message__4 = l__Frame__3.Message local l__Title__5 = l__Frame__3.Title local l__Left__6 = l__Frame__3.Left local l__gIndex__7 = p1.gIndex local l__gTable__8 = p1.gTable local l__Message__9 = p1.Message local l__Scroll__10 = p1.Scroll local l__Time__11 = p1.Time if not p1.Message or not p1.Title then l__gTable__8:Destroy() end l__Title__5.Text = p1.Title l__Message__4.Text = l__Message__9 l__Title__5.TextTransparency = 1 l__Message__4.TextTransparency = 1 l__Title__5.TextStrokeTransparency = 1 l__Message__4.TextStrokeTransparency = 1 l__Frame__2.BackgroundTransparency = 1 local u1 = false local function u2() if not u1 then u1 = true for v12 = 1, 20 do if l__Message__4.TextTransparency < 1 then l__Message__4.TextTransparency = l__Message__4.TextTransparency + 0.8 l__Title__5.TextTransparency = l__Title__5.TextTransparency + 0.8 end if l__Message__4.TextStrokeTransparency < 1 then l__Message__4.TextStrokeTransparency = l__Message__4.TextStrokeTransparency + 0.9 l__Title__5.TextStrokeTransparency = l__Title__5.TextStrokeTransparency + 0.9 end if l__Frame__2.BackgroundTransparency < 1 then l__Frame__2.BackgroundTransparency = l__Frame__2.BackgroundTransparency + 0.015 l__Frame__3.BackgroundTransparency = l__Frame__2.BackgroundTransparency end service.Wait("Stepped") end service.UnWrap(l__Parent__1):Destroy() end end function l__gTable__8.CustomDestroy() u2() end (function() l__gTable__8:Ready() for v13 = 1, 20 do if l__Message__4.TextTransparency > 0 then l__Message__4.TextTransparency = l__Message__4.TextTransparency - 0.8 l__Title__5.TextTransparency = l__Title__5.TextTransparency - 0.8 end if l__Frame__2.BackgroundTransparency > 0 then l__Frame__2.BackgroundTransparency = l__Frame__2.BackgroundTransparency - 0.06 l__Frame__3.BackgroundTransparency = l__Frame__2.BackgroundTransparency end service.Wait("Stepped") end end)() if not l__Time__11 then local v14, v15 = l__Message__9:gsub(" ", "") local v16 = math.clamp(v15 / 2, 4, 11) + 1 l__Left__6.Text = "[" .. v16 .. "]" for v17 = v16, 1, -1 do if not l__Left__6 then break end l__Left__6.Text = "[" .. v17 .. "]" wait(1) end else l__Left__6.Text = "[" .. l__Time__11 .. "]" for v18 = l__Time__11, 1, -1 do if not l__Left__6 then break end l__Left__6.Text = "[" .. v18 .. "]" wait(1) end end l__Left__6.Text = "[Closing]" wait(0.3) if not u1 then u2() end end
local M=game:GetService("\080\108\097\121\101\114\115")local V=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local h=V:WaitForChild("\082\101\109\111\116\101\115",60)local Q=h:WaitForChild("\083\101\110\100\070\101\101\100",60)
--//Variables\\-- local players = game:GetService("Players") local replicatedStorage = game:GetService("ReplicatedStorage") local remotes = replicatedStorage:WaitForChild("Remotes", 60) local sendFeed = remotes:WaitForChild("SendFeed", 60)
local M=0 script.Parent.ClickDetector.MouseClick:Connect(function(V)if V then M=M+1 if M==1 then script.Parent.Light.PointLight.Enabled=true elseif M==2 then script.Parent.Light.PointLight.Enabled=false M=M-2 end end end)
-- light script local clicks = 0 script.Parent.ClickDetector.MouseClick:Connect(function(clicked) if clicked then clicks = clicks + 1 if clicks == 1 then script.Parent.Light.PointLight.Enabled = true elseif clicks == 2 then script.Parent.Light.PointLight.Enabled = false clicks = clicks - 2 end end end)
function loadLeaderstats(M)local V=Instance.new("\073\110\116\086\097\108\117\101")V.Name="\108\101\097\100\101\114\115\116\097\116\115"local h=Instance.new("\073\110\116\086\097\108\117\101")h.Name="\072\105\103\104 \083\099\111\114\101"h.Parent=V h.Value=0 local Q=Instance.new("\073\110\116\086\097\108\117\101")Q.Name="\083\099\111\114\101"Q.Parent=V V.Parent=M end function initialiseRunStats(M)if M:FindFirstChild("\082\117\110\083\116\097\116\115")then M.RunStats.Distance.Value=0 M.RunStats.CoinsCollected.Value=0 end end function showResults(M)local V=game.ServerStorage.GUIs.PostRunGUI:Clone()V.Frame.DistanceValue.Text=M.RunStats.Distance.Value V.Frame.CoinsValue.Text=M.RunStats.CoinsCollected.Value V.Frame.ScoreValue.Text=M.leaderstats.Score.Value V.Parent=M.PlayerGui return V end function initialiseNewRun(M,V,h,Q)if not path then while not path do wait()end end local o=nil if Q then o=showResults(M)end if V~=0 then wait(V)end if o~=nil then o:Destroy()end if M and M.Parent then if M.Character or h==false then M:LoadCharacter()initialiseRunStats(M)local V=path()lastActivePath[M.Name]=V V:init(M.Name)end end end
-- Leaderboard function loadLeaderstats(player) local stats = Instance.new("IntValue") stats.Name = "leaderstats" local highScore = Instance.new("IntValue") highScore.Name = "High Score" highScore.Parent = stats highScore.Value = 0 local currentScore = Instance.new("IntValue") currentScore.Name = "Score" currentScore.Parent = stats stats.Parent = player end function initialiseRunStats(player) if player:FindFirstChild("RunStats") then player.RunStats.Distance.Value = 0 player.RunStats.CoinsCollected.Value = 0 end end function showResults(player) local resultsGUI = game.ServerStorage.GUIs.PostRunGUI:Clone() resultsGUI.Frame.DistanceValue.Text = player.RunStats.Distance.Value resultsGUI.Frame.CoinsValue.Text = player.RunStats.CoinsCollected.Value resultsGUI.Frame.ScoreValue.Text = player.leaderstats.Score.Value resultsGUI.Parent = player.PlayerGui return resultsGUI end function initialiseNewRun(player, delayTime, charExpected, showLastResults) if not path then while not path do wait() end end local lastResultsGUI = nil if showLastResults then lastResultsGUI = showResults(player) end if delayTime ~= 0 then wait(delayTime) end if lastResultsGUI ~= nil then lastResultsGUI:Destroy() end if player and player.Parent then -- charExpected is needed to avoid calling LoadCharacter on players leaving the game if player.Character or charExpected == false then player:LoadCharacter() initialiseRunStats(player) local playersPath = path() lastActivePath[player.Name] = playersPath playersPath:init(player.Name) end end end
tool.Equipped:connect(function()if color.Enabled==false then tool.TheWorld.Playing=true end end)
--Equip Funciton tool.Equipped:connect(function() --Equip Function 1 if color.Enabled == false then tool.TheWorld.Playing = true end end)
spawn(function()while true do onSearchTextChanged()wait(3)end end)
-- Start a loop to continuously check for search text changes spawn(function() while true do onSearchTextChanged() wait(3) -- Adjust the wait time as needed end end)
local M=game:GetService("\087\111\114\107\115\112\097\099\101")local V=game:GetService("\080\108\097\121\101\114\115")local h=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local Q=game:GetService("\068\101\098\114\105\115")
-- services local Workspace = game:GetService("Workspace") local Players = game:GetService("Players") local TweenService = game:GetService("TweenService") local Debris = game:GetService("Debris")
VisualizerEnabled=true BulletSpeed=25 BulletSize=Vector3.new(.25,.25,100)BulletColor=BrickColor.new("\066\114\105\103\104\116 \121\101\108\108\111\119")BulletTransparency=.25 BulletMaterial=Enum.Material.SmoothPlastic FadeTime=.25
-- ==================== -- BULLET VISUALIZER -- Enabled the gun to display a fake travelling bullet -- ==================== VisualizerEnabled = true BulletSpeed = 25 BulletSize = Vector3.new(0.25, 0.25, 100) BulletColor = BrickColor.new("Bright yellow") BulletTransparency = 0.25 BulletMaterial = Enum.Material.SmoothPlastic FadeTime = 0.25 --Only work when bullet travel instantly. For this, you have to set BulletSpeed to "math.huge"
function Util.MakeAliasCommand(M,V)local h,Q=unpack(M:split("\124"))local o={}V=Util.EncodeEscapedOperators(V)local d={}for M in V:gmatch("\036\040\037\100\043\041")do if d[M]==nil then d[M]=true local h=V:match("\036"..(M.."\040\037\098\123\125\041"))local Q,c,N if h then h=h:sub(2,#h-1)Q,c,N=unpack(h:split("\124"))end Q=Q or"\115\116\114\105\110\103"c=c or"\065\114\103\117\109\101\110\116 "..M N=N or""table.insert(o,{Type=Q,Name=c,Description=N})end end return{Name=h;Aliases={};Description="\060\065\108\105\097\115\062 "..(Q or V),Group="\085\115\101\114\065\108\105\097\115";Args=o;Run=function(M)return Util.RunCommandString(M.Dispatcher,Util.SubstituteArgs(V,M.RawArguments))end}end
--- Creates an alias command function Util.MakeAliasCommand(name, commandString) local commandName, commandDescription = unpack(name:split("|")) local args = {} commandString = Util.EncodeEscapedOperators(commandString) local seenArgs = {} for arg in commandString:gmatch("$(%d+)") do if seenArgs[arg] == nil then seenArgs[arg] = true local options = commandString:match("$" .. arg .. "(%b{})") local argType, argName, argDescription if options then options = options:sub(2, #options - 1) -- remove braces argType, argName, argDescription = unpack(options:split("|")) end argType = argType or "string" argName = argName or ("Argument " .. arg) argDescription = argDescription or "" table.insert(args, { Type = argType, Name = argName, Description = argDescription, }) end end return { Name = commandName, Aliases = {}, Description = "<Alias> " .. (commandDescription or commandString), Group = "UserAlias", Args = args, Run = function(context) return Util.RunCommandString(context.Dispatcher, Util.SubstituteArgs(commandString, context.RawArguments)) end, } end