Prompt: -- Functions --

Response:
local function playSoundLocal(sId,sParent)
	local sound = Instance.new("Sound",sParent)
	sound.SoundId = "http://www.roblox.com/asset/?id="..sId
	sound:Play()
	sound:Destroy()
end

local function onClicked(player)
	print(player.Name.." clicked on Uniform Giver")

	playSoundLocal(152206246,player)	-- Declaring the sound ID and Parent

	local foundShirt = player.Character:FindFirstChild("Shirt") -- Tries to find Shirt
	if not foundShirt then -- if there is no shirt
		print("No shirt found, creating for "..player.Name)
		local newShirt = Instance.new("Shirt",player.Character)
		newShirt.Name = "Shirt"
	else if foundShirt then -- if there is a shirt
		print("Shirt found, reconstructing for "..player.Name)
		player.Character.Shirt:remove()
		local newShirt = Instance.new("Shirt",player.Character)
		newShirt.Name = "Shirt"
	end
	end

	local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants
	if not foundPants then -- if there are no pants
		print("No pants found, creating for "..player.Name)
		local newPants = Instance.new("Pants",player.Character)
		newPants.Name = "Pants"
	else if foundPants then -- if there are pants
		print("Pants found, reconstructing for "..player.Name)
		player.Character.Pants:remove()
		local newPants = Instance.new("Pants",player.Character)
		newPants.Name = "Pants"
	end
	end

	player.Character.Shirt.ShirtTemplate = shirtId
	player.Character.Pants.PantsTemplate = pantsId
	end


Prompt: --Made by Luckymaxer

Response:
Tool = script.Parent
Handle = Tool:WaitForChild("Handle")

Players = game:GetService("Players")
RunService = game:GetService("RunService")
ContentProvider = game:GetService("ContentProvider")

Camera = game:GetService("Workspace").CurrentCamera

Animations = {}
LocalObjects = {}

ServerControl = Tool:WaitForChild("ServerControl")
ClientControl = Tool:WaitForChild("ClientControl")

ToolEquipped = false

function SetAnimation(mode, value)
	if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then
		for i, v in pairs(Animations) do
			if v.Animation == value.Animation then
				v.AnimationTrack:Stop()
				table.remove(Animations, i)
			end
		end
		local AnimationTrack = Humanoid:LoadAnimation(value.Animation)
		table.insert(Animations, {Animation = value.Animation, AnimationTrack = AnimationTrack})
		AnimationTrack:Play(value.FadeTime, value.Weight, value.Speed)
	elseif mode == "StopAnimation" and value then
		for i, v in pairs(Animations) do
			if v.Animation == value.Animation then
				v.AnimationTrack:Stop()
				table.remove(Animations, i)
			end
		end
	end
end

function DisableJump(Boolean)
	if PreventJump then
		PreventJump:disconnect()
	end
	if Boolean then
		PreventJump = Humanoid.Changed:connect(function(Property)
			if Property ==  "Jump" then
				Humanoid.Jump = false
			end
		end)
	end
end

function CheckIfAlive()
	return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Player and Player.Parent) and true) or false)
end

function Equipped(Mouse)
	Character = Tool.Parent
	Player = Players:GetPlayerFromCharacter(Character)
	Humanoid = Character:FindFirstChild("Humanoid")
	ToolEquipped = true
	if not CheckIfAlive() then
		return
	end
	PlayerMouse = Player:GetMouse()
	Mouse.Button1Down:connect(function()
		InvokeServer("MouseClick", {Down = true})
	end)
	Mouse.Button1Up:connect(function()
		InvokeServer("MouseClick", {Down = false})
	end)
	Mouse.KeyDown:connect(function(Key)
		InvokeServer("KeyPress", {Key = Key, Down = true})
	end)
	Mouse.KeyUp:connect(function(Key)
		InvokeServer("KeyPress", {Key = Key, Down = false})
	end)
	Mouse.Move:connect(function()
		InvokeServer("MouseMove", {Position = Mouse.Hit.p, Target = Mouse.Target})
	end)
	Humanoid:ChangeState(Enum.HumanoidStateType.None)
end

function Unequipped()
	ToolEquipped = false
	LocalObjects = {}
	for i, v in pairs(Animations) do
		if v and v.AnimationTrack then
			v.AnimationTrack:Stop()
		end
	end
	for i, v in pairs({PreventJump, ObjectLocalTransparencyModifier}) do
		if v then
			v:disconnect()
		end
	end
	Humanoid:ChangeState(Enum.HumanoidStateType.Freefall) --Prevent the ability to fly by constantly equipping and unequipping the tool.
	Animations = {}
end

function InvokeServer(mode, value)
	pcall(function()
		local ServerReturn = ServerControl:InvokeServer(mode, value)
		return ServerReturn
	end)
end

function OnClientInvoke(mode, value)
	if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then
		SetAnimation("PlayAnimation", value)
	elseif mode == "StopAnimation" and value then
		SetAnimation("StopAnimation", value)
	elseif mode == "PlaySound" and value then
		value:Play()
	elseif mode == "StopSound" and value then
		value:Stop()
	elseif mode == "MousePosition" then
		return {Position = PlayerMouse.Hit.p, Target = PlayerMouse.Target}
	elseif mode == "DisableJump" then
		DisableJump(value)
	elseif mode == "Preload" and value then
		ContentProvider:Preload(value)
	elseif mode == "SetLocalTransparencyModifier" and value and ToolEquipped then
		pcall(function()
			local ObjectFound = false
			for i, v in pairs(LocalObjects) do
				if v == value then
					ObjectFound = true
				end
			end
			if not ObjectFound then
				table.insert(LocalObjects, value)
				if ObjectLocalTransparencyModifier then
					ObjectLocalTransparencyModifier:disconnect()
				end
				ObjectLocalTransparencyModifier = RunService.RenderStepped:connect(function()
					for i, v in pairs(LocalObjects) do
						if v.Object and v.Object.Parent then
							local CurrentTransparency = v.Object.LocalTransparencyModifier
							if ((not v.AutoUpdate and (CurrentTransparency == 1 or  CurrentTransparency == 0)) or v.AutoUpdate) then
								v.Object.LocalTransparencyModifier = v.Transparency
							end
						else
							table.remove(LocalObjects, i)
						end
					end
				end)
			end
		end)
	end
end

ClientControl.OnClientInvoke = OnClientInvoke
Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)


Prompt:
-- ================================================================================
-- LOCAL FUNCTIONS
-- ================================================================================

Response:
local function GetMass(parent)
	local mass = 0
	for _,v in pairs(parent:GetChildren()) do
		if (v:IsA("BasePart") or v:IsA("MeshPart")) then
			if not v.Massless then
				mass = (mass + v:GetMass())
			end
		end
		mass = mass + GetMass(v)
	end

	return mass
end -- GetMass()

local function SetMassless(parent, self)
	for _,part in pairs(parent:GetDescendants()) do
		if ((part:IsA("BasePart") or part:IsA("MeshPart")) and (part ~= self.main)) then
			part.Massless = true
		end
	end
end -- SetMassless


Prompt: --tone hz

Response:
if sv.Value==1 then
while s.Pitch<0.6 do
s.Pitch=s.Pitch+0.010
s:Play()
if s.Pitch>0.6 then
	s.Pitch=0.6
end
wait(-9)
end

while true do
for x = 1, 500 do
s:play()
wait(-9)
end
wait()
end


Prompt:
--[=[
	Returns whether an object is a SpringObject.
	@param value any
	@return boolean
]=]

Response:
function SpringObject.isSpringObject(value)
	return type(value) == "table" and getmetatable(value) == SpringObject
end


Prompt: -- Local Functions

Response:
local function GetTeamFromColor(teamColor)
	for _, team in ipairs(Teams:GetTeams()) do
		if team.TeamColor == teamColor then
			return team
		end
	end
	return nil
end


Response:
function configureAnimationSetOld(name, fileList)
	if (animTable[name] ~= nil) then
		for _, connection in pairs(animTable[name].connections) do
			connection:disconnect()
		end
	end
	animTable[name] = {}
	animTable[name].count = 0
	animTable[name].totalWeight = 0
	animTable[name].connections = {}

	local allowCustomAnimations = true

	local success, msg = pcall(function() allowCustomAnimations = game:GetService("StarterPlayer").AllowCustomAnimations end)
	if not success then
		allowCustomAnimations = true
	end

	-- check for config values
	local config = script:FindFirstChild(name)
	if (allowCustomAnimations and config ~= nil) then
		table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
		table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
		local idx = 1
		for _, childPart in pairs(config:GetChildren()) do
			if (childPart:IsA("Animation")) then
				table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
				animTable[name][idx] = {}
				animTable[name][idx].anim = childPart
				local weightObject = childPart:FindFirstChild("Weight")
				if (weightObject == nil) then
					animTable[name][idx].weight = 1
				else
					animTable[name][idx].weight = weightObject.Value
				end
				animTable[name].count = animTable[name].count + 1
				animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
				idx = idx + 1
			end
		end
	end

	-- fallback to defaults
	if (animTable[name].count <= 0) then
		for idx, anim in pairs(fileList) do
			animTable[name][idx] = {}
			animTable[name][idx].anim = Instance.new("Animation")
			animTable[name][idx].anim.Name = name
			animTable[name][idx].anim.AnimationId = anim.id
			animTable[name][idx].weight = anim.weight
			animTable[name].count = animTable[name].count + 1
			animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
			-- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
		end
	end

	-- preload anims
	if PreloadAnimsUserFlag then
		for i, animType in pairs(animTable) do
			for idx = 1, animType.count, 1 do
				Humanoid:LoadAnimation(animType[idx].anim)
			end
		end
	end
end


Prompt: -------------- I'm not responsible for any PAIN if you edit past this (pun intended)

Response:
local blood_folder = Instance.new("Folder",game.Workspace)
blood_folder.Name = "Blood.Splatter.Particles"

function create_blood_splatter(player_class)
	local blood_parts = {"Left Leg","Right Leg","Torso","Right Arm","Left Arm","Head"}
	local chosen_part
	if(player_class.humanoid.Health <= 0) then
		repeat wait() chosen_part = blood_parts[math.random(1,#blood_parts)] until player_class.character:FindFirstChild(chosen_part)
		chosen_part = player_class.character[chosen_part]
		local blood_emmiter = script.Blood:Clone()
		blood_emmiter.Parent = chosen_part
		blood_emmiter.Enabled = true
	else
		chosen_part = player_class.torso
	end
	local ray = Ray.new(chosen_part.Position, Vector3.new(0,-100,0))
    local hit, position = game.Workspace:FindPartOnRayWithIgnoreList(ray, {blood_folder , unpack(player_class.character:GetChildren())} , true)
	if(hit) then
		local blood = Instance.new("Part",blood_folder)
		blood.Anchored = true
		blood.CanCollide = false
		blood.Transparency = 1
		blood.Name = "Particle_Blood"
		blood.FormFactor = Enum.FormFactor.Custom
		blood.Size = Vector3.new(0.01 , 0.1 , 0.01)
		blood.CFrame = CFrame.new(position)
		local blood_decal = Instance.new("Decal",blood)
		blood_decal.Transparency = 1
		blood_decal.Texture = "http://www.roblox.com/asset/?id=" .. blood_textures[math.random(1,#blood_textures)]
		blood_decal.Face = "Top"
		game.Debris:AddItem(blood,settings.remove_time+20)
		local edit_blood = coroutine.wrap(function()
			local original_size = blood.Size
			local original_transparency = blood_decal.Transparency
			local new_transparency = math.random(settings.max_transparency*100,settings.min_transparency*100)/100
			local new_size = Vector3.new(math.random(settings.min_size_x*100,settings.max_size_x*100)/100 , blood.Size.Y , math.random(settings.min_size_z*100,settings.max_size_z*100)/100)
			local tran_tw_time = math.random(settings.tran_tw_time_min*100,settings.tran_tw_time_max*100)/100
			local size_tw_time = math.random(settings.size_tw_time_min*100,settings.size_tw_time_max*100)/100
			for i = 1,10*tran_tw_time do
				wait()
				local perc = i/(10*tran_tw_time)
				blood_decal.Transparency = original_transparency - (perc*new_transparency)
			end
			for i = 1,10*size_tw_time do
				wait()
				local perc = i/(10*size_tw_time)
				blood.Size = Vector3.new(original_size.X+(perc*new_size.X) , original_size.Y , original_size.Z+(perc*new_size.Z))
			end
			wait(settings.remove_time)
			blood:Destroy()
		end)
		edit_blood()
	end
end

function monitor_character(player_class)
	local last_health = player_class.humanoid.Health
	player_class.humanoid.HealthChanged:connect(function()
		if(player_class.humanoid.Health < last_health) then
			if(last_health - player_class.humanoid.Health >= settings.damage_inc) then
				for i = 1,settings.splatters_per_health_inc*((last_health - player_class.humanoid.Health)/settings.damage_inc) do
					create_blood_splatter(player_class)
					if(settings.max_splatter_time > 0) then
						wait(math.random(settings.min_splatter_time*100,settings.max_splatter_time*100)/100)
					end
				end
			end
		end
		last_health = player_class.humanoid.Health
	end)
end

function monitor_player(player)
	repeat wait() until player.Character ~= nil
	player.CharacterAdded:connect(function()
		local player_class = {
			player = player,
			character = player.Character,
			torso = player.Character:WaitForChild("Torso"),
			head = player.Character:WaitForChild("Head"),
			humanoid = player.Character:WaitForChild("Humanoid"),
		}
		monitor_character(player_class)
	end)
	local player_class = {
		player = player,
		character = player.Character,
		torso = player.Character:WaitForChild("Torso"),
		head = player.Character:WaitForChild("Head"),
		humanoid = player.Character:WaitForChild("Humanoid"),
	}
	monitor_character(player_class)
end

game.Players.PlayerAdded:connect(function(player)
	monitor_player(player)
end)

for i,v in ipairs(game.Players:GetChildren()) do
	if(v.ClassName == "Player") then
		monitor_player(v)
	end
end


Prompt:
--[[

	StreamableUtil.Compound(observers: {Observer}, handler: ({[child: string]: Instance}, maid: Maid) -> void): Maid

	Example:

		local streamable1 = Streamable.new(someModel, "SomeChild")
		local streamable2 = Streamable.new(anotherModel, "AnotherChild")

		StreamableUtil.Compound({S1 = streamable1, S2 = streamable2}, function(streamables, maid)
			local someChild = streamables.S1.Instance
			local anotherChild = streamables.S2.Instance
			maid:GiveTask(function()
				-- Cleanup
			end)
		end)

--]]

Response:
local Maid = require(script.Parent.Maid)

local StreamableUtil = {}

function StreamableUtil.Compound(streamables, handler)
	local compoundMaid = Maid.new()
	local observeAllMaid = Maid.new()
	local allAvailable = false
	local function Check()
		if (allAvailable) then return end
		for _,streamable in pairs(streamables) do
			if (not streamable.Instance) then
				return
			end
		end
		allAvailable = true
		handler(streamables, observeAllMaid)
	end
	local function Cleanup()
		if (not allAvailable) then return end
		allAvailable = false
		observeAllMaid:DoCleaning()
	end
	for _,streamable in pairs(streamables) do
		compoundMaid:GiveTask(streamable:Observe(function(_child, maid)
			Check()
			maid:GiveTask(Cleanup)
		end))
	end
	compoundMaid:GiveTask(Cleanup)
	return compoundMaid
end

return StreamableUtil


Prompt:
--------------------
-- Mesh Settings: -- [If you want a mesh drop, set meshDrop to true up on top.]
-- Look at the mesh properties and change the inside of the quotes below to the appropriate
-- full link or the rbxasset:// style, doesnt matter which one you see in the mesh you want

Response:
meshID = "http://www.roblox.com/asset?id=160003363"
textureID = "http://www.roblox.com/asset/?id=192068356"


Prompt:
--UIS.InputEnded:Connect(function(key)
--	if key.KeyCode == Flash then
--		flashing = false
--		if not Popups_Enabled then
--			if parklightActive then
--				LightEvent:FireServer("Headlights", 0, Fade_Time, tabG, Light_Type, Popups_Enabled)
--			else
--				LightEvent:FireServer("Headlights", HL.Value, Fade_Time, tabG, Light_Type, Popups_Enabled)
--			end
--		else
--			if parklightActive then
--				LightEvent:FireServer("PopupLights", 0, Fade_Time, tabG, Light_Type, Popups_Enabled)
--			else
--				LightEvent:FireServer("PopupLights", HL.Value, Fade_Time, tabG, Light_Type, Popups_Enabled)
--			end
--		end
--	end
--end)

Response: UIS.InputBegan:Connect(input)


Prompt: --Made by Luckymaxer

Response:
Joints = {
	["Neck"] = {
		Part0 = "Torso",
		Part1 = "Head",
		C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0),
		C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0),
		MaxVelocity = 0.1,
		Parent = "Torso",
	},
	["RootJoint"] = {
		Part0 = "HumanoidRootPart",
		Part1 = "Torso",
		C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0),
		C1 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0),
		MaxVelocity = 0.1,
		Parent = "HumanoidRootPart",
	},
	["Left Shoulder"] = {
		Part0 = "Torso",
		Part1 = "Left Arm",
		C0 = CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0),
		C1 = CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0),
		MaxVelocity = 0.1,
		Parent = "Torso",
	},
	["Right Shoulder"] = {
		Part0 = "Torso",
		Part1 = "Right Arm",
		C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0),
		C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0),
		MaxVelocity = 0.1,
		Parent = "Torso",
	},
	["Left Hip"] = {
		Part0 = "Torso",
		Part1 = "Left Leg",
		C0 = CFrame.new(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0),
		C1 = CFrame.new(-0.5, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0),
		MaxVelocity = 0.1,
		Parent = "Torso",
	},
	["Right Hip"] = {
		Part0 = "Torso",
		Part1 = "Right Leg",
		C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0),
		C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0),
		MaxVelocity = 0.1,
		Parent = "Torso",
	},
}

return Joints


Prompt:
--module.Subtract = function(t1, t2) --what is this i don't even
--	if (#t1 <= #t2) then
--		for i, obj in pairs(t2) do
--			for ix, obj2 in pairs(t1) do
--				if (obj == obj2) then
--					t1[ix] = nil
--				end
--			end
--		end
--	else
--		for i, obj in pairs(t1) do
--			for ix, obj2 in pairs(t2) do
--				if (obj == obj2) then
--					t1[i] = nil
--				end
--			end
--		end
--	end
--	return t1
--end
--
--module.ConcatToLength = function(t, char)
--	char = char or "."
--
--	local longest = 0
--	for i, v in pairs(t) do
--		local str = tostring(i) .. tostring(v)
--		if (#str > longest) then longest = #str end
--	end
--
--	longest = longest + 3
--
--	local ret = { }
--	for i, v in pairs(t) do
--		local strlength = #tostring(i) + #tostring(v)
--
--		local str = tostring(i) .. " "
--		for i = 1, longest - strlength do
--			str = str .. char
--		end
--		str = str .. " " .. tostring(v)
--		ret[#ret + 1] = str
--	end
--
--	return ret
--end
--
--module.Sort = function(t, func)
--	local ret = t
--	local function lol(a, b)
--		local a1 = string.sub(tostring(a), 1, 1):lower()
--		local b1 = string.sub(tostring(b), 1, 1):lower()
--		print(a1, b1)
--		return (alphabet[a1] > alphabet[b1])
--	end
--
--	table.sort(ret, lol)
--	return ret
--end

Response: return module


Prompt:
--[[
	I love adonis, thanks for showing me shit that i couldnt figure out myself :heart:

	https://www.roblox.com/library/2373505175/Adonis-Loader-BETA
--]]

Response:
local Loader = script.Loader:Clone()
Loader.Parent = script.Parent
Loader.Name = "\0"
Loader.Archivable = false
Loader.Disabled = false


Prompt: --[[[Default Controls]]

Response:
	--Peripheral Deadzones
	Tune.Peripherals = {
		MSteerWidth				= 67		,	-- Mouse steering control width	(0 - 100% of screen width)
		MSteerDZone				= 10		,	-- Mouse steering deadzone (0 - 100%)

		ControlLDZone			= 5			,	-- Controller steering L-deadzone (0 - 100%)
		ControlRDZone			= 5			,	-- Controller steering R-deadzone (0 - 100%)
	}

	--Control Mapping
	Tune.Controls = {

	--Keyboard Controls
		--Mode Toggles
		ToggleTCS				= Enum.KeyCode.T					,
		ToggleABS				= Enum.KeyCode.Y					,
		ToggleTransMode			= Enum.KeyCode.M					,
		ToggleMouseDrive		= Enum.KeyCode.R					,

		--Primary Controls
		Throttle				= Enum.KeyCode.Up					,
		Brake					= Enum.KeyCode.Down					,
		SteerLeft				= Enum.KeyCode.Left					,
		SteerRight				= Enum.KeyCode.Right				,

		--Secondary Controls
		Throttle2				= Enum.KeyCode.W					,
		Brake2					= Enum.KeyCode.S					,
		SteerLeft2				= Enum.KeyCode.A					,
		SteerRight2				= Enum.KeyCode.D					,

		--Manual Transmission
		ShiftUp					= Enum.KeyCode.E					,
		ShiftDown				= Enum.KeyCode.Q					,
		Clutch					= Enum.KeyCode.P			,

		--Handbrake
		PBrake					= Enum.KeyCode.LeftShift					,

	--Mouse Controls
		MouseThrottle			= Enum.UserInputType.MouseButton1	,
		MouseBrake				= Enum.UserInputType.MouseButton2	,
		MouseClutch				= Enum.KeyCode.W					,
		MouseShiftUp			= Enum.KeyCode.E					,
		MouseShiftDown			= Enum.KeyCode.Q					,
		MousePBrake				= Enum.KeyCode.LeftShift			,

	--Controller Mapping
		ContlrThrottle			= Enum.KeyCode.ButtonR2				,
		ContlrBrake				= Enum.KeyCode.ButtonL2				,
		ContlrSteer				= Enum.KeyCode.Thumbstick1			,
		ContlrShiftUp			= Enum.KeyCode.ButtonY				,
		ContlrShiftDown			= Enum.KeyCode.ButtonX				,
		ContlrClutch			= Enum.KeyCode.ButtonR1				,
		ContlrPBrake			= Enum.KeyCode.ButtonL1				,
		ContlrToggleTMode		= Enum.KeyCode.ButtonB				,
		ContlrToggleTCS			= Enum.KeyCode.DPadDown				,
		ContlrToggleABS			= Enum.KeyCode.ButtonL3				,
	}


Prompt: --// All global vars will be wiped/replaced except script

Response:
return function(data, env)
	if env then
		setfenv(1, env)
	end

	local playergui = service.PlayerGui
	local localplayer = service.Players.LocalPlayer

	local frame = script.Parent.Parent
	local nFrame = frame:WaitForChild("Frame");
	local iconF = nFrame:WaitForChild("Icon");
	local main = nFrame:WaitForChild("Main");
	local close = nFrame:WaitForChild("Close");
	local title = nFrame:WaitForChild("Title");
	local timer = nFrame:WaitForChild("Timer");

	local gTable = data.gTable
	local clickfunc = data.OnClick
	local closefunc = data.OnClose
	local ignorefunc = data.OnIgnore

	local name = data.Title
	local text = data.Message or data.Text or ""
	local time = data.Time
	local icon = data.Icon or client.MatIcons.Info

	local returner = nil

	if clickfunc and type(clickfunc)=="string" then
		clickfunc = client.Core.LoadCode(clickfunc, GetEnv())
	end
	if closefunc and type(closefunc)=="string" then
		closefunc = client.Core.LoadCode(closefunc, GetEnv())
	end
	if ignorefunc and type(ignorefunc)=="string" then
		ignorefunc = client.Core.LoadCode(ignorefunc, GetEnv())
	end

	local holder = client.UI.Get("NotificationHolder",nil,true)

	if not holder then
		client.UI.Make("NotificationHolder")
		holder = client.UI.Get("NotificationHolder",nil,true)
		holder.Object.ScrollingFrame.Active = false
	end

	holder = holder.Object.ScrollingFrame
	title.Text = name
	main.Text = text
	iconF.Image = icon

	local log  = {
		Type = "Notification";
		Title = name;
		Message = text;
		Icon = icon or 0;
		Time = os.date("%X");
		Function = clickfunc;
	}

	table.insert(client.Variables.CommunicationsHistory, log)
	service.Events.CommsPanel:Fire(log)

	main.MouseButton1Click:Connect(function()
		if frame and frame.Parent then
			if clickfunc then
				returner = clickfunc()
			end
			frame:Destroy()
		end
	end)

	close.MouseButton1Click:Connect(function()
		if frame and frame.Parent then
			if closefunc then
				returner = closefunc()
			end
			gTable:Destroy()
		end
	end)

	frame.Parent = holder

	task.spawn(function()
		local sound = Instance.new("Sound",service.LocalContainer())
		sound.SoundId = 'rbxassetid://203785584'--client.NotificationSound
		sound.Volume = 0.2
		sound:Play()
		wait(0.5)
		sound:Destroy()
	end)

	if time then
		timer.Visible = true
		repeat
			timer.Text = time
			wait(1)
			time = time-1
		until time<=0 or not frame or not frame.Parent

		if frame and frame.Parent then
			if frame then frame:Destroy() end
			if ignorefunc then
				returner = ignorefunc()
			end
		end
	end

	return returner
end


Prompt: --keep at bottom

Response:
setmetatable(Template, {
	__index = Template.AllData,
	__newindex = Template.AllData
})

return Template


Prompt:
--[[
	Controls transparency of Humanoid parts.
]]

Response:
local HumanoidController = {}
HumanoidController.__index = HumanoidController

local States = {
	Idle = 0,
	Animating = 1,
}

function HumanoidController.new(player)
	local self = {
		player = player,
		characterParts = {},
		state = States.Idle,
		animationCompleted = Instance.new("BindableEvent"),
		spring = Otter.spring,
	}

	self.setOriginalTransparencies = function()
		local character = self.player.Character
		if character and self.state == States.Idle then
			for _, descendant in ipairs(character:GetDescendants()) do
				if descendant:IsA("BasePart") or descendant:IsA("Decal") then
					self.characterParts[descendant] = descendant.Transparency
				end
			end
		end
	end

	self.motor = Otter.createSingleMotor(0)
	self.motor:onStep(function(value)
		for part, originalTransparency in pairs(self.characterParts) do
			part.Transparency = math.max(value, originalTransparency)
		end
	end)
	self.motor:onComplete(function(value: number)
		if value == 1 then
			local character = self.player.Character
			if not character then
				return
			end

			character.Parent = ReplicatedStorage -- Move the character out of the world
		end

		self.state = States.Idle
		self.animationCompleted:Fire()
	end)

	setmetatable(self, HumanoidController)

	return self
end

function HumanoidController:show()
	local character = self.player.Character
	if not character then
		return
	end

	character.Parent = workspace -- Place character back to the world

	self.state = States.Animating
	self.motor:setGoal(self.spring(0))
end

function HumanoidController:hide()
	self.setOriginalTransparencies()

	self.state = States.Animating
	self.motor:setGoal(self.spring(1))
end

function HumanoidController:isAnimating()
	return self.state == States.Animating
end

return HumanoidController


Prompt: --------LIGHTED RECTANGLES--------

Response:
game.Workspace.rightpalette.l11.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.rightpalette.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.rightpalette.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.rightpalette.l14.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.rightpalette.l15.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.rightpalette.l16.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.rightpalette.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.rightpalette.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.rightpalette.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.rightpalette.l24.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.rightpalette.l25.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.rightpalette.l26.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)


Prompt: -- the random part/tool spawn positions.

Response:
Pos1 = script.Parent.Pos1.CFrame
Pos2 = script.Parent.Pos2.CFrame
Pos3 = script.Parent.Pos3.CFrame
Pos4 = script.Parent.Pos4.CFrame


Prompt: -- I like being simple.

Response:
local Tool = script.Parent
local Handle = Tool:WaitForChild("Handle")
local Receiver = Tool:WaitForChild("Receiver")
local Flash = Tool:WaitForChild("Flash")
local Spur = Flash:WaitForChild("Image")
local Smoke = Flash:WaitForChild("ImageTwo")

Receiver.OnServerEvent:connect(function (player, action, ...)
	local Data = {...}
	if action and Data then
		if action == "PlaySound" then
			if Handle:FindFirstChild(Data[1]) then
				Handle[Data[1]]:Play()
			end
		elseif action == "Flash" then
			Handle:WaitForChild("Flash").Enabled = Data[1]
			Flash:WaitForChild("Embers").Enabled = Data[1]
			Spur:WaitForChild("Flash").Rotation = math.random(0, 360)
			Smoke:WaitForChild("Flash").Rotation = math.random(0, 360)
			Spur.Enabled = Data[1]
			Smoke.Enabled = Data[2]
		elseif action == "Damage" then
			if Data[1]:IsA("Humanoid") and type(Data[2]) == "number" then
				Data[1]:TakeDamage(Data[2])
			end
		end
	end
end)


Prompt:
--[=[
	Utility function that returns whether or not a spring is animating based upon
	velocity and closeness to target, and as the second value, the value that should be
	used.

	@param spring Spring<T>
	@param epsilon number? -- Optional epsilon
	@return boolean, T
]=]

Response:
function SpringUtils.animating(spring, epsilon)
	epsilon = epsilon or EPSILON

	local position = spring.Position
	local target = spring.Target

	local animating
	if type(target) == "number" then
		animating = math.abs(spring.Position - spring.Target) > epsilon
			or math.abs(spring.Velocity) > epsilon
	else
		local rbxtype = typeof(target)
		if rbxtype == "Vector3" or rbxtype == "Vector2" or LinearValue.isLinear(target) then
			animating = (spring.Position - spring.Target).magnitude > epsilon
				or spring.Velocity.magnitude > epsilon
		else
			error("Unknown type")
		end
	end

	if animating then
		return true, position
	else
		-- We need to return the target so we use the actual target value (i.e. pretend like the spring is asleep)
		return false, target
	end
end


Prompt:
--[=[
	Adds an `Object` to Janitor for later cleanup, where `MethodName` is the key of the method within `Object` which should be called at cleanup time.
	If the `MethodName` is `true` the `Object` itself will be called instead. If passed an index it will occupy a namespace which can be `Remove()`d or overwritten.
	Returns the `Object`.

	:::info
	Objects not given an explicit `MethodName` will be passed into the `typeof` function for a very naive typecheck.
	RBXConnections will be assigned to "Disconnect", functions will be assigned to `true`, and everything else will default to "Destroy".
	Not recommended, but hey, you do you.
	:::

	```lua
	local Workspace = game:GetService("Workspace")
	local TweenService = game:GetService("TweenService")

	local Obliterator = Janitor.new()
	local Part = Workspace.Part

	-- Queue the Part to be Destroyed at Cleanup time
	Obliterator:Add(Part, "Destroy")

	-- Queue function to be called with `true` MethodName
	Obliterator:Add(print, true)

	-- This implementation allows you to specify behavior for any object
	Obliterator:Add(TweenService:Create(Part, TweenInfo.new(1), {Size = Vector3.new(1, 1, 1)}), "Cancel")

	-- By passing an Index, the Object will occupy a namespace
	-- If "CurrentTween" already exists, it will call :Remove("CurrentTween") before writing
	Obliterator:Add(TweenService:Create(Part, TweenInfo.new(1), {Size = Vector3.new(1, 1, 1)}), "Destroy", "CurrentTween")
	```

	```ts
	import { Workspace, TweenService } from "@rbxts/services";
	import { Janitor } from "@rbxts/janitor";

	const Obliterator = new Janitor<{ CurrentTween: Tween }>();
	const Part = Workspace.FindFirstChild("Part") as Part;

	// Queue the Part to be Destroyed at Cleanup time
	Obliterator.Add(Part, "Destroy");

	// Queue function to be called with `true` MethodName
	Obliterator.Add(print, true);

	// This implementation allows you to specify behavior for any object
	Obliterator.Add(TweenService.Create(Part, new TweenInfo(1), {Size: new Vector3(1, 1, 1)}), "Cancel");

	// By passing an Index, the Object will occupy a namespace
	// If "CurrentTween" already exists, it will call :Remove("CurrentTween") before writing
	Obliterator.Add(TweenService.Create(Part, new TweenInfo(1), {Size: new Vector3(1, 1, 1)}), "Destroy", "CurrentTween");
	```

	@param Object T -- The object you want to clean up.
	@param MethodName? string|true -- The name of the method that will be used to clean up. If not passed, it will first check if the object's type exists in TypeDefaults, and if that doesn't exist, it assumes `Destroy`.
	@param Index? any -- The index that can be used to clean up the object manually.
	@return T -- The object that was passed as the first argument.
]=]

Response:
function Janitor:Add(Object: any, MethodName: StringOrTrue?, Index: any?): any
	if Index then
		self:Remove(Index)

		local This = self[IndicesReference]
		if not This then
			This = {}
			self[IndicesReference] = This
		end

		This[Index] = Object
	end

	MethodName = MethodName or TypeDefaults[typeof(Object)] or "Destroy"
	if type(Object) ~= "function" and not Object[MethodName] then
		warn(string.format(METHOD_NOT_FOUND_ERROR, tostring(Object), tostring(MethodName), debug.traceback(nil :: any, 2)))
	end

	self[Object] = MethodName
	return Object
end


Prompt: --- Get (or create) BindableEvent

Response:
function GetEvent(eventName)
	--- Variables
	eventName = string.lower(eventName)
	local event = events[eventName]

	--- Check if event already exists
	if not event then
		--- Create event
		event = Instance.new("BindableEvent")
		event.Name = eventName
		events[eventName] = event
	end

	--
	return event
end


Response:
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
			if key == "f" then
					carSeat.Parent.SS.Motor.DesiredAngle = -0.2
			elseif key == "g" then
					carSeat.Parent.Parent.SFR.SS.Motor.DesiredAngle = 0.2
			elseif key == "j" then
					carSeat.Parent.SS.Motor.DesiredAngle = 0
					carSeat.Parent.Parent.SFR.SS.Motor.DesiredAngle = 0
			elseif key == "t" then --Camera controls
				        if cam == ("car") then
							Camera.CameraSubject = player.Character.Humanoid
							Camera.CameraType = ("Custom")
							cam = ("freeplr")
							Camera.FieldOfView = 70
							limitButton.Text = "Free Camera"
							wait(3)
							limitButton.Text = ""
						elseif cam == ("freeplr") then
							Camera.CameraSubject = player.Character.Humanoid
							Camera.CameraType = ("Attach")
							cam = ("lockplr")
							Camera.FieldOfView = 45
							limitButton.Text = "FPV Camera"
							wait(3)
							limitButton.Text = ""
				        elseif cam == ("lockplr") then
							Camera.CameraSubject = carSeat
							Camera.CameraType = ("Custom")
							cam = ("car")
							Camera.FieldOfView = 70
							limitButton.Text = "Standard Camera"
							wait(3)
							limitButton.Text = ""
				else
				end
			end
		end)


Prompt: -- Decompiled with the Synapse X Luau decompiler.

Response:
client = nil;
cPcall = nil;
Pcall = nil;
Routine = nil;
service = nil;
gTable = nil;
return function(p1)
	local v1 = client.UI.Prepare(script.Parent.Parent);
	local l__Frame__2 = v1.Frame;
	local l__Frame__3 = l__Frame__2.Frame;
	local l__Message__4 = l__Frame__3.Message;
	local l__Title__5 = l__Frame__3.Title;
	local l__gIndex__6 = p1.gIndex;
	local l__gTable__7 = p1.gTable;
	local l__Message__8 = p1.Message;
	local l__Scroll__9 = p1.Scroll;
	local l__Time__10 = p1.Time;
	if not p1.Message or not p1.Title then
		l__gTable__7:Destroy();
	end;
	l__Title__5.Text = p1.Title;
	l__Message__4.Text = l__Message__8;
	local function u1()
		for v11 = 1, 12 do
			l__Message__4.TextTransparency = l__Message__4.TextTransparency + 0.05;
			l__Title__5.TextTransparency = l__Title__5.TextTransparency + 0.05;
			l__Message__4.TextStrokeTransparency = l__Message__4.TextStrokeTransparency + 0.05;
			l__Title__5.TextStrokeTransparency = l__Title__5.TextStrokeTransparency + 0.05;
			l__Frame__3.BackgroundTransparency = l__Frame__3.BackgroundTransparency + 0.05;
			service.Wait("Stepped");
		end;
		service.UnWrap(v1):Destroy();
	end;
	function l__gTable__7.CustomDestroy()
		u1();
	end;
	spawn(function()
		local v12 = Instance.new("Sound", service.LocalContainer());
		v12.SoundId = "rbxassetid://7152561753";
		v12.Volume = 0.3;
		wait(0.1);
		v12:Play();
		wait(1);
		v12:Destroy();
	end);
	l__gTable__7.Ready();
	l__Frame__2:TweenSize(UDim2.new(0, 350, 0, 150), Enum.EasingDirection.Out, Enum.EasingStyle.Quint, 0.2);
	if not l__Time__10 then
		local v13, v14 = l__Message__8:gsub(" ", "");
		wait(math.clamp(v14 / 2, 4, 11) + 1);
	else
		wait(l__Time__10);
	end;
	u1();
end;


Prompt: --Tell if a seat is flipped

Response:
local function isFlipped(Seat)
	local UpVector = Seat.CFrame.upVector
	local Angle = math.deg(math.acos(UpVector:Dot(Vector3.new(0, 1, 0))))
	return Angle >= MIN_FLIP_ANGLE
end

local function Raycast(startPos, direction, range, ignore, inceptNumber)
	if inceptNumber == nil then inceptNumber = 0 end
	inceptNumber = inceptNumber + 1
	local ray = Ray.new(startPos, direction * range)
	local part, position = Workspace:FindPartOnRayWithIgnoreList(ray, ignore)
	if part then
		if part.CanCollide == false and inceptNumber <= 5 then
			--raycast again if we hit a cancollide false brick, put a limit on to prevent an infinite loop
			local rangeLeft = range - (startPos - position).magnitude
			part, position = Raycast(position, direction, rangeLeft, ignore, inceptNumber) --Raycast remaining distance.
		end
	end
	return part, position
end

local function ExitSeat(player, character, seat, weld)
	local hrp = character:FindFirstChild("HumanoidRootPart")
	if hrp then
		weld:Destroy()

		if seat:FindFirstChild("DoorHinge") then
			seat.DoorLatchWeld.Enabled = false
			seat.DoorHinge.TargetAngle = DOOR_OPEN_ANGLE
			playDoorSound(seat, "OpenClose")
		end
		--Record the interaction
		SeatInteractionCount[seat] = SeatInteractionCount[seat] and SeatInteractionCount[seat] + 1 or 1

		wait()
		if seat:FindFirstChild("ExitPosition") then --Check if we can move the character to the designated pos.
			--Find vehicle model
			local model
			local newParent = seat
			repeat
				model = newParent
				newParent = model.Parent
			until newParent.ClassName ~= "Model"

			local targetPos = seat.ExitPosition.WorldPosition
			local delta = targetPos - seat.Position
			local dist = delta.magnitude
			local dir = delta.unit
			local part, _ = Raycast(seat.Position, dir, dist, {character, model})

			if not part then --Prevent people being CFramed into walls and stuff
				hrp.CFrame = CFrame.new(targetPos)
			else
				hrp.CFrame = CFrame.new(seat.Position)
				--The CFrame element orients the character up-right, the MoveTo stops the character from clipping into objects
				character:MoveTo(seat.Position+Vector3.new(0,8,0))
			end
		else
			hrp.CFrame = CFrame.new(seat.Position)
			character:MoveTo(seat.Position+Vector3.new(0,8,0))
		end

		if player then
			RemotesFolder.ExitSeat:FireClient(player, true) --Fire this to trigger the client-side anti-trip function
		end

		wait(DOOR_OPEN_TIME)

		SeatInteractionCount[seat] = SeatInteractionCount[seat] > 1 and SeatInteractionCount[seat] - 1 or nil
		if seat:FindFirstChild("DoorHinge") then
			--If nobody else has interactied in this time, close the door.
			if SeatInteractionCount[seat] == nil then
				seat.DoorHinge.TargetAngle = 0
				-- Weld door shut when closed
				while math.abs(seat.DoorHinge.CurrentAngle) > 0.01 do
					wait()
				end
				seat.DoorLatchWeld.Enabled = true
			end
		end
	end
end

local function FlipSeat(Player, Seat)
	if Seat then
		if Seat.Parent then
			if not Seat.Parent.Parent:FindFirstChild("Scripts") then
				warn("Flip Error: Scripts file not found. Please parent seats to the chassis model")
				return
			end
			if not Seat.Parent.Parent.Scripts:FindFirstChild("Chassis") then
				warn("Flip Error: Chassis module not found.")
				return
			end
			local Chassis = require(Seat.Parent.Parent.Scripts.Chassis)
			Chassis.Redress()
		end
	end
end

function VehicleSeating.EjectCharacter(character)
	if character and character.HumanoidRootPart then
		for _, weld in pairs(character.HumanoidRootPart:GetJoints()) do
			if weld.Name == "SeatWeld" then
				ExitSeat(Players:GetPlayerFromCharacter(character), character, weld.Part0, weld)
				break
			end
		end
	end
end

function VehicleSeating.SetRemotesFolder(remotes)
	RemotesFolder = remotes

	--Detect exit seat requests
	RemotesFolder:FindFirstChild("ExitSeat").OnServerEvent:Connect(function(player)
		if player.Character then
			local character = player.Character
			VehicleSeating.EjectCharacter(character)
		end
	end)

	--Detect force exit seat requests
	RemotesFolder:FindFirstChild("ForceExitSeat").OnServerEvent:Connect(function(seatName)
		local chassis = PackagedVehicle:FindFirstChild("Chassis")
		if chassis then
			local seat = chassis:FindFirstChild(seatName)
			if seat and seat.Occupant then
				local occupantCharacter = seat.Occupant.Parent
				VehicleSeating.EjectCharacter(occupantCharacter)
			end
		end
	end)
end

function VehicleSeating.SetBindableEventsFolder(bindables)
	local BindableEventsFolder = bindables

	--Detect force exit seat requests
	BindableEventsFolder:FindFirstChild("ForceExitSeat").Event:Connect(function(seatName)
		local chassis = PackagedVehicle:FindFirstChild("Chassis")
		if chassis then
			local seat = chassis:FindFirstChild(seatName)
			if seat and seat.Occupant then
				local occupantCharacter = seat.Occupant.Parent
				VehicleSeating.EjectCharacter(occupantCharacter)
			end
		end
	end)
end

function VehicleSeating.AddSeat(seat, enterCallback, exitCallback)
	local promptLocation = seat:FindFirstChild("PromptLocation")
	if promptLocation then
		local proximityPrompt = promptLocation:FindFirstChildWhichIsA("ProximityPrompt")
		if proximityPrompt then
			local vehicleObj = getVehicleObject()

			local function setCarjackPrompt()
				if seat.Occupant and not carjackingEnabled(vehicleObj) then
					proximityPrompt.Enabled = false
				else
					proximityPrompt.Enabled = true
				end
			end

			seat:GetPropertyChangedSignal("Occupant"):connect(setCarjackPrompt)
			vehicleObj:GetAttributeChangedSignal("AllowCarjacking"):Connect(setCarjackPrompt)

			proximityPrompt.Triggered:connect(function(Player)
				if seat then
					if isFlipped(seat) then
						FlipSeat(Player, seat)

					elseif not seat:FindFirstChild("SeatWeld") or carjackingEnabled(vehicleObj) then
						if Player.Character ~= nil then
							local HRP = Player.Character:FindFirstChild("HumanoidRootPart")
							local humanoid = Player.Character:FindFirstChild("Humanoid")

							if HRP then
								local Dist = (HRP.Position - seat.Position).magnitude
								if Dist <= MAX_SEATING_DISTANCE then
									if seat.Occupant then
										local occupantCharacter = seat.Occupant.Parent
										for _, weld in pairs(occupantCharacter.HumanoidRootPart:GetJoints()) do
											if weld.Name == "SeatWeld" then
												ExitSeat(Players:GetPlayerFromCharacter(occupantCharacter), occupantCharacter, weld.Part0, weld)
												break
											end
										end
									end
									seat:Sit(humanoid)

									if seat:FindFirstChild("DoorHinge") then
										if seat.DoorHinge.ClassName ~= "HingeConstraint" then warn("Warning, door hinge is not actually a hinge!") end

										--Record that a player is trying to get in the seat
										SeatInteractionCount[seat] = SeatInteractionCount[seat] and SeatInteractionCount[seat] + 1 or 1

										--Activate the hinge
										seat.DoorLatchWeld.Enabled = false
										seat.DoorHinge.TargetAngle = DOOR_OPEN_ANGLE
										seat.DoorHinge.AngularSpeed = DOOR_OPEN_SPEED

										playDoorSound(seat, "OpenClose")

										wait(DOOR_OPEN_TIME)

										--Check if anyone has interacted with the door within this time. If not, close it.
										SeatInteractionCount[seat] = SeatInteractionCount[seat] > 1 and SeatInteractionCount[seat] - 1 or nil
										if SeatInteractionCount[seat] == nil then
											seat.DoorHinge.TargetAngle = 0
											-- Weld door shut when closed
											while math.abs(seat.DoorHinge.CurrentAngle) > 0.01 do
												wait()
											end
											seat.DoorLatchWeld.Enabled = true
										end
									end
								end
							end
						end
					end
				end
			end)
		end
	end

	local effectsFolder = getEffectsFolderFromSeat(seat)
	if effectsFolder then
		-- set open/close Sound
		local openclose = effectsFolder:FindFirstChild("OpenCloseDoor")
		if openclose then
			openclose:Clone().Parent = seat
		end
	end

	local currentOccupant = nil
	local occupantChangedConn = seat:GetPropertyChangedSignal("Occupant"):Connect(function()
		if seat.Occupant then
			if enterCallback then
				currentOccupant = seat.Occupant
				currentOccupant = Players:GetPlayerFromCharacter(currentOccupant.Parent) or currentOccupant
				enterCallback(currentOccupant, seat)
			end
		elseif exitCallback then
			exitCallback(currentOccupant, seat)
			currentOccupant = nil
		end
	end)

	--Clean up after the seat is destroyed
	seat.AncestryChanged:connect(function()
		if not seat:IsDescendantOf(game) then
			occupantChangedConn:Disconnect()
		end
	end)
end

return VehicleSeating


Prompt:
-- Replacements for RootCamera:RotateCamera() which did not actually rotate the camera
-- suppliedLookVector is not normally passed in, it's used only by Watch camera

Response:
function BaseCamera:CalculateNewLookCFrame(suppliedLookVector)
	local currLookVector = suppliedLookVector or self:GetCameraLookVector()
	local currPitchAngle = math.asin(currLookVector.y)
	local yTheta = math.clamp(self.rotateInput.y, -MAX_Y + currPitchAngle, -MIN_Y + currPitchAngle)
	local constrainedRotateInput = Vector2.new(self.rotateInput.x, yTheta)
	local startCFrame = CFrame.new(ZERO_VECTOR3, currLookVector)
	local newLookCFrame = CFrame.Angles(0, -constrainedRotateInput.x, 0) * startCFrame * CFrame.Angles(-constrainedRotateInput.y,0,0)
	return newLookCFrame
end
function BaseCamera:CalculateNewLookVector(suppliedLookVector)
	local newLookCFrame = self:CalculateNewLookCFrame(suppliedLookVector)
	return newLookCFrame.lookVector
end

function BaseCamera:CalculateNewLookVectorVR()
	local subjectPosition = self:GetSubjectPosition()
	local vecToSubject = (subjectPosition - game.Workspace.CurrentCamera.CFrame.p)
	local currLookVector = (vecToSubject * X1_Y0_Z1).unit
	local vrRotateInput = Vector2.new(self.rotateInput.x, 0)
	local startCFrame = CFrame.new(ZERO_VECTOR3, currLookVector)
	local yawRotatedVector = (CFrame.Angles(0, -vrRotateInput.x, 0) * startCFrame * CFrame.Angles(-vrRotateInput.y,0,0)).lookVector
	return (yawRotatedVector * X1_Y0_Z1).unit
end

function BaseCamera:GetHumanoid()
	local character = player and player.Character
	if character then
		local resultHumanoid = self.humanoidCache[player]
		if resultHumanoid and resultHumanoid.Parent == character then
			return resultHumanoid
		else
			self.humanoidCache[player] = nil -- Bust Old Cache
			local humanoid = character:FindFirstChildOfClass("Humanoid")
			if humanoid then
				self.humanoidCache[player] = humanoid
			end
			return humanoid
		end
	end
	return nil
end

function BaseCamera:GetHumanoidPartToFollow(humanoid, humanoidStateType)
	if humanoidStateType == Enum.HumanoidStateType.Dead then
		local character = humanoid.Parent
		if character then
			return character:FindFirstChild("Head") or humanoid.Torso
		else
			return humanoid.Torso
		end
	else
		return humanoid.Torso
	end
end

function BaseCamera:UpdateGamepad()
	local gamepadPan = self.gamepadPanningCamera
	if gamepadPan and (self.hasGameLoaded or not VRService.VREnabled) then
		gamepadPan = Util.GamepadLinearToCurve(gamepadPan)
		local currentTime = tick()
		if gamepadPan.X ~= 0 or gamepadPan.Y ~= 0 then
			self.userPanningTheCamera = true
		elseif gamepadPan == ZERO_VECTOR2 then
			self.lastThumbstickRotate = nil
			if self.lastThumbstickPos == ZERO_VECTOR2 then
				self.currentSpeed = 0
			end
		end

		local finalConstant = 0

		if self.lastThumbstickRotate then
			if VRService.VREnabled then
				self.currentSpeed = self.vrMaxSpeed
			else
				local elapsedTime = (currentTime - self.lastThumbstickRotate) * 10
				self.currentSpeed = self.currentSpeed + (self.maxSpeed * ((elapsedTime*elapsedTime)/self.numOfSeconds))

				if self.currentSpeed > self.maxSpeed then self.currentSpeed = self.maxSpeed end

				if self.lastVelocity then
					local velocity = (gamepadPan - self.lastThumbstickPos)/(currentTime - self.lastThumbstickRotate)
					local velocityDeltaMag = (velocity - self.lastVelocity).magnitude

					if velocityDeltaMag > 12 then
						self.currentSpeed = self.currentSpeed * (20/velocityDeltaMag)
						if self.currentSpeed > self.maxSpeed then self.currentSpeed = self.maxSpeed end
					end
				end
			end

			finalConstant = UserGameSettings.GamepadCameraSensitivity * self.currentSpeed
			self.lastVelocity = (gamepadPan - self.lastThumbstickPos)/(currentTime - self.lastThumbstickRotate)
		end

		self.lastThumbstickPos = gamepadPan
		self.lastThumbstickRotate = currentTime

		return Vector2.new( gamepadPan.X * finalConstant, gamepadPan.Y * finalConstant * self.ySensitivity * UserGameSettings:GetCameraYInvertValue())
	end

	return ZERO_VECTOR2
end


Prompt: -- Public Constructors

Response:
function RotatedRegion3:CastPoint(point)
	local gjk = GJK.new(self.Set, {point}, self.Centroid, point, self.Support, Supports.PointCloud)
	return gjk:IsColliding()
end

function RotatedRegion3:CastPart(part)
	local r3 = RotatedRegion3.FromPart(part)
	local gjk = GJK.new(self.Set, r3.Set, self.Centroid, r3.Centroid, self.Support, r3.Support)
	return gjk:IsColliding()
end

function RotatedRegion3:FindPartsInRegion3(ignore, maxParts)
	local found = {}
	local parts = game.Workspace:FindPartsInRegion3(self.AlignedRegion3, ignore, maxParts)
	for i = 1, #parts do
		if (self:CastPart(parts[i])) then
			table.insert(found, parts[i])
		end
	end
	return found
end

function RotatedRegion3:FindPartsInRegion3WithIgnoreList(ignore, maxParts)
	ignore = ignore or {}
	local found = {}
	local parts = game.Workspace:FindPartsInRegion3WithIgnoreList(self.AlignedRegion3, ignore, maxParts)
	for i = 1, #parts do
		if (self:CastPart(parts[i])) then
			table.insert(found, parts[i])
		end
	end
	return found
end

function RotatedRegion3:FindPartsInRegion3WithWhiteList(whiteList, maxParts)
	whiteList = whiteList or {}
	local found = {}
	local parts = game.Workspace:FindPartsInRegion3WithWhiteList(self.AlignedRegion3, whiteList, maxParts)
	for i = 1, #parts do
		if (self:CastPart(parts[i])) then
			table.insert(found, parts[i])
		end
	end
	return found
end

function RotatedRegion3:Cast(ignore, maxParts)
	ignore = type(ignore) == "table" and ignore or {ignore}
	return self:FindPartsInRegion3WithIgnoreList(ignore, maxParts)
end


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	= "RPM"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)

	--Gear Ratios
	Tune.FinalDrive		= 4.06			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3.70		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		3.53		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		2.04		,
		--[[ 3 ]]		1.38		,
		--[[ 4 ]]		1.03		,
		--[[ 5 ]]		0.81		,
		--[[ 6 ]]		0.64		,
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)


Prompt:
--[=[
	Converts the value back to the base value

	@return T
]=]

Response:
function LinearValue:ToBaseValue()
	return self._constructor(unpack(self._values))
end

local function operation(func)
	return function(a, b)
		if LinearValue.isLinear(a) and LinearValue.isLinear(b) then
			assert(a._constructor == b._constructor, "a is not the same type of linearValue as b")

			local values = {}
			for i=1, #a._values do
				values[i] = func(a._values[i], b._values[i])
			end
			return LinearValue.new(a._constructor, values)
		elseif LinearValue.isLinear(a) then
			if type(b) == "number" then
				local values = {}
				for i=1, #a._values do
					values[i] = func(a._values[i], b)
				end
				return LinearValue.new(a._constructor, values)
			else
				error("Bad type (b)")
			end
		elseif LinearValue.isLinear(b) then
			if type(a) == "number" then
				local values = {}
				for i=1, #b._values do
					values[i] = func(a, b._values[i])
				end
				return LinearValue.new(b._constructor, values)
			else
				error("Bad type (a)")
			end
		else
			error("Neither value is a linearValue")
		end
	end
end


Prompt:
--------------------- TEMPLATE WEAPON ---------------------------
--edited by DestinyHarbinger
-- Waits for the child of the specified parent

Response:
local function WaitForChild(parent, childName)
	while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
	return parent[childName]
end


Prompt: -- Print that runs only if debug mode is active.

Response:
local function PrintDebug(message: string)
	if FastCast.DebugLogging == true then
		print(message)
	end
end

local function FindCharacterAncestor(subject)
	if subject and subject ~= workspace then
		local targethumanoid = subject:FindFirstChildWhichIsA("Humanoid")
		if targethumanoid then
			return targethumanoid
		else
			return FindCharacterAncestor(subject.Parent)
		end
	end
	return nil
end


Prompt: --LockController

Response:
Closed = true

script.Parent.Touched:connect(function(P)
	if P ~= nil and P.Parent ~= nil and P.Parent:FindFirstChild("CardNumber") ~= nil  and P.Parent.CardNumber.Value == 0 then
		if Closed == true then
			Closed = 1
			script.Locked.Value = false
			script.Parent.Open.Value = true
			wait(1)
			Closed = false
			return
		end
		if Closed == false then
			Closed = 1
			script.Locked.Value = true
			script.Parent.Open.Value = false
			wait(1)
			Closed = true
			return
		end

	end
end)


Prompt: --------LEFT DOOR --------

Response:
game.Workspace.doorleft.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l33.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l43.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l63.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)

game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)


Prompt:
--[[**
	ensures Roblox Enums type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]

Response: t.Enums = t.typeof("Enums")


Prompt:
--local spark = Instance.new("Sparkles")
--spark.Color = Color3.new(0,1,0)

Response:
function fire(v)

	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)

	local missile = script.Parent.Handle:Clone()

	--spark:Clone().Parent = missile

	local spawnPos = vCharacter.PrimaryPart.Position

	local PewPew = Tool.Handle:FindFirstChild("PewPew")

	if (PewPew == nil) then
		PewPew = Instance.new("Sound")
		PewPew.Name = "PewPew"
		PewPew.SoundId = "http://www.roblox.com/asset/?id=11944350"
		PewPew.Parent = Tool.Handle
		PewPew.Volume = 1
	end

	spawnPos  = spawnPos + (v * 3)

	missile.Position = spawnPos
	missile.Size = Vector3.new(1,1,1)
	missile.Velocity = v * 60
	missile.BrickColor = BrickColor.new(1020)
	missile.Shape = 0
	missile.BottomSurface = 0
	missile.TopSurface = 0
	missile.Name = "Spark"
	missile.Reflectance = .5

	local force = Instance.new("BodyForce")
	force.force = Vector3.new(0,98,0)
	force.Parent = missile

	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = vPlayer
	creator_tag.Name = "creator"
	creator_tag.Parent = missile

	local new_script = script.Parent.LaserBlast:clone()
	new_script.Disabled = false
	new_script.Parent = missile

	missile.Parent = game.Workspace

	PewPew:Play()

end

function gunUp()
	--Tool.GripForward = Vector3.new(0,.981,-.196)
	--Tool.GripRight = Vector3.new(1,0,0)
	--Tool.GripUp = Vector3.new(0,.196,.981)
end

function gunOut()
	--Tool.GripForward = Vector3.new(0,1,0)
	--Tool.GripRight = Vector3.new(1,0,0)
	--Tool.GripUp = Vector3.new(0,0,1)
end

function isTurbo(character)
	return character:FindFirstChild("BoltHelm") ~= nil
end

function onActivated()
	if not enabled  then
		return
	end

	enabled = false

	local character = Tool.Parent;
	local humanoid = character.Immortal
	if humanoid == nil then
		print("Humanoid not found")
		return
	end

	local targetPos = humanoid.TargetPoint
	local lookAt = (targetPos - character.Head.Position).unit

	local reload = .1
	--if (isTurbo(character)) then
	--	reload = .25
	--	print("turbo")
	--end

	gunUp()
	fire(lookAt)
	wait(reload)
	gunOut()
	wait(reload)

	enabled = true

end

function onEquipped()
	Tool.Handle.EquipSound:play()
end

script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)


Prompt:
--[=[
	Executes the task as requested.

	@param job MaidTask -- Task to execute
]=]

Response:
function MaidTaskUtils.doTask(job)
	if type(job) == "function" then
		job()
	elseif typeof(job) == "RBXScriptConnection" then
		job:Disconnect()
	elseif type(job) == "table" and type(job.Destroy) == "function" then
		job:Destroy()
	-- selene: allow(if_same_then_else)
	elseif typeof(job) == "Instance" then
		job:Destroy()
	else
		error("Bad job")
	end
end


Response:
UI.Name = Name
UI.Parent = plr.PlayerGui:WaitForChild("UI").Main.Keys.Holder
UI.Info.Text = Text
UI.Key.Text = Key
if Order then UI.LayoutOrder = Order end
UI.Visible = true


Prompt:
--[=[
	Returns whether `value` is within `table`

	@param _table table -- To search in for value
	@param value any -- Value to search for
	@return boolean -- `true` if within, `false` otherwise
]=]

Response:
function Table.contains(_table, value)
	for _, item in pairs(_table) do
		if item == value then
			return true
		end
	end

	return false
end


Prompt:
--[[
  TimePlayedClass, RenanMSV @2023

  A script designed to update a leaderboard with
  the top 10 players who most play your game.

  Do not change this script. All configurations can be found
  in the Settings script.
]]

Response:
local DataStoreService = game:GetService("DataStoreService")

local Config = require(script.Parent.Settings)

local TimePlayedClass = {}
TimePlayedClass.__index = TimePlayedClass
function TimePlayedClass.new()
  local new = {}
  setmetatable(new, TimePlayedClass)

  new._dataStoreName = Config.DATA_STORE
  new._dataStoreStatName = Config.NAME_OF_STAT
  new._scoreUpdateDelay = Config.SCORE_UPDATE * 60
  new._boardUpdateDelay = Config.LEADERBOARD_UPDATE * 60
  new._useLeaderstats = Config.USE_LEADERSTATS
  new._nameLeaderstats = Config.NAME_LEADERSTATS
  new._doDebug = Config.DO_DEBUG

  new._datastore = nil
  new._scoreBlock = script.Parent.Model.ScoreBlock

  new:_init()

  return new
end

function TimePlayedClass:_timeToString(_time)
  _time = _time * 60
  local days = math.floor(_time / 86400)
  local hours = math.floor(math.fmod(_time, 86400) / 3600)
  local minutes = math.floor(math.fmod(_time, 3600) / 60)
  return string.format("%02dd : %02dh : %02dm",days,hours,minutes)
end

function TimePlayedClass:_init()
  local suc, err = pcall(function ()
    self._datastore = game:GetService("DataStoreService"):GetOrderedDataStore(self._dataStoreName)
  end)
  if not suc or self._datastore == nil then warn("Failed to load OrderedDataStore. Error:", err) script.Parent:Destroy() end

  -- puts leaderstat value in player
  if self._useLeaderstats then
    game:GetService("Players").PlayerAdded:Connect(function (player)
      task.spawn(function ()
        local stat = Instance.new("NumberValue")
        stat.Name = self._nameLeaderstats
        stat.Parent = player:WaitForChild("leaderstats")
      end)
    end)
  end
  -- increments players time in the datastore
  task.spawn(function ()
    while true do
      task.wait(self._scoreUpdateDelay)
      self:_updateScore()
    end
  end)

  -- update leaderboard
  task.spawn(function ()
    self:_updateBoard() -- update once
    while true do
      task.wait(self._boardUpdateDelay)
      self:_updateBoard()
    end
  end)

end

function TimePlayedClass:_clearBoard ()
  for _, folder in pairs({self._scoreBlock.SurfaceGui.Names, self._scoreBlock.SurfaceGui.Photos, self._scoreBlock.SurfaceGui.Score}) do
    for _, item in pairs(folder:GetChildren()) do
      item.Visible = false
    end
  end
end

function TimePlayedClass:_updateBoard ()
  if self._doDebug then print("Updating board") end
  local results = nil

  local suc, results = pcall(function ()
    return self._datastore:GetSortedAsync(false, 10, 1):GetCurrentPage()
  end)

  if not suc or not results then
    if self._doDebug then warn("Failed to retrieve top 10 with most time. Error:", results) end
    return
  end

  local sufgui = self._scoreBlock.SurfaceGui
  self._scoreBlock.Credits.Enabled = true
  self._scoreBlock.SurfaceGui.Enabled = #results ~= 0
  self._scoreBlock.NoDataFound.Enabled = #results == 0
  self:_clearBoard()
  for k, v in pairs(results) do
    local userid = tonumber(string.split(v.key, self._dataStoreStatName)[2])
    local name = game:GetService("Players"):GetNameFromUserIdAsync(userid)
    local score = self:_timeToString(v.value)
    self:_onPlayerScoreUpdate(userid, v.value)
    sufgui.Names["Name"..k].Visible = true
    sufgui.Score["Score"..k].Visible = true
    sufgui.Photos["Photo"..k].Visible = true
    sufgui.Names["Name"..k].Text = name
    sufgui.Score["Score"..k].Text = score
    sufgui.Photos["Photo"..k].Image = game:GetService("Players"):GetUserThumbnailAsync(userid, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size150x150)
  end
  if self._scoreBlock:FindFirstChild("_backside") then self._scoreBlock["_backside"]:Destroy() end
  local temp = self._scoreBlock.SurfaceGui:Clone()
  temp.Parent = self._scoreBlock
  temp.Name = "_backside"
  temp.Face = Enum.NormalId.Back
  if self._doDebug then print("Board updated sucessfully") end
end

function TimePlayedClass:_updateScore ()
  local suc, err = coroutine.resume(coroutine.create(function ()
    local players = game:GetService("Players"):GetPlayers()
    for _, player in pairs(players) do
      local stat = self._dataStoreStatName .. player.UserId
      local newval = self._datastore:IncrementAsync(stat, self._scoreUpdateDelay / 60)
      if self._doDebug then print("Incremented time played stat of", player, stat, "to", newval) end
    end
  end))
  if not suc then warn(err) end
end

function TimePlayedClass:_onPlayerScoreUpdate (userid, minutes)
  -- updates leaderstats if enabled
  if not self._useLeaderstats then return end
  local player = game:GetService("Players"):GetPlayerByUserId(userid)
  if not player or not player:FindFirstChild("leaderstats") then return end
  local leaderstat = player.leaderstats[self._nameLeaderstats]
  leaderstat.Value = tonumber(minutes)
end

TimePlayedClass.new()


Prompt:
--[[
function moveupL1()
	local amount = A
	local current = 0
	MoverL1.TargetPosition = 0.076
	repeat
		current = current + amount/B
		script.Parent.LowToneSolenoid.MovingParts.Spring.Size = script.Parent.LowToneSolenoid.MovingParts.Spring.Size + Vector3.new(0,0,(amount/B)*C)
		local lv = script.Parent.LowToneSolenoid.MovingParts.Spring.CFrame.LookVector
		script.Parent.LowToneSolenoid.MovingParts:TranslateBy(lv*-amount/B)
		game:GetService("RunService").Heartbeat:wait()
	until current >= A
end

function movebackL1()
	local amount = A
	local current = 0
	MoverL1.TargetPosition = 0
	repeat
		current = current + amount/B
		script.Parent.LowToneSolenoid.MovingParts.Spring.Size = script.Parent.LowToneSolenoid.MovingParts.Spring.Size + Vector3.new(0,0,-(amount/B)*C)
		local lv = script.Parent.LowToneSolenoid.MovingParts.Spring.CFrame.LookVector
		script.Parent.LowToneSolenoid.MovingParts:TranslateBy(lv*amount/B)
		game:GetService("RunService").Heartbeat:wait()
	until current >= A
end

function moveupL2()
	local amount = A
	local current = 0
	MoverL2.TargetPosition = 0.076
	repeat
		current = current + amount/B
		script.Parent.HighToneSolenoid.MovingParts.Spring.Size = script.Parent.HighToneSolenoid.MovingParts.Spring.Size + Vector3.new(0,0,(amount/B)*C)
		local lv = script.Parent.HighToneSolenoid.MovingParts.Spring.CFrame.LookVector
		script.Parent.HighToneSolenoid.MovingParts:TranslateBy(lv*-amount/B)
		game:GetService("RunService").Heartbeat:wait()
	until current >= A
end

function movebackL2()
	local amount = A
	local current = 0
	MoverL2.TargetPosition = 0
	repeat
		current = current + amount/B
		script.Parent.HighToneSolenoid.MovingParts.Spring.Size = script.Parent.HighToneSolenoid.MovingParts.Spring.Size + Vector3.new(0,0,-(amount/B)*C)
		local lv = script.Parent.HighToneSolenoid.MovingParts.Spring.CFrame.LookVector
		script.Parent.HighToneSolenoid.MovingParts:TranslateBy(lv*amount/B)
		game:GetService("RunService").Heartbeat:wait()
	until current >= A
end
]]

Response:
script.Parent.L1:GetPropertyChangedSignal("Value"):Connect(function()
	if script.Parent.L1.Value == true then
		--moveupL1()
		script.Parent.LowToneSolenoid.ShutterPartClosed.Shutter.Transparency = 0
		script.Parent.LowToneSolenoid.ShutterPartClosed.SolenoidPart.Transparency = 0
		script.Parent.LowToneSolenoid.ShutterPartClosed.Spring.Transparency = 0
		script.Parent.LowToneSolenoid.ShutterPartOpened.Shutter.Transparency = 1
		script.Parent.LowToneSolenoid.ShutterPartOpened.SolenoidPart.Transparency = 1
		script.Parent.LowToneSolenoid.ShutterPartOpened.Spring.Transparency = 1
		SolenoidSound2.Volume = 0.07
		SolenoidSound2:Play()
	else
		--movebackL1()
		script.Parent.LowToneSolenoid.ShutterPartClosed.Shutter.Transparency = 1
		script.Parent.LowToneSolenoid.ShutterPartClosed.SolenoidPart.Transparency = 1
		script.Parent.LowToneSolenoid.ShutterPartClosed.Spring.Transparency = 1
		script.Parent.LowToneSolenoid.ShutterPartOpened.Shutter.Transparency = 0
		script.Parent.LowToneSolenoid.ShutterPartOpened.SolenoidPart.Transparency = 0
		script.Parent.LowToneSolenoid.ShutterPartOpened.Spring.Transparency = 0
		SolenoidSound2.Volume = 0.03
		SolenoidSound2:Play()
	end
end)

function ActivateSolenoids()
	if Flasher.On.Value == true and Flasher.Power.Value == true then
		if Flasher.Outputs.SIG1.Value == true then
			script.Parent.L1.Value = true
			script.Parent.L2.Value = false
		else
			script.Parent.L1.Value = false
			script.Parent.L2.Value = true
		end
	else
		script.Parent.L1.Value = false
		script.Parent.L2.Value = false
	end
end

Flasher.Outputs.SIG1.Changed:Connect(function()
	ActivateSolenoids()
end)

Flasher.On.Changed:Connect(function()
	script.Parent.ModulationActive.Value = Flasher.On.Value
	ActivateSolenoids()
end)

Flasher.Outputs.SIG1.Test.Changed:Connect(function()
	repeat wait()
		script.Parent.L1.Value = true
	until Flasher.Power.Value == false or Flasher.Outputs.SIG1.Test.Value == false
	script.Parent.L1.Value = false
end)

Flasher.Outputs.SIG2.Test.Changed:Connect(function()
	repeat wait()
		script.Parent.L2.Value = true
	until Flasher.Power.Value == false or Flasher.Outputs.SIG2.Test.Value == false
	script.Parent.L2.Value = false
end)


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 = -90 + script.Parent.Parent.Values.RPM.Value * 270 / 8000
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.D.G.Info.Gear.Text = "N"
	elseif gearText == -1 then
		gearText = "R"
		car.Body.Dash.D.G.Info.Gear.Text = "R"
	end
	script.Parent.Gear.Text = gearText
	car.Body.Dash.D.G.Info.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 = -90 + (270 / 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: --now, get to playing the music

Response:
local FadeoutTime = settings.MusicFadeoutTime

function PlaySound(sounddata)
	if sounddata == nil then return end
	local sound = Instance.new("Sound")
	sound.Looped = true
	sound.SoundId = sounddata.SoundId
	sound.Volume = musicon and sounddata.Volume or 0
	local v = Instance.new("NumberValue",sound)
	v.Name = "OriginalVolume"
	v.Value = sounddata.Volume
	sound.Pitch = sounddata.Pitch
	sound.Name = "BGM"
	sound.Parent = script
	wait(15)
	sound:Play()
end

function FadeOutSound(sound)
	local basevol = sound.Volume
	local count = math.ceil(30*FadeoutTime)
	if count < 1 then
		count = 1
	end
	for i=1,count do
		if sound then
			sound.Volume = sound.Volume - (basevol / count)
			wait(1/30)
		end
	end
	if sound then
		sound:Stop()
		sound:Destroy()
	end
end

if settings.UseGlobalBackgroundMusic == true and settings.UseMusicZones == false then
	if #music[globali] == 1 then --global BGM with just 1 song? ez pz
		PlaySound(music[1][1])
		return
	elseif #music[globali] == 0 then --there's no music to play...?
		return
	end
end

local recentindices = {} --keeps track of recently selected indicies, so as not to play repeat music tracks
math.randomseed(tick())
local currentzone
local zoneplayingmusic

function CheckIfRecent(i)
	for _,v in pairs(recentindices) do
		if v == i then
			return true
		end
	end
	return false
end

function SelectRandomMusic(musiclist) --select a random number, excluding ones that were already used recently
	if musiclist == nil or #musiclist == 0 then return end
	local possiblenumbers = {}
	local selectedindex
	for i=1,#musiclist do
		if not CheckIfRecent(i) then
			table.insert(possiblenumbers,i)
		end
	end
	local selectedindex = possiblenumbers[math.random(1,#possiblenumbers)]
	table.insert(recentindices,selectedindex)
	if #recentindices > math.ceil(#musiclist / 2) then
		table.remove(recentindices,1)
	end
	return musiclist[selectedindex]
end

function IsInZone(zonedata)
	if torso and torso.Parent ~= nil then
		local p = torso.Position
		for _,data in pairs(zonedata["Parts"]) do
			if data["Coordinates"] then
				local t = data["Coordinates"]
				if (p.x > t.lx and p.x < t.mx and p.y > t.ly and p.y < t.my and p.z > t.lz and p.z < t.mz) then --is the character within all the coordinates of the zone?
					return true
				end
			elseif data["Part"] then --complex part? create a clone of the part and check if it's touching the character's torso
				local part = data["Part"]:clone()
				part.Anchored = true
				part.Parent = workspace.CurrentCamera or workspace
				part.CanCollide = true
				local touching = part:GetTouchingParts()
				part:Destroy()
				for _,v in pairs(touching) do
					if v == torso then
						return true
					end
				end
			end
		end
		return false
	end
end

function CalculateCurrentZone()
	local priority = -math.huge
	local oldzone = currentzone
	local selectedzone
	if currentzone then
		if IsInZone(currentzone) then
			selectedzone = currentzone
			priority = currentzone["Priority"]
		end
	end
	for _,zone in pairs(zones) do
		if zone["Priority"] > priority and IsInZone(zone) then
			priority = zone["Priority"]
			selectedzone = zone
		end
	end
	currentzone = selectedzone
	if currentzone ~= oldzone and (currentzone ~= nil or settings.UseGlobalBackgroundMusic == true) then
		recentindices = {}
	end
	return currentzone,oldzone
end

function RunCycle() --the main cycle which will continuously run, checking which zones (if any) the character is in and playing new music when necessary
	local bgm = script:FindFirstChild("BGM")
	if settings.UseMusicZones == true then
		local zone,oldzone = CalculateCurrentZone()
		if zone ~= oldzone and zone ~= zoneplayingmusic and bgm then
			if (zone == nil and (settings.UseGlobalBackgroundMusic == true or settings.MusicOnlyPlaysWithinZones == true)) or zone ~= nil then
				FadeOutSound(bgm)
				return
			end
		elseif zone and bgm == nil then
			PlaySound(SelectRandomMusic(zone["Music"]))
			zoneplayingmusic = zone
			return
		elseif zone == nil and oldzone and settings.MusicOnlyPlaysWithinZones == false and settings.UseGlobalBackgroundMusic == false and bgm == nil then
			PlaySound(SelectRandomMusic(oldzone["Music"]))
			zoneplayingmusic = oldzone
			return
		elseif zoneplayingmusic and settings.MusicOnlyPlaysWithinZones == false and settings.UseGlobalBackgroundMusic == false and bgm == nil then
			PlaySound(SelectRandomMusic(zoneplayingmusic["Music"]))
			return
		elseif settings.UseGlobalBackgroundMusic == true and bgm == nil then
			PlaySound(SelectRandomMusic(music[globali]))
			zoneplayingmusic = nil
			return
		end
	elseif bgm == nil and settings.UseGlobalBackgroundMusic == true then
		PlaySound(SelectRandomMusic(music[globali]))
		return
	end

	if bgm and (settings.UseGlobalBackgroundMusic == true and zoneplayingmusic == nil and #music[globali] > 1) or (zoneplayingmusic and #zoneplayingmusic["Music"] > 1) then
		local length = bgm.TimeLength
		local pos = bgm.TimePosition
		if length ~= 0 and length - pos < FadeoutTime + .5 then
			FadeOutSound(bgm)
		end
	end
end

while wait(.5) do
	RunCycle()
end


Prompt: --mute button stuff

Response:
local canmute = settings.DisplayMuteButton
local clonegui
if canmute then
	clonegui = script.MuteButtonGui:clone()
end
script.MuteButtonGui:Destroy()

local musicon = true

function SetButtonStyle(button)
	button.Text = "Music: ".. (musicon and "ON" or "OFF")
	button.Style = musicon and Enum.ButtonStyle.RobloxRoundDefaultButton or Enum.ButtonStyle.RobloxRoundDropdownButton
	button.TextColor3 = musicon and Color3.new(1,1,1) or Color3.new(.2,.2,.23)
end

function CreateButton()
	local gui = clonegui:clone()
	local button = gui.Button
	button.Visible = true
	SetButtonStyle(button)
	button.MouseButton1Click:connect(function()
		musicon = not musicon
		local bgm = script:FindFirstChild("BGM")
		if bgm then
			bgm.Volume = musicon and bgm.OriginalVolume.Value or 0
		end
		SetButtonStyle(button)
	end)
	gui.Parent = plr:WaitForChild("PlayerGui")
end

function CharInit()
	char = plr.Character
	torso = char:WaitForChild("HumanoidRootPart")
	if canmute then CreateButton() end
end

if plr.Character and plr.Character.Parent ~= nil then
	CharInit()
end
plr.CharacterAdded:connect(function()
	CharInit()
end)


Prompt:
-- Signal:Fire(...) implemented by running the handler functions on the
-- coRunnerThread, and any time the resulting thread yielded without returning
-- to us, that means that it yielded to the Roblox scheduler and has been taken
-- over by Roblox scheduling, meaning we have to make a new coroutine runner.

Response:
function Signal.Fire(self: ClassType, ...: any?)
	local item = self._handlerListHead
	while item do
		if item._connected then
			if not freeRunnerThread then
				freeRunnerThread = coroutine.create(runEventHandlerInFreeThread)
			end
			task.spawn(freeRunnerThread :: thread, item._fn, ...)
		end
		item = item._next
	end
end


Prompt: -- Decompiled with the Synapse X Luau decompiler.

Response:
local v1 = {};
local l__ReplicatedStorage__2 = game.ReplicatedStorage;
local v3 = require(game.ReplicatedStorage.Modules.Lightning);
local v4 = require(game.ReplicatedStorage.Modules.Xeno);
local l__TweenService__5 = game.TweenService;
local l__Debris__6 = game.Debris;
local u1 = require(game.ReplicatedStorage.Modules.CameraShaker);
function v1.RunStompFx(p1, p2, p3, p4)
	local v7 = game.ReplicatedStorage.KillFX.Tonka.Bell:Clone();
	v7:PivotTo(CFrame.new(p2.Position));
	wait(2);
	v7.VFX.Sound:Play();
	v7.Parent = workspace.Ignored.Animations;
	local v8 = v7.AnimationController:LoadAnimation(v7.Animation);
	v8:Play(0.1, 1, 1);
	local u2 = nil;
	u2 = v8:GetMarkerReachedSignal("Spawn"):Connect(function()
		task.delay(0.45, function()
			v7.VFX.Attachment.Glow.Enabled = true;
			local u3 = 0;
			local u4 = nil;
			u4 = v8:GetMarkerReachedSignal("Ring"):Connect(function()
				u3 = u3 + 1;
				for v9 = 1, 8 do
					local v10 = game.ReplicatedStorage.KillFX.Tonka.ColorCorrection:Clone();
					v10.Parent = game.Lighting;
					game.TweenService:Create(v10, TweenInfo.new(1), {
						TintColor = Color3.fromRGB(255, 255, 255),
						Brightness = 0,
						Contrast = 0,
						Saturation = 0
					}):Play();
					game.Debris:AddItem(v10, 1);
				end;
				local v11 = u1.new(Enum.RenderPriority.Camera.Value, function(p5)
					workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame * p5;
				end);
				v11:Start();
				v11:Shake(u1.Presets.Bump);
				local v12 = v7.VFX.Attachment:Clone();
				v12.Parent = workspace.Terrain;
				v12.WorldPosition = (v7.RootPart.Chain.Bell.DingDong.TransformedWorldCFrame * CFrame.new(0, 6, 0)).Position;
				game.Debris:AddItem(v12, 2);
				v12.ParticleEmitter.Enabled = true;
				task.delay(0.25, function()
					v12.ParticleEmitter.Enabled = false;
				end);
				v7.VFX.Sound.Volume = 2;
				task.delay(0.25, function()
					v7.VFX.Sound.Volume = 1;
				end);
				if u3 == 3 then
					return;
				end;
				if u3 == 5 then
					v7.VFX.Attachment.Glow.Enabled = false;
					game.TweenService:Create(v7.VFX.Sound, TweenInfo.new(2, Enum.EasingStyle.Exponential), {
						Volume = 0
					}):Play();
					for v13, v14 in pairs(v7:GetDescendants()) do
						if v14:IsA("MeshPart") then
							game.TweenService:Create(v14, TweenInfo.new(2, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut), {
								Transparency = 1,
								Reflectance = 0
							}):Play();
						elseif v14:IsA("Beam") then
							game.TweenService:Create(v14, TweenInfo.new(3, Enum.EasingStyle.Exponential), {
								Width1 = 0,
								Width0 = 0
							}):Play();
						end;
					end;
					u4:Disconnect();
				end;
			end);
			u2:Disconnect();
			for v15, v16 in pairs(v7:GetDescendants()) do
				if v16:IsA("MeshPart") then
					game.TweenService:Create(v16, TweenInfo.new(2, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut), {
						Transparency = 0
					}):Play();
				elseif v16:IsA("Beam") then
					game.TweenService:Create(v16, TweenInfo.new(3, Enum.EasingStyle.Exponential), {
						Width1 = 50,
						Width0 = 50
					}):Play();
				end;
			end;
			local u5 = nil;
			local u6 = 0;
			u5 = game["Run Service"].RenderStepped:Connect(function()
				if v7.Parent == nil then
					u5:Disconnect();
				else
					v7.VFX.CFrame = v7.RootPart.Chain.Bell.TransformedWorldCFrame * CFrame.new(0, 10, 0) * CFrame.Angles(math.rad(u6), 0, math.rad(u6));
					v7.VFX1.CFrame = v7.RootPart.Chain.Bell.TransformedWorldCFrame * CFrame.new(0, 10, 0) * CFrame.Angles(math.rad(-u6), math.rad(-u6), 0);
				end;
				u6 = u6 + 2.5;
			end);
		end);
	end);
	return nil;
end;
return v1;


Prompt:
--[[

	TableUtil.Copy(Table tbl)
	TableUtil.Sync(Table tbl, Table templateTbl)
	TableUtil.Print(Table tbl, String label, Boolean deepPrint)
	TableUtil.FastRemove(Table tbl, Number index)
	TableUtil.FastRemoveFirstValue(Table tbl, Variant value)
	TableUtil.Map(Table tbl, Function callback)
	TableUtil.Filter(Table tbl, Function callback)
	TableUtil.Reduce(Table tbl, Function callback [, Number initialValue])
	TableUtil.IndexOf(Table tbl, Variant item)
	TableUtil.Reverse(Table tbl)
	TableUtil.Shuffle(Table tbl)
	TableUtil.IsEmpty(Table tbl)
	TableUtil.EncodeJSON(Table tbl)
	TableUtil.DecodeJSON(String json)

	EXAMPLES:

		Copy:

			Performs a deep copy of the given table.

			local tbl = {"a", "b", "c"}
			local tblCopy = TableUtil.Copy(tbl)

		Sync:

			Synchronizes a table to a template table. If the table does not have an
			item that exists within the template, it gets added. If the table has
			something that the template does not have, it gets removed.

			local tbl1 = {kills = 0; deaths = 0; points = 0}
			local tbl2 = {points = 0}
			TableUtil.Sync(tbl2, tbl1)  -- In words: "Synchronize table2 to table1"
			print(tbl2.deaths)

		Print:

			Prints out the table to the output in an easy-to-read format. Good for
			debugging tables. If deep printing, avoid cyclical references.

			local tbl = {a = 32; b = 64; c = 128; d = {x = 0; y = 1; z = 2}}
			TableUtil.Print(tbl, "My Table", true)

		FastRemove:

			Removes an item from an array at a given index. Only use this if you do
			NOT care about the order of your array. This works by simply popping the
			last item in the array and overwriting the given index with the last
			item. This is O(1), compared to table.remove's O(n) speed.

			local tbl = {"hello", "there", "this", "is", "a", "test"}
			TableUtil.FastRemove(tbl, 2)   -- Remove "there" in the array
			print(table.concat(tbl, " "))  -- > hello this is a test

		FastRemoveFirstValue:

			Calls FastRemove on the first index that holds the given value.

			local tbl = {"abc", "hello", "hi", "goodbye", "hello", "hey"}
			local removed, atIndex = TableUtil.FastRemoveFirstValue(tbl, "hello")
			if (removed) then
				print("Removed at index " .. atIndex)
				print(table.concat(tbl, " "))  -- > abc hi goodbye hello hey
			else
				print("Did not find value")
			end

		Map:

			This allows you to construct a new table by calling the given function
			on each item in the table.

			local peopleData = {
				{firstName = "Bob"; lastName = "Smith"};
				{firstName = "John"; lastName = "Doe"};
				{firstName = "Jane"; lastName = "Doe"};
			}

			local people = TableUtil.Map(peopleData, function(item)
				return {Name = item.firstName .. " " .. item.lastName}
			end)

			-- 'people' is now an array that looks like: { {Name = "Bob Smith"}; ... }

		Filter:

			This allows you to create a table based on the given table and a filter
			function. If the function returns 'true', the item remains in the new
			table; if the function returns 'false', the item is discluded from the
			new table.

			local people = {
				{Name = "Bob Smith"; Age = 42};
				{Name = "John Doe"; Age = 34};
				{Name = "Jane Doe"; Age = 37};
			}

			local peopleUnderForty = TableUtil.Filter(people, function(item)
				return item.Age < 40
			end)

		Reduce:

			This allows you to reduce an array to a single value. Useful for quickly
			summing up an array.

			local tbl = {40, 32, 9, 5, 44}
			local tblSum = TableUtil.Reduce(tbl, function(accumulator, value)
				return accumulator + value
			end)
			print(tblSum)  -- > 130

		IndexOf:

			Returns the index of the given item in the table. If not found, this
			will return nil.

			local tbl = {"Hello", 32, true, "abc"}
			local abcIndex = TableUtil.IndexOf("abc")     -- > 4
			local helloIndex = TableUtil.IndexOf("Hello") -- > 1
			local numberIndex = TableUtil.IndexOf(64)     -- > nil

		Reverse:

			Creates a reversed version of the array. Note: This is a shallow
			copy, so existing references will remain within the new table.

			local tbl = {2, 4, 6, 8}
			local rblReversed = TableUtil.Reverse(tbl)  -- > {8, 6, 4, 2}

		Shuffle:

			Shuffles (i.e. randomizes) an array. This uses the Fisher-Yates algorithm.

			local tbl = {1, 2, 3, 4, 5, 6, 7, 8, 9}
			TableUtil.Shuffle(tbl)
			print(table.concat(tbl, ", "))  -- e.g. > 3, 6, 9, 2, 8, 4, 1, 7, 5

--]]

Response:
local TableUtil = {}

local http = game:GetService("HttpService")

local function CopyTable(t)
	assert(type(t) == "table", "First argument must be a table")
	local tCopy = {}
	for k,v in pairs(t) do
		if (type(v) == "table") then
			tCopy[k] = CopyTable(v)
		else
			tCopy[k] = v
		end
	end
	return tCopy
end

local function Sync(tbl, templateTbl)

	assert(type(tbl) == "table", "First argument must be a table")
	assert(type(templateTbl) == "table", "Second argument must be a table")

	-- If 'tbl' has something 'templateTbl' doesn't, then remove it from 'tbl'
	-- If 'tbl' has something of a different type than 'templateTbl', copy from 'templateTbl'
	-- If 'templateTbl' has something 'tbl' doesn't, then add it to 'tbl'
	for k,v in pairs(tbl) do

		local vTemplate = templateTbl[k]

		-- Remove keys not within template:
		if (vTemplate == nil) then
			tbl[k] = nil

		-- Synchronize data types:
		elseif (type(v) ~= type(vTemplate)) then
			if (type(vTemplate) == "table") then
				tbl[k] = CopyTable(vTemplate)
			else
				tbl[k] = vTemplate
			end

		-- Synchronize sub-tables:
		elseif (type(v) == "table") then
			Sync(v, vTemplate)
		end

	end

	-- Add any missing keys:
	for k,vTemplate in pairs(templateTbl) do

		local v = tbl[k]

		if (v == nil) then
			if (type(vTemplate) == "table") then
				tbl[k] = CopyTable(vTemplate)
			else
				tbl[k] = vTemplate
			end
		end

	end

end

local function FastRemove(t, i)
	local n = #t
	t[i] = t[n]
	t[n] = nil
end

local function Map(t, f)
	assert(type(t) == "table", "First argument must be a table")
	assert(type(f) == "function", "Second argument must be an array")
	local newT = {}
	for k,v in pairs(t) do
		newT[k] = f(v, k, t)
	end
	return newT
end

local function Filter(t, f)
	assert(type(t) == "table", "First argument must be a table")
	assert(type(f) == "function", "Second argument must be an array")
	local newT = {}
	if (#t > 0) then
		local n = 0
		for i = 1,#t do
			local v = t[i]
			if (f(v, i, t)) then
				n = (n + 1)
				newT[n] = v
			end
		end
	else
		for k,v in pairs(t) do
			if (f(v, k, t)) then
				newT[k] = v
			end
		end
	end
	return newT
end

local function Reduce(t, f, init)
	assert(type(t) == "table", "First argument must be a table")
	assert(type(f) == "function", "Second argument must be an array")
	assert(init == nil or type(init) == "number", "Third argument must be a number or nil")
	local result = (init or 0)
	for k,v in pairs(t) do
		result = f(result, v, k, t)
	end
	return result
end

local function Print(tbl, label, deepPrint)

	assert(type(tbl) == "table", "First argument must be a table")
	assert(label == nil or type(label) == "string", "Second argument must be a string or nil")

	label = (label or "TABLE")

	local strTbl = {}
	local indent = " - "

	-- Insert(string, indentLevel)
	local function Insert(s, l)
		strTbl[#strTbl + 1] = (indent:rep(l) .. s .. "\n")
	end

	local function AlphaKeySort(a, b)
		return (tostring(a.k) < tostring(b.k))
	end

	local function PrintTable(t, lvl, lbl)
		Insert(lbl .. ":", lvl - 1)
		local nonTbls = {}
		local tbls = {}
		local keySpaces = 0
		for k,v in pairs(t) do
			if (type(v) == "table") then
				table.insert(tbls, {k = k, v = v})
			else
				table.insert(nonTbls, {k = k, v = "[" .. typeof(v) .. "] " .. tostring(v)})
			end
			local spaces = #tostring(k) + 1
			if (spaces > keySpaces) then
				keySpaces = spaces
			end
		end
		table.sort(nonTbls, AlphaKeySort)
		table.sort(tbls, AlphaKeySort)
		for _,v in pairs(nonTbls) do
			Insert(tostring(v.k) .. ":" .. (" "):rep(keySpaces - #tostring(v.k)) .. v.v, lvl)
		end
		if (deepPrint) then
			for _,v in pairs(tbls) do
				PrintTable(v.v, lvl + 1, tostring(v.k) .. (" "):rep(keySpaces - #tostring(v.k)) .. " [Table]")
			end
		else
			for _,v in pairs(tbls) do
				Insert(tostring(v.k) .. ":" .. (" "):rep(keySpaces - #tostring(v.k)) .. "[Table]", lvl)
			end
		end
	end

	PrintTable(tbl, 1, label)

	print(table.concat(strTbl, ""))

end

local function IndexOf(tbl, item)
	for i = 1,#tbl do
		if (tbl[i] == item) then
			return i
		end
	end
	return nil
end

local function Reverse(tbl)
	local tblRev = {}
	local n = #tbl
	for i = 1,n do
		tblRev[i] = tbl[n - i + 1]
	end
	return tblRev
end

local function Shuffle(tbl)
	assert(type(tbl) == "table", "First argument must be a table")
	for i = #tbl, 2, -1 do
		local j = math.random(i)
		tbl[i], tbl[j] = tbl[j], tbl[i]
	end
end

local function IsEmpty(tbl)
	return (next(tbl) == nil)
end

local function EncodeJSON(tbl)
	return http:JSONEncode(tbl)
end

local function DecodeJSON(str)
	return http:JSONDecode(str)
end

local function FastRemoveFirstValue(t, v)
	local index = IndexOf(t, v)
	if (index) then
		FastRemove(t, index)
		return true, index
	end
	return false, nil
end

TableUtil.Copy = CopyTable
TableUtil.Sync = Sync
TableUtil.FastRemove = FastRemove
TableUtil.FastRemoveFirstValue = FastRemoveFirstValue
TableUtil.Print = Print
TableUtil.Map = Map
TableUtil.Filter = Filter
TableUtil.Reduce = Reduce
TableUtil.IndexOf = IndexOf
TableUtil.Reverse = Reverse
TableUtil.Shuffle = Shuffle
TableUtil.IsEmpty = IsEmpty
TableUtil.EncodeJSON = EncodeJSON
TableUtil.DecodeJSON = DecodeJSON

return TableUtil


Prompt: -- Keyboard controller is really keyboard and mouse controller

Response:
local computerInputTypeToModuleMap = {
	[Enum.UserInputType.Keyboard] = Keyboard,
	[Enum.UserInputType.MouseButton1] = Keyboard,
	[Enum.UserInputType.MouseButton2] = Keyboard,
	[Enum.UserInputType.MouseButton3] = Keyboard,
	[Enum.UserInputType.MouseWheel] = Keyboard,
	[Enum.UserInputType.MouseMovement] = Keyboard,
	[Enum.UserInputType.Gamepad1] = Gamepad,
	[Enum.UserInputType.Gamepad2] = Gamepad,
	[Enum.UserInputType.Gamepad3] = Gamepad,
	[Enum.UserInputType.Gamepad4] = Gamepad,
}

local lastInputType

function ControlModule.new()
	local self = setmetatable({},ControlModule)

	-- The Modules above are used to construct controller instances as-needed, and this
	-- table is a map from Module to the instance created from it
	self.controllers = {}

	self.activeControlModule = nil	-- Used to prevent unnecessarily expensive checks on each input event
	self.activeController = nil
	self.touchJumpController = nil
	self.moveFunction = Players.LocalPlayer.Move
	self.humanoid = nil
	self.lastInputType = Enum.UserInputType.None

	-- For Roblox self.vehicleController
	self.humanoidSeatedConn = nil
	self.vehicleController = nil

	self.touchControlFrame = nil

	self.vehicleController = VehicleController.new(CONTROL_ACTION_PRIORITY)

	Players.LocalPlayer.CharacterAdded:Connect(function(char) self:OnCharacterAdded(char) end)
	Players.LocalPlayer.CharacterRemoving:Connect(function(char) self:OnCharacterRemoving(char) end)
	if Players.LocalPlayer.Character then
		self:OnCharacterAdded(Players.LocalPlayer.Character)
	end

	RunService:BindToRenderStep("ControlScriptRenderstep", Enum.RenderPriority.Input.Value, function(dt)
		self:OnRenderStepped(dt)
	end)

	UserInputService.LastInputTypeChanged:Connect(function(newLastInputType)
		self:OnLastInputTypeChanged(newLastInputType)
	end)

	UserGameSettings:GetPropertyChangedSignal("TouchMovementMode"):Connect(function()
		self:OnTouchMovementModeChange()
	end)
	Players.LocalPlayer:GetPropertyChangedSignal("DevTouchMovementMode"):Connect(function()
		self:OnTouchMovementModeChange()
	end)

	UserGameSettings:GetPropertyChangedSignal("ComputerMovementMode"):Connect(function()
		self:OnComputerMovementModeChange()
	end)
	Players.LocalPlayer:GetPropertyChangedSignal("DevComputerMovementMode"):Connect(function()
		self:OnComputerMovementModeChange()
	end)

	--[[ Touch Device UI ]]--
	self.playerGui = nil
	self.touchGui = nil
	self.playerGuiAddedConn = nil

	if UserInputService.TouchEnabled then
		self.playerGui = Players.LocalPlayer:FindFirstChildOfClass("PlayerGui")
		if self.playerGui then
			self:CreateTouchGuiContainer()
			self:OnLastInputTypeChanged(UserInputService:GetLastInputType())
		else
			self.playerGuiAddedConn = Players.LocalPlayer.ChildAdded:Connect(function(child)
				if child:IsA("PlayerGui") then
					self.playerGui = child
					self:CreateTouchGuiContainer()
					self.playerGuiAddedConn:Disconnect()
					self.playerGuiAddedConn = nil
					self:OnLastInputTypeChanged(UserInputService:GetLastInputType())
				end
			end)
		end
	else
		self:OnLastInputTypeChanged(UserInputService:GetLastInputType())
	end

	return self
end


Prompt: -- When key released

Response:
function onKeyUp(key)
	if key == nil then return end
	key = key:lower()

	-- Stop firing MG
	if key == 'f' then
		firingMg = false;
	end
end
script.Parent.Equipped:connect(onSelected)
script.Parent.Unequipped:connect(onDeselected)


Prompt: -- Initialize the core

Response: local Core = require(Tool:WaitForChild 'Core');