prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--// Ammo Settings
Ammo = 33; StoredAmmo = 20; MagCount = math.huge; -- If you want infinate ammo, set to math.huge EX. MagCount = math.huge; ExplosiveAmmo = 3;
--[[ CameraShakePresets.Bump CameraShakePresets.Explosion CameraShakePresets.Earthquake CameraShakePresets.BadTrip CameraShakePresets.HandheldCamera CameraShakePresets.Vibration CameraShakePresets.RoughDriving --]]
local CameraShakeInstance = require(script.Parent.CameraShakeInstance) local CameraShakePresets = { -- A high-magnitude, short, yet smooth shake. -- Should happen once. Bump = function() local c = CameraShakeInstance.new(2.5, 4, 0.1, 0.75) c.PositionInfluence = Vector3.new(0.15, 0.15, 0.15) c.RotationInfluence = Vector3.new(1, 1, 1) return c end; BigBump = function() local c = CameraShakeInstance.new(2.5, 4, 0.1, 0.75) c.PositionInfluence = Vector3.new(0.8, 0.8, 0.8) c.RotationInfluence = Vector3.new(1, 1, 1) return c end; SmallBump = function() local c = CameraShakeInstance.new(2.5, 4, 0.1, 0.75) c.PositionInfluence = Vector3.new(0.01, 0.01, 0.01) c.RotationInfluence = Vector3.new(.5, .5, .5) return c end; -- An intense and rough shake. -- Should happen once. Explosion = function() local c = CameraShakeInstance.new(5, 10, 0, 1.5) c.PositionInfluence = Vector3.new(0.25, 0.25, 0.25) c.RotationInfluence = Vector3.new(4, 1, 1) return c end; BumpRemaked = function() local c = CameraShakeInstance.new(2, 5, 0, 1) c.PositionInfluence = Vector3.new(0.2, 0.2, 0.2) c.RotationInfluence = Vector3.new(3, 1, 1) return c end; BigExplosion = function() local c = CameraShakeInstance.new(20, 40, 0, 2) c.PositionInfluence = Vector3.new(0.55, 0.55, 0.55) c.RotationInfluence = Vector3.new(5, 2, 2) return c end; ReallyBigExplosion = function() local c = CameraShakeInstance.new(30, 50, 0, 1.5) c.PositionInfluence = Vector3.new(1, 1, 1) c.RotationInfluence = Vector3.new(5, 2, 2) return c end; SmallExplosion = function() local c = CameraShakeInstance.new(5, 10, 0, 1.5) c.PositionInfluence = Vector3.new(0.15, 0.15, 0.15) c.RotationInfluence = Vector3.new(4, 1, 1) return c end; ExplosionNormal = function() local c = CameraShakeInstance.new(5, 10, 0, 1.5) c.PositionInfluence = Vector3.new(3,3,3) c.RotationInfluence = Vector3.new(4, 1, 1) return c end; -- A continuous, rough shake -- Sustained. Earthquake = function() local c = CameraShakeInstance.new(0.6, 3.5, 2, 10) c.PositionInfluence = Vector3.new(0.25, 0.25, 0.25) c.RotationInfluence = Vector3.new(1, 1, 4) return c end; -- A bizarre shake with a very high magnitude and low roughness. -- Sustained. BadTrip = function() local c = CameraShakeInstance.new(10, 0.15, 5, 10) c.PositionInfluence = Vector3.new(0, 0, 0.15) c.RotationInfluence = Vector3.new(2, 1, 4) return c end; -- A subtle, slow shake. -- Sustained. HandheldCamera = function() local c = CameraShakeInstance.new(1, 0.25, 5, 10) c.PositionInfluence = Vector3.new(0, 0, 0) c.RotationInfluence = Vector3.new(1, 0.5, 0.5) return c end; -- A very rough, yet low magnitude shake. -- Sustained. Vibration = function() local c = CameraShakeInstance.new(0.4, 20, 2, 2) c.PositionInfluence = Vector3.new(0, 0.15, 0) c.RotationInfluence = Vector3.new(1.25, 0, 4) return c end; -- A slightly rough, medium magnitude shake. -- Sustained. RoughDriving = function() local c = CameraShakeInstance.new(1, 2, 1, 1) c.PositionInfluence = Vector3.new(0, 0, 0) c.RotationInfluence = Vector3.new(1, 1, 1) return c end; } return setmetatable({}, { __index = function(t, i) local f = CameraShakePresets[i] if (type(f) == "function") then return f() end error("No preset found with index \"" .. i .. "\"") end; })
--[[* * Fast paths for creating regular expressions for common glob patterns. * This can significantly speed up processing and has very little downside * impact when none of the fast paths match. ]]
parse.fastpaths = function(input: string, options: Object?) local opts = Object.assign({}, options) local max = if typeof(opts.maxLength) == "number" then math.min(MAX_LENGTH, opts.maxLength) else MAX_LENGTH local len = #input if len > max then error( Error.new( ("SyntaxError: Input length: %s, exceeds maximum allowed length: %s"):format( tostring(len), tostring(max) ) ) ) end input = Boolean.toJSBoolean(REPLACEMENTS[input]) and REPLACEMENTS[input] or input local win32 = utils.isWindows(options) -- create constants based on platform, for windows or posix local ref = constants.globChars(win32) local DOT_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOTS, NO_DOTS_SLASH, STAR, START_ANCHOR = ref.DOT_LITERAL, ref.SLASH_LITERAL, ref.ONE_CHAR, ref.DOTS_SLASH, ref.NO_DOT, ref.NO_DOTS, ref.NO_DOTS_SLASH, ref.STAR, ref.START_ANCHOR local nodot = if Boolean.toJSBoolean(opts.dot) then NO_DOTS else NO_DOT local slashDot = if Boolean.toJSBoolean(opts.dot) then NO_DOTS_SLASH else NO_DOT local capture = if Boolean.toJSBoolean(opts.capture) then "" else "?:" local state = { negated = false, prefix = "" } local star = if opts.bash == true then ".*?" else STAR if Boolean.toJSBoolean(opts.capture) then star = ("(%s)"):format(star) end local function globstar(opts) if opts.noglobstar == true then return star end return ("(%s(?:(?!%s%s).)*?)"):format( capture, START_ANCHOR, if Boolean.toJSBoolean(opts.dot) then DOTS_SLASH else DOT_LITERAL ) end local function create(str): string? if str == "*" then return ("%s%s%s"):format(nodot, ONE_CHAR, star) elseif str == ".*" then return ("%s%s%s"):format(DOT_LITERAL, ONE_CHAR, star) elseif str == "*.*" then return ("%s%s%s%s%s"):format(nodot, star, DOT_LITERAL, ONE_CHAR, star) elseif str == "*/*" then return ("%s%s%s%s%s%s"):format(nodot, star, SLASH_LITERAL, ONE_CHAR, slashDot, star) elseif str == "**" then return nodot .. globstar(opts) elseif str == "**/*" then return ("(?:%s%s%s)?%s%s%s"):format(nodot, globstar(opts), SLASH_LITERAL, slashDot, ONE_CHAR, star) elseif str == "**/*.*" then return ("(?:%s%s%s)?%s%s%s%s%s"):format( nodot, globstar(opts), SLASH_LITERAL, slashDot, star, DOT_LITERAL, ONE_CHAR, star ) elseif str == "**/.*" then return ("(?:%s%s%s)?%s%s%s"):format(nodot, globstar(opts), SLASH_LITERAL, DOT_LITERAL, ONE_CHAR, star) else local match = RegExp("^(.*?)\\.(\\w+)$"):exec(str) if not Boolean.toJSBoolean(match) then return nil end local source = create(match[2]) if not Boolean.toJSBoolean(source) then return nil end return source .. DOT_LITERAL .. match[3] end end local output = utils.removePrefix(input, state) local source = create(output) if source ~= nil and Boolean.toJSBoolean(source) and opts.strictSlashes ~= true then source ..= ("%s?"):format(SLASH_LITERAL) end return source end return parse
-- Piggy "ClientMain" Script -- Description: Handles most of the client events from server, including announcements such as Piggy being stunned, and also when you escape -- to show the You Escaped screen. Also used to handle the Status bar changes and to remove the Menu GUI when clicked as well as sending a -- request to the server to tell it that you're no longer in the menu
--// Services \\--
local soundService = game:GetService("SoundService")
--[[Controls]]
local _CTRL = _Tune.Controls local Controls = Instance.new("Folder",script.Parent) Controls.Name = "Controls" for i,v in pairs(_CTRL) do local a=Instance.new("StringValue",Controls) a.Name=i a.Value=v.Name a.Changed:connect(function() if i=="MouseThrottle" or i=="MouseBrake" then if a.Value == "MouseButton1" or a.Value == "MouseButton2" then _CTRL[i]=Enum.UserInputType[a.Value] else _CTRL[i]=Enum.KeyCode[a.Value] end else _CTRL[i]=Enum.KeyCode[a.Value] end end) end --Deadzone Adjust local _PPH = _Tune.Peripherals for i,v in pairs(_PPH) do local a = Instance.new("IntValue",Controls) a.Name = i a.Value = v a.Changed:connect(function() a.Value=math.min(100,math.max(0,a.Value)) _PPH[i] = a.Value end) end --Input Handler function DealWithInput(input,IsRobloxFunction) if (UserInputService:GetFocusedTextBox()==nil) and not _InControls then --Ignore when UI Focus --Shift Down [Manual Transmission] if _IsOn and (input.KeyCode ==_CTRL["ContlrShiftDown"] or (_MSteer and input.KeyCode==_CTRL["MouseShiftDown"]) or ((not _MSteer) and input.KeyCode==_CTRL["ShiftDown"])) and ((_TMode=="Auto" and _CGear<=1) or _TMode=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then if _CGear == 0 then _ClutchOn = true end if (_CGear ~= 0 and (_CGear ~= ((#_Tune.Ratios-3)-(#_Tune.Ratios-2)))) and _TMode=="Semi" then _GThrotShift = 0 wait(_Tune.ShiftTime/2) _GThrotShift = 1 end _CGear = math.max(_CGear-1,-1) if not _TMode=="Manual" then _ClutchOn = true end --Shift Up [Manual Transmission] elseif _IsOn and (input.KeyCode ==_CTRL["ContlrShiftUp"] or (_MSteer and input.KeyCode==_CTRL["MouseShiftUp"]) or ((not _MSteer) and input.KeyCode==_CTRL["ShiftUp"])) and ((_TMode=="Auto" and _CGear<1) or _TMode=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then if _CGear == 0 then _ClutchOn = true end if ((_CGear ~= 0) and (_CGear ~= #_Tune.Ratios-2)) and _TMode=="Semi" then _GThrotShift = 0 wait(_Tune.ShiftTime) _GThrotShift = 1 end _CGear = math.min(_CGear+1,#_Tune.Ratios-2) if not _TMode=="Manual" then _ClutchOn = true end --Toggle Clutch elseif _IsOn and (input.KeyCode ==_CTRL["ContlrClutch"] or (_MSteer and input.KeyCode==_CTRL["MouseClutch"]) or ((not _MSteer) and input.KeyCode==_CTRL["Clutch"])) and _TMode=="Manual" then if input.UserInputState == Enum.UserInputState.Begin then _ClutchOn = false _ClPressing = true elseif input.UserInputState == Enum.UserInputState.End then _ClutchOn = true _ClPressing = false end --Toggle PBrake elseif _IsOn and input.KeyCode ==_CTRL["ContlrPBrake"] or (_MSteer and input.KeyCode==_CTRL["MousePBrake"]) or ((not _MSteer) and input.KeyCode==_CTRL["PBrake"]) then if input.UserInputState == Enum.UserInputState.Begin then _PBrake = not _PBrake elseif input.UserInputState == Enum.UserInputState.End then if car.DriveSeat.Velocity.Magnitude>5 then _PBrake = false end end --Toggle Transmission Mode elseif (input.KeyCode == _CTRL["ContlrToggleTMode"] or input.KeyCode==_CTRL["ToggleTransMode"]) and input.UserInputState == Enum.UserInputState.Begin then local n=1 for i,v in pairs(_Tune.TransModes) do if v==_TMode then n=i break end end n=n+1 if n>#_Tune.TransModes then n=1 end _TMode = _Tune.TransModes[n] --Throttle elseif _IsOn and ((not _MSteer) and (input.KeyCode==_CTRL["Throttle"] or input.KeyCode == _CTRL["Throttle2"])) or ((((_CTRL["MouseThrottle"]==Enum.UserInputType.MouseButton1 or _CTRL["MouseThrottle"]==Enum.UserInputType.MouseButton2) and input.UserInputType == _CTRL["MouseThrottle"]) or input.KeyCode == _CTRL["MouseThrottle"])and _MSteer) then if input.UserInputState == Enum.UserInputState.Begin then _GThrot = 1 else _GThrot = _Tune.IdleThrottle/100 end --Brake elseif ((not _MSteer) and (input.KeyCode==_CTRL["Brake"] or input.KeyCode == _CTRL["Brake2"])) or ((((_CTRL["MouseBrake"]==Enum.UserInputType.MouseButton1 or _CTRL["MouseBrake"]==Enum.UserInputType.MouseButton2) and input.UserInputType == _CTRL["MouseBrake"]) or input.KeyCode == _CTRL["MouseBrake"])and _MSteer) then if input.UserInputState == Enum.UserInputState.Begin then _GBrake = 1 else _GBrake = 0 end --Steer Left elseif (not _MSteer) and (input.KeyCode==_CTRL["SteerLeft"] or input.KeyCode == _CTRL["SteerLeft2"]) then if input.UserInputState == Enum.UserInputState.Begin then _GSteerT = -1 _SteerL = true else if _SteerR then _GSteerT = 1 else _GSteerT = 0 end _SteerL = false end --Steer Right elseif (not _MSteer) and (input.KeyCode==_CTRL["SteerRight"] or input.KeyCode == _CTRL["SteerRight2"]) then if input.UserInputState == Enum.UserInputState.Begin then _GSteerT = 1 _SteerR = true else if _SteerL then _GSteerT = -1 else _GSteerT = 0 end _SteerR = false end --Toggle Mouse Controls elseif input.KeyCode ==_CTRL["ToggleMouseDrive"] then if input.UserInputState == Enum.UserInputState.End then _MSteer = not _MSteer _GThrot = _Tune.IdleThrottle/100 _GBrake = 0 _GSteerT = 0 _ClutchOn = true end --Toggle TCS elseif _Tune.TCSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleTCS"] or input.KeyCode == _CTRL["ContlrToggleTCS"] then if input.UserInputState == Enum.UserInputState.End then _TCS = not _TCS end --Toggle ABS elseif _Tune.ABSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleABS"] or input.KeyCode == _CTRL["ContlrToggleABS"] then if input.UserInputState == Enum.UserInputState.End then _ABS = not _ABS end end --Variable Controls if input.UserInputType.Name:find("Gamepad") then --Gamepad Steering if input.KeyCode == _CTRL["ContlrSteer"] then if input.Position.X>= 0 then local cDZone = math.min(.99,_Tune.Peripherals.ControlRDZone/100) if math.abs(input.Position.X)>cDZone then _GSteerT = (input.Position.X-cDZone)/(1-cDZone) else _GSteerT = 0 end else local cDZone = math.min(.99,_Tune.Peripherals.ControlLDZone/100) if math.abs(input.Position.X)>cDZone then _GSteerT = (input.Position.X+cDZone)/(1-cDZone) else _GSteerT = 0 end end --Gamepad Throttle elseif _IsOn and input.KeyCode == _CTRL["ContlrThrottle"] then _GThrot = math.max(_Tune.IdleThrottle/100,input.Position.Z) --Gamepad Brake elseif input.KeyCode == _CTRL["ContlrBrake"] then _GBrake = input.Position.Z end end else _GThrot = _Tune.IdleThrottle/100 _GSteerT = 0 _GBrake = 0 if _CGear~=0 then _ClutchOn = true end end end UserInputService.InputBegan:connect(DealWithInput) UserInputService.InputChanged:connect(DealWithInput) UserInputService.InputEnded:connect(DealWithInput)
--[[ [Whether rotation follows the camera or the mouse.] [Useful with tools if true, but camera tracking runs smoother.] --]]
local MseGuide = true
--[[Transmission]]
Tune.TransModes = {"Semi"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "Speed" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev) --Gear Ratios Tune.FinalDrive = 3.97 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3.42 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 3.75 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 2.10 , --[[ 3 ]] 1.40 , --[[ 4 ]] 1.00 , --[[ 5 ]] 0.71 , --[[ 6 ]] 0.61 , --[[ 7 ]] 0.51 , } Tune.FDMult = 1 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- Display name in report when matcher fails same as in snapshot file, -- but with optional hint argument in bold weight.
local function printSnapshotName(concatenatedBlockNames_: string?, hint_: string?, count: number): string local concatenatedBlockNames = if concatenatedBlockNames_ then concatenatedBlockNames_ else "" local hint = if hint_ then hint_ else "" local hasNames = concatenatedBlockNames:len() ~= 0 local hasHint = #hint ~= 0 local retval = "Snapshot name: `" if hasNames then retval = retval .. utils.escapeBacktickString(concatenatedBlockNames) end if hasNames and hasHint then retval = retval .. ": " end if hasHint then retval = retval .. BOLD_WEIGHT(utils.escapeBacktickString(hint)) end retval = retval .. " " .. count .. "`" return retval end
--[[Shutdown]]
car.DriveSeat.ChildRemoved:connect(function(child) if child.Name=="SeatWeld" and child:IsA("Weld") then script.Parent:Destroy() player.PlayerGui.UI.CarButtons.Visible = false end end)
-- get the current time in the format "HH:MM AM/PM"
local currentTimeString = os.date("%I:%M %p", currentTime)
--[[ ___ _____ / _ |/ ___/ Avxnturador | Novena / __ / /__ LuaInt | Novena /_/ |_\___/ Build 6C, Version 1.5, Update 2 Please install this chassis from scratch. More info can be found in the README. New values will have (Username) appended to the end of the description. ]]
local Tune = {}
--This device is entirely open-source.
Light = script.Parent.Light Scanner = script.Parent.Scanner Host = script.Parent.Parent.Parent.Events.DoorOpen function verify(card) if card == nil then return false else Host.BypassLevel.Value = true Host:Fire() Light.Color = Color3.new(0,1,0) wait(2) Light.Color = Color3.new(1,0,0) end end Scanner.Touched:Connect(verify)
--[[Susupension]]
Tune.SusEnabled = true -- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled --Front Suspension Tune.FSusDamping = 300 -- Spring Dampening Tune.FSusStiffness = 8000 -- Spring Force Tune.FAntiRoll = 50 -- Anti-Roll (Gyro Dampening) Tune.FSusLength = 2.2 -- Suspension length (in studs) Tune.FPreCompress = .95 -- Pre-compression adds resting length force Tune.FExtensionLim = 1.1 -- Max Extension Travel (in studs) Tune.FCompressLim = .1 -- Max Compression Travel (in studs) Tune.FSusAngle = 90 -- Suspension Angle (degrees from horizontal) Tune.FWsBoneLen = 5 -- Wishbone Length Tune.FWsBoneAngle = 0.5 -- Wishbone angle (degrees from horizontal) Tune.FAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -0.3 , -- positive = upward --[[Forward]] 0 } -- positive = forward --Rear Suspension Tune.RSusDamping = 300 -- Spring Dampening Tune.RSusStiffness = 8000 -- Spring Force Tune.FAntiRoll = 50 -- Anti-Roll (Gyro Dampening) Tune.RSusLength = 2.2 -- Suspension length (in studs) Tune.RPreCompress = .7 -- Pre-compression adds resting length force Tune.RExtensionLim = 1.1 -- Max Extension Travel (in studs) Tune.RCompressLim = .1 -- Max Compression Travel (in studs) Tune.RSusAngle = 90 -- Suspension Angle (degrees from horizontal) Tune.RWsBoneLen = 5 -- Wishbone Length Tune.RWsBoneAngle = 0.5 -- Wishbone angle (degrees from horizontal) Tune.RAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -0.3 , -- positive = upward --[[Forward]] 0 } -- positive = forward --Aesthetics Tune.SusVisible = false -- Spring Visible Tune.WsBVisible = true -- 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
--Glenn's Anti-Exploit System (GAE for short). This code is very ugly, but does job done
local function compareTables(arr1, arr2) if arr1.gunName==arr2.gunName and arr1.Type==arr2.Type and arr1.ShootRate==arr2.ShootRate and arr1.Bullets==arr2.Bullets and arr1.LimbDamage[1]==arr2.LimbDamage[1] and arr1.LimbDamage[2]==arr2.LimbDamage[2] and arr1.TorsoDamage[1]==arr2.TorsoDamage[1]and arr1.TorsoDamage[2]==arr2.TorsoDamage[2]and arr1.HeadDamage[1]==arr2.HeadDamage[1] and arr1.HeadDamage[2]==arr2.HeadDamage[2] then return true; end; return false; end; local function secureSettings(Player,Gun,Module) local PreNewModule = Gun:FindFirstChild("ACS_Settings"); if not Gun or not PreNewModule then Player:kick("Exploit Protocol"); warn(Player.Name.." - Potential Exploiter! Case 2: Missing Gun And Module") ; return false; end; local NewModule = require(PreNewModule); if (compareTables(Module, NewModule) == false) then Player:kick("Exploit Protocol"); warn(Player.Name.." - Potential Exploiter! Case 4: Exploiting Gun Stats") ; table.insert(_G.TempBannedPlayers, Player); return false; end; return true; end; function CalculateDMG(SKP_0, SKP_1, SKP_2, SKP_4, SKP_5, SKP_6) local skp_0 = plr:GetPlayerFromCharacter(SKP_1.Parent) or nil local skp_1 = 0 local skp_2 = SKP_5.MinDamage * SKP_6.minDamageMod if SKP_4 == 1 then local skp_3 = math.random(SKP_5.HeadDamage[1], SKP_5.HeadDamage[2]) skp_1 = math.max(skp_2 ,(skp_3 * SKP_6.DamageMod) - (SKP_2/25) * SKP_5.DamageFallOf) elseif SKP_4 == 2 then local skp_3 = math.random(SKP_5.TorsoDamage[1], SKP_5.TorsoDamage[2]) skp_1 = math.max(skp_2 ,(skp_3 * SKP_6.DamageMod) - (SKP_2/25) * SKP_5.DamageFallOf) else local skp_3 = math.random(SKP_5.LimbDamage[1], SKP_5.LimbDamage[2]) skp_1 = math.max(skp_2 ,(skp_3 * SKP_6.DamageMod) - (SKP_2/25) * SKP_5.DamageFallOf) end if SKP_1.Parent:FindFirstChild("ACS_Client") and not SKP_5.IgnoreProtection then local skp_4 = SKP_1.Parent.ACS_Client.Protecao.VestProtect local skp_5 = SKP_1.Parent.ACS_Client.Protecao.HelmetProtect if SKP_4 == 1 then if SKP_5.BulletPenetration < skp_5.Value then skp_1 = math.max(.5 ,skp_1 * (SKP_5.BulletPenetration/skp_5.Value)) end else if SKP_5.BulletPenetration < skp_4.Value then skp_1 = math.max(.5 ,skp_1 * (SKP_5.BulletPenetration/skp_4.Value)) end end end if skp_0 then if skp_0.Team ~= SKP_0.Team or skp_0.Neutral then local skp_t = Instance.new("ObjectValue") skp_t.Name = "creator" skp_t.Value = SKP_0 skp_t.Parent= SKP_1 game.Debris:AddItem(skp_t, 1) SKP_1:TakeDamage(skp_1) return; end; if not gameRules.TeamKill then return; end; local skp_t = Instance.new("ObjectValue") skp_t.Name = "creator" skp_t.Value = SKP_0 skp_t.Parent= SKP_1 game.Debris:AddItem(skp_t, 1) SKP_1:TakeDamage(skp_1 * gameRules.TeamDmgMult) return; end local skp_t = Instance.new("ObjectValue") skp_t.Name = "creator" skp_t.Value = SKP_0 skp_t.Parent= SKP_1 game.Debris:AddItem(skp_t, 1) SKP_1:TakeDamage(skp_1) return; end local function Damage(SKP_0, SKP_1, SKP_2, SKP_3, SKP_4, SKP_5, SKP_6, SKP_7, SKP_8, SKP_9) if not SKP_0 or not SKP_0.Character then return; end; if not SKP_0.Character:FindFirstChild("Humanoid") or SKP_0.Character.Humanoid.Health <= 0 then return; end; if SKP_9 == (ACS_0.."-"..SKP_0.UserId) then if SKP_7 then SKP_0.Character.Humanoid:TakeDamage(math.max(SKP_8, 0)) return; end if SKP_1 then local skp_0 = secureSettings(SKP_0,SKP_1, SKP_5) if not skp_0 or not SKP_2 then return; end; CalculateDMG(SKP_0, SKP_2, SKP_3, SKP_4, SKP_5, SKP_6) return; end SKP_0:kick("Exploit Protocol") warn(SKP_0.Name.." - Potential Exploiter! Case 1: Tried To Access Damage Event") table.insert(_G.TempBannedPlayers, SKP_0) return; end SKP_0:kick("Exploit Protocol") warn(SKP_0.Name.." - Potential Exploiter! Case 0-B: Wrong Permission Code") table.insert(_G.TempBannedPlayers, SKP_0) return; end Evt.Damage.OnServerInvoke = Damage Evt.HitEffect.OnServerEvent:Connect(function(Player, Position, HitPart, Normal, Material, Settings) Evt.HitEffect:FireAllClients(Player, Position, HitPart, Normal, Material, Settings) end) Evt.GunStance.OnServerEvent:Connect(function(Player,stance,Data) Evt.GunStance:FireAllClients(Player,stance,Data) end) Evt.ServerBullet.OnServerEvent:Connect(function(Player,Origin,Direction,WeaponData,ModTable) Evt.ServerBullet:FireAllClients(Player,Origin,Direction,WeaponData,ModTable) end) Evt.Stance.OnServerEvent:connect(function(Player, Stance, Virar) if not Player or not Player.Character then return; end; --// Player or Character doesn't exist if not Player.Character:FindFirstChild("Humanoid") or Player.Character.Humanoid.Health <= 0 then return; end; --// Player is dead local ACS_Client= Player.Character:FindFirstChild("ACS_Client") if not ACS_Client then return; end; local Torso = Player.Character:FindFirstChild("Torso") local RootPart = Player.Character:FindFirstChild("HumanoidRootPart") if not Torso or not RootPart then return; end; --// Essential bodyparts doesn't exist in this character local RootJoint = RootPart:FindFirstChild("RootJoint") local RS = Torso:FindFirstChild("Right Shoulder") local LS = Torso:FindFirstChild("Left Shoulder") local RH = Torso:FindFirstChild("Right Hip") local LH = Torso:FindFirstChild("Left Hip") if not RootJoint or not RS or not LS or not RH or not LH then return; end; --// Joints doesn't exist if Stance == 2 then TS:Create(RootJoint, TweenInfo.new(.3), {C1 = CFrame.new(0,1.5,2.45) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(180))} ):Play() TS:Create(RH, TweenInfo.new(.3), {C1 = CFrame.new(.5,1,0)* CFrame.Angles(math.rad(-5),math.rad(90),math.rad(0))} ):Play() TS:Create(LH, TweenInfo.new(.3), {C1 = CFrame.new(-.5,1,0)* CFrame.Angles(math.rad(-5),math.rad(-90),math.rad(0))} ):Play() end if Virar == 1 then if Stance == 0 then TS:Create(RootJoint, TweenInfo.new(.3), {C1 = CFrame.new(-1,-0,0) * CFrame.Angles(math.rad(-90),math.rad(-15),math.rad(-180))} ):Play() TS:Create(RH, TweenInfo.new(.3), {C1 = CFrame.new(.5,1,0)* CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))} ):Play() TS:Create(LH, TweenInfo.new(.3), {C1 = CFrame.new(-.5,1,0)* CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))} ):Play() elseif Stance == 1 then TS:Create(RootJoint, TweenInfo.new(.3), {C1 = CFrame.new(-1,.75,0.25)* CFrame.Angles(math.rad(-80),math.rad(-15),math.rad(-180))} ):Play() TS:Create(RH, TweenInfo.new(.3), {C1 = CFrame.new(.5,0,0.4)* CFrame.Angles(math.rad(20),math.rad(90),math.rad(0))} ):Play() TS:Create(LH, TweenInfo.new(.3), {C1 = CFrame.new(-.5,0,0.4)* CFrame.Angles(math.rad(20),math.rad(-90),math.rad(0))} ):Play() end elseif Virar == -1 then if Stance == 0 then TS:Create(RootJoint, TweenInfo.new(.3), {C1 = CFrame.new(1,0,0) * CFrame.Angles(math.rad(-90),math.rad(15),math.rad(180))} ):Play() TS:Create(RH, TweenInfo.new(.3), {C1 = CFrame.new(.5,1,0)* CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))} ):Play() TS:Create(LH, TweenInfo.new(.3), {C1 = CFrame.new(-.5,1,0)* CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))} ):Play() elseif Stance == 1 then TS:Create(RootJoint, TweenInfo.new(.3), {C1 = CFrame.new(1,.75,0.25)* CFrame.Angles(math.rad(-80),math.rad(15),math.rad(180))} ):Play() TS:Create(RH, TweenInfo.new(.3), {C1 = CFrame.new(.5,0,0.4)* CFrame.Angles(math.rad(20),math.rad(90),math.rad(0))} ):Play() TS:Create(LH, TweenInfo.new(.3), {C1 = CFrame.new(-.5,0,0.4)* CFrame.Angles(math.rad(20),math.rad(-90),math.rad(0))} ):Play() end elseif Virar == 0 then if Stance == 0 then TS:Create(RootJoint, TweenInfo.new(.3), {C1 = CFrame.new(0,0,0)* CFrame.Angles(math.rad(-90),math.rad(0),math.rad(180))} ):Play() TS:Create(RH, TweenInfo.new(.3), {C1 = CFrame.new(.5,1,0)* CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))} ):Play() TS:Create(LH, TweenInfo.new(.3), {C1 = CFrame.new(-.5,1,0)* CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))} ):Play() elseif Stance == 1 then TS:Create(RootJoint, TweenInfo.new(.3), {C1 = CFrame.new(0,1,0.25)* CFrame.Angles(math.rad(-80),math.rad(0),math.rad(180))} ):Play() TS:Create(RH, TweenInfo.new(.3), {C1 = CFrame.new(.5,0,0.4)* CFrame.Angles(math.rad(20),math.rad(90),math.rad(0))} ):Play() TS:Create(LH, TweenInfo.new(.3), {C1 = CFrame.new(-.5,0,0.4)* CFrame.Angles(math.rad(20),math.rad(-90),math.rad(0))} ):Play() end end if ACS_Client:GetAttribute("Surrender") then TS:Create(RS, TweenInfo.new(.3), {C1 = CFrame.new(-.5,0.95,0)* CFrame.Angles(math.rad(-175),math.rad(90),math.rad(0))} ):Play() TS:Create(LS, TweenInfo.new(.3), {C1 = CFrame.new(.5,0.95,0)* CFrame.Angles(math.rad(-175),math.rad(-90),math.rad(0))} ):Play() elseif Stance == 2 then TS:Create(RS, TweenInfo.new(.3), {C1 = CFrame.new(-.5,0.95,0)* CFrame.Angles(math.rad(-175),math.rad(90),math.rad(0))} ):Play() TS:Create(LS, TweenInfo.new(.3), {C1 = CFrame.new(.5,0.95,0)* CFrame.Angles(math.rad(-175),math.rad(-90),math.rad(0))} ):Play() else --p1.CFrame:inverse() * p2.CFrame TS:Create(RS, TweenInfo.new(.3), {C1 = CFrame.new(-.5,0.5,0)* CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))} ):Play() TS:Create(LS, TweenInfo.new(.3), {C1 = CFrame.new(.5,0.5,0)* CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))} ):Play() end end) Evt.Surrender.OnServerEvent:Connect(function(Player,Victim) if not Player or not Player.Character then return; end; local PClient = nil if Victim then if Victim == Player or not Victim.Character then return; end; PClient = Victim.Character:FindFirstChild("ACS_Client") if not PClient then return; end; if PClient:GetAttribute("Surrender") then PClient:SetAttribute("Surrender",false) end end PClient = Player.Character:FindFirstChild("ACS_Client") if not PClient then return; end; if not PClient:GetAttribute("Surrender") then PClient:SetAttribute("Surrender",true) end end) Evt.Grenade.OnServerEvent:Connect(function(SKP_0, SKP_1, SKP_2, SKP_3, SKP_4, SKP_5, SKP_6) if not SKP_0 or not SKP_0.Character then return; end; if not SKP_0.Character:FindFirstChild("Humanoid") or SKP_0.Character.Humanoid.Health <= 0 then return; end; if SKP_6 ~= (ACS_0.."-"..SKP_0.UserId) then SKP_0:kick("Exploit Protocol") warn(SKP_0.Name.." - Potential Exploiter! Case 0-B: Wrong Permission Code") table.insert(_G.TempBannedPlayers, SKP_0) return; end if not SKP_1 or not SKP_2 then SKP_0:kick("Exploit Protocol") warn(SKP_0.Name.." - Potential Exploiter! Case 3: Tried To Access Grenade Event") return; end local skp_0 = secureSettings(SKP_0, SKP_1, SKP_2) if not skp_0 or SKP_2.Type ~= "Grenade" then return; end; if not SVGunModels:FindFirstChild(SKP_2.gunName) then warn("ACS_Server Couldn't Find "..SKP_2.gunName.." In Grenade Model Folder"); return; end; local skp_0 = SVGunModels[SKP_2.gunName]:Clone() for SKP_Arg0, SKP_Arg1 in pairs(SKP_0.Character:GetChildren()) do if not SKP_Arg1:IsA('BasePart') then continue; end; local skp_1 = Instance.new("NoCollisionConstraint") skp_1.Parent= skp_0 skp_1.Part0 = skp_0.PrimaryPart skp_1.Part1 = SKP_Arg1 end local skp_1 = Instance.new("ObjectValue") skp_1.Name = "creator" skp_1.Value = SKP_0 skp_1.Parent= skp_0.PrimaryPart skp_0.Parent = ACS_Workspace.Server skp_0.PrimaryPart.CFrame = SKP_3 skp_0.PrimaryPart:ApplyImpulse(SKP_4 * SKP_5 * skp_0.PrimaryPart:GetMass()) skp_0.PrimaryPart:SetNetworkOwner(nil) skp_0.PrimaryPart.Damage.Disabled = false SKP_1:Destroy() end) function loadAttachment(weapon,WeaponData) if not weapon or not WeaponData or not weapon:FindFirstChild("Nodes") then return; end; --load sight Att if weapon.Nodes:FindFirstChild("Sight") and WeaponData.SightAtt ~= "" then local SightAtt = AttModels[WeaponData.SightAtt]:Clone() SightAtt.Parent = weapon SightAtt:SetPrimaryPartCFrame(weapon.Nodes.Sight.CFrame) for index, key in pairs(weapon:GetChildren()) do if not key:IsA('BasePart') or key.Name ~= "IS" then continue; end; key.Transparency = 1 end for index, key in pairs(SightAtt:GetChildren()) do if key.Name == "SightMark" or key.Name == "Main" then key:Destroy(); continue; end; if not key:IsA('BasePart') then continue; end; Ultil.Weld(weapon:WaitForChild("Handle"), key ) key.Anchored = false key.CanCollide = false end end --load Barrel Att if weapon.Nodes:FindFirstChild("Barrel") and WeaponData.BarrelAtt ~= "" then local BarrelAtt = AttModels[WeaponData.BarrelAtt]:Clone() BarrelAtt.Parent = weapon BarrelAtt:SetPrimaryPartCFrame(weapon.Nodes.Barrel.CFrame) if BarrelAtt:FindFirstChild("BarrelPos") then weapon.Handle.Muzzle.WorldCFrame = BarrelAtt.BarrelPos.CFrame end for index, key in pairs(BarrelAtt:GetChildren()) do if not key:IsA('BasePart') then continue; end; Ultil.Weld(weapon:WaitForChild("Handle"), key ) key.Anchored = false key.CanCollide = false end end --load Under Barrel Att if weapon.Nodes:FindFirstChild("UnderBarrel") and WeaponData.UnderBarrelAtt ~= "" then local UnderBarrelAtt = AttModels[WeaponData.UnderBarrelAtt]:Clone() UnderBarrelAtt.Parent = weapon UnderBarrelAtt:SetPrimaryPartCFrame(weapon.Nodes.UnderBarrel.CFrame) for index, key in pairs(UnderBarrelAtt:GetChildren()) do if not key:IsA('BasePart') then continue; end; Ultil.Weld(weapon:WaitForChild("Handle"), key ) key.Anchored = false key.CanCollide = false end end if weapon.Nodes:FindFirstChild("Other") and WeaponData.OtherAtt ~= "" then local OtherAtt = AttModels[WeaponData.OtherAtt]:Clone() OtherAtt.Parent = weapon OtherAtt:SetPrimaryPartCFrame(weapon.Nodes.Other.CFrame) for index, key in pairs(OtherAtt:GetChildren()) do if not key:IsA('BasePart') then continue; end; Ultil.Weld(weapon:WaitForChild("Handle"), key ) key.Anchored = false key.CanCollide = false end end end Evt.Equip.OnServerEvent:Connect(function(Player,Arma,Mode,Settings,Anim) if not Player or not Player.Character then return; end; local Head = Player.Character:FindFirstChild('Head') local Torso = Player.Character:FindFirstChild('Torso') local LeftArm = Player.Character:FindFirstChild('Left Arm') local RightArm = Player.Character:FindFirstChild('Right Arm') if not Head or not Torso or not LeftArm or not RightArm then return; end; local RS = Torso:FindFirstChild("Right Shoulder") local LS = Torso:FindFirstChild("Left Shoulder") if not RS or not LS then return; end; --// EQUIP if Mode == 1 then local GunModel = GunModels:FindFirstChild(Arma.Name) if not GunModel then warn(Player.Name..": Couldn't load Server-side weapon model") return; end; local ServerGun = GunModel:Clone() ServerGun.Name = 'S' .. Arma.Name local AnimBase = Instance.new("Part", Player.Character) AnimBase.FormFactor = "Custom" AnimBase.CanCollide = false AnimBase.Transparency = 1 AnimBase.Anchored = false AnimBase.Name = "AnimBase" AnimBase.Size = Vector3.new(0.1, 0.1, 0.1) local AnimBaseW = Instance.new("Motor6D") AnimBaseW.Part0 = Head AnimBaseW.Part1 = AnimBase AnimBaseW.Parent = AnimBase AnimBaseW.Name = "AnimBaseW" --AnimBaseW.C0 = CFrame.new(0,-1.25,0) local ruaw = Instance.new("Motor6D") ruaw.Name = "RAW" ruaw.Part0 = RightArm ruaw.Part1 = AnimBase ruaw.Parent = AnimBase ruaw.C0 = Anim.SV_RightArmPos RS.Enabled = false local luaw = Instance.new("Motor6D") luaw.Name = "LAW" luaw.Part0 = LeftArm luaw.Part1 = AnimBase luaw.Parent = AnimBase luaw.C0 = Anim.SV_LeftArmPos LS.Enabled = false ServerGun.Parent = Player.Character loadAttachment(ServerGun,Settings) if ServerGun:FindFirstChild("Nodes") ~= nil then ServerGun.Nodes:Destroy() end for SKP_001, SKP_002 in pairs(ServerGun:GetDescendants()) do if SKP_002.Name ~= "SightMark" then continue; end; SKP_002:Destroy() end for SKP_001, SKP_002 in pairs(ServerGun:GetDescendants()) do if not SKP_002:IsA('BasePart') or SKP_002.Name == 'Handle' then continue; end; Ultil.WeldComplex(ServerGun:WaitForChild("Handle"), SKP_002, SKP_002.Name) end local SKP_004 = Instance.new('Motor6D') SKP_004.Name = 'Handle' SKP_004.Parent = ServerGun.Handle SKP_004.Part0 = RightArm SKP_004.Part1 = ServerGun.Handle SKP_004.C1 = Anim.SV_GunPos:inverse() for L_74_forvar1, L_75_forvar2 in pairs(ServerGun:GetDescendants()) do if not L_75_forvar2:IsA('BasePart') then continue; end; L_75_forvar2.Anchored = false L_75_forvar2.CanCollide = false end return; end; --// UNEQUIP if Mode == 2 then if Arma and Player.Character:FindFirstChild('S' .. Arma.Name) then Player.Character['S' .. Arma.Name]:Destroy() Player.Character.AnimBase:Destroy() end RS.Enabled = true LS.Enabled = true end return; end) Evt.Squad.OnServerEvent:Connect(function(Player,SquadName,SquadColor) if not Player or not Player.Character then return; end; if not Player.Character:FindFirstChild("ACS_Client") then return; end; Player.Character.ACS_Client.FireTeam.SquadName.Value = SquadName Player.Character.ACS_Client.FireTeam.SquadColor.Value = SquadColor end) Evt.HeadRot.OnServerEvent:connect(function(Player, CF) Evt.HeadRot:FireAllClients(Player, CF) end) Evt.Atirar.OnServerEvent:Connect(function(Player, Arma, Suppressor, FlashHider) Evt.Atirar:FireAllClients(Player, Arma, Suppressor, FlashHider) end) Evt.Whizz.OnServerEvent:Connect(function(Player, Victim) Evt.Whizz:FireClient(Victim) end) Evt.Suppression.OnServerEvent:Connect(function(Player,Victim,Mode,Intensity,Time) Evt.Suppression:FireClient(Victim,Mode,Intensity,Time) end) Evt.Refil.OnServerEvent:Connect(function(Player, Stored, NewStored) Stored.Value = Stored.Value - NewStored end) Evt.SVLaser.OnServerEvent:Connect(function(Player,Position,Modo,Cor,IRmode,Arma) Evt.SVLaser:FireAllClients(Player,Position,Modo,Cor,IRmode,Arma) end) Evt.SVFlash.OnServerEvent:Connect(function(Player,Arma,Mode) Evt.SVFlash:FireAllClients(Player,Arma,Mode) end)
--[[ @brief Pulls all key-value pairs from 'draw' so long as they don't already exist in 'origin'. @param origin The table to modify (this is in-place). @param draw The table to pull into 'origin'. @return A reference to 'origin'. It will have all keys defined which are defined in origin or draw. --]]
function module.Incorporate(origin, draw) for i, v in pairs(draw) do if origin[i] == nil then origin[i] = v; end end return origin; end function module.StableSort(t, compare) for i = 1, #t do local j = 1; while j < i and not compare(t[i], t[j]) do j = j + 1; end for k = i - 1, j, -1 do t[k], t[k+1] = t[k+1], t[k]; end end end function module.ConvertArrayToMap(t) local s = {}; for i = 1, #t do s[t[i]] = true; end return s; end return module
--------LIGHTED RECTANGLES--------
game.Workspace.pillar1.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.pillar2.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.pillar3.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.pillar4.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.pillar5.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.pillar6.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.pillar7.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.pillar8.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
-- End of Navigation
Main.Radios.BuyRadio.Get.MouseButton1Click:connect(function() game.ReplicatedStorage.GetRadio:FireServer(); end)
--[[ HOW TO USE IT: - 1: Use CollectionService to tag the character you want to ragdoll with the tag "Ragdoll"; - 2: Once tagged the character will instantly go to ragdoll state; - 3: To return from ragdoll, remove the tag. If you're using my Misc module and you have the ChildAdded checks inside your NPCs or Dummies like mine, you can just require the Misc module and use the miscModule.Ragdoll(Target, Duration) function. --]]
-- ROBLOX TODO: Use Symbol again once jest-mock knows to exclude the LuauPolyfill module from being reset -- deviation: In Lua, Symbol will be a callable table, not a function -- if typeof(Symbol) == "table" and Symbol.for_ ~= nil then -- local symbolFor = Symbol.for_ -- exports.REACT_ELEMENT_TYPE = symbolFor('react.element') -- exports.REACT_PORTAL_TYPE = symbolFor('react.portal') -- exports.REACT_FRAGMENT_TYPE = symbolFor('react.fragment') -- exports.REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode') -- exports.REACT_PROFILER_TYPE = symbolFor('react.profiler') -- exports.REACT_PROVIDER_TYPE = symbolFor('react.provider') -- exports.REACT_CONTEXT_TYPE = symbolFor('react.context') -- exports.REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref') -- exports.REACT_SUSPENSE_TYPE = symbolFor('react.suspense') -- exports.REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list') -- exports.REACT_MEMO_TYPE = symbolFor('react.memo') -- exports.REACT_LAZY_TYPE = symbolFor('react.lazy') -- exports.REACT_BLOCK_TYPE = symbolFor('react.block') -- exports.REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block') -- exports.REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental') -- exports.REACT_SCOPE_TYPE = symbolFor('react.scope') -- exports.REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id') -- exports.REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode') -- exports.REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen') -- exports.REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden') -- end
--[=[ @return Promise Starts Knit. Should only be called once. Optionally, `KnitOptions` can be passed in order to set Knit's custom configurations. :::caution Be sure that all services have been created _before_ calling `Start`. Services cannot be added later. ::: ```lua Knit.Start():andThen(function() print("Knit started!") end):catch(warn) ``` Example of Knit started with options: ```lua Knit.Start({ Middleware = { Inbound = { function(player, args) print("Player is giving following args to server:", args) return true end }, }, }):andThen(function() print("Knit started!") end):catch(warn) ``` ]=]
function KnitServer.Start(options: KnitOptions?) if started then return Promise.reject("Knit already started") end started = true if options == nil then selectedOptions = defaultOptions else assert(typeof(options) == "table", `KnitOptions should be a table or nil; got {typeof(options)}`) selectedOptions = options for k, v in defaultOptions do if selectedOptions[k] == nil then selectedOptions[k] = v end end end return Promise.new(function(resolve) local knitMiddleware = if selectedOptions.Middleware ~= nil then selectedOptions.Middleware else {} -- Bind remotes: for _, service in services do local middleware = if service.Middleware ~= nil then service.Middleware else {} local inbound = if middleware.Inbound ~= nil then middleware.Inbound else knitMiddleware.Inbound local outbound = if middleware.Outbound ~= nil then middleware.Outbound else knitMiddleware.Outbound service.Middleware = nil for k, v in service.Client do if type(v) == "function" then service.KnitComm:WrapMethod(service.Client, k, inbound, outbound) elseif v == SIGNAL_MARKER then service.Client[k] = service.KnitComm:CreateSignal(k, inbound, outbound) elseif type(v) == "table" and v[1] == PROPERTY_MARKER then service.Client[k] = service.KnitComm:CreateProperty(k, v[2], inbound, outbound) end end end -- Init: local promisesInitServices = {} for _, service in services do if type(service.KnitInit) == "function" then table.insert( promisesInitServices, Promise.new(function(r) debug.setmemorycategory(service.Name) service:KnitInit() r() end) ) end end resolve(Promise.all(promisesInitServices)) end):andThen(function() -- Start: for _, service in services do if type(service.KnitStart) == "function" then task.spawn(function() debug.setmemorycategory(service.Name) service:KnitStart() end) end end startedComplete = true onStartedComplete:Fire() task.defer(function() onStartedComplete:Destroy() end) -- Expose service remotes to everyone: knitRepServiceFolder.Parent = script.Parent end) end
--[[ primaryWeaponSlot.ChildRemoved:Connect(function(newChild) weapon1Label.BackgroundColor3 = onColor end) secondaryWeaponSlot.ChildRemoved:Connect(function(newChild) weapon2Label.BackgroundColor3 = onColor end) tertiaryWeaponSlot.ChildRemoved:Connect(function(newChild) weapon3Label.BackgroundColor3 = onColor end) --]]
localPlayer.CharacterAdded:Connect(function(newCharacter) character = newCharacter end)
--------------------------------CUSTOMIZABLE STUFF------------------------------------
local resetcooldown = 1200 -- how long it takes to let you rob again. local timetodrill = 20 -- how long it takes to drill a deposit box
-- settings.AntiHumanoidDeletion and settings.ProtectHats have been superseded Workspace.RejectCharacterDeletions
settings.AntiSpeed = true -- (Client-Sided) Attempts to detect speed exploits settings.AntiBuildingTools = false -- (Client-Sided) Attempts to detect any HopperBin(s)/Building Tools added to the client settings.AntiAntiIdle = false -- (Client-Sided) Kick the player if they are using an anti-idle exploit. Highly useful for grinding/farming games settings.ExploitGuiDetection = false -- (Client-Sided) If any exploit GUIs are found in the CoreGui the exploiter gets kicked (If you use StarterGui:SetCore("SendNotification") with an image this will kick you)
-- When supplied, legacyCameraType is used and cameraMovementMode is ignored (should be nil anyways) -- Next, if userCameraCreator is passed in, that is used as the cameraCreator
function CameraModule:ActivateCameraController(cameraMovementMode, legacyCameraType: Enum.CameraType?) local newCameraCreator = nil if legacyCameraType~=nil then --[[ This function has been passed a CameraType enum value. Some of these map to the use of the LegacyCamera module, the value "Custom" will be translated to a movementMode enum value based on Dev and User settings, and "Scriptable" will disable the camera controller. --]] if legacyCameraType == Enum.CameraType.Scriptable then if self.activeCameraController then self.activeCameraController:Enable(false) self.activeCameraController = nil end return elseif legacyCameraType == Enum.CameraType.Custom then cameraMovementMode = self:GetCameraMovementModeFromSettings() elseif legacyCameraType == Enum.CameraType.Track then -- Note: The TrackCamera module was basically an older, less fully-featured -- version of ClassicCamera, no longer actively maintained, but it is re-implemented in -- case a game was dependent on its lack of ClassicCamera's extra functionality. cameraMovementMode = Enum.ComputerCameraMovementMode.Classic elseif legacyCameraType == Enum.CameraType.Follow then cameraMovementMode = Enum.ComputerCameraMovementMode.Follow elseif legacyCameraType == Enum.CameraType.Orbital then cameraMovementMode = Enum.ComputerCameraMovementMode.Orbital elseif legacyCameraType == Enum.CameraType.Attach or legacyCameraType == Enum.CameraType.Watch or legacyCameraType == Enum.CameraType.Fixed then newCameraCreator = LegacyCamera else warn("CameraScript encountered an unhandled Camera.CameraType value: ",legacyCameraType) end end if not newCameraCreator then if VRService.VREnabled then newCameraCreator = VRCamera elseif cameraMovementMode == Enum.ComputerCameraMovementMode.Classic or cameraMovementMode == Enum.ComputerCameraMovementMode.Follow or cameraMovementMode == Enum.ComputerCameraMovementMode.Default or cameraMovementMode == Enum.ComputerCameraMovementMode.CameraToggle then newCameraCreator = ClassicCamera elseif cameraMovementMode == Enum.ComputerCameraMovementMode.Orbital then newCameraCreator = OrbitalCamera else warn("ActivateCameraController did not select a module.") return end end local isVehicleCamera = self:ShouldUseVehicleCamera() if isVehicleCamera then if VRService.VREnabled then newCameraCreator = VRVehicleCamera else newCameraCreator = VehicleCamera end end -- Create the camera control module we need if it does not already exist in instantiatedCameraControllers local newCameraController if not instantiatedCameraControllers[newCameraCreator] then newCameraController = newCameraCreator.new() instantiatedCameraControllers[newCameraCreator] = newCameraController else newCameraController = instantiatedCameraControllers[newCameraCreator] if newCameraController.Reset then newCameraController:Reset() end end if self.activeCameraController then -- deactivate the old controller and activate the new one if self.activeCameraController ~= newCameraController then self.activeCameraController:Enable(false) self.activeCameraController = newCameraController self.activeCameraController:Enable(true) elseif not self.activeCameraController:GetEnabled() then self.activeCameraController:Enable(true) end elseif newCameraController ~= nil then -- only activate the new controller self.activeCameraController = newCameraController self.activeCameraController:Enable(true) end if self.activeCameraController then if cameraMovementMode~=nil then self.activeCameraController:SetCameraMovementMode(cameraMovementMode) elseif legacyCameraType~=nil then -- Note that this is only called when legacyCameraType is not a type that -- was convertible to a ComputerCameraMovementMode value, i.e. really only applies to LegacyCamera self.activeCameraController:SetCameraType(legacyCameraType) end end end function CameraModule:OnCameraSubjectChanged() local camera = workspace.CurrentCamera local cameraSubject = camera and camera.CameraSubject if self.activeOcclusionModule then self.activeOcclusionModule:OnCameraSubjectChanged(cameraSubject) end self:ActivateCameraController(nil, camera.CameraType) end function CameraModule:OnCameraTypeChanged(newCameraType: Enum.CameraType) if newCameraType == Enum.CameraType.Scriptable then if UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter then CameraUtils.restoreMouseBehavior() end end -- Forward the change to ActivateCameraController to handle self:ActivateCameraController(nil, newCameraType) end
--Rescripted by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") Players = game:GetService("Players") Sounds = { CoilSound = Handle:WaitForChild("CoilSound"), } Gravity = 196.20 JumpHeightPercentage = 0.25 ToolEquipped = false function GetAllConnectedParts(Object) local Parts = {} local function GetConnectedParts(Object) for i, v in pairs(Object:GetConnectedParts()) do local Ignore = false for ii, vv in pairs(Parts) do if v == vv then Ignore = true end end if not Ignore then table.insert(Parts, v) GetConnectedParts(v) end end end GetConnectedParts(Object) return Parts end function SetGravityEffect() if not GravityEffect or not GravityEffect.Parent then GravityEffect = Instance.new("BodyForce") GravityEffect.Name = "GravityCoilEffect" GravityEffect.Parent = Torso end local TotalMass = 0 local ConnectedParts = GetAllConnectedParts(Torso) for i, v in pairs(ConnectedParts) do if v:IsA("BasePart") then TotalMass = (TotalMass + v:GetMass()) end end local TotalMass = (TotalMass * 196.20 * (1 - JumpHeightPercentage)) GravityEffect.force = Vector3.new(0, TotalMass, 0) end function HandleGravityEffect(Enabled) if not CheckIfAlive() then return end for i, v in pairs(Torso:GetChildren()) do if v:IsA("BodyForce") then v:Destroy() end end for i, v in pairs({ToolUnequipped, DescendantAdded, DescendantRemoving}) do if v then v:disconnect() end end if Enabled then CurrentlyEquipped = true ToolUnequipped = Tool.Unequipped:connect(function() CurrentlyEquipped = false end) SetGravityEffect() DescendantAdded = Character.DescendantAdded:connect(function() wait() if not CurrentlyEquipped or not CheckIfAlive() then return end SetGravityEffect() end) DescendantRemoving = Character.DescendantRemoving:connect(function() wait() if not CurrentlyEquipped or not CheckIfAlive() then return end SetGravityEffect() end) end end function CheckIfAlive() return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Torso and Torso.Parent and Player and Player.Parent) and true) or false) end function Equipped(Mouse) Character = Tool.Parent Humanoid = Character:FindFirstChild("Humanoid") Torso = Character:FindFirstChild("Torso") or Character:FindFirstChild("UpperTorso") Player = Players:GetPlayerFromCharacter(Character) if not CheckIfAlive() then return end if HumanoidDied then HumanoidDied:disconnect() end HumanoidDied = Humanoid.Died:connect(function() if GravityEffect and GravityEffect.Parent then GravityEffect:Destroy() end end) Sounds.CoilSound:Play() HandleGravityEffect(true) ToolEquipped = true end function Unequipped() if HumanoidDied then HumanoidDied:disconnect() end HandleGravityEffect(false) ToolEquipped = false end Tool.Equipped:connect(Equipped) Tool.Unequipped:connect(Unequipped)
--//Weight//--
local VehicleWeight = 1700 --{Weight of vehicle in KG} local WeightDistribution = 60 --{To the rear}
--- DFStats
DFUse.Value = DFUse1:GetAsync(Plr.UserId) or DFUse.Value DFUse1:SetAsync(Plr.UserId, DFUse.Value) DFUse.Changed:connect(function() DFUse1:SetAsync(Plr.UserId, DFUse.Value) end) end) game.Players.PlayerRemoving:connect(function(Player) DFUse1:SetAsync(Player.UserId, Player.DFStats.DFUse.Value) end)
--//DEFAULT VALUES
local defexposure = game.Lighting.ExposureCompensation local nvg local onanim local gui local offanim local config local onremoved local setting local helmet function removehelmet() if plr.Character then if onremoved then onremoved:Disconnect() end animating = false togglenvg(false) actionservice:UnbindAction("nvgtoggle") if gui then gui:Destroy() end if helmet then helmet:Destroy() end end end function oncharadded(newchar) newchar:WaitForChild("Humanoid").Died:connect(function() removehelmet() end) newchar.ChildAdded:connect(function(child) local removebutton if child.Name == "Helmet" then helmet = child gui = Instance.new("ScreenGui") gui.IgnoreGuiInset = true removebutton = Instance.new("TextButton") removebutton.Text = "Helmet" removebutton.Size = UDim2.new(.05,0,.035,0) removebutton.TextColor3 = Color3.new(.75,.75,.75) removebutton.Position = UDim2.new(.1,0,.3,0) removebutton.BackgroundTransparency = .45 removebutton.BackgroundColor3 = Color3.fromRGB(124, 52, 38) removebutton.Font = Enum.Font.SourceSansBold removebutton.TextScaled = true removebutton.MouseButton1Down:connect(removehelmet) removebutton.Parent = gui gui.Parent = plr.PlayerGui onremoved = child.AncestryChanged:Connect(function(_, parent) if not parent then removehelmet() end end) end local newnvg = child:WaitForChild("Up",.5) if newnvg then nvg = newnvg config = require(nvg:WaitForChild("AUTO_CONFIG")) setting = nvg:WaitForChild("NVG_Settings") local noise = Instance.new("ImageLabel") noise.BackgroundTransparency = 1 noise.ImageTransparency = 1 local overlay = noise:Clone() overlay.Image = "rbxassetid://"..setting.OverlayImage.Value overlay.Size = UDim2.new(1,0,1,0) overlay.Name = "Overlay" local buttonpos = setting.RemoveButtonPosition.Value removebutton.Position = UDim2.new(buttonpos.X,0,buttonpos.Y,0) noise.Name = "Noise" noise.AnchorPoint = Vector2.new(.5,.5) noise.Position = UDim2.new(.5,0,.5,0) noise.Size = UDim2.new(2,0,2,0) overlay.Parent = gui noise.Parent = gui local info = config.tweeninfo local function addtweens(base,extra) if extra then for _,tween in pairs(extra)do table.insert(base,tween) end end end onanim = config.onanim offanim = config.offanim on_overlayanim = { tweenservice:Create(game.Lighting,info,{ExposureCompensation = setting.Exposure.Value}), tweenservice:Create(colorcorrection,info,{Brightness = setting.OverlayBrightness.Value,Contrast = .8,Saturation = -1,TintColor = setting.OverlayColor.Value}), tweenservice:Create(gui.Overlay,info,{ImageTransparency = 0}), tweenservice:Create(gui.Noise,info,{ImageTransparency = 0}), } off_overlayanim = { tweenservice:Create(game.Lighting,info,{ExposureCompensation = defexposure}), tweenservice:Create(colorcorrection,info,{Brightness = 0,Contrast = 0,Saturation = 0,TintColor = Color3.fromRGB(255, 255, 255)}), tweenservice:Create(gui.Overlay,info,{ImageTransparency = 1}), tweenservice:Create(gui.Noise,info,{ImageTransparency = 1}) } actionservice:BindAction("nvgtoggle",function() togglenvg(not nvgactive) return Enum.ContextActionResult.Pass end, true, Enum.KeyCode.N) end end) end plr.CharacterAdded:connect(oncharadded) local oldchar = workspace:FindFirstChild(plr.Name) if oldchar then oncharadded(oldchar) end function playtween(tweentbl) spawn(function() for _,step in pairs(tweentbl) do if typeof(step) == "number" then wait(step) else step:Play() end end end) end function applyprops(obj,props) for propname,val in pairs(props)do obj[propname] = val end end function cycle(grain) local label = gui.Noise local source = grain.src local newframe repeat newframe = source[math.random(1, #source)]; until newframe ~= grain.last label.Image = 'rbxassetid://'..newframe local rand = math.random(230,255) label.Position = UDim2.new(math.random(.4,.6),0,math.random(.4,.6),0) label.ImageColor3 = Color3.fromRGB(rand,rand,rand) grain.last = newframe end function togglenvg(bool) if not animating and nvg then nvgevent:FireServer() gui.TextButton.Visible = not bool animating = true nvgactive = bool if config.lens then config.lens.Material = bool and "Neon" or "Glass" end if bool then playtween(onanim) delay(.75,function() playtween(on_overlayanim) spawn(function() while nvgactive do cycle(config.dark) cycle(config.light) wait(0.05) end end) animating = false end) else playtween(offanim) delay(.5,function() playtween(off_overlayanim) animating = false end) end end end nvgevent.OnClientEvent:connect(function(nvg,activate) local twistjoint = nvg:WaitForChild("twistjoint") local config = require(nvg.AUTO_CONFIG) local lens = config.lens if lens then lens.Material = activate and "Neon" or "Glass" end playtween(config[activate and "onanim" or "offanim"]) end) local lighting = game.Lighting local rs = game.ReplicatedStorage local autolighting = rs:WaitForChild("EnableAutoLighting") if autolighting.Value then function llerp(a,b,t) return a*(1-t)+b*t end local minbrightness = rs:WaitForChild("MinBrightness").Value local maxbrightness = rs:WaitForChild("MaxBrightness").Value local minambient = rs:WaitForChild("MinAmbient").Value local maxambient = rs:WaitForChild("MaxAmbient").Value local minoutdoor = rs:WaitForChild("MinOutdoorAmbient").Value local maxoutdoor = rs:WaitForChild("MaxOutdoorAmbient").Value function setdaytime() local newtime = lighting.ClockTime local middaydiff = math.abs(newtime-12) local f = (1-middaydiff/12) lighting.Brightness = llerp(minbrightness,maxbrightness,f) lighting.Ambient = minambient:lerp(maxambient,f) lighting.OutdoorAmbient = minoutdoor:lerp(maxoutdoor,f) end game:GetService("RunService").RenderStepped:connect(setdaytime) end
--Editable--
local ID = 10862419793 --Your animation ID!-- local RunningSpeed = 25 --Running speed-- local NormalSpeed = 16 --Normal speed/walkspeed-- local FieldOfView = 80 --Field of view when running-- local key = "LeftShift" --Sprint/Run key--
-- Call the UpdateLabel function initially
UpdateLabel()
--Front
fWheel.CustomPhysicalProperties = PhysicalProperties.new(_Tune.FWheelDensity,fWheel.CustomPhysicalProperties.Friction,fWheel.CustomPhysicalProperties.Elasticity,fWheel.CustomPhysicalProperties.FrictionWeight,fWheel.CustomPhysicalProperties.ElasticityWeight)
-- Compiled with roblox-ts v1.2.7
local TS = require(game:GetService("ReplicatedStorage"):WaitForChild("Vendor"):WaitForChild("RuntimeLib")) local Maid = TS.import(script, TS.getModule(script, "@rbxts", "maid").Maid) local _services = TS.import(script, TS.getModule(script, "@rbxts", "services")) local HttpService = _services.HttpService local PhysicsService = _services.PhysicsService local Workspace = _services.Workspace local getNearestPart = TS.import(script, game:GetService("ReplicatedStorage"), "Common", "helpers", "common").getNearestPart local CustomerAnimations = TS.import(script, game:GetService("ServerScriptService"), "customers", "components", "animations").CustomerAnimations local CustomerAppearance = TS.import(script, game:GetService("ServerScriptService"), "customers", "components", "appearance").CustomerAppearance local CustomerMovement = TS.import(script, game:GetService("ServerScriptService"), "customers", "components", "movement").CustomerMovement local waypoints = TS.import(script, game:GetService("ServerScriptService"), "customers", "components", "movement", "waypoints").waypoints local Customer do Customer = setmetatable({}, { __tostring = function() return "Customer" end, }) Customer.__index = Customer function Customer.new(...) local self = setmetatable({}, Customer) return self:constructor(...) or self end function Customer:constructor(config) self.config = config self.id = HttpService:GenerateGUID(false) self.appearance = CustomerAppearance.new(self) self.model = self.appearance:GetModel() self.rootPart = self.model:WaitForChild("HumanoidRootPart") self.humanoid = self.model:WaitForChild("Humanoid") self.movement = CustomerMovement.new(self) self.animations = CustomerAnimations.new(self) self.maid = Maid.new() self.maid:GiveTask(self.model) self.maid:GiveTask(self.movement) self.maid:GiveTask(self.animations) end function Customer:Spawn() local position = waypoints.Spawn[math.random(#waypoints.Spawn) - 1 + 1].Position local spawnOffset = Vector3.new(0, self.humanoid.HipHeight + 3, 0) local spawnPosition = position + spawnOffset local _exp = self.model:GetDescendants() local _arg0 = function(desc) if desc:IsA("BasePart") then PhysicsService:SetPartCollisionGroup(desc, "Customers") end end -- ▼ ReadonlyArray.forEach ▼ for _k, _v in ipairs(_exp) do _arg0(_v, _k - 1, _exp) end -- ▲ ReadonlyArray.forEach ▲ self.spawnOffset = spawnOffset self.model.Parent = Workspace self.model:PivotTo(CFrame.new(spawnPosition)) self:Log("Spawned") end function Customer:MoveTo(target, floorId) self.humanoid.Sit = false if type(target) == "string" then local _fn = self.movement local _condition = floorId if not (_condition ~= 0 and (_condition == _condition and (_condition ~= "" and _condition))) then _condition = self.config.floorId end _fn:MoveToWaypoint(target, _condition) else self.movement:MoveTo(target) end end function Customer:Sit(seat) if not seat then seat = getNearestPart(waypoints.Seat, self.rootPart.Position) end seat:Sit(self.humanoid) end function Customer:Destroy() self.maid:Destroy() end function Customer:Log(...) local messages = { ... } end end return { Customer = Customer, }
--[=[ @within Matter :::info Topologically-aware function This function is only usable if called within the context of [`Loop:begin`](/api/Loop#begin). ::: Utility for easy time-based throttling. Accepts a duration, and returns `true` if it has been that long since the last time this function returned `true`. Always returns `true` the first time. This function returns unique results keyed by script and line number. Additionally, uniqueness can be keyed by a unique value, which is passed as a second parameter. This is useful when iterating over a query result, as you can throttle doing something to each entity individually. ```lua if useThrottle(1) then -- Keyed by script and line number only print("only prints every second") end for id, enemy in world:query(Enemy) do if useThrottle(5, id) then -- Keyed by script, line number, and the entity id print("Recalculate target...") end end ``` @param seconds number -- The number of seconds to throttle for @param discriminator? any -- A unique value to additionally key by @return boolean -- returns true every x seconds, otherwise false ]=]
local function useThrottle(seconds, discriminator) local storage = topoRuntime.useHookState(discriminator, cleanup) if storage.time == nil or os.clock() - storage.time >= seconds then storage.time = os.clock() storage.expiry = os.clock() + seconds return true end return false end return useThrottle
--[=[ @param name string @param enums {string} @return EnumList Constructs a new EnumList. ```lua local directions = EnumList.new("Directions", { "Up", "Down", "Left", "Right", }) local direction = directions.Up ``` ]=]
function EnumList.new(name: string, enums: EnumNames) assert(type(name) == "string", "Name string required") assert(type(enums) == "table", "Enums table required") local self = setmetatable({}, EnumList) self[LIST_KEY] = {} self[NAME_KEY] = name for i, enumName in ipairs(enums) do assert(type(enumName) == "string", "Enum name must be a string") local enumItem = CreateEnumItem(enumName, i, self) self[enumName] = enumItem table.insert(self[LIST_KEY], enumItem) end table.freeze(self) return self end
---Strobe SCRIPT, DO NOT EDIT!---
for i,v in pairs(game.workspace.PLights:GetChildren()) do spawn(function() while true do v.MLSelling.Dimmer:Invoke(180) wait(0.005) v.MLSelling.Dimmer:Invoke(0) wait(0.005) end end) end
---------------------------------------------------------------------------------------
local customMenuFieldOfView = defaultMenuFieldOfView * configuration.MenuFieldOfView.Value local customMenuBlurIntesity = defaultMenuBlurIntensity / configuration.MenuBlurIntensity.Value local customMenuMusicVolume = defaultMenuMusicVolume * configuration.MenuMusicVolume.Value local customGameMusicVolume = defaultGameMusicVolume * configuration.GameMusicVolume.Value
-- Properties
BillboardGui.Parent = script.Parent.Parent.Parent.OwnerPart BillboardGui.LightInfluence = 1 BillboardGui.Size = UDim2.new(0, 200, 0, 50) BillboardGui.StudsOffset = Vector3.new(0, 2, 0) BillboardGui.MaxDistance =25 TextBox.Parent = BillboardGui TextBox.BackgroundColor3 = Color3.new(1, 1, 1) TextBox.BackgroundTransparency = 1 TextBox.Size = UDim2.new(0, 200, 0, 50) TextBox.Font = Enum.Font.SourceSans TextBox.Text = script.Parent.Value.Name..',S Car.' TextBox.TextColor3 = Color3.new(0.929412, 0.109804, 1) TextBox.TextScaled = true TextBox.TextSize = 14 TextBox.TextWrapped = true
--[[** wraps a callback in an assert with checkArgs @param callback The function to wrap @param checkArgs The function to use to check arguments in the assert @returns A function that first asserts using checkArgs and then calls callback **--]]
function t.wrap(callback, checkArgs) assert(checkWrap(callback, checkArgs)) return function(...) assert(checkArgs(...)) return callback(...) end end end
--FireServer
script.Parent.OnServerEvent:connect(function(pl,Fnc,...) F[Fnc](...) end)
--!strict -- https://programming-idioms.org/idiom/19/reverse-a-list/1314/lua
type Array<T> = { [number]: any } function reverse(t: Array<any>): Array<any> local n = #t local i = 1 while i < n do t[i], t[n] = t[n], t[i] i = i + 1 n = n - 1 end return t end return reverse
--[[* * Helpers ]]
local function expandRange(args: Array<any>, options) if typeof(options.expandRange) == "function" then return options.expandRange(table.unpack(args), options) end Array.sort(args) local value = ("[%s]"):format(Array.join(args, "-")) local ok = pcall(function() --[[ eslint-disable-next-line no-new ]] RegExp(value) end) if not ok then return Array.join( Array.map(args, function(v) return utils.escapeRegex(v) end), ".." ) end return value end
-------------------------------------------------------------- -- You DO NOT need to add yourself to any of these lists!!! -- --------------------------------------------------------------
local Owners={kill1773} -- Can set SuperAdmins, & use all the commands local SuperAdmins={kill1773} -- Can set permanent admins, & shutdown the game local Admins={kill1773} -- Can ban, crash, & set Moderators/VIP local Mods={killl1773} -- Can kick, mute, & use most commands local VIP={kill1773} -- Can use nonabusive commands only on self local Settings={
--[[ LOWGames Studios Date: 27 October 2022 by Elder ]]
-- local u1 = nil; coroutine.wrap(function() u1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library")); end)(); return function(p1, p2) local v1 = nil; if type(p1) == "boolean" then v1 = "BoolValue"; elseif type(p1) == "number" then v1 = "NumberValue"; elseif type(p1) == "string" then v1 = "StringValue"; elseif typeof(p1) == "BrickColor" then v1 = "BrickColorValue"; elseif typeof(p1) == "CFrame" then v1 = "CFrameValue"; elseif typeof(p1) == "Color3" then v1 = "Color3Value"; elseif typeof(p1) == "Ray" then v1 = "RayValue"; elseif typeof(p1) == "Vector3" then v1 = "Vector3Value"; elseif typeof(p1) == "Instance" then v1 = "ObjectValue"; end; if not v1 then u1.Print("Value type not supported", true); return; end; local v2 = Instance.new(v1); v2.Value = p1; if p2 then v2.Parent = p2; end; return v2; end;
--[[ Render the child component so that ExternalEventConnections can be nested like so: Roact.createElement(ExternalEventConnection, { event = UserInputService.InputBegan, callback = inputBeganCallback, }, { Roact.createElement(ExternalEventConnection, { event = UserInputService.InputEnded, callback = inputChangedCallback, }) }) ]]
function ExternalEventConnection:render() return Roact.oneChild(self.props[Roact.Children]) end function ExternalEventConnection:didMount() local event = self.props.event local callback = self.props.callback self.connection = event:Connect(callback) end function ExternalEventConnection:didUpdate(oldProps) if self.props.event ~= oldProps.event or self.props.callback ~= oldProps.callback then self.connection:Disconnect() self.connection = self.props.event:Connect(self.props.callback) end end function ExternalEventConnection:willUnmount() self.connection:Disconnect() self.connection = nil end return ExternalEventConnection
--Made by Luckymaxer
Model = script.Parent Players = game:GetService("Players") Debris = game:GetService("Debris") Creator = Model:FindFirstChild("Creator") Tool = Model:FindFirstChild("Tool") function DestroyModel() Debris:AddItem(Model, 2) end if not Creator or not Creator.Value or not Creator.Value:IsA("Player") or not Creator.Value.Parent or not Tool or not Tool.Value or not Tool.Value.Parent then DestroyModel() return end Creator = Creator.Value Tool = Tool.Value Character = Creator.Character if not Character then DestroyModel() return end Creator.Changed:connect(function(Property) if Property == "Parent" and not Creator.Parent then DestroyModel() end end) Character.Changed:connect(function(Property) if Property == "Parent" and not Character.Parent then DestroyModel() end end) Tool.Changed:connect(function(Property) if Property == "Parent" and (not Tool.Parent or (not Tool.Parent:IsA("Backpack") and not Players:GetPlayerFromCharacter(Tool.Parent))) then DestroyModel() end end)
--EDIT BELOW----------------------------------------------------------------------
settings.PianoSoundRange = 25 settings.KeyAesthetics = true settings.PianoSounds = { "269058581", "269058744", "269058842", "269058899", "269058974", "269059048" }
--[=[ Mounts children to the parent and returns an object which will cleanup and delete all children when removed. Note that this effectively recursively mounts children and their values, which is the heart of the reactive tree. ```lua Blend.New "ScreenGui" { Parent = game.Players.LocalPlayer.PlayerGui; [Blend.Children] = { Blend.New "Frame" { Size = UDim2.new(1, 0, 1, 0); BackgroundTransparency = 0.5; }; }; }; ``` Note since 6.14 you don't need to be explicit about [Blend.Children]. Any number-based index in the mounting process will be automatically inferred as children to mount. ```lua Blend.New "ScreenGui" { Parent = game.Players.LocalPlayer.PlayerGui; Blend.New "Frame" { Size = UDim2.new(1, 0, 1, 0); BackgroundTransparency = 0.5; }; }; ``` Rules: * `{ Instance }` - Tables of instances are all parented to the parent * Brio<Instance> will last for the lifetime of the brio * Brio<Observable<Instance>> will last for the lifetime of the brio * Brio<Signal<Instance>> will also act as above * Brio<Promise<Instance>> will also act as above * Brio<{ Instance } will also act as above * Observable<Instance> will parent to the parent * Signal<Instance> will act as Observable<Instance> * ValueObject<Instance> will act as an Observable<Instance> * Promise<Instance> will act as an Observable<Instance> * will parent all instances to the parent * Observables may emit non-observables (in form of Computed/Dynamic) * Observable<Brio<Instance>> will last for the lifetime of the brio, and parent the instance. * Observable<Observable<Instance>> occurs when computed returns a value. * ValueObject<Instance> will switch to the current value * function - Will be invoked as `func(parent)` and then the standard scheme will be applied Cleanup: * Instances will be cleaned up on unsubscribe @param parent Instance @param value any @return Observable ]=]
function Blend.Children(parent, value) assert(typeof(parent) == "Instance", "Bad parent") local observe = Blend._observeChildren(value, parent) if observe then return observe:Pipe({ Rx.tap(function(child) child.Parent = parent; end); }) else return Rx.EMPTY end end
-- Set the rotation:
function CamLock.SetRotation(horizontal, vertical) SetRotation(horizontal, vertical) end
--Change this section to add or remove admins by their UserID. --Parts of the admin panel can be disabled for certain users. --To find a player's ID, go to their profile and look in the address bar. The number there is your ID.
_G.panelAdmins = { [game.CreatorId] = "kick ban unban shutdown kill broadcast", --Gives the place owner (likely you) full access [1199573361] = "kick ban unban shutdown kill broadcast", [67890] = "kick ban unban" }
--[[ streamable = Streamable.new(parent: Instance, childName: string) streamable:Observe(handler: (child: Instance, maid: Maid) -> void): Connection streamable:Destroy() --]]
local Maid = require(script.Parent.Maid) local Signal = require(script.Parent.Signal) local Thread = require(script.Parent.Thread) local Streamable = {} Streamable.__index = Streamable function Streamable.new(parent, childName) local self = setmetatable({}, Streamable) self._maid = Maid.new() self._shown = Signal.new(self._maid) self._shownMaid = Maid.new() self._maid:GiveTask(self._shownMaid) self.Instance = parent:FindFirstChild(childName) local function OnInstanceSet() local instance = self.Instance self._shown:Fire(instance, self._shownMaid) self._shownMaid:GiveTask(instance:GetPropertyChangedSignal("Parent"):Connect(function() if (not instance.Parent) then self._shownMaid:DoCleaning() end end)) self._shownMaid:GiveTask(function() if (self.Instance == instance) then self.Instance = nil end end) end local function OnChildAdded(child) if (child.Name == childName and not self.Instance) then self.Instance = child OnInstanceSet() end end self._maid:GiveTask(parent.ChildAdded:Connect(OnChildAdded)) if (self.Instance) then OnInstanceSet() end return self end function Streamable:Observe(handler) if (self.Instance) then Thread.SpawnNow(handler, self.Instance, self._shownMaid) end return self._shown:Connect(handler) end function Streamable:Destroy() self._maid:Destroy() end return Streamable
------------------------------------------------------------------------ ------------------------------------------------------------------------
function module:GetSwordSkin(Skin) local inv = game.ReplicatedStorage.Inventory.Swords for i,v in pairs(inv.Common:GetChildren()) do if v.Name == Skin then return v.Value else for i,v in pairs(inv.Rare:GetChildren()) do if v.Name == Skin then return v.Value else for i,v in pairs(inv.Epic:GetChildren()) do if v.Name == Skin then return v.Value else for i,v in pairs(inv.Legendary:GetChildren()) do if v.Name == Skin then return v.Value else print("Couldn't find the skin info") return nil end end end end end end end end end
-- setup emote chat hook --game:GetService("Players").LocalPlayer.Chatted:connect(function(msg) -- local emote = "" -- if (string.sub(msg, 1, 3) == "/e ") then -- emote = string.sub(msg, 4) -- elseif (string.sub(msg, 1, 7) == "/emote ") then -- emote = string.sub(msg, 8) -- end
--Simply put it inside any model with bricks inside
local prev local parts = script.Parent:GetChildren() for i = 1,#parts do if (parts[i].className == "Part") or (parts[i].className == "WedgePart") or (parts[i].className == "Seat") or (parts[i].className == "VehicleSeat") or (parts[i].className == "CornerWedgePart") or (parts[i].className == "WedgePart") or (parts[i].className == "UnionOperation") then if (prev ~= nil)then local weld = Instance.new("Weld") weld.Part0 = prev weld.Part1 = parts[i] weld.C0 = prev.CFrame:inverse() weld.C1 = parts[i].CFrame:inverse() weld.Parent = prev end prev = parts[i] end end
--[[ Creates a new copy of the dictionary and sets a value inside it. ]]
function Immutable.Set(dictionary, key, value) local new = {} for key, value in pairs(dictionary) do new[key] = value end new[key] = value return new end
------------------------------------------------------------------------ -- handle locals, globals and upvalues and related processing -- * search mechanism is recursive, calls itself to search parents -- * used only in singlevar() ------------------------------------------------------------------------
function luaY:singlevaraux(fs, n, var, base) if fs == nil then -- no more levels? self:init_exp(var, "VGLOBAL", luaP.NO_REG) -- default is global variable return "VGLOBAL" else local v = self:searchvar(fs, n) -- look up at current level if v >= 0 then self:init_exp(var, "VLOCAL", v) if base == 0 then self:markupval(fs, v) -- local will be used as an upval end return "VLOCAL" else -- not found at current level; try upper one if self:singlevaraux(fs.prev, n, var, 0) == "VGLOBAL" then return "VGLOBAL" end var.info = self:indexupvalue(fs, n, var) -- else was LOCAL or UPVAL var.k = "VUPVAL" -- upvalue in this level return "VUPVAL" end--if v end--if fs end
--[=[ Provides a data storage facility with an ability to get sub-stores. So you can write directly to this store, overwriting all children, or you can have more partial control at children level. This minimizes accidently overwriting. The big cost here is that we may leave keys that can't be removed. @server @class DataStoreStage ]=]
local require = require(script.Parent.loader).load(script) local BaseObject = require("BaseObject") local DataStoreDeleteToken = require("DataStoreDeleteToken") local DataStoreWriter = require("DataStoreWriter") local Promise = require("Promise") local PromiseUtils = require("PromiseUtils") local Signal = require("Signal") local Table = require("Table") local DataStoreStage = setmetatable({}, BaseObject) DataStoreStage.ClassName = "DataStoreStage" DataStoreStage.__index = DataStoreStage
-- @Context Client -- Returns the character state script for your local client
function APICharacterState.GetCharacterState() return localCharacterState end
--// All global vars will be wiped/replaced except script
return function(data) local playergui = service.PlayerGui local localplayer = service.Players.LocalPlayer local gui = service.New("ScreenGui") local toggle = service.New("ImageButton", gui) local gTable = client.UI.Register(gui) if client.UI.Get("HelpButton", gui, true) then gui:Destroy() gTable:Destroy() return nil end gTable.Name = "HelpButton" gTable.CanKeepAlive = false toggle.Name = "Toggle" toggle.BackgroundTransparency = 1 toggle.Position = UDim2.new(1, -45, 1, -45) toggle.Size = UDim2.new(0, 40, 0, 40) toggle.Image = "rbxassetid://357249130" toggle.ImageTransparency = 0.5 --if client.UI.Get("Chat") then -- toggle.Position = UDim2.new(1, -(45+40),1, -45) --end toggle.MouseButton1Down:connect(function() local found = client.UI.Get("UserPanel",nil,true) if found then found.Object:Destroy() else client.UI.Make("UserPanel",{}) end end) gTable:Ready() end
-- Reload animation
function reload() if not reloading then reloading=true; updateAmmo() local reloadTime = tankStats.ReloadTime.Value; Loaded = false local Timer = 0 for i = 7, 1, -1 do wait(reloadTime/8); Timer = Timer + 1 if Timer >= 2 and Loaded == false then GUI.ReloadSound:Play() Loaded = true end end wait(reloadTime/8); if Timer >= 7 then GUI.Loaded.Visible = true Timer = 0 reloading = false; end end end function fire() if reloading then return end; local APAmmo = tankStats.APAmmo; local HEAmmo = tankStats.HEAmmo; if currRound.Value == "AP" and APAmmo.Value <= 0 then return end if currRound.Value == "HE" and HEAmmo.Value <= 0 then return end if currRound.Value == "AP" then APAmmo.Value = APAmmo.Value - 1; else HEAmmo.Value = HEAmmo.Value - 1; end GUI.Loaded.Visible = false local fireScript = tankStats["Fire" .. currRound.Value]:clone(); fireScript.Parent = parts; fireScript.Disabled = false; reload(GUI); end
-- Decompiled with the Synapse X Luau decompiler.
local v1 = script:FindFirstAncestor("MainUI"); local l__Bricks__2 = game:GetService("ReplicatedStorage"):WaitForChild("Bricks"); local l__TweenService__1 = game:GetService("TweenService"); return function(p1) if not workspace:FindFirstChild("SeekMoving", true) then warn("cant find elevator!"); return; end; local l__PrimaryPart__3 = workspace:FindFirstChild("SeekMoving", true).PrimaryPart; p1.stopcam = true; p1.freemouse = true; p1.hideplayers = -1; p1.update(); local l__CamPos1__4 = l__PrimaryPart__3:FindFirstChild("CamPos1", true); local l__CamPos2__5 = l__PrimaryPart__3:FindFirstChild("CamPos2", true); local l__CFrame__6 = p1.cam.CFrame; local v7 = tick() + 1; local l__FieldOfView__8 = p1.cam.FieldOfView; for v9 = 1, 100000 do task.wait(); local v10 = l__TweenService__1:GetValue((1 - math.abs(tick() - v7)) / 1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut); if not (tick() <= v7) then break; end; p1.cam.CFrame = l__CFrame__6:Lerp(l__CamPos1__4.WorldCFrame, v10) * p1.csgo; p1.cam.FieldOfView = l__FieldOfView__8 + (p1.fovspring - l__FieldOfView__8) * v10; end; local v11 = CFrame.new(0, 0, 0); local v12 = tick() + 2; local l__CFrame__13 = p1.cam.CFrame; local l__WorldCFrame__14 = l__PrimaryPart__3:FindFirstChild("CamPos2", true).WorldCFrame; l__TweenService__1:Create(p1.cam, TweenInfo.new(2, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), { FieldOfView = 30 }):Play(); p1.camShaker:ShakeOnce(8, 0.2, 0.5, 100); local l__WorldCFrame__15 = l__CamPos1__4.WorldCFrame; local l__WorldCFrame__16 = l__CamPos2__5.WorldCFrame; local v17 = tick() + 6.25; l__TweenService__1:Create(p1.cam, TweenInfo.new(6, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { FieldOfView = 60 }):Play(); for v18 = 1, 100000 do task.wait(); if not (tick() <= v17) then break; end; p1.cam.CFrame = l__CamPos1__4.WorldCFrame:Lerp(l__CamPos2__5.WorldCFrame, (l__TweenService__1:GetValue((6.25 - math.abs(tick() - v17)) / 6.25, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut))) * p1.csgo; end; local v19, v20, v21 = CFrame.new(Vector3.new(0, 0, 0), l__PrimaryPart__3.CFrame.LookVector):ToOrientation(); if math.abs(p1.ax - math.deg(v20)) > 180 then p1.ax_t = p1.ax_t - 360; end; p1.ax_t = math.deg(v20); local l__CFrame__22 = p1.cam.CFrame; local v23 = tick() + 1; local l__FieldOfView__24 = p1.cam.FieldOfView; for v25 = 1, 100000 do task.wait(); local v26 = l__TweenService__1:GetValue((1 - math.abs(tick() - v23)) / 1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut); if not (tick() <= v23) then break; end; p1.cam.CFrame = l__CFrame__22:Lerp(p1.basecamcf, v26) * p1.csgo; p1.cam.FieldOfView = l__FieldOfView__24 + (p1.fovspring - l__FieldOfView__24) * v26; end; p1.stopcam = false; p1.freemouse = false; p1.hideplayers = 1; p1.update(); end;
--[=[ Observes an attribute on an instance. @param instance Instance @param attributeName string @param defaultValue any? @return Observable<any> ]=]
function RxAttributeUtils.observeAttribute(instance, attributeName, defaultValue) assert(typeof(instance) == "Instance", "Bad instance") assert(type(attributeName) == "string", "Bad attributeName") return Observable.new(function(sub) local maid = Maid.new() local function handleAttributeChanged() local attributeValue = instance:GetAttribute(attributeName) if attributeValue == nil then sub:Fire(defaultValue) else sub:Fire(attributeValue) end end maid:GiveTask(instance:GetAttributeChangedSignal(attributeName):Connect(handleAttributeChanged)) handleAttributeChanged() return maid end) end
-- Use module to insert latest tool
local GetLatestTool = require(580330877); if not GetLatestTool then return; end;
--[[ Component.Auto(folder) -> Create components automatically from descendant modules of this folder -> Each module must have a '.Tag' string property -> Each module optionally can have '.RenderPriority' number property component = Component.FromTag(tag) -> Retrieves an existing component from the tag name component = Component.new(tag, class [, renderPriority]) -> Creates a new component from the tag name, class module, and optional render priority component:GetAll(): ComponentInstance[] component:GetFromInstance(instance): ComponentInstance | nil component:GetFromID(id): ComponentInstance | nil component:Filter(filterFunc): ComponentInstance[] component:WaitFor(instanceOrName: Instance | string [, timeout: number = 60]): Promise<ComponentInstance> component:Destroy() component.Added(obj: ComponentInstance) component.Removed(obj: ComponentInstance) ----------------------------------------------------------------------- A component class must look something like this: -- DEFINE local MyComponent = {} MyComponent.__index = MyComponent -- CONSTRUCTOR function MyComponent.new(instance) local self = setmetatable({}, MyComponent) return self end -- FIELDS AFTER CONSTRUCTOR COMPLETES MyComponent.Instance: Instance -- OPTIONAL LIFECYCLE HOOKS function MyComponent:Init() end -> Called right after constructor function MyComponent:Deinit() end -> Called right before deconstructor function MyComponent:HeartbeatUpdate(dt) ... end -> Updates every heartbeat function MyComponent:SteppedUpdate(dt) ... end -> Updates every physics step function MyComponent:RenderUpdate(dt) ... end -> Updates every render step -- DESTRUCTOR function MyComponent:Destroy() end A component is then registered like so: local Component = require(Knit.Util.Component) local MyComponent = require(somewhere.MyComponent) local tag = "MyComponent" local myComponent = Component.new(tag, MyComponent) Components can be listened and queried: myComponent.Added:Connect(function(instanceOfComponent) -- New MyComponent constructed end) myComponent.Removed:Connect(function(instanceOfComponent) -- New MyComponent deconstructed end) --]]
local Maid = require(script.Parent.Maid) local Signal = require(script.Parent.Signal) local Promise = require(script.Parent.Promise) local Thread = require(script.Parent.Thread) local TableUtil = require(script.Parent.TableUtil) local CollectionService = game:GetService("CollectionService") local RunService = game:GetService("RunService") local Players = game:GetService("Players") local IS_SERVER = RunService:IsServer() local DEFAULT_WAIT_FOR_TIMEOUT = 60 local ATTRIBUTE_ID_NAME = "ComponentServerId"
-- WorldSpace -> ScreenSpace. Raw function taking a world position and giving you the -- screen position.
function ScreenSpace.WorldToScreen(at) local point = workspace.CurrentCamera.CoordinateFrame:pointToObjectSpace(at) local aspectRatio = ScreenSpace.AspectRatio() local hfactor = math.tan(math.rad(workspace.CurrentCamera.FieldOfView)/2) local wfactor = aspectRatio*hfactor -- local x = (point.x/point.z) / -wfactor local y = (point.y/point.z) / hfactor -- return Vector2.new(ScreenSpace.ViewSizeX()*(0.5 + 0.5*x), ScreenSpace.ViewSizeY()*(0.5 + 0.5*y)) end
-- Exposed API:
local Rain = {} Rain.CollisionMode = CollisionMode function Rain:Enable(tweenInfo) if tweenInfo ~= nil and typeof(tweenInfo) ~= "TweenInfo" then error("bad argument #1 to 'Enable' (TweenInfo expected, got " .. typeof(tweenInfo) .. ")", 2) end disconnectLoop() -- Just in case :Enable(..) is called multiple times on accident Emitter.RainStraight.Enabled = true Emitter.RainTopDown.Enabled = true Emitter.Parent = workspace.CurrentCamera for i = 1, RAIN_SPLASH_NUM do splashAttachments[i].Parent = workspace.Terrain rainAttachments[i].Parent = workspace.Terrain end if RunService:IsRunning() then -- don't need sound in studio preview, it won't work anyway SoundGroup.Parent = game:GetService("SoundService") end connectLoop() if tweenInfo then TweenService:Create(GlobalModifier, tweenInfo, {Value = 0}):Play() else GlobalModifier.Value = 0 end if not Sound.Playing then Sound:Play() Sound.TimePosition = math.random()*Sound.TimeLength end disabled = false end function Rain:Disable(tweenInfo) if tweenInfo ~= nil and typeof(tweenInfo) ~= "TweenInfo" then error("bad argument #1 to 'Disable' (TweenInfo expected, got " .. typeof(tweenInfo) .. ")", 2) end if tweenInfo then local tween = TweenService:Create(GlobalModifier, tweenInfo, {Value = 1}) tween.Completed:connect(function(state) if state == Enum.PlaybackState.Completed then -- Only disable the rain completely once the visual effects are faded out disable() end tween:Destroy() end) tween:Play() -- Start tweening out sound now as well disableSound(tweenInfo) else GlobalModifier.Value = 1 disable() end disabled = true end function Rain:SetColor(value, tweenInfo) if typeof(value) ~= "Color3" then error("bad argument #1 to 'SetColor' (Color3 expected, got " .. typeof(value) .. ")", 2) elseif tweenInfo ~= nil and typeof(tweenInfo) ~= "TweenInfo" then error("bad argument #2 to 'SetColor' (TweenInfo expected, got " .. typeof(tweenInfo) .. ")", 2) end if tweenInfo then TweenService:Create(Color, tweenInfo, {Value = value}):Play() else Color.Value = value end end local function makeRatioSetter(methodName, valueObject) -- Shorthand because most of the remaining property setters are very similar return function(_, value, tweenInfo) if typeof(value) ~= "number" then error("bad argument #1 to '" .. methodName .. "' (number expected, got " .. typeof(value) .. ")", 2) elseif tweenInfo ~= nil and typeof(tweenInfo) ~= "TweenInfo" then error("bad argument #2 to '" .. methodName .. "' (TweenInfo expected, got " .. typeof(tweenInfo) .. ")", 2) end value = math.clamp(value, 0, 1) if tweenInfo then TweenService:Create(valueObject, tweenInfo, {Value = value}):Play() else valueObject.Value = value end end end Rain.SetTransparency = makeRatioSetter("SetTransparency", Transparency) Rain.SetSpeedRatio = makeRatioSetter("SetSpeedRatio", SpeedRatio) Rain.SetIntensityRatio = makeRatioSetter("SetIntensityRatio", IntensityRatio) Rain.SetLightEmission = makeRatioSetter("SetLightEmission", LightEmission) Rain.SetLightInfluence = makeRatioSetter("SetLightInfluence", LightInfluence) function Rain:SetVolume(volume, tweenInfo) if typeof(volume) ~= "number" then error("bad argument #1 to 'SetVolume' (number expected, got " .. typeof(volume) .. ")", 2) elseif tweenInfo ~= nil and typeof(tweenInfo) ~= "TweenInfo" then error("bad argument #2 to 'SetVolume' (TweenInfo expected, got " .. typeof(tweenInfo) .. ")", 2) end if tweenInfo then TweenService:Create(SoundGroup, tweenInfo, {Volume = volume}):Play() else SoundGroup.Volume = volume end end function Rain:SetDirection(direction, tweenInfo) if typeof(direction) ~= "Vector3" then error("bad argument #1 to 'SetDirection' (Vector3 expected, got " .. typeof(direction) .. ")", 2) elseif tweenInfo ~= nil and typeof(tweenInfo) ~= "TweenInfo" then error("bad argument #2 to 'SetDirection' (TweenInfo expected, got " .. typeof(tweenInfo) .. ")", 2) end if not (direction.unit.magnitude > 0) then -- intentional statement formatting since NaN comparison warn("Attempt to set rain direction to a zero-length vector, falling back on default direction = (" .. tostring(RAIN_DEFAULT_DIRECTION) .. ")") direction = RAIN_DEFAULT_DIRECTION end if tweenInfo then TweenService:Create(RainDirection, tweenInfo, {Value = direction}):Play() else RainDirection.Value = direction end end function Rain:SetCeiling(ceiling) if ceiling ~= nil and typeof(ceiling) ~= "number" then error("bad argument #1 to 'SetCeiling' (number expected, got " .. typeof(ceiling) .. ")", 2) end currentCeiling = ceiling end function Rain:SetStraightTexture(asset) if typeof(asset) ~= "string" then error("bad argument #1 to 'SetStraightTexture' (string expected, got " .. typeof(asset) .. ")", 2) end Emitter.RainStraight.Texture = asset for _,v in pairs(rainAttachments) do v.RainStraight.Texture = asset end end function Rain:SetTopDownTexture(asset) if typeof(asset) ~= "string" then error("bad argument #1 to 'SetStraightTexture' (string expected, got " .. typeof(asset) .. ")", 2) end Emitter.RainTopDown.Texture = asset for _,v in pairs(rainAttachments) do v.RainTopDown.Texture = asset end end function Rain:SetSplashTexture(asset) if typeof(asset) ~= "string" then error("bad argument #1 to 'SetStraightTexture' (string expected, got " .. typeof(asset) .. ")", 2) end for _,v in pairs(splashAttachments) do v.RainSplash.Texture = asset end end function Rain:SetSoundId(asset) if typeof(asset) ~= "string" then error("bad argument #1 to 'SetSoundId' (string expected, got " .. typeof(asset) .. ")", 2) end Sound.SoundId = asset end function Rain:SetCollisionMode(mode, param) collisionList = nil collisionFunc = nil end return Rain
-- Decompiled with the Synapse X Luau decompiler.
local l__LocalPlayer__1 = game.Players.LocalPlayer; local v2 = require(l__LocalPlayer__1:WaitForChild("PlayerScripts"):WaitForChild("PlayerModule")):GetControls(); local v3 = game["Run Service"]; local l__mouse__4 = l__LocalPlayer__1:GetMouse(); local v5 = {}; local u1 = require(script.Parent); local l__TweenService__2 = game:GetService("TweenService"); local l__UserInputService__3 = game:GetService("UserInputService"); local l__MinigameBackout__4 = script:FindFirstAncestor("MainUI").MinigameBackout; local l__Parent__5 = script.Parent.Parent.Parent; local function u6(p1) for v6 = #p1, 1, -1 do local v7 = math.random(v6); p1[v6] = p1[v7]; p1[v7] = p1[v6]; end; end; local function u7(p2) if u1.stopcam == true then return; end; u1.hum:UnequipTools(); if p2 == "Padlock" then require(script.Padlock)(u1); end; local u8 = nil; u8 = coroutine.create(function() if p2 == "ElevatorBreaker" then u1.stopcam = true; u1.freemouse = true; u1.hideplayers = 2; local v8 = CFrame.new(0, 0, 0); local v9 = tick() + 2; local l__WorldCFrame__10 = workspace.ElevatorBreaker.Box:WaitForChild("ElevatorBreakerCameraCFrame",true).WorldCFrame u1.camShaker:ShakeOnce(2, 0.5, 0.5, 8); local l__CFrame__9 = u1.cam.CFrame; local l__FieldOfView__10 = u1.cam.FieldOfView; local u11 = false; task.spawn(function() for v11 = 1, 100000 do task.wait(); local v12 = l__TweenService__2:GetValue((2 - math.abs(tick() - v9)) / 2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut); if not (tick() <= v9) then break; end; u1.cam.CFrame = l__CFrame__9:Lerp(l__WorldCFrame__10, v12) * u1.csgo; u1.cam.FieldOfView = l__FieldOfView__10 + (57 - l__FieldOfView__10) * v12; end; u1.cam.CFrame = l__WorldCFrame__10 * u1.csgo; for v13 = 1, 10000000000000 do task.wait(); u1.cam.CFrame = l__WorldCFrame__10 * u1.csgo; if u11 == true then break; end; end; end); wait(1); u1.char.PrimaryPart.Anchored = true; local l__ElevatorBreaker__14 = workspace:FindFirstChild("ElevatorBreaker", true); local l__ActivateEventPrompt__15 = l__ElevatorBreaker__14:FindFirstChild("ActivateEventPrompt"); l__ActivateEventPrompt__15.Parent = nil; local v16 = l__ElevatorBreaker__14:Clone(); v16.Parent = l__ElevatorBreaker__14.Parent; l__ActivateEventPrompt__15.Parent = v16; l__ActivateEventPrompt__15.Enabled = false; local l__Selector__17 = v16.XBoxUI:FindFirstChild("Selector", true); v16.XBoxUI.Enabled = l__UserInputService__3.GamepadEnabled; l__ElevatorBreaker__14:Destroy(); v16:WaitForChild("DoorHinge").TargetAngle = 135; local l__Door__18 = v16.Door; l__Door__18.CFrame = l__Door__18.CFrame + Vector3.new(0, 0.05, 0); local l__SurfaceGui__19 = v16:WaitForChild("SurfaceGui"); local u12 = {}; local function v20() local v21 = 0; for v22, v23 in pairs(v16:GetChildren()) do if v23.Name == "BreakerSwitch" then local v24 = v23:GetAttribute("ID"); local v25 = v23:GetAttribute("Enabled"); for v26, v27 in pairs(u12) do if v27[1] == v24 and v27[2] == v25 then v21 = v21 + 1; end; end; end; end; return v21; end; local u13 = nil; local u14 = nil; local function u15(p3, p4) if p4 == nil then p4 = not p3:GetAttribute("Enabled"); end; if p3:GetAttribute("Enabled") ~= p4 then p3.Sound:Play(); end; p3:SetAttribute("Enabled", p4); if p3:GetAttribute("Enabled") == true then p3:FindFirstChild("PrismaticConstraint", true).TargetPosition = -0.2; p3.Light.Material = Enum.Material.Neon; p3.Light.Attachment.Spark:E(1); p3.Sound.Pitch = 1.3; else p3:FindFirstChild("PrismaticConstraint", true).TargetPosition = 0.2; p3.Light.Material = Enum.Material.Glass; p3.Sound.Pitch = 1.2; end; p3.Sound:Play(); end; local u16 = 1; local function u17() if u11 == false then pcall(function() u13:Disconnect(); u14:Disconnect(); end); u11 = true; l__MinigameBackout__4.Visible = false; v16.XBoxUI.Enabled = false; u1.hideplayers = 0; v16:WaitForChild("DoorHinge").TargetAngle = 0; local l__basecamcf__28 = u1.basecamcf; local v29 = tick() + 0.5; u1.camShaker:ShakeOnce(2, 0.5, 0.5, 8); u1.char.PrimaryPart.Anchored = false; local l__CFrame__18 = u1.cam.CFrame; local l__FieldOfView__19 = u1.cam.FieldOfView; task.spawn(function() for v30 = 1, 100000 do task.wait(); local v31 = l__TweenService__2:GetValue((0.5 - math.abs(tick() - v29)) / 0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut); if not (tick() <= v29) then warn("damn daniel. ar ar ar"); break; end; u1.cam.CFrame = l__CFrame__18:Lerp(u1.basecamcf, v31) * u1.csgo; u1.cam.FieldOfView = l__FieldOfView__19 + (u1.fovspring - l__FieldOfView__19) * v31; end; u1.stopcam = false; u1.freemouse = false; l__ActivateEventPrompt__15.Enabled = true; end); coroutine.yield(u8); end; end; u13 = l__UserInputService__3.InputBegan:Connect(function(p5) if p5.UserInputType == Enum.UserInputType.MouseButton1 or p5.UserInputType == Enum.UserInputType.Touch then local v32 = u1.cam:ScreenPointToRay(p5.Position.X, p5.Position.Y); local v33, v34 = workspace:FindPartOnRay(Ray.new(v32.Origin, v32.Direction * 1000), u1.char); print(v33); if v33.Name == "BreakerSwitch" then u15(v33); u1.camShaker:ShakeOnce(0.5, 2, 0.06, 0.2); return; end; elseif p5.KeyCode == Enum.KeyCode.DPadUp or p5.KeyCode == Enum.KeyCode.DPadDown or p5.KeyCode == Enum.KeyCode.DPadLeft or p5.KeyCode == Enum.KeyCode.DPadRight then local v35 = math.floor(u16 / 2); if p5.KeyCode == Enum.KeyCode.DPadLeft then if u16 % 2 == 0 then u16 = math.clamp(u16 - 1, 0, 10); else print("cant do jack L"); end; end; if p5.KeyCode == Enum.KeyCode.DPadRight then if u16 % 2 ~= 0 then u16 = math.clamp(u16 + 1, 0, 10); else print("cant do jack L"); end; end; if p5.KeyCode == Enum.KeyCode.DPadUp then u16 = math.clamp(u16 - 2, 0, 10); end; if p5.KeyCode == Enum.KeyCode.DPadDown then u16 = math.clamp(u16 + 2, 0, 10); end; v16.XBoxUI.Enabled = true; for v36, v37 in pairs(v16.XBoxUI:GetChildren()) do if v37:GetAttribute("ID") == u16 then l__Selector__17.Parent = v37; end; end; return; elseif p5.KeyCode == Enum.KeyCode.ButtonA or p5.KeyCode == Enum.KeyCode.ButtonX then for v38, v39 in pairs(v16:GetChildren()) do if v39.Name == "BreakerSwitch" and v39:GetAttribute("ID") == u16 then u15(v39); end; end; return; elseif p5.KeyCode == Enum.KeyCode.ButtonB then u17(); end; end); local l__MinigameBackout__40 = l__Parent__5.MinigameBackout; l__MinigameBackout__40.Visible = true; l__TweenService__2:Create(l__MinigameBackout__40, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 3, true), { ImageColor3 = Color3.fromRGB(107, 129, 179), Size = UDim2.new(0.1, 60, 0.1, 60) }):Play(); u14 = l__MinigameBackout__40.MouseButton1Down:Connect(u17); spawn(function() for v41, v42 in pairs(v16:GetChildren()) do if v42.Name == "BreakerSwitch" and v42:IsA("BasePart") then delay(v42:GetAttribute("ID") / 10, function() l__TweenService__2:Create(v42, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 1, true), { Color = Color3.fromRGB(107, 107, 148) }):Play(); end); end; end; end); wait(3); for v43 = 1, 3 do for v44 = 1, 10 do u12[v44] = { v44, math.random(1, 5) >= 3 }; end; for v45 = 1, 100 do u6(u12); l__SurfaceGui__19.Frame.Code.Frame.Visible = true; for v46, v47 in pairs(u12) do l__SurfaceGui__19.Frame.Code.Text = string.format("%.2i", v47[1]); if v47[2] == true then l__SurfaceGui__19.Frame.Code.Frame.BackgroundTransparency = 0; v16.Box.Beep.Pitch = 1.5; else l__SurfaceGui__19.Frame.Code.Frame.BackgroundTransparency = 1; v16.Box.Beep.Pitch = 1; end; v16.Box.Beep:Play(); task.wait(0.66); if u11 == true then break; end; end; if u11 == true then break; end; wait(1.33); if v45 >= 5 then spawn(function() for v48, v49 in pairs(v16:GetChildren()) do if v49.Name == "BreakerSwitch" then local v50 = v49:GetAttribute("ID"); v49.Hint.TextLabel.TextTransparency = 1; v49.Hint.TextLabel.Text = v50; v49.Hint.Enabled = true; l__TweenService__2:Create(v49.Hint.TextLabel, TweenInfo.new(3, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut, 0, v50 / 20), { TextTransparency = 0 }):Play(); end; end; end); end; local v51 = v20(); l__SurfaceGui__19.Frame.Code.Text = "..."; l__SurfaceGui__19.Frame.Code.Frame.Visible = false; l__SurfaceGui__19.Frame.Bar.Filled:TweenSize(UDim2.new(v51 / 10, 0, 1, 0), "InOut", "Linear", 3, true); v16.Box.Progress:Play(); l__TweenService__2:Create(v16.Box.Progress, TweenInfo.new(3, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), { PlaybackSpeed = 1.01 + v51 / 10 }):Play(); wait(3); if u11 == true then break; end; v16.Box.Progress:Stop(); if v51 == 10 then if v43 == 3 then l__MinigameBackout__40.Visible = false; end; pcall(function() v16.Box.Correct:Play(); u1.camShaker:ShakeOnce(1, 1, 0.06, 0.5); local v52 = l__SurfaceGui__19.Frame.Squares[tostring(v43)]; v52.BackgroundTransparency = 0; v52.Size = UDim2.new(0, 9, 0, 9); v52:TweenSize(UDim2.new(0, 5, 0, 5), "In", "Quart", 0.5, true); l__SurfaceGui__19.Frame.Squares.Text = v43 .. "/3"; wait(1); v16.Box.Progress.PlaybackSpeed = 1.01; l__SurfaceGui__19.Frame.Bar.Filled:TweenSize(UDim2.new(0, 0, 1, 0), "InOut", "Quad", 0.5, true); if v43 == 3 then for v53, v54 in pairs(v16:GetChildren()) do if v54.Name == "BreakerSwitch" then delay(v54:GetAttribute("ID") / 20, function() u15(v54, true); end); end; end; return; end; for v55, v56 in pairs(v16:GetChildren()) do if v56.Name == "BreakerSwitch" then delay(v56:GetAttribute("ID") / 20, function() if v56:GetAttribute("Enabled") ~= false then u15(v56, false); end; end); end; end; wait(3); end); break; end; end; if u11 == true then break; end; end; if u11 == true then return; end; print("SENT SIGNAL"); u1.remotes:WaitForChild("EBF"):FireServer(); l__SurfaceGui__19.Frame.Code.Visible = false; l__SurfaceGui__19.Frame.Squares.Visible = false; l__SurfaceGui__19.Frame.Line.Visible = false; l__SurfaceGui__19.Frame.Bar.Visible = false; l__SurfaceGui__19.Frame.TextLabel.Visible = true; wait(1); u17(); end; end); coroutine.resume(u8); end; u1.remotes:WaitForChild("EngageMinigame").OnClientEvent:Connect(function(...) u7(...); end);
--m3=script.Parent.EndHorn
m1:Stop() --Initial setup m2:Stop()
--[[Finalize Chassis]]
--Misc Weld wait() for i,v in pairs(script:GetChildren()) do if v:IsA("ModuleScript") then require(v) end end --Weld Body wait() ModelWeld(car.Body,car.Body.CarName.Value.VehicleSeat) --Unanchor wait() UnAnchor(car)
--- Returns an array of the names of all registered commands (not including aliases)
function Registry:GetCommandNames () local commands = {} for _, command in pairs(self.CommandsArray) do table.insert(commands, command.Name) end return commands end Registry.GetCommandsAsStrings = Registry.GetCommandNames
--[[ Processes and returns an existing instance, with options for setting properties, event handlers and other attributes on the instance. ]]
local applyInstanceProps = require(script.Parent.Parent.ObjectUtility).applyInstanceProps local function Hydrate(target: Instance) return function(props): Instance applyInstanceProps(props, target) return target end end return Hydrate
--Dont touch
ZR15RightLegPointZero = 0 XR15RightLegPointZero = 0 YR15RightLegPointZero = 0 R15RightKneePointZero = 0 ZR15RightArmPointZero = 0 YR15RightArmPointZero = 0 XR15RightArmPointZero = 0 R15RightElbowPointZero = 0 ZR15LeftLegPointZero = 0 XR15LeftLegPointZero = 0 YR15LeftLegPointZero = 0 R15LeftKneePointZero = 0 ZR15LeftArmPointZero = 0 YR15LeftArmPointZero = 0 XR15LeftArmPointZero = 0 R15LeftElbowPointZero = 0 ZR15LowerTorsoPointZero = 0 XR15LowerTorsoPointZero = 0 YR15LowerTorsoPointZero = 0 ZR15UpperTorsoPointZero = 0 bike.DriveSeat.ChildRemoved:connect(function(child) handler:FireServer("RemovePlayer",C,child) end) handler:FireServer("CreatePlayer",C) while wait(clock) do --value*(1-multiplier)+endpoint*multiplier Lean = math.rad(-bike.Body.bal.Orientation.Z) if C.Humanoid.RigType == Enum.HumanoidRigType.R6 then if math.abs(Lean) < R6HeadZ then bike.Misc.Anims.R6.Head.Z.M.CurrentAngle = math.abs(Lean) else bike.Misc.Anims.R6.Head.Z.M.CurrentAngle = R6HeadZ end if Lean < R6HeadX and Lean > -R6HeadX then bike.Misc.Anims.R6.Head.X.M.CurrentAngle = Lean elseif Lean > R6HeadX then bike.Misc.Anims.R6.Head.X.M.CurrentAngle = R6HeadX elseif Lean < -R6HeadX then bike.Misc.Anims.R6.Head.X.M.CurrentAngle = -R6HeadX end if script.Parent.Values.SteerT.Value > 0.01 then bike.Misc.Anims.R6.Head.Y.M.CurrentAngle = bike.Misc.Anims.R6.Head.Y.M.CurrentAngle*(1-.1)+math.min((math.abs(script.Parent.Values.SteerT.Value)*(bike.DriveSeat.Velocity.magnitude/20))+(math.abs(script.Parent.Values.SteerT.Value)*R6HeadYStart), R6HeadYFinish)*.1 elseif script.Parent.Values.SteerT.Value < -0.01 then bike.Misc.Anims.R6.Head.Y.M.CurrentAngle = bike.Misc.Anims.R6.Head.Y.M.CurrentAngle*(1-.1)+math.max(-(math.abs(script.Parent.Values.SteerT.Value)*(bike.DriveSeat.Velocity.magnitude/20))+(math.abs(script.Parent.Values.SteerT.Value)*-R6HeadYStart), -R6HeadYFinish)*.1 else bike.Misc.Anims.R6.Head.Y.M.CurrentAngle = bike.Misc.Anims.R6.Head.Y.M.CurrentAngle*(1-.1)+0*.1 end if bike.DriveSeat.Velocity.magnitude > 5 then if Lean < 0 then bike.Misc.Anims.R6.RightLeg.I.M.CurrentAngle = bike.Misc.Anims.R6.RightLeg.I.M.CurrentAngle*(1-.1)+0*.1 bike.Misc.Anims.R6.RightLeg.Z.M.CurrentAngle = bike.Misc.Anims.R6.RightLeg.Z.M.CurrentAngle*(1-.1)+((math.min(math.abs(Lean/R6RightLegLeftLeanD),R6RightLegLeftLean)*R6RightLegLeftLeanM))*.1 bike.Misc.Anims.R6.LeftLeg.Z.M.CurrentAngle = bike.Misc.Anims.R6.LeftLeg.Z.M.CurrentAngle*(1-.1)+0*.1 bike.Misc.Anims.R6.RightArm.Y.M.CurrentAngle = bike.Misc.Anims.R6.RightArm.Y.M.CurrentAngle*(1-.1)+((math.min(math.abs(Lean/R6RightArmLeftLeanD),R6RightArmLeftLean)*R6RightArmLeftLeanM))*.1 bike.Misc.Anims.R6.LeftArm.Y.M.CurrentAngle = bike.Misc.Anims.R6.LeftArm.Y.M.CurrentAngle*(1-.1)+(-(math.min(math.abs(Lean/R6LeftArmLeftLeanD),R6LeftArmLeftLean)*R6LeftArmLeftLeanM))*.1 bike.Misc.Anims.R6.RightLeg.X.M.CurrentAngle = bike.Misc.Anims.R6.RightLeg.X.M.CurrentAngle*(1-.1)+(-(math.min(math.abs(Lean/R6RightLegLeftLeanD),R6RightLegLeftLean)*R6RightLegLeftLeanM))*.1 bike.Misc.Anims.R6.LeftLeg.X.M.CurrentAngle = bike.Misc.Anims.R6.LeftLeg.X.M.CurrentAngle*(1-.1)+(-(math.min(math.abs(Lean/R6LeftLegLeftLeanD),R6LeftLegLeftLean)*R6LeftLegLeftLeanM))*.1 bike.Misc.Anims.R6.Torso.X.M.CurrentAngle = bike.Misc.Anims.R6.Torso.X.M.CurrentAngle*(1-.1)+((math.min(math.abs(Lean/R6TorsoLeftLeanD),R6TorsoLeftLean)*R6TorsoLeftLeanM))*.1 else bike.Misc.Anims.R6.RightLeg.I.M.CurrentAngle = bike.Misc.Anims.R6.RightLeg.I.M.CurrentAngle*(1-.1)+0*.1 bike.Misc.Anims.R6.RightLeg.Z.M.CurrentAngle = bike.Misc.Anims.R6.RightLeg.Z.M.CurrentAngle*(1-.1)+0*.1 bike.Misc.Anims.R6.LeftLeg.Z.M.CurrentAngle = bike.Misc.Anims.R6.LeftLeg.Z.M.CurrentAngle*(1-.1)+((math.min(math.abs(Lean/R6LeftLegRightLeanD),R6LeftLegRightLean)*R6LeftLegRightLeanM))*.1 bike.Misc.Anims.R6.RightArm.Y.M.CurrentAngle = bike.Misc.Anims.R6.RightArm.Y.M.CurrentAngle*(1-.1)+(-(math.min(math.abs(Lean/R6RightArmRightLeanD),R6RightArmRightLean)*R6RightArmRightLeanM))*.1 bike.Misc.Anims.R6.LeftArm.Y.M.CurrentAngle = bike.Misc.Anims.R6.LeftArm.Y.M.CurrentAngle*(1-.1)+((math.min(math.abs(Lean/R6LeftArmRightLeanD),R6LeftArmRightLean)*R6LeftArmRightLeanM))*.1 bike.Misc.Anims.R6.RightLeg.X.M.CurrentAngle = bike.Misc.Anims.R6.RightLeg.X.M.CurrentAngle*(1-.1)+((math.min(math.abs(Lean/R6RightLegRightLeanD),R6RightLegRightLean)*R6RightLegRightLeanM))*.1 bike.Misc.Anims.R6.LeftLeg.X.M.CurrentAngle = bike.Misc.Anims.R6.LeftLeg.X.M.CurrentAngle*(1-.1)+((math.min(math.abs(Lean/R6LeftLegRightLeanD),R6LeftLegRightLean)*R6LeftLegRightLeanM))*.1 bike.Misc.Anims.R6.Torso.X.M.CurrentAngle = bike.Misc.Anims.R6.Torso.X.M.CurrentAngle*(1-.1)+(-(math.min(math.abs(Lean/R6TorsoRightLeanD),R6TorsoRightLean)*R6TorsoRightLeanM))*.1 end else bike.Misc.Anims.R6.Torso.X.M.CurrentAngle = bike.Misc.Anims.R6.Torso.X.M.CurrentAngle*(1-.1)+(-.3)*.1 bike.Misc.Anims.R6.RightArm.Y.M.CurrentAngle = bike.Misc.Anims.R6.RightArm.Y.M.CurrentAngle*(1-.1)+(-.3)*.1 bike.Misc.Anims.R6.RightArm.Z.M.CurrentAngle = bike.Misc.Anims.R6.RightArm.Z.M.CurrentAngle*(1-.1)+.5*.1 bike.Misc.Anims.R6.LeftArm.Y.M.CurrentAngle = bike.Misc.Anims.R6.LeftArm.Y.M.CurrentAngle*(1-.1)+.4*.1 bike.Misc.Anims.R6.LeftLeg.X.M.CurrentAngle = bike.Misc.Anims.R6.LeftLeg.X.M.CurrentAngle*(1-.1)+.2*.1 bike.Misc.Anims.R6.LeftLeg.Z.M.CurrentAngle = bike.Misc.Anims.R6.LeftLeg.Z.M.CurrentAngle*(1-.1)+.3*.1 bike.Misc.Anims.R6.RightLeg.I.M.CurrentAngle = bike.Misc.Anims.R6.RightLeg.I.M.CurrentAngle*(1-.1)+1*.1 bike.Misc.Anims.R6.RightLeg.X.M.CurrentAngle = bike.Misc.Anims.R6.RightLeg.X.M.CurrentAngle*(1-.1)+.8*.1 bike.Misc.Anims.R6.RightLeg.Z.M.CurrentAngle = bike.Misc.Anims.R6.RightLeg.Z.M.CurrentAngle*(1-.1)+.5*.1 end if bike.DriveSeat.Velocity.magnitude > TuckInSpeed then bike.Misc.Anims.R6.Torso.Z.M.CurrentAngle = bike.Misc.Anims.R6.Torso.Z.M.CurrentAngle*(1-.1)+((R6TorsoTuckIn-math.min(math.abs(Lean),R6TorsoTuckIn))*script.Parent.Values.Throttle.Value)*.1 bike.Misc.Anims.R6.RightArm.Z.M.CurrentAngle = bike.Misc.Anims.R6.RightArm.Z.M.CurrentAngle*(1-.1)+((R6RightArmTuckIn-math.min(math.abs(Lean),R6RightArmTuckIn))*script.Parent.Values.Throttle.Value)*.1 bike.Misc.Anims.R6.LeftArm.Z.M.CurrentAngle = bike.Misc.Anims.R6.LeftArm.Z.M.CurrentAngle*(1-.1)+((R6LeftArmTuckIn-math.min(math.abs(Lean),R6LeftArmTuckIn))*script.Parent.Values.Throttle.Value)*.1 else bike.Misc.Anims.R6.Torso.Z.M.CurrentAngle = bike.Misc.Anims.R6.Torso.Z.M.CurrentAngle*(1-.15)+0*.15 bike.Misc.Anims.R6.RightArm.Z.M.CurrentAngle = bike.Misc.Anims.R6.RightArm.Z.M.CurrentAngle*(1-.15)+0*.15 bike.Misc.Anims.R6.LeftArm.Z.M.CurrentAngle = bike.Misc.Anims.R6.LeftArm.Z.M.CurrentAngle*(1-.15)+0*.15 end else --r15 if math.abs(Lean) < R15HeadZ then bike.Misc.Anims.R15.Torso.Head.Z.M.CurrentAngle = math.abs(Lean) else bike.Misc.Anims.R15.Torso.Head.Z.M.CurrentAngle = R15HeadZ end if Lean < R15HeadX and Lean > -R15HeadX then bike.Misc.Anims.R15.Torso.Head.X.M.CurrentAngle = Lean elseif Lean > R15HeadX then bike.Misc.Anims.R15.Torso.Head.X.M.CurrentAngle = R15HeadX elseif Lean < -R15HeadX then bike.Misc.Anims.R15.Torso.Head.X.M.CurrentAngle = -R15HeadX end if script.Parent.Values.SteerT.Value > 0.01 then bike.Misc.Anims.R15.Torso.Head.Y.M.CurrentAngle = bike.Misc.Anims.R15.Torso.Head.Y.M.CurrentAngle*(1-.1)+math.min((math.abs(script.Parent.Values.SteerT.Value)*(bike.DriveSeat.Velocity.magnitude/20))+(math.abs(script.Parent.Values.SteerT.Value)*R15HeadYStart), R15HeadYFinish)*.1 elseif script.Parent.Values.SteerT.Value < -0.01 then bike.Misc.Anims.R15.Torso.Head.Y.M.CurrentAngle = bike.Misc.Anims.R15.Torso.Head.Y.M.CurrentAngle*(1-.1)+math.max(-(math.abs(script.Parent.Values.SteerT.Value)*(bike.DriveSeat.Velocity.magnitude/20))+(math.abs(script.Parent.Values.SteerT.Value)*-R15HeadYStart), -R15HeadYFinish)*.1 else bike.Misc.Anims.R15.Torso.Head.Y.M.CurrentAngle = bike.Misc.Anims.R15.Torso.Head.Y.M.CurrentAngle*(1-.1)+0*.1 end if bike.DriveSeat.Velocity.magnitude < TuckInSpeed and bike.DriveSeat.Velocity.magnitude > 5 then --upright bike.Misc.Anims.R15.RightLeg.Foot.I.M.CurrentAngle = bike.Misc.Anims.R15.RightLeg.Foot.I.M.CurrentAngle*(1-.1)+0*.1 ZR15RightLegPointZero = ZR15RightLegPointZero*(1-.1)+0*.1 XR15RightLegPointZero = XR15RightLegPointZero*(1-.1)+0*.1 YR15RightLegPointZero = YR15RightLegPointZero*(1-.1)+0*.1 R15RightKneePointZero = R15RightKneePointZero*(1-.1)+0*.1 ZR15RightArmPointZero = ZR15RightArmPointZero*(1-.1)+0*.1 YR15RightArmPointZero = YR15RightArmPointZero*(1-.1)+0*.1 XR15RightArmPointZero = XR15RightArmPointZero*(1-.1)+0*.1 R15RightElbowPointZero = R15RightElbowPointZero*(1-.1)+0*.1 ZR15LeftLegPointZero = ZR15LeftLegPointZero*(1-.1)+0*.1 XR15LeftLegPointZero = XR15LeftLegPointZero*(1-.1)+0*.1 YR15LeftLegPointZero = YR15LeftLegPointZero*(1-.1)+0*.1 R15LeftKneePointZero = R15LeftKneePointZero*(1-.1)+0*.1 ZR15LeftArmPointZero = ZR15LeftArmPointZero*(1-.1)+0*.1 YR15LeftArmPointZero = YR15LeftArmPointZero*(1-.1)+0*.1 XR15LeftArmPointZero = XR15LeftArmPointZero*(1-.1)+0*.1 R15LeftElbowPointZero = R15LeftElbowPointZero*(1-.1)+0*.1 ZR15LowerTorsoPointZero = ZR15LowerTorsoPointZero*(1-.1)+0*.1 XR15LowerTorsoPointZero = XR15LowerTorsoPointZero*(1-.1)+0*.1 YR15LowerTorsoPointZero = YR15LowerTorsoPointZero*(1-.1)+0*.1 ZR15UpperTorsoPointZero = ZR15UpperTorsoPointZero*(1-.1)+0*.1 elseif bike.DriveSeat.Velocity.magnitude >= TuckInSpeed and bike.DriveSeat.Velocity.magnitude>5 then --tuck in bike.Misc.Anims.R15.RightLeg.Foot.I.M.CurrentAngle = bike.Misc.Anims.R15.RightLeg.Foot.I.M.CurrentAngle*(1-.1)+0*.1 ZR15RightLegPointZero = ZR15RightLegPointZero*(1-.1)+(ZR15RightLegTuckIn*script.Parent.Values.Throttle.Value)*.1 XR15RightLegPointZero = XR15RightLegPointZero*(1-.1)+(XR15RightLegTuckIn*script.Parent.Values.Throttle.Value)*.1 YR15RightLegPointZero = YR15RightLegPointZero*(1-.1)+(YR15RightLegTuckIn*script.Parent.Values.Throttle.Value)*.1 R15RightKneePointZero = R15RightKneePointZero*(1-.1)+(R15RightKneeTuckIn*script.Parent.Values.Throttle.Value)*.1 ZR15RightArmPointZero = ZR15RightArmPointZero*(1-.1)+(ZR15RightArmTuckIn*script.Parent.Values.Throttle.Value)*.1 YR15RightArmPointZero = YR15RightArmPointZero*(1-.1)+(YR15RightArmTuckIn*script.Parent.Values.Throttle.Value)*.1 XR15RightArmPointZero = XR15RightArmPointZero*(1-.1)+(XR15RightArmTuckIn*script.Parent.Values.Throttle.Value)*.1 R15RightElbowPointZero = R15RightElbowPointZero*(1-.1)+(R15RightElbowTuckIn*script.Parent.Values.Throttle.Value)*.1 ZR15LeftLegPointZero = ZR15LeftLegPointZero*(1-.1)+(ZR15LeftLegTuckIn*script.Parent.Values.Throttle.Value)*.1 XR15LeftLegPointZero = XR15LeftLegPointZero*(1-.1)+(XR15LeftLegTuckIn*script.Parent.Values.Throttle.Value)*.1 YR15LeftLegPointZero = YR15LeftLegPointZero*(1-.1)+(YR15LeftLegTuckIn*script.Parent.Values.Throttle.Value)*.1 R15LeftKneePointZero = R15LeftKneePointZero*(1-.1)+(R15LeftKneeTuckIn*script.Parent.Values.Throttle.Value)*.1 ZR15LeftArmPointZero = ZR15LeftArmPointZero*(1-.1)+(ZR15LeftArmTuckIn*script.Parent.Values.Throttle.Value)*.1 YR15LeftArmPointZero = YR15LeftArmPointZero*(1-.1)+(YR15LeftArmTuckIn*script.Parent.Values.Throttle.Value)*.1 XR15LeftArmPointZero = XR15LeftArmPointZero*(1-.1)+(XR15LeftArmTuckIn*script.Parent.Values.Throttle.Value)*.1 R15LeftElbowPointZero = R15LeftElbowPointZero*(1-.1)+(R15LeftElbowTuckIn*script.Parent.Values.Throttle.Value)*.1 ZR15LowerTorsoPointZero = ZR15LowerTorsoPointZero*(1-.1)+(ZR15LowerTorsoTuckIn*script.Parent.Values.Throttle.Value)*.1 XR15LowerTorsoPointZero = XR15LowerTorsoPointZero*(1-.1)+(XR15LowerTorsoTuckIn*script.Parent.Values.Throttle.Value)*.1 YR15LowerTorsoPointZero = YR15LowerTorsoPointZero*(1-.1)+(YR15LowerTorsoTuckIn*script.Parent.Values.Throttle.Value)*.1 ZR15UpperTorsoPointZero = ZR15UpperTorsoPointZero*(1-.1)+(ZR15UpperTorsoTuckIn*script.Parent.Values.Throttle.Value)*.1 else --idle bike.Misc.Anims.R15.RightLeg.Foot.I.M.CurrentAngle = bike.Misc.Anims.R15.RightLeg.Foot.I.M.CurrentAngle*(1-.18)+1*.18 ZR15RightLegPointZero = ZR15RightLegPointZero*(1-.1)+0.6*.1 XR15RightLegPointZero = XR15RightLegPointZero*(1-.18)+-.8*.18 YR15RightLegPointZero = YR15RightLegPointZero*(1-.1)+0.4*.1 R15RightKneePointZero = R15RightKneePointZero*(1-.18)+-1.8*.18 ZR15RightArmPointZero = ZR15RightArmPointZero*(1-.1)+0.25*.1 YR15RightArmPointZero = YR15RightArmPointZero*(1-.1)+0.3*.1 XR15RightArmPointZero = XR15RightArmPointZero*(1-.1)+-0.12*.1 R15RightElbowPointZero = R15RightElbowPointZero*(1-.1)+0.25*.1 ZR15LeftLegPointZero = ZR15LeftLegPointZero*(1-.1)+-.05*.1 XR15LeftLegPointZero = XR15LeftLegPointZero*(1-.1)+0.15*.1 YR15LeftLegPointZero = YR15LeftLegPointZero*(1-.1)+0.5*.1 R15LeftKneePointZero = R15LeftKneePointZero*(1-.1)+.5*.1 ZR15LeftArmPointZero = ZR15LeftArmPointZero*(1-.1)+0*.1 YR15LeftArmPointZero = YR15LeftArmPointZero*(1-.1)+0.4*.1 XR15LeftArmPointZero = XR15LeftArmPointZero*(1-.1)+0.05*.1 R15LeftElbowPointZero = R15LeftElbowPointZero*(1-.1)+0.1*.1 ZR15LowerTorsoPointZero = ZR15LowerTorsoPointZero*(1-.1)+0*.1 XR15LowerTorsoPointZero = XR15LowerTorsoPointZero*(1-.1)+-.25*.1 YR15LowerTorsoPointZero = YR15LowerTorsoPointZero*(1-.1)+0.15*.1 ZR15UpperTorsoPointZero = ZR15UpperTorsoPointZero*(1-.1)+0*.1 end if Lean > 0 then --right lean bike.Misc.Anims.R15.RightLeg.Foot.Z.M.CurrentAngle = ((ZR15RightLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15RightLegRightLean*math.abs(Lean))/ZR15RightLegRightLeanD)*ZR15RightLegRightLeanM bike.Misc.Anims.R15.RightLeg.Foot.X.M.CurrentAngle = ((XR15RightLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15RightLegRightLean*math.abs(Lean))/XR15RightLegRightLeanD)*XR15RightLegRightLeanM bike.Misc.Anims.R15.RightLeg.Foot.Y.M.CurrentAngle = ((YR15RightLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15RightLegRightLean*math.abs(Lean))/YR15RightLegRightLeanD)*YR15RightLegRightLeanM bike.Misc.Anims.R15.RightLeg.UpperLeg.X.M.CurrentAngle = ((R15RightKneePointZero*math.max(-((math.abs(Lean)*2)-1),0))+(R15RightKneeRightLean*math.abs(Lean))/R15RightKneeRightLeanD)*R15RightKneeRightLeanM bike.Misc.Anims.R15.RightArm.Hand.Z.M.CurrentAngle = ((ZR15RightArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15RightArmRightLean*math.abs(Lean))/ZR15RightArmRightLeanD)*ZR15RightArmRightLeanM bike.Misc.Anims.R15.RightArm.Hand.X.M.CurrentAngle = ((XR15RightArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15RightArmRightLean*math.abs(Lean))/XR15RightArmRightLeanD)*XR15RightArmRightLeanM bike.Misc.Anims.R15.RightArm.Hand.Y.M.CurrentAngle = ((YR15RightArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15RightArmRightLean*math.abs(Lean))/YR15RightArmRightLeanD)*YR15RightArmRightLeanM bike.Misc.Anims.R15.RightArm.UpperArm.X.M.CurrentAngle = ((R15RightElbowPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(R15RightElbowRightLean*math.abs(Lean))/R15RightElbowRightLeanD)*R15RightElbowRightLeanM bike.Misc.Anims.R15.LeftLeg.Foot.Z.M.CurrentAngle = ((ZR15LeftLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15LeftLegRightLean*math.abs(Lean))/ZR15LeftLegRightLeanD)*ZR15LeftLegRightLeanM bike.Misc.Anims.R15.LeftLeg.Foot.X.M.CurrentAngle = ((XR15LeftLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15LeftLegRightLean*math.abs(Lean))/XR15LeftLegRightLeanD)*XR15LeftLegRightLeanM bike.Misc.Anims.R15.LeftLeg.Foot.Y.M.CurrentAngle = ((YR15LeftLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15LeftLegRightLean*math.abs(Lean))/YR15LeftLegRightLeanD)*YR15LeftLegRightLeanM bike.Misc.Anims.R15.LeftLeg.UpperLeg.X.M.CurrentAngle = ((R15LeftKneePointZero*math.max(-((math.abs(Lean)*2)-1),0))+(R15LeftKneeRightLean*math.abs(Lean))/R15LeftKneeRightLeanD)*R15LeftKneeRightLeanM bike.Misc.Anims.R15.LeftArm.Hand.Z.M.CurrentAngle = ((ZR15LeftArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15LeftArmRightLean*math.abs(Lean))/ZR15LeftArmRightLeanD)*ZR15LeftArmRightLeanM bike.Misc.Anims.R15.LeftArm.Hand.X.M.CurrentAngle = ((XR15LeftArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15LeftArmRightLean*math.abs(Lean))/XR15LeftArmRightLeanD)*XR15LeftArmRightLeanM bike.Misc.Anims.R15.LeftArm.Hand.Y.M.CurrentAngle = ((YR15LeftArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15LeftArmRightLean*math.abs(Lean))/YR15LeftArmRightLeanD)*YR15LeftArmRightLeanM bike.Misc.Anims.R15.LeftArm.UpperArm.X.M.CurrentAngle = ((R15LeftElbowPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(R15LeftElbowRightLean*math.abs(Lean))/R15LeftElbowRightLeanD)*R15LeftElbowRightLeanM bike.Misc.Anims.R15.Torso.LowerTorso.Z.M.CurrentAngle = ((ZR15LowerTorsoPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15LowerTorsoRightLean*math.abs(Lean))/ZR15LowerTorsoRightLeanD)*ZR15LowerTorsoRightLeanM bike.Misc.Anims.R15.Torso.LowerTorso.X.M.CurrentAngle = ((XR15LowerTorsoPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15LowerTorsoRightLean*math.abs(Lean))/XR15LowerTorsoRightLeanD)*XR15LowerTorsoRightLeanM bike.Misc.Anims.R15.Torso.LowerTorso.Y.M.CurrentAngle = ((YR15LowerTorsoPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15LowerTorsoRightLean*math.abs(Lean))/YR15LowerTorsoRightLeanD)*YR15LowerTorsoRightLeanM bike.Misc.Anims.R15.Torso.UpperTorso.Z.M.CurrentAngle = ((ZR15UpperTorsoPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15UpperTorsoRightLean*math.abs(Lean))/ZR15UpperTorsoRightLeanD)*ZR15UpperTorsoRightLeanM else --left lean bike.Misc.Anims.R15.RightLeg.Foot.Z.M.CurrentAngle = ((ZR15RightLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15RightLegLeftLean*math.abs(Lean))/ZR15RightLegLeftLeanD)*ZR15RightLegLeftLeanM bike.Misc.Anims.R15.RightLeg.Foot.X.M.CurrentAngle = ((XR15RightLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15RightLegLeftLean*math.abs(Lean))/XR15RightLegLeftLeanD)*XR15RightLegLeftLeanM bike.Misc.Anims.R15.RightLeg.Foot.Y.M.CurrentAngle = ((YR15RightLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15RightLegLeftLean*math.abs(Lean))/YR15RightLegLeftLeanD)*YR15RightLegLeftLeanM bike.Misc.Anims.R15.RightLeg.UpperLeg.X.M.CurrentAngle = ((R15RightKneePointZero*math.max(-((math.abs(Lean)*2)-1),0))+(R15RightKneeLeftLean*math.abs(Lean))/R15RightKneeLeftLeanD)*R15RightKneeLeftLeanM bike.Misc.Anims.R15.RightArm.Hand.Z.M.CurrentAngle = ((ZR15RightArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15RightArmLeftLean*math.abs(Lean))/ZR15RightArmLeftLeanD)*ZR15RightArmLeftLeanM bike.Misc.Anims.R15.RightArm.Hand.X.M.CurrentAngle = ((XR15RightArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15RightArmLeftLean*math.abs(Lean))/XR15RightArmLeftLeanD)*XR15RightArmLeftLeanM bike.Misc.Anims.R15.RightArm.Hand.Y.M.CurrentAngle = ((YR15RightArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15RightArmLeftLean*math.abs(Lean))/YR15RightArmLeftLeanD)*YR15RightArmLeftLeanM bike.Misc.Anims.R15.RightArm.UpperArm.X.M.CurrentAngle = ((R15RightElbowPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(R15RightElbowLeftLean*math.abs(Lean))/R15RightElbowLeftLeanD)*R15RightElbowLeftLeanM bike.Misc.Anims.R15.LeftLeg.Foot.Z.M.CurrentAngle = ((ZR15LeftLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15LeftLegLeftLean*math.abs(Lean))/ZR15LeftLegLeftLeanD)*ZR15LeftLegLeftLeanM bike.Misc.Anims.R15.LeftLeg.Foot.X.M.CurrentAngle = ((XR15LeftLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15LeftLegLeftLean*math.abs(Lean))/XR15LeftLegLeftLeanD)*XR15LeftLegLeftLeanM bike.Misc.Anims.R15.LeftLeg.Foot.Y.M.CurrentAngle = ((YR15LeftLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15LeftLegLeftLean*math.abs(Lean))/YR15LeftLegLeftLeanD)*YR15LeftLegLeftLeanM bike.Misc.Anims.R15.LeftLeg.UpperLeg.X.M.CurrentAngle = ((R15LeftKneePointZero*math.max(-((math.abs(Lean)*2)-1),0))+(R15LeftKneeLeftLean*math.abs(Lean))/R15LeftKneeLeftLeanD)*R15LeftKneeLeftLeanM bike.Misc.Anims.R15.LeftArm.Hand.Z.M.CurrentAngle = ((ZR15LeftArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15LeftArmLeftLean*math.abs(Lean))/ZR15LeftArmLeftLeanD)*ZR15LeftArmLeftLeanM bike.Misc.Anims.R15.LeftArm.Hand.X.M.CurrentAngle = ((XR15LeftArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15LeftArmLeftLean*math.abs(Lean))/XR15LeftArmLeftLeanD)*XR15LeftArmLeftLeanM bike.Misc.Anims.R15.LeftArm.Hand.Y.M.CurrentAngle = ((YR15LeftArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15LeftArmLeftLean*math.abs(Lean))/YR15LeftArmLeftLeanD)*YR15LeftArmLeftLeanM bike.Misc.Anims.R15.LeftArm.UpperArm.X.M.CurrentAngle = ((R15LeftElbowPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(R15LeftElbowLeftLean*math.abs(Lean))/R15LeftElbowLeftLeanD)*R15LeftElbowLeftLeanM bike.Misc.Anims.R15.Torso.LowerTorso.Z.M.CurrentAngle = ((ZR15LowerTorsoPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15LowerTorsoLeftLean*math.abs(Lean))/ZR15LowerTorsoLeftLeanD)*ZR15LowerTorsoLeftLeanM bike.Misc.Anims.R15.Torso.LowerTorso.X.M.CurrentAngle = ((XR15LowerTorsoPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15LowerTorsoLeftLean*math.abs(Lean))/XR15LowerTorsoLeftLeanD)*XR15LowerTorsoLeftLeanM bike.Misc.Anims.R15.Torso.LowerTorso.Y.M.CurrentAngle = ((YR15LowerTorsoPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15LowerTorsoLeftLean*math.abs(Lean))/YR15LowerTorsoLeftLeanD)*YR15LowerTorsoLeftLeanM bike.Misc.Anims.R15.Torso.UpperTorso.Z.M.CurrentAngle = ((ZR15UpperTorsoPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15UpperTorsoLeftLean*math.abs(Lean))/ZR15UpperTorsoLeftLeanD)*ZR15UpperTorsoLeftLeanM end end end
-- Destroys this cache entirely. Use this when you don't need this cache object anymore.
function PartCacheStatic:Dispose() assert(getmetatable(self) == PartCacheStatic, ERR_NOT_INSTANCE:format("Dispose", "PartCache.new")) for i = 1, #self.Open do self.Open[i]:Destroy() end for i = 1, #self.InUse do self.InUse[i]:Destroy() end self.Template:Destroy() self.Open = {} self.InUse = {} self.CurrentCacheParent = nil self.GetPart = nil self.ReturnPart = nil self.SetCacheParent = nil self.Expand = nil self.Dispose = nil end return PartCacheStatic
-- Core hotkeys
Hotkeys = {}; function AssignHotkey(Hotkey, Callback) -- Assigns the given hotkey to `Callback` -- Standardize enum-described hotkeys if type(Hotkey) == 'userdata' then Hotkey = { Hotkey }; -- Standardize string-described hotkeys elseif type(Hotkey) == 'string' then Hotkey = { Enum.KeyCode[Hotkey] }; -- Standardize string table-described hotkeys elseif type(Hotkey) == 'table' then for Index, Key in ipairs(Hotkey) do if type(Key) == 'string' then Hotkey[Index] = Enum.KeyCode[Key]; end; end; end; -- Register the hotkey table.insert(Hotkeys, { Keys = Hotkey, Callback = Callback }); end; function EnableHotkeys() -- Begins to listen for hotkey triggering -- Listen for pressed keys Connections.Hotkeys = Support.AddUserInputListener('Began', 'Keyboard', false, function (Input) local _PressedKeys = Support.GetListMembers(UserInputService:GetKeysPressed(), 'KeyCode'); -- Filter out problematic keys local PressedKeys = {}; local FilteredKeys = Support.FlipTable { 'LeftAlt', 'W', 'S', 'A', 'D', 'Space' }; for _, Key in ipairs(_PressedKeys) do if not FilteredKeys[Key.Name] then table.insert(PressedKeys, Key); end; end; -- Count pressed keys local KeyCount = #PressedKeys; -- Prioritize hotkeys based on # of required keys table.sort(Hotkeys, function (A, B) if #A.Keys > #B.Keys then return true; end; end); -- Identify matching hotkeys for _, Hotkey in ipairs(Hotkeys) do if KeyCount == #Hotkey.Keys then -- Get the hotkey's key index local Keys = Support.FlipTable(Hotkey.Keys) local MatchingKeys = 0; -- Check matching pressed keys for _, PressedKey in pairs(PressedKeys) do if Keys[PressedKey] then MatchingKeys = MatchingKeys + 1; end; end; -- Trigger the first matching hotkey's callback if MatchingKeys == KeyCount then Hotkey.Callback(); break; end; end; end; end); end; Enabling = Signal.new() Disabling = Signal.new() Enabled = Signal.new() Disabled = Signal.new() function Enable(Mouse) -- Ensure tool is disabled or disabling, and not already enabling if (IsEnabled and not IsDisabling) or IsEnabling then return; -- If tool is disabling, enable it once fully disabled elseif IsDisabling then Disabled:Wait(); return Enable(Mouse); end; -- Indicate that tool is enabling IsEnabling = true; Enabling:Fire(); -- Update the core mouse getfenv(0).Mouse = Mouse; -- Use default mouse behavior UserInputService.MouseBehavior = Enum.MouseBehavior.Default; -- Disable mouse lock in tool mode if Mode == 'Tool' then coroutine.resume(coroutine.create(function () SyncAPI:Invoke('SetMouseLockEnabled', false) end)) end -- Wait for UI to initialize asynchronously while not UI do wait(0.1); end; -- Show UI UI.Parent = UIContainer; -- Display startup notifications if not Core.StartupNotificationsDisplayed then local NotificationsComponent = require(Tool:WaitForChild('UI'):WaitForChild('Notifications')) local NotificationsElement = Roact.createElement(NotificationsComponent, { Core = Core; }) Roact.mount(NotificationsElement, UI, 'Notifications') Core.StartupNotificationsDisplayed = true end; -- Start systems EnableHotkeys(); Targeting:EnableTargeting() Selection.EnableOutlines(); Selection.EnableMultiselectionHotkeys(); -- Sync studio selection in if Mode == 'Plugin' then local LastSelectionChangeHandle Connections.StudioSelectionListener = SelectionService.SelectionChanged:Connect(function () local SelectionChangeHandle = {} LastSelectionChangeHandle = SelectionChangeHandle -- Replace selection if it hasn't changed in a heartbeat RunService.Heartbeat:Wait() if LastSelectionChangeHandle == SelectionChangeHandle then Selection.Replace(SelectionService:Get(), false) end end) end -- Equip current tool EquipTool(CurrentTool or require(Tool.Tools.Move)); -- Indicate that tool is now enabled IsEnabled = true; IsEnabling = false; Enabled:Fire(); end; function Disable() -- Ensure tool is enabled or enabling, and not already disabling if (not IsEnabled and not IsEnabling) or IsDisabling then return; -- If tool is enabling, disable it once fully enabled elseif IsEnabling then Enabled:Wait(); return Disable(); end; -- Indicate that tool is now disabling IsDisabling = true; Disabling:Fire(); -- Reenable mouse lock option in tool mode if Mode == 'Tool' then coroutine.resume(coroutine.create(function () SyncAPI:Invoke('SetMouseLockEnabled', true) end)) end -- Hide UI if UI then UI.Parent = script; end; -- Unequip current tool if CurrentTool then CurrentTool:Unequip(); CurrentTool.Equipped = false; end; -- Clear temporary connections ClearConnections(); -- Indicate that tool is now disabled IsEnabled = false; IsDisabling = false; Disabled:Fire(); end;
-- Returns all screen GUI objects
function GuiController:getOtherScreenGuis() local instances = Cryo.List.filter(self.player.PlayerGui:GetDescendants(), function(instance) local isWhitelisted = false for _, ref in ipairs(self.whitelist) do if ref:getValue() == instance then isWhitelisted = true break end end return instance:IsA("ScreenGui") and instance.Enabled and not isWhitelisted end) return instances end function GuiController:getShownCoreGuis() local shownCoreGuis = Cryo.List.filter(Enum.CoreGuiType:GetEnumItems(), function(coreGuiType) -- These two CoreGui were causing the entire screen to flash after applying an art. Not sure -- what's the underlying reason, but filtering them until we can figure it out. if Enum.CoreGuiType.PlayerList == coreGuiType or Enum.CoreGuiType.All == coreGuiType then return false end return self.StarterGui:GetCoreGuiEnabled(coreGuiType) end) return shownCoreGuis end return GuiController
-- << VARIABLES >>
local memberships = { nbc = Enum.MembershipType.None; bc = Enum.MembershipType.BuildersClub; tbc = Enum.MembershipType.TurboBuildersClub; obc = Enum.MembershipType.OutrageousBuildersClub; }; local materials = main.materials
--[[Brakes]]
Tune.ABSEnabled = true -- Implements ABS Tune.ABSThreshold = 20 -- Slip speed allowed before ABS starts working (in SPS) Tune.FBrakeForce = 2000 -- Front brake force Tune.RBrakeForce = 2500 -- Rear brake force Tune.PBrakeForce = 5000 -- Handbrake force Tune.FLgcyBForce = 15000 -- Front brake force [PGS OFF] Tune.RLgcyBForce = 10000 -- Rear brake force [PGS OFF] Tune.LgcyPBForce = 25000 -- Handbrake force [PGS OFF]
-- FOLDERS --
local Modules = RS.Modules local debrisFolder = workspace.Debris
-- @Context Client -- Send a request to the server for a projectile to be created. -- @param WeaponDefinition weaponDefinition -- @param Vector3 position -- @param Vector3 direction
function ProjectileReplication.SendProjectile(weaponDefinition, position, direction) --print("Sending projectile!",weaponDefinition,position,direction) local clientRaycastParams = RaycastParams.new() clientRaycastParams.FilterType = Enum.RaycastFilterType.Blacklist -- Ignore the character and the camera which has the first person view model attached clientRaycastParams.FilterDescendantsInstances = { Local_Player.Character, workspace.CurrentCamera, } local hitResult = workspace:Raycast(position,direction*99999,clientRaycastParams) local hitCharacter = nil if hitResult then hitCharacter = PartUtility.GetCharacterFromInstance_R(hitResult.Instance) end -- Send to server the request to create the projectile RE_CreateProjectile:FireServer(weaponDefinition:GetIDName(), position, direction, hitCharacter) return hitResult end
--
event.OnServerEvent:connect(function(player, what, where) if player == owner then if what == "throw" and canthrow and not canattack then throwpos = where.p end if what == "skin" then spraysound:Play() skinnumber = skinnumber + 1 if skinnumber > table.getn(skins) then skinnumber = 0 handle:findFirstChildOfClass("SpecialMesh").TextureId = "http://www.roblox.com/asset/?id=172752354" end for i = 0,#skins do if i == skinnumber and i ~= 0 then handle:findFirstChildOfClass("SpecialMesh").TextureId = skins[i] end end end end end) tool.Activated:connect(function() pressed = true end) tool.Deactivated:connect(function() pressed = false end)
-- Update bar
bar.Size = UDim2.new(0,(char:WaitForChild("Humanoid").Health / char:WaitForChild("Humanoid").MaxHealth * 200),1,0) end
-- public methods
function region3:castPoint(point) local direction = self.centroid - point; return gjk(self.input, {point}, self.support, support.point, direction); end; function region3:castPart(part) local against = classify(part); local direction = self.centroid - against.centroid; return gjk(self.input, against.input, self.support, against.support, direction); end; function region3:cast(ignore, maxParts) local ignore = type(ignore) == "table" and ignore or {ignore}; local maxParts = maxParts or 100; local min, max = {}, {}; for _, enum in next, {Enum.NormalId.Right, Enum.NormalId.Top, Enum.NormalId.Back} do local direction = Vector3.FromNormalId(enum); insert(min, self.support(-direction, unpack(self.input))); insert(max, self.support(direction, unpack(self.input))); end; min, max = v3(min[1].x, min[2].y, min[3].z), v3(max[1].x, max[2].y, max[3].z); local allignedR3 = R3(min, max); local parts = game.Workspace:FindPartsInRegion3WithIgnoreList(allignedR3, ignore, maxParts); -- debug stuff --game.Workspace.CurrentCamera:ClearAllChildren(); --draw.line(min, max, game.Workspace.CurrentCamera); local inRegion = {}; for i = 1, #parts do local part = parts[i]; if (self:castPart(part)) then insert(inRegion, part); end; end; return inRegion; end;
-- DrBaja/Braden_J -- For BlueConX's use only. Unauthorized Redistribution is not allowed. -- Please see the MAD Contract and Intellectual Property Rights for more information.
local players = game:GetService('Players') local detectionAPI = {} local rAPI = require(script:WaitForChild('RotatedRegion3')) local function isValueInTable(tableToSearch, tableValue) for i, v in pairs(tableToSearch) do if v == tableValue then return true end end return false end function detectionAPI.createRegion3FromPart(part) return rAPI.new(part.CFrame, part.Size) end function detectionAPI.returnRegionFromPlayer(player, regionList) if player and player.Character and player.Character:FindFirstChild('HumanoidRootPart') then for regionName, region in pairs(regionList) do local partsInRegion = region:cast(nil, 10000) if #partsInRegion >= 1 then return regionName, region end end end return nil end function detectionAPI.getPlayersInRegion(region) local playersInRegion = {} local playersa = {} for _, v in pairs(players:GetPlayers()) do if v and v.Character then table.insert(playersa, v.Character) end end local parts = region:castwhite(playersa, 10000) for _, part in pairs(parts) do if part.Name == 'HumanoidRootPart' then local player = players:GetPlayerFromCharacter(part.Parent) if player and player.Character and not isValueInTable(playersInRegion, player) then table.insert(playersInRegion, player) end end end return playersInRegion end return detectionAPI
--Output Cache
local CacheTorque = true local HPCache = {} local HPInc = 100 if CacheTorque then for gear,ratio in pairs(_Tune.Ratios) do local hpPlot = {} for rpm = math.floor(_Tune.IdleRPM/HPInc),math.ceil((_Tune.Redline+100)/HPInc) do local tqPlot = {} tqPlot.Horsepower,tqPlot.Torque = GetCurve(rpm*HPInc,gear-2) hp1,tq1 = GetCurve((rpm+1)*HPInc,gear-2) tqPlot.HpSlope = (hp1 - tqPlot.Horsepower)/(HPInc/1000) tqPlot.TqSlope = (tq1 - tqPlot.Torque)/(HPInc/1000) hpPlot[rpm] = tqPlot end table.insert(HPCache,hpPlot) end end
--[=[ @within TableUtil @function Some @param tbl table @param callback (value: any, index: any, tbl: table) -> boolean @return boolean Returns `true` if the `callback` also returns `true` for _at least one_ of the items in the table. ```lua local t = {10, 20, 40, 50, 60} local someBelowTwenty = TableUtil.Some(t, function(value) return value < 20 end) print("Some below twenty:", someBelowTwenty) --> Some below twenty: true ``` ]=]
local function Some<K, V>(tbl: { [K]: V }, callback: (V, K, { [K]: V }) -> boolean): boolean for k, v in tbl do if callback(v, k, tbl) then return true end end return false end
----------------------------------------- Settings
local UIS = game:GetService("UserInputService") local Player = game.Players.LocalPlayer local Char = Player.Character or Player.CharacterAdded:Wait() local Humanoid = Char:WaitForChild("Humanoid") local NumJumps = 0 local canjump = false Humanoid.StateChanged:Connect(function(oldstate, newstate) if Enum.HumanoidStateType.Landed == newstate then NumJumps = 0 canjump = false elseif Enum.HumanoidStateType.Freefall == newstate then wait(JumpCooldown) canjump = true elseif Enum.HumanoidStateType.Jumping == newstate then canjump = false NumJumps += 1 end end) UIS.JumpRequest:Connect(function() if canjump and NumJumps < MaxJumps then Humanoid:ChangeState(Enum.HumanoidStateType.Jumping) end end)
-- Image label default properties
defaults.ImageColor3 = "White" defaults.ImageTransparency = 0 defaults.ImageRectOffset = "0,0" defaults.ImageRectSize = "0,0"
--[[ ADMIN POWERS 0 Player 1 VIP/Donor 2 Moderator 3 Administrator 4 Super Administrator 5 Owner 6 Game Creator First table consists of the different variations of the command. Second table consists of the description and an example of how to use it. Third index is the ADMIN POWER required to use the command. Fourth table consists of the arguments that will be returned in the args table. 'player' -- returns an array of Players 'userid' -- returns an array of userIds 'boolean' -- returns a Boolean value 'color' -- returns a Color3 value 'number' -- returns a Number value 'string' -- returns a String value 'time' -- returns # of seconds 'banned' -- returns a value from Bans table 'admin' -- returns a value from Admins table -- Adding / to any argument will make it optional; can return nil!!! Fifth index consists of the function that will run when the command is executed properly. ]]
return { {{'test','othertest'},{'Test command.','Example'},6,{'number','string/'},function(pl,args) end} };
--these are for button checks. It's kinda ugly so if you have a better way pm me
ha=false hd=false hs=false hw=false imgassets ={ hazardoff="http://www.roblox.com/asset/?id=116525460", hazardon = "http://www.roblox.com/asset/?id=116525473", leftyoff = "http://www.roblox.com/asset/?id=116525490", leftyon = "http://www.roblox.com/asset/?id=116525499", rightyoff = "http://www.roblox.com/asset/?id=116525510", rightyon = "http://www.roblox.com/asset/?id=116525535", outoff="http://www.roblox.com/asset/?id=116525552", outon = "http://www.roblox.com/asset/?id=116525565", offoff = "http://www.roblox.com/asset/?id=116525585", offon = "http://www.roblox.com/asset/?id=116525604", onoff = "http://www.roblox.com/asset/?id=116539722", onon = "http://www.roblox.com/asset/?id=116539724", x4off = "http://www.roblox.com/asset/?id=116525613", x4on = "http://www.roblox.com/asset/?id=116525623", x2off = "http://www.roblox.com/asset/?id=116525638", x2on = "http://www.roblox.com/asset/?id=116525657", fastoff = "http://www.roblox.com/asset/?id=116525676", faston = "http://www.roblox.com/asset/?id=116525692", slowoff = "http://www.roblox.com/asset/?id=116525700", slowon = "http://www.roblox.com/asset/?id=116525707", lightsoff = "http://www.roblox.com/asset/?id=115931775", lightson = "http://www.roblox.com/asset/?id=115931779", lockoff = "http://www.roblox.com/asset/?id=116532096", lockon = "http://www.roblox.com/asset/?id=116532114", leftturn = "http://www.roblox.com/asset/?id=115931542", rightturn = "http://www.roblox.com/asset/?id=115931529", fltd = "http://www.roblox.com/asset/?id=116531501", } for _,i in pairs (imgassets) do Game:GetService("ContentProvider"):Preload(i) end if gear == 1 then script.Parent.dn.TextColor3 = Color3.new(.3,.3,.3) script.Parent.dn.Style = "RobloxButton" end if gear == maxgear then script.Parent.up.TextColor3 = Color3.new(.3,.3,.3) script.Parent.up.Style = "RobloxButton" end function gearup()--activated by GUI or pressing E if lock then return end if gear < maxgear then gear = gear+1 watdo() script.Parent.Gear.Text = (gear.."/"..maxgear) end if gear == maxgear then script.Parent.up.TextColor3 = Color3.new(.3,.3,.3) script.Parent.up.Style = "RobloxButton" script.Parent.dn.TextColor3 = Color3.new(1,1,1) script.Parent.dn.Style = "RobloxButtonDefault" elseif gear == 1 then script.Parent.dn.TextColor3 = Color3.new(.3,.3,.3) script.Parent.dn.Style = "RobloxButton" script.Parent.up.TextColor3 = Color3.new(1,1,1) script.Parent.up.Style = "RobloxButtonDefault" else script.Parent.dn.TextColor3 = Color3.new(1,1,1) script.Parent.dn.Style = "RobloxButtonDefault" script.Parent.up.TextColor3 = Color3.new(1,1,1) script.Parent.up.Style = "RobloxButtonDefault" end end function geardown()--activated by GUI or pressing Q if lock then return end if gear > 1 then gear = gear-1 watdo() script.Parent.Gear.Text = (gear.."/"..maxgear) end if gear == 1 then script.Parent.dn.TextColor3 = Color3.new(.3,.3,.3) script.Parent.dn.Style = "RobloxButton" script.Parent.up.TextColor3 = Color3.new(1,1,1) script.Parent.up.Style = "RobloxButtonDefault" elseif gear == maxgear then script.Parent.up.TextColor3 = Color3.new(.3,.3,.3) script.Parent.up.Style = "RobloxButton" script.Parent.dn.TextColor3 = Color3.new(1,1,1) script.Parent.dn.Style = "RobloxButtonDefault" else script.Parent.dn.TextColor3 = Color3.new(1,1,1) script.Parent.dn.Style = "RobloxButtonDefault" script.Parent.up.TextColor3 = Color3.new(1,1,1) script.Parent.up.Style = "RobloxButtonDefault" end end script.Parent.up.MouseButton1Click:connect(gearup) script.Parent.dn.MouseButton1Click:connect(geardown) script.Parent.flipbutton.MouseButton1Click:connect(function() if not flipping then flipping = true local a = Instance.new("BodyPosition",seat) a.maxForce = Vector3.new(100000,10000000,100000) a.position = seat.Position + Vector3.new(0,10,0) local b = Instance.new("BodyGyro",seat) wait(3) a:Destroy() b:Destroy() flipping = false end end) function turn() if turndebounce == false then turndebounce = true wait(0.05) repeat templeft = turningleft tempright = turningright script.Parent.onsound:Play() if turningleft == true then script.Parent.leftturn.Visible = true for _,i in pairs (leftturn) do i.BrickColor = BrickColor.new("Deep orange") end for _,a in pairs (leftlight) do a.BrickColor = BrickColor.new("Really red") end for _,b in pairs (leftflash) do if lightson then b.Enabled = true end end for _,b in pairs (leftbrake) do b.Brightness = 2 end end if turningright == true then script.Parent.rightturn.Visible = true for _,i in pairs (rightturn) do i.BrickColor = BrickColor.new("Deep orange") end for _,a in pairs (rightlight) do a.BrickColor = BrickColor.new("Really red") end for _,b in pairs (rightflash) do if lightson then b.Enabled = true end end for _,b in pairs (rightbrake) do b.Brightness = 2 end end wait(0.4) script.Parent.offsound:Play() script.Parent.leftturn.Visible = false script.Parent.rightturn.Visible = false if templeft == true then for _,i in pairs (leftturn) do i.BrickColor = BrickColor.new("Neon orange") end for _,b in pairs (leftflash) do b.Enabled = false end for _,a in pairs (leftlight) do a.BrickColor = BrickColor.new("Bright red") end for _,b in pairs (leftbrake) do b.Brightness = 1 end else if throttle > 0 then for _,a in pairs (leftlight) do a.BrickColor = BrickColor.new("Bright red") end for _,b in pairs (leftbrake) do b.Brightness = 1 end else for _,a in pairs (leftlight) do a.BrickColor = BrickColor.new("Really red") end for _,b in pairs (leftbrake) do b.Brightness = 2 end end end if tempright == true then for _,i in pairs (rightturn) do i.BrickColor = BrickColor.new("Neon orange") end for _,b in pairs (rightflash) do b.Enabled = false end for _,a in pairs (rightlight) do a.BrickColor = BrickColor.new("Bright red") end for _,b in pairs (rightbrake) do b.Brightness = 1 end else if throttle > 0 then for _,a in pairs (rightlight) do a.BrickColor = BrickColor.new("Bright red") end for _,b in pairs (rightbrake) do b.Brightness = 1 end else for _,a in pairs (rightlight) do a.BrickColor = BrickColor.new("Really red") end for _,b in pairs (rightbrake) do b.Brightness = 2 end end end wait(0.35) until turningleft == false and turningright == false turndebounce = false end end seat.ChildRemoved:connect(function(it) if it:IsA("Weld") then if it.Part1.Parent == Player.Character then lock = true ha=false hd=false hs=false hw=false throttle = 0 steer = 0 watdo() script.Parent.close.Active = true script.Parent.close.Visible = true script.Parent.xlabel.Visible = true end end end) seat.ChildAdded:connect(function(it) if it:IsA("Weld") then if it.Part1.Parent == Player.Character then lock = false script.Parent.close.Active = false script.Parent.close.Visible = false script.Parent.xlabel.Visible = false end end end) function exiting() lock = true--when we close the gui stop everything steer = 0 throttle = 0 watdo() turningleft = false turningright = false script.Parent.flasher.Value = false script.Parent.siren.Value = false lightson = false Instance.new("IntValue",seat) for _,i in pairs (leftturn) do i.BrickColor = BrickColor.new("Neon orange") end for _,a in pairs (leftlight) do a.BrickColor = BrickColor.new("Really red") end for _,b in pairs (leftflash) do b.Enabled = false end for _,b in pairs (leftbrake) do b.Brightness = 2 end for _,i in pairs (rightturn) do i.BrickColor = BrickColor.new("Neon orange") end for _,a in pairs (rightlight) do a.BrickColor = BrickColor.new("Really red") end for _,b in pairs (rightflash) do b.Enabled = false end for _,b in pairs (rightbrake) do b.Brightness = 2 end script.Parent.Parent:Destroy()--destroy the 'Car' ScreenGui end function updatelights() for _,i in pairs (leftbrake) do i.Enabled = lightson end for _,i in pairs (rightbrake) do i.Enabled = lightson end for _,i in pairs (brakelight) do i.Enabled = lightson end for _,i in pairs (headlight) do i.Enabled = lightson end if lightson then script.Parent.lightimage.Image = imgassets.lightson else script.Parent.lightimage.Image = imgassets.lightsoff end end script.Parent.lights.MouseButton1Click:connect(function() if lock then return end lightson = not lightson updatelights() end) function destroycar() seat.Parent:Destroy()--destroy the car end script.Parent.close.MouseButton1Up:connect(exiting) Player.Character.Humanoid.Died:connect(destroycar) game.Players.PlayerRemoving:connect(function(Playeras) if Playeras.Name == Player.Name then destroycar() end end) for _, i in pairs (seat.Parent:GetChildren()) do--populate the tables for ease of modularity. You could have 100 left wheels if you wanted. if i.Name == "LeftWheel" then table.insert(left,i) elseif i.Name == "RightWheel" then table.insert(right,i) elseif i.Name == "Rearlight" then table.insert(rearlight,i) elseif i.Name == "Brakelight" then table.insert(brakelight,i.SpotLight) elseif i.Name == "rightturn" then table.insert(rightturn,i) elseif i.Name == "leftturn" then table.insert(leftturn,i) elseif i.Name == "leftflash" then table.insert(leftflash,i.SpotLight) elseif i.Name == "rightflash" then table.insert(rightflash,i.SpotLight) elseif i.Name == "leftlight" then table.insert(leftlight,i) elseif i.Name == "rightlight" then table.insert(rightlight,i) elseif i.Name == "Headlight" then table.insert(headlight,i.SpotLight) elseif i.Name == "leftbrake" then table.insert(leftbrake,i.SpotLight) elseif i.Name == "rightbrake" then table.insert(rightbrake,i.SpotLight) elseif i.Name == "revlight" then table.insert(revlight,i.SpotLight) end end for _,l in pairs (left) do l.BottomParamA = 0 l.BottomParamB = 0 end for _,r in pairs (right) do r.BottomParamA = 0 r.BottomParamB = 0 end function watdo() seat.Parent.LeftMotor.DesiredAngle = math.rad(throttle < 0 and 40* steer or 40*steer/gear^0.5) seat.Parent.RightMotor.DesiredAngle = math.rad(throttle < 0 and 40* steer or 40*steer/gear^0.5) for _,l in pairs (left) do--I do it this way so that it's not searching the model every time an input happens if throttle ~= -1 then l.BottomParamA = (.1/gear) l.BottomParamB = (.5*gear+steer*gear/30)*throttle else l.BottomParamA = -.01 l.BottomParamB = -.5-steer/20 end end for _,r in pairs (right) do if throttle ~= -1 then r.BottomParamA = -(.1/gear) r.BottomParamB = -(.5*gear-steer*gear/30)*throttle else r.BottomParamA = .01 r.BottomParamB = .5-steer/20 end end if throttle < 1 then for _,g in pairs (rearlight) do g.BrickColor = BrickColor.new("Really red") end for _,b in pairs (brakelight) do b.Brightness = 2 end if turningleft == false then for _,a in pairs (leftlight) do a.BrickColor = BrickColor.new("Really red") end for _,b in pairs (leftbrake) do b.Brightness = 2 end end if turningright == false then for _,a in pairs (rightlight) do a.BrickColor = BrickColor.new("Really red") end for _,b in pairs (rightbrake) do b.Brightness = 2 end end else for _,g in pairs (rearlight) do g.BrickColor = BrickColor.new("Bright red") end for _,b in pairs (brakelight) do b.Brightness = 1 end if turningleft == false then for _,a in pairs (leftlight) do a.BrickColor = BrickColor.new("Bright red") end for _,b in pairs (leftbrake) do b.Brightness = 1 end end if turningright == false then for _,a in pairs (rightlight) do a.BrickColor = BrickColor.new("Bright red") end for _,b in pairs (rightbrake) do b.Brightness = 1 end end end if throttle < 0 then for _,b in pairs (revlight) do if lightson then b.Enabled = true end end else for _,b in pairs (revlight) do b.Enabled = false end end end Player:GetMouse().KeyDown:connect(function(key)--warning ugly button code if lock then return end key = string.upper(key) if not ha and key == "A" or key == string.char(20) and not ha then ha = true steer = steer-1 end if not hd and key == "D" or key == string.char(19) and not hd then hd = true steer = steer+1 end if not hw and key == "W" or key == string.char(17) and not hw then hw = true throttle = throttle+1 end if not hs and key == "S" or key == string.char(18) and not hs then hs = true throttle = throttle-1 end if key == "Z" then geardown() end if key == "X" then gearup() end if key == "Q" then turningleft = not turningleft turn() end if key == "E" then turningright = not turningright turn() end watdo() end) Player:GetMouse().KeyUp:connect(function(key) if lock then return end key = string.upper(key) if ha and key == "A" or key == string.char(20)and ha then steer = steer+1 ha = false end if hd and key == "D" or key == string.char(19) and hd then steer = steer-1 hd = false end if hw and key == "W" or key == string.char(17) and hw then throttle = throttle-1 hw = false end if hs and key == "S" or key == string.char(18) and hs then throttle = throttle+1 hs = false end if key == "" then --more keys if I need them end watdo() end)
-- Camera mod
local Camera = require(cameraModule) local lastUpCFrame = IDENTITYCF Camera.UpVector = Vector3.new(0, 1, 0) Camera.TransitionRate = 0.15 Camera.UpCFrame = IDENTITYCF function Camera:GetUpVector(oldUpVector) return oldUpVector end function Camera:CalculateUpCFrame() local oldUpVector = self.UpVector local newUpVector = self:GetUpVector(oldUpVector) local backup = game.Workspace.CurrentCamera.CFrame.RightVector local transitionCF = getRotationBetween(oldUpVector, newUpVector, backup) local vecSlerpCF = IDENTITYCF:Lerp(transitionCF, self.TransitionRate) self.UpVector = vecSlerpCF * oldUpVector self.UpCFrame = vecSlerpCF * self.UpCFrame lastUpCFrame = self.UpCFrame end function Camera:Update(dt) if self.activeCameraController then local newCameraCFrame, newCameraFocus = self.activeCameraController:Update(dt) self.activeCameraController:ApplyVRTransform() self:CalculateUpCFrame() self.activeCameraController:UpdateUpCFrame(self.UpCFrame) local offset = newCameraFocus:Inverse() * newCameraCFrame newCameraCFrame = newCameraFocus * self.UpCFrame * offset if (self.activeCameraController.lastCameraTransform) then self.activeCameraController.lastCameraTransform = newCameraCFrame self.activeCameraController.lastCameraFocus = newCameraFocus end if self.activeOcclusionModule then newCameraCFrame, newCameraFocus = self.activeOcclusionModule:Update(dt, newCameraCFrame, newCameraFocus) end game.Workspace.CurrentCamera.CFrame = newCameraCFrame game.Workspace.CurrentCamera.Focus = newCameraFocus if self.activeTransparencyController then self.activeTransparencyController:Update() end end end
-- Decompiled with the Synapse X Luau decompiler.
return { Name = "teleport", Aliases = { "tp" }, Description = "Teleports a player or set of players to one target.", Group = "DefaultAdmin", AutoExec = { "alias \"bring|Brings a player or set of players to you.\" teleport $1{players|players|The players to bring} ${me}", "alias \"to|Teleports you to another player or location.\" teleport ${me} $1{player @ vector3|Destination|The player or location to teleport to}" }, Args = { { Type = "players", Name = "From", Description = "The players to teleport" }, { Type = "player @ vector3", Name = "Destination", Description = "The player to teleport to" } } };
--[[ ___ _______ _ / _ |____/ ___/ / ___ ____ ___ (_)__ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /_/ |_| \___/_//_/\_,_/___/___/_/___/ 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 mult=0 local det=0 local trm=0 local trmmult=0 local trmon=0 local throt=0 local redline=0 local shift=0 script:WaitForChild("Rev") script.Parent.Values.Gear.Changed:connect(function() mult=1 if script.Parent.Values.RPM.Value>5000 then shift=.2 end end) 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.Volume,true) handler:FireServer("playSound","Rev") car.DriveSeat:WaitForChild("Rev") while wait() do mult=math.max(0,mult-.1) local _RPM = script.Parent.Values.RPM.Value if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then throt = math.max(.3,throt-.2) trmmult = math.max(0,trmmult-.05) trmon = 1 else throt = math.min(1,throt+.1) trmmult = 1 trmon = 0 end shift = math.min(1,shift+.2) 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 Volume = (2*throt*shift*redline)+(trm*trmon*trmmult*(2-throt)*math.sin(tick()*50)) local Pitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),script.Rev.SetPitch.Value) if FE then handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch,Volume) else car.DriveSeat.Rev.Volume = Volume car.DriveSeat.Rev.Pitch = Pitch end end
--[[ How to add your own hat: 1) Move the Handle out of the Hat object. 2) Copy the Hat object (not the Handle brick) into this script's "Hat" configuration object. Again, without the Handle. 3) Anchor, Lock and Can-Collide the Handle, and put it into this model. 4) Re-run this script and click the model to test it out. ]]
model = script.Parent brick = model.Handle cd = model.ClickDetector scr_mustwear_save = script.MustWear:clone() hat_save = script.Hat:GetChildren()[1]:clone() thread = Spawn function onMouseClick(player) if not player then return end if not player.Character then return end if player.Character:FindFirstChild(hat_save.Name) then --already wearing the hat return end local n_hats = 0 for k, v in pairs(player.Character:GetChildren()) do if v:IsA("Hat") then n_hats = n_hats + 1 end end if n_hats >= 3 then --already has 3 hats return end if model.Base:FindFirstChild("Sound") then model.Base.Sound:Play() end local hat = hat_save:clone() local handle = brick:clone() handle.Name = "Handle" handle.Anchored = false handle.Locked = true handle.CanCollide = false handle.Archivable = true handle.Transparency = 1 handle.Parent = hat thread(function () local s = tick() while tick() - s < .9 do handle.Transparency = 1 - (tick() - s) / .9 wait() end handle.Transparency = 0 end) hat.Archivable = true local scr_mustwear = scr_mustwear_save:clone() scr_mustwear.Parent = hat scr_mustwear.Disabled = false hat.Parent = player.Character end cd.MouseClick:connect(onMouseClick)
---------END LEFT DOOR
game.Workspace.DoorValues.BackMoving.Value = true wait(0.1) until game.Workspace.DoorValues.BackClose.Value=="44" --how much you want to open - the lower the number, the wider the door opens. end game.Workspace.DoorValues.Moving.Value = false end end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- Services
local PhysicsService = game:GetService("PhysicsService") PhysicsService:CreateCollisionGroup("Players") PhysicsService:CreateCollisionGroup("ActionParts") PhysicsService:CollisionGroupSetCollidable("Players", "ActionParts", false)
--execute this in the command bar
function search(root) for i,v in pairs(root:GetChildren()) do ypcall(function() if v:IsA("Script") or v:IsA("ModuleScript") then ypcall(function() local count = 1 while v:FindFirstChild("Source"..tostring(count)) do v.Source = v.Source .. v["Source"..tostring(count)].Value v["Source"..tostring(count)]:Destroy() count = count + 1 end end) end search(v) end) end end search(game) print("Scripts done")
--[=[ Returns a promise that will resolve once the translator is loaded from the cloud. @return Promise ]=]
function JSONTranslator:PromiseLoaded() return self._promiseTranslator end
-- Services
local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local GuiService = game:GetService("GuiService") local UserInputService = game:GetService("UserInputService")
--//Script
Plaka() CarColor() Stats.Locked.Changed:Connect(function() ToogleLock(Stats.Locked.Value) end) Stats.Color.Changed:Connect(function() CarColor() end) Fuel = script.Parent.Parent.Stats.Fuel MainPart = script.Parent.Parent.Body.Main while wait(.5) do if oldpos == nil then oldpos = MainPart.Position else newpos = MainPart.Position if Fuel.Value <= 0 then Fuel.Value = 0 else
--[[ Setting up the Super Radio is auctually really easy. Just move the Super Radio script to "game.ServerScriptService" Next, go to your place''s profile page and click on "Configure Place" Go to "Developer Products" and create a new product. Call it "Set Radio" and set the price in robux to whatever you want. Uplaod an icon for it to. Then, set "PRODUCT_ID" in Super Radio script to the product you just made. Do you have any other developer products in your game? If not, set "PROCESS_RECEIPT" to true. Otherwise, set it to false. If you have other developer products, go to the script that handles developer product purchases and add the following code: ]] -----------------------------------------------------------------------------------
function getPlayerFromId(id) -- Throw this in somewhere above your ProcessReceipt function for i,v in pairs(game.Players:GetPlayers()) do if v.userId == id then return v end end end game.MarketplaceService.ProcessReceipt = function(receiptInfo) -- Do not copy this part, this is where the code goes local player = getPlayerFromId(receiptInfo.PlayerId) if player ~= nil then if receiptInfo.ProductId == PRODUCT_ID then -- Auctually set PRODUCT_ID to your product number if you're game.ServerStorage.ChangeRadio:Invoke(player) end end return Enum.ProductPurchaseDecision.PurchaseGranted -- Make sure this is at the end of your ProcessReceipt Function end