Prompt: --// Functions

Response:
function MakeFakeArms()
	Arms = Instance.new("Model")
	Arms.Name = "Arms"
	Arms.Parent = L_5_

	local L_158_ = Instance.new("Humanoid")
	L_158_.MaxHealth = 0
	L_158_.Health = 0
	L_158_.Name = ""
	L_158_.Parent = Arms

	if L_3_:FindFirstChild("Shirt") then
		local L_163_ = L_3_:FindFirstChild("Shirt"):clone()
		L_163_.Parent = Arms
	end

	local L_159_ = L_3_:FindFirstChild("Right Arm"):clone()
	for L_164_forvar1, L_165_forvar2 in pairs(L_159_:GetChildren()) do
		if L_165_forvar2:IsA('Motor6D') then
			L_165_forvar2:Destroy()
		end
	end
	L_159_.Name = "Right Arm"
	L_159_.FormFactor = "Custom"
	L_159_.Size = Vector3.new(0.8, 2.5, 0.8)
	L_159_.Transparency = 0.0

	local L_160_ = Instance.new("Motor6D")
	L_160_.Part0 = L_159_
	L_160_.Part1 = L_3_:FindFirstChild("Right Arm")
	L_160_.C0 = CFrame.new()
	L_160_.C1 = CFrame.new()
	L_160_.Parent = L_159_
	L_159_.Parent = Arms

	local L_161_ = L_3_:FindFirstChild("Left Arm"):clone()
	L_161_.Name = "Left Arm"
	L_161_.FormFactor = "Custom"
	L_161_.Size = Vector3.new(0.8, 2.5, 0.8)
	L_161_.Transparency = 0.0

	local L_162_ = Instance.new("Motor6D")
	L_162_.Part0 = L_161_
	L_162_.Part1 = L_3_:FindFirstChild("Left Arm")
	L_162_.C0 = CFrame.new()
	L_162_.C1 = CFrame.new()
	L_162_.Parent = L_161_
	L_161_.Parent = Arms
end

function RemoveArmModel()
	if Arms then
		Arms:Destroy()
		Arms = nil
	end
end

local L_121_

function CreateShell()
	L_121_ = time()
	local L_166_ = L_1_.Shell:clone()
	if L_166_:FindFirstChild('Shell') then
		L_166_.Shell:Destroy()
	end
	L_166_.CFrame =  L_1_.Chamber.CFrame
	L_166_.Velocity = L_1_.Chamber.CFrame.lookVector * 30 + Vector3.new(0, 4, 0)
	--shell.RotVelocity = Vector3.new(-10,40,30)
	L_166_.Parent = L_90_
	L_166_.CanCollide = false
	game:GetService("Debris"):addItem(L_166_, 1)
end


Prompt: -- Add script when player is added

Response:
game.Players.PlayerAdded:connect(addScriptAtRespawn)

local MyHook = script.Parent["Chain Hook"]
local Remote = script.Parent.RemoteEvent
local Bindable = MyHook.Talker
local Coupled = script.Parent.Coupled
local Rotator = script.Parent.Rotator.Rotator

function weld(i,j)
	local weld1 = Instance.new("Weld")
	weld1.Name = j.Name
	weld1.Part0 = i
	weld1.Part1 = j
	weld1.C1 = j.CFrame:inverse()*i.CFrame
	weld1.Parent = j
end

function SetupDecouple(chain)
	if chain.Parent then
		Coupled.Value = true
		local b
		local a
		a = chain.AncestryChanged:connect(function(_,newpar)
			if not newpar then
				Coupled.Value = false
				a:disconnect()
				b:disconnect()
			end
		end)
		b = chain.ChildRemoved:connect(function()
			Coupled.Value = false
			a:disconnect()
			b:disconnect()
			wait()
			chain:Destroy()
		end)
	end
end

Bindable.Event:connect(function(data)
	if data["Chain"] then
		SetupDecouple(data["Chain"])
	end
end)

function couple(hook1,hook2)
	if hook1.Velocity.magnitude > 0.5 or hook2.Velocity.magnitude > 0.5 then
		return false
	end
	if (hook1.Position-hook2.Position).magnitude > 5 and (hook1.Position-hook2.Position).magnitude < 3 then
		return false
	end
	local chain = Instance.new("RopeConstraint")
	chain.Attachment0 = hook1.Attachment
	chain.Attachment1 = hook2.Attachment
	chain.Color = BrickColor.new("Flint")
	chain.Thickness = 0.2
	chain.Parent = Workspace
	chain.Visible = true
	chain.Name = "Chain Link Coupler"
	chain.Length = (hook1.Position-hook2.Position.magnitude)
	script.Decouple:Clone().Parent = chain
	return true
end

Remote.OnServerEvent:connect(function(player,data)
	if data["Connect this"] and data["Connect this"].Name == "Chain Hook" and data["Connect this"] ~= MyHook and not Coupled.Value and not data["Connect this"].Parent.Coupled.Value then
		couple(MyHook,data["Connect this"])
	end
end)


Response:
function findAllFlagStands(root)
	local c = root:children()
	for i=1,#c do
		if (c[i].className == "Model" or c[i].className == "Part") then
			findAllFlagStands(c[i])
		end
		if (c[i].className == "FlagStand") then
			table.insert(stands, c[i])
		end
	end
end

function hookUpListeners()
	for i=1,#stands do
		stands[i].FlagCaptured:connect(onCaptureScored)
	end
end

function onPlayerEntered(newPlayer)

	if CTF_mode == true then

		local stats = Instance.new("IntValue")
		stats.Name = "leaderstats"

		local captures = Instance.new("IntValue")
		captures.Name = "Captures"
		captures.Value = 0

		captures.Parent = stats

		-- VERY UGLY HACK
		-- Will this leak threads?
		-- Is the problem even what I think it is (player arrived before character)?
		while true do
			if newPlayer.Character ~= nil then break end
			wait(5)
		end

		stats.Parent = newPlayer

	else

		local stats = Instance.new("IntValue")
		stats.Name = "leaderstats"
		local kills = false
		if Settings.LeaderboardSettings.KOs then
			kills = Instance.new("IntValue")
			kills.Name = Settings.LeaderboardSettings.KillsName
			kills.Value = 0
		end
		local deaths = false
		if Settings.LeaderboardSettings.WOs then
			deaths = Instance.new("IntValue")
			deaths.Name = Settings.LeaderboardSettings.DeathsName
			deaths.Value = 0
		end

		local Cash = false
		if Settings.LeaderboardSettings.ShowCurrency then
			Cash = Instance.new("StringValue")
			Cash.Name = Settings.CurrencyName
			Cash.Value = 0
		end

		local PlayerStats = game.ServerStorage.PlayerMoney:FindFirstChild(newPlayer.Name)
		if PlayerStats ~= nil then
			if Cash then
				local Short = Settings.LeaderboardSettings.ShowShortCurrency
				PlayerStats.Changed:connect(function()
					if (Short) then
						Cash.Value = Settings:ConvertShort(PlayerStats.Value)
					else
						Cash.Value = Settings:ConvertComma(PlayerStats.Value)
					end
				end)
			end
		end
		if kills then
		kills.Parent = stats
		end
		if deaths then
		deaths.Parent = stats
		end
		if Cash then
		cash.Parent = stats
		end

		-- VERY UGLY HACK
		-- Will this leak threads?
		-- Is the problem even what I think it is (player arrived before character)?
		while true do
			if newPlayer.Character ~= nil then break end
			wait(5)
		end

		local humanoid = newPlayer.Character.Humanoid

		humanoid.Died:connect(function() onHumanoidDied(humanoid, newPlayer) end )

		-- start to listen for new humanoid
		newPlayer.Changed:connect(function(property) onPlayerRespawn(property, newPlayer) end )

		stats.Parent = newPlayer

	end

end

function onCaptureScored(player)

		local ls = player:findFirstChild("leaderstats")
		if ls == nil then return end
		local caps = ls:findFirstChild("Captures")
		if caps == nil then return end
		caps.Value = caps.Value + 1

end

findAllFlagStands(game.Workspace)
hookUpListeners()
if (#stands > 0) then CTF_mode = true end
game.Players.ChildAdded:connect(onPlayerEntered)


Prompt: --// Handling Settings

Response:
	Firerate = 60 / 780; -- 60 = 1 Minute, 700 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!

	FireMode = 2; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive


Prompt:
--[[
    Chooses between the different GuiTypes that the emotes can be displayed in
]]

Response:
local Roact = require(script.Parent.Parent.Packages.Roact)
local t = require(script.Parent.Parent.Packages.t)
local clientConfig = require(script.Parent.Parent.clientConfig)
local ConfigurationContext = require(script.Parent.Parent.Packages.Configuration).ConfigurationContext
local enums = require(script.Parent.Parent.enums)
local EmoteBarScreen = require(script.Parent.EmoteBarScreen)
local EmoteWheelBillboard = require(script.Parent.EmoteWheelBillboard)

local EmoteView = Roact.Component:extend("EmoteView")

EmoteView.defaultProps = {
	isVisible = true,
	forceHide = false,
}

EmoteView.validateProps = t.strictInterface({
	forceHide = t.boolean,
	isVisible = t.boolean,
	configuration = clientConfig.validate,
})

function EmoteView:render()
	local guiType = self.props.configuration.guiType

	if guiType == enums.GuiType.EmoteWheel then
		return Roact.createElement(EmoteWheelBillboard, {
			isVisible = self.props.isVisible,
		})
	else
		return Roact.createElement(EmoteBarScreen, {
			isVisible = self.props.isVisible and not self.props.forceHide,
		})
	end
end

return ConfigurationContext.withConfiguration(EmoteView)


Response:
local tool = script.Parent
local player = game.Players.LocalPlayer
while player.Character == nil do wait() end
local char = player.Character
while char:FindFirstChild("Humanoid") == nil do wait() end
local hum = char:FindFirstChild("Humanoid")

local enabled = true
local equipped = false
local ischarging = true
tool.Selected:connect(function(mouse)
	equipped = true
	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function()
		if not enabled then return end
		if hum == nil then return end
		if hum.Health <= 0 then return end
		if mouse == nil then return end
		if ischarging then
			if mouse.Hit ~= nil then
				ischarging = false
				enabled = false
				script.Parent.ReleaseProjectile:FireServer(mouse.Hit.p)
				mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
				wait(RELOAD_TIME)
				mouse.Icon = "rbxasset://textures\\GunCursor.png"
				enabled = true
				ischarging = true
			end
		end
	end)
end)

tool.Deselected:connect(function(mouse)
	equipped = false
end)


Prompt:
--JSON Encoder and Parser for Lua 5.1
--
--Copyright 2007 Shaun Brown  (http://www.chipmunkav.com)
--All Rights Reserved.


Prompt:
--[[local debounce = false
function onClicked(click)
	if debounce == false then
	debounce = true
	if script.Parent.Parent.Frame.Visible == false then
		print("open")
	script.Parent.Parent.Frame.Visible = true
	tweenmenu:Play()
	wait(1)
	debounce = false
		else
		print("close")
	tweenmenuclose:Play()
	wait(0.5)
	script.Parent.Parent.Frame.Visible = false
	debounce = false
	end
	end
end
script.Parent.MouseButton1Down:connect(onClicked)]]

Response:
function onClicked(click)
	--tweenb:Play()
	--tweenb2:Play()
	script.Parent.Parent.Parent.Enabled = false
	script.Parent.Parent.Parent.Parent.Building.Enabled = true
end
script.Parent.MouseButton1Down:connect(onClicked)


Prompt:
--[[ Use the following script to program your on/off switch to do stuff. This can mean opening and closing a door, turning on and off lights, anything!
Just put what you want the button to do while on/off below.]]

Response:
Room = script.Parent

function on() --Type below what you want the button to do while it is on.
Room.L1.SpotLight.Enabled = true
Room.L2.SpotLight.Enabled = true
end

function off() --Type below what you want the button to do while it is off.
Room.L1.SpotLight.Enabled = false
Room.L2.SpotLight.Enabled = false
end


Prompt: --TABS

Response:
function activedeactive(thing, val)
	for _,i in pairs (thing:GetChildren()) do
		if i:IsA("ImageButton") or i:IsA("TextButton") then
			if i.Name ~= "header" then
				i.Active = val
			end
		end
	end
end

lights.header.MouseButton1Click:connect(function()
	if curtab ~= 3 then
		curtab = 3
		lights:TweenPosition(UDim2.new(0, -8, 0, 150), "Out", "Quad", 0.5, true)
		siren:TweenPosition(UDim2.new(0, -8, 0, 230), "Out", "Quad", 0.5, true)
		seats:TweenPosition(UDim2.new(0, -8, 0, 310), "Out", "Quad", 0.5, true)
		activedeactive(lights,true)
		activedeactive(siren,false)
		activedeactive(seats,false)
	else
		curtab = 0
		lights:TweenPosition(UDim2.new(0, -8, 0, 150), "Out", "Quad", 0.5, true)
		siren:TweenPosition(UDim2.new(0, -8, 0, 230), "Out", "Quad", 0.5, true)
		seats:TweenPosition(UDim2.new(0, -8, 0, 310), "Out", "Quad", 0.5, true)
	end
end)
siren.header.MouseButton1Click:connect(function()
	if curtab ~= 2 then
		curtab = 2
		lights:TweenPosition(UDim2.new(0, -8, 0, 150), "Out", "Quad", 0.5, true)
		siren:TweenPosition(UDim2.new(0, -8, 0, 230), "Out", "Quad", 0.5, true)
		seats:TweenPosition(UDim2.new(0, -8, 0, 310), "Out", "Quad", 0.5, true)
		activedeactive(lights,false)
		activedeactive(siren,true)
		activedeactive(seats,false)
	else
		curtab = 0
		lights:TweenPosition(UDim2.new(0, -8, 0, 150), "Out", "Quad", 0.5, true)
		siren:TweenPosition(UDim2.new(0, -8, 0, 230), "Out", "Quad", 0.5, true)
		seats:TweenPosition(UDim2.new(0, -8, 0, 310), "Out", "Quad", 0.5, true)
	end
end)
seats.header.MouseButton1Click:connect(function()
	if curtab ~= 1 then
		curtab = 1
		lights:TweenPosition(UDim2.new(0, -8, 0, 150), "Out", "Quad", 0.5, true)
		siren:TweenPosition(UDim2.new(0, -8, 0, 230), "Out", "Quad", 0.5, true)
		seats:TweenPosition(UDim2.new(0, -8, 0, 310), "Out", "Quad", 0.5, true)
		activedeactive(lights,false)
		activedeactive(siren,false)
		activedeactive(seats,true)
	else
		curtab = 0
		lights:TweenPosition(UDim2.new(0, -8, 0, 150), "Out", "Quad", 0.5, true)
		siren:TweenPosition(UDim2.new(0, -8, 0, 230), "Out", "Quad", 0.5, true)
		seats:TweenPosition(UDim2.new(0, -8, 0, 310), "Out", "Quad", 0.5, true)
	end
end)


Prompt: -- Also activate when the Action Button is pressed

Response:
local function OnChildAdded(child)
	if child.Name == 'ActionButtonData' then
		child.Changed:connect(function(newValue)
			local bindable = child:FindFirstChild('GetTargetPosition')
			if bindable and string.sub(newValue, 1, 1) == 'v' then
				local matches = {}
				for match in string.gmatch(newValue, '%d+%.?%d*') do
					table.insert(matches, match)
				end
				if #matches == 4 then
					local screenPosition = Vector2.new(matches[1], matches[2])
					local screenSize = Vector2.new(matches[3], matches[4])
					local targetPosition = bindable:Invoke(screenPosition, screenSize, {MyModel})
					OnActivated(targetPosition)
				end
			end
		end)
	end
end


Prompt: -- Initialize weld tool

Response:
local WeldTool = require(CoreTools.WeldTool)
Core.AssignHotkey('F', Core.Support.Call(Core.EquipTool, WeldTool));
Core.Dock.AddToolButton(Core.Assets.WeldIcon, 'F', WeldTool, 'WeldInfo');


Prompt: --//Server Animations

Response:
	RightHighReady = CFrame.new(-0.95, 0, .2) * CFrame.Angles(math.rad(-40), math.rad(0), math.rad(0));
	LeftHighReady = CFrame.new(0.6,0.9,-.3) * CFrame.Angles(math.rad(-140),math.rad(40),math.rad(15));

	RightLowReady = CFrame.new(-1, -0.2, -.15) * CFrame.Angles(math.rad(60), math.rad(0), math.rad(0));
	LeftLowReady = CFrame.new(.7,.2,.17) * CFrame.Angles(math.rad(-30),math.rad(35),math.rad(-25));

	RightPatrol = CFrame.new(-1, 0, -.25) * CFrame.Angles(math.rad(0), math.rad(-60), math.rad(0));
	LeftPatrol = CFrame.new(.5,.6,.35) * CFrame.Angles(math.rad(-80),math.rad(-30),math.rad(-10));

	RightAim = CFrame.new(-0.85, -0.2, .2) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0));
	LeftAim = CFrame.new(.5,-.1,.35) * CFrame.Angles(math.rad(-80),math.rad(30),math.rad(-10));

	RightSprint =  CFrame.new(-0.95, 0, .2) * CFrame.Angles(math.rad(-40), math.rad(0), math.rad(0));
	LeftSprint = CFrame.new(0.6,0.9,-.3) * CFrame.Angles(math.rad(-140),math.rad(40),math.rad(15));

	ShootPos = CFrame.new(0,0,.15);

}

return module


Prompt: --[[Dependencies]]

Response:
	local player = game.Players.LocalPlayer
	local mouse = player:GetMouse()
	local UserInputService = game:GetService("UserInputService")
	local car = script.Parent.Car.Value
	local _Tune = require(car["A-Chassis Tune"])


Prompt: -- Preload animations

Response:
function playAnimation(animName, transitionTime, humanoid)
	local idleFromEmote = (animName == "idle" and emoteNames[currentAnim] ~= nil)
	if (animName ~= currentAnim and not idleFromEmote) then

		if (currentAnimTrack ~= nil) then
			currentAnimTrack:Stop()
			currentAnimTrack:Destroy()
		end

		currentAnimSpeed = 1.0
		local roll = math.random(1, animTable[animName].totalWeight)
		local origRoll = roll
		local idx = 1
		while (roll > animTable[animName][idx].weight) do
			roll = roll - animTable[animName][idx].weight
			idx = idx + 1
		end


Prompt: --Set up tools equipped or input is done.

Response:
Character.ChildAdded:connect(function(Tool)
	if Tool:IsA("Tool") then
		RemoveForceField()
	end
end)

UserInputService.InputBegan:Connect(function(Input,Processed)
	if not Processed and Input.KeyCode ~= Enum.KeyCode.Unknown then
		RemoveForceField()
	end
end)

UserInputService.InputEnded:Connect(function(Input,Processed)
	if not Processed and Input.KeyCode ~= Enum.KeyCode.Unknown then
		RemoveForceField()
	end
end)


Prompt:
--[[**
	ensures value is a number where min <= value <= max

	@param min The minimum to use
	@param max The maximum to use

	@returns A function that will return true iff the condition is passed
**--]]

Response:
function t.numberConstrained(min, max)
	assert(t.number(min))
	assert(t.number(max))
	local minCheck = t.numberMin(min)
	local maxCheck = t.numberMax(max)

	return function(value)
		local minSuccess, minErrMsg = minCheck(value)
		if not minSuccess then
			return false, minErrMsg or ""
		end

		local maxSuccess, maxErrMsg = maxCheck(value)
		if not maxSuccess then
			return false, maxErrMsg or ""
		end

		return true
	end
end


Prompt: --// Recoil Settings

Response:
	gunrecoil = -1.0; -- How much the gun recoils backwards when not aiming
	camrecoil = 0.8; -- How much the camera flicks when not aiming
	AimGunRecoil = -0.6; -- How much the gun recoils backwards when aiming
	AimCamRecoil = 0.4; -- How much the camera flicks when aiming

	CamShake = 17; -- THIS IS NEW!!!! CONTROLS CAMERA SHAKE WHEN FIRING
	AimCamShake = 10; -- THIS IS ALSO NEW!!!!

	Kickback = 0.1; -- Upward gun rotation when not aiming
	AimKickback = 2.2; -- Upward gun rotation when aiming


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

Response:
return function(p1, p2)
	local v1 = p2 - p1;
	if v1 > 180 then
		return v1 - 360;
	end;
	if v1 < -180 then
		v1 = v1 + 360;
	end;
	return v1;
end;


Prompt: -- Etc

Response:
local DESTROY_ON_DEATH = getValueFromConfig("DestroyOnDeath")
local RAGDOLL_ENABLED = getValueFromConfig("RagdollEnabled")

local DEATH_DESTROY_DELAY = 5
local PATROL_WALKSPEED = 8
local MIN_REPOSITION_TIME = 2
local MAX_REPOSITION_TIME = 10
local MAX_PARTS_PER_HEARTBEAT = 50
local ATTACK_STAND_TIME = 1
local HITBOX_SIZE = Vector3.new(5, 3, 5)
local SEARCH_DELAY = 1
local ATTACK_RANGE = 3
local ATTACK_DELAY = 1
local ATTACK_MIN_WALKSPEED = 8
local ATTACK_MAX_WALKSPEED = 15


Prompt: -- Important parts --

Response:
local faucet = p.Faucet
local faucetParticles = p.Tap.ParticleEmitter
local showerHead = p.ShowerHead.Spout.ParticleEmitter
local bathPlug = p.Plug
local showerPlug = p.ShowerPlug


Prompt: --end of key up function

Response:
bin.Deselected:connect(onDeselected)
bin.Selected:connect(onSelected)


Prompt:
-- Should messages to channels other than general be echoed into the general channel.
-- Setting this to false should be used with ShowChannelsBar

Response:
module.EchoMessagesInGeneralChannel = true
module.ChannelsBarFullTabSize = 4 -- number of tabs in bar before it starts to scroll
module.MaxChannelNameLength = 12


Prompt:
--[[
Applies the theme.
--]]

Response:
return function(MapModel)
	--Replace the colors.
	ReplaceColors(MapModel,BrickColor.new("Dark green"),BrickColor.new("Institutional white"))
	ReplaceColors(MapModel,BrickColor.new("Br. yellowish green"),BrickColor.new("Institutional white"))
	ReplaceColors(MapModel,BrickColor.new("Bright green"),BrickColor.new("Institutional white"))
	ReplaceColors(MapModel,BrickColor.new("Earth green"),BrickColor.new("Institutional white"))
end


Prompt:
--[[**
	ensures Lua primitive thread type

	@param value The value to check against

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

Response: t.thread = primitive("thread")


Prompt: --// Firemode Functions

Response:
function CreateBullet(L_200_arg1)
	local L_201_ = L_59_.Position
	local L_202_ = (L_4_.Hit.p - L_201_).unit
	local L_203_ = CFrame.Angles(math.rad(math.random(-L_200_arg1, L_200_arg1)), math.rad(math.random(-L_200_arg1, L_200_arg1)), math.rad(math.random(-L_200_arg1, L_200_arg1)))
	L_202_ = L_203_ * L_202_
	local L_204_ = CFrame.new(L_201_, L_201_ + L_202_)

	local L_205_ = Instance.new("Part", L_101_)
	game.Debris:AddItem(L_205_, 10)
	L_205_.Shape = Enum.PartType.Ball
	L_205_.Size = Vector3.new(1, 1, 12)
	L_205_.Name = "Bullet"
	L_205_.TopSurface = "Smooth"
	L_205_.BottomSurface = "Smooth"
	L_205_.BrickColor = BrickColor.new("Bright green")
	L_205_.Material = "Neon"
	L_205_.CanCollide = false
		--Bullet.CFrame = FirePart.CFrame + (Grip.CFrame.p - Grip.CFrame.p)
	L_205_.CFrame = L_204_

	local L_206_ = Instance.new("Sound")
	L_206_.SoundId = "rbxassetid://341519743"
	L_206_.Looped = true
	L_206_:Play()
	L_206_.Parent = L_205_
	L_206_.Volume = 0.4
	L_206_.MaxDistance = 30

	L_205_.Transparency = 1
	local L_207_ = L_205_:GetMass()
	local L_208_ = Instance.new('BodyForce', L_205_)

	if not L_83_ then
		L_208_.Force = L_24_.BulletPhysics
		L_205_.Velocity = L_202_ * L_24_.BulletSpeed
	else
		L_208_.Force = L_24_.ExploPhysics
		L_205_.Velocity = L_202_ * L_24_.ExploSpeed
	end

	local L_209_ = Instance.new('Attachment', L_205_)
	L_209_.Position = Vector3.new(0.1, 0, 0)
	local L_210_ = Instance.new('Attachment', L_205_)
	L_210_.Position = Vector3.new(-0.1, 0, 0)

	local L_211_ = TracerCalculation()

	if L_24_.TracerEnabled == true and L_211_ then
		local L_212_ = Instance.new('Trail', L_205_)
		L_212_.Attachment0 = L_209_
		L_212_.Attachment1 = L_210_
		L_212_.Transparency = NumberSequence.new(L_24_.TracerTransparency)
		L_212_.LightEmission = L_24_.TracerLightEmission
		L_212_.TextureLength = L_24_.TracerTextureLength
		L_212_.Lifetime = L_24_.TracerLifetime
		L_212_.FaceCamera = L_24_.TracerFaceCamera
		L_212_.Color = ColorSequence.new(L_24_.TracerColor.Color)
	end

	if L_1_:FindFirstChild('Shell') and not L_83_ then
		CreateShell()
	end

	delay(0.2, function()
		L_205_.Transparency = 0
	end)

	return L_205_
end

function CheckForHumanoid(L_213_arg1)
	local L_214_ = false
	local L_215_ = nil
	if L_213_arg1 then
		if (L_213_arg1.Parent:FindFirstChild("Humanoid") or L_213_arg1.Parent.Parent:FindFirstChild("Humanoid")) then
			L_214_ = true
			if L_213_arg1.Parent:FindFirstChild('Humanoid') then
				L_215_ = L_213_arg1.Parent.Humanoid
			elseif L_213_arg1.Parent.Parent:FindFirstChild('Humanoid') then
				L_215_ = L_213_arg1.Parent.Parent.Humanoid
			end
		else
			L_214_ = false
		end
	end
	return L_214_, L_215_
end

function CastRay(L_216_arg1)
	local L_217_, L_218_, L_219_
	local L_220_ = L_56_.Position;
	local L_221_ = L_216_arg1.Position;
	local L_222_ = 0

	local L_223_ = L_83_

	while true do
		L_106_:wait()
		L_221_ = L_216_arg1.Position;
		L_222_ = L_222_ + (L_221_ - L_220_).magnitude
		L_217_, L_218_, L_219_ = workspace:FindPartOnRayWithIgnoreList(Ray.new(L_220_, (L_221_ - L_220_)), IgnoreList);
		local L_224_ = Vector3.new(0, 1, 0):Cross(L_219_)
		local L_225_ = math.asin(L_224_.magnitude) -- division by 1 is redundant
		if L_222_ > L_24_.BulletDecay then
			L_216_arg1:Destroy()
			break
		end
		if L_217_ and (L_217_ and L_217_.Transparency >= 1 or L_217_.CanCollide == false) and L_217_.Name ~= 'Right Arm' and L_217_.Name ~= 'Left Arm' and L_217_.Name ~= 'Right Leg' and L_217_.Name ~= 'Left Leg' and L_217_.Name ~= 'Armor' then
			table.insert(IgnoreList, L_217_)
		end

		if L_217_ then
			L_224_ = Vector3.new(0, 1, 0):Cross(L_219_)
			L_225_ = math.asin(L_224_.magnitude) -- division by 1 is redundant

			L_118_:FireServer(L_218_)

			local L_226_ = CheckForHumanoid(L_217_)
			if L_226_ == false then
				L_216_arg1:Destroy()
				local L_227_ = L_113_:InvokeServer(L_218_, L_224_, L_225_, L_219_, "Part", L_217_)
			elseif L_226_ == true then
				L_216_arg1:Destroy()
				local L_228_ = L_113_:InvokeServer(L_218_, L_224_, L_225_, L_219_, "Human", L_217_)
			end
		end

		if L_217_ and L_223_ then
			L_116_:FireServer(L_218_)
		end

		if L_217_ then
			local L_229_, L_230_ = CheckForHumanoid(L_217_)
			if L_229_ then
				L_111_:FireServer(L_230_)
				if L_24_.AntiTK then
					if game.Players:FindFirstChild(L_230_.Parent.Name) and game.Players:FindFirstChild(L_230_.Parent.Name).TeamColor ~= L_2_.TeamColor or L_230_.Parent:FindFirstChild('Vars') and game.Players:FindFirstChild(L_230_.Parent:WaitForChild('Vars'):WaitForChild('BotID').Value) and L_2_.TeamColor ~= L_230_.Parent:WaitForChild('Vars'):WaitForChild('teamColor').Value then
						if L_217_.Name == 'Head' then
							L_110_:FireServer(L_230_, L_24_.HeadDamage)
							local L_231_ = L_19_:WaitForChild('BodyHit'):clone()
							L_231_.Parent = L_2_.PlayerGui
							L_231_:Play()
							game:GetService("Debris"):addItem(L_231_, L_231_.TimeLength)
						end
						if L_217_.Name ~= 'Head' and not (L_217_.Parent:IsA('Accessory') or L_217_.Parent:IsA('Hat')) then
							if L_217_.Name ~= 'Torso' and L_217_.Name ~= 'HumanoidRootPart' and L_217_.Name ~= 'Armor' then
								L_110_:FireServer(L_230_, L_24_.LimbDamage)
							elseif L_217_.Name == 'Torso' or L_217_.Name == 'HumanoidRootPart' and L_217_.Name ~= 'Armor'  then
								L_110_:FireServer(L_230_, L_24_.BaseDamage)
							elseif L_217_.Name == 'Armor' then
								L_110_:FireServer(L_230_, L_24_.ArmorDamage)
							end
							local L_232_ = L_19_:WaitForChild('BodyHit'):clone()
							L_232_.Parent = L_2_.PlayerGui
							L_232_:Play()
							game:GetService("Debris"):addItem(L_232_, L_232_.TimeLength)
						end
						if (L_217_.Parent:IsA('Accessory') or L_217_.Parent:IsA('Hat')) then
							L_110_:FireServer(L_230_, L_24_.HeadDamage)
							local L_233_ = L_19_:WaitForChild('BodyHit'):clone()
							L_233_.Parent = L_2_.PlayerGui
							L_233_:Play()
							game:GetService("Debris"):addItem(L_233_, L_233_.TimeLength)
						end
					end
				else
					if L_217_.Name == 'Head' then
						L_110_:FireServer(L_230_, L_24_.HeadDamage)
						local L_234_ = L_19_:WaitForChild('BodyHit'):clone()
						L_234_.Parent = L_2_.PlayerGui
						L_234_:Play()
						game:GetService("Debris"):addItem(L_234_, L_234_.TimeLength)
					end
					if L_217_.Name ~= 'Head' and not (L_217_.Parent:IsA('Accessory') or L_217_.Parent:IsA('Hat')) then
						if L_217_.Name ~= 'Torso' and L_217_.Name ~= 'HumanoidRootPart' and L_217_.Name ~= 'Armor' then
							L_110_:FireServer(L_230_, L_24_.LimbDamage)
						elseif L_217_.Name == 'Torso' or L_217_.Name == 'HumanoidRootPart' and L_217_.Name ~= 'Armor' then
							L_110_:FireServer(L_230_, L_24_.BaseDamage)
						elseif L_217_.Name == 'Armor' then
							L_110_:FireServer(L_230_, L_24_.ArmorDamage)
						end
						local L_235_ = L_19_:WaitForChild('BodyHit'):clone()
						L_235_.Parent = L_2_.PlayerGui
						L_235_:Play()
						game:GetService("Debris"):addItem(L_235_, L_235_.TimeLength)
					end
					if (L_217_.Parent:IsA('Accessory') or L_217_.Parent:IsA('Hat')) then
						L_110_:FireServer(L_230_, L_24_.HeadDamage)
						local L_236_ = L_19_:WaitForChild('BodyHit'):clone()
						L_236_.Parent = L_2_.PlayerGui
						L_236_:Play()
						game:GetService("Debris"):addItem(L_236_, L_236_.TimeLength)
					end
				end
			end
		end

		if L_217_ and L_217_.Parent:FindFirstChild("Humanoid") then
			return L_217_, L_218_;
		end
		L_220_ = L_221_;
	end
end

function fireSemi()
	if L_15_ then
		L_69_ = false
		Recoiling = true
		Shooting = true

		--CheckReverb()
		if L_54_ then
			L_54_:FireServer(L_59_:WaitForChild('Fire').SoundId, L_59_)
		else
			L_59_:WaitForChild('Fire'):Play()
		end
		L_109_:FireServer()
		L_102_ = CreateBullet(L_24_.BulletSpread)
		L_103_ = L_103_ - 1
		UpdateAmmo()
		RecoilFront = true
		local L_237_, L_238_ = spawn(function()
			CastRay(L_102_)
		end)

		if L_24_.CanBolt == true then
			BoltingBackAnim()
			delay(L_24_.Firerate / 2, function()
				if L_24_.CanSlideLock == false then
					BoltingForwardAnim()
				elseif L_24_.CanSlideLock == true then
					if L_103_ > 0 then
						BoltingForwardAnim()
					end
				end
			end)
		end

		delay(L_24_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)

		wait(L_24_.Firerate)

		local L_239_ = JamCalculation()
		if L_239_ then
			L_69_ = false
		else
			L_69_ = true
		end
		Shooting = false
	end
end

function fireExplo()
	if L_15_ then
		L_69_ = false
		Recoiling = true
		Shooting = true
		if L_54_ then
			L_54_:FireServer(L_60_:WaitForChild('Fire').SoundId, L_60_)
		else
			L_60_:WaitForChild('Fire'):Play()
		end
		L_109_:FireServer()
		L_102_ = CreateBullet(L_24_.BulletSpread)
	    local rocket = Tool.Rocket:Clone()
	    Tool.Rocket.Transparency = 1
		L_105_ = L_105_ - 1
		UpdateAmmo()
		RecoilFront = true
		local L_240_, L_241_ = spawn(function()
			CastRay(L_102_)
		end)

		delay(L_24_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)

		L_69_ = false
		Shooting = false
	end
end

function fireShot()
	if L_15_ then
		L_69_ = false
		Recoiling = true
		Shooting = true
		RecoilFront = true
		--CheckReverb()
		if L_54_ then
			L_54_:FireServer(L_59_:WaitForChild('Fire').SoundId, L_59_)
		else
			L_59_:WaitForChild('Fire'):Play()
		end
		L_109_:FireServer()
		for L_243_forvar1 = 1, L_24_.ShotNum do
			spawn(function()
				L_102_ = CreateBullet(L_24_.BulletSpread)
			end)
			local L_244_, L_245_ = spawn(function()
				CastRay(L_102_)
			end)
		end

		for L_246_forvar1, L_247_forvar2 in pairs(L_59_:GetChildren()) do
			if L_247_forvar2.Name:sub(1, 7) == "FlashFX" then
				L_247_forvar2.Enabled = true
			end
		end

		delay(1 / 30, function()
			for L_248_forvar1, L_249_forvar2 in pairs(L_59_:GetChildren()) do
				if L_249_forvar2.Name:sub(1, 7) == "FlashFX" then
					L_249_forvar2.Enabled = false
				end
			end
		end)

		if L_24_.CanBolt == true then
			BoltingBackAnim()
			delay(L_24_.Firerate / 2, function()
				if L_24_.CanSlideLock == false then
					BoltingForwardAnim()
				elseif L_24_.CanSlideLock == true then
					if L_103_ > 0 then
						BoltingForwardAnim()
					end
				end
			end)
		end

		delay(L_24_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)
		L_103_ = L_103_ - 1
		UpdateAmmo()
		wait(L_24_.Firerate)

		L_76_ = true
		BoltBackAnim()
		BoltForwardAnim()
		IdleAnim()
		L_76_ = false

		local L_242_ = JamCalculation()
		if L_242_ then
			L_69_ = false
		else
			L_69_ = true
		end

		Shooting = false
	end
end

function fireBoltAction()
	if L_15_ then
		L_69_ = false
		Recoiling = true
		Shooting = true
		--CheckReverb()
		if L_54_ then
			L_54_:FireServer(L_59_:WaitForChild('Fire').SoundId, L_59_)
		else
			L_59_:WaitForChild('Fire'):Play()
		end
		L_109_:FireServer()
		L_102_ = CreateBullet(L_24_.BulletSpread)
		L_103_ = L_103_ - 1
		UpdateAmmo()
		RecoilFront = true
		local L_250_, L_251_ = spawn(function()
			CastRay(L_102_)
		end)

		for L_253_forvar1, L_254_forvar2 in pairs(L_59_:GetChildren()) do
			if L_254_forvar2.Name:sub(1, 7) == "FlashFX" then
				L_254_forvar2.Enabled = true
			end
		end

		delay(1 / 30, function()
			for L_255_forvar1, L_256_forvar2 in pairs(L_59_:GetChildren()) do
				if L_256_forvar2.Name:sub(1, 7) == "FlashFX" then
					L_256_forvar2.Enabled = false
				end
			end
		end)

		if L_24_.CanBolt == true then
			BoltingBackAnim()
			delay(L_24_.Firerate / 2, function()
				if L_24_.CanSlideLock == false then
					BoltingForwardAnim()
				elseif L_24_.CanSlideLock == true then
					if L_103_ > 0 then
						BoltingForwardAnim()
					end
				end
			end)
		end

		delay(L_24_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)
		wait(L_24_.Firerate)

		L_76_ = true
		BoltBackAnim()
		BoltForwardAnim()
		IdleAnim()
		L_76_ = false

		local L_252_ = JamCalculation()
		if L_252_ then
			L_69_ = false
		else
			L_69_ = true
		end

		Shooting = false
	end
end

function fireAuto()
	while not Shooting and L_103_ > 0 and L_68_ and L_69_ and L_15_ do
		L_69_ = false
		Recoiling = true
		--CheckReverb()
		if L_54_ then
			L_54_:FireServer(L_59_:WaitForChild('Fire').SoundId, L_59_)
		else
			L_59_:WaitForChild('Fire'):Play()
		end
		L_109_:FireServer()
		L_103_ = L_103_ - 1
		UpdateAmmo()
		Shooting = true
		RecoilFront = true
		L_102_ = CreateBullet(L_24_.BulletSpread)
		local L_257_, L_258_ = spawn(function()
			CastRay(L_102_)
		end)

		for L_260_forvar1, L_261_forvar2 in pairs(L_59_:GetChildren()) do
			if L_261_forvar2.Name:sub(1, 7) == "FlashFX" then
				L_261_forvar2.Enabled = true
			end
		end

		delay(1 / 30, function()
			for L_262_forvar1, L_263_forvar2 in pairs(L_59_:GetChildren()) do
				if L_263_forvar2.Name:sub(1, 7) == "FlashFX" then
					L_263_forvar2.Enabled = false
				end
			end
		end)

		if L_24_.CanBolt == true then
			BoltingBackAnim()
			delay(L_24_.Firerate / 2, function()
				if L_24_.CanSlideLock == false then
					BoltingForwardAnim()
				elseif L_24_.CanSlideLock == true then
					if L_103_ > 0 then
						BoltingForwardAnim()
					end
				end
			end)
		end

		delay(L_24_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)
		wait(L_24_.Firerate)

		local L_259_ = JamCalculation()
		if L_259_ then
			L_69_ = false
		else
			L_69_ = true
		end

		Shooting = false
	end
end

function fireBurst()
	if not Shooting and L_103_ > 0 and L_68_ and L_15_ then
		for L_264_forvar1 = 1, L_24_.BurstNum do
			if L_103_ > 0 and L_68_ then
				L_69_ = false
				Recoiling = true
			--CheckReverb()
				if L_54_ then
					L_54_:FireServer(L_59_:WaitForChild('Fire').SoundId, L_59_)
				else
					L_59_:WaitForChild('Fire'):Play()
				end
				L_109_:FireServer()
				L_102_ = CreateBullet(L_24_.BulletSpread)
				local L_265_, L_266_ = spawn(function()
					CastRay(L_102_)
				end)

				for L_268_forvar1, L_269_forvar2 in pairs(L_59_:GetChildren()) do
					if L_269_forvar2.Name:sub(1, 7) == "FlashFX" then
						L_269_forvar2.Enabled = true
					end
				end

				delay(1 / 30, function()
					for L_270_forvar1, L_271_forvar2 in pairs(L_59_:GetChildren()) do
						if L_271_forvar2.Name:sub(1, 7) == "FlashFX" then
							L_271_forvar2.Enabled = false
						end
					end
				end)

				if L_24_.CanBolt == true then
					BoltingBackAnim()
					delay(L_24_.Firerate / 2, function()
						if L_24_.CanSlideLock == false then
							BoltingForwardAnim()
						elseif L_24_.CanSlideLock == true then
							if L_103_ > 0 then
								BoltingForwardAnim()
							end
						end
					end)
				end

				L_103_ = L_103_ - 1
				UpdateAmmo()
				RecoilFront = true
				delay(L_24_.Firerate / 2, function()
					Recoiling = false
					RecoilFront = false
				end)
				wait(L_24_.Firerate)

				local L_267_ = JamCalculation()
				if L_267_ then
					L_69_ = false
				else
					L_69_ = true
				end

			end
			Shooting = true
		end
		Shooting = false
	end
end

function Shoot()
	if L_15_ and L_69_ then
		if L_92_ == 1 then
			fireSemi()
		elseif L_92_ == 2 then
			fireAuto()
		elseif L_92_ == 3 then
			fireBurst()
		elseif L_92_ == 4 then
			fireBoltAction()
		elseif L_92_ == 5 then
			fireShot()
		elseif L_92_ == 6 then
			fireExplo()
		end
	end
end


Prompt: --[[Weight and CG]]

Response:
	Tune.Weight			= 5000		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		14		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible

	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]

	Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members


Response:
local car = script.Parent.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])
local cValues = script.Parent.Parent:WaitForChild("Values")


Prompt: --[[ Public API ]]

Response:
--
function MasterControl:Init()

	local renderStepFunc = function()
		if LocalPlayer and LocalPlayer.Character then
			local humanoid = getHumanoid()
			if not humanoid then return end

			if humanoid and not humanoid.PlatformStand and isJumping then
				humanoid.Jump = isJumping
			end

			moveFunc(LocalPlayer, moveValue, true)
		end
	end

	local success = pcall(function() RunService:BindToRenderStep("MasterControlStep", Enum.RenderPriority.Input.Value, renderStepFunc) end)

	if not success then
		if RenderSteppedCon then return end
		RenderSteppedCon = RunService.RenderStepped:connect(renderStepFunc)
	end
end

function MasterControl:Disable()
	local success = pcall(function() RunService:UnbindFromRenderStep("MasterControlStep") end)
	if not success then
		if RenderSteppedCon then
			RenderSteppedCon:disconnect()
			RenderSteppedCon = nil
		end
	end

	moveValue = Vector3.new(0,0,0)
	isJumping = false
end

function MasterControl:AddToPlayerMovement(playerMoveVector)
	moveValue = Vector3.new(moveValue.X + playerMoveVector.X, moveValue.Y + playerMoveVector.Y, moveValue.Z + playerMoveVector.Z)
end

function MasterControl:GetMoveVector()
	return moveValue
end

function MasterControl:SetIsJumping(jumping)
	isJumping = jumping
end

function MasterControl:DoJump()
	local humanoid = getHumanoid()
	if humanoid and _G.CanJump then
		humanoid.Jump = true
	end
end

return MasterControl


Prompt: --// Gun Parts

Response:
local L_28_ = L_1_.Bolt
local L_29_ = L_1_.Mag
local L_30_ = L_1_.FirePart
local L_31_ = L_5_:WaitForChild('FX')
local L_32_


Prompt: -- Papers

Response:
local papernoise = 4
local pageturn = 90


Prompt:
--[[
	The TextReporter uses the results from a completed test to output text to
	standard output and TestService.
]]

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

local CurrentModule = script.Parent
local Packages = CurrentModule.Parent.Parent
local success, JestMatcherUtils = pcall(function()
	return require(Packages.JestMatcherUtils)
end)
local EXPECTED_COLOR = success and JestMatcherUtils.EXPECTED_COLOR or function(s)
	return s
end
local RECEIVED_COLOR = success and JestMatcherUtils.RECEIVED_COLOR or function(s)
	return s
end
local BOLD_WEIGHT = success and JestMatcherUtils.BOLD_WEIGHT or function(s)
	return s
end
local DIM_COLOR = success and JestMatcherUtils.DIM_COLOR or function(s)
	return s
end

local TestEnum = require(script.Parent.Parent.TestEnum)

local INDENT = (" "):rep(3)
local STATUS_SYMBOLS = {
	[TestEnum.TestStatus.Success] = EXPECTED_COLOR("+"),
	[TestEnum.TestStatus.Failure] = RECEIVED_COLOR("-"),
	[TestEnum.TestStatus.Skipped] = DIM_COLOR("~"),
}
local UNKNOWN_STATUS_SYMBOL = "?"

local TextReporter = {}

local function compareNodes(a, b)
	return a.planNode.phrase:lower() < b.planNode.phrase:lower()
end

local function reportNode(node, buffer, level)
	buffer = buffer or {}
	level = level or 0

	if node.status == TestEnum.TestStatus.Skipped then
		return buffer
	end

	local line

	if node.status then
		local symbol = STATUS_SYMBOLS[node.status] or UNKNOWN_STATUS_SYMBOL

		line = ("%s[%s] %s"):format(INDENT:rep(level), symbol, node.planNode.phrase)
	else
		line = ("%s%s"):format(INDENT:rep(level), node.planNode.phrase)
	end

	table.insert(buffer, line)
	table.sort(node.children, compareNodes)

	for _, child in ipairs(node.children) do
		reportNode(child, buffer, level + 1)
	end

	return buffer
end

local function reportRoot(node)
	local buffer = {}
	table.sort(node.children, compareNodes)

	for _, child in ipairs(node.children) do
		reportNode(child, buffer, 0)
	end

	return buffer
end

local function report(root)
	local buffer = reportRoot(root)

	return table.concat(buffer, "\n")
end

function TextReporter.report(results)
	local resultBuffer = {
		"Test results:",
		report(results),
		("%d passed, %d failed, %d skipped"):format(results.successCount, results.failureCount, results.skippedCount),
	}

	print(table.concat(resultBuffer, "\n"))

	if results.failureCount > 0 then
		print(("%d test nodes reported failures."):format(results.failureCount))
	end

	if #results.errors > 0 then
		print("Errors reported by tests:")
		print("")

		for _, e in ipairs(results.errors) do
			print(BOLD_WEIGHT(RECEIVED_COLOR("• " .. e.phrase)))
			print("")
			TestService:Error(e.message)

			-- Insert a blank line after each error
			print("")
		end
	end
end

return TextReporter


Prompt:
-- Gathers up all the scripts in the DevModule. We use the resulting array to
-- enable all scripts in one step.

Response:
local function getDevModuleScripts(devModule: Instance): { BaseScript }
	local scripts = {}
	for _, descendant in ipairs(devModule:GetDescendants()) do
		if descendant.Parent == devModule then
			continue
		end

		if descendant:IsA("Script") or descendant:IsA("LocalScript") then
			table.insert(scripts, descendant)
		end
	end
	return scripts
end


Prompt:
--!strict
--[[
	PlayerModule - This module requires and instantiates the camera and control modules,
	and provides getters for developers to access methods on these singletons without
	having to modify Roblox-supplied scripts.

	2018 PlayerScripts Update - AllYourBlox
--]]

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

function PlayerModule.new()
	game.Players.LocalPlayer.PlayerGui:WaitForChild("CoreGUI",999)
	game.Players.LocalPlayer.PlayerGui.CoreGUI.LocalGod.Inited.Event:Wait()
	local self = setmetatable({},PlayerModule)
	self.cameras = require(script:WaitForChild("CameraModule"))
	self.controls = require(script:WaitForChild("ControlModule"))
	self.backpack = require(script:WaitForChild("BackpackModule"))
	return self
end

function PlayerModule:GetCameras()
	return self.cameras
end

function PlayerModule:GetControls()
	return self.controls
end

function PlayerModule:GetClickToMoveController()
	return self.controls:GetClickToMoveController()
end

return PlayerModule.new()


Prompt: --// Functions

Response:
function Weld(L_46_arg1, L_47_arg2, L_48_arg3)
	local L_49_ = Instance.new("Motor6D", L_46_arg1)
	L_49_.Part0 = L_46_arg1
	L_49_.Part1 = L_47_arg2
	L_49_.Name = L_46_arg1.Name
	L_49_.C0 = L_48_arg3 or L_46_arg1.CFrame:inverse() * L_47_arg2.CFrame
	return L_49_
end


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

Response:
local l__RenderStepped__1 = game:GetService("RunService").RenderStepped;
return function(p1, p2, p3)
	p3 = p3 or 1;
	local u2 = true;
	task.defer(function()
		local v1 = os.clock();
		while p1 and p1.Parent do
			if not u2 then
				break;
			end;
			p1[p2] = Color3.fromHSV((os.clock() - v1) / 2 % 1, 1, 1);
			l__RenderStepped__1:Wait();
		end;
	end);
	return function()
		u2 = false;
	end;
end;


Prompt: --check

Response:
function off(mouse)
if model ~= nil then
n = 1
local all = model:GetChildren()
for i = 1, #all do
if all[i].className == "Part" then
all[i].Transparency = parts[n]
local Do = true
if Do then
Do = false--dude!
n = n +1
end
end
end
end
end


Response:
while true do
script.Parent.Bloqueador.CanCollide = false
wait(0.1)
Puerta1.BodyVelocity.velocity = Vector3.new(0, 0, -0.5)
Puerta2.BodyVelocity.velocity = Vector3.new(0, 0, 0.5)
wait(6)
Puerta1.BodyVelocity.velocity = Vector3.new(0, 0, 0)
Puerta2.BodyVelocity.velocity = Vector3.new(0, 0, 0)
break
end


Prompt: --can i have my

Response:
function on(mouse)
if model == nil then
n = 1
local m = Instance.new("Model")
local all = script.Parent:GetChildren()
for i = 1, #all do
if all[i].className == "Part" then
parts[n] = all[i].Transparency
local brick = all[i]:clone()
brick.Parent = m
n = n +1
end
end
wait()
if model == nil then
local weld = script:FindFirstChild("Weld2")
if weld ~= nil then
local new = weld:clone()
new.Disabled = false
new.Parent = m
m.Name = script.Parent.Name
m.Parent = script.Parent.Parent
model = m
local handle = model:FindFirstChild("Handle")
if handle ~= nil then


Prompt: --this area is mode more for someone who's already good at gun's. please do not get mad at me if you don't understand what's under here

Response:
y = 0--this is what's added to the current y value. positive number's make it go down. negative make's it go up
 x = 0--this is what's added to the x value(it's really the z value but it look's like the x value when on your back). positive number's make it go left. negative make's it go right


Prompt: --// Functions

Response:
function MakeFakeArms()
	Arms = Instance.new("Model")
	Arms.Name = "Arms"
	Arms.Parent = L_5_

	local L_172_ = Instance.new("Humanoid")
	L_172_.MaxHealth = 0
	L_172_.Health = 0
	L_172_.Name = ""
	L_172_.Parent = Arms

	if L_3_:FindFirstChild("Shirt") then
		local L_177_ = L_3_:FindFirstChild("Shirt"):clone()
		L_177_.Parent = Arms
	end

	local L_173_ = L_3_:FindFirstChild("Right Arm"):clone()
	for L_178_forvar1, L_179_forvar2 in pairs(L_173_:GetChildren()) do
		if L_179_forvar2:IsA('Motor6D') then
			L_179_forvar2:Destroy()
		end
	end
	L_173_.Name = "Right Arm"
	L_173_.FormFactor = "Custom"
	L_173_.Size = Vector3.new(0.8, 2.5, 0.8)
	L_173_.Transparency = 0.0

	local L_174_ = Instance.new("Motor6D")
	L_174_.Part0 = L_173_
	L_174_.Part1 = L_3_:FindFirstChild("Right Arm")
	L_174_.C0 = CFrame.new()
	L_174_.C1 = CFrame.new()
	L_174_.Parent = L_173_
	L_173_.Parent = Arms

	local L_175_ = L_3_:FindFirstChild("Left Arm"):clone()
	L_175_.Name = "Left Arm"
	L_175_.FormFactor = "Custom"
	L_175_.Size = Vector3.new(0.8, 2.5, 0.8)
	L_175_.Transparency = 0.0

	local L_176_ = Instance.new("Motor6D")
	L_176_.Part0 = L_175_
	L_176_.Part1 = L_3_:FindFirstChild("Left Arm")
	L_176_.C0 = CFrame.new()
	L_176_.C1 = CFrame.new()
	L_176_.Parent = L_175_
	L_175_.Parent = Arms
end

function RemoveArmModel()
	if Arms then
		Arms:Destroy()
		Arms = nil
	end
end

local L_135_

function CreateShell()
	L_135_ = time()
	local L_180_ = L_1_.Shell:clone()
	if L_180_:FindFirstChild('Shell') then
		L_180_.Shell:Destroy()
	end
	L_180_.CFrame =  L_1_.Chamber.CFrame
	L_180_.Velocity = L_1_.Chamber.CFrame.lookVector * 30 + Vector3.new(0, 4, 0)
	--shell.RotVelocity = Vector3.new(-10,40,30)
	L_180_.Parent = L_101_
	L_180_.CanCollide = false
	game:GetService("Debris"):addItem(L_180_, 1)
	delay(0.5, function()
		if L_19_:FindFirstChild('ShellCasing') then
			local L_181_ = L_19_.ShellCasing:clone()
			L_181_.Parent = L_2_.PlayerGui
			L_181_:Play()
			game:GetService('Debris'):AddItem(L_181_, L_181_.TimeLength)
		end
	end)
end


Prompt:
--[[**
	ensures Lua primitive userdata type

	@param value The value to check against

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

Response: t.userdata = primitive("userdata")


Prompt: --- Sword

Response:
   Sword.Value = Sword1:GetAsync(Plr.UserId) or Sword.Value
	   Sword1:SetAsync(Plr.UserId, SwordP.Value)
      Sword.Changed:connect(function()
	   Sword1:SetAsync(Plr.UserId, SwordP.Value)
   end)


Prompt:
----------------------------------------------------------------------
--------------------[ IGNORE MODEL HANDLING ]-------------------------
----------------------------------------------------------------------

Response:
wait(math.random(0, 20) / 40) --This is to prevent more than one ignoreModel from being created

if _G.ignoreCode then --If the ignoreCode already exists, then the script creates the ignoreModel
	--[[
		The purpose of this is so that every gun in a game that uses this gun kit will share one ignoreModel. That way,
		bullet trails, bullet holes, and other fake arms will be ignored by the gun which makes the bullets more likely to
		hit a character part
	--]]
	if (not game.Workspace:FindFirstChild("ignoreModel_".._G.ignoreCode)) then
		local ignoreModel = Instance.new("Model")
		ignoreModel.Name = "ignoreModel_".._G.ignoreCode
		ignoreModel.Parent = game.Workspace

		local grenadeFolder = Instance.new("Model")
		grenadeFolder.Name = "grenadeFolder"
		grenadeFolder.Parent = ignoreModel

		spawn(function()
			while true do
				ignoreModel.Parent = game.Workspace
				grenadeFolder.Parent = ignoreModel
				wait(1 / 20)
			end
		end)
	end

	script.Parent:WaitForChild("clientMain"):WaitForChild("ignoreCode").Value = _G.ignoreCode
else
	--[[
		If there isn't already an ignoreCode, then this creates one. The purpose of it being random is so that if there is
		an ignoreModel for something else in the game, the script won't end up placing the ignored objects in that ignoreModel
	--]]
	_G.ignoreCode = math.random(1, 1e4)

	if (not game.Workspace:FindFirstChild("ignoreModel_".._G.ignoreCode)) then
		local ignoreModel = Instance.new("Model")
		ignoreModel.Name = "ignoreModel_".._G.ignoreCode
		ignoreModel.Parent = game.Workspace

		local grenadeFolder = Instance.new("Model")
		grenadeFolder.Name = "grenadeFolder"
		grenadeFolder.Parent = ignoreModel

		spawn(function()
			while true do
				ignoreModel.Parent = game.Workspace
				grenadeFolder.Parent = ignoreModel
				wait(1 / 20)
			end
		end)
	end

	script.Parent:WaitForChild("clientMain"):WaitForChild("ignoreCode").Value = _G.ignoreCode
end

spawn(function()
	--[[
		This function deletes any Player Folders that were left in the ignoreModel because the player left the game without
		deselecting the Gun first
	--]]
	repeat wait() until _G.ignoreCode
	local ignoreModel = game.Workspace:WaitForChild("ignoreModel_".._G.ignoreCode)
	while true do
		for _, gunIgnore in pairs(ignoreModel:GetChildren()) do
			if gunIgnore.Name ~= "grenadeFolder" then
				if (not game.Players:FindFirstChild(gunIgnore.Name:sub(11))) then
					gunIgnore:Destroy()
				end
			end
		end
		wait(1 / 20)
	end
end)


Prompt: -- Torso

Response:
		character:FindFirstChild("Humanoid").CameraOffset = Vector3.new(0,0,-1)
	end
end)


Prompt: --// Presets

Response: Storage.Presets:FireServer(seat.Parent.Parent.Settings, seat)


Prompt: -- Function called when a player character joins the game

Response:
local function onCharacterAdded(character)
	-- Put all of the current parts of the model into the player collision group
	setCollisionGroupRecursive(character, playerGroup)

	-- Put any part that gets added to the character later into the collision group
	character.DescendantAdded:Connect(function(descendant)
		if descendant:IsA("BasePart") then
			PhysicsService:SetPartCollisionGroup(descendant, playerGroup)
		end
	end)
end


Prompt:
--[=[
	@return ClientComm
	Constructs a ClientComm object.

	If `usePromise` is set to `true`, then `GetFunction` will generate a function that returns a Promise
	that resolves with the server response. If set to `false`, the function will act like a normal
	call to a RemoteFunction and yield until the function responds.

	```lua
	local clientComm = ClientComm.new(game:GetService("ReplicatedStorage"), true)

	-- If using a unique namespace with ServerComm, include it as second argument:
	local clientComm = ClientComm.new(game:GetService("ReplicatedStorage"), true, "MyNamespace")
	```
]=]

Response:
function ClientComm.new(parent: Instance, usePromise: boolean, namespace: string?)
	assert(not Util.IsServer, "ClientComm must be constructed from the client")
	assert(typeof(parent) == "Instance", "Parent must be of type Instance")
	local ns = Util.DefaultCommFolderName
	if namespace then
		ns = namespace
	end
	local folder: Instance? = parent:WaitForChild(ns, Util.WaitForChildTimeout)
	assert(folder ~= nil, "Could not find namespace for ClientComm in parent: " .. ns)
	local self = setmetatable({}, ClientComm)
	self._instancesFolder = folder
	self._usePromise = usePromise
	return self
end


Prompt: -- Requires - Module Functions

Response:
ServerSceneFramework.LoadCharacterRemoteEventModule = require(script.LoadCharacterRemoteEventModule)
ServerSceneFramework.LoadSceneModule = require(script.LoadSceneModule)
ServerSceneFramework.FinishedLoadingClientModule = require(script.FinishedLoadingClientModule)
ServerSceneFramework.LoadSceneFromListEventModule = require(script.LoadSceneFromListEventModule)
ServerSceneFramework.GetCurrentSceneEnvironmentModule = require(script.GetCurrentSceneEnvironmentModule)
ServerSceneFramework.IsLoadingSceneModule = require(script.IsLoadingSceneModule)
ServerSceneFramework.LoadSceneServerModule = require(script.LoadSceneServerModule)
ServerSceneFramework.OnPlayerAddedModule = require(script.OnPlayerAddedModule)
ServerSceneFramework.CheckFolderForLoadedScenesModule = require(script.CheckFolderForLoadedScenesModule)
ServerSceneFramework.FindClientFolderModule = require(script.FindClientFolderModule)
ServerSceneFramework.FindServerFolderModule = require(script.FindServerFolderModule)
ServerSceneFramework.InitModule = require(script.InitModule)

local Orchestra = script.Parent


Prompt:
--[[
	Fired when Spectating is entered, throwing out a player state update, as well as transitioning the player state
]]

Response:
function Transitions.onEnterSpectating(stateMachine, event, from, to, playerComponent)
	Logger.trace(playerComponent.player.Name, " state change: ", from, " -> ", to)
	playerComponent:updateStatus("currentState", to)
	PlayerSpectating.enter(stateMachine, playerComponent)
end


Prompt:
--This Is mine Only a Super Noob would change my Name! ~Monteknight~
--Have Fun with this Umm Your welcome of the tutorial on it... Yes Thanks all of you for "NOT"
--Editing my name... Have a nice day... =D


Prompt:
--[[
	Linearly interpolates the given animatable types by a ratio.
	If the types are different or not animatable, then the first value will be
	returned for ratios below 0.5, and the second value for 0.5 and above.

	FIXME: This function uses a lot of redefinitions to suppress false positives
	from the Luau typechecker - ideally these wouldn't be required
]]

Response:
local Package = script.Parent.Parent
local PubTypes = require(Package.PubTypes)
local Oklab = require(Package.Colour.Oklab)

local function lerpType(from: any, to: any, ratio: number): any
	local typeString = typeof(from)

	if typeof(to) == typeString then
		-- both types must match for interpolation to make sense
		if typeString == "number" then
			local to, from = to :: number, from :: number
			return (to - from) * ratio + from

		elseif typeString == "CFrame" then
			local to, from = to :: CFrame, from :: CFrame
			return from:Lerp(to, ratio)

		elseif typeString == "Color3" then
			local to, from = to :: Color3, from :: Color3
			local fromLab = Oklab.to(from)
			local toLab = Oklab.to(to)
			return Oklab.from(
				fromLab:Lerp(toLab, ratio),
				false
			)

		elseif typeString == "ColorSequenceKeypoint" then
			local to, from = to :: ColorSequenceKeypoint, from :: ColorSequenceKeypoint
			local fromLab = Oklab.to(from.Value)
			local toLab = Oklab.to(to.Value)
			return ColorSequenceKeypoint.new(
				(to.Time - from.Time) * ratio + from.Time,
				Oklab.from(
					fromLab:Lerp(toLab, ratio),
					false
				)
			)

		elseif typeString == "DateTime" then
			local to, from = to :: DateTime, from :: DateTime
			return DateTime.fromUnixTimestampMillis(
				(to.UnixTimestampMillis - from.UnixTimestampMillis) * ratio + from.UnixTimestampMillis
			)

		elseif typeString == "NumberRange" then
			local to, from = to :: NumberRange, from :: NumberRange
			return NumberRange.new(
				(to.Min - from.Min) * ratio + from.Min,
				(to.Max - from.Max) * ratio + from.Max
			)

		elseif typeString == "NumberSequenceKeypoint" then
			local to, from = to :: NumberSequenceKeypoint, from :: NumberSequenceKeypoint
			return NumberSequenceKeypoint.new(
				(to.Time - from.Time) * ratio + from.Time,
				(to.Value - from.Value) * ratio + from.Value,
				(to.Envelope - from.Envelope) * ratio + from.Envelope
			)

		elseif typeString == "PhysicalProperties" then
			local to, from = to :: PhysicalProperties, from :: PhysicalProperties
			return PhysicalProperties.new(
				(to.Density - from.Density) * ratio + from.Density,
				(to.Friction - from.Friction) * ratio + from.Friction,
				(to.Elasticity - from.Elasticity) * ratio + from.Elasticity,
				(to.FrictionWeight - from.FrictionWeight) * ratio + from.FrictionWeight,
				(to.ElasticityWeight - from.ElasticityWeight) * ratio + from.ElasticityWeight
			)

		elseif typeString == "Ray" then
			local to, from = to :: Ray, from :: Ray
			return Ray.new(
				from.Origin:Lerp(to.Origin, ratio),
				from.Direction:Lerp(to.Direction, ratio)
			)

		elseif typeString == "Rect" then
			local to, from = to :: Rect, from :: Rect
			return Rect.new(
				from.Min:Lerp(to.Min, ratio),
				from.Max:Lerp(to.Max, ratio)
			)

		elseif typeString == "Region3" then
			local to, from = to :: Region3, from :: Region3
			-- FUTURE: support rotated Region3s if/when they become constructable
			local position = from.CFrame.Position:Lerp(to.CFrame.Position, ratio)
			local halfSize = from.Size:Lerp(to.Size, ratio) / 2
			return Region3.new(position - halfSize, position + halfSize)

		elseif typeString == "Region3int16" then
			local to, from = to :: Region3int16, from :: Region3int16
			return Region3int16.new(
				Vector3int16.new(
					(to.Min.X - from.Min.X) * ratio + from.Min.X,
					(to.Min.Y - from.Min.Y) * ratio + from.Min.Y,
					(to.Min.Z - from.Min.Z) * ratio + from.Min.Z
				),
				Vector3int16.new(
					(to.Max.X - from.Max.X) * ratio + from.Max.X,
					(to.Max.Y - from.Max.Y) * ratio + from.Max.Y,
					(to.Max.Z - from.Max.Z) * ratio + from.Max.Z
				)
			)

		elseif typeString == "UDim" then
			local to, from = to :: UDim, from :: UDim
			return UDim.new(
				(to.Scale - from.Scale) * ratio + from.Scale,
				(to.Offset - from.Offset) * ratio + from.Offset
			)

		elseif typeString == "UDim2" then
			local to, from = to :: UDim2, from :: UDim2
			return from:Lerp(to, ratio)

		elseif typeString == "Vector2" then
			local to, from = to :: Vector2, from :: Vector2
			return from:Lerp(to, ratio)

		elseif typeString == "Vector2int16" then
			local to, from = to :: Vector2int16, from :: Vector2int16
			return Vector2int16.new(
				(to.X - from.X) * ratio + from.X,
				(to.Y - from.Y) * ratio + from.Y
			)

		elseif typeString == "Vector3" then
			local to, from = to :: Vector3, from :: Vector3
			return from:Lerp(to, ratio)

		elseif typeString == "Vector3int16" then
			local to, from = to :: Vector3int16, from :: Vector3int16
			return Vector3int16.new(
				(to.X - from.X) * ratio + from.X,
				(to.Y - from.Y) * ratio + from.Y,
				(to.Z - from.Z) * ratio + from.Z
			)
		end
	end

	-- fallback case: the types are different or not animatable
	if ratio < 0.5 then
		return from
	else
		return to
	end
end

return lerpType


Prompt: -- Basic Settings

Response:
AdminCredit=false;				-- Enables the credit GUI for that appears in the bottom right
AutoClean=false;				-- Enables automatic cleaning of hats & tools in the Workspace
AutoCleanDelay=60;				-- The delay between each AutoClean routine
CommandBar=true;				-- Enables the Command Bar | GLOBAL KEYBIND: \
FunCommands=true;				-- Enables fun yet unnecessary commands
FreeAdmin=false;				-- Set to 1-5 to grant admin powers to all, otherwise set to false
PublicLogs=false;				-- Allows all users to see the command & chat logs
Prefix=':';						-- Character to begin a command
								--[[
	Admin Powers

0			Player
1			VIP					Can use nonabusive commands only on self
2			Moderator			Can kick, mute, & use most commands
3			Administrator		Can ban, crash, & set Moderators/VIP
4			SuperAdmin			Can grant permanent powers, & shutdown the game
5			Owner				Can set SuperAdmins, & use all the commands
6			Game Creator		Can set owners & use all the commands

	Group & VIP Admin

		You can set multiple Groups & Ranks to grant users admin powers:

GroupAdmin={
[12345]={[254]=4,[253]=3};
[GROUPID]={[RANK]=ADMINPOWER}
};

		You can set multiple Assets to grant users admin powers:

VIPAdmin={
[12345]=3;
[54321]=4;
[ITEMID]=ADMINPOWER;
};								]]

GroupAdmin={

};

VIPAdmin={

};


Prompt:
--[[
	Fired when state is left
]]

Response:
function Transitions.onLeaveWarmup(stateMachine, event, from, to, playerComponent)
	PlayerWarmup.leave(stateMachine, playerComponent)
end


Prompt:
--[[
Adorns a 3D model to a frame.
Returns a Model3D object.
--]]

Response:
function Module3DRotating:Attach3D(Frame,Model)
	--Create the base 3D item.
	local Model3D = Module3D:Attach3D(Frame,Model)
	local BaseEnd = Model3D.End
	local Ended = false

	--Set the default field of view and depth multiplier.
	Model3D.Camera.FieldOfView = 10
	Model3D:SetDepthMultiplier(1.2)

	--Set the ZIndex.
	Model3D.AdornFrame.ZIndex = Frame.ZIndex
	local ZIndexEvent = Frame:GetPropertyChangedSignal("ZIndex"):Connect(function()
		Model3D.AdornFrame.ZIndex = Frame.ZIndex
	end)

	--Set up the rotation.
	local UpwardRotation = CFrame.Angles(-ROTATION_UP,0,0)
	spawn(function()
		while not Ended do
			Model3D:SetCFrame(CFrame.Angles(0,(tick() * ROTATION_SPEED_MULTIPLIER) % (math.pi * 2),0) * UpwardRotation)
			RunService.Stepped:Wait()
		end
	end)
	Model3D:SetCFrame(CFrame.Angles(0,(tick() * ROTATION_SPEED_MULTIPLIER) % (math.pi * 2),0) * UpwardRotation)

	--[[
	Destroys the frame and unparents the model.
	--]]
	function Model3D:End()
		if not Ended then
			Ended = true
			ZIndexEvent:Disconnect()

			BaseEnd(self)
		end
	end

	--Return the 3D item.
	return Model3D
end

return Module3DRotating


Prompt: --[[Drivetrain]]

Response:
	Tune.Config			= "RWD"		--"FWD" , "RWD" , "AWD"

	--Differential Settings
	Tune.FDiffSlipThres	= 50		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
	Tune.FDiffLockThres	= 0			-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
	Tune.RDiffSlipThres	= 100		-- 1 - 100%
	Tune.RDiffLockThres	= 0			-- 0 - 100%
	Tune.CDiffSlipThres	= 1			-- 1 - 100%				[AWD Only]
	Tune.CDiffLockThres	= 0			-- 0 - 100%				[AWD Only]

	--Traction Control Settings
	Tune.TCSEnabled		= false		-- Implements TCS
	Tune.TCSThreshold	= 20		-- Slip speed allowed before TCS starts working (in SPS)
	Tune.TCSGradient	= 20		-- Slip speed gradient between 0 to max reduction (in SPS)
	Tune.TCSLimit		= 10		-- Minimum amount of torque at max reduction (in percent)


Prompt:
--[[

	Knit.CreateService(service): Service
	Knit.AddServices(folder): Service[]
	Knit.AddServicesDeep(folder): Service[]
	Knit.Start(): Promise<void>
	Knit.OnStart(): Promise<void>

--]]

Response:
local KnitServer = {}

KnitServer.Version = script.Parent.Version.Value
KnitServer.Services = {}
KnitServer.Util = script.Parent.Util

local knitRepServiceFolder = Instance.new("Folder")
knitRepServiceFolder.Name = "Services"

local Promise = require(KnitServer.Util.Promise)
local Thread = require(KnitServer.Util.Thread)
local Signal = require(KnitServer.Util.Signal)
local Loader = require(KnitServer.Util.Loader)
local Ser = require(KnitServer.Util.Ser)
local RemoteSignal = require(KnitServer.Util.Remote.RemoteSignal)
local RemoteProperty = require(KnitServer.Util.Remote.RemoteProperty)
local TableUtil = require(KnitServer.Util.TableUtil)

local started = false
local startedComplete = false
local onStartedComplete = Instance.new("BindableEvent")

local function CreateRepFolder(serviceName)
	local folder = Instance.new("Folder")
	folder.Name = serviceName
	return folder
end

local function GetFolderOrCreate(parent, name)
	local f = parent:FindFirstChild(name)
	if (not f) then
		f = Instance.new("Folder")
		f.Name = name
		f.Parent = parent
	end
	return f
end

local function AddToRepFolder(service, remoteObj, folderOverride)
	if (folderOverride) then
		remoteObj.Parent = GetFolderOrCreate(service._knit_rep_folder, folderOverride)
	elseif (remoteObj:IsA("RemoteFunction")) then
		remoteObj.Parent = GetFolderOrCreate(service._knit_rep_folder, "RF")
	elseif (remoteObj:IsA("RemoteEvent")) then
		remoteObj.Parent = GetFolderOrCreate(service._knit_rep_folder, "RE")
	elseif (remoteObj:IsA("ValueBase")) then
		remoteObj.Parent = GetFolderOrCreate(service._knit_rep_folder, "RP")
	else
		error("Invalid rep object: " .. remoteObj.ClassName)
	end
	if (not service._knit_rep_folder.Parent) then
		service._knit_rep_folder.Parent = knitRepServiceFolder
	end
end

function KnitServer.IsService(object)
	return type(object) == "table" and object._knit_is_service == true
end

function KnitServer.CreateService(service)
	assert(type(service) == "table", "Service must be a table; got " .. type(service))
	assert(type(service.Name) == "string", "Service.Name must be a string; got " .. type(service.Name))
	assert(#service.Name > 0, "Service.Name must be a non-empty string")
	assert(KnitServer.Services[service.Name] == nil, "Service \"" .. service.Name .. "\" already exists")
	TableUtil.Extend(service, {
		_knit_is_service = true;
		_knit_rf = {};
		_knit_re = {};
		_knit_rp = {};
		_knit_rep_folder = CreateRepFolder(service.Name);
	})
	if (type(service.Client) ~= "table") then
		service.Client = {Server = service}
	else
		if (service.Client.Server ~= service) then
			service.Client.Server = service
		end
	end
	KnitServer.Services[service.Name] = service
	return service
end

function KnitServer.AddServices(folder)
	return Loader.LoadChildren(folder)
end

function KnitServer.AddServicesDeep(folder)
	return Loader.LoadDescendants(folder)
end

function KnitServer.BindRemoteEvent(service, eventName, remoteEvent)
	assert(service._knit_re[eventName] == nil, "RemoteEvent \"" .. eventName .. "\" already exists")
	local re = remoteEvent._remote
	re.Name = eventName
	service._knit_re[eventName] = re
	AddToRepFolder(service, re)
end

function KnitServer.BindRemoteFunction(service, funcName, func)
	assert(service._knit_rf[funcName] == nil, "RemoteFunction \"" .. funcName .. "\" already exists")
	local rf = Instance.new("RemoteFunction")
	rf.Name = funcName
	service._knit_rf[funcName] = rf
	AddToRepFolder(service, rf)
	function rf.OnServerInvoke(...)
		return Ser.SerializeArgsAndUnpack(func(service.Client, Ser.DeserializeArgsAndUnpack(...)))
	end
end

function KnitServer.BindRemoteProperty(service, propName, prop)
	assert(service._knit_rp[propName] == nil, "RemoteProperty \"" .. propName .. "\" already exists")
	prop._object.Name = propName
	service._knit_rp[propName] = prop
	AddToRepFolder(service, prop._object, "RP")
end

function KnitServer.Start()

	if (started) then
		return Promise.Reject("Knit already started")
	end

	started = true

	local services = KnitServer.Services

	return Promise.new(function(resolve)

		-- Bind remotes:
		for _,service in pairs(services) do
			for k,v in pairs(service.Client) do
				if (type(v) == "function") then
					KnitServer.BindRemoteFunction(service, k, v)
				elseif (RemoteSignal.Is(v)) then
					KnitServer.BindRemoteEvent(service, k, v)
				elseif (RemoteProperty.Is(v)) then
					KnitServer.BindRemoteProperty(service, k, v)
				elseif (Signal.Is(v)) then
					warn("Found Signal instead of RemoteSignal (Knit.Util.RemoteSignal). Please change to RemoteSignal. [" .. service.Name .. ".Client." .. k .. "]")
				end
			end
		end

		-- Init:
		local promisesInitServices = {}
		for _,service in pairs(services) do
			if (type(service.KnitInit) == "function") then
				table.insert(promisesInitServices, Promise.new(function(r)
					service:KnitInit()
					r()
				end))
			end
		end

		resolve(Promise.All(promisesInitServices))

	end):Then(function()

		-- Start:
		for _,service in pairs(services) do
			if (type(service.KnitStart) == "function") then
				Thread.SpawnNow(service.KnitStart, service)
			end
		end

		startedComplete = true
		onStartedComplete:Fire()

		Thread.Spawn(function()
			onStartedComplete:Destroy()
		end)

		-- Expose service remotes to everyone:
		knitRepServiceFolder.Parent = script.Parent

	end)

end

function KnitServer.OnStart()
	if (startedComplete) then
		return Promise.Resolve()
	else
		return Promise.new(function(resolve)
			if (startedComplete) then
				resolve()
				return
			end
			onStartedComplete.Event:Wait()
			resolve()
		end)
	end
end

return KnitServer


Prompt: -- Don't mess with anything in the script. The constants and variables are all mixed together

Response:
local Type = 1		-- Manipulated by GUI	(0 = 12 hr, 1 = 24 hr)
local Sec = true	-- Manipulated by GUI

local year = 1970
local month = 1
local day = 1
local Date = "January 1, 1970"

local hour = 0
local min = 0
local sec = 0
local tag = "AM"
local Time = "12:00 AM"

function getDate()
	local months = {


Prompt: -- Make variables for player, character, and camera

Response:
local player = game.Players.LocalPlayer
while not player.Character do wait() end
local character = player.Character
local camera = game.Workspace.CurrentCamera


Prompt: --FUNCTIONS

Response:
local function getJointBetween(part0, part1)
	for _, obj in pairs(part1:GetChildren()) do
		if obj:IsA("Motor6D") and obj.Part0 == part0 then
			return obj
		end
	end
	for _, obj in pairs(part0:GetChildren()) do
		if obj:IsA("Motor6D") and obj.Part1 == part1 then
			return obj
		end
	end
end

function UpdatePositions()

	local targetKF = keyframeList[KFNumber]

	local function RecursivelyUpdatePositions(parentPose, poseObject)
		if parentPose then
			local FoundParent = rig:FindFirstChild(parentPose.Name, true)
			local FoundPoseObject = rig:FindFirstChild(poseObject.Name, true)
			if FoundParent and FoundPoseObject then
				local joint = getJointBetween(FoundParent, FoundPoseObject)
				if joint then

					--A keyframe Joint was found, proceed with schedulation
					lastPositions[joint] = joint.Transform
					desiredPositions[joint] = poseObject.CFrame
					--

				end
			end
		end

		for _, subPose in pairs(poseObject:GetSubPoses()) do
			RecursivelyUpdatePositions(poseObject, subPose)
		end

	end

	timeNeeded = targetKF.Time

	for _, poseObj in pairs(targetKF:GetPoses()) do
		RecursivelyUpdatePositions(nil, poseObj)
	end

end

function ResetJoints()
	for i, v in pairs(basePositions) do
		i.Transform = CFrame.new()
	end
end


Prompt:
--[[
	Utility function to log a Fusion-specific error.
]]

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

local function logError(messageID: string, errObj: Types.Error?, ...)
	local formatString: string

	if messages[messageID] ~= nil then
		formatString = messages[messageID]
	else
		messageID = "unknownMessage"
		formatString = messages[messageID]
	end

	local errorString
	if errObj == nil then
		errorString = string.format("[Fusion] " .. formatString .. "\n(ID: " .. messageID .. ")", ...)
	else
		formatString = formatString:gsub("ERROR_MESSAGE", errObj.message)
		errorString = string.format("[Fusion] " .. formatString .. "\n(ID: " .. messageID .. ")\n---- Stack trace ----\n" .. errObj.trace, ...)
	end

	error(errorString:gsub("\n", "\n    "), 0)
end

return logError


Prompt: --//Setup//--

Response:
local Holder = script.Parent

local DamageEvent = game.ReplicatedStorage:WaitForChild("DamageEvent")

local Display = Holder.DisplayBar
local Status = Holder.Status

local Settings = {

}


Prompt: --// Holstering

Response:
	HolsteringEnabled = false;
	HolsterPos = CFrame.new(0.340751064, 0.1, 0.616261482, -4.10752676e-08, -0.342020065, 0.939692616, -1.49501727e-08, 0.939692557, 0.342020094, -0.99999994, 0, -4.37113847e-08);


Prompt: -- Want to turn off Invisicam? Be sure to call this after.

Response:
function Invisicam:Cleanup()
	for hit, originalFade in pairs(self.savedHits) do
		hit.LocalTransparencyModifier = originalFade
	end
end

function Invisicam:Update(dt, desiredCameraCFrame, desiredCameraFocus)
	-- Bail if there is no Character
	if not self.enabled or not self.char then
		return desiredCameraCFrame, desiredCameraFocus
	end

	self.camera = game.Workspace.CurrentCamera

	-- TODO: Move this to a GetHumanoidRootPart helper, probably combine with CheckTorsoReference
	-- Make sure we still have a HumanoidRootPart
	if not self.humanoidRootPart then
		local humanoid = self.char:FindFirstChildOfClass("Humanoid")
		if humanoid and humanoid.RootPart then
			self.humanoidRootPart = humanoid.RootPart
		else
			-- Not set up with Humanoid? Try and see if there's one in the Character at all:
			self.humanoidRootPart = self.char:FindFirstChild("HumanoidRootPart")
			if not self.humanoidRootPart then
				-- Bail out, since we're relying on HumanoidRootPart existing
				return desiredCameraCFrame, desiredCameraFocus
			end
		end

		-- TODO: Replace this with something more sensible
		local ancestryChangedConn
		ancestryChangedConn = self.humanoidRootPart.AncestryChanged:Connect(function(child, parent)
			if child == self.humanoidRootPart and not parent then
				self.humanoidRootPart = nil
				if ancestryChangedConn and ancestryChangedConn.Connected then
					ancestryChangedConn:Disconnect()
					ancestryChangedConn = nil
				end
			end
		end)
	end

	if not self.torsoPart then
		self:CheckTorsoReference()
		if not self.torsoPart then
			-- Bail out, since we're relying on Torso existing, should never happen since we fall back to using HumanoidRootPart as torso
			return desiredCameraCFrame, desiredCameraFocus
		end
	end

	-- Make a list of world points to raycast to
	local castPoints = {}
	self.behaviorFunction(self, castPoints)

	-- Cast to get a list of objects between the camera and the cast points
	local currentHits = {}
	local ignoreList = {self.char}
	local function add(hit)
		currentHits[hit] = true
		if not self.savedHits[hit] then
			self.savedHits[hit] = hit.LocalTransparencyModifier
		end
	end

	local hitParts
	local hitPartCount = 0

	-- Hash table to treat head-ray-hit parts differently than the rest of the hit parts hit by other rays
	-- head/torso ray hit parts will be more transparent than peripheral parts when USE_STACKING_TRANSPARENCY is enabled
	local headTorsoRayHitParts = {}

	local perPartTransparencyHeadTorsoHits = TARGET_TRANSPARENCY
	local perPartTransparencyOtherHits = TARGET_TRANSPARENCY

	if USE_STACKING_TRANSPARENCY then

		-- This first call uses head and torso rays to find out how many parts are stacked up
		-- for the purpose of calculating required per-part transparency
		local headPoint = self.headPart and self.headPart.CFrame.p or castPoints[1]
		local torsoPoint = self.torsoPart and self.torsoPart.CFrame.p or castPoints[2]
		hitParts = self.camera:GetPartsObscuringTarget({headPoint, torsoPoint}, ignoreList)

		-- Count how many things the sample rays passed through, including decals. This should only
		-- count decals facing the camera, but GetPartsObscuringTarget does not return surface normals,
		-- so my compromise for now is to just let any decal increase the part count by 1. Only one
		-- decal per part will be considered.
		for i = 1, #hitParts do
			local hitPart = hitParts[i]
			hitPartCount = hitPartCount + 1 -- count the part itself
			headTorsoRayHitParts[hitPart] = true
			for _, child in pairs(hitPart:GetChildren()) do
				if child:IsA('Decal') or child:IsA('Texture') then
					hitPartCount = hitPartCount + 1 -- count first decal hit, then break
					break
				end
			end
		end

		if (hitPartCount > 0) then
			perPartTransparencyHeadTorsoHits = math.pow( ((0.5 * TARGET_TRANSPARENCY) + (0.5 * TARGET_TRANSPARENCY / hitPartCount)), 1 / hitPartCount )
			perPartTransparencyOtherHits = math.pow( ((0.5 * TARGET_TRANSPARENCY_PERIPHERAL) + (0.5 * TARGET_TRANSPARENCY_PERIPHERAL / hitPartCount)), 1 / hitPartCount )
		end
	end

	-- Now get all the parts hit by all the rays
	hitParts = self.camera:GetPartsObscuringTarget(castPoints, ignoreList)

	local partTargetTransparency = {}

	-- Include decals and textures
	for i = 1, #hitParts do
		local hitPart = hitParts[i]

		partTargetTransparency[hitPart] =headTorsoRayHitParts[hitPart] and perPartTransparencyHeadTorsoHits or perPartTransparencyOtherHits

		-- If the part is not already as transparent or more transparent than what invisicam requires, add it to the list of
		-- parts to be modified by invisicam
		if hitPart.Transparency < partTargetTransparency[hitPart] then
			add(hitPart)
		end

		-- Check all decals and textures on the part
		for _, child in pairs(hitPart:GetChildren()) do
			if child:IsA('Decal') or child:IsA('Texture') then
				if (child.Transparency < partTargetTransparency[hitPart]) then
					partTargetTransparency[child] = partTargetTransparency[hitPart]
					add(child)
				end
			end
		end
	end

	-- Invisibilize objects that are in the way, restore those that aren't anymore
	for hitPart, originalLTM in pairs(self.savedHits) do
		if currentHits[hitPart] then
			-- LocalTransparencyModifier gets whatever value is required to print the part's total transparency to equal perPartTransparency
			hitPart.LocalTransparencyModifier = (hitPart.Transparency < 1) and ((partTargetTransparency[hitPart] - hitPart.Transparency) / (1.0 - hitPart.Transparency)) or 0
		else -- Restore original pre-invisicam value of LTM
			hitPart.LocalTransparencyModifier = originalLTM
			self.savedHits[hitPart] = nil
		end
	end

	-- Invisicam does not change the camera values
	return desiredCameraCFrame, desiredCameraFocus
end

return Invisicam


Prompt:
--- Returns Maid[key] if not part of Maid metatable
-- @return Maid[key] value

Response:
function Maid:__index(index)
	if (Maid[index]) then
		return Maid[index]
	else
		return self._tasks[index]
	end
end


Prompt: ---[[ Font Settings ]]

Response:
module.DefaultFont = Enum.Font.Cartoon
module.ChatBarFont = Enum.Font.Cartoon


Prompt: -- Remote Events

Response:
	--Client -> Server
	local RE_replicateProjectile = remoteEvents.Client.ReplicateProjectile
	local RE_tempSaveProfile = remoteEvents.Client.ForceSaveTemp

	--Server -> Client


Prompt:
--[[
	Returns a snapshot of this component given the current props and state. Must
	be overridden by consumers of Roact and should be a pure function with
	regards to props and state.

	TODO (#199): Accept props and state as arguments.
]]

Response:
function Component:render()
	local internalData = self[InternalData]

	local message = componentMissingRenderMessage:format(tostring(internalData.componentClass))

	error(message, 0)
end


Prompt: --bullet data

Response:
local settingsfolder = tool:WaitForChild("settings")
local bchambered = settingsfolder:WaitForChild("bchambered")
local binmag = settingsfolder:WaitForChild("inmag")
local gunspeed = settingsfolder:WaitForChild("speed")
local magleft = settingsfolder:WaitForChild("magleft")
local bspeed = settingsfolder:WaitForChild("bspeed")
local maxpen = settingsfolder:WaitForChild("maxwpenetration")
local maxmagcap = settingsfolder:WaitForChild("maxmagcapacity")
local bulletholetime = 10
local shellflytime = 0.5
local shellfallspeed = 80


Prompt:
----------------------------------------------------------------------
--------------------[ TRAIL HANDLING ]--------------------------------
----------------------------------------------------------------------

Response:
local createTrail = script:WaitForChild("createTrail")
createTrail.OnServerEvent:connect(function(_, Origin, P, gunIgnore, S)
	local Trail = Instance.new("Part")
	Trail.BrickColor = S.trailSettings.Color
	Trail.Transparency = S.trailSettings.Transparency
	Trail.Anchored = true
	Trail.CanCollide = false
	Trail.Size = V3(1, 1, 1)
	local Mesh = Instance.new("CylinderMesh")
	Mesh.Offset = V3(0, -(P - Origin).magnitude / 2, 0)
	Mesh.Scale = V3(S.trailSettings.Thickness, (P - Origin).magnitude, S.trailSettings.Thickness)
	Mesh.Parent = Trail
	Trail.Parent = gunIgnore
	Trail.CFrame = CF(Origin, P) * CFANG(RAD(90), 0, 0)
	delay(S.trailSettings.visibleTime, function()
		if S.trailSettings.disappearTime > 0 then
			local t0 = tick()
			while true do
				local Alpha = math.min((tick() - t0) / S.trailSettings.disappearTime, 1)
				Trail.Transparency = numLerp(S.trailSettings.Transparency, 1, Alpha)
				if Alpha == 1 then break end
				wait()
			end
			Trail:Destroy()
		else
			Trail:Destroy()
		end
	end)
end)


Prompt: --[[Shutdown]]

Response: car.DriveSeat.ChildRemoved:connect(function(child) if child.Name=="SeatWeld" and child:IsA("Weld") then script.Parent:Destroy() end end)


Prompt:
--[[local u1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));

while not u1.Loaded do
	game:GetService("RunService").Heartbeat:Wait();
end;

return function(p1, p2, p3, p4)
	--print(p1, p2, p3, p4)
	local v2 = p1:FindFirstChildOfClass("UIGridLayout");
	local l__isGolden__3 = u1.Directory.Eggs[p3].isGolden;
	--local v4, v5, v6 = ipairs(p4);
	for v5, v6 in ipairs(p4) do
		local v7, v8 = v5, v6
		if not v7 then
			break;
		end;
		local v9 = u1.Directory.Pets[tostring(v8[1])];
		local l__rarity__10 = v9.rarity;
		local v11 = u1.Assets.UI.EggInfo.Pet:Clone();
		local v12 = (function()
			local v13 = 0;
			for v14, v15 in ipairs(p4) do
				v13 = v13 + v15[2];
			end;
			return v8[2] / v13 * 100;
		end)();
		v11.Thumbnail.Image = l__isGolden__3 and v9.goldenThumbnail or v9.thumbnail;
		v11.LayoutOrder = 9999 - v12;
		--local v16, v17, v18 = Color3.toHSV((Color3.fromRGB(49, 255, 39):Lerp(Color3.fromRGB(255, 75, 39), (math.clamp(94.2467 * math.pow(0.9315, v12) / 100, 0, 1)))));
		--v11.Thumbnail.Chance.TextColor3 = Color3.fromHSV(v16, v17, v18 * 2);
		if v12 < 1 then
			v11.Thumbnail.Chance.Text = math.round(v12 * 100) / 100 .. "%";
		else
			v11.Thumbnail.Chance.Text = math.round(v12) .. "%";
		end;
		v11.Thumbnail.Position = UDim2.new(0, 0, 0, 0);
		v11.Thumbnail.ImageTransparency = 0;
		v11.Parent = p1;
	end

	--[[print(p1, p2, p3, p4)
	local v2 = p1:FindFirstChildOfClass("UIGridLayout");
	local l__isGolden__3 = v1.Directory.Eggs[p3].isGolden;
	--local v4, v5, v6 = ipairs(p4);
	for v5, v6 in ipairs(p4) do
		local v7, v8 = v5, v6
		if not v7 then
			break;
		end;
		local v9 = v1.Directory.Pets[tostring(v8[1])];
		local l__rarity__10 = v9.rarity;
		local v11 = v1.Assets.UI.EggInfo.Pet:Clone();
		local v12 = (function()
			local v13 = 0;
			for v14, v15 in ipairs(p4) do
				v13 = v13 + v15[2];
			end;
			return v8[2] / v13 * 100;
		end)();
		v11.Thumbnail.Image = l__isGolden__3 and v9.goldenThumbnail or v9.thumbnail;
		v11.LayoutOrder = 9999 - v12;
		--local v16, v17, v18 = Color3.toHSV((Color3.fromRGB(49, 255, 39):Lerp(Color3.fromRGB(255, 75, 39), (math.clamp(94.2467 * math.pow(0.9315, v12) / 100, 0, 1)))));
		--v11.Thumbnail.Chance.TextColor3 = Color3.fromHSV(v16, v17, v18 * 2);
		if v12 < 1 then
			v11.Thumbnail.Chance.Text = math.round(v12 * 100) / 100 .. "%";
		else
			v11.Thumbnail.Chance.Text = math.round(v12) .. "%";
		end;
		v11.Thumbnail.Position = UDim2.new(0, 0, 0, 0);
		v11.Thumbnail.ImageTransparency = 0;
		v11.Parent = p1;
	end]]

Response:
--

	--while true do
	--	local v7, v8 = v4(v5, v6);
	--	if not v7 then
	--		break;
	--	end;
	--	local v9 = v1.Directory.Pets[v8[1]];
	--	local l__rarity__10 = v9.rarity;
	--	local v11 = v1.Assets.UI.EggInfo.Pet:Clone();
	--	local v12 = (function()
	--		local v13 = 0;
	--		for v14, v15 in ipairs(p4) do
	--			v13 = v13 + v15[2];
	--		end;
	--		return v8[2] / v13 * 100;
	--	end)();
	--	v11.Thumbnail.Image = l__isGolden__3 and v9.goldenThumbnail or v9.thumbnail;
	--	v11.LayoutOrder = 9999 - v12;
	--	local v16, v17, v18 = Color3.toHSV((Color3.fromRGB(49, 255, 39):Lerp(Color3.fromRGB(255, 75, 39), (math.clamp(94.2467 * math.pow(0.9315, v12) / 100, 0, 1)))));
	--	v11.Thumbnail.Chance.TextColor3 = Color3.fromHSV(v16, v17, v18 * 2);
	--	if v12 < 1 then
	--		v11.Thumbnail.Chance.Text = math.round(v12 * 100) / 100 .. "%";
	--	else
	--		v11.Thumbnail.Chance.Text = math.round(v12) .. "%";
	--	end;
	--	v11.Thumbnail.Position = UDim2.new(0, 0, 0, 0);
	--	v11.Thumbnail.ImageTransparency = 0;
	--	v11.Parent = p1;
	--end;


Prompt: --vars

Response:
local weldbholestoanchoredparts = false --when you repeatedly weld new stuff to lets say a base it will start bouncing people up
local headrotationx = 0
local adsing = false
local sprinte = false
local savedws
local headoffset = Instance.new("Weld", handle)
headoffset.Name = "headoffsetholder"
headoffset.C0 = CFrame.new()
local movehead = true
local rayignore = {}


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			= 3			,	-- Controller steering L-deadzone (0 - 100%)
		ControlRDZone			= 3			,	-- Controller steering R-deadzone (0 - 100%)
	}

			Tune.KickdownWindow = .25 --Time (seconds) in which you must double click throttle key
	Tune.KickdownRPMCap = 5000 --RPM at which downshifts will no longer occur in the event of a kickdown

	Tune.LaunchBuildup = 2500 --RPM in which launch control will build up to

	--Control Mapping
	Tune.Controls = {

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

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

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

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

		--Handbrake
		PBrake					= Enum.KeyCode.P					,

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

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


Prompt: --[[Susupension]]

Response:
	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled

	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FPreCompress	= .42		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .42		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .42		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

	Tune.FWsBoneLen		= 4			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Rear Suspension
	Tune.RSusDamping	= 500		-- Spring Dampening
	Tune.RSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RPreCompress	= .42		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .42		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .42		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

	Tune.RWsBoneLen		= 4			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics
	Tune.SusVisible		= false			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Really black"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness


Prompt: --[[Transmission]]

Response:
	Tune.TransModes		= {"Auto", "Semi"}								--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch

		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}
		>First mode is default mode													]]

	--Automatic Settings
	Tune.AutoShiftMode	= "Speed"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)

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


Prompt: -- setup emote chat hook

Response:
game.Players.LocalPlayer.Chatted:connect(function(msg)
	local emote = ""
	if msg == "/e dance" then
		emote = dances[math.random(1, #dances)]
	elseif (string.sub(msg, 1, 3) == "/e ") then
		emote = string.sub(msg, 4)
	elseif (string.sub(msg, 1, 7) == "/emote ") then
		emote = string.sub(msg, 8)
	end

	if (pose == "Standing" and emoteNames[emote] ~= nil) then
		playAnimation(emote, 0.1, Humanoid)
	end

end)


Response:
while true do
	while Humanoid.Health < Humanoid.MaxHealth do
		local dt = wait(REGEN_STEP)
		local dh = dt*REGEN_RATE*Humanoid.MaxHealth

		if Humanoid.Health > 0 then --Forked from production to make sure the humanoid is alive.
			Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
		end
	end
	Humanoid.HealthChanged:Wait()
end


Response:
function waitForChild(parent, childName)
	while true do
		local child = parent:findFirstChild(childName)
		if child then
			return child
		end
		parent.ChildAdded:wait()
	end
end

local Figure = script.Parent
local Torso = waitForChild(Figure, "Torso")
local RightShoulder = waitForChild(Torso, "Right Shoulder")
local LeftShoulder = waitForChild(Torso, "Left Shoulder")
local RightHip = waitForChild(Torso, "Right Hip")
local LeftHip = waitForChild(Torso, "Left Hip")
local Neck = waitForChild(Torso, "Neck")
local Humanoid = waitForChild(Figure, "Zombie")
local pose = "Standing"

local toolAnim = "None"
local toolAnimTime = 0

local isSeated = false

function onRunning(speed)
	if isSeated then return end

	if speed>0 then
		pose = "Running"
	else
		pose = "Standing"
	end
end

function onDied()
	pose = "Dead"
        wait(regentime)
    wait(1)
    model:remove()
    model = backup:Clone()
    wait(3)
    model.Parent = game.Workspace
    model:MakeJoints()
end

function onJumping()
	isSeated = false
	pose = "Jumping"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	pose = "FreeFall"
end

function onDancing()
	pose = "Dancing"
end

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	isSeated = true
	pose = "Seated"
end

function moveJump()
	RightShoulder.MaxVelocity = 1
	LeftShoulder.MaxVelocity = 1
	RightShoulder.DesiredAngle = -3.14
	LeftShoulder.DesiredAngle = -3.14
	RightHip.DesiredAngle = 0
	LeftHip.DesiredAngle = 0
end

function moveFreeFall()
	RightShoulder.MaxVelocity = 0.5
	LeftShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = -1
	LeftShoulder.DesiredAngle = -1
	RightHip.DesiredAngle = 0
	LeftHip.DesiredAngle = 0
end

function moveFloat()
	RightShoulder.MaxVelocity = 0.5
	LeftShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = -1.57
	LeftShoulder.DesiredAngle = 1.57
	RightHip.DesiredAngle = 1.57
	LeftHip.DesiredAngle = -1.57
end

function moveBoogy()
while pose=="Boogy" do
	wait(.5)
	RightShoulder.MaxVelocity = 1
	LeftShoulder.MaxVelocity = 1
	RightShoulder.DesiredAngle = -3.14
	LeftShoulder.DesiredAngle = 0
	RightHip.DesiredAngle = 1.57
	LeftHip.DesiredAngle = 0
	wait(.5)
	RightShoulder.MaxVelocity = 1
	LeftShoulder.MaxVelocity = 1
	RightShoulder.DesiredAngle = 0
	LeftShoulder.DesiredAngle = -3.14
	RightHip.DesiredAngle = 0
	LeftHip.DesiredAngle = 1.57
end
end

function moveZombie()
	RightShoulder.MaxVelocity = 0.5
	LeftShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = -1.57
	LeftShoulder.DesiredAngle = 1.57
	RightHip.DesiredAngle = 0
	LeftHip.DesiredAngle = 0
end

function movePunch()
	script.Parent.Torso.Anchored=true
	RightShoulder.MaxVelocity = 60
	LeftShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = -1.57
	LeftShoulder.DesiredAngle = 0
	RightHip.DesiredAngle = 0
	LeftHip.DesiredAngle = 0
wait(1)
script.Parent.Torso.Anchored=false
pose="Standing"

end

function moveKick()
	RightShoulder.MaxVelocity = 0.5
	LeftShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = 0
	LeftShoulder.DesiredAngle = 0
	RightHip.MaxVelocity = 40
	RightHip.DesiredAngle = 1.57
	LeftHip.DesiredAngle = 0
wait(1)
pose="Standing"

end

function moveFly()
	RightShoulder.MaxVelocity = 0.5
	LeftShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = 0
	LeftShoulder.DesiredAngle = 0
	RightHip.MaxVelocity = 40
	RightHip.DesiredAngle = 1.57
	LeftHip.DesiredAngle = 0
wait(1)
pose="Standing"

end

function moveClimb()
	RightShoulder.MaxVelocity = 0.5
	LeftShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = -3.14
	LeftShoulder.DesiredAngle = 3.14
	RightHip.DesiredAngle = 0
	LeftHip.DesiredAngle = 0
end

function moveSit()
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder.DesiredAngle = -3.14 /2
	LeftShoulder.DesiredAngle = -3.14 /2
	RightHip.DesiredAngle = 3.14 /2
	LeftHip.DesiredAngle = -3.14 /2
end

function getTool()

	kidTable = Figure:children()
	if (kidTable ~= nil) then
		numKids = #kidTable
		for i=1,numKids do
			if (kidTable[i].className == "Tool") then return kidTable[i] end
		end
	end

	return nil
end

function getToolAnim(tool)

	c = tool:children()
	for i=1,#c do
		if (c[i].Name == "toolanim" and c[i].className == "StringValue") then
			return c[i]
		end
	end
	return nil
end

function animateTool()

	if (toolAnim == "None") then
		RightShoulder.DesiredAngle = -1.57
		return
	end

	if (toolAnim == "Slash") then
		RightShoulder.MaxVelocity = 0.5
		RightShoulder.DesiredAngle = 0
		return
	end

	if (toolAnim == "Lunge") then
		RightShoulder.MaxVelocity = 0.5
		LeftShoulder.MaxVelocity = 0.5
		RightHip.MaxVelocity = 0.5
		LeftHip.MaxVelocity = 0.5
		RightShoulder.DesiredAngle = -1.57
		LeftShoulder.DesiredAngle = 1.0
		RightHip.DesiredAngle = 1.57
		LeftHip.DesiredAngle = 1.0
		return
	end
end

function move(time)
	local amplitude
	local frequency

	if (pose == "Jumping") then
		moveJump()
		return
	end

	if (pose == "Zombie") then
		moveZombie()
		return
	end

	if (pose == "Boogy") then
		moveBoogy()
		return
	end

	if (pose == "Float") then
		moveFloat()
		return
	end

	if (pose == "Punch") then
		movePunch()
		return
	end

	if (pose == "Kick") then
		moveKick()
		return
	end

	if (pose == "Fly") then
		moveFly()
		return
	end

	if (pose == "FreeFall") then
		moveFreeFall()
		return
	end

	if (pose == "Climbing") then
		moveClimb()
		return
	end

	if (pose == "Seated") then
		moveSit()
		return
	end

		amplitude = 0.1
		frequency = 1

	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	if (pose == "Running") then
		amplitude = 1
		frequency = 9
	elseif (pose == "Dancing") then
		amplitude = 2
		frequency = 16
	end

	desiredAngle = amplitude * math.sin(time*frequency)
	if pose~="Dancing" then
		RightShoulder.DesiredAngle = -desiredAngle
		LeftShoulder.DesiredAngle = desiredAngle
		RightHip.DesiredAngle = -desiredAngle
		LeftHip.DesiredAngle = -desiredAngle
	else
		RightShoulder.DesiredAngle = desiredAngle
		LeftShoulder.DesiredAngle = desiredAngle
		RightHip.DesiredAngle = -desiredAngle
		LeftHip.DesiredAngle = -desiredAngle
	end

	local tool = getTool()

	if tool ~= nil then

		animStringValueObject = getToolAnim(tool)

		if animStringValueObject ~= nil then
			toolAnim = animStringValueObject.Value
			-- message recieved, delete StringValue
			animStringValueObject.Parent = nil
			toolAnimTime = time + .3
		end

		if time > toolAnimTime then
			toolAnimTime = 0
			toolAnim = "None"
		end

		animateTool()

	else
		toolAnim = "None"
		toolAnimTime = 0
	end
end


Prompt: -- same as jump for now

Response:
function moveFreeFall()
	RightShoulder.MaxVelocity = 0.5
	LeftShoulder.MaxVelocity = 0.5
	RightShoulder:SetDesiredAngle(3.14)
	LeftShoulder:SetDesiredAngle(-3.14)
	RightHip:SetDesiredAngle(0)
	LeftHip:SetDesiredAngle(0)
end

function moveSit()
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder:SetDesiredAngle(3.14 /2)
	LeftShoulder:SetDesiredAngle(-3.14 /2)
	RightHip:SetDesiredAngle(3.14 /2)
	LeftHip:SetDesiredAngle(-3.14 /2)
end

function getTool()
	for _, kid in ipairs(Figure:GetChildren()) do
		if kid.className == "Tool" then return kid end
	end
	return nil
end

function getToolAnim(tool)
	for _, c in ipairs(tool:GetChildren()) do
		if c.Name == "toolanim" and c.className == "StringValue" then
			return c
		end
	end
	return nil
end

function animateTool()

	if (toolAnim == "None") then
		RightShoulder:SetDesiredAngle(1.57)
		LeftShoulder:SetDesiredAngle(-1.57)
		return
	end

	if (toolAnim == "Slash") then
		RightShoulder.MaxVelocity = 0.5
		RightShoulder:SetDesiredAngle(0)

		LeftShoulder.MaxVelocity = 0.5
		LeftShoulder:SetDesiredAngle(0)
		return
	end

	if (toolAnim == "Lunge") then
		RightShoulder.MaxVelocity = 0.5
		LeftShoulder.MaxVelocity = 0.5
		RightHip.MaxVelocity = 0.5
		LeftHip.MaxVelocity = 0.5
		RightShoulder:SetDesiredAngle(1.57)
		--LeftShoulder:SetDesiredAngle(1.0)
		LeftShoulder:SetDesiredAngle(-1.57)
		RightHip:SetDesiredAngle(1.57)
		LeftHip:SetDesiredAngle(1.0)
		return
	end
end

function move(time)
	local amplitude
	local frequency

	if (pose == "Jumping") then
		moveJump()
		return
	end

	if (pose == "FreeFall") then
		moveFreeFall()
		return
	end

	if (pose == "Seated") then
		moveSit()
		return
	end

	local climbFudge = 0

	if (pose == "Running") then
		RightShoulder.MaxVelocity = 0.15
		LeftShoulder.MaxVelocity = 0.15
		amplitude = 1
		frequency = 9
	elseif (pose == "Climbing") then
		RightShoulder.MaxVelocity = 0.5
		LeftShoulder.MaxVelocity = 0.5
		amplitude = 1
		frequency = 9
		climbFudge = 3.14
	else
		amplitude = 0.1
		frequency = 1
	end

	desiredAngle = amplitude * math.sin(time*frequency)

	RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
	LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
	RightHip:SetDesiredAngle(-desiredAngle)
	LeftHip:SetDesiredAngle(-desiredAngle)

	local tool = getTool()

	if tool then

		animStringValueObject = getToolAnim(tool)

		if animStringValueObject then
			toolAnim = animStringValueObject.Value
			-- message recieved, delete StringValue
			animStringValueObject.Parent = nil
			toolAnimTime = time + .3
		end

		if time > toolAnimTime then
			toolAnimTime = 0
			toolAnim = "None"
		end

		animateTool()

	else
		toolAnim = "None"
		toolAnimTime = 0
	end
end