Prompt: -- module

Response:
local INPUT	= {}

function INPUT.GetActionInput(self, action)
	local input	= "nil"

	if actions[action] then
		local primary, secondary	= actions[action].Primary, actions[action].Secondary

		if primary then
			input	= primary.Name
		elseif secondary then
			input	= secondary.Name
		end
	end

	if REPLACEMENTS[input] then
		input	= REPLACEMENTS[input]
	end

	return string.upper(input)
end

function INPUT.GetAllActionInputs(self, action)
	local inputP, inputS	= "nil", "nil"

	if actions[action] then
		local primary, secondary	= actions[action].Primary, actions[action].Secondary

		if primary then
			inputP	= primary.Name
		end
		if secondary then
			inputS	= secondary.Name
		end
	end

	if REPLACEMENTS[inputP] then
		inputP	= REPLACEMENTS[inputP]
	end
	if REPLACEMENTS[inputS] then
		inputS	= REPLACEMENTS[inputS]
	end

	return string.upper(inputP), string.upper(inputS)
end

if not initialized then
	local keybindChanged	= Instance.new("BindableEvent")
	INPUT.KeybindChanged	= keybindChanged.Event

	actionBegan	= Instance.new("BindableEvent")
	actionEnded	= Instance.new("BindableEvent")

	INPUT.ActionBegan	= actionBegan.Event
	INPUT.ActionEnded	= actionEnded.Event

	-- register actions

	local playerData	= PLAYER_DATA:WaitForChild(PLAYER.Name)
	local keybinds		= playerData:WaitForChild("Keybinds")

	local function Register(action, bindP, bindS)
		local primary, secondary
		if bindP then
			local A, B	= string.match(bindP, "(.-)%.(.+)")

			if A and B then
				primary	= Enum[A][B]
			end
		end
		if bindS then
			local A, B	= string.match(bindS, "(.-)%.(.+)")

			if A and B then
				secondary	= Enum[A][B]
			end
		end

		RegisterAction(action, primary, secondary)
		keybindChanged:Fire(action)
	end

	local function Handle(keybind)
		local action	= keybind.Name
		local bind		= keybind.Value

		if string.match(bind, ";") then
			local bindP, bindS	= string.match(bind, "(.-);(.+)")

			if bindP and bindS then
				Register(action, bindP, bindS)
			elseif bindP then
				Register(action, bindP)
			elseif bindS then
				Register(action, nil, bindS)
			end
		else
			Register(action, bind)
		end
	end

	keybinds.ChildAdded:connect(function(keybind)
		keybind.Changed:connect(function()
			Handle(keybind)
		end)

		RunService.Stepped:wait()
		Handle(keybind)
	end)

	repeat
		RunService.Stepped:wait()
	until #keybinds:GetChildren() > 0

	for _, keybind in pairs(keybinds:GetChildren()) do
		keybind.Changed:connect(function()
			Handle(keybind)
		end)

		Handle(keybind)
	end

	initialized			= true
end

return INPUT


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


Prompt:
-- Compiled with roblox-ts v2.1.0
--[[
	*
	* Represents a connection to a signal.
]]

Response:
local Connection
do
	Connection = setmetatable({}, {
		__tostring = function()
			return "Connection"
		end,
	})
	Connection.__index = Connection
	function Connection.new(...)
		local self = setmetatable({}, Connection)
		return self:constructor(...) or self
	end
	function Connection:constructor(signal, fn)
		self.signal = signal
		self.Connected = true
		self._fn = fn
	end
	function Connection:Disconnect()
		if not self.Connected then
			return nil
		end
		self.Connected = false
		if self.signal._handlerListHead == self then
			self.signal._handlerListHead = self._next
		else
			local prev = self.signal._handlerListHead
			while prev and prev._next ~= self do
				prev = prev._next
			end
			if prev then
				prev._next = self._next
			end
		end
	end
	function Connection:Destroy()
		self:Disconnect()
	end
end


Prompt: --Don't worry about the rest of the code, except for line 25.

Response:
game.Players.PlayerAdded:connect(function(player)
local leader = Instance.new("Folder",player)
leader.Name = "leaderstats"
local Cash = Instance.new("IntValue",leader)
Cash.Name = stat
Cash.Value = ds:GetAsync(player.UserId) or startamount
ds:SetAsync(player.UserId, Cash.Value)
Cash.Changed:connect(function()
ds:SetAsync(player.UserId, Cash.Value)
end)
end)

game.Players.PlayerRemoving:connect(function(player)
ds:SetAsync(player.UserId, player.leaderstats.Money.Value) --Change "Points" to the name of your leaderstat.
end)


Prompt:
--/////////--
--Utilities--
--/////////--

Response:
local function isInRegion(Region, Position)
	local Extents = Region.Size /2

	local Offset = GetOffset(Region, Position)
	return Offset.X < Extents.X and Offset.Y < Extents.Y and Offset.Z < Extents.Z
end

local function isInRegionIgnoreY(Region, Position)
	local Extents = Region.Size /2

	local Offset = GetOffset(Region, Position)
	return Offset.X < Extents.X and Offset.Z < Extents.Z
end


Prompt: --// Ammo Settings

Response:
	Ammo = 15;
	StoredAmmo = 15;
	MagCount = 30; --  If you want infinate ammo, set to math.huge EX. MagCount = math.huge;
	ExplosiveAmmo = 0;


Response:
local  Paint = false

script.Parent.MouseButton1Click:connect(function()
	Paint = not Paint
	handler:FireServer("Lavender",Paint)
end)


Prompt: -- Uber l33t maths to calcluate the angle needed to throw a projectile a distance, given the altitude of the end point and the projectile's velocity

Response:
function AngleOfReach(distance, altitude, velocity)
	local gravity = workspace.Gravity
	local theta = math.atan((velocity^2 + math.sqrt(velocity^4 -gravity*(gravity*distance^2 + 2*altitude*velocity^2)))/(gravity*distance))
	if theta ~= theta then
		theta = math.pi/4
	end
	return(theta)
end


Prompt:
--~strict
--[[
	Packages up the internals of Roact and exposes a public API for it.
]]

Response:
local GlobalConfig = require(script.GlobalConfig)
local createReconciler = require(script.createReconciler)
local createReconcilerCompat = require(script.createReconcilerCompat)
local RobloxRenderer = require(script.RobloxRenderer)
local strict = require(script.strict)
local Binding = require(script.Binding)

local robloxReconciler = createReconciler(RobloxRenderer)
local reconcilerCompat = createReconcilerCompat(robloxReconciler)

local Roact = strict({
	Component = require(script.Component),
	createElement = require(script.createElement),
	createFragment = require(script.createFragment),
	oneChild = require(script.oneChild),
	PureComponent = require(script.PureComponent),
	None = require(script.None),
	Portal = require(script.Portal),
	createRef = require(script.createRef),
	forwardRef = require(script.forwardRef),
	createBinding = Binding.create,
	joinBindings = Binding.join,
	createContext = require(script.createContext),

	Change = require(script.PropMarkers.Change),
	Children = require(script.PropMarkers.Children),
	Event = require(script.PropMarkers.Event),
	Ref = require(script.PropMarkers.Ref),

	mount = robloxReconciler.mountVirtualTree,
	unmount = robloxReconciler.unmountVirtualTree,
	update = robloxReconciler.updateVirtualTree,

	reify = reconcilerCompat.reify,
	teardown = reconcilerCompat.teardown,
	reconcile = reconcilerCompat.reconcile,

	setGlobalConfig = GlobalConfig.set,

	-- APIs that may change in the future without warning
	UNSTABLE = {},
})

return Roact


Prompt:
--[=[
	Observes all descendants that match a predicate as a brio

	@param parent Instance
	@param predicate ((value: Instance) -> boolean)? -- Optional filter
	@return Observable<Brio<Instance>>
]=]

Response:
function RxInstanceUtils.observeDescendantsBrio(parent, predicate)
	assert(typeof(parent) == "Instance", "Bad parent")
	assert(type(predicate) == "function" or predicate == nil, "Bad predicate")

	return Observable.new(function(sub)
		local maid = Maid.new()

		local function handleDescendant(descendant)
			if not predicate or predicate(descendant) then
				local value = Brio.new(descendant)
				maid[descendant] = value
				sub:Fire(value)
			end
		end

		maid:GiveTask(parent.DescendantAdded:Connect(handleDescendant))
		maid:GiveTask(parent.DescendantRemoving:Connect(function(descendant)
			maid[descendant] = nil
		end))

		for _, descendant in pairs(parent:GetDescendants()) do
			handleDescendant(descendant)
		end

		return maid
	end)
end


Prompt: -- Ask server to give points randomly:

Response: PointsService.GiveMePoints:Fire()


Prompt:
--Rescripted by Luckymaxer
--Updated for R15 avatars by StarWars

Response:
Character = script.Parent
Humanoid = Character:FindFirstChild("Humanoid")
Head = Character:FindFirstChild("Head")
Torso = Character:FindFirstChild("Torso") or Character:FindFirstChild("UpperTorso")

Players = game:GetService("Players")
Debris = game:GetService("Debris")

Player = Players:GetPlayerFromCharacter(Character)

Sounds = {
	Explosion = script:WaitForChild("Explosion"),
}

function DestroyScript()
	Debris:AddItem(script, 0.5)
	script:Destroy()
end

if not Head or not Torso or not Humanoid or Humanoid.Health == 0 or not Player then
	DestroyScript()
	return
end

Duration = 30

Humanoid.WalkSpeed = (16 * 1.6)

Sparkles = Instance.new("Sparkles")
Sparkles.SparkleColor = Color3.new(0.8, 0, 0.8)
Sparkles.Enabled = true
Debris:AddItem(Sparkles, Duration)
Sparkles.Parent = Torso

Count = script:FindFirstChild("CoffeeCount")
if not Count then
	Count = Instance.new("IntValue")
	Count.Name = "CoffeeCount"
	Count.Value = 1
	Count.Parent = script
else
	if (Count.Value > 3) then
		if (math.random() > 0.5) then

			ExplosionSound = Sounds.Explosion:Clone()
			Debris:AddItem(ExplosionSound, 5)
			ExplosionSound.Parent = Head
			ExplosionSound:Play()

			local Explosion = Instance.new("Explosion")
			Explosion.ExplosionType = Enum.ExplosionType.NoCraters
			Explosion.BlastRadius = 2
			Explosion.BlastPressure = 1000000
			Explosion.Position = Torso.Position
			Explosion.Parent = game:GetService("Workspace")

		end
	end
	Count.Value = (Count.Value + 1)
end

wait(Duration)

Humanoid.WalkSpeed = 16

DestroyScript()


Prompt: -- Returns the Levenshtein distance between the two given strings

Response:
local utf8_len = utf8.len -- I'm not even sure if this is faster localized, thanks Luau and your massive inconsistency.
local utf8_codes = utf8.codes

local function Levenshtein(String1, String2)
	if String1 == String2 then
		return 0
	end

	local Length1 = utf8_len(String1)
	local Length2 = utf8_len(String2)

	if Length1 == 0 then
		return Length2
	elseif Length2 == 0 then
		return Length1
	end

	local Matrix = {} -- Would love to use table.create for this, but it starts at 0.
	for Index = 0, Length1 do
		Matrix[Index] = {[0] = Index}
	end

	for Index = 0, Length2 do
		Matrix[0][Index] = Index
	end

	local Index = 1
	local IndexSub1

	for _, Code1 in utf8_codes(String1) do
		local Jndex = 1
		local JndexSub1

		for _, Code2 in utf8_codes(String2) do
			local Cost = Code1 == Code2 and 0 or 1
			IndexSub1 = Index - 1
			JndexSub1 = Jndex - 1

			Matrix[Index][Jndex] = math.min(Matrix[IndexSub1][Jndex] + 1, Matrix[Index][JndexSub1] + 1, Matrix[IndexSub1][JndexSub1] + Cost)
			Jndex = Jndex + 1
		end

		Index = Index + 1
	end

	return Matrix[Length1][Length2]
end

local function SortResults(A, B)
	return A.Distance < B.Distance
end

local function FuzzySearch(String, ArrayOfStrings, MaxResults)
	local Results = table.create(#ArrayOfStrings)

	for Index, Value in ipairs(ArrayOfStrings) do
		Results[Index] = {
			String = Value;
			Distance = Levenshtein(String, Value);
		}
	end

	table.sort(Results, SortResults)
	return Results
end

return FuzzySearch


Prompt: --- Runs embedded commands and replaces them

Response:
function Util.RunEmbeddedCommands(dispatcher, str)
	str = encodeCommandEscape(str)

	local results = {}
	-- We need to do this because you can't yield in the gsub function
	for text in str:gmatch("$(%b{})") do
		local doQuotes = true
		local commandString = text:sub(2, #text-1)

		if commandString:match("^{.+}$") then -- Allow double curly for literal replacement
			doQuotes = false
			commandString = commandString:sub(2, #commandString-1)
		end

		results[text] = Util.RunCommandString(dispatcher, commandString)

		if doQuotes then
			if results[text]:find("%s") or results[text] == "" then
				results[text] = string.format("%q", results[text])
			end
		end
	end

	return decodeCommandEscape(str:gsub("$(%b{})", results))
end


Prompt:
-- [[ Dummiez's Data Store Score Board ]]
-- This script updates the Data store with the values from the remote function.

Response:
wait(1)

local score = game:GetService("DataStoreService"):GetOrderedDataStore(script.DataStore.Value)

function script.UploadScore.OnServerInvoke(player)
	local inv = player:FindFirstChild(script.Original.Value)
	score:SetAsync(player.Name, inv:FindFirstChild(script.Score.Value).Value)
end


Prompt:
-----------------
--| Constants |--
-----------------

Response: local COOLDOWN = 5 -- Seconds until tool can be used again


Prompt:
--[[if JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then]]--
--[[JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();]]--
--[[end;]]

Response:
--
local JeffTheKillerHumanoid;
for _,Child in pairs(JeffTheKiller:GetChildren())do
if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
JeffTheKillerHumanoid=Child;
end;
end;
local AttackDebounce=false;
local JeffTheKillerKnife=JeffTheKiller:FindFirstChild("Knife");
local JeffTheKillerHead=JeffTheKiller:FindFirstChild("Head");
local JeffTheKillerHumanoidRootPart=JeffTheKiller:FindFirstChild("HumanoidRootPart");
local WalkDebounce=false;
local Notice=false;
local JeffLaughDebounce=false;
local MusicDebounce=false;
local NoticeDebounce=false;
local ChosenMusic;
JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
local OriginalC0=JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0;
function FindNearestBae()
local NoticeDistance=99999999999999999999999999999999999999;
local TargetMain;
for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and TargetModel.className=="Model"and TargetModel~=JeffTheKiller and TargetModel.Name~=JeffTheKiller.Name and TargetModel:FindFirstChild("Torso")and TargetModel:FindFirstChild("Head")then
local TargetPart=TargetModel:FindFirstChild("Torso");
local FoundHumanoid;
for _,Child in pairs(TargetModel:GetChildren())do
if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
FoundHumanoid=Child;
end;
end;
if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<NoticeDistance then
TargetMain=TargetPart;
NoticeDistance=(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude;
local hit,pos=raycast(JeffTheKillerHumanoidRootPart.Position,(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).unit,500)
if hit and hit.Parent and hit.Parent.ClassName=="Model"and hit.Parent:FindFirstChild("Torso")and hit.Parent:FindFirstChild("Head")then
if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<9 and not AttackDebounce then
Spawn(function()
AttackDebounce=true;
local SwingAnimation=JeffTheKillerHumanoid:LoadAnimation(JeffTheKiller:FindFirstChild("Swing"));
local SwingChoice=math.random(1,2);
local HitChoice=math.random(1,3);
SwingAnimation:Play();
SwingAnimation:AdjustSpeed(1.5+(math.random()*0.1));
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Swing")then
local SwingSound=JeffTheKillerKnife:FindFirstChild("Swing");
SwingSound.Pitch=1+(math.random()*0.04);
SwingSound:Play();
end;
Wait(0.3);
if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<8 then
FoundHumanoid:TakeDamage(999999999999999999999999);
if HitChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit1")then
local HitSound=JeffTheKillerKnife:FindFirstChild("Hit1");
HitSound.Pitch=1+(math.random()*0.04);
HitSound:Play();
elseif HitChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit2")then
local HitSound=JeffTheKillerKnife:FindFirstChild("Hit2");
HitSound.Pitch=1+(math.random()*0.04);
HitSound:Play();
elseif HitChoice==3 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit3")then
local HitSound=JeffTheKillerKnife:FindFirstChild("Hit3");
HitSound.Pitch=1+(math.random()*0.04);
HitSound:Play();
end;
end;
Wait(0.1);
AttackDebounce=false;
end);
end;
end;
end;
end;
end;
return TargetMain;
end;
while Wait(0)do
local TargetPoint=JeffTheKillerHumanoid.TargetPoint;
local Blockage,BlockagePos=RayCast((JeffTheKillerHumanoidRootPart.CFrame+CFrame.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(TargetPoint.X,JeffTheKillerHumanoidRootPart.Position.Y,TargetPoint.Z)).lookVector*(JeffTheKillerHumanoidRootPart.Size.Z/2)).p,JeffTheKillerHumanoidRootPart.CFrame.lookVector,(JeffTheKillerHumanoidRootPart.Size.Z*2.5),{JeffTheKiller,JeffTheKiller})
local Jumpable=false;
if Blockage then
Jumpable=true;
if Blockage and Blockage.Parent and Blockage.Parent.ClassName~="Workspace"then
local BlockageHumanoid;
for _,Child in pairs(Blockage.Parent:GetChildren())do
if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
BlockageHumanoid=Child;
end;
end;
if Blockage and Blockage:IsA("Terrain")then
local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0)));
local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z);
if CellMaterial==Enum.CellMaterial.Water then
Jumpable=false;
end;
elseif BlockageHumanoid or Blockage.ClassName=="TrussPart"or Blockage.ClassName=="WedgePart"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Hat"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Tool"then
Jumpable=false;
end;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and not JeffTheKillerHumanoid.Sit and Jumpable then
JeffTheKillerHumanoid.Jump=true;
end;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHumanoidRootPart and JeffTheKillerHead:FindFirstChild("Jeff_Step")and (JeffTheKillerHumanoidRootPart.Velocity-Vector3.new(0,JeffTheKillerHumanoidRootPart.Velocity.y,0)).magnitude>=5 and not WalkDebounce and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
Spawn(function()
WalkDebounce=true;
local FiredRay=Ray.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(0,-4,0));
local RayTarget,endPoint=Game:GetService("Workspace"):FindPartOnRay(FiredRay,JeffTheKiller);
if RayTarget then
local JeffTheKillerHeadFootStepClone=JeffTheKillerHead:FindFirstChild("Jeff_Step"):Clone();
JeffTheKillerHeadFootStepClone.Parent=JeffTheKillerHead;
JeffTheKillerHeadFootStepClone:Play();
JeffTheKillerHeadFootStepClone:Destroy();
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed<17 then
Wait(0.4);
elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed>17 then
Wait(0.15);
end
end;
WalkDebounce=false;
end);
end;
local MainTarget=FindNearestBae();
local FoundHumanoid;
if MainTarget then
for _,Child in pairs(MainTarget.Parent:GetChildren())do
if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
FoundHumanoid=Child;
end;
end;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and MainTarget.Parent and FoundHumanoid and FoundHumanoid.Jump then
JeffTheKillerHumanoid.Jump=true;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<25 then
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and not JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then
JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=1;
JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Play();
end;
elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>25 then
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then
if not JeffLaughDebounce then
Spawn(function()
JeffLaughDebounce=true;
repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0;
JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0;
JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop();
JeffLaughDebounce=false;
end);
end;
end;
end;
if not ChosenMusic and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<50 then
local MusicChoice=math.random(1,2);
if MusicChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1")then
ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1");
elseif MusicChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2")then
ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2");
end;
if JeffTheKillerScript and JeffTheKiller and ChosenMusic and not ChosenMusic.IsPlaying then
ChosenMusic.Volume=0.5;
ChosenMusic:Play();
end;
elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>50 then
if JeffTheKillerScript and JeffTheKiller and ChosenMusic and ChosenMusic.IsPlaying then
if not MusicDebounce then
Spawn(function()
MusicDebounce=true;
repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0;
if ChosenMusic then
ChosenMusic.Volume=1;
ChosenMusic:Stop();
end;
ChosenMusic=nil;
MusicDebounce=false;
end);
end;
end;
end;
if not MainTarget and not JeffLaughDebounce then
Spawn(function()
JeffLaughDebounce=true;
repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0;
JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0;
JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop();
JeffLaughDebounce=false;
end);
end;
if not MainTarget and not MusicDebounce then
Spawn(function()
MusicDebounce=true;
repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0;
if ChosenMusic then
ChosenMusic.Volume=0;
ChosenMusic:Stop();
end;
ChosenMusic=nil;
MusicDebounce=false;
end);
end;
if MainTarget then
Notice=true;
if Notice and not NoticeDebounce and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Susto2")then
JeffTheKillerHead:FindFirstChild("Jeff_Susto2"):Play();
NoticeDebounce=true;
end
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
if MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>5 then
JeffTheKillerHumanoid.WalkSpeed=15;
elseif MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<5 then
JeffTheKillerHumanoid.WalkSpeed=0.004;
end;
JeffTheKillerHumanoid:MoveTo(MainTarget.Position+(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain"));
local NeckRotation=(JeffTheKiller:FindFirstChild("Torso").Position.Y-MainTarget.Parent:FindFirstChild("Head").Position.Y)/10;
if NeckRotation>-1.5 and NeckRotation<1.5 then
JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=OriginalC0*CFrame.fromEulerAnglesXYZ(NeckRotation,0,0);
end;
if NeckRotation<-1.5 then
JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,-0.993636549,0.112633869,0,0.112633869,0.993636549);
elseif NeckRotation>1.5 then
JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0.996671617,0.081521146,0,0.081521146,-0.996671617);
end;
else
end;
else
Notice=false;
NoticeDebounce=false;
JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
local RandomWalk=math.random(1,150);
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
JeffTheKillerHumanoid.WalkSpeed=12;
if RandomWalk==1 then
JeffTheKillerHumanoid:MoveTo(Game:GetService("Workspace"):FindFirstChild("Terrain").Position+Vector3.new(math.random(-2048,2048),0,math.random(-2048,2048)),Game:GetService("Workspace"):FindFirstChild("Terrain"));
end;
end;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid then
JeffTheKillerHumanoid.DisplayDistanceType="None";
JeffTheKillerHumanoid.HealthDisplayDistance=0;
JeffTheKillerHumanoid.Name="ColdBloodedKiller";
JeffTheKillerHumanoid.NameDisplayDistance=0;
JeffTheKillerHumanoid.NameOcclusion="EnemyOcclusion";
JeffTheKillerHumanoid.AutoJumpEnabled=true;
JeffTheKillerHumanoid.AutoRotate=true;
JeffTheKillerHumanoid.MaxHealth=500;
JeffTheKillerHumanoid.JumpPower=60;
JeffTheKillerHumanoid.MaxSlopeAngle=89.9;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoJumpEnabled then
JeffTheKillerHumanoid.AutoJumpEnabled=true;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoRotate then
JeffTheKillerHumanoid.AutoRotate=true;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.PlatformStand then
JeffTheKillerHumanoid.PlatformStand=false;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Sit then
JeffTheKillerHumanoid.Sit=false;
end;
end;


Prompt: --= Variables =--

Response:
local camera = game.Workspace.CurrentCamera

local TweeningService = game:GetService("TweenService")

local UIS = game:GetService('UserInputService')

local Bar = script.Parent:WaitForChild('STMBackground'):WaitForChild('Bar')

local player = game.Players.LocalPlayer

local NormalWalkSpeed = 10
local NewWalkSpeed = 30

local power = 10

local sprinting = false

repeat wait() until game.Players.LocalPlayer.Character

local character = player.Character

local Humanoid = character.Humanoid
local runninganim = Humanoid:LoadAnimation(script.Parent.Runninganim)


Response:
end
wait(0.15)

until game.Workspace.DoorFlashing.Value == false

end

end
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)


Prompt: -- SOME OTHER VARIABLES --

Response:
local Animations
local loopConnection
local holdingConnection


Prompt: --[[Engine]]

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

	--Horsepower Curve
	local fgc_h=_Tune.Horsepower/100
	local fgc_n=_Tune.PeakRPM/1000
	local fgc_a=_Tune.PeakSharpness
	local fgc_c=_Tune.CurveMult

	function FGC(x)
		x=x/1000
		return (((-(x-fgc_n)^2)*math.min(fgc_h/(fgc_n^2),fgc_c^(fgc_n/fgc_h)))+fgc_h)*(x-((x^fgc_a)/((fgc_a*fgc_n)^(fgc_a-1))))
	end
	local PeakFGC = FGC(_Tune.PeakRPM)

	--Plot Current Horsepower
	function GetCurve(x,gear)
		local hp=math.max((FGC(x)*_Tune.Horsepower)/PeakFGC,0)
		return hp,hp*(_Tune.EqPoint/x)*_Tune.Ratios[gear+2]*fFD*hpScaling
	end

	--Output Cache
	local CacheTorque = true
	local HPCache = {}
	local HPInc = 100

	if CacheTorque then
		for gear,ratio in pairs(_Tune.Ratios) do
			local hpPlot = {}
			for rpm = math.floor(_Tune.IdleRPM/HPInc),math.ceil((_Tune.Redline+100)/HPInc) do
				local tqPlot = {}
				tqPlot.Horsepower,tqPlot.Torque = GetCurve(rpm*HPInc,gear-2)
				hp1,tq1 = GetCurve((rpm+1)*HPInc,gear-2)
				tqPlot.HpSlope = (hp1 - tqPlot.Horsepower)/(HPInc/1000)
				tqPlot.TqSlope = (tq1 - tqPlot.Torque)/(HPInc/1000)
				hpPlot[rpm] = tqPlot
			end
			table.insert(HPCache,hpPlot)
		end
	end

	--Powertrain

	--Update RPM
	function RPM()
		--Neutral Gear
		if _CGear==0 then _ClutchOn = false end

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

		--Determine RPM
		local maxSpin=0
		for i,v in pairs(Drive) do
			if v.RotVelocity.Magnitude>maxSpin then maxSpin = v.RotVelocity.Magnitude end
		end
		if _ClutchOn then
			local aRPM = math.max(math.min(maxSpin*_Tune.Ratios[_CGear+2]*fFDr,_Tune.Redline+100),revMin)
			local clutchP = math.min(math.abs(aRPM-_RPM)/_Tune.ClutchTol,.9)
			_RPM = _RPM*clutchP  +  aRPM*(1-clutchP)
		else
			if _GThrot-(_Tune.IdleThrottle/100)>0 then
				if _RPM>_Tune.Redline then
					_RPM = _RPM-_Tune.RevBounce*2
				else
					_RPM = math.min(_RPM+_Tune.RevAccel*_GThrot,_Tune.Redline+100)
				end
			else
				_RPM = math.max(_RPM-_Tune.RevDecay,revMin)
			end
		end

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

	--Apply Power
	function Engine()
		--Get Torque
		local maxSpin=0
		for i,v in pairs(Drive) do
			if v.RotVelocity.Magnitude>maxSpin then maxSpin = v.RotVelocity.Magnitude end
		end
		if _ClutchOn then
			if CacheTorque then
				local cTq = HPCache[_CGear+2][math.floor(math.min(_Tune.Redline,math.max(_Tune.IdleRPM,_RPM))/HPInc)]
				_HP = cTq.Horsepower+(cTq.HpSlope*(_RPM-math.floor(_RPM/HPInc))/1000)
				_OutTorque = cTq.Torque+(cTq.TqSlope*(_RPM-math.floor(_RPM/HPInc))/1000)
			else
				_HP,_OutTorque = GetCurve(_RPM,_CGear)

			end
			local iComp =(car.Body.CarName.Value.VehicleSeat.CFrame.lookVector.y)*cGrav
			if _CGear==-1 then iComp=-iComp end
			_OutTorque = _OutTorque*math.max(1,(1+iComp))
		else
			_HP,_OutTorque = 0,0
		end

		--Automatic Transmission
		if _TMode == "Auto" and _IsOn then
			_ClutchOn = true
			if _CGear == 0 then _CGear = 1 end
			if _CGear >= 1 then
				if _CGear==1 and _GBrake > 0  and car.Body.CarName.Value.VehicleSeat.Velocity.Magnitude < 20 then
					_CGear = -1
				else
					if _Tune.AutoShiftMode == "RPM" then
						if _RPM>(_Tune.PeakRPM+_Tune.AutoUpThresh) then
							_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
						elseif math.max(math.min(maxSpin*_Tune.Ratios[_CGear+1]*fFDr,_Tune.Redline+100),_Tune.IdleRPM)<(_Tune.PeakRPM-_Tune.AutoDownThresh) then
							_CGear=math.max(_CGear-1,1)
						end
					else
						if car.Body.CarName.Value.VehicleSeat.Velocity.Magnitude > math.ceil(wDRatio*(_Tune.PeakRPM+_Tune.AutoUpThresh)/_Tune.Ratios[_CGear+2]/fFD) then
							_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
						elseif car.Body.CarName.Value.VehicleSeat.Velocity.Magnitude < math.ceil(wDRatio*(_Tune.PeakRPM-_Tune.AutoDownThresh)/_Tune.Ratios[_CGear+1]/fFD) then
							_CGear=math.max(_CGear-1,1)
						end
					end
				end
			else
				if _GThrot-(_Tune.IdleThrottle/100) > 0 and car.Body.CarName.Value.VehicleSeat.Velocity.Magnitude < 20 then
					_CGear = 1
				end
			end
		end

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

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

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

			--AWD Torque Scaling
			if _Tune.Config == "AWD" then _OutTorque = _OutTorque*rtTwo end

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

			_TCSActive = false
			_ABSActive = false
			--Output
			if _PBrake and ((_Tune.Config ~= "FWD" and (((v.Name=="FL" or v.Name=="FR") and car.Body.CarName.Value.VehicleSeat.Velocity.Magnitude<20) or ((v.Name=="RR" or v.Name=="RL") and car.Body.CarName.Value.VehicleSeat.Velocity.Magnitude>=20))) or (_Tune.Config == "FWD" and (v.Name=="RR" or v.Name=="RL"))) then
				--PBrake
				v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*PBrakeForce
				v["#AV"].angularvelocity=Vector3.new()
			else
				--Apply Power
				if ((_TMode == "Manual" or _TMode == "Semi") and _GBrake==0) or (_TMode == "Auto" and ((_CGear>-1 and _GBrake==0 ) or (_CGear==-1 and _GThrot-(_Tune.IdleThrottle/100)==0 )))then
					local driven = false
					for _,a in pairs(Drive) do if a==v then driven = true end end
					if driven then
						local on=1
						if not script.Parent.IsOn.Value then on=0 end
						local throt = _GThrot
						if _TMode == "Auto" and _CGear==-1 then throt = _GBrake end

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

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

				--Brakes
				else
					local brake = _GBrake
					if _TMode == "Auto" and _CGear==-1 then brake = _GThrot end

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

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


Prompt: --Made by Luckymaxer

Response:
Character = script.Parent
Humanoid = Character:FindFirstChild("Humanoid")

Debris = game:GetService("Debris")

if Humanoid then

	for i, v in pairs(Humanoid:GetChildren()) do
		if v:IsA("Animator") then
			v:Destroy()
		end
	end

	function SetHumanoid()
		Humanoid.AutoRotate = false
		Humanoid.PlatformStand = false
		Humanoid.WalkSpeed = 0
		Humanoid.Jump = false
		Humanoid:ChangeState(Enum.HumanoidStateType.Freefall)
	end

	function UnequipTools()
		Humanoid:UnequipTools()
	end

	HumanoidChanged = Humanoid.Changed:connect(SetHumanoid)
	ToolEquipped = Character.ChildAdded:connect(UnequipTools)

	SetHumanoid()
	UnequipTools()

end

wait(10)

for i, v in pairs({HumanoidChanged, ToolEquipped}) do
	if v then
		v:disconnect()
	end
end

Humanoid.AutoRotate = true
Humanoid.PlatformStand = false
Humanoid.WalkSpeed = 16

script:Destroy()


Prompt:
--legends:
--[s]: speed
--[d]: damper
--[t]: target
--[p]: position
--[v]: velocity

Response:
local SpeedSpring = Spring.spring.new()
SpeedSpring.s = 16
local SwaySpring = Spring.spring.new(0)
SwaySpring.s = 4
SwaySpring.d = 1
local SwaySpeed = Spring.spring.new(0)
SwaySpeed.s = 6
SwaySpeed.d = 1
SwaySpeed.t = 1
local DamageSpring = Spring.spring.new(Vector3.new())
DamageSpring.s = 20
DamageSpring.d = 0.75
local ImpactSpring = Spring.spring.new(Vector3.new())
ImpactSpring.s	= 15
ImpactSpring.d	= 1

local OffStates = {"Jumping", "PlatformStanding", "Ragdoll", "Seated", "FallingDown", "FreeFalling", "GettingUp", "Swimming", "Climbing"}
local OnStates = {"Running"}

local speed = 0
local distance = 0
local swayT = 0
local lastHealth = Humanoid.Health
local isFalling = false
local debounce = false

for _, state in pairs(OffStates) do
	Humanoid[state]:Connect(function()
		active = false
	end)
end

for _, state in pairs(OnStates) do
	Humanoid[state]:Connect(function(speed)
		active = (speed > 1)
	end)
end

local function GetHit(d)
  	local l = CFrame.new():VectorToObjectSpace(d)
  	DamageSpring:Accelerate(Vector3.new(l.Z, 0, -l.X) * 0.25)
	Thread:Wait(0.03)
	DamageSpring:Accelerate(Vector3.new(-l.Z, 0, 0) * 0.25)
end

local function HealthChanged(health)
	if lastHealth > health and lastHealth - health >= 5 then
		if Humanoid.Health ~= Humanoid.MaxHealth then
			local damageDealt = lastHealth - health
			Thread:Spawn(function()
				local dir = Vector3.new(0, 0, 0)
				if Humanoid:FindFirstChild("creator") then
					local killer = Humanoid.creator
					local killerChar = killer.Value.Character
					local killerHum = killerChar:FindFirstChildOfClass("Humanoid")
					local killerHRP = killerChar:FindFirstChild("HumanoidRootPart")
					if killerChar and killerHRP and killerHum and killerHum.Health > 0 then
						dir = (Camera.CFrame.p - killerHRP.Position).Unit
					else
						dir = (Camera.CFrame.p - HumanoidRootPart.Position).Unit
					end
				else
					dir = (Camera.CFrame.p - HumanoidRootPart.Position).Unit
				end
				GetHit((-damageDealt / 12 + 4.166666666666667) * dir)
			end)
		end
	end
	lastHealth = health
end

Humanoid.FreeFalling:Connect(function(falling)
	isFalling = falling
	if isFalling and not debounce then
		debounce = true
		local maxHeight, lowHeight = 0, math.huge
		while isFalling do
			local height = HumanoidRootPart.Position.Y
			if height > maxHeight then
				maxHeight = height
			end
			if height < lowHeight then
				lowHeight = height
			end
			Thread:Wait()
		end
		local fallHeight = maxHeight - lowHeight
		local impactHeight = fallHeight - GeneralSettings.LowestFallHeight
		if impactHeight > 0 then
			--local damage = impactHeight * (humanoid.MaxHealth / GeneralSettings.MaxFallHeight)
			--humanoid:TakeDamage(damage)
			ImpactSpring:Accelerate(Vector3.new(0, 0, math.random(-impactHeight, impactHeight) / 5))
		end
		debounce = false
	end
end)

RunService.RenderStepped:Connect(function(dt)
	if Character and HumanoidRootPart and Humanoid then
		local RelativeVelocity = CFrame.new().VectorToObjectSpace(HumanoidRootPart.CFrame, HumanoidRootPart.Velocity)
		SpeedSpring.t = (active and Humanoid.Health > 0) and (Vector3.new(1, 0, 1) * RelativeVelocity).Magnitude or 0
		speed = SpeedSpring.p
		distance = distance + dt * SpeedSpring.p
		swayT = swayT + dt * SwaySpeed.p
		if GeneralSettings.FpsCam then
			local CF = CFrame.new()
			CF = Camera.CoordinateFrame
		    local T = swayT
		    local S, D = 0.5 * speed, distance * 6.28318 / 4 * 3 / 4
		    local SS = SwaySpring.p
			local BobAngles = Math.FromAxisAngle(S * math.cos(D + 2) / 2048, S * math.cos(D / 2) / 2048, S * math.cos(D / 2 + 2) / 4096) * Math.FromAxisAngle(SS * math.cos(2 * T + 2) / 2048, SS * math.cos(2 * T / 2) / 2048, SS * math.cos(2 * T / 2 - 2) / 4096)
			local DamageAngles = Math.FromAxisAngle(DamageSpring.p)
			local ImpactAngles = Math.FromAxisAngle(ImpactSpring.p)
			if GeneralSettings.CamBobble then
				CF = CF * BobAngles
			end
			if GeneralSettings.CamHurt then
				CF = CF * DamageAngles
			end
			if GeneralSettings.CamImpact then
				CF = CF * ImpactAngles
			end
			Camera.CoordinateFrame = CF
		end
	end
end)

Humanoid.HealthChanged:Connect(HealthChanged)

Humanoid.Died:Connect(function()
	HealthChanged(20)
end)

HealthChanged(Humanoid.Health)


Prompt: --[should be false OR DISABLED]

Response:
		--WeaponsSystem.camera:setEnabled(true)

	end

	--Setup weapon tools and listening
	WeaponsSystem.connections.weaponAdded = CollectionService:GetInstanceAddedSignal(WEAPON_TAG):Connect(WeaponsSystem.onWeaponAdded)
	WeaponsSystem.connections.weaponRemoved = CollectionService:GetInstanceRemovedSignal(WEAPON_TAG):Connect(WeaponsSystem.onWeaponRemoved)

	for _, instance in pairs(CollectionService:GetTagged(WEAPON_TAG)) do
		WeaponsSystem.onWeaponAdded(instance)
	end

	WeaponsSystem.doingSetup = false
	WeaponsSystem.didSetup = true
end

function WeaponsSystem.onCharacterAdded(character)
	-- Make it so players unequip weapons while seated, then reequip weapons when they become unseated
	local humanoid = character:WaitForChild("Humanoid")
	WeaponsSystem.connections.seated = humanoid.Seated:Connect(function(isSeated)
		if isSeated then
			WeaponsSystem.seatedWeapon = character:FindFirstChildOfClass("Tool")
			humanoid:UnequipTools()
			WeaponsSystem.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)


Prompt: -- Checkpoint counters

Response:
numCheckpointsHit = 0
numCheckpoints = #checkpointList
_numLaps = 0


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

Response:
game.Workspace.doorleft.l13.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l33.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l43.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l63.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(1003)

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


Prompt: -- function

Response:
local function SetStartGame(value)
	startGame = value
end

local function ResetGame()
	left = 0
	right = 0
	moveDir = 0
	SetStartGame(false)

end

local function SetWalkSpeed(speed)
	humanoid.WalkSpeed = speed
end

function SmoothDie()
	SetStartGame(false)
	if humanoid.Health > 0 then
		moveDir = 0
		SetWalkSpeed(0)


Prompt: -- (Hat Giver Script - Loaded.)

Response:
debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "Hat"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle"
		p.formFactor = 0
		p.Size = Vector3.new(1,1,1)
		p.BottomSurface = 0
		p.TopSurface = 0
		p.Locked = true
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentForward = Vector3.new(-0, -0.151, -0.989)
		h.AttachmentPos = Vector3.new(0.05, -0.3, 0)
		h.AttachmentRight = Vector3.new(1, 0, 0)
		h.AttachmentUp = Vector3.new(0, 0.989, -0.151)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)


Prompt: -- Updating weapons HUD

Response:
function updateWeaponHud(mag, ammo)
	clipUI.Text = mag
	ammoUI.Text = ammo
	ammoUI.AmmoEffect.Text = ammo
	if ammo > ammoLeft then
		spawn(ammoEffect)
	end
	if mag == 0 then
		clipUI.TextColor3 =  Color3.new(227/255, 29/255, 32/255)
	else
		clipUI.TextColor3 = Color3.new(199/255, 199/255, 199/255)
	end
	if ammo == 0 then
		ammoUI.TextColor3 =  Color3.new(227/255, 29/255, 32/255)
	else
		ammoUI.TextColor3 = Color3.new(199/255, 199/255, 199/255)
	end
	currentAmmo = mag
	ammoLeft = ammo
end

if configs.infiniteAmmo == true then
	updateWeaponHud(currentAmmo, clipSize)
else
	updateWeaponHud(currentAmmo, ammoLeft)
end

function equip()
	local char = player.Character

	-- Setup joint variables
	if player.Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
		neck = player.Character.Torso.Neck
		oldNeckC0 = neck.C0
		shoulder = player.Character.Torso:FindFirstChild("Right Shoulder")
		oldShoulderC0 = shoulder.C0
	else
		neck = player.Character.Head.Neck
		oldNeckC0 = neck.C0
		shoulder = player.Character.RightUpperArm:FindFirstChild("RightShoulder")
		oldShoulderC0 = shoulder.C0
	end

	-- Remember old mouse icon and update current
	hud.AmmoHud:TweenPosition(UDim2.new(0.98, 0, 0.95, 0), "InOut", "Quad", 0.3, true)
	runService:BindToRenderStep("Sights", Enum.RenderPriority.Last.Value, function()
		hud.Crosshair.Position = UDim2.new(0, mouse.X, 0, mouse.Y)
	end)
	userInputService.MouseIconEnabled = false
	hud.Crosshair.Visible = true

	-- Bind TouchMoved event if on mobile. Otherwise connect to renderstepped
	if userInputService.TouchEnabled then
		connection = userInputService.TouchMoved:Connect(mobileFrame)
	else
		connection = render:Connect(pcFrame)
	end

	-- Bind TouchStarted and TouchEnded. Used to determine if character should rotate
	-- during touch input
	userInputService.TouchStarted:Connect(function(touch, processed)
		mobileShouldTrack = not processed
	end)
	userInputService.TouchEnded:Connect(function(touch, processed)
		mobileShouldTrack = false
	end)

	-- Fire server's equip event
	game.ReplicatedStorage:WaitForChild("ROBLOX_PistolEquipEvent"):FireServer()

	-- Bind event for when mouse is clicked to fire server's fire event
	mouse.Button1Down:Connect(function()
		game.ReplicatedStorage:WaitForChild("ROBLOX_PistolFireEvent"):FireServer(mouse.Hit.p)
		updateWeaponHud(currentAmmo, ammoLeft)
	end)

	-- Bind reload event to mobile button and r key
	contextActionService:BindActionToInputTypes("Reload", function()
		game.ReplicatedStorage:WaitForChild("ROBLOX_PistolReloadEvent"):FireServer()
	end, true, "r")

	-- If game uses filtering enabled then need to update server while tool is
	-- held by character.
	if workspace.FilteringEnabled then
		while connection do
			wait()
			game.ReplicatedStorage:WaitForChild("ROBLOX_PistolUpdateEvent"):FireServer(neck.C0, shoulder.C0)
		end
	end
end

local function unequip()
	if connection then connection:disconnect() end
	contextActionService:UnbindAction("Reload")
	game.ReplicatedStorage:WaitForChild("ROBLOX_PistolUnequipEvent"):FireServer()
	hud.AmmoHud:TweenPosition(UDim2.new(1.5, 0, 0.95, 0), "InOut", "Quad", 0.3, true)
	runService:UnbindFromRenderStep("Sights")
	userInputService.MouseIconEnabled = true
	hud.Crosshair.Visible = false
	neck.C0 = oldNeckC0
	shoulder.C0 = oldShoulderC0
end

function hitmarkerUpdate()
	hud.Crosshair.Hitmarker.Visible = true
	wait(0.1)
	hud.Crosshair.Hitmarker.Visible = false
end


Prompt: --Steering

Response:
Tune.SteerD			= 750
Tune.SteerMaxTorque	= 85000
Tune.SteerP			= 140000

Tune.SteerInner		= 22
Tune.SteerOuter		= 20
Tune.SteerSpeed		= .15
Tune.SteerDecay		= 378					--Speed[SPS] of gradient cutoff
Tune.MinSteer		= .1
Tune.MSteerExp		= 1


Prompt: --Precalculated paths

Response:
local t,f,n=true,false,{}
local r={
[58]={{26,27,28,29,31,32,34,35,39,41,30,56,58},t},
[49]={{26,27,28,44,45,49},t},
[16]={n,f},
[19]={{26,27,28,29,31,32,34,35,39,41,30,56,58,20,19},t},
[59]={{26,27,28,29,31,32,34,35,39,41,59},t},
[63]={{26,27,28,29,31,32,34,35,39,41,30,56,58,23,62,63},t},
[34]={{26,27,28,29,31,32,34},t},
[21]={{26,27,28,29,31,32,34,35,39,41,30,56,58,20,21},t},
[48]={{26,27,28,44,45,49,48},t},
[27]={{26,27},t},
[14]={n,f},
[31]={{26,27,28,29,31},t},
[56]={{26,27,28,29,31,32,34,35,39,41,30,56},t},
[29]={{26,27,28,29},t},
[13]={n,f},
[47]={{26,27,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{26,27,28,44,45},t},
[57]={{26,27,28,29,31,32,34,35,39,41,30,56,57},t},
[36]={{26,27,28,29,31,32,33,36},t},
[25]={{26,25},t},
[71]={{26,27,28,29,31,32,34,35,39,41,59,61,71},t},
[20]={{26,27,28,29,31,32,34,35,39,41,30,56,58,20},t},
[60]={{26,27,28,29,31,32,34,35,39,41,60},t},
[8]={n,f},
[4]={n,f},
[75]={{26,27,28,29,31,32,34,35,39,41,59,61,71,72,76,73,75},t},
[22]={{26,27,28,29,31,32,34,35,39,41,30,56,58,20,21,22},t},
[74]={{26,27,28,29,31,32,34,35,39,41,59,61,71,72,76,73,74},t},
[62]={{26,27,28,29,31,32,34,35,39,41,30,56,58,23,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{26,27,28,29,31,32,33,36,37},t},
[2]={n,f},
[35]={{26,27,28,29,31,32,34,35},t},
[53]={{26,27,28,44,45,49,48,47,52,53},t},
[73]={{26,27,28,29,31,32,34,35,39,41,59,61,71,72,76,73},t},
[72]={{26,27,28,29,31,32,34,35,39,41,59,61,71,72},t},
[33]={{26,27,28,29,31,32,33},t},
[69]={{26,27,28,29,31,32,34,35,39,41,60,69},t},
[65]={{26,27,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,65},t},
[26]={{26},t},
[68]={{26,27,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,67,68},t},
[76]={{26,27,28,29,31,32,34,35,39,41,59,61,71,72,76},t},
[50]={{26,27,28,44,45,49,48,47,50},t},
[66]={{26,27,28,29,31,32,34,35,39,41,30,56,58,20,19,66},t},
[10]={n,f},
[24]={{26,25,24},t},
[23]={{26,27,28,29,31,32,34,35,39,41,30,56,58,23},t},
[44]={{26,27,28,44},t},
[39]={{26,27,28,29,31,32,34,35,39},t},
[32]={{26,27,28,29,31,32},t},
[3]={n,f},
[30]={{26,27,28,29,31,32,34,35,39,41,30},t},
[51]={{26,27,28,44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{26,27,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,67},t},
[61]={{26,27,28,29,31,32,34,35,39,41,59,61},t},
[55]={{26,27,28,44,45,49,48,47,52,53,54,55},t},
[46]={{26,27,28,44,45,49,48,47,46},t},
[42]={{26,27,28,29,31,32,34,35,38,42},t},
[40]={{26,27,28,29,31,32,34,35,40},t},
[52]={{26,27,28,44,45,49,48,47,52},t},
[54]={{26,27,28,44,45,49,48,47,52,53,54},t},
[43]={n,f},
[7]={n,f},
[9]={n,f},
[41]={{26,27,28,29,31,32,34,35,39,41},t},
[17]={n,f},
[38]={{26,27,28,29,31,32,34,35,38},t},
[28]={{26,27,28},t},
[5]={n,f},
[64]={{26,27,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64},t},
}
return r


Prompt: --- RUNTIME ---

Response:
for _,NPC in pairs(workspace.Enemies:GetChildren()) do
	Distribute(NPC)
end

workspace.Enemies.ChildAdded:Connect(Distribute)


Prompt: --easter egg

Response:
mouse.KeyDown:connect(function(key)
	if key=="o" then
		Heat = BlowupTemp-11
	end
end)

if not FE then

radiator.Oil.Enabled = false
radiator.Antifreeze.Enabled = false
radiator.Liquid.Volume = 0
radiator.Fan:Play()
radiator.Fan.Pitch = 1+FanSpeed
radiator.Steam:Play()
radiator.Liquid:Play()
script.Blown.Value = false

while wait(.2) do
	if Heat > FanTemp and Fan == true then
		FanCool = -FanSpeed
		radiator.Fan.Volume = FanVolume
	else
		FanCool = 0
		radiator.Fan.Volume = 0
	end

	Load = ((script.Parent.Parent.Values.Throttle.Value*script.Parent.Parent.Values.RPM.Value*10*OverheatSpeed)/math.ceil((car.DriveSeat.Velocity.magnitude+.0000001)/100)/75000)-CoolingEfficiency
	Heat = math.max(RunningTemp,(Heat+Load)+FanCool)

	if Heat >= BlowupTemp then
		Heat = BlowupTemp
		radiator.Break:Play()
		radiator.Liquid.Volume = .5
		radiator.Oil.Enabled = true
		radiator.Antifreeze.Enabled = true
		script.Parent.Parent.IsOn.Value = false
		script.Blown.Value = true
	elseif Heat >= BlowupTemp-10 then
		radiator.Smoke.Transparency = NumberSequence.new((BlowupTemp-Heat)/10,1)
		radiator.Smoke.Enabled = true
		radiator.Steam.Volume = math.abs(((BlowupTemp-Heat)-10)/10)
	else
		radiator.Smoke.Enabled = false
		radiator.Steam.Volume = 0
	end

	script.Celsius.Value = Heat
	script.Parent.Temp.Text = math.floor(Heat).."°c"
end

else

	handler:FireServer("Initialize",FanSpeed)
while wait(.2) do

	if Heat > FanTemp and Fan == true then
		FanCool = -FanSpeed
		handler:FireServer("FanVolume",FanVolume)
	else
		FanCool = 0
		handler:FireServer("FanVolume",0)
	end

	Load = ((script.Parent.Parent.Values.Throttle.Value*script.Parent.Parent.Values.RPM.Value*10*OverheatSpeed)/math.ceil((car.DriveSeat.Velocity.magnitude+.0000001)/100)/75000)-CoolingEfficiency
	Heat = math.max(RunningTemp,(Heat+Load)+FanCool)

	if Heat >= BlowupTemp then
		Heat = BlowupTemp
		handler:FireServer("Blown")
		script.Parent.Parent.IsOn.Value = false
		script.Blown.Value = true
	elseif Heat >= BlowupTemp-10 then
		handler:FireServer("Smoke",true,BlowupTemp,Heat)
	else
		handler:FireServer("Smoke",false,BlowupTemp,Heat)
	end

	script.Celsius.Value = Heat
	script.Parent.Temp.Text = math.floor(Heat).."°c"
end
end


Prompt: --Automatic Gauge Scaling

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

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

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

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

local blns = Instance.new("Frame",gauges.Boost)
blns.Name = "blns"
blns.BackgroundTransparency = 1
blns.BorderSizePixel = 0
blns.Size = UDim2.new(0,0,0,0)
for i=0,12 do
	local bln = gauges.bln:clone()
	bln.Parent = blns
	bln.Rotation = 45+270*(i/12)
	if i%2==0 then
		bln.Frame.Size = UDim2.new(0,2,0,7)
		bln.Frame.Position = UDim2.new(0,-1,0,40)
	else
		bln.Frame.Size = UDim2.new(0,3,0,5)
	end
	bln.Num:Destroy()
	bln.Visible=true
end

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

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

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

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

values.RPM.Changed:connect(function()
	gauges.Tach.Needle.Rotation = 45 + 225 * math.min(1,values.RPM.Value / (revEnd*1000))
end)

local _TCount = _Tune.Turbochargers
local _SCount = _Tune.Superchargers

if _TCount~=0 or _SCount~=0 then
	values.Boost.Changed:connect(function()
		local _T = 0
		local _S = 0
		if _TCount~=0 then _T = _Tune.T_Boost*_TCount end
		if _SCount~=0 then _S = _Tune.S_Boost*_SCount end
		local tboost = (math.floor(values.BoostTurbo.Value)*1.2)-(_T/5)
		local sboost = math.floor(values.BoostSuper.Value)
		gauges.Boost.Needle.Rotation = 45 + 270 * math.min(1,values.Boost.Value/(_T+_S))
		gauges.PSI.Text = tostring(math.floor(tboost+sboost).." PSI")
	end)
else
	gauges.Boost:Destroy()
end

values.Gear.Changed:connect(function()
	local gearText = values.Gear.Value
	if gearText == 0 then gearText = "N"
	elseif gearText == -1 then gearText = "R"
	end
	gauges.Gear.Text = gearText
end)

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

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

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

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

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

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

function PBrake()
	gauges.PBrake.Visible = values.PBrake.Value
end
values.PBrake.Changed:connect(PBrake)

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

values.Velocity.Changed:connect(function(property)
	gauges.Speedo.Needle.Rotation = 45 + 225 * math.min(1,UNITS[currentUnits].scaling*values.Velocity.Value.Magnitude/UNITS[currentUnits].maxSpeed)
	gauges.Speed.Text = math.floor(UNITS[currentUnits].scaling*values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units
end)

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

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

wait(.1)
Gear()
PBrake()


Prompt: -- Legs

Response:
character.LeftUpperLeg.Material = Material
character.RightUpperLeg.Material = Material
character.LeftLowerLeg.Material = Material
character.RightLowerLeg.Material = Material


Prompt: --------------------) Settings

Response:
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 7 -- cooldown for use of the tool again

ZoneModelName = "Dust slash" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage


Prompt: --// F key, HornOn

Response:
mouse.KeyDown:connect(function(key)
	if key=="h" then
		veh.Lightbar.middle.Airhorn:Play()
		veh.Lightbar.middle.Wail.Volume = 0
		veh.Lightbar.middle.Yelp.Volume = 0
		veh.Lightbar.middle.Priority.Volume = 0
		veh.Lightbar.AH.Transparency = 0
	end
end)


Prompt:
--NOTE
--The animation can bug out, im still trying to find a way to fix that.

Response:
repeat wait() until game:IsLoaded()
wait(0.01)
local TweenService = game:GetService("TweenService")
local tweenPart = game.Players.LocalPlayer.Character.Humanoid

local info = TweenInfo.new(
	0.325,
	Enum.EasingStyle.Back,
	Enum.EasingDirection.Out,
	0,
	false,
	0
)
local info2 = TweenInfo.new(
	0.3,
	Enum.EasingStyle.Back,
	Enum.EasingDirection.Out,
	0,
	false,
	0
)

local Goals = {CameraOffset = Vector3.new(0,-1,0)}
local Goals2 = {CameraOffset = Vector3.new(0,0,0)}

local animsR6 = script.Parent.Parent.R6Anims
local animsR15 = script.Parent.Parent.R15Anims

local PartTween = TweenService:Create(tweenPart, info, Goals)
local PartTween2 = TweenService:Create(tweenPart, info2, Goals2)

local animidle = tweenPart:LoadAnimation(animsR15.Idle)
local animwalk = tweenPart:LoadAnimation(animsR15.Walk)

if tweenPart.RigType == Enum.HumanoidRigType.R6 then
	animidle = tweenPart:LoadAnimation(animsR6.Idle)
	animwalk = tweenPart:LoadAnimation(animsR6.Walk)
elseif tweenPart.RigType == Enum.HumanoidRigType.R15 then
	animidle = tweenPart:LoadAnimation(animsR15.Idle)
	animwalk = tweenPart:LoadAnimation(animsR15.Walk)
end

local crouching = false
local waiting = false

local function Crouch()
	if waiting == false then
		if crouching == false then
			script.Parent.Parent.ImageColor3 = script.Parent.Parent.Values.OnCrouchColor.Value
			script.Parent.Parent.CrouchImage.ImageColor3 = Color3.new(1, 1, 1)
			tweenPart.WalkSpeed = 8
			waiting = true
			crouching = true
			animidle:Play()
			PartTween:Play() --plays it
			tweenPart.Running:Connect(function(Speed)
				if crouching == true then
					if Speed >= 1 then
						animidle:Stop()
						if animwalk.IsPlaying == false then
							animwalk:Play()
						end

					else
						animidle:Play()
						animwalk:Stop()
					end
				end
			end)
			wait(0.05)
			waiting = false
		else
			script.Parent.Parent.ImageColor3 = script.Parent.Parent.Values.OriginalColor.Value
			script.Parent.Parent.CrouchImage.ImageColor3 = Color3.new(0, 0, 0)
			tweenPart.WalkSpeed = 16
			waiting = true
			crouching = false
			animidle:Stop()
			animwalk:Stop()
			PartTween2:Play()
			wait(0.05)
			waiting = false
		end
	end
end
local userinputservice = game:GetService("UserInputService")
userinputservice.InputBegan:Connect(function(input)
	if script.Parent.Parent.Visible == true then
		if input.KeyCode == Enum.KeyCode.C then
			Crouch()
		end
	end
end)
script.Parent.Parent.MouseButton1Click:Connect(function()
	Crouch()
end)


Prompt:
--[[
	ROBLOX TODO: add default generic param when possible
	original code:
	export const getState = <State extends MatcherState = MatcherState>(): State =>
]]

Response:
local function getState<State>(): State
	return _G[JEST_MATCHERS_OBJECT].state
end

return {
	JEST_MATCHERS_OBJECT = JEST_MATCHERS_OBJECT,
	getState = getState,
}


Prompt: -- Initialize rotate tool

Response:
local RotateTool = require(CoreTools:WaitForChild 'Rotate')
Core.AssignHotkey('C', Core.Support.Call(Core.EquipTool, RotateTool));
Core.Dock.AddToolButton(Core.Assets.RotateIcon, 'C', RotateTool, 'RotateInfo');


Prompt: -- the Tool, reffered to here as "Block." Do not change it!

Response: Block = script.Parent.Parent.Fuse1Pick -- You CAN change the name in the quotes "Example Tool"


Prompt: -- Local Functions

Response:
local MakeFlag

local function DestroyFlag(flagObject)
	flagObject.Flag:Destroy()
	for player, object in pairs(FlagCarriers) do
		if object == flagObject then
			FlagCarriers[player] = nil
		end
	end
end

local function OnCarrierDied(player)
	local flagObject = FlagCarriers[player]
	if flagObject then
		local flagPole = flagObject.FlagPole
		local flagBanner = flagObject.FlagBanner

		flagPole.CanCollide = false
		flagBanner.CanCollide = false
		flagPole.Anchored = true
		flagBanner.Anchored = true

		flagObject.PickedUp = false

		FlagCarriers[player] = nil

		if Configurations.RETURN_FLAG_ON_DROP then
			wait(Configurations.FLAG_RESPAWN_TIME)
			if not flagObject.AtSpawn and not flagObject.PickedUp then
				DestroyFlag(flagObject)
				MakeFlag(flagObject)
				ReturnFlag:Fire(flagObject.FlagBanner.BrickColor)
			end
		end
	end
end

local function PickupFlag(player, flagObject)
	FlagCarriers[player] = flagObject
	flagObject.AtSpawn = false
	flagObject.PickedUp = true

	local torso
	if player.Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
		torso = player.Character:FindFirstChild('Torso')
	else
		torso = player.Character:FindFirstChild('UpperTorso')
	end
	local flagPole = flagObject.FlagPole
	local flagBanner = flagObject.FlagBanner

	flagPole.Anchored = false
	flagBanner.Anchored = false
	flagPole.CanCollide = false
	flagBanner.CanCollide = false
	local weld = Instance.new('Weld', flagPole)
	weld.Name = 'PlayerFlagWeld'
	weld.Part0 = flagPole
	weld.Part1 = torso
	weld.C0 = CFrame.new(0,0,-1)
end

local function BindFlagTouched(flagObject)
	local flagPole = flagObject.FlagPole
	local flagBanner = flagObject.FlagBanner
	flagPole.Touched:connect(function(otherPart)
		local player = Players:GetPlayerFromCharacter(otherPart.Parent)
		if not player then return end
		if not player.Character then return end
		local humanoid = player.Character:FindFirstChild('Humanoid')
		if not humanoid then return end
		if humanoid.Health <= 0 then return end
		if flagBanner.BrickColor ~= player.TeamColor and not flagObject.PickedUp then
			PickupFlag(player, flagObject)
		elseif flagBanner.BrickColor == player.TeamColor and not flagObject.AtSpawn and Configurations.FLAG_RETURN_ON_TOUCH then
			DestroyFlag(flagObject)
			MakeFlag(flagObject)
			ReturnFlag:Fire(flagObject.FlagBanner.BrickColor)
		end
	end)
end

function MakeFlag(flagObject)
	flagObject.Flag = flagObject.FlagCopy:Clone()
	flagObject.Flag.Parent = flagObject.FlagContainer
	flagObject.FlagPole = flagObject.Flag.FlagPole
	flagObject.FlagBanner = flagObject.Flag.FlagBanner
	flagObject.FlagBanner.CanCollide = false
	flagObject.AtSpawn = true
	flagObject.PickedUp = false
	BindFlagTouched(flagObject)
end

local function BindBaseTouched(flagObject)
	local flagBase = flagObject.FlagBase
	flagBase.Touched:connect(function(otherPart)
		local player = Players:GetPlayerFromCharacter(otherPart.Parent)
		if not player then return end
		if flagBase.BrickColor == player.TeamColor and FlagCarriers[player] then
			CaptureFlag:Fire(player)
			local otherFlag = FlagCarriers[player]
			DestroyFlag(otherFlag)
			MakeFlag(otherFlag)
		end
	end)
end

local function OnPlayerAdded(player)
	player.CharacterAdded:connect(function(character)
		character:WaitForChild('Humanoid').Died:connect(function() OnCarrierDied(player) end)
	end)
	player.CharacterRemoving:connect(function()
		OnCarrierDied(player)
	end)
end


Prompt: -- Returns module (possibly nil) and success code to differentiate returning nil due to error vs Scriptable

Response:
function ControlModule:SelectComputerMovementModule()
	if not (UserInputService.KeyboardEnabled or UserInputService.GamepadEnabled) then
		return nil, false
	end

	local computerModule = nil
	local DevMovementMode = Players.LocalPlayer.DevComputerMovementMode

	if DevMovementMode == Enum.DevComputerMovementMode.UserChoice then
		computerModule = computerInputTypeToModuleMap[lastInputType]
		if UserGameSettings.ComputerMovementMode == Enum.ComputerMovementMode.ClickToMove and computerModule == Keyboard then
			-- User has ClickToMove set in Settings, prefer ClickToMove controller for keyboard and mouse lastInputTypes
			computerModule = ClickToMove
		end
	else
		-- Developer has selected a mode that must be used.
		computerModule = movementEnumToModuleMap[DevMovementMode]

		-- computerModule is expected to be nil here only when developer has selected Scriptable
		if (not computerModule) and DevMovementMode ~= Enum.DevComputerMovementMode.Scriptable then
			warn("No character control module is associated with DevComputerMovementMode ", DevMovementMode)
		end
	end

	if computerModule then
		return computerModule, true
	elseif DevMovementMode == Enum.DevComputerMovementMode.Scriptable then
		-- Special case where nil is returned and we actually want to set self.activeController to nil for Scriptable
		return nil, true
	else
		-- This case is for when computerModule is nil because of an error and no suitable control module could
		-- be found.
		return nil, false
	end
end


Prompt:
--[=[
	Disconnects all connections from a ScriptSignal object without making it unusable.

	```lua
	local connection = ScriptSignal:Connect(function() end)

	connection.Connected -> true
	ScriptSignal:DisconnectAll()
	connection.Connected -> false
	```

	@ignore
]=]

Response:
function ScriptSignal:DisconnectAll()
	local node: ScriptConnectionNode? = self._head
	while node ~= nil do
		local _connection = node._connection

		if _connection ~= nil then
			_connection.Connected = false
			_connection._node = nil
			node._connection = nil
		end

		node = node._next
	end

	self._head = nil
end


Prompt:
--[=[
	Calculates the current shake vector. This should be continuously
	called inside a loop, such as `RunService.Heartbeat`. Alternatively,
	`OnSignal` or `BindToRenderStep` can be used to automatically call
	this function.

	Returns a tuple of three values:
	1. `position: Vector3` - Position shake offset
	2. `rotation: Vector3` - Rotation shake offset
	3. `completed: boolean` - Flag indicating if the shake is finished

	```lua
	local hb
	hb = RunService.Heartbeat:Connect(function()
		local offsetPosition, offsetRotation, isDone = shake:Update()
		if isDone then
			hb:Disconnect()
		end
		-- Use `offsetPosition` and `offsetRotation` here
	end)
	```
]=]

Response:
function Shake:Update(): (Vector3, Vector3, boolean)

	local done = false

	local now = self.TimeFunction()
	local dur = now - self._startTime

	local noiseInput = ((now + self._timeOffset) / self.Frequency) % 1000000

	local multiplierFadeIn = 1
	local multiplierFadeOut = 1
	if dur < self.FadeInTime then
		multiplierFadeIn = dur / self.FadeInTime
	end
	if not self.Sustain and dur > self.FadeInTime + self.SustainTime then
		multiplierFadeOut = 1 - (dur - self.FadeInTime - self.SustainTime) / self.FadeOutTime
		if (not self.Sustain) and dur >= self.FadeInTime + self.SustainTime + self.FadeOutTime then
			done = true
		end
	end

	local offset = Vector3.new(
		math.noise(noiseInput, 0) / 2,
		math.noise(0, noiseInput) / 2,
		math.noise(noiseInput, noiseInput) / 2
	) * self.Amplitude * math.min(multiplierFadeIn, multiplierFadeOut)

	if done then
		self:Stop()
	end

	return self.PositionInfluence * offset, self.RotationInfluence * offset, done

end


Prompt: -- Public Functions

Response:
function ParticleController.SetupParticlesPlayer(player)
	local character = player.Character or player.CharacterAdded:wait()

	-- Create all relevant particles TODO: Use a for loop for this instead?
	local _upgradeParticle = upgradeParticle:Clone()
	local _upgradeCheckpoint = upgradeCheckpoint:Clone()

	_upgradeParticle.Parent = character:WaitForChild(particleHolderName)
	_upgradeCheckpoint.Parent = character:WaitForChild(particleHolderName)
end

function ParticleController.EmitCheckpointParticle(player)
	-- Get the particle on the player and make it emit
	local character = player.Character
	local particleHolder = character:WaitForChild(particleHolderName)
	local particleEffect = particleHolder:WaitForChild("ParticleCheckpoint")
	particleEffect:Emit(particleEmitRate)
end

function ParticleController:CreateUpgradeParticle(player)
	local character = player.Character or player.CharacterAdded:wait()
	local particleEffect = upgradeCheckpoint:Clone()
	particleEffect.Parent = character:WaitForChild(particleHolderName)
	particleEffect:Emit(particleEmitRate)
end

return ParticleController


Prompt: --// Services

Response:
local L_103_ = game:GetService('RunService').RenderStepped
local L_104_ = game:GetService('UserInputService')


Response:
	,FastReload = false					--- Automatically operates the bolt on reload if needed
	,SlideLock = true
	,MoveBolt = false
	,BoltLock = false
	,CanBreachDoor = false
	,CanBreak = true					--- Weapon can jam?
	,JamChance = 1000					--- This old piece of brick doesn't work fine >;c
	,IncludeChamberedBullet = true		--- Include the chambered bullet on next reload
	,Chambered = false					--- Start with the gun chambered?
	,LauncherReady = false				--- Start with the GL ready?
	,CanCheckMag = true					--- You can check the magazine
	,ArcadeMode = false					--- You can see the bullets left in magazine
	,RainbowMode = false				--- Operation: Party Time xD
	,ModoTreino = false					--- Surrender enemies instead of killing them
	,GunSize = 1
	,GunFOVReduction = 5

	,BoltExtend = Vector3.new(0, 0, 0.225)
	,SlideExtend = Vector3.new(0, 0, -0.4)