Prompt:
--Small tip: You don't need to use actual Roblox Attachments below. You can also create "fake" ones as follows:
--[[
local A1, A2 = {}, {}
A1.WorldPosition, A1.WorldAxis = chosenPos1, chosenAxis1
A2.WorldPosition, A2.WorldAxis = chosenPos2, chosenAxis2
local NewBolt = LightningBolt.new(A1, A2, 40)
--]]

Response:
function LightningBolt.new(Attachment0, Attachment1, PartCount)
	local self = setmetatable({}, LightningBolt)

	--Main (default) Properties--

		--Bolt Appearance Properties--
			self.Enabled = true --Hides bolt without destroying any parts when false
			self.Attachment0, self.Attachment1 = Attachment0, Attachment1 --Bolt originates from Attachment0 and ends at Attachment1
			self.CurveSize0, self.CurveSize1 = 0, 0 --Works similarly to beams. See https://dk135eecbplh9.cloudfront.net/assets/blt160ad3fdeadd4ff2/BeamCurve1.png
			self.MinRadius, self.MaxRadius = 0, 2.4 --Governs the amplitude of fluctuations throughout the bolt
			self.Frequency = 1 --Governs the frequency of fluctuations throughout the bolt. Lower this to remove jittery-looking lightning
			self.AnimationSpeed = 7 --Governs how fast the bolt oscillates (i.e. how fast the fluctuating wave travels along bolt)
			self.Thickness = 1 --The thickness of the bolt
			self.MinThicknessMultiplier, self.MaxThicknessMultiplier = 0.2, 1 --Multiplies Thickness value by a fluctuating random value between MinThicknessMultiplier and MaxThicknessMultiplier along the Bolt

		--Bolt Kinetic Properties--
			--Allows for fading in (or out) of the bolt with time. Can also create a "projectile" bolt
			--Recommend setting AnimationSpeed to 0 if used as projectile (for better aesthetics)
			--Works by passing a "wave" function which travels from left to right where the wave height represents opacity (opacity being 1 - Transparency)
			--See https://www.desmos.com/calculator/hg5h4fpfim to help customise the shape of the wave with the below properties
			self.MinTransparency, self.MaxTransparency = 0, 1 --See https://www.desmos.com/calculator/hg5h4fpfim
			self.PulseSpeed = 2 --Bolt arrives at Attachment1 1/PulseSpeed seconds later. See https://www.desmos.com/calculator/hg5h4fpfim
			self.PulseLength = 1000000 --See https://www.desmos.com/calculator/hg5h4fpfim
			self.FadeLength = 0.2 --See https://www.desmos.com/calculator/hg5h4fpfim
			self.ContractFrom = 0.5 --Parts shorten or grow once their Transparency exceeds this value. Set to a value above 1 to turn effect off. See https://imgur.com/OChA441

		--Bolt Color Properties--
			self.Color = Color3.new(1, 1, 1) --Can be a Color3 or ColorSequence
			self.ColorOffsetSpeed = 3 --Sets speed at which ColorSequence travels along Bolt

	--

	self.Parts = {} --The BoltParts which make up the Bolt

	local a0, a1 = Attachment0, Attachment1
	local parent = workspace.CurrentCamera
	local p0, p1, p2, p3 = a0.WorldPosition, a0.WorldPosition + a0.WorldAxis*self.CurveSize0, a1.WorldPosition - a1.WorldAxis*self.CurveSize1, a1.WorldPosition
	local PrevPoint, bezier0 = p0, p0
	local MainBranchN = PartCount or 30

	for i = 1, MainBranchN do
		local t1 = i/MainBranchN
		local bezier1 = CubicBezier(p0, p1, p2, p3, t1)
		local NextPoint = i ~= MainBranchN and (CFrame.lookAt(bezier0, bezier1)).Position or bezier1
		local BPart = BoltPart:Clone()
		BPart.Size = Vector3.new((NextPoint - PrevPoint).Magnitude, 0, 0)
		BPart.CFrame = CFrame.lookAt(0.5*(PrevPoint + NextPoint), NextPoint)*xInverse
		BPart.Parent = parent
		BPart.Locked, BPart.CastShadow = true, false
		self.Parts[i] = BPart
		PrevPoint, bezier0 = NextPoint, bezier1
	end

	self.PartsHidden = false
	self.DisabledTransparency = 1
	self.StartT = clock()
	self.RanNum = math.random()*100
	self.RefIndex = #ActiveBranches + 1

	ActiveBranches[self.RefIndex] = self

	return self
end

function LightningBolt:Destroy()
	ActiveBranches[self.RefIndex] = nil

	for i = 1, #self.Parts do
		self.Parts[i]:Destroy()

		if i%100 == 0 then wait() end
	end

	self = nil
end

local offsetAngle = math.cos(math.rad(90))

game:GetService("RunService").Heartbeat:Connect(function ()

	for _, ThisBranch in pairs(ActiveBranches) do
		if ThisBranch.Enabled == true then
			ThisBranch.PartsHidden = false
			local MinOpa, MaxOpa = 1 - ThisBranch.MaxTransparency, 1 - ThisBranch.MinTransparency
			local MinRadius, MaxRadius = ThisBranch.MinRadius, ThisBranch.MaxRadius
			local thickness = ThisBranch.Thickness
			local Parts = ThisBranch.Parts
			local PartsN = #Parts
			local RanNum = ThisBranch.RanNum
			local StartT = ThisBranch.StartT
			local spd = ThisBranch.AnimationSpeed
			local freq = ThisBranch.Frequency
			local MinThick, MaxThick = ThisBranch.MinThicknessMultiplier, ThisBranch.MaxThicknessMultiplier
			local a0, a1, CurveSize0, CurveSize1 = ThisBranch.Attachment0, ThisBranch.Attachment1, ThisBranch.CurveSize0, ThisBranch.CurveSize1
			local p0, p1, p2, p3 = a0.WorldPosition, a0.WorldPosition + a0.WorldAxis*CurveSize0, a1.WorldPosition - a1.WorldAxis*CurveSize1, a1.WorldPosition
			local timePassed = clock() - StartT
			local PulseLength, PulseSpeed, FadeLength = ThisBranch.PulseLength, ThisBranch.PulseSpeed, ThisBranch.FadeLength
			local Color = ThisBranch.Color
			local ColorOffsetSpeed = ThisBranch.ColorOffsetSpeed
			local contractf = 1 - ThisBranch.ContractFrom
			local PrevPoint, bezier0 = p0, p0

			if timePassed < (PulseLength + 1) / PulseSpeed then

				for i = 1, PartsN do
					--local spd = NoiseBetween(i/PartsN, 1.5, 0.1*i/PartsN, -MinAnimationSpeed, MaxAnimationSpeed) --Can enable to have an alternative animation which doesn't shift the noisy lightning "Texture" along the bolt
					local BPart = Parts[i]
					local t1 = i/PartsN
					local Opacity = DiscretePulse(t1, PulseSpeed, PulseLength, FadeLength, timePassed, MinOpa, MaxOpa)
					local bezier1 = CubicBezier(p0, p1, p2, p3, t1)
					local time = -timePassed --minus to ensure bolt waves travel from a0 to a1
					local input, input2 = (spd*time) + freq*10*t1 - 0.2 + RanNum*4, 5*((spd*0.01*time) / 10 + freq*t1) + RanNum*4
					local noise0 = NoiseBetween(5*input, 1.5, 5*0.2*input2, 0, 0.1*2*math.pi) + NoiseBetween(0.5*input, 1.5, 0.5*0.2*input2, 0, 0.9*2*math.pi)
					local noise1 = NoiseBetween(3.4, input2, input, MinRadius, MaxRadius)*math.exp(-5000*(t1 - 0.5)^10)
					local thicknessNoise = NoiseBetween(2.3, input2, input, MinThick, MaxThick)
					local NextPoint = i ~= PartsN and (CFrame.new(bezier0, bezier1)*CFrame.Angles(0, 0, noise0)*CFrame.Angles(math.acos(math.clamp(NoiseBetween(input2, input, 2.7, offsetAngle, 1), -1, 1)), 0, 0)*CFrame.new(0, 0, -noise1)).Position or bezier1

					if Opacity > contractf then
						BPart.Size = Vector3.new((NextPoint - PrevPoint).Magnitude, thickness*thicknessNoise*Opacity, thickness*thicknessNoise*Opacity)
						BPart.CFrame = CFrame.lookAt(0.5*(PrevPoint + NextPoint), NextPoint)*xInverse
						BPart.Transparency = 1 - Opacity
					elseif Opacity > contractf - 1/(PartsN*FadeLength) then
						local interp = (1 - (Opacity - (contractf - 1/(PartsN*FadeLength)))*PartsN*FadeLength)*(t1 < timePassed*PulseSpeed - 0.5*PulseLength and 1 or -1)
						BPart.Size = Vector3.new((1 - math.abs(interp))*(NextPoint - PrevPoint).Magnitude, thickness*thicknessNoise*Opacity, thickness*thicknessNoise*Opacity)
						BPart.CFrame = CFrame.lookAt(PrevPoint + (NextPoint - PrevPoint)*(math.max(0, interp) + 0.5*(1 - math.abs(interp))), NextPoint)*xInverse
						BPart.Transparency = 1 - Opacity
					else
						BPart.Transparency = 1
					end

					if typeof(Color) == "Color3" then
						BPart.Color = Color
					else --ColorSequence
						t1 = (RanNum + t1 - timePassed*ColorOffsetSpeed)%1
						local keypoints = Color.Keypoints
						for i = 1, #keypoints - 1 do --convert colorsequence onto lightning
							if keypoints[i].Time < t1 and t1 < keypoints[i+1].Time then
								BPart.Color = keypoints[i].Value:lerp(keypoints[i+1].Value, (t1 - keypoints[i].Time)/(keypoints[i+1].Time - keypoints[i].Time))
								break
							end
						end
					end

					PrevPoint, bezier0 = NextPoint, bezier1
				end

			else

				ThisBranch:Destroy()

			end

		else --Enabled = false

			if ThisBranch.PartsHidden == false then
				ThisBranch.PartsHidden = true
				local datr = ThisBranch.DisabledTransparency
				for i = 1, #ThisBranch.Parts do
					ThisBranch.Parts[i].Transparency = datr
				end
			end

		end
	end

end)

return LightningBolt


Prompt: --Script:

Response:
Button.Activated:Connect(function()
	MarketplaceService:PromptProductPurchase(Player, DevProduct.Value)
end)


Prompt:
--[[ @brief Performs an operation on heartbeat based on a condition.
     @param callback The callback function for each heartbeat step.
     @param condition The condition we should check before running callback.
     @param yield Whether this function should yield or return immediately.
--]]

Response:
function AnimateLib.ConditionalOnHeartbeat(callback, condition, yield, callbackOnComplete)
	local cxn;
	local event = Utils.new("Event");
	local startTime = tick();
	cxn = game:GetService("RunService").Heartbeat:connect(function(step)
		if condition() then
			callback(step, tick() - startTime)
		else
			cxn:disconnect();
			event:Fire();
			if callbackOnComplete then
				callbackOnComplete();
			end
		end
	end);
	if yield then
		event:wait();
	end
end


Response:
On = false
Check = false

function check(Char)
Player = game.Players:FindFirstChild(Char.Name)
if Player ~= nil then
if Group == true then
if Player:IsInGroup(GroupId) == true then
Check = true
end
end
if Friends == true then
if Player:IsFriendsWith(game.CreatorId) == true then
Check = true
end
end
if Bestfriends == true then
if Player:IsBestFriendsWith(game.CreatorId) == true then
Check = true
end
end
if PeopleOn == true then
for i = 1,#People do
if People[i].Name == Player.Name then
Check = true
end
end
end
if Tshirt == true then
if Char:FindFirstChild("Torso") ~= nil and Char.Torso:FindFirstChild("roblox") ~= nil then
if Char.Torso.roblox.Texture == "http://www.roblox.com/asset/?id="..tostring(TTexture) then
Check = true
end
end
end
if Player.userId == game.CreatorId then
Check = true
end
if Pants == true then
if Char:FindFirstChild("Pants") ~= nil then
if Char.Pants.PantsTemplate == "http://www.roblox.com/asset/?id="..tostring(PTexture) then
Check = true
end
end
end
if Shirt == true then
if Char:FindFirstChild("Shirt") ~= nil then
if Char.Shirt.ShirtTemplate == "http://www.roblox.com/asset/?id="..tostring(STexture) then
Check = true
end
end
end
if BC == true then
if Player.MembershipType == "BuildersClub" then
Check = true
end
end
if Veterans == true then
if Player.AccountAge == 365 then
Check = true
end
end
end
end

function open(hit)
if On == false then
On = true
Player = game.Players:FindFirstChild(hit.Parent.Name)
if Player ~= nil then
Orig = script.Parent.Transparency
script.Parent.Transparency = OpenTransparency
script.Parent.CanCollide = false
wait(OpenTime)
script.Parent.CanCollide = true
script.Parent.Transparency = Orig
On = false
end
end
end

function kill(hit)
if hit.Parent ~= nil and hit.Parent:FindFirstChild("Humanoid") ~= nil then
Player = game.Players:FindFirstChild(hit.Parent.Name)
if Player ~= nil then
if Player:IsInGroup(GroupId) == false then
hit.Parent:BreakJoints()
end
end
end
end

function knock(hit)
if hit.Parent ~= nil and hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent:FindFirstChild("Torso") ~= nil then
Player = game.Players:FindFirstChild(hit.Parent.Name)
if Player ~= nil then
if Player:IsInGroup(GroupId) == false then
hit.Parent.Torso.RotVelocity = Vector3.new(50, -230, 50)
end
end
end
end

function ontouched(hit)
print("On")
if hit.Parent ~= nil and hit.Parent:FindFirstChild("Humanoid") ~= nil then
print("On")
check(hit.Parent)
if Check == true then
open(hit)
elseif Check == false then
if Killing == true then
kill(hit)
end
if Knockback == true then
knock(hit)
end
end
Check = false
end
end

script.Parent.Touched:connect(ontouched)


Prompt: -- Welcome to the variable museum:

Response:
local player = script.Parent.Parent.Parent
local plane,mainParts,info,main,move,gryo,seat,accel,canCrash,crashForce,crashSpin,crashVisual,maxBank,maxSpeed,speedVary,stallSpeed,throttleInc,altRestrict,altMin,altMax,altSet
local desiredSpeed,currentSpeed,realSpeed = 0,0,0
local mouseSave
local gearParts = {}
local flying,on,dead,gear,throttle = false,false,false,true,0
local gui = script.Parent.Parent.Plane
local panel = script.Parent.Panel
local lowestPoint = 0
local A = math.abs	-- Creating a shortcut for the function

local keys = {
	engine={key};
	spdup={byte=0;down=false};
	spddwn={byte=0;down=false};
}

function gears()
	if script.Parent.Plane.Value.Animations.Value.Gears.Value.Value == true then
		panel.Gear.Value.Text = "On"
	else if script.Parent.Plane.Value.Animations.Value.Gears.Value.Value == false then
		panel.Gear.Value.Text = "Off"
	end
	end
end

function flaps()
		panel.Flaps.Value.Text = script.Parent.Plane.Value.Animations.Value.Flaps.Value.Value
end

function rthrust()
		if script.Parent.Plane.Value.Animations.Value.RThrust.Value.Value == true then
		panel.RThrust.Value.Text = "On"
	else if script.Parent.Plane.Value.Animations.Value.RThrust.Value.Value == false then
		panel.RThrust.Value.Text = "Off"
	end
	end
end

function spoilers()
		if script.Parent.Plane.Value.Animations.Value.Spoilers.Value.Value == true then
		panel.Spoilers.Value.Text = "On"
	else if script.Parent.Plane.Value.Animations.Value.Spoilers.Value.Value == false then
		panel.Spoilers.Value.Text = "Off"
	end
	end
end

function freeze()
	if script.Parent.Plane.Value.MainParts.Main.Anchored == true then
		panel.Frozen.Value.Text = "On"
	else if script.Parent.Plane.Value.MainParts.Main.Anchored == false then
		panel.Frozen.Value.Text = "Off"
	end
	end
end

function engine()
	if script.Parent.Plane.Value.MainParts.Main.Engine.Value == true then
		script.Parent.Panel.Engines.BackgroundColor3 = Color3.new(85/255, 255/255, 0)
		script.Parent.Panel.Engines.BorderColor3 = Color3.new(0, 85/255, 0)
		on = (not on)
	end
end
script.Parent.Plane.Value.Animations.Value.Gears.Value.Changed:connect(gears)
script.Parent.Plane.Value.Animations.Value.Flaps.Value.Changed:connect(flaps)
script.Parent.Plane.Value.Animations.Value.RThrust.Value.Changed:connect(rthrust)
script.Parent.Plane.Value.Animations.Value.Spoilers.Value.Changed:connect(spoilers)
script.Parent.Plane.Value.MainParts.Main.Changed:connect(freeze)
function waitFor(parent,array)	-- Backup system to wait for objects to 'load'
	if (array) then
		for _,name in pairs(array) do
			while (not parent:findFirstChild(name)) do wait() end	-- If the object is found right away, no time will be spent waiting. That's why 'while' loops work better than 'repeat' in this case
		end
	elseif (parent:IsA("ObjectValue")) then
		while (not parent.Value) do wait() end
	end
end

function fixVars()	-- Correct your mistakes to make sure the plane still flies correctly!
	maxBank = (maxBank < -90 and -90 or maxBank > 90 and 90 or maxBank)
	throttleInc = (throttleInc < 0.01 and 0.01 or throttleInc > 1 and 1 or throttleInc)
	stallSpeed = (stallSpeed > maxSpeed and maxSpeed or stallSpeed)
	accel = (accel < 0.01 and 0.01 or accel > maxSpeed and maxSpeed or accel)
	altMax = ((altMax-100) < altMin and (altMin+100) or altMax)
	altMax = (altSet and (altMax+main.Position.y) or altMax)
	altMin = (altSet and (altMin+main.Position.y) or altMin)
	keys.engine.key = (keys.engine.key == "" and "e" or keys.engine.key)
	keys.spdup.byte = (keys.spdup.byte == 0 and 17 or keys.spdup.byte)
	keys.spddwn.byte = (keys.spddwn.byte == 0 and 18 or keys.spddwn.byte)
end

function getVars()	-- Since this plane kit is supposed to make you avoid scripting altogether, I have to go the extra mile and write a messy function to account for all those object variables
	plane = script.Parent.Plane.Value
	waitFor(plane,{"MainParts","OtherParts","EDIT_THESE","Dead"})
	mainParts = plane.MainParts
	info = plane.EDIT_THESE
	waitFor(mainParts,{"Main","MainSeat"})
	main = mainParts.Main
	seat = mainParts.MainSeat
	waitFor(main,{"Move","Gyro"})
	move = main.Move
	gyro = main.Gyro
	accel,canCrash,crashForce,crashSpin,crashVisual,maxBank,maxSpeed,speedVary,stallSpeed,throttleInc,altRestrict,altMin,altMax,altSet =	-- Quickest way to assign tons of variables
		A(info.Acceleration.Value),info.CanCrash.Value,A(info.CanCrash.Force.Value),info.CanCrash.SpinSpeed.Value,info.CanCrash.VisualFX.Value,
		info.MaxBank.Value,A(info.MaxSpeed.Value),A(info.SpeedDifferential.Value),A(info.StallSpeed.Value),A(info.ThrottleIncrease.Value),
		info.AltitudeRestrictions.Value,info.AltitudeRestrictions.MinAltitude.Value,info.AltitudeRestrictions.MaxAltitude.Value,info.AltitudeRestrictions.SetByOrigin.Value
	keys.engine.key = info.Hotkeys.Engine.Value:gmatch("%a")():lower()
	local sU,sD = info.Hotkeys.SpeedUp.Value:lower(),info.Hotkeys.SpeedDown.Value:lower()
	keys.spdup.byte = (sU == "arrowkeyup" and 17 or sU == "arrowkeydown" and 18 or sU:gmatch("%a")():byte())	-- Ternary operations use logical figures to avoid 'if' statements
	keys.spddwn.byte = (sD == "arrowkeyup" and 17 or sD == "arrowkeydown" and 18 or sD:gmatch("%a")():byte())
	fixVars()
	plane.Dead.Changed:connect(function()
		if ((plane.Dead.Value) and (not dead)) then	-- DIE!
			dead,flying,on = true,false,false
			main.Fire.Enabled,main.Smoke.Enabled = info.CanCrash.VisualFX.Value,info.CanCrash.VisualFX.Value
			move.maxForce = Vector3.new(0,0,0)
			gyro.D = 1e3
			while (not plane.Dead.Stop.Value) do
				gyro.cframe = (gyro.cframe*CFrame.Angles(0,0,math.rad(crashSpin)))
				wait()
			end
		end
	end)
end

function getLowestPoint()	-- Plane will use LowestPoint to determine where to look to make sure the plane is either flying or on the ground
	if (#gearParts == 0) then
		lowestPoint = (main.Position.y+5+(main.Size.y/2))
		return
	end
	for _,v in pairs(gearParts) do	-- Not very efficient, but it basically does what I designed it to do:
		local _0 = (main.Position.y-(v.CFrame*CFrame.new((v.Size.x/2),0,0)).y)
		local _1 = (main.Position.y-(v.CFrame*CFrame.new(-(v.Size.x/2),0,0)).y)
		local _2 = (main.Position.y-(v.CFrame*CFrame.new(0,(v.Size.y/2),0)).y)
		local _3 = (main.Position.y-(v.CFrame*CFrame.new(0,-(v.Size.y/2),0)).y)
		local _4 = (main.Position.y-(v.CFrame*CFrame.new(0,0,(v.Size.z/2))).y)
		local _5 = (main.Position.y-(v.CFrame*CFrame.new(0,0,-(v.Size.z/2))).y)
		local n = (math.max(_0,_1,_2,_3,_4,_5)+5)
		lowestPoint = (n > lowestPoint and n or lowestPoint)
	end
end

function guiSetup()	-- Setting up the GUI buttons and such
	local cur = 0
	gears()
	flaps()
	rthrust()
	spoilers()
	freeze()
	engine()
end

getVars()
getLowestPoint()
guiSetup()
script.Parent.Name = "Plane"

function updateGui(taxiing,stalling)
	panel.Title.Text = info.PlaneName.Value
	panel.StallSpeed.Value.Text = info.StallSpeed.Value
	panel.Stall.Visible = (not taxiing and stalling)
	if ((realSpeed > -10000) and (realSpeed < 10000)) then
		panel.Speed.Value.Text = tostring(math.floor(realSpeed+0.5))
		main.Speed.Value = tostring(math.floor(realSpeed+0.5))
	end
	panel.Altitude.Value.Text = tostring(math.floor(main.Position.y+0.5))
	main.Altitude.Value = tostring(math.floor(main.Position.y+0.5))
	panel.Throttle.Bar.Amount.Size = UDim2.new(throttle,0,1,0)
end

function taxi()	-- Check to see if the plane is on the ground or not
	return (currentSpeed <= stallSpeed and game.Workspace:findPartOnRay(Ray.new(main.Position,Vector3.new(0,-lowestPoint,0)),plane))	-- Make sure plane is on a surface
end

function stall()	-- Originally set as a giant ternary operation, but got WAY too complex, so I decided to break it down for my own sanity
	if ((altRestrict) and (main.Position.y > altMax)) then return true end
	local diff = ((realSpeed-stallSpeed)/200)
	diff = (diff > 0.9 and 0.9 or diff)
	local check = {	-- Table placed here so I could easily add new 'checks' at ease. If anything in this table is 'true,' then the plane will be considered to be taxiing
		(currentSpeed <= stallSpeed);
		(main.CFrame.lookVector.y > (realSpeed < stallSpeed and -1 or -diff));
	}
	for _,c in pairs(check) do
		if (not c) then return false end
	end
	return true
end

function fly(m)	-- Main function that controls all of the flying stuff. Very messy.
	flying = true
	local pos,t = main.Position,time()
	local lastStall = false
	while ((flying) and (not dead)) do
		realSpeed = ((pos-main.Position).magnitude/(time()-t))	-- Calculate "real" speed
		pos,t = main.Position,time()
		local max = (maxSpeed+(-main.CFrame.lookVector.y*speedVary))	-- Speed variety based on the pitch of the aircraft
		desiredSpeed = (max*(on and throttle or 0))	-- Find speed based on throttle
		local change = (desiredSpeed > currentSpeed and 1 or -1)	-- Decide between accelerating or decelerating
		currentSpeed = (currentSpeed+(accel*change))	-- Calculate new speed


Prompt:
------------------------------------------------------------------------
-- parse a for loop body for both versions of the for loop
-- * used in fornum(), forlist()
------------------------------------------------------------------------

Response:
function luaY:forbody(ls, base, line, nvars, isnum)
  -- forbody -> DO block
  local bl = {}  -- BlockCnt
  local fs = ls.fs
  self:adjustlocalvars(ls, 3)  -- control variables
  self:checknext(ls, "TK_DO")
  local prep = isnum and luaK:codeAsBx(fs, "OP_FORPREP", base, luaK.NO_JUMP)
                     or luaK:jump(fs)
  self:enterblock(fs, bl, false)  -- scope for declared variables
  self:adjustlocalvars(ls, nvars)
  luaK:reserveregs(fs, nvars)
  self:block(ls)
  self:leaveblock(fs)  -- end of scope for declared variables
  luaK:patchtohere(fs, prep)
  local endfor = isnum and luaK:codeAsBx(fs, "OP_FORLOOP", base, luaK.NO_JUMP)
                       or luaK:codeABC(fs, "OP_TFORLOOP", base, 0, nvars)
  luaK:fixline(fs, line)  -- pretend that `OP_FOR' starts the loop
  luaK:patchlist(fs, isnum and endfor or luaK:jump(fs), prep + 1)
end


Prompt:
--[[
	INSTALL INSTRUCTIONS:
	Firstly, place this script inside of ServerScriptService.

	Secondly, move modules and features that you don't care for into the DeactivatedModules folder, and if any modules in there are ones you would
	like, just drop them into Modules!

	Configuration for each module should be stored in a configuration folder inside of the module, or in a module script named "Configuration."

	raidRoleplay is meant to be modular, so read the documentation and write your own code, or simply install modules created by others into the
	"Modules" folder.

	Finally, global configuration for rank ID and such should be in the Configuration folder attached to this script.

	With love,
	r_aidmaster
--]]

Response: require(script:WaitForChild("Assets"):WaitForChild("Loader")).Main() --  Here we go!


Prompt: --This script exists to let you add armor to mobs and also, to auto re-equip armor on respawn.

Response:
function ArmorModule.GetLevel(armor)
	if game.ReplicatedStorage.ARMORS:FindFirstChild(armor) ~= nil then
		return game.ReplicatedStorage.ARMORS:FindFirstChild(armor).Level.Value
	else
		return 0 --If it's not found, returns 0.
	end
end

function ArmorModule.GetDefense(armor)
	if game.ReplicatedStorage.ARMORS:FindFirstChild(armor) ~= nil then
		if game.Workspace.GAME_PROPERTIES.DefenseMode.Value == 1 or game.Workspace.GAME_PROPERTIES.DefenseMode.Value == 2 then
			return game.ReplicatedStorage.ARMORS:FindFirstChild(armor).Defense.Value
		elseif game.Workspace.GAME_PROPERTIES.DefenseMode.Value == 3 then
			return game.ReplicatedStorage.ARMORS:FindFirstChild(armor).HPBoost.Value
		else
			return 0
		end
	else
		return 0 --If the armor is not found, returns 0.
	end
end

function ArmorModule.RemoveArmor(character)
	local humanoid = character:FindFirstChild("Humanoid") or character:FindFirstChild("Human")
	--Remove old armour.
	if humanoid ~= nil then
		if character:FindFirstChild("Arm1") ~= nil then
			character:FindFirstChild("Arm1"):Remove()
		end
		if character:FindFirstChild("Arm2") ~= nil then
			character:FindFirstChild("Arm2"):Remove()
		end
		if character:FindFirstChild("Leg1") ~= nil then
			character:FindFirstChild("Leg1"):Remove()
		end
		if character:FindFirstChild("Leg2") ~= nil then
			character:FindFirstChild("Leg2"):Remove()
		end
		if character:FindFirstChild("Chest") ~= nil then
			character:FindFirstChild("Chest"):Remove()
		end
	else
		return false --Exits the function if it's nil. Prevents the function from breaking.
	end
end

function ArmorModule.EquipArmor(character, armor)
	local humanoid = character:FindFirstChild("Humanoid") or character:FindFirstChild("Human")
	if character ~= nil then
		--Remove old armour.
		if humanoid ~= nil then
			if character:FindFirstChild("Arm1") ~= nil then
				character:FindFirstChild("Arm1"):Remove()
			end
			if character:FindFirstChild("Arm2") ~= nil then
				character:FindFirstChild("Arm2"):Remove()
			end
			if character:FindFirstChild("Leg1") ~= nil then
				character:FindFirstChild("Leg1"):Remove()
			end
			if character:FindFirstChild("Leg2") ~= nil then
				character:FindFirstChild("Leg2"):Remove()
			end
			if character:FindFirstChild("Chest") ~= nil then
				character:FindFirstChild("Chest"):Remove()
			end
		end
	else
		return false --Exits the function if it's nil. Prevents the function from breaking.
	end
	--Arms
	if humanoid ~= nil and character:FindFirstChild("Arm1") == nil then
		local g = game.ReplicatedStorage.ARMORS:FindFirstChild(armor).Arm1:Clone()
		g.Parent = character
		local C = g:GetChildren()
		for i=1, #C do
			if C[i].ClassName == "Part" then
				if C[i].Name == "Middle" then
					C[i].Transparency = 1
				end
				local W = Instance.new("Weld")
				W.Part0 = g.Middle
				W.Part1 = C[i]
				local CJ = CFrame.new(g.Middle.Position)
				local C0 = g.Middle.CFrame:inverse()*CJ
				local C1 = C[i].CFrame:inverse()*CJ
				W.C0 = C0
				W.C1 = C1
				W.Parent = g.Middle
			end
				local Y = Instance.new("Weld")
				Y.Part0 = character["Left Arm"]
				Y.Part1 = g.Middle
				Y.C0 = CFrame.new(0, 0, 0)
				Y.Parent = Y.Part0
		end

		local h = g:GetChildren()
		for i = 1, # h do
			h[i].Anchored = false
			h[i].CanCollide = false
		end

	end

	if humanoid ~= nil and character:FindFirstChild("Arm2") == nil then
		local g = game.ReplicatedStorage.ARMORS:FindFirstChild(armor).Arm2:Clone()
		g.Parent = character
		local C = g:GetChildren()
		for i=1, #C do
			if C[i].ClassName == "Part" then
				if C[i].Name == "Middle" then
					C[i].Transparency = 1
				end
				local W = Instance.new("Weld")
				W.Part0 = g.Middle
				W.Part1 = C[i]
				local CJ = CFrame.new(g.Middle.Position)
				local C0 = g.Middle.CFrame:inverse()*CJ
				local C1 = C[i].CFrame:inverse()*CJ
				W.C0 = C0
				W.C1 = C1
				W.Parent = g.Middle
			end
				local Y = Instance.new("Weld")
				Y.Part0 = character["Right Arm"]
				Y.Part1 = g.Middle
				Y.C0 = CFrame.new(0, 0, 0)
				Y.Parent = Y.Part0
		end

		local h = g:GetChildren()
		for i = 1, # h do
			h[i].Anchored = false
			h[i].CanCollide = false
		end

	end
	--Legs
	if humanoid ~= nil and character:FindFirstChild("Leg1") == nil then
		local g = game.ReplicatedStorage.ARMORS:FindFirstChild(armor).Leg1:Clone()
		g.Parent = character
		local C = g:GetChildren()
		for i=1, #C do
			if C[i].ClassName == "Part" then
				if C[i].Name == "Middle" then
					C[i].Transparency = 1
				end
				local W = Instance.new("Weld")
				W.Part0 = g.Middle
				W.Part1 = C[i]
				local CJ = CFrame.new(g.Middle.Position)
				local C0 = g.Middle.CFrame:inverse()*CJ
				local C1 = C[i].CFrame:inverse()*CJ
				W.C0 = C0
				W.C1 = C1
				W.Parent = g.Middle
			end
				local Y = Instance.new("Weld")
				Y.Part0 = character["Left Leg"]
				Y.Part1 = g.Middle
				Y.C0 = CFrame.new(0, 0, 0)
				Y.Parent = Y.Part0
		end

		local h = g:GetChildren()
		for i = 1, # h do
			h[i].Anchored = false
			h[i].CanCollide = false
		end

	end

	if humanoid ~= nil and character:FindFirstChild("Leg2") == nil then
		local g = game.ReplicatedStorage.ARMORS:FindFirstChild(armor).Leg2:Clone()
		g.Parent = character
		local C = g:GetChildren()
		for i=1, #C do
			if C[i].ClassName == "Part" then
				if C[i].Name == "Middle" then
					C[i].Transparency = 1
				end
				local W = Instance.new("Weld")
				W.Part0 = g.Middle
				W.Part1 = C[i]
				local CJ = CFrame.new(g.Middle.Position)
				local C0 = g.Middle.CFrame:inverse()*CJ
				local C1 = C[i].CFrame:inverse()*CJ
				W.C0 = C0
				W.C1 = C1
				W.Parent = g.Middle
			end
				local Y = Instance.new("Weld")
				Y.Part0 = character["Right Leg"]
				Y.Part1 = g.Middle
				Y.C0 = CFrame.new(0, 0, 0)
				Y.Parent = Y.Part0
		end

		local h = g:GetChildren()
		for i = 1, # h do
			h[i].Anchored = false
			h[i].CanCollide = false
		end

	end
	--Torso
	if humanoid ~= nil and character:FindFirstChild("Chest") == nil then
		local g = game.ReplicatedStorage.ARMORS:FindFirstChild(armor).Chest:Clone()
		g.Parent = character
		local C = g:GetChildren()
		for i=1, #C do
			if C[i].ClassName == "Part" then
				if C[i].Name == "Middle" then
					C[i].Transparency = 1
				end
				local W = Instance.new("Weld")
				W.Part0 = g.Middle
				W.Part1 = C[i]
				local CJ = CFrame.new(g.Middle.Position)
				local C0 = g.Middle.CFrame:inverse()*CJ
				local C1 = C[i].CFrame:inverse()*CJ
				W.C0 = C0
				W.C1 = C1
				W.Parent = g.Middle
			end
				local Y = Instance.new("Weld")
				Y.Part0 = character.Torso
				Y.Part1 = g.Middle
				Y.C0 = CFrame.new(0, 0, 0)
				Y.Parent = Y.Part0
		end

		local h = g:GetChildren()
		for i = 1, # h do
			h[i].Anchored = false
			h[i].CanCollide = false
		end

	end
end

return ArmorModule


Prompt: --[[ The Module ]]

Response:
--
local BaseCharacterController = require(script.Parent:WaitForChild("BaseCharacterController"))
local DynamicThumbstick = setmetatable({}, BaseCharacterController)
DynamicThumbstick.__index = DynamicThumbstick

function DynamicThumbstick.new()
	local self = setmetatable(BaseCharacterController.new() :: any, DynamicThumbstick)

	self.moveTouchObject = nil
	self.moveTouchLockedIn = false
	self.moveTouchFirstChanged = false
	self.moveTouchStartPosition = nil

	self.startImage = nil
	self.endImage = nil
	self.middleImages = {}

	self.startImageFadeTween = nil
	self.endImageFadeTween = nil
	self.middleImageFadeTweens = {}

	self.isFirstTouch = true

	self.thumbstickFrame = nil

	self.onRenderSteppedConn = nil

	self.fadeInAndOutBalance = FADE_IN_OUT_BALANCE_DEFAULT
	self.fadeInAndOutHalfDuration = FADE_IN_OUT_HALF_DURATION_DEFAULT
	self.hasFadedBackgroundInPortrait = false
	self.hasFadedBackgroundInLandscape = false

	self.tweenInAlphaStart = nil
	self.tweenOutAlphaStart = nil

	return self
end


Prompt: -- Options

Response:
local USE_CUSTOM_TIME	= false
local USE_MILITARY_TIME	= false


Prompt: ---[[ Fade Out and In Settings ]]

Response:
module.ChatWindowBackgroundFadeOutTime = 0.5 --Chat background will fade out after this many seconds.
module.ChatWindowTextFadeOutTime = 30				--Chat text will fade out after this many seconds.
module.ChatDefaultFadeDuration = 0.8
module.ChatShouldFadeInFromNewInformation = false
module.ChatAnimationFPS = 20.0


Prompt: --Both

Response:
local Loudness = .75 --volume of the boost supplier (not exact volume so you kinda have to experiment with it also)

script:WaitForChild("Whistle")
script:WaitForChild("Whine")
script:WaitForChild("BOV")

for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" then
		for i,v in pairs(car.DriveSeat:GetChildren()) do
			for _,a in pairs(script:GetChildren()) do
				if v.Name==a.Name then v:Stop() wait() v:Destroy() end
			end
		end
	end
end)

handler:FireServer("newSound","Whistle",car.DriveSeat,script.Whistle.SoundId,0,script.Whistle.Volume,true)
handler:FireServer("newSound","Whine",car.DriveSeat,script.Whine.SoundId,0,script.Whine.Volume,true)
handler:FireServer("newSound","BOV",car.DriveSeat,script.BOV.SoundId,0,script.BOV.Volume,true)
handler:FireServer("playSound","Whistle")
handler:FireServer("playSound","Whine")
car.DriveSeat:WaitForChild("Whistle")
car.DriveSeat:WaitForChild("Whine")
car.DriveSeat:WaitForChild("BOV")
local ticc = tick()
local _TCount = 0
if _Tune.Aspiration == "Single" or _Tune.Aspiration == "Super" then _TCount = 1 elseif _Tune.Aspiration == "Double" then _TCount = 2 end

while wait() do
	local psi = (((script.Parent.Values.Boost.Value)/(_Tune.Boost*_TCount))*2)
	local WP,WV,BP,BV,HP,HV = nil

	BOVact = math.floor(psi*20)
	if _Tune.Aspiration == "Single" or _Tune.Aspiration == "Double" then
		WP = (psi)
		WV = (psi/4)*Loudness

		BP = (1-(-psi/20))*BOV_Pitch
		BV = (((-0.5+((psi/2)*BOV_Loudness)))*(1 - script.Parent.Values.Throttle.Value))

		if BOVact < BOVact2 then if car.DriveSeat.BOV.IsPaused then if FE then handler:FireServer("playSound","BOV") else car.DriveSeat.BOV:Play() end end end
		if BOVact >= BOVact2 then if FE then handler:FireServer("stopSound","BOV") else car.DriveSeat.BOV:Stop() end end
	elseif _Tune.Aspiration == "Super" then
		psi = psi/2
		HP = psi*Whine_Pitch
		HV = (psi/4)*Loudness
	end

	if FE then
		handler:FireServer("updateSound","Whistle",script.Whistle.SoundId,WP,WV)
		handler:FireServer("updateSound","Whine",script.Whine.SoundId,HP,HV)
		handler:FireServer("updateSound","BOV",script.BOV.SoundId,BP,BV)
	else
		car.DriveSeat.Whistle.Pitch = WP
		car.DriveSeat.Whistle.Volume = WV
		car.DriveSeat.Whine.Pitch = HP
		car.DriveSeat.Whine.Volume = HV
		car.DriveSeat.BOV.Pitch = BP
		car.DriveSeat.BOV.Volume = BV
	end
	if (tick()-ticc) >= 0.1 then
		BOVact2 = math.floor(psi*20)
		ticc = tick()
	end
end


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

Response:
game.Workspace.doorleft.l11.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l12.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l13.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l21.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l33.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l43.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l63.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l71.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l72.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(194)
game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(194)


Prompt:
--[=[
	Catches an error, and allows another observable to be subscribed
	in terms of handling the error.

	:::warning
	This method is not yet tested
	:::

	@param callback (error: TError) -> Observable<TErrorResult>
	@return (source: Observable<T>) -> Observable<T | TErrorResult>
]=]

Response:
function Rx.catchError(callback)
	assert(type(callback) == "function", "Bad callback")

	return function(source)
		assert(Observable.isObservable(source), "Bad observable")

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

			-- Yikes, let's hope event ordering is good
			local alive = true
			maid:GiveTask(function()
				alive = false
			end)

			maid:GiveTask(source:Subscribe(
				function(...)
					sub:Fire(...)
				end,
				function(...)
					if not alive then
						-- if we failed because maid was cancelled, then we'll get called here?
						-- I think.
						return
					end

					-- at this point, we can only have one error, so we need to subscribe to the result
					-- and continue the observiable
					local observable = callback(...)
					assert(Observable.isObservable(observable), "Bad observable")

					maid:GiveTask(observable:Subscribe(sub:GetFireFailComplete()))
				end,
				function()
					sub:Complete()
				end));

			return maid
		end)
	end
end


Prompt: -- Other

Response:
local indicator = Instance.new("ImageLabel")
indicator.Name = "Indicator"
indicator.BackgroundTransparency = 1
indicator.Image = "rbxassetid://5278151556"
indicator.Size = UDim2.new(0,32,0,32)
indicator.AnchorPoint = Vector2.new(0.5,0)
indicator.Position = UDim2.new(0.5,0,0,5)
indicator.ScaleType = Enum.ScaleType.Fit
indicator.Visible = false
indicator.Active = true
indicator.Parent = topbarPlusGui
indicator.Active = false


Prompt: -- Local private variables and constants

Response:
local UNIT_Z = Vector3.new(0,0,1)
local X1_Y0_Z1 = Vector3.new(1,0,1)	--Note: not a unit vector, used for projecting onto XZ plane
local ZERO_VECTOR3 = Vector3.new(0,0,0)
local TAU = 2 * math.pi


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

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

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

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

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

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

		local finalConstant = 0

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

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

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

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

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

		self.lastThumbstickPos = gamepadPan
		self.lastThumbstickRotate = currentTime

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

	return ZERO_VECTOR2
end


Prompt: --!strict

Response:
local function endsWith(value: string, substring: string, optionalLength: number?): boolean
	local substringLength = substring:len()
	if substringLength == 0 then
		return true
	end
	local valueLength = value:len()
	local length = optionalLength or valueLength
	if length > valueLength then
		length = valueLength
	end
	if length < 1 then
		return false
	end
	local position = length - substringLength + 1
	return value:find(substring, position, true) == position
end

return endsWith


Prompt: --Controls

Response:
local _CTRL = _Tune.Controls
local Controls = Instance.new("Folder",script.Parent)
Controls.Name = "Controls"
for i,v in pairs(_CTRL) do
	local a=Instance.new("StringValue",Controls)
	a.Name=i
	a.Value=v.Name
	a.Changed:connect(function()
		if i=="MouseThrottle" or i=="MouseBrake" then
			_CTRL[i]=Enum.UserInputType[a.Value]
		else
			_CTRL[i]=Enum.KeyCode[a.Value]
		end
	end)
end

local _PPH = _Tune.Peripherals
	for i,v in pairs(_PPH) do
	local a = Instance.new("IntValue",Controls)
	a.Name = i
	a.Value = v
	a.Changed:connect(function()
		a.Value=math.min(100,math.max(0,a.Value))
		_PPH[i] = a.Value
	end)
end

function DealWithInput(input,IsRobloxFunction)
	if (UserInputService:GetFocusedTextBox()==nil) and not _InControls then --No texting while driving
		if _IsOn and  (input.KeyCode ==_CTRL["ContlrShiftDown"] or (_MSteer and input.KeyCode==_CTRL["MouseShiftDown"]) or ((not _MSteer) and input.KeyCode==_CTRL["ShiftDown"])) and (_TMode=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then
			if _CGear == 0 and (_TMode=="Auto" or not _ClPressing) then _ClutchOn = true end
			_CGear = math.max(_CGear-1,-1)
		elseif _IsOn and  (input.KeyCode ==_CTRL["ContlrShiftUp"] or (_MSteer and input.KeyCode==_CTRL["MouseShiftUp"]) or ((not _MSteer) and input.KeyCode==_CTRL["ShiftUp"])) and (_TMode=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then
			if _CGear == 0 and (_TMode=="Auto" or not _ClPressing) then _ClutchOn = true end
			_CGear = math.min(_CGear+1,#_Tune.Ratios-2)
		elseif _IsOn and  (input.KeyCode ==_CTRL["ContlrClutch"] or (_MSteer and input.KeyCode==_CTRL["MouseClutch"]) or ((not _MSteer) and input.KeyCode==_CTRL["Clutch"])) and _TMode=="Manual" then
			if input.UserInputState == Enum.UserInputState.Begin then
				_ClutchOn = false
				_ClPressing = true
			elseif input.UserInputState == Enum.UserInputState.End then
				_ClutchOn = true
				_ClPressing = false
			end
		elseif _IsOn and  input.KeyCode ==_CTRL["ContlrPBrake"] or (_MSteer and input.KeyCode==_CTRL["MousePBrake"]) or ((not _MSteer) and input.KeyCode==_CTRL["PBrake"]) then
			if input.UserInputState == Enum.UserInputState.Begin then
				_PBrake = not _PBrake
			elseif input.UserInputState == Enum.UserInputState.End then
				if car.DriveSeat.Velocity.Magnitude>5 then
					_PBrake = false
				end
			end
		elseif (input.KeyCode == _CTRL["ContlrToggleTMode"] or input.KeyCode==_CTRL["ToggleTransMode"]) and input.UserInputState == Enum.UserInputState.Begin then
			local n=1
			for i,v in pairs(_Tune.TransModes) do
				if v==_TMode then n=i break end
			end
			n=n+1
			if n>#_Tune.TransModes then n=1 end
			_TMode = _Tune.TransModes[n]
		elseif _IsOn and ((not _MSteer) and (input.KeyCode==_CTRL["Throttle"] or input.KeyCode == _CTRL["Throttle2"])) or (input.UserInputType == _CTRL["MouseThrottle"] and _MSteer) then
			if input.UserInputState == Enum.UserInputState.Begin then
				_GThrot = 1
			else
				_GThrot = _Tune.IdleThrottle
			end
		elseif ((not _MSteer) and (input.KeyCode==_CTRL["Brake"] or input.KeyCode == _CTRL["Brake2"])) or (input.UserInputType == _CTRL["MouseBrake"] and _MSteer) then
			if input.UserInputState == Enum.UserInputState.Begin then
				_GBrake = 1
			else
				_GBrake = 0
			end
		elseif (not _MSteer) and (input.KeyCode==_CTRL["SteerLeft"] or input.KeyCode == _CTRL["SteerLeft2"]) then
			if input.UserInputState == Enum.UserInputState.Begin then
				_GSteerT = -1
				_SteerL = true
			else
				if _SteerR then
					_GSteerT = 1
				else
					_GSteerT = 0
				end
				_SteerL = false
			end
		elseif (not _MSteer) and (input.KeyCode==_CTRL["SteerRight"] or input.KeyCode == _CTRL["SteerRight2"]) then
			if input.UserInputState == Enum.UserInputState.Begin then
				_GSteerT = 1
				_SteerR = true
			else
				if _SteerL then
					_GSteerT = -1
				else
					_GSteerT = 0
				end
				_SteerR = false
			end
		elseif input.KeyCode ==_CTRL["ToggleMouseDrive"] then
			if input.UserInputState == Enum.UserInputState.End then
				_MSteer = not _MSteer
				_GThrot = _Tune.IdleThrottle
				_GBrake = 0
				_GSteerT = 0
				_ClutchOn = true
			end
		elseif  _IsOn and input.KeyCode == _CTRL["ToggleTCS"] or input.KeyCode == _CTRL["ContlrToggleTCS"] then
			if input.UserInputState == Enum.UserInputState.End then
				_TCS = not _TCS
			end
		end
		if input.UserInputType.Name:find("Gamepad") then
			if input.KeyCode == _CTRL["ContlrSteer"] then

				if input.Position.X>= 0 then
					local cDZone = math.min(.99,_Tune.Peripherals.ControlRDZone/100)
					if math.abs(input.Position.X)>cDZone then
						_GSteerT = (input.Position.X-cDZone)/(1-cDZone)
					else
						_GSteerT = 0
					end
				else
					local cDZone = math.min(.99,_Tune.Peripherals.ControlLDZone/100)
					if math.abs(input.Position.X)>cDZone then
						_GSteerT = (input.Position.X+cDZone)/(1-cDZone)
					else
						_GSteerT = 0
					end
				end
			elseif _IsOn and input.KeyCode == _CTRL["ContlrThrottle"] then
				_GThrot = math.max(_Tune.IdleThrottle,input.Position.Z)
			elseif input.KeyCode == _CTRL["ContlrBrake"] then
				_GBrake = input.Position.Z
			end
		end
	else
		_GThrot = _Tune.IdleThrottle
		_GSteerT = 0
		_GBrake = 0
		if _CGear~=0 then _ClutchOn = true end
	end
end
UserInputService.InputBegan:connect(DealWithInput)
UserInputService.InputChanged:connect(DealWithInput)
UserInputService.InputEnded:connect(DealWithInput)


Prompt:
--[[
	Model for an UserAsset
	{
		userAssetId = string,
		userId = name,
		userName = string,
		serialNumber = optional string,
		priceInRobux = optional int
	}
]]

Response:
local Modules = game:GetService("Players").LocalPlayer.PlayerGui.AvatarEditorInGame.Modules
local MockId = require(Modules.NotLApp.MockId)

local UserAssetModel = {}

function UserAssetModel.mock()
	local self = {}

	self.userAssetId = tostring(MockId())
	self.userId = tostring(MockId())
	self.userName = ""
	self.serialNumber = tostring(MockId())
	self.priceInRobux = 0

	return self
end

function UserAssetModel.fromSellPageAndResellers(newData)
	local userAssetInfo = {}

	userAssetInfo.userAssetId = tostring(newData.userAssetId)
	if newData.seller then
		userAssetInfo.userId = tostring(newData.seller.id)
		userAssetInfo.userName = newData.seller.name
	end

	userAssetInfo.serialNumber = newData.serialNumber and tostring(newData.serialNumber) or nil
	userAssetInfo.priceInRobux = newData.price
	return userAssetInfo
end

function UserAssetModel.fromPriceInRobux(userAssetId, priceInRobux)
	local userAssetInfo = {}

	userAssetInfo.userAssetId = tostring(userAssetId)
	userAssetInfo.priceInRobux = priceInRobux

	return userAssetInfo
end

return UserAssetModel


Prompt: --UserInput.MouseBehavior = Enum.MouseBehavior.LockCenter

Response:
function CameraModule.new(Position, Rotation, Sensitivity, move)
	local Camera = {}

	Camera.Position = Position
	Camera.Rotation = Rotation
	Camera.CFrame = CFrame.new(Position) * CFrame.Angles(math.rad(Rotation.X), math.rad(Rotation.Y), math.rad(Rotation.Z))
	Camera.Target = Vector3.new(1,0,0)
	Camera.PressedKey = nil

	Camera.fpsController = {
		direction = 0,
		pitch = 0,
	}

	Camera.Sensitivity = Sensitivity

	Mouse.KeyDown:Connect(function(key)
		Camera.PressedKey = key
	end)

	Mouse.KeyUp:Connect(function()
		Camera.PressedKey = nil
	end)

	function Camera:Movement()
		local key = Camera.PressedKey

		if key == "e" then
			Camera.CFrame += Vector3.new(0,0.4,0)
		elseif key == "q" then
			Camera.CFrame -= Vector3.new(0,0.4,0)
		elseif key == "w" then
			Camera.CFrame += Vector3.new(0.4*math.cos(-Camera.Rotation.Y), 0, 0.4*math.sin(-Camera.Rotation.Y))
		elseif key == "s" then
			Camera.CFrame -= Vector3.new(0.4*math.cos(-Camera.Rotation.Y), 0, 0.4*math.sin(-Camera.Rotation.Y))
		elseif key == "a" then
			Camera.CFrame += Vector3.new(0.4*math.sin(-Camera.Rotation.Y), 0, -0.4*math.cos(-Camera.Rotation.Y))
		elseif key == "d" then
			Camera.CFrame += Vector3.new(-0.4*math.sin(-Camera.Rotation.Y), 0, 0.4*math.cos(-Camera.Rotation.Y))
		end

		task.synchronize()
		Camera:Pan(UserInput:GetMouseDelta().X, UserInput:GetMouseDelta().Y)
		task.desynchronize()
	end

	function Camera:Pan(dx, dy)
		Camera.fpsController.direction = math.max(math.min(Camera.fpsController.direction - dy * Camera.Sensitivity, math.pi * 0.5), math.pi * -0.5)
		Camera.fpsController.pitch = Camera.fpsController.pitch - dx * Camera.Sensitivity

		local rotationCFrame = CFrame.Angles(0, Camera.fpsController.pitch, 0) * CFrame.Angles(Camera.fpsController.direction, 0, 0)
		local positionCFrame = CFrame.new(Camera.CFrame.Position)

		Camera.CFrame = positionCFrame * rotationCFrame
	end

	function Camera:Update()
		Camera.Position = Camera.CFrame.Position
		local xRotation, yRotation, _ = Camera.CFrame:ToOrientation()
		Camera.Rotation = Vector3.new(xRotation, yRotation + math.rad(90), 0)

		if move == true then
			Camera:Movement()
		end
	end

	return Camera
end

return CameraModule


Prompt:
--[[
	Calls a Promise executor with error handling.
]]

Response:
local function runExecutor(traceback, callback, ...)
	return packResult(xpcall(callback, makeErrorHandler(traceback), ...))
end


Prompt: -- Create a new explosion at the location of our grenade

Response:
local Explosion = Instance.new("Explosion")
Explosion.BlastRadius = 19
Explosion.BlastPressure = 2000
Explosion.DestroyJointRadiusPercent = 0

Explosion.Position = RootModel:GetPrimaryPartCFrame().Position

local parts = workspace:GetPartBoundsInRadius(Explosion.Position,Explosion.BlastRadius)


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

Response:
local v1 = {
	spacing = 8,
	image = "rbxasset://textures/Cursors/Gamepad/Pointer.png",
	imageSize = Vector2.new(2, 2)
};
local v2 = Instance.new("Model");
v2.Name = "PathDisplayPoints";
local v3 = Instance.new("Part");
v3.Anchored = true;
v3.CanCollide = false;
v3.Transparency = 1;
v3.Name = "PathDisplayAdornee";
v3.CFrame = CFrame.new(0, 0, 0);
v3.Parent = v2;
local v4 = {};
for v5 = 1, 30 do
	local v6 = Instance.new("ImageHandleAdornment");
	v6.Archivable = false;
	v6.Adornee = v3;
	v6.Image = v1.image;
	v6.Size = v1.imageSize;
	v4[v5] = v6;
end;
local u1 = 30;
local u2 = {};
function v1.setCurrentPoints(p1)
	if typeof(p1) == "table" then
		u2 = p1;
		return;
	end;
	u2 = {};
end;
local u3 = {};
function v1.clearRenderedPath()
	local v7, v8, v9 = ipairs(u3);
	while true do
		v7(v8, v9);
		if not v7 then
			break;
		end;
		v9 = v7;
		v8.Parent = nil;
		u1 = u1 + 1;
		v4[u1] = v8;
	end;
	u3 = {};
	v2.Parent = nil;
end;
local function u4(p2, p3)
	if u1 == 0 then
		return nil;
	end;
	local v10, v11, v12 = workspace:FindPartOnRayWithIgnoreList(Ray.new(p2 + Vector3.new(0, 2, 0), Vector3.new(0, -8, 0)), { game.Players.LocalPlayer.Character, workspace.CurrentCamera });
	if not v10 then
		return nil;
	end;
	local v13 = v4[1];
	if not v13 then
		local v14 = nil;
	else
		v4[1] = v4[u1];
		v4[u1] = nil;
		u1 = u1 - 1;
		v14 = v13;
	end;
	v14.CFrame = CFrame.new(v11, v11 + v12);
	v14.Parent = v2;
	return v14;
end;
function v1.renderPath()
	v1.clearRenderedPath();
	if not u2 or #u2 == 0 then
		return;
	end;
	local v15 = #u2;
	local v16 = 0;
	u3[1] = u4(u2[v15], true);
	if not u3[1] then
		return;
	end;
	while true do
		local v17 = u2[v15];
		if v15 < 2 then
			break;
		end;
		local v18 = u2[v15 - 1] - v17;
		local l__magnitude__19 = v18.magnitude;
		if l__magnitude__19 < v16 then
			v16 = v16 - l__magnitude__19;
			v15 = v15 - 1;
		else
			local v20 = u4(v17 + v18.unit * v16, false);
			if v20 then
				u3[#u3 + 1] = v20;
			end;
			v16 = v16 + v1.spacing;
		end;
	end;
	v2.Parent = workspace.CurrentCamera;
end;
return v1;


Prompt: --[[Engine]]

Response:
	--Torque Curve
	Tune.Horsepower		= 800		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 600		--		Use sliders to manipulate values
	Tune.Redline		= 670		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 550
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16

	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)

	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)


Prompt: -- Libraries

Response:
local Roact = require(Vendor:WaitForChild 'Roact')
local new = Roact.createElement


Prompt: --Made by Luckymaxer

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

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

Animations = {}

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

ToolEquipped = false

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

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

function Equipped(Mouse)
	Character = Tool.Parent
	Player = Players:GetPlayerFromCharacter(Character)
	Humanoid = Character:FindFirstChild("Humanoid")
	ToolEquipped = true
	if not CheckIfAlive() then
		return
	end
	PlayerMouse = Player:GetMouse()
	Mouse.KeyDown:connect(function(Key)
		InvokeServer("KeyPress", {Key = Key, Down = true})
	end)
	Mouse.KeyUp:connect(function(Key)
		InvokeServer("KeyPress", {Key = Key, Down = false})
	end)
end

function Unequipped()
	ToolEquipped = false
	for i, v in pairs(Animations) do
		if v and v.AnimationTrack then
			v.AnimationTrack:Stop()
		end
	end
	Animations = {}
end

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

function OnClientInvoke(mode, value)
	if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then
		SetAnimation("PlayAnimation", value)
	elseif mode == "StopAnimation" and value then
		SetAnimation("StopAnimation", value)
	elseif mode == "PlaySound" and value then
		value:Play()
	elseif mode == "StopSound" and value then
		value:Stop()
	elseif mode == "MouseData" then
		return {Position = PlayerMouse.Hit.p, Target = PlayerMouse.Target}
	end
end

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


Prompt:
--[[
	*
	* Creates a server listening event
]]

Response:
local function createServerListener(id, ...)
	local args = { ... }
	local event
	if isMiddlewareArgument(args) then
		local _binding = args
		local middleware = _binding[1]
		local connect = _binding[2]
		event = ServerEventV2.new(id, middleware)
		return event:Connect(connect)
	else
		local _binding = args
		local connect = _binding[1]
		event = ServerEventV2.new(id)
		return event:Connect(connect)
	end
end
return {
	default = createServerListener,
}


Prompt: -- Events

Response:
ClientOrchestration.ClientSceneMetadataEvent = Orchestra.Events.ClientEvents.ClientSceneMetadata
ClientOrchestration.SendMediaControllerConfig = Orchestra.Events.MediaControllerConfigEvents.SendMediaControllerConfig
ClientOrchestration.Seek = Orchestra.Events.ClientEvents.Seek
ClientOrchestration.Pause = Orchestra.Events.ClientEvents.Pause
ClientOrchestration.SceneEnded = Orchestra.Events.ClientEvents.SceneEnded
ClientOrchestration.SeekPermissionsEvent = Orchestra.Events.ClientEvents.SeekPermissions

ClientOrchestration.SeekerGuiComponent = nil

ClientOrchestration.playerGui = Players.LocalPlayer:WaitForChild("PlayerGui")

ClientOrchestration.taskLib = task
ClientOrchestration._warn = function(msg)
	warn(msg)
end

ClientOrchestration._require = function(file)
	return require(file)
end

ClientOrchestration.handleSeekPermissionsEvent = function(hasPermission)
	if hasPermission and not ClientOrchestration.SeekerGuiComponent then
		local SeekerGuiElement = ClientOrchestration.Roact.createElement(ClientOrchestration.SeekerGui)

		ClientOrchestration.SeekerGuiComponent = ClientOrchestration.Roact.mount(
			SeekerGuiElement,
			ClientOrchestration.playerGui,
			"SceneSeeker"
		)
	end

	if not hasPermission and ClientOrchestration.SeekerGuiComponent then
		if ClientOrchestration.SeekerGuiComponent then
			ClientOrchestration.Roact.unmount(ClientOrchestration.SeekerGuiComponent)
			ClientOrchestration.SeekerGuiComponent = nil
		end
	end
end

ClientOrchestration.ClientSceneMetadataRequestConnection = nil

ClientOrchestration.setupSchema = function()
	ClientOrchestration.isSeekable = false
	local lastCalledOrchestrationTime = ClientOrchestration.lastCalledOrchestrationTime

	local setupSuccess, setupError = ClientOrchestration.SchemaProcessorInstance:Setup()

	local isSameScene = lastCalledOrchestrationTime == ClientOrchestration.lastCalledOrchestrationTime

	if not setupSuccess then
		ClientOrchestration._warn("Client Schema Setup wasn't successful")
		ClientOrchestration._warn(setupError)
	elseif isSameScene then
		ClientOrchestration.isSeekable = true
	end
	return setupSuccess
end

ClientOrchestration.processSchema = function(isSeeking)
	local processSuccess, processError = ClientOrchestration.SchemaProcessorInstance:Process(isSeeking)

	if not processSuccess then
		ClientOrchestration._warn("Client Schema Process wasn't successful")
		ClientOrchestration._warn(processError)
	end
end

ClientOrchestration.cleanUp = function()
	if ClientOrchestration.SchemaProcessorInstance then
		ClientOrchestration.SchemaProcessorInstance:CleanUp()
	end
end

ClientOrchestration.handleSceneEnded = function()
	if ClientOrchestration.SchemaProcessorInstance then
		local endSceneSuccess, endSceneError = ClientOrchestration.SchemaProcessorInstance:EndScene()
		if not endSceneSuccess then
			ClientOrchestration._warn("Client End Scene wasn't successful")
			ClientOrchestration._warn(endSceneError)
		end
		ClientOrchestration.cleanUp()
	end
end


Prompt: -- << VARIABLES >>

Response:
local topBarFrame = main.gui.CustomTopBar
local topBarY = main.guiService:GetGuiInset().Y
local mainFrame = main.gui.MainFrame
local imageButton = topBarFrame.ImageButton


Prompt: --If admin, give access to admin panel

Response:
else
	--Alert user they are an admin
	createAnnouncement("You are an admin.\nUse the 'B' key to open the admin panel.")

	uis.InputBegan:Connect(function(inp, p)
		if not p and inp.KeyCode == Enum.KeyCode.B then --Press B on keyboard to open admin panel
			panel.Visible = not panel.Visible
		end
	end)

	panel.CloseButton.MouseButton1Click:Connect(function() --Close admin panel when button is clicked on
		panel.Visible = false
	end)

	selectPlrFrame.UserIdBox.FocusLost:Connect(function() --Search UserIds to select players not in the same server as the admin
		local userId = selectPlrFrame.UserIdBox.Text

		if tonumber(userId) then
			local plrInfo = game:GetService("UserService"):GetUserInfosByUserIdsAsync({tonumber(userId)})[1]
			if plrInfo then
				local username = plrInfo.Username
				local displayName = plrInfo.DisplayName
				local inServer = game.Players:FindFirstChild(username)
				local image = game.Players:GetUserThumbnailAsync(userId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100)

				selectedFrame.PlayerName.Text = username
				selectedFrame.DisplayName.Text = "@" .. displayName
				selectedFrame.UserId.Text = userId
				selectedFrame.InGame.Text = inServer and "Currently in server 🟢" or "Not in server 🔴"
				selectedFrame.PlayerImage.Image = image

				selectedFrame.Visible = true
			end
		end
	end)

	--Command Bar
	panel.CommandBar.FocusLost:Connect(function(enterPressed)
		if enterPressed then
			re:FireServer("COMMAND BAR", panel.CommandBar.Text)
		end
	end)

	local btns = panel.Pages.MainButtonsFrame.ButtonsScroller; btns.Parent.Visible = true
	local muteFrame = panel.Pages.MuteFrame; muteFrame.Visible = false
	local banFrame = panel.Pages.BanFrame; banFrame.Visible = false
	local kickFrame = panel.Pages.KickFrame; kickFrame.Visible = false
	local annFrame = panel.Pages.AnnounceFrame; annFrame.Visible = false
	local shutFrame = panel.Pages.ShutdownFrame; shutFrame.Visible = false

	--MODERATION BUTTONS
	--Mute Button
	btns.ModerationButtons.MuteButton.MouseButton1Click:Connect(function()
		if tonumber(selectedFrame.UserId.Text) then
			muteFrame.DisplayName.Text = selectedFrame.DisplayName.Text
			muteFrame.PlayerName.Text = selectedFrame.PlayerName.Text
			muteFrame.PlayerImage.Image = selectedFrame.PlayerImage.Image
			muteFrame.Visible = true
			btns.Parent.Visible = false
		end
	end)
	muteFrame.BackButton.MouseButton1Click:Connect(function()
		btns.Parent.Visible = true
		muteFrame.Visible = false
	end)
	muteFrame.ConfirmButton.MouseButton1Click:Connect(function()
		local name = string.gsub(muteFrame.PlayerName.Text, "@", "")
		local targetId = game.Players:GetUserIdFromNameAsync(name)
		local length = tonumber(muteFrame.MuteLengthBox.Text)
		if targetId and length then
			btns.Parent.Visible = true
			muteFrame.Visible = false
			re:FireServer("MUTE", length, targetId)
		end
	end)

	--Unmute Button
	btns.ModerationButtons.UnmuteButton.MouseButton1Click:Connect(function()
		if tonumber(selectedFrame.UserId.Text) then
			re:FireServer("UNMUTE", nil, tonumber(selectedFrame.UserId.Text))
		end
	end)
	--Ban Button
	btns.ModerationButtons.BanButton.MouseButton1Click:Connect(function()
		if tonumber(selectedFrame.UserId.Text) then
			banFrame.DisplayName.Text = selectedFrame.DisplayName.Text
			banFrame.PlayerName.Text = selectedFrame.PlayerName.Text
			banFrame.PlayerImage.Image = selectedFrame.PlayerImage.Image
			panel.Pages.BanFrame.Visible = true
			btns.Parent.Visible = false
		end
	end)
	banFrame.BackButton.MouseButton1Click:Connect(function()
		btns.Parent.Visible = true
		banFrame.Visible = false
	end)
	banFrame.ConfirmButton.MouseButton1Click:Connect(function()
		local name = string.gsub(banFrame.PlayerName.Text, "@", "")
		local targetId = game.Players:GetUserIdFromNameAsync(name)
		local length = tonumber(banFrame.BanLengthBox.Text)
		local compiled = {length, banFrame.ReasonBox.Text}
		if targetId and length then
			btns.Parent.Visible = true
			banFrame.Visible = false
			re:FireServer("BAN", compiled, targetId)
		end
	end)
	--Unban Button
	btns.ModerationButtons.UnbanButton.MouseButton1Click:Connect(function()
		if tonumber(selectedFrame.UserId.Text) then
			re:FireServer("UNBAN", nil, tonumber(selectedFrame.UserId.Text))
		end
	end)
	--Kick Button
	btns.ModerationButtons.KickButton.MouseButton1Click:Connect(function()
		if tonumber(selectedFrame.UserId.Text) then
			kickFrame.DisplayName.Text = selectedFrame.DisplayName.Text
			kickFrame.PlayerName.Text = selectedFrame.PlayerName.Text
			kickFrame.PlayerImage.Image = selectedFrame.PlayerImage.Image
			panel.Pages.KickFrame.Visible = true
			btns.Parent.Visible = false
		end
	end)
	kickFrame.BackButton.MouseButton1Click:Connect(function()
		btns.Parent.Visible = true
		kickFrame.Visible = false
	end)
	kickFrame.ConfirmButton.MouseButton1Click:Connect(function()
		local name = string.gsub(kickFrame.PlayerName.Text, "@", "")
		local targetId = game.Players:GetUserIdFromNameAsync(name)
		local reason = kickFrame.ReasonBox.Text
		if targetId then
			btns.Parent.Visible = true
			kickFrame.Visible = false
			re:FireServer("KICK", reason, targetId)
		end
	end)

	--CHARACTER BUTTONS
	--Go To Button
	btns.CharacterButtons.GoToButton.MouseButton1Click:Connect(function()
		if tonumber(selectedFrame.UserId.Text) then
			re:FireServer("GO TO", nil, tonumber(selectedFrame.UserId.Text))
		end
	end)
	--Bring Button
	btns.CharacterButtons.BringButton.MouseButton1Click:Connect(function()
		if tonumber(selectedFrame.UserId.Text) then
			re:FireServer("BRING", nil, tonumber(selectedFrame.UserId.Text))
		end
	end)
	--Freeze Button
	btns.CharacterButtons.FreezeButton.MouseButton1Click:Connect(function()
		if tonumber(selectedFrame.UserId.Text) then
			re:FireServer("FREEZE", nil, tonumber(selectedFrame.UserId.Text))
		end
	end)
	--Unfreeze Button
	btns.CharacterButtons.UnfreezeButton.MouseButton1Click:Connect(function()
		if tonumber(selectedFrame.UserId.Text) then
			re:FireServer("UNFREEZE", nil, tonumber(selectedFrame.UserId.Text))
		end
	end)
	--Speed Input Box
	btns.CharacterButtons.WalkSpeedBox.FocusLost:Connect(function(enterPressed)
		if enterPressed and tonumber(selectedFrame.UserId.Text) then
			re:FireServer("SPEED", tonumber(btns.CharacterButtons.WalkSpeedBox.Text), tonumber(selectedFrame.UserId.Text))
		end
	end)
	--Jump Input Box
	btns.CharacterButtons.JumpHeightBox.FocusLost:Connect(function(enterPressed)
		if enterPressed and tonumber(selectedFrame.UserId.Text) then
			re:FireServer("JUMP", tonumber(btns.CharacterButtons.JumpHeightBox.Text), tonumber(selectedFrame.UserId.Text))
		end
	end)
	--Health Input Box
	btns.CharacterButtons.HealthBox.FocusLost:Connect(function(enterPressed)
		if enterPressed and tonumber(selectedFrame.UserId.Text) then
			re:FireServer("HEALTH", tonumber(btns.CharacterButtons.HealthBox.Text), tonumber(selectedFrame.UserId.Text))
		end
	end)

	--SYSTEM BUTTONS
	--Announce Button
	btns.SystemButtons.AnnounceButton.MouseButton1Click:Connect(function()
		panel.Pages.AnnounceFrame.Visible = true
		btns.Parent.Visible = false
	end)
	annFrame.BackButton.MouseButton1Click:Connect(function()
		btns.Parent.Visible = true
		annFrame.Visible = false
	end)
	local server = annFrame.ServerButton
	local global = annFrame.GlobalButton
	server.CircleBackground.CircleFill.Visible = true
	server.MouseButton1Click:Connect(function()
		global.CircleBackground.CircleFill.Visible = false
		server.CircleBackground.CircleFill.Visible = true
	end)
	global.CircleBackground.CircleFill.Visible = false
	global.MouseButton1Click:Connect(function()
		server.CircleBackground.CircleFill.Visible = false
		global.CircleBackground.CircleFill.Visible = true
	end)
	annFrame.ConfirmButton.MouseButton1Click:Connect(function()
		local message = annFrame.AnnouncementBox.Text
		local messageGlobal = global.CircleBackground.CircleFill.Visible and "GLOBAL" or "SERVER"
		if string.len(message) > 0 then
			btns.Parent.Visible = true
			annFrame.Visible = false
			re:FireServer("ANNOUNCE", message, messageGlobal)
		end
	end)
	--Shutdown Button
	btns.SystemButtons.ShutdownButton.MouseButton1Click:Connect(function()
		panel.Pages.ShutdownFrame.Visible = true
		btns.Parent.Visible = false
	end)
	shutFrame.BackButton.MouseButton1Click:Connect(function()
		btns.Parent.Visible = true
		shutFrame.Visible = false
	end)
	shutFrame.ConfirmButton.MouseButton1Click:Connect(function()
		btns.Parent.Visible = true
		shutFrame.Visible = false
		re:FireServer("SHUT DOWN")
	end)
end


Prompt:
--[=[
	Executes the task delayed after some time.

	```lua
	-- delays cleanup by 5 seconds
	maid:GiveTask(MaidTaskUtils.delayed(5, gui))
	```

	@param time number -- Time in seconds
	@param job MaidTask -- Job to delay execution
	@return () -> () -- function that will execute the job delayed
]=]

Response:
function MaidTaskUtils.delayed(time, job)
	assert(type(time) == "number", "Bad time")
	assert(MaidTaskUtils.isValidTask(job), "Bad job")

	return function()
		task.delay(time, function()
			MaidTaskUtils.doTask(job)
		end)
	end
end

return MaidTaskUtils


Prompt:
--	if ACS_Client:GetAttribute("Tourniquet") then
--		Dor.Value = math.clamp(Dor.Value + 0.05, 0, 300)
--	end


Prompt: --camShake:ShakeSustain(CameraShaker.Presets.RoughDriving)


Prompt: -- The states where the Last Standing Y Position variable will not be changed.

Response:
local States = {
	[Enum.HumanoidStateType.Running] = true;
	[Enum.HumanoidStateType.RunningNoPhysics] = true;
	[Enum.HumanoidStateType.Climbing] = true;
	[Enum.HumanoidStateType.Ragdoll] = true;
	[Enum.HumanoidStateType.FallingDown] = true;
	[Enum.HumanoidStateType.Flying] = true;
	[Enum.HumanoidStateType.GettingUp] = true;
	[Enum.HumanoidStateType.Dead] = true;
	[Enum.HumanoidStateType.None] = true;
	[Enum.HumanoidStateType.Physics] = true;
	[Enum.HumanoidStateType.Swimming] = true;
	[Enum.HumanoidStateType.Seated] = true;
	[Enum.HumanoidStateType.PlatformStanding] = true;
}

local Character

repeat wait() until script.Parent.Parent:FindFirstChild("Humanoid")

Character = script.Parent.Parent

local Humanoid = Character:WaitForChild("Humanoid")
local HRP = Character:WaitForChild("HumanoidRootPart")
local Values = require(script.Parent.Values)

while true do
	local state = getHumanoidState(Humanoid)
	--print(state)
	if States[state] and not Values.DontUpdateYet then
		Values.LastStandingPos = HRP.Position
		--print(Values.LastStandingYPos)
	end
	task.wait()
end


Prompt: -- Driver Input Loop --

Response:
while script.Parent ~= nil do
	--Update throttle, steer, handbrake
	getInputValues()

	local currentVel = Chassis.GetAverageVelocity()

	if Car:GetAttribute("Fuel") > 0 and Car:GetAttribute("Health") > 0 then
		local steer = script.Steering.Value
		Chassis.UpdateSteering(steer, currentVel)

		-- Taking care of throttling
		local throttle = script.Throttle.Value
		script.AngularMotorVelocity.Value = currentVel
		script.ForwardVelocity.Value = DriverSeat.CFrame.LookVector:Dot(DriverSeat.Velocity)
		Chassis.UpdateThrottle(currentVel, throttle)

		-- Taking care of handbrake
		if script.HandBrake.Value > 0 then
			Chassis.EnableHandbrake()
		end
	else
		script.AngularMotorVelocity.Value = 0
		script.ForwardVelocity.Value = 0
		Chassis.UpdateThrottle(0, 0)
	end

	task.wait()
end


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

Response:
local l__Value__1 = script.Parent.Car.Value;
local l__AC6_FE_Sounds__2 = l__Value__1:WaitForChild("AC6_FE_Sounds");
local v3 = require(l__Value__1["A-Chassis Tune"]);
local v4 = 0;
local v5 = 0;
local v6 = 0;
script:WaitForChild("Rev");
local u1 = 0;
local u2 = 0;
script.Parent.Values.Gear.Changed:connect(function()
	u1 = 1;
	if script.Parent.Values.RPM.Value > 5000 then
		u2 = 0.2;
	end;
end);
for v7, v8 in pairs(l__Value__1.DriveSeat:GetChildren()) do
	for v9, v10 in pairs(script:GetChildren()) do
		if v8.Name == v10.Name then
			v8:Stop();
			wait();
			v8:Destroy();
		end;
	end;
end;
l__AC6_FE_Sounds__2:FireServer("newSound", true, "Rev", l__Value__1.DriveSeat, script.Rev.SoundId, 0, script.Rev.Volume, true);
l__AC6_FE_Sounds__2:FireServer("playSound", "Rev");
l__Value__1.DriveSeat:WaitForChild("Rev");
while wait() do
	u1 = math.max(0, u1 - 0.1);
	if script.Parent.Values.Throttle.Value <= v3.IdleThrottle / 100 then
		local v11 = math.max(0.6, 0 - 0.2);
		local v12 = math.max(0, 0 - 0.05);
		local v13 = 1;
	else
		v11 = math.min(1.1, 0 + 0.1);
		v12 = 1;
		v13 = 0;
	end;
	u2 = math.min(1, u2 + 0.2);
	if v3.Redline - v3.RevBounce / 4 < script.Parent.Values.RPM.Value and v3.IdleThrottle / 100 < script.Parent.Values.Throttle.Value then
		local v14 = 1;
	else
		v14 = 1;
	end;
	if not script.Parent.IsOn.Value then
		v4 = math.max(v4 - 0.015, 0);
	else
		v4 = 1;
	end;
	l__AC6_FE_Sounds__2:FireServer("updateSound", true, "Rev", script.Rev.SoundId, math.max((script.Rev.SetPitch.Value + script.Rev.SetRev.Value * script.Parent.Values.RPM.Value / v3.Redline) * v4 ^ 2 + v5 * u1 * math.sin(80 * tick()), script.Rev.SetPitch.Value), 1 * 0 * u2 * v14 + v6 * v13 * 0 * (3 - 0) * math.sin(tick() * 50));
end;


Prompt: --Services

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


Prompt:
-------------------------------------------------------------------------------
-- Core:

Response:
local MAX_PATHS = 10

local pathfindingService = game:GetService("PathfindingService")

local function SimplifyPointsStraight(points)
	local simplified = {}
	local i = 1
	while (i < #points) do
		local pt = points[i]
		table.insert(simplified, pt)
		if (i < #points) then
			local ptNext = points[i + 1]
			local dx, dy, dz = (ptNext.x - pt.x), (ptNext.y - pt.y), (ptNext.z - pt.z)
			for j = i+1, #points do
				i = j
				local ptLast = points[i - 1]
				local pt2 = points[i]
				local dx2, dy2, dz2 = (pt2.x - ptLast.x), (pt2.y - ptLast.y), (pt2.z - ptLast.z)
				if (dx ~= dx2 or dy ~= dy2 or dz ~= dz2) then
					i = (i - 1)
					break
				end
			end
		end
	end
	table.insert(simplified, points[#points])
	return simplified
end

local function SimplifyPointsDiagonal(points)
	local simplified = {}
	local i = 3
	while (i < #points) do
		local p1 = points[i - 2]
		local p2 = points[i - 1]
		local p3 = points[i]
		local a = (p1 - p2).magnitude
		local b = (p2 - p3).magnitude
		local c = (p1 - p3).magnitude
		table.insert(simplified, p1)
		if (a == b) then
			i = (i + 2)
		else
			i = (i + 1)
		end
	end
	table.insert(simplified, points[#points])
	return simplified
end

function CreatePathObject(paths, points, finalStatus)
	local path = {}
	local api = {}
	api.Status = finalStatus
	function api:GetPointCoordinates()
		return points
	end
	function api:CheckOcclusionAsync(start)
		local n = 0
		local startIndex = 1
		for i,p in pairs(paths) do
			local numPoints = #p:GetPointCoordinates()
			n = (n + numPoints)
			if (n >= start) then
				startIndex = i + 1
				local test = p:CheckOcclusionAsync(n - numPoints + start)
				if (test ~= -1) then
					return (n - numPoints + test)
				end
				break
			end
		end
		for i = startIndex, #paths do
			local p = paths[i]
			local numPoints = #p:GetPointCoordinates()
			n = (n + numPoints)
			if (numPoints > 0) then
				local test = p:CheckOcclusionAsync(1)
				if (test ~= -1) then
					return (n - numPoints + test)
				end
			end
		end
		return -1
	end
	return setmetatable(path, {
		__metatable = true;
		__index = api;
		__newindex = function()
			error("Cannot edit Path")
		end;
	})
end


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

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

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


Prompt: --// This script should be placed as a decendant to StarterGui for it to properly work.

Response:
local GENERAL_DAMPING = 2.5 -- Higher number equals less bob
local TILT_DAMPING = 1 -- Higher number equals less tilt
local OFFSET_DAMPING = 0.1 -- Higher number equals less camera offset bobbing


Prompt: --l__LocalPlayer__1.Character.RightFoot.Touched:connect(function(p1) --r15

Response:
l__LocalPlayer__1.Character["Right Leg"].Touched:connect(function(p1) --r6
	if p1.Name == "floor" and l__Running__2.SoundId ~= "rbxassetid://1977094302" then
		l__Running__2.Pitch = 2.8;
		l__Running__2.Volume = 0.2;
		l__Running__2.SoundId = "rbxassetid://1977094302";
		l__Running__2:Play();
	end;
	if p1.Name == "grass" and l__Running__2.SoundId ~= "rbxassetid://252965149" then
		l__Running__2.Pitch = 2.3;
		l__Running__2.Volume = 2;
		l__Running__2.SoundId = "rbxassetid://252965149";
		l__Running__2:Play();
	end;
	if p1.Name == "wood" and l__Running__2.SoundId ~= "rbxassetid://1244506786" then
		l__Running__2.Pitch = 2.3;
		l__Running__2.Volume = 0.1;
		l__Running__2.SoundId = "rbxassetid://1244506786";
		l__Running__2:Play();
	end;
	if p1.Name == "metal" and l__Running__2.SoundId ~= "rbxassetid://3477114901" then
		l__Running__2.Pitch = 2.6;
		l__Running__2.Volume = 1;
		l__Running__2.SoundId = "rbxassetid://3477114901";
		l__Running__2:Play();
	end;
	if p1.Name == "nasty" and l__Running__2.SoundId ~= "rbxassetid://3477114901" then
		l__Running__2.Pitch = 3.1;
		l__Running__2.Volume = 0.4;
		l__Running__2.SoundId = "rbxassetid://344167846";
		l__Running__2:Play();
	end;
end);


Prompt:
-- скрипт ПРИМЕР по созданию ландшафта из блоков и переделке в воду
-- game.Workspace.Terrain:FillBlock(game.Workspace.Baseplate.CFrame, game.Workspace.Baseplate.Size, Enum.Material.Grass)

Response: local mod=game.Workspace.Base


Prompt:
--[[spawn(function()
	while wait(5) do
		for i = 1,5 do
			module:Notice(main.hdAdminCoreName, "Your rank is 'Owner'! Click to view the commands.", {"ShowSpecificPage", "Commands", "Commands"})
			wait(1)
			--module:Notice(main.hdAdminCoreName, "You're a Donor! Click to view Donor commands." )
			--wait(1)
		end
	end
end)--]]

Response: return module


Prompt: -- Main script execution

Response:
game.Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"

	local points = Instance.new("IntValue")
	points.Name = "Points"
	points.Parent = leaderstats

	local survival = Instance.new("IntValue")
	survival.Name = "Survival"
	survival.Parent = leaderstats

	leaderstats.Parent = player
end)

dayNightCycle()


Prompt: --  Fixed By DT4E  --

Response:
while true do
script.Parent.BrickColor = BrickColor.new("Lime green")
wait(0.15)
script.Parent.BrickColor = BrickColor.new("Bright Blue")
wait(0.15)
end


Prompt: --[[Drivetrain Initialize]]

Response:
	local Drive={}

	--Power Front Wheels
		if _Tune.Config == "FWD" or _Tune.Config == "AWD" then for i,v in pairs(car.Wheels:GetChildren()) do if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then table.insert(Drive,v) end end end

	--Power Rear Wheels
		if _Tune.Config == "RWD" or _Tune.Config == "AWD" then for i,v in pairs(car.Wheels:GetChildren()) do if v.Name=="RL" or v.Name=="RR" or v.Name=="R" then table.insert(Drive,v) end end end

	--Determine Wheel Size
	local wDia = 0 for i,v in pairs(Drive) do if v.Size.x>wDia then wDia = v.Size.x end end

	--Pre-Toggled PBrake
	for i,v in pairs(car.Wheels:GetChildren()) do if math.abs(v["#AV"].maxTorque.Magnitude-PBrakeForce)<1 then _PBrake=true end end


Prompt:
--[[**
	Gets the player's primary group if it exists.
	@param [Instance<Player>] Player The player you are checking for. Can also be their UserID.
	@returns [DictionaryOrNil] The player's primary group if it exists, otherwise nil.
**--]]

Response:
function GroupService:GetPrimaryGroupAsync(Player)
	for _, Group in ipairs(GroupService:GetGroupsAsync(Player)) do
		if Group.IsPrimary then
			return Group
		end
	end

	return nil
end


Prompt: --create tables:

Response:
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "e" then
		table.insert(e, 1, part)
	end
end
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "f" then
		table.insert(f, 1, part)
	end
end

function lightOn(T)
	for i, part in pairs (T) do
		if part:FindFirstChild("On") then
			part.On.Value  = true
		end
	end
end

function lightOff(T)
	for i, part in pairs (T) do
		if part:FindFirstChild("On") then
			part.On.Value = false
		end
	end
end

while true do

	lightOn(e)
	lightOn(f)
	wait(0.15)

	lightOff(e)
	lightOff(f)
	wait(0.15)

end


Prompt:
--[=[
	Transforms the observable with the following transformers

	```lua
	Rx.of(1, 2, 3):Pipe({
		Rx.map(function(result)
			return result + 1
		end);
		Rx.map(function(value)
			return ("%0.2f"):format(value)
		end);
	}):Subscribe(print)

	--> 2.00
	--> 3.00
	--> 4.00
	```
	@param transformers { (observable: Observable<T>) -> Observable<T> }
	@return Observable<T>
]=]

Response:
function Observable:Pipe(transformers)
	assert(type(transformers) == "table", "Bad transformers")

	local current = self
	for _, transformer in pairs(transformers) do
		assert(type(transformer) == "function", "Bad transformer")
		current = transformer(current)
		assert(Observable.isObservable(current), "Transformer must return an observable")
	end

	return current
end


Prompt:
----------------------------------
-----------CONNECTIONS------------
----------------------------------

Response:
PianoKeysConnections = {}
ExitButtonConnection = nil
SheetsButtonConnection = nil
SheetsEditedConnection = nil
CapsButtonConnection = nil

function MakeGuiConnections()
	for i, v in pairs(PianoGui.Keys:GetChildren()) do
		PianoKeysConnections[i] = v.InputBegan:connect(function(Object) PianoKeyPressed(Object, tonumber(v.Name)) end)
	end

	ExitButtonConnection = PianoGui.ExitButton.InputBegan:connect(ExitButtonPressed)
	SheetsButtonConnection = PianoGui.SheetsButton.InputBegan:connect(SheetsButtonPressed)
	SheetsEditedConnection = SheetsGui.Sheet.ScrollingFrame.TextBox.Changed:connect(SheetsEdited)
	CapsButtonConnection = PianoGui.CapsButton.InputBegan:connect(CapsButtonPressed)
end
function BreakGuiConnections()
	for i, v in pairs(PianoKeysConnections) do
		v:disconnect()
	end

	ExitButtonConnection:disconnect()
	SheetsButtonConnection:disconnect()
	SheetsEditedConnection:disconnect()
	CapsButtonConnection:disconnect()
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: -- Customization

Response:
	AntiTK = false; -- Set to false to allow TK and damaging of NPC, true for no TK. (To damage NPC, this needs to be false)

	MouseSense = 0.5;

	CanAim = false; -- Allows player to aim
	CanBolt = false; -- When shooting, if this is enabled, the bolt will move (SCAR-L, ACR, AK Series)

	LaserAttached = true;
	LightAttached = true;
	TracerEnabled = true;

	SprintSpeed = 22;


Prompt: -- Get the correct sound from our sound list.

Response:
local function getSoundProperties()
	for name, data in pairs(IDList) do
		if name == material then
			id = data.id
			volume = data.volume

			playbackSpeed = (humanoid.WalkSpeed / 16) * data.speed
			break
		end
	end
end


Prompt: --used by checkTeams

Response:
function tagHuman(human)
	local tag = Tag:Clone()
	tag.Parent = human
	game:GetService("Debris"):AddItem(tag)
end


Prompt:
--// This section of code waits until all of the necessary RemoteEvents are found in EventFolder.
--// I have to do some weird stuff since people could potentially already have pre-existing
--// things in a folder with the same name, and they may have different class types.
--// I do the useEvents thing and set EventFolder to useEvents so I can have a pseudo folder that
--// the rest of the code can interface with and have the guarantee that the RemoteEvents they want
--// exist with their desired names.

Response:
local FFlagFixChatWindowHoverOver = false do
	local ok, value = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserFixChatWindowHoverOver")
	end)
	if ok then
		FFlagFixChatWindowHoverOver = value
	end
end

local FFlagFixMouseCapture = false do
	local ok, value = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserFixMouseCapture")
	end)
	if ok then
		FFlagFixMouseCapture = value
	end
end

local FILTER_MESSAGE_TIMEOUT = 60

local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Chat = game:GetService("Chat")
local StarterGui = game:GetService("StarterGui")

local DefaultChatSystemChatEvents = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents")
local EventFolder = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents")
local clientChatModules = Chat:WaitForChild("ClientChatModules")
local ChatConstants = require(clientChatModules:WaitForChild("ChatConstants"))
local ChatSettings = require(clientChatModules:WaitForChild("ChatSettings"))
local messageCreatorModules = clientChatModules:WaitForChild("MessageCreatorModules")
local MessageCreatorUtil = require(messageCreatorModules:WaitForChild("Util"))

local ChatLocalization = nil
pcall(function() ChatLocalization = require(game:GetService("Chat").ClientChatModules.ChatLocalization) end)
if ChatLocalization == nil then ChatLocalization = {} function ChatLocalization:Get(key,default) return default end end

local numChildrenRemaining = 10 -- #waitChildren returns 0 because it's a dictionary
local waitChildren =
{
	OnNewMessage = "RemoteEvent",
	OnMessageDoneFiltering = "RemoteEvent",
	OnNewSystemMessage = "RemoteEvent",
	OnChannelJoined = "RemoteEvent",
	OnChannelLeft = "RemoteEvent",
	OnMuted = "RemoteEvent",
	OnUnmuted = "RemoteEvent",
	OnMainChannelSet = "RemoteEvent",

	SayMessageRequest = "RemoteEvent",
	GetInitDataRequest = "RemoteFunction",
}


Response:
local HitboxObject = {}
local Hitbox = {}
Hitbox.__index = Hitbox

function Hitbox:__tostring()
	return string.format("Hitbox for instance %s [%s]", self.object.Name, self.object.ClassName)
end

function HitboxObject:new()
    return setmetatable({}, Hitbox)
end

function Hitbox:config(object, ignoreList)
	self.active = false
	self.deleted = false
	self.partMode = false
	self.debugMode = false
	self.points = {}
	self.targetsHit = {}
	self.OnHit = Signal:Create()
	self.OnUpdate = Signal:Create()
	self.raycastParams = RaycastParams.new()
	self.raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
	self.raycastParams.FilterDescendantsInstances = ignoreList or {}

	self.object = object
	CollectionService:AddTag(self.object, "RaycastModuleManaged")
end

function Hitbox:SetPoints(object, vectorPoints, groupName)
	if object and (object:IsA("BasePart") or object:IsA("MeshPart")) then
		for _, vectors in ipairs(vectorPoints) do
			if typeof(vectors) == "Vector3" then
				local Point = {
					RelativePart = object,
					Attachment = vectors,
					LastPosition = nil,
					group = groupName,
					solver = CastVectorPoint
				}
				table.insert(self.points, Point)
			end
		end
	end
end

function Hitbox:RemovePoints(object, vectorPoints)
	if object then
		if object:IsA("BasePart") or object:IsA("MeshPart") then --- for some reason it doesn't recognize meshparts unless I add it in
			for i = 1, #self.points do
				local Point = self.points[i]
				for _, vectors in ipairs(vectorPoints) do
					if typeof(Point.Attachment) == "Vector3" and Point.Attachment == vectors and Point.RelativePart == object then
						self.points[i] = nil
					end
				end
			end
		end
	end
end

function Hitbox:LinkAttachments(primaryAttachment, secondaryAttachment)
	if primaryAttachment:IsA("Attachment") and secondaryAttachment:IsA("Attachment") then
		local group = primaryAttachment:FindFirstChild("Group")
		local Point = {
			RelativePart = nil,
			Attachment = primaryAttachment,
			Attachment0 = secondaryAttachment,
			LastPosition = nil,
			group = group and group.Value,
			solver = CastLinkAttach
		}
		table.insert(self.points, Point)
	end
end

function Hitbox:UnlinkAttachments(primaryAttachment)
	for i, Point in ipairs(self.points) do
		if Point.Attachment and Point.Attachment == primaryAttachment then
			table.remove(self.points, i)
			break
		end
	end
end

function Hitbox:seekAttachments(attachmentName, canWarn)
	if #self.points <= 0 then
		table.insert(self.raycastParams.FilterDescendantsInstances, workspace.Terrain)
	end
	for _, attachment in ipairs(self.object:GetDescendants()) do
		if attachment:IsA("Attachment") and attachment.Name == attachmentName then
			local group = attachment:FindFirstChild("Group")
			local Point = {
				Attachment = attachment,
				RelativePart = nil,
				LastPosition = nil,
				group = group and group.Value,
				solver = CastAttachment
			}
			table.insert(self.points, Point)
		end
	end

	if canWarn then
		if #self.points <= 0 then
			warn(string.format("\n[[RAYCAST WARNING]]\nNo attachments with the name '%s' were found in %s. No raycasts will be drawn. Can be ignored if you are using SetPoints.",
				attachmentName, self.object.Name)
			)
		else
			print(string.format("\n[[RAYCAST MESSAGE]]\n\nCreated Hitbox for %s - Attachments found: %s",
				self.object.Name, #self.points)
			)
		end
	end
end

function Hitbox:Destroy()
	if self.deleted then return end
	if self.OnHit then self.OnHit:Delete() end
	if self.OnUpdate then self.OnUpdate:Delete() end

	self.points = nil
	self.active = false
	self.deleted = true
end

function Hitbox:HitStart()
	self.active = true
end

function Hitbox:HitStop()
	if self.deleted then return end

	self.active = false
	table.clear(self.targetsHit)
end

function Hitbox:PartMode(bool)
	self.partMode = bool
end

function Hitbox:DebugMode(bool)
	self.debugMode = bool
end

return HitboxObject


Prompt: -- Requires

Response: local APIEquipment = require(ReplicatedStorage.Common.APIEquipment)


Prompt: --// F key, Horn

Response:
mouse.KeyUp:connect(function(key)
	if key=="f" then
		veh.Lightbar.middle.Airhorn:Stop()
	end
end)

mouse.KeyDown:connect(function(key)
	if key=="j" then
		veh.Lightbar.middle.Beep:Play()
veh.Lightbar.RemoteEvent:FireServer(true)
	end
	end)

mouse.KeyDown:connect(function(key)
	if key=="k" then
		veh.Lightbar.middle.Beep:Play()
		veh.Lightbar.TA.RemoteEvent:FireServer(true)
	end
end)


Prompt: -- Ring1 ascending

Response:
for l = 1,#lifts1 do
	if (lifts1[l].className == "Part") then
	lifts1[l].BodyPosition.position = Vector3.new((lifts1[l].BodyPosition.position.x),(lifts1[l].BodyPosition.position.y+0),(lifts1[l].BodyPosition.position.z))
	end
end
wait(0.1)
for p = 1,#parts1 do
	parts1[p].CanCollide = true
end

wait(1)


Prompt: --Supercharger

Response:
local Whine_Pitch = 1.3		--max pitch of the whine (not exact so might have to mess with it)
local S_Loudness = 6.2 --volume of the supercharger(s) (not exact volume so you kinda have to experiment with it also)

script:WaitForChild("Whistle")
script:WaitForChild("Whine")
script:WaitForChild("BOV")

for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" then
		for i,v in pairs(car.DriveSeat:GetChildren()) do
			for _,a in pairs(script:GetChildren()) do
				if v.Name==a.Name then v:Stop() wait() v:Destroy() end
			end
		end
	end
end)

if not _Tune.Engine then return end
handler:FireServer("newSound","Whistle",car.DriveSeat,script.Whistle.SoundId,0,script.Whistle.Volume,true)
handler:FireServer("newSound","Whine",car.DriveSeat,script.Whine.SoundId,0,script.Whine.Volume,true)
handler:FireServer("newSound","BOV",car.DriveSeat,script.BOV.SoundId,0,script.BOV.Volume,true)
handler:FireServer("playSound","Whistle")
handler:FireServer("playSound","Whine")
car.DriveSeat:WaitForChild("Whistle")
car.DriveSeat:WaitForChild("Whine")
car.DriveSeat:WaitForChild("BOV")
local ticc = tick()
local _TCount = _Tune.Turbochargers
local _SCount = _Tune.Superchargers

while wait() do
	local psi = (((script.Parent.Values.Boost.Value)/((_Tune.T_Boost*_TCount)+(_Tune.S_Boost*_SCount)))*2)
	local tpsi = (((script.Parent.Values.BoostTurbo.Value)/(_Tune.T_Boost*_TCount))*2)
	local spsi = ((script.Parent.Values.BoostSuper.Value)/(_Tune.S_Boost*_SCount))
	--(script.Parent.Values.RPM.Value/_Tune.Redline)
	local WP,WV,BP,BV,HP,HV = 0,0,0,0,0,0

	BOVact = math.floor(tpsi*20)
	if _TCount~=0 then
		WP = (tpsi)
		WV = (tpsi/4)*T_Loudness

		BP = (1-(-tpsi/20))*BOV_Pitch
		BV = (((-0.5+((tpsi/2)*BOV_Loudness)))*(1 - script.Parent.Values.Throttle.Value))

		if BOVact < BOVact2 then if car.DriveSeat.BOV.IsPaused then if FE then handler:FireServer("playSound","BOV") else car.DriveSeat.BOV:Play() end end end
		if BOVact >= BOVact2 then if FE then handler:FireServer("stopSound","BOV") else car.DriveSeat.BOV:Stop() end end
	else
		WP,WV,BP,BV=0,0,0,0
	end
	if _SCount~=0 then
		HP = (script.Parent.Values.RPM.Value/_Tune.Redline)*Whine_Pitch
		HV = (spsi/4)*S_Loudness
	else
		HP,HV = 0,0
	end

	handler:FireServer("updateSound","Whistle",script.Whistle.SoundId,WP,WV)
	handler:FireServer("updateSound","Whine",script.Whine.SoundId,HP,HV)
	handler:FireServer("updateSound","BOV",script.BOV.SoundId,BP,BV)

	if (tick()-ticc) >= 0.1 then
		BOVact2 = math.floor(tpsi*20)
		ticc = tick()
	end
end


Prompt: ---- GETTERS AND SETTERS ----

Response:
local function ModifyTransformation(cast: ActiveCast, velocity: Vector3?, acceleration: Vector3?, position: Vector3?)
	local trajectories = cast.StateInfo.Trajectories
	local lastTrajectory = trajectories[#trajectories]

	-- NEW BEHAVIOR: Don't create a new trajectory if we haven't even used the current one.
	if lastTrajectory.StartTime == cast.StateInfo.TotalRuntime then
		-- This trajectory is fresh out of the box. Let's just change it since it hasn't actually affected the cast yet, so changes won't have adverse effects.
		if (velocity == nil) then
			velocity = lastTrajectory.InitialVelocity
		end
		if (acceleration == nil) then
			acceleration = lastTrajectory.Acceleration
		end
		if (position == nil) then
			position = lastTrajectory.Origin
		end

		lastTrajectory.Origin = position
		lastTrajectory.InitialVelocity = velocity
		lastTrajectory.Acceleration = acceleration
	else
		-- The latest trajectory is done. Set its end time and get its location.
		lastTrajectory.EndTime = cast.StateInfo.TotalRuntime

		local point, velAtPoint = unpack(GetLatestTrajectoryEndInfo(cast))

		if (velocity == nil) then
			velocity = velAtPoint
		end
		if (acceleration == nil) then
			acceleration = lastTrajectory.Acceleration
		end
		if (position == nil) then
			position = point
		end
		table.insert(cast.StateInfo.Trajectories, {
			StartTime = cast.StateInfo.TotalRuntime,
			EndTime = -1,
			Origin = position,
			InitialVelocity = velocity,
			Acceleration = acceleration
		})
		cast.StateInfo.CancelHighResCast = true
	end
end

function ActiveCastStatic:SetVelocity(velocity: Vector3)
	assert(getmetatable(self) == ActiveCastStatic, ERR_NOT_INSTANCE:format("SetVelocity", "ActiveCast.new(...)"))
	assert(self.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED)
	ModifyTransformation(self, velocity, nil, nil)
end

function ActiveCastStatic:SetAcceleration(acceleration: Vector3)
	assert(getmetatable(self) == ActiveCastStatic, ERR_NOT_INSTANCE:format("SetAcceleration", "ActiveCast.new(...)"))
	assert(self.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED)
	ModifyTransformation(self, nil, acceleration, nil)
end

function ActiveCastStatic:SetPosition(position: Vector3)
	assert(getmetatable(self) == ActiveCastStatic, ERR_NOT_INSTANCE:format("SetPosition", "ActiveCast.new(...)"))
	assert(self.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED)
	ModifyTransformation(self, nil, nil, position)
end

function ActiveCastStatic:GetVelocity(): Vector3
	assert(getmetatable(self) == ActiveCastStatic, ERR_NOT_INSTANCE:format("GetVelocity", "ActiveCast.new(...)"))
	assert(self.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED)
	local currentTrajectory = self.StateInfo.Trajectories[#self.StateInfo.Trajectories]
	return GetVelocityAtTime(self.StateInfo.TotalRuntime - currentTrajectory.StartTime, currentTrajectory.InitialVelocity, currentTrajectory.Acceleration)
end

function ActiveCastStatic:GetAcceleration(): Vector3
	assert(getmetatable(self) == ActiveCastStatic, ERR_NOT_INSTANCE:format("GetAcceleration", "ActiveCast.new(...)"))
	assert(self.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED)
	local currentTrajectory = self.StateInfo.Trajectories[#self.StateInfo.Trajectories]
	return currentTrajectory.Acceleration
end

function ActiveCastStatic:GetPosition(): Vector3
	assert(getmetatable(self) == ActiveCastStatic, ERR_NOT_INSTANCE:format("GetPosition", "ActiveCast.new(...)"))
	assert(self.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED)
	local currentTrajectory = self.StateInfo.Trajectories[#self.StateInfo.Trajectories]
	return GetPositionAtTime(self.StateInfo.TotalRuntime - currentTrajectory.StartTime, currentTrajectory.Origin, currentTrajectory.InitialVelocity, currentTrajectory.Acceleration)
end