Prompt: --[[Engine]]

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

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

	--Horsepower Curve

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

	--Horsepower Curve

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

	local PeakCurveHP = curveHP(_Tune.PeakRPM)

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

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

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

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

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

	--Powertrain
	wait()

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

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

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

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

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

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

		local TPsi = _TPsi/_TCount

		if _Tune.Aspiration ~= "Super" then
			_Boost = _Boost + ((((((_HP*(_GThrot*1.2)/_Tune.Horsepower)/8)-(((_Boost/TPsi*(TPsi/15)))))*((8/_Tune.TurboSize)*2))/TPsi)*15)
			if _Boost < 0.05 then _Boost = 0.05 elseif _Boost > 2 then _Boost = 2 end
		else
			if _GThrot>sthrot then
				sthrot=math.min(_GThrot,sthrot+_Tune.Sensitivity)
			elseif _GThrot<sthrot then
				sthrot=math.max(_GThrot,sthrot-_Tune.Sensitivity)
			end
			_Boost = (_RPM/_Tune.Redline)*(.5+(1.5*sthrot))
		end

		local cTq = HPCache[_CGear+2][math.floor(math.min(_Tune.Redline,math.max(_Tune.IdleRPM,_RPM))/100)]
		_NH = cTq.Horsepower+(cTq.HpSlope*((_RPM-math.floor(_RPM/100))/1000)%1)
		_NT = cTq.Torque+(cTq.TqSlope*((_RPM-math.floor(_RPM/100))/1000)%1)
		if _Tune.Aspiration ~= "Natural" then
			local bTq = PSICache[_CGear+2][math.floor(math.min(_Tune.Redline,math.max(_Tune.IdleRPM,_RPM))/100)]
			_BH = bTq.Horsepower+(bTq.HpSlope*((_RPM-math.floor(_RPM/100))/1000)%1)
			_BT = bTq.Torque+(bTq.TqSlope*((_RPM-math.floor(_RPM/100))/1000)%1)
			_HP = _NH + (_BH*(_Boost/2))
			_OutTorque = _NT + (_BT*(_Boost/2))
		else
			_HP = _NH
			_OutTorque = _NT
		end

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

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

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

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

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

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

						--Apply AWD Vectoring
						if _Tune.Config == "AWD" then
							local bias = (_Tune.TorqueVector+1)/2
							if v.Name=="FL" or v.Name=="FR" then
								tq = tq*(1-bias)
							elseif v.Name=="RL" or v.Name=="RR" then
								tq = tq*bias
							end
						end

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

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

				--Brakes
				else
					local brake = _GBrake

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

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


Prompt:
--[[ eslint import/export: 0]]
--[[ ROBLOX deviation: function overloads not handled
export function getPath<
  Obj extends Template,
  A extends keyof Obj,
  B extends keyof Obj[A],
  C extends keyof Obj[A][B],
  D extends keyof Obj[A][B][C],
  E extends keyof Obj[A][B][C][D],
>(obj: Obj, path: [A, B, C, D, E]): Obj[A][B][C][D][E];
export function getPath<
  Obj extends Template,
  A extends keyof Obj,
  B extends keyof Obj[A],
  C extends keyof Obj[A][B],
  D extends keyof Obj[A][B][C],
>(obj: Obj, path: [A, B, C, D]): Obj[A][B][C][D];
export function getPath<
  Obj extends Template,
  A extends keyof Obj,
  B extends keyof Obj[A],
  C extends keyof Obj[A][B],
>(obj: Obj, path: [A, B, C]): Obj[A][B][C];
export function getPath<
  Obj extends Template,
  A extends keyof Obj,
  B extends keyof Obj[A],
>(obj: Obj, path: [A, B]): Obj[A][B];
export function getPath<Obj extends Template, A extends keyof Obj>(
  obj: Obj,
  path: [A],
): Obj[A];
export function getPath<Obj extends Template>(
  obj: Obj,
  path: Array<string>,
): unknown;
]]

Response:
function getPath(template: Template, ref: Array<string>): any
	local head = table.unpack(ref, 1, 1)
	local tail = if #ref > 1 then { table.unpack(ref, 2) } else {}
	if not Boolean.toJSBoolean(head) or template[head] == nil then
		return template
	end
	return getPath(template[head] :: Template, tail)
end
exports.getPath = getPath

return exports


Prompt:
--for i,v in pairs(script.Parent.Plates:GetChildren()) do
--	v.SGUI.Sidepiece.Text = country
--end
--for i,v in pairs(script.Parent.Plates:GetChildren()) do
--	v.SGUI.Sidepiece.Emblem.Image = image
--end
--for i,v in pairs(script.Parent.Plates:GetChildren()) do
--	v.SGUI.Sidepiece.Emblem.Size = size
--end
--for i,v in pairs(script.Parent.Plates:GetChildren()) do
--	v.SGUI.Sidepiece.Emblem.Position = position
--end


Prompt:
--[[
	Creates a new spring.
]]

Response:
function Spring.new(initial, td, ts)
	local d=td or 1
	local s=ts or 1
	local p0=initial or 0
	local v0=0*p0
	local p1=p0
	local v1=v0
	local t0=tick()

	local selfmeta={}
	local meta={}

	function selfmeta.getpv()
		return posvel(d,s,p0,v0,p1,v1,tick()-t0)
	end

	function selfmeta.setpv(p,v)
		local time=tick()
		local tp,tv=targposvel(p1,v1,time-t0)
		p0,v0=p,v
		p1,v1=tp,tv
		t0=time
	end

	function selfmeta.settargetpv(tp,tv)
		local time=tick()
		local p,v=posvel(d,s,p0,v0,p1,v1,time-t0)
		p0,v0=p,v
		p1,v1=tp,tv
		t0=time
	end

	function selfmeta:accelerate(a)
		local time=tick()
		local p,v=posvel(d,s,p0,v0,p1,v1,time-t0)
		local tp,tv=targposvel(p1,v1,time-t0)
		p0,v0=p,v+a
		p1,v1=tp,tv
		t0=time
	end

	function meta.__index(_self,index)
		local time=tick()
		if index=="p" or index=="position" then
			local p,_v=posvel(d,s,p0,v0,p1,v1,time-t0)
			return p
		elseif index=="v" or index=="velocity" then
			local _p,v=posvel(d,s,p0,v0,p1,v1,time-t0)
			return v
		elseif index=="tp" or index=="t" or index=="targetposition" then
			local tp,_tv=targposvel(p1,v1,time-t0)
			return tp
		elseif index=="tv" or index=="targetvelocity" then
			local _tp,tv=targposvel(p1,v1,time-t0)
			return tv
		elseif index=="d" or index=="damper" then
			return d
		elseif index=="s" or index=="speed" then
			return s
		else
			error("no value "..tostring(index).." exists")
		end
	end

	function meta.__newindex(_self,index,value)
		local time=tick()
		if index=="p" or index=="position" then
			local _p,v=posvel(d,s,p0,v0,p1,v1,time-t0)
			local tp,tv=targposvel(p1,v1,time-t0)
			p0,v0=value,v
			p1,v1=tp,tv
		elseif index=="v" or index=="velocity" then
			local p,_v=posvel(d,s,p0,v0,p1,v1,time-t0)
			local tp,tv=targposvel(p1,v1,time-t0)
			p0,v0=p,value
			p1,v1=tp,tv
		elseif index=="tp" or index=="t" or index=="targetposition" then
			local p,v=posvel(d,s,p0,v0,p1,v1,time-t0)
			local _tp,tv=targposvel(p1,v1,time-t0)
			p0,v0=p,v
			p1,v1=value,tv
		elseif index=="tv" or index=="targetvelocity" then
			local p,v=posvel(d,s,p0,v0,p1,v1,time-t0)
			local tp,_tv=targposvel(p1,v1,time-t0)
			p0,v0=p,v
			p1,v1=tp,value
		elseif index=="d" or index=="damper" then
			local p,v=posvel(d,s,p0,v0,p1,v1,time-t0)
			local tp,tv=targposvel(p1,v1,time-t0)
			p0,v0=p,v
			p1,v1=tp,tv
			d=value
		elseif index=="s" or index=="speed" then
			local p,v=posvel(d,s,p0,v0,p1,v1,time-t0)
			local tp,tv=targposvel(p1,v1,time-t0)
			p0,v0=p,v
			p1,v1=tp,tv
			s=value
		elseif index=="a" or index=="acceleration" then
			t0=tick()
			local p,v=posvel(d,s,p0,v0,p1,v1,time-t0)
			local tp,tv=targposvel(p1,v1,time-t0)
			p0,v0=p,v+value
			p1,v1=tp,tv
		else
			error("no value "..tostring(index).." exists")
		end
		t0=time
	end

	return setmetatable(selfmeta,meta)
end

return Spring


Prompt:
--- Concats `target` with `source`
-- @tparam table target Table to append to
-- @tparam table source Table read from
-- @treturn table parameter table

Response:
function Table.append(target, source)
	for _, value in pairs(source) do
		target[#target+1] = value
	end

	return target
end


Prompt:
-- Hello Controller
-- Username
-- August 29, 2020

Response:
local HelloController = {}

function HelloController:SayHello()
	--print("Hello!")
end

function HelloController:Start()
	self.Controllers.TestController:ConnectEvent("Test", function(msg)
		--print(msg)
	end)
	self.Services.MyService:SendMsg("Hello sent at: " ..tick())

	self.Services.MyService.Fade:Connect(function(InOut)
		if (InOut == "out") then
			--Fades outend)
			self.Services.MyService.AnotherMessage:Fire("lol")
			print("out")
			self.Controllers.Fade:Out()
		else
			print("in")
			self.Controllers.Fade:In()
		end
	end)
	self.Services.MyService.AnotherMessage:Fire("lol")
	local test = self.Modules.TestModule
	test.ABC = 64
end

function HelloController:Init()

end

return HelloController


Prompt: --// Player Events

Response:
game:GetService("RunService").Heartbeat:Connect(function()
	for _,v in pairs(game.Players:GetPlayers()) do
		UpdateTag(v);
	end;
end)


Prompt: --[[Finalize Chassis]]

Response:
	--Misc Weld
	wait()
	for i,v in pairs(script:GetChildren()) do
		if v:IsA("ModuleScript") then
			require(v)
		end
	end

	--Weld Body
	wait()
	ModelWeld(car.Body,car.DriveSeat)

	--Unanchor
	wait()
	UnAnchor(car.Body)
	UnAnchor(car.Wheels)
	UnAnchor(car.DriveSeat)


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

	@param value The value to check against

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

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


Prompt: -- ~15 c/s

Response:
while wait(.0667) do
	--Power
	Engine()

	--Flip
	if _Tune.AutoFlip then Flip() end
end


Prompt: --[[Susupension]]

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

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

	Tune.FSusLength		= 2.2			-- Suspension length (in studs)
	Tune.FPreCompress	= .95		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= 1.1		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 90		-- Suspension Angle (degrees from horizontal)

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

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

	Tune.RSusLength		= 2.2		-- Suspension length (in studs)
	Tune.RPreCompress	= .7		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= 1.1		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 90		-- Suspension Angle (degrees from horizontal)

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

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


Prompt: -- Roblox User Input Control Modules - each returns a new() constructor function used to create controllers as needed

Response:
local Keyboard = require(script:WaitForChild("Keyboard"))
local Gamepad = require(script:WaitForChild("Gamepad"))
local DynamicThumbstick = require(script:WaitForChild("DynamicThumbstick"))

local FFlagUserHideControlsWhenMenuOpen do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserHideControlsWhenMenuOpen")
	end)
	FFlagUserHideControlsWhenMenuOpen = success and result
end

local TouchThumbstick = require(script:WaitForChild("TouchThumbstick"))


Response:
gui.Track.Text = radio.TName.Value
radio.TName.Changed:connect(function()
	gui.Track.Text = radio.TName.Value
	seat.Parent.Body.Dash.Scr.G.Song.Text = radio.TName.Value
end)
gui.Stop.MouseButton1Click:connect(function()
	if radio.Stopped.Value == false then
		radio.Stopped.Value = true
	end
end)
gui.Pause.MouseButton1Click:connect(function()
	if radio.Paused.Value == false and radio.Stopped.Value == false then
		radio.Paused.Value = true
	end
end)
gui.Play.MouseButton1Click:connect(function()
	if radio.Stopped.Value == true then
		radio.Play.Value = not radio.Play.Value
	else
		if radio.Paused.Value == true then
			radio.Paused.Value = false
		end
	end
end)
gui.Forward.MouseButton1Click:connect(function()
	local n = radio.Track.Value+1
	if n>#radio.Songs:GetChildren() then
		n = 1
	end
	radio.Track.Value = n
end)
gui.Back.MouseButton1Click:connect(function()
	local n = radio.Track.Value-1
	if n<=0 then
		n = #radio.Songs:GetChildren()
	end
	radio.Track.Value = n
end)
gui.AutoplayOn.MouseButton1Click:connect(function()
	if radio.Autoplay.Value == true then
		radio.Autoplay.Value = false
	end
end)
gui.AutoplayOff.MouseButton1Click:connect(function()
	if radio.Autoplay.Value == false then
		radio.Autoplay.Value = true
	end
end)
gui.List.MouseButton1Click:connect(function()
	gui.Menu.Visible=not gui.Menu.Visible
end)
gui.Id.MouseButton1Click:connect(function()
	gui.IdPlayer.Visible=not gui.IdPlayer.Visible
	if gui.IdPlayer.Visible then gui.Id.Rotation=180 else gui.Id.Rotation=0 end
end)
gui.IdPlayer.Play.MouseButton1Click:connect(function()
	if radio.IdPlay.Value==gui.IdPlayer.TextBox.Text then
		radio.IdPlay.Value=""
	wait()
	end
	radio.IdPlay.Value=gui.IdPlayer.TextBox.Text
end)
for i,v in pairs(gui.Menu:GetChildren()) do
	v.MouseButton1Click:connect(function()
		radio.Track.Value = i
	end)
end
function Stopped()
	if radio.Stopped.Value == true then
		gui.Pause.Visible = false
		gui.Play.Visible = true
	else
		gui.Play.Visible = false
		gui.Pause.Visible = true
	end
end
function Paused()
	if radio.Paused.Value == true then
		gui.Pause.Visible = false
		gui.Play.Visible = true
	else
		if radio.Stopped.Value == false then
			gui.Play.Visible = false
			gui.Pause.Visible = true
		end
	end
end
function Autoplay()
	if radio.Autoplay.Value == true then
		gui.AutoplayOff.Visible = false
		gui.AutoplayOn.Visible = true
	else
		gui.AutoplayOn.Visible = false
		gui.AutoplayOff.Visible = true
	end
end
radio.Stopped.Changed:connect(Stopped)
radio.Paused.Changed:connect(Paused)
radio.Autoplay.Changed:connect(Autoplay)
Stopped()
Paused()
Autoplay()
while wait(.5) do
	if seat:FindFirstChild("SeatWeld") == nil then
		script.Parent:Destroy()
	end
end


Prompt:
--[[
	Novena Constraint Type: Motorcycle
			The Bike Chassis

					RikOne2 | Enjin
--]]

Response:
local bike = script.Parent.Bike.Value
local _Tune = require(bike["Tuner"])
local handler = bike:WaitForChild("AC6_Sound")

local on = 0
local mult=0
local det=0
local trm=.4
local trmmult=0
local trmon=0
local throt=0
local redline=0
local shift=0

local SetPitch = .1
local SetRev = .6

local vol = 2 --Set the volume for everything below

handler:FireServer("stopSound",bike.DriveSeat:WaitForChild("Rev"))


Prompt: -- Container for temporary connections (disconnected automatically)

Response:
local Connections = {};

function RotateTool.Equip()
	-- Enables the tool's equipped functionality

	-- Set our current pivot mode
	SetPivot(RotateTool.Pivot);

	-- Start up our interface
	ShowUI();
	BindShortcutKeys();

end;

function RotateTool.Unequip()
	-- Disables the tool's equipped functionality

	-- Clear unnecessary resources
	HideUI();
	HideHandles();
	ClearConnections();
	BoundingBox.ClearBoundingBox();
	SnapTracking.StopTracking();

end;

function ClearConnections()
	-- Clears out temporary connections

	for ConnectionKey, Connection in pairs(Connections) do
		Connection:Disconnect();
		Connections[ConnectionKey] = nil;
	end;

end;

function ClearConnection(ConnectionKey)
	-- Clears the given specific connection

	local Connection = Connections[ConnectionKey];

	-- Disconnect the connection if it exists
	if Connections[ConnectionKey] then
		Connection:Disconnect();
		Connections[ConnectionKey] = nil;
	end;

end;

function ShowUI()
	-- Creates and reveals the UI

	-- Reveal UI if already created
	if RotateTool.UI then

		-- Reveal the UI
		RotateTool.UI.Visible = true;

		-- Update the UI every 0.1 seconds
		UIUpdater = Support.ScheduleRecurringTask(UpdateUI, 0.1);

		-- Skip UI creation
		return;

	end;

	-- Create the UI
	RotateTool.UI = Core.Tool.Interfaces.BTRotateToolGUI:Clone();
	RotateTool.UI.Parent = Core.UI;
	RotateTool.UI.Visible = true;

	-- Add functionality to the pivot option switch
	local PivotSwitch = RotateTool.UI.PivotOption;
	PivotSwitch.Center.Button.MouseButton1Down:Connect(function ()
		SetPivot('Center');
	end);
	PivotSwitch.Local.Button.MouseButton1Down:Connect(function ()
		SetPivot('Local');
	end);
	PivotSwitch.Last.Button.MouseButton1Down:Connect(function ()
		SetPivot('Last');
	end);

	-- Add functionality to the increment input
	local IncrementInput = RotateTool.UI.IncrementOption.Increment.TextBox;
	IncrementInput.FocusLost:Connect(function (EnterPressed)
		RotateTool.Increment = tonumber(IncrementInput.Text) or RotateTool.Increment;
		IncrementInput.Text = Support.Round(RotateTool.Increment, 4);
	end);

	-- Add functionality to the rotation inputs
	local XInput = RotateTool.UI.Info.RotationInfo.X.TextBox;
	local YInput = RotateTool.UI.Info.RotationInfo.Y.TextBox;
	local ZInput = RotateTool.UI.Info.RotationInfo.Z.TextBox;
	XInput.FocusLost:Connect(function (EnterPressed)
		local NewAngle = tonumber(XInput.Text);
		if NewAngle then
			SetAxisAngle('X', NewAngle);
		end;
	end);
	YInput.FocusLost:Connect(function (EnterPressed)
		local NewAngle = tonumber(YInput.Text);
		if NewAngle then
			SetAxisAngle('Y', NewAngle);
		end;
	end);
	ZInput.FocusLost:Connect(function (EnterPressed)
		local NewAngle = tonumber(ZInput.Text);
		if NewAngle then
			SetAxisAngle('Z', NewAngle);
		end;
	end);

	-- Hook up manual triggering
	local SignatureButton = RotateTool.UI:WaitForChild('Title'):WaitForChild('Signature')
	ListenForManualWindowTrigger(RotateTool.ManualText, RotateTool.Color.Color, SignatureButton)

	-- Update the UI every 0.1 seconds
	UIUpdater = Support.ScheduleRecurringTask(UpdateUI, 0.1);

end;

function HideUI()
	-- Hides the tool UI

	-- Make sure there's a UI
	if not RotateTool.UI then
		return;
	end;

	-- Hide the UI
	RotateTool.UI.Visible = false;

	-- Stop updating the UI
	UIUpdater:Stop();

end;

function UpdateUI()
	-- Updates information on the UI

	-- Make sure the UI's on
	if not RotateTool.UI then
		return;
	end;

	-- Only show and calculate selection info if it's not empty
	if #Selection.Parts == 0 then
		RotateTool.UI.Info.Visible = false;
		RotateTool.UI.Size = UDim2.new(0, 245, 0, 90);
		return;
	else
		RotateTool.UI.Info.Visible = true;
		RotateTool.UI.Size = UDim2.new(0, 245, 0, 150);
	end;

	-----------------------------------------
	-- Update the size information indicators
	-----------------------------------------

	-- Identify common angles across axes
	local XVariations, YVariations, ZVariations = {}, {}, {};
	for _, Part in pairs(Selection.Parts) do
		table.insert(XVariations, Support.Round(Part.Orientation.X, 3));
		table.insert(YVariations, Support.Round(Part.Orientation.Y, 3));
		table.insert(ZVariations, Support.Round(Part.Orientation.Z, 3));
	end;
	local CommonX = Support.IdentifyCommonItem(XVariations);
	local CommonY = Support.IdentifyCommonItem(YVariations);
	local CommonZ = Support.IdentifyCommonItem(ZVariations);

	-- Shortcuts to indicators
	local XIndicator = RotateTool.UI.Info.RotationInfo.X.TextBox;
	local YIndicator = RotateTool.UI.Info.RotationInfo.Y.TextBox;
	local ZIndicator = RotateTool.UI.Info.RotationInfo.Z.TextBox;

	-- Update each indicator if it's not currently being edited
	if not XIndicator:IsFocused() then
		XIndicator.Text = CommonX or '*';
	end;
	if not YIndicator:IsFocused() then
		YIndicator.Text = CommonY or '*';
	end;
	if not ZIndicator:IsFocused() then
		ZIndicator.Text = CommonZ or '*';
	end;

end;

function SetPivot(PivotMode)
	-- Sets the given rotation pivot mode

	-- Update setting
	RotateTool.Pivot = PivotMode;

	-- Update the UI switch
	if RotateTool.UI then
		Core.ToggleSwitch(PivotMode, RotateTool.UI.PivotOption);
	end;

	-- Disable any unnecessary bounding boxes
	BoundingBox.ClearBoundingBox();

	-- For center mode, use bounding box handles
	if PivotMode == 'Center' then
		BoundingBox.StartBoundingBox(AttachHandles);

	-- For local mode, use focused part handles
	elseif PivotMode == 'Local' then
		AttachHandles(Selection.Focus, true);

	-- For last mode, use focused part handles
	elseif PivotMode == 'Last' then
		AttachHandles(CustomPivotPoint and (RotateTool.Handles and RotateTool.Handles.Adornee) or Selection.Focus, true);
	end;

end;

function AttachHandles(Part, Autofocus)
	-- Creates and attaches handles to `Part`, and optionally automatically attaches to the focused part

	-- Enable autofocus if requested and not already on
	if Autofocus and not Connections.AutofocusHandle then
		Connections.AutofocusHandle = Selection.FocusChanged:Connect(function ()
			AttachHandles(Selection.Focus, true);
		end);

	-- Disable autofocus if not requested and on
	elseif not Autofocus and Connections.AutofocusHandle then
		ClearConnection 'AutofocusHandle';
	end;

	-- Clear previous pivot point
	CustomPivotPoint = nil

	-- Just attach and show the handles if they already exist
	if RotateTool.Handles then
		RotateTool.Handles:BlacklistObstacle(BoundingBox.GetBoundingBox())
		RotateTool.Handles:SetAdornee(Part)
		return
	end

	local AreaPermissions
	local function OnHandleDragStart()
		-- Prepare for rotating parts when the handle is clicked

		-- Prevent selection
		Core.Targeting.CancelSelecting();

		-- Indicate rotating via handle
		HandleRotating = true;

		-- Freeze bounding box extents while rotating
		if BoundingBox.GetBoundingBox() then
			InitialExtentsSize, InitialExtentsCFrame = BoundingBox.CalculateExtents(Selection.Parts, BoundingBox.StaticExtents)
			BoundingBox.PauseMonitoring();
		end;

		-- Stop parts from moving, and capture the initial state of the parts
		InitialPartStates, InitialModelStates = PrepareSelectionForRotating()

		-- Track the change
		TrackChange();

		-- Cache area permissions information
		if Core.Mode == 'Tool' then
			AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Selection.Parts), Core.Player);
		end;

		-- Set the pivot point to the center of the selection if in Center mode
		if RotateTool.Pivot == 'Center' then
			PivotPoint = BoundingBox.GetBoundingBox().CFrame;

		-- Set the pivot point to the center of the focused part if in Last mode
		elseif RotateTool.Pivot == 'Last' and not CustomPivotPoint then
			if Selection.Focus:IsA 'BasePart' then
				PivotPoint = Selection.Focus.CFrame
			elseif Selection.Focus:IsA 'Model' then
				PivotPoint = Selection.Focus:GetModelCFrame()
				pcall(function ()
					PivotPoint = Selection.Focus:GetPivot()
				end)
			end
		end;

	end

	local function OnHandleDrag(Axis, Rotation)
		-- Update parts when the handles are moved

		-- Only rotate if handle is enabled
		if not HandleRotating then
			return;
		end;

		-- Turn the rotation amount into degrees
		Rotation = math.deg(Rotation);

		-- Calculate the increment-aligned rotation amount
		Rotation = GetIncrementMultiple(Rotation, RotateTool.Increment) % 360;

		-- Get displayable rotation delta
		local DisplayedRotation = GetHandleDisplayDelta(Rotation);

		-- Perform the rotation
		RotateSelectionAroundPivot(RotateTool.Pivot, PivotPoint, Axis, Rotation, InitialPartStates, InitialModelStates)

		-- Make sure we're not entering any unauthorized private areas
		if Core.Mode == 'Tool' and Security.ArePartsViolatingAreas(Selection.Parts, Core.Player, false, AreaPermissions) then
			for Part, State in pairs(InitialPartStates) do
				Part.CFrame = State.CFrame;
			end;
			for Model, State in pairs(InitialModelStates) do
				Model.WorldPivot = State.Pivot
			end

			-- Reset displayed rotation delta
			DisplayedRotation = 0;
		end;

		-- Update the "degrees rotated" indicator
		if RotateTool.UI then
			RotateTool.UI.Changes.Text.Text = 'rotated ' .. DisplayedRotation .. ' degrees';
		end;

	end

	local function OnHandleDragEnd()
		if not HandleRotating then
			return
		end

		-- Prevent selection
		Core.Targeting.CancelSelecting();

		-- Disable rotating
		HandleRotating = false;

		-- Clear this connection to prevent it from firing again
		ClearConnection 'HandleRelease';

		-- Clear change indicator states
		HandleDirection = nil;
		HandleFirstAngle = nil;
		LastDisplayedRotation = nil;

		-- Make joints, restore original anchor and collision states
		for Part, State in pairs(InitialPartStates) do
			Part:MakeJoints();
			Core.RestoreJoints(State.Joints);
			Part.CanCollide = State.CanCollide;
			Part.Anchored = State.Anchored;
		end;

		-- Register the change
		RegisterChange();

		-- Resume normal bounding box updating
		BoundingBox.RecalculateStaticExtents();
		BoundingBox.ResumeMonitoring();

	end

	-- Create the handles
	local ArcHandles = require(Libraries:WaitForChild 'ArcHandles')
	RotateTool.Handles = ArcHandles.new({
		Color = RotateTool.Color.Color,
		Parent = Core.UIContainer,
		Adornee = Part,
		ObstacleBlacklist = { BoundingBox.GetBoundingBox() },
		OnDragStart = OnHandleDragStart,
		OnDrag = OnHandleDrag,
		OnDragEnd = OnHandleDragEnd
	})
end

function HideHandles()
	-- Hides the resizing handles

	-- Make sure handles exist and are visible
	if not RotateTool.Handles then
		return;
	end;

	-- Hide the handles
	RotateTool.Handles = RotateTool.Handles:Destroy()

	-- Disable handle autofocus if enabled
	ClearConnection 'AutofocusHandle';

end;

function RotateSelectionAroundPivot(PivotMode, PivotPoint, Axis, Rotation, InitialPartStates, InitialModelStates)
	-- Rotates the given selection around `PivotMode` (using `PivotPoint` if applicable)'s `Axis` by `Rotation`

	-- Create a CFrame that increments rotation by `Rotation` around `Axis`
	local RotationCFrame = CFrame.fromAxisAngle(Vector3.FromAxis(Axis), math.rad(Rotation));

	-- Rotate each part
	for Part, InitialState in pairs(InitialPartStates) do

		-- Rotate around the selection's center, or the currently focused part
		if PivotMode == 'Center' or PivotMode == 'Last' then

			-- Calculate the focused part's rotation
			local RelativeTo = PivotPoint * RotationCFrame;

			-- Calculate this part's offset from the focused part's rotation
			local Offset = PivotPoint:toObjectSpace(InitialState.CFrame);

			-- Rotate relative to the focused part by this part's offset from it
			Part.CFrame = RelativeTo * Offset;

		-- Rotate around the part's center
		elseif RotateTool.Pivot == 'Local' then
			Part.CFrame = InitialState.CFrame * RotationCFrame;

		end;

	end;

	-- Rotate each model's pivot
	for Model, InitialState in pairs(InitialModelStates) do

		-- Rotate around the selection's center, or the currently focused part
		if (PivotMode == 'Center') or (PivotMode == 'Last') then

			-- Calculate the focused part's rotation
			local RelativeTo = PivotPoint * RotationCFrame

			-- Calculate this part's offset from the focused part's rotation
			local Offset = PivotPoint:ToObjectSpace(InitialState.Pivot)

			-- Rotate relative to the focused part by this model's offset from it
			Model.WorldPivot = RelativeTo * Offset
		end
	end

end;

function GetHandleDisplayDelta(HandleRotation)
	-- Returns a human-friendly version of the handle's rotation delta

	-- Prepare to capture first angle
	if HandleFirstAngle == nil then
		HandleFirstAngle = true;
		HandleDirection = true;

	-- Capture first angle
	elseif HandleFirstAngle == true then

		-- Determine direction based on first angle
		if math.abs(HandleRotation) > 180 then
			HandleDirection = false;
		else
			HandleDirection = true;
		end;

		-- Disable first angle capturing
		HandleFirstAngle = false;

	end;

	-- Determine the rotation delta to display
	local DisplayedRotation;
	if HandleDirection == true then
		DisplayedRotation = (360 - HandleRotation) % 360;
	else
		DisplayedRotation = HandleRotation % 360;
	end;

	-- Switch delta calculation direction if crossing directions
	if LastDisplayedRotation and (
	   (LastDisplayedRotation <= 120 and DisplayedRotation >= 240) or
	   (LastDisplayedRotation >= 240 and DisplayedRotation <= 120)) then
		HandleDirection = not HandleDirection;
	end;

	-- Update displayed rotation after direction correction
	if HandleDirection == true then
		DisplayedRotation = (360 - HandleRotation) % 360;
	else
		DisplayedRotation = HandleRotation % 360;
	end;

	-- Store this last display rotation
	LastDisplayedRotation = DisplayedRotation;

	-- Return updated display delta
	return DisplayedRotation;

end;

function BindShortcutKeys()
	-- Enables useful shortcut keys for this tool

	-- Track user input while this tool is equipped
	table.insert(Connections, UserInputService.InputBegan:Connect(function (InputInfo, GameProcessedEvent)

		-- Make sure this is an intentional event
		if GameProcessedEvent then
			return;
		end;

		-- Make sure this input is a key press
		if InputInfo.UserInputType ~= Enum.UserInputType.Keyboard then
			return;
		end;

		-- Make sure it wasn't pressed while typing
		if UserInputService:GetFocusedTextBox() then
			return;
		end;

		-- Check if the enter key was pressed
		if InputInfo.KeyCode == Enum.KeyCode.Return or InputInfo.KeyCode == Enum.KeyCode.KeypadEnter then

			-- Toggle the current axis mode
			if RotateTool.Pivot == 'Center' then
				SetPivot('Local');

			elseif RotateTool.Pivot == 'Local' then
				SetPivot('Last');

			elseif RotateTool.Pivot == 'Last' then
				SetPivot('Center');
			end;

		-- Nudge around X axis if the 8 button on the keypad is pressed
		elseif InputInfo.KeyCode == Enum.KeyCode.KeypadEight then
			NudgeSelectionByAxis(Enum.Axis.X, 1);

		-- Nudge around X axis if the 2 button on the keypad is pressed
		elseif InputInfo.KeyCode == Enum.KeyCode.KeypadTwo then
			NudgeSelectionByAxis(Enum.Axis.X, -1);

		-- Nudge around Z axis if the 9 button on the keypad is pressed
		elseif InputInfo.KeyCode == Enum.KeyCode.KeypadNine then
			NudgeSelectionByAxis(Enum.Axis.Z, 1);

		-- Nudge around Z axis if the 1 button on the keypad is pressed
		elseif InputInfo.KeyCode == Enum.KeyCode.KeypadOne then
			NudgeSelectionByAxis(Enum.Axis.Z, -1);

		-- Nudge around Y axis if the 4 button on the keypad is pressed
		elseif InputInfo.KeyCode == Enum.KeyCode.KeypadFour then
			NudgeSelectionByAxis(Enum.Axis.Y, -1);

		-- Nudge around Y axis if the 6 button on the keypad is pressed
		elseif InputInfo.KeyCode == Enum.KeyCode.KeypadSix then
			NudgeSelectionByAxis(Enum.Axis.Y, 1);

		-- Start snapping when the R key is pressed down, and it's not the selection clearing hotkey
		elseif (InputInfo.KeyCode == Enum.KeyCode.R) and not Selection.Multiselecting then
			StartSnapping();

		-- Start snapping when T key is pressed down (alias)
		elseif (InputInfo.KeyCode == Enum.KeyCode.T) and (not Selection.Multiselecting) then
			StartSnapping();

		end;

	end));

	-- Track ending user input while this tool is equipped
	Connections.HotkeyRelease = UserInputService.InputEnded:Connect(function (InputInfo, GameProcessedEvent)
		if GameProcessedEvent then
			return
		end

		-- Make sure this is input from the keyboard
		if InputInfo.UserInputType ~= Enum.UserInputType.Keyboard then
			return
		end

		-- If - key was released, focus on increment input
		if (InputInfo.KeyCode.Name == 'Minus') or (InputInfo.KeyCode.Name == 'KeypadMinus') then
			if RotateTool.UI then
				RotateTool.UI.IncrementOption.Increment.TextBox:CaptureFocus()
			end
		end
	end)
end;

function StartSnapping()

	-- Make sure snapping isn't already enabled
	if SnapTracking.Enabled then
		return;
	end;

	-- Listen for snapped points
	SnapTracking.StartTracking(function (NewPoint)
		SnappedPoint = NewPoint;
	end);

	-- Select the snapped pivot point upon clicking
	Connections.SelectSnappedPivot = Core.Mouse.Button1Down:Connect(function ()

		-- Disable unintentional selection
		Core.Targeting.CancelSelecting();

		-- Ensure there is a snap point
		if not SnappedPoint then
			return;
		end;

		-- Disable snapping
		SnapTracking.StopTracking();

		-- Attach the handles to a part at the snapped point
		local Part = Make 'Part' {
			CFrame = SnappedPoint,
			Size = Vector3.new(5, 1, 5)
		};
		SetPivot 'Last';
		AttachHandles(Part, true);

		-- Maintain the part in memory to prevent garbage collection
		GCBypass = { Part };

		-- Set the pivot point
		PivotPoint = SnappedPoint;
		CustomPivotPoint = true;

		-- Disconnect snapped pivot point selection listener
		ClearConnection 'SelectSnappedPivot';

	end);

end;

function SetAxisAngle(Axis, Angle)
	-- Sets the selection's angle on axis `Axis` to `Angle`

	-- Turn the given angle from degrees to radians
	local Angle = math.rad(Angle);

	-- Track this change
	TrackChange();

	-- Prepare parts to be moved
	local InitialPartStates = PrepareSelectionForRotating()

	-- Update each part
	for Part, State in pairs(InitialPartStates) do

		-- Set the part's new CFrame
		Part.CFrame = CFrame.new(Part.Position) * CFrame.fromOrientation(
			Axis == 'X' and Angle or math.rad(Part.Orientation.X),
			Axis == 'Y' and Angle or math.rad(Part.Orientation.Y),
			Axis == 'Z' and Angle or math.rad(Part.Orientation.Z)
		);

	end;

	-- Cache up permissions for all private areas
	local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Selection.Parts), Core.Player);

	-- Revert changes if player is not authorized to move parts to target destination
	if Core.Mode == 'Tool' and Security.ArePartsViolatingAreas(Selection.Parts, Core.Player, false, AreaPermissions) then
		for Part, State in pairs(InitialPartStates) do
			Part.CFrame = State.CFrame;
		end;
	end;

	-- Restore the parts' original states
	for Part, State in pairs(InitialPartStates) do
		Part:MakeJoints();
		Core.RestoreJoints(State.Joints);
		Part.CanCollide = State.CanCollide;
		Part.Anchored = State.Anchored;
	end;

	-- Register the change
	RegisterChange();

end;

function NudgeSelectionByAxis(Axis, Direction)
	-- Nudges the rotation of the selection in the direction of the given axis

	-- Ensure selection is not empty
	if #Selection.Parts == 0 then
		return;
	end;

	-- Get amount to nudge by
	local NudgeAmount = RotateTool.Increment;

	-- Reverse nudge amount if shift key is held while nudging
	local PressedKeys = Support.FlipTable(Support.GetListMembers(UserInputService:GetKeysPressed(), 'KeyCode'));
	if PressedKeys[Enum.KeyCode.LeftShift] or PressedKeys[Enum.KeyCode.RightShift] then
		NudgeAmount = -NudgeAmount;
	end;

	-- Track the change
	TrackChange();

	-- Stop parts from moving, and capture the initial state of the parts
	local InitialPartStates, InitialModelStates = PrepareSelectionForRotating()

	-- Set the pivot point to the center of the selection if in Center mode
	if RotateTool.Pivot == 'Center' then
		local BoundingBoxSize, BoundingBoxCFrame = BoundingBox.CalculateExtents(Selection.Parts);
		PivotPoint = BoundingBoxCFrame;

	-- Set the pivot point to the center of the focused part if in Last mode
	elseif RotateTool.Pivot == 'Last' and not CustomPivotPoint then
		if Selection.Focus:IsA 'BasePart' then
			PivotPoint = Selection.Focus.CFrame
		elseif Selection.Focus:IsA 'Model' then
			PivotPoint = Selection.Focus:GetModelCFrame()
			pcall(function ()
				PivotPoint = Selection.Focus:GetPivot()
			end)
		end
	end;

	-- Perform the rotation
	RotateSelectionAroundPivot(RotateTool.Pivot, PivotPoint, Axis, NudgeAmount * (Direction or 1), InitialPartStates, InitialModelStates)

	-- Update the "degrees rotated" indicator
	if RotateTool.UI then
		RotateTool.UI.Changes.Text.Text = 'rotated ' .. (NudgeAmount * (Direction or 1)) .. ' degrees';
	end;

	-- Cache area permissions information
	local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Selection.Parts), Core.Player);

	-- Make sure we're not entering any unauthorized private areas
	if Core.Mode == 'Tool' and Security.ArePartsViolatingAreas(Selection.Parts, Core.Player, false, AreaPermissions) then
		for Part, State in pairs(InitialPartStates) do
			Part.CFrame = State.CFrame;
		end;
		for Model, State in pairs(InitialModelStates) do
			Model.WorldPivot = State.Pivot
		end
	end;

	-- Make joints, restore original anchor and collision states
	for Part, State in pairs(InitialPartStates) do
		Part:MakeJoints();
		Core.RestoreJoints(State.Joints);
		Part.CanCollide = State.CanCollide;
		Part.Anchored = State.Anchored;
	end;

	-- Register the change
	RegisterChange();

end;

function TrackChange()

	-- Start the record
	HistoryRecord = {
		Parts = Support.CloneTable(Selection.Parts);
		Models = Support.CloneTable(Selection.Models);
		BeforeCFrame = {};
		AfterCFrame = {};
		Selection = Selection.Items;

		Unapply = function (Record)
			-- Reverts this change

			-- Select the changed parts
			Selection.Replace(Record.Selection)

			-- Put together the change request
			local Changes = {};
			for _, Part in pairs(Record.Parts) do
				table.insert(Changes, {
					Part = Part;
					CFrame = Record.BeforeCFrame[Part];
				})
			end;
			for _, Model in pairs(Record.Models) do
				table.insert(Changes, {
					Model = Model;
					Pivot = Record.BeforeCFrame[Model];
				})
			end

			-- Send the change request
			Core.SyncAPI:Invoke('SyncRotate', Changes);

		end;

		Apply = function (Record)
			-- Applies this change

			-- Select the changed parts
			Selection.Replace(Record.Selection)

			-- Put together the change request
			local Changes = {};
			for _, Part in pairs(Record.Parts) do
				table.insert(Changes, {
					Part = Part;
					CFrame = Record.AfterCFrame[Part];
				})
			end;
			for _, Model in pairs(Record.Models) do
				table.insert(Changes, {
					Model = Model;
					Pivot = Record.AfterCFrame[Model];
				})
			end

			-- Send the change request
			Core.SyncAPI:Invoke('SyncRotate', Changes);

		end;

	};

	-- Collect the selection's initial state
	for _, Part in pairs(HistoryRecord.Parts) do
		HistoryRecord.BeforeCFrame[Part] = Part.CFrame;
	end;
	pcall(function ()
		for _, Model in pairs(HistoryRecord.Models) do
			HistoryRecord.BeforeCFrame[Model] = Model:GetPivot()
		end
	end)
end;

function RegisterChange()
	-- Finishes creating the history record and registers it

	-- Make sure there's an in-progress history record
	if not HistoryRecord then
		return;
	end;

	-- Collect the selection's final state
	local Changes = {};
	for _, Part in pairs(HistoryRecord.Parts) do
		HistoryRecord.AfterCFrame[Part] = Part.CFrame;
		table.insert(Changes, {
			Part = Part;
			CFrame = Part.CFrame;
		})
	end;
	pcall(function ()
		for _, Model in pairs(HistoryRecord.Models) do
			HistoryRecord.AfterCFrame[Model] = Model:GetPivot()
			table.insert(Changes, {
				Model = Model;
				Pivot = Model:GetPivot();
			})
		end
	end)

	-- Send the change to the server
	Core.SyncAPI:Invoke('SyncRotate', Changes);

	-- Register the record and clear the staging
	Core.History.Add(HistoryRecord);
	HistoryRecord = nil;

end;

function PrepareSelectionForRotating()
	-- Prepares parts for rotating and returns the initial state of the parts

	local InitialPartStates = {}
	local InitialModelStates = {}

	-- Get index of parts
	local PartIndex = Support.FlipTable(Selection.Parts);

	-- Stop parts from moving, and capture the initial state of the parts
	for _, Part in pairs(Selection.Parts) do
		InitialPartStates[Part] = {
			Anchored = Part.Anchored;
			CanCollide = Part.CanCollide;
			CFrame = Part.CFrame;
		}
		Part.Anchored = true;
		Part.CanCollide = false;
		InitialPartStates[Part].Joints = Core.PreserveJoints(Part, PartIndex);
		Part:BreakJoints();
		Part.Velocity = Vector3.new();
		Part.RotVelocity = Vector3.new();
	end;

	-- Record model pivots
	-- (temporarily pcalled due to pivot API being in beta)
	pcall(function ()
		for _, Model in pairs(Selection.Models) do
			InitialModelStates[Model] = {
				Pivot = Model:GetPivot();
			}
		end
	end)

	return InitialPartStates, InitialModelStates
end;

function GetIncrementMultiple(Number, Increment)

	-- Get how far the actual distance is from a multiple of our increment
	local MultipleDifference = Number % Increment;

	-- Identify the closest lower and upper multiples of the increment
	local LowerMultiple = Number - MultipleDifference;
	local UpperMultiple = Number - MultipleDifference + Increment;

	-- Calculate to which of the two multiples we're closer
	local LowerMultipleProximity = math.abs(Number - LowerMultiple);
	local UpperMultipleProximity = math.abs(Number - UpperMultiple);

	-- Use the closest multiple of our increment as the distance moved
	if LowerMultipleProximity <= UpperMultipleProximity then
		Number = LowerMultiple;
	else
		Number = UpperMultiple;
	end;

	return Number;
end;


Prompt: --Edited by QS

Response:
local Tool = script.Parent;
local torso = nil
local human = nil

function SetMouseIcon(mouse,bool)
	if mouse == nil then return end
	mouse.Icon = bool == true and "rbxasset://textures\\GunCursor.png" or "rbxasset://textures\\GunWaitCursor.png"
end

function onEquippedLocal(mouse)
	if mouse == nil then
		print("Mouse not found")
		return
	end

	torso = Tool.Parent:FindFirstChild("HumanoidRootPart")
	human = Tool.Parent:FindFirstChild("Humanoid")--getHumanoid(Tool.Parent)
	if torso == nil or human == nil then return end

	SetMouseIcon(mouse,Tool.IsEnabled.Value)
	Tool.IsEnabled.Changed:connect(function(bool)
		SetMouseIcon(mouse,bool)
	end)

	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function()
		script.Parent.MouseClick:FireServer(mouse.Hit.p)
	end)
	mouse.KeyDown:connect(function(key)
		script.Parent.KeyPress:FireServer(key)
	end)
end

Tool.Equipped:connect(onEquippedLocal)


Prompt: --[[Engine]]

Response:
	--Torque Curve
	Tune.Horsepower		= 400		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 7200		--		Use sliders to manipulate values
	Tune.Redline		= 8500		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	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		= 350		-- 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: --//Settings

Response: BlurAmount = 24 -- Change this to increase or decrease the blur size


Prompt: --- Validates that the argument will work without any type errors.

Response:
function Argument:Validate(isFinal)
	if self.RawValue == nil or #self.RawValue == 0 and self.Required == false then
		return true
	end

	if self.Type.Validate or self.Type.ValidateOnce then
		for i = 1, #self.TransformedValues do
			if self.Type.Validate then
				local valid, errorText = self.Type.Validate(self:GetTransformedValue(i))

				if not valid then
					return valid, errorText or "Invalid value"
				end
			end

			if isFinal and self.Type.ValidateOnce then
				local validOnce, errorTextOnce = self.Type.ValidateOnce(self:GetTransformedValue(i))

				if not validOnce then
					return validOnce, errorTextOnce
				end
			end
		end

		return true
	else
		return true
	end
end


Prompt: -- and (IsServer or weaponInstance:IsDescendantOf(Players.LocalPlayer))

Response:
function WeaponsSystem.onWeaponAdded(weaponInstance)

	local weapon = WeaponsSystem.getWeaponForInstance(weaponInstance)
	if not weapon then
		WeaponsSystem.createWeaponForInstance(weaponInstance)
	end
end

function WeaponsSystem.onWeaponRemoved(weaponInstance)
	local weapon = WeaponsSystem.getWeaponForInstance(weaponInstance)
	if weapon then
		weapon:onDestroyed()
	end
	WeaponsSystem.knownWeapons[weaponInstance] = nil
end

function WeaponsSystem.getRemoteEvent(name)
	if not WeaponsSystem.networkFolder then
		return
	end

	local remoteEvent = WeaponsSystem.remoteEvents[name]
	if IsServer then
		if not remoteEvent then
			warn("No RemoteEvent named ", name)
			return nil
		end

		return remoteEvent
	else
		if not remoteEvent then
			remoteEvent = WeaponsSystem.networkFolder:WaitForChild(name, math.huge)
		end

		return remoteEvent
	end
end

function WeaponsSystem.getRemoteFunction(name)
	if not WeaponsSystem.networkFolder then
		return
	end

	local remoteFunc = WeaponsSystem.remoteFunctions[name]
	if IsServer then
		if not remoteFunc then
			warn("No RemoteFunction named ", name)
			return nil
		end

		return remoteFunc
	else
		if not remoteFunc then
			remoteFunc = WeaponsSystem.networkFolder:WaitForChild(name, math.huge)
		end

		return remoteFunc
	end
end

function WeaponsSystem.setWeaponEquipped(weapon, equipped)
	assert(not IsServer, "WeaponsSystem.setWeaponEquipped should only be called on the client.")
	if not weapon then
		return
	end

	local lastWeapon = WeaponsSystem.currentWeapon
	local hasWeapon = false
	local weaponChanged = false

	if lastWeapon == weapon then
		if not equipped then
			WeaponsSystem.currentWeapon = nil
			hasWeapon = false
			weaponChanged = true
		else
			weaponChanged = false
		end
	else
		if equipped then
			WeaponsSystem.currentWeapon = weapon
			hasWeapon = true
			weaponChanged = true
		end
	end

	if WeaponsSystem.camera then
		WeaponsSystem.camera:resetZoomFactor()
		WeaponsSystem.camera:setHasScope(false)

		if WeaponsSystem.currentWeapon then
			WeaponsSystem.camera:setZoomFactor(WeaponsSystem.currentWeapon:getConfigValue("ZoomFactor", 1.1))
			WeaponsSystem.camera:setHasScope(WeaponsSystem.currentWeapon:getConfigValue("HasScope", false))
		end
	end

	if WeaponsSystem.gui then
		WeaponsSystem.gui:setEnabled(hasWeapon)
		WeaponsSystem.camera:setEnabled(hasWeapon)

		if WeaponsSystem.currentWeapon then
			WeaponsSystem.gui:setCrosshairWeaponScale(WeaponsSystem.currentWeapon:getConfigValue("CrosshairScale", 1))
		else
			WeaponsSystem.gui:setCrosshairWeaponScale(1)
		end
	end

	if weaponChanged then
		WeaponsSystem.CurrentWeaponChanged:Fire(weapon.instance, lastWeapon and lastWeapon.instance)
	end
end

function WeaponsSystem.getHumanoid(part)
	while part and part ~= workspace do
		if part:IsA("Model") and part.PrimaryPart and part.PrimaryPart.Name == "HumanoidRootPart" then
			return part:FindFirstChildOfClass("Humanoid")
		end

		part = part.Parent
	end
end

function WeaponsSystem.getPlayerFromHumanoid(humanoid)
	for _, player in ipairs(Players:GetPlayers()) do
		if player.Character and humanoid:IsDescendantOf(player.Character) then
			return player
		end
	end
end

local function TagHumanoid(humanoid, player)
	local Creator_Tag = Instance.new("ObjectValue")
	Creator_Tag.Name = "creator"
	Creator_Tag.Value = player
	game:GetService("Debris"):AddItem(Creator_Tag, 0.3)
	Creator_Tag.Parent = humanoid
end

local function UntagHumanoid(humanoid)
	for i, v in pairs(humanoid:GetChildren()) do
		if v:IsA("ObjectValue") and v.Name == "creator" then
			v:Destroy()
		end
	end
end

local function _defaultDamageCallback(system, target, amount, damageType, dealer, hitInfo, damageData)
	if target:IsA("Humanoid") then
		UntagHumanoid(target)
		target:TakeDamage(amount)
		TagHumanoid(target,dealer)
	end
end

function WeaponsSystem.doDamage(target, amount, damageType, dealer, hitInfo, damageData)
	if not target or CollectionService:HasTag(target, "WeaponsSystemIgnore") then
		return
	end
	--if IsServer then
	if target:IsA("Humanoid") and dealer:IsA("Player") and dealer.Character then
		local dealerHumanoid = dealer.Character:FindFirstChildOfClass("Humanoid")
		local targetPlayer = Players:GetPlayerFromCharacter(target.Parent)
		if dealerHumanoid and target ~= dealerHumanoid and targetPlayer then
			-- Trigger the damage indicator
			WeaponData:FireClient(targetPlayer, "HitByOtherPlayer", dealer.Character.HumanoidRootPart.CFrame.Position)
		end
	end

	-- NOTE:  damageData is a more or less free-form parameter that can be used for passing information from the code that is dealing damage about the cause.
	-- .The most obvious usage is extracting icons from the various weapon types (in which case a weapon instance would likely be passed in)
	-- ..The default weapons pass in that data
	local handler = _damageCallback or _defaultDamageCallback
	handler(WeaponsSystem, target, amount, damageType, dealer, hitInfo, damageData)
	--end
end

local function _defaultGetTeamCallback(player)
	return 0
end

function WeaponsSystem.getTeam(player)
	local handler = _getTeamCallback or _defaultGetTeamCallback
	return handler(player)
end

function WeaponsSystem.playersOnDifferentTeams(player1, player2)
	if player1 == player2 or player1 == nil or player2 == nil then
		-- This allows players to damage themselves and NPC's
		return true
	end

	local player1Team = WeaponsSystem.getTeam(player1)
	local player2Team = WeaponsSystem.getTeam(player2)
	return player1Team == 0 or player1Team ~= player2Team
end

return WeaponsSystem


Prompt: --Airflow = script.Parent.Parent.ChopperNB

Response:
ChopperNB = script.Parent.Parent.ChopperNB
MuteNB = ChopperNB.Mute
LoadWeight = script.LoadWeight
MVal = script.MuteVal
RotorMotor = script.Parent.Parent.Parent.Motor.Motor.HingeConstraint
LoadWeight.Value = LoadWeight.NoBlowerW.Value

script.Parent.BlowerOn.Changed:Connect(function()
	if script.Parent.BlowerOn.Value == false then
		--Airflow.HighAir.Disabled = true
		--Airflow.LowAir.Disabled = false
		local ts = game:GetService("TweenService")
		local t = ts:Create(script.Parent,TweenInfo.new(4),{Volume = 0})
		local t3 = ts:Create(MVal,TweenInfo.new(2),{Value = 0})
		local t2 = ts:Create(script.Parent.SoundComponents.NonAdjustable.BlowerOffsetPitch,TweenInfo.new(1),{Value = 0.1})
		local t4 = ts:Create(LoadWeight,TweenInfo.new(3),{Value = LoadWeight.NoBlowerW.Value})
		--print("o1")
		t:Play()
		t2:Play()
		t3:Play()
		t4:Play()
	else
		--Airflow.HighAir.Disabled = false
		--Airflow.LowAir.Disabled = true
		local ts = game:GetService("TweenService")
		local t = ts:Create(script.Parent,TweenInfo.new(.85),{Volume = 4.5})
		local t3 = ts:Create(MVal,TweenInfo.new(5),{Value = -80})
		local t2 = ts:Create(script.Parent.SoundComponents.NonAdjustable.BlowerOffsetPitch,TweenInfo.new(2),{Value = 0})
		local t4 = ts:Create(LoadWeight,TweenInfo.new(.85),{Value = LoadWeight.BlowerW.Value})
		--print("o2")
		t:Play()
		t2:Play()
		t3:Play()
		t4:Play()
	end
end)

function getChopperLevelPitch(pitch)
	return 0
	--math.clamp((pitch-0.1)/script.Parent,0,1)
end

script.Parent.PlaybackSpeed = 0

CompletelyStopped = true

script.Parent.On.Changed:Connect(function()
	if CompletelyStopped == true and script.Parent.On.Value == true then
		repeat game:GetService("RunService").Heartbeat:wait()

			CompletelyStopped = false
			script.Stopped.Value = false

			RotorMotor.AngularVelocity = script.Parent.PlaybackSpeed/0.00335

			ChopperNB.PlaybackSpeed = script.Parent.PlaybackSpeed --/0.6801
			ChopperNB.Volume = script.Parent.PlaybackSpeed/.9
			MuteNB.HighGain = MVal.Value
			MuteNB.LowGain = MuteNB.HighGain
			MuteNB.MidGain = MuteNB.HighGain

			script.Parent.RollOffMaxDistance = script.RollOffMax.Value *script.Parent.Volume --7000
			script.Parent.RollOffMinDistance = script.RollOffMin.Value *script.Parent.Volume --7000

			if script.Parent.On.Value == true and script.Parent.PlaybackSpeed < script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value+BlowerAddress.BeltSet.Sound.Pitch/7 then
				if script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value < 1 then
					if script.Parent.SoundComponents.NonAdjustable.NormalSound.Value < math.abs(script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value-1) then
						script.Parent.SoundComponents.NonAdjustable.NormalSound.Value = math.abs(script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value-1)
					end
				end
				local clampval = math.clamp(math.ceil(script.Parent.SoundComponents.NonAdjustable.NormalSound.Value),0,1)
				local pitch = script.Parent.SoundComponents.NonAdjustable.NormalSound.Value
				local formula = math.clamp(math.log(pitch+0.001,0.65)/320,0.00007,0.02)--pitch+0.001,0.75)/320,0.00007,0.02
				--print(script.Parent.PlaybackSpeed)
				--print(script.Parent.SoundComponents.NonAdjustable.NormalSound.Value)
				script.Parent.SoundComponents.NonAdjustable.NormalSound.Value = math.clamp(script.Parent.SoundComponents.NonAdjustable.NormalSound.Value + formula,0,2)
				script.Parent.PlaybackSpeed = (script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value+(script.Parent.SoundComponents.NonAdjustable.NormalSound.Value+((BlowerAddress.BeltSet.Sound.Pitch/7)*clampval)))-1
			elseif script.Parent.On.Value == false and script.Parent.PlaybackSpeed > 0 then
				if script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value < 1 then
					if script.Parent.SoundComponents.NonAdjustable.NormalSound.Value < math.abs(script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value-1) then
						script.Parent.SoundComponents.NonAdjustable.NormalSound.Value = 0
					end
				end
				local pitch = script.Parent.SoundComponents.NonAdjustable.NormalSound.Value
				--local formula = math.clamp(math.log(math.abs(pitch-1)+0.0001,0.06)/300,0.0004,0.07)
				local formula = math.clamp(math.log(math.abs(pitch-1)+0.0001,0.05)/LoadWeight.Value,0.0004,0.02)
				local clampval = math.clamp(math.ceil(script.Parent.SoundComponents.NonAdjustable.NormalSound.Value),0,1)
				--print(formula)
				script.Parent.SoundComponents.NonAdjustable.NormalSound.Value = math.clamp(script.Parent.SoundComponents.NonAdjustable.NormalSound.Value - formula,0,2)
				--+(script.Parent.Shift.Octave*math.clamp(0,1,math.ceil(math.abs(formula))))
				script.Parent.PlaybackSpeed = ((script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value+(script.Parent.SoundComponents.NonAdjustable.NormalSound.Value+((BlowerAddress.BeltSet.Sound.Pitch/7)*clampval))-1)*clampval)
			else
				local clampval = math.clamp(math.ceil(script.Parent.SoundComponents.NonAdjustable.NormalSound.Value),0,1)
				script.Parent.PlaybackSpeed = ((script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value+(script.Parent.SoundComponents.NonAdjustable.NormalSound.Value+((BlowerAddress.BeltSet.Sound.Pitch/7)*clampval))-1)*clampval)
			end
	--[[	if script.Parent.On.Value == true then

		--((math.clamp((incerment+0.001)-script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value/2,0,1) * 30))
		if script.Parent.PlaybackSpeed >= script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value then

		else
			--math.abs((((script.Parent.SoundComponents.NonAdjustable.ChopperLevelCurrent.Value-4)/20)+1
			formula = (script.Parent.SoundComponents.NonAdjustable.StaticVoltage.Value*(1))/(70000*math.sqrt((script.Parent.SoundComponents.NonAdjustable.LoadWeight.Value*((script.Parent.PlaybackSpeed+0.0001)/(script.Parent.SoundComponents.Configuration.ChopperLevel.Value-(script.Parent.PlaybackSpeed*(5-(math.abs(script.Parent.SoundComponents.Configuration.ChopperLevel.Value-4.6)))))))))
			--formula = (((script.Parent.SoundComponents.NonAdjustable.StaticVoltage.Value+script.Parent.SoundComponents.NonAdjustable.ChopperLevelCurrent.Value)/(incerment+0.01))*script.Parent.SoundComponents.NonAdjustable.Horsepower.Value)/(80000*math.sqrt((script.Parent.SoundComponents.NonAdjustable.LoadWeight.Value)*(script.Parent.SoundComponents.NonAdjustable.Horsepower.Value)))
		end
	else
		if script.Parent.PlaybackSpeed <= 0 then

		else
			formula = (incerment+0.001)/(((500/(incerment+0.001))+math.sqrt(script.Parent.SoundComponents.NonAdjustable.LoadWeight.Value)))
		end
	end
	--print(formula)
	--+math.sqrt(script.Parent.SoundComponents.NonAdjustable.LoadWeight.Value)
	--print((incerment+0.001)/(((500/(incerment+0.001))+math.sqrt(script.Parent.SoundComponents.NonAdjustable.LoadWeight.Value))))
	if script.Parent.On.Value == true then
		if script.Parent.PlaybackSpeed >= script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value+script.Parent.SoundComponents.NonAdjustable.BlowerOffsetPitch.Value then
			if script.Parent.PlaybackSpeed >= script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value then
				if script.Parent.PlaybackSpeed <= script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value then

				else
					script.Parent.PlaybackSpeed =  math.clamp(script.Parent.PlaybackSpeed - math.clamp(formula,0.000005,0.001),0,script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value+script.Parent.SoundComponents.NonAdjustable.BlowerOffsetPitch.Value)
				end
			end
		else
			script.Parent.PlaybackSpeed = math.clamp(script.Parent.PlaybackSpeed + formula,0,script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value+script.Parent.SoundComponents.NonAdjustable.BlowerOffsetPitch.Value)
		end
	else
		if script.Parent.PlaybackSpeed <= 0 then

		else
			script.Parent.PlaybackSpeed =  math.clamp(script.Parent.PlaybackSpeed - math.clamp(formula,0.000005,0.001),0,script.Parent.SoundComponents.NonAdjustable.MaxPitch.Value+script.Parent.SoundComponents.NonAdjustable.BlowerOffsetPitch.Value)
		end
	end
	--]]

		until script.Parent.SoundComponents.NonAdjustable.NormalSound.Value <= 0
		CompletelyStopped = true
		RotorMotor.AngularVelocity = 0
		script.Parent.PlaybackSpeed = 0
		ChopperNB.PlaybackSpeed = 0

		if BlowerAddress.Components.BlowerOn.Value == false then
			script.Parent.Volume = 0
		end
		script.Stopped.Value = true
	end
end)

script.Parent.BlowerOn.Changed:Connect(function()
	if script.Parent.BlowerOn.Value == false and CompletelyStopped == true then
		script.Parent.Volume = 0
	end
end)


Prompt:
------------------------------------------------------------------------
--
-- * used only in (lparser) luaY:subexpr()
------------------------------------------------------------------------

Response:
function luaK:prefix(fs, op, e)
  local e2 = {}  -- expdesc
  e2.t, e2.f = self.NO_JUMP, self.NO_JUMP
  e2.k = "VKNUM"
  e2.nval = 0
  if op == "OPR_MINUS" then
    if not self:isnumeral(e) then
      self:exp2anyreg(fs, e)  -- cannot operate on non-numeric constants
    end
    self:codearith(fs, "OP_UNM", e, e2)
  elseif op == "OPR_NOT" then
    self:codenot(fs, e)
  elseif op == "OPR_LEN" then
    self:exp2anyreg(fs, e)  -- cannot operate on constants
    self:codearith(fs, "OP_LEN", e, e2)
  else
    assert(0)
  end
end


Prompt: -- TODO: When Promise is on Wally, remove this in favor of just `script.Parent.Parent:FindFirstChild("Promise")`.

Response:
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")
local ServerStorage = game:GetService("ServerStorage")

local LOCATIONS_TO_SEARCH = {script.Parent.Parent, ReplicatedFirst, ReplicatedStorage, ServerScriptService, ServerStorage}

local function FindFirstDescendantWithNameAndClassName(Parent: Instance, Name: string, ClassName: string)
	for _, Descendant in ipairs(Parent:GetDescendants()) do
		if Descendant:IsA(ClassName) and Descendant.Name == Name then
			return Descendant
		end
	end

	return nil
end

local function GetPromiseLibrary()
	-- I'm not too keen on how this is done.
	-- It's better than the multiple if statements (probably).
	local Plugin = script:FindFirstAncestorOfClass("Plugin")
	if Plugin then
		local Promise = FindFirstDescendantWithNameAndClassName(Plugin, "Promise", "ModuleScript")
		if Promise then
			return true, require(Promise)
		else
			return false
		end
	end

	local Promise
	for _, Location in ipairs(LOCATIONS_TO_SEARCH) do
		Promise = FindFirstDescendantWithNameAndClassName(Location, "Promise", "ModuleScript")
		if Promise then
			break
		end
	end

	if Promise then
		return true, require(Promise)
	else
		return false
	end
end

return GetPromiseLibrary


Prompt:
--////////////////////////////// Methods
--//////////////////////////////////////

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

function getClassicChatEnabled()
	if ChatSettings.ClassicChatEnabled ~= nil then
		return ChatSettings.ClassicChatEnabled
	end
	return Players.ClassicChat
end

function getBubbleChatEnabled()
	if ChatSettings.BubbleChatEnabled ~= nil then
		return ChatSettings.BubbleChatEnabled
	end
	return Players.BubbleChat
end

function bubbleChatOnly()
 	return not getClassicChatEnabled() and getBubbleChatEnabled()
end


Prompt: --FlasherCircuit-- (DO NOT CHANGE!)

Response: Flash = script.Parent.Parent.Parent.ControlBox.FlasherCircuit


Prompt:
-- Public Virtual
-- This function ticks every frame when the state is not active

Response:
function BaseState:OffTick(currenTime,dt,stateTime)

end


Prompt:
--edit the below function to execute code when this response is chosen OR this prompt is shown
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data

Response:
return function(player, dialogueFolder)
	local MoneyModule = require(game.ReplicatedStorage.Source.SystemModules.Money)
	MoneyModule.BuyOutfitFromDialogueFolder(player,dialogueFolder)

end


Prompt: -- Define the function to open or close the window with gene-alike effect

Response:
local function toggleWindow()
	if window.Visible then

		window.Visible = false
		opened.Visible = false
		-- Close the window by tweening back to the button position and size
		window:TweenSizeAndPosition(
			UDim2.new(0, 0, 0, 0),
			UDim2.new(0, aFinderButton.AbsolutePosition.X, 0, aFinderButton.AbsolutePosition.Y),
			'Out',
			'Quad',
			0.5,
			false,
			function()
				window.Visible = false
				msgbar.Fucus.Disabled = true
			end
		)
	end
end


Prompt:
--Repilee 4/21/19
--This script will make any player who is not sitting in the car and doors/windows not opened will muffle.

Response:
local body = script.CarSeat.Value

body.MP.OutsideSound.Volume = body.Parent.DriveSeat.Values.MusicVolume.Value
wait(.1)
body.MP.Sound.Volume = 0
wait(.1)
script:Destroy()


Prompt: -- ROBLOX TODO: declared as an opaque type in flowtype: https://github.com/facebook/flow/blob/422821fd42c09c3ef609c60516fe754b601ea205/lib/react.js#L182

Response:
export type React_Portal = any
export type React_Key = string | number

return {}


Prompt: --game.ReplicatedStorage.PlayerModule:FireServer(desc)


Prompt: --------RIGHT DOOR 1--------

Response:
game.Workspace.doorright.l71.BrickColor = BrickColor.new(135)

game.Workspace.doorright.l11.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l12.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l13.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l41.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l42.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l43.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l73.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l72.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l21.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l22.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l23.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l52.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l53.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l31.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l32.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l61.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l62.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(102)

game.Workspace.doorright.pillar.BrickColor = BrickColor.new(102)


Prompt: --// F key, HornOn

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


Prompt: -- Obtenemos el servicio Players

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


Prompt:
--[[
	Creates a new promise that receives the result of this promise.

	The given callbacks are invoked depending on that result.
]]

Response:
function Promise.prototype:_andThen(traceback, successHandler, failureHandler)
	self._unhandledRejection = false

	-- Create a new promise to follow this part of the chain
	return Promise._new(traceback, function(resolve, reject)
		-- Our default callbacks just pass values onto the next promise.
		-- This lets success and failure cascade correctly!

		local successCallback = resolve
		if successHandler then
			successCallback = createAdvancer(
				traceback,
				successHandler,
				resolve,
				reject
			)
		end

		local failureCallback = reject
		if failureHandler then
			failureCallback = createAdvancer(
				traceback,
				failureHandler,
				resolve,
				reject
			)
		end

		if self._status == Promise.Status.Started then
			-- If we haven't resolved yet, put ourselves into the queue
			table.insert(self._queuedResolve, successCallback)
			table.insert(self._queuedReject, failureCallback)
		elseif self._status == Promise.Status.Resolved then
			-- This promise has already resolved! Trigger success immediately.
			successCallback(unpack(self._values, 1, self._valuesLength))
		elseif self._status == Promise.Status.Rejected then
			-- This promise died a terrible death! Trigger failure immediately.
			failureCallback(unpack(self._values, 1, self._valuesLength))
		elseif self._status == Promise.Status.Cancelled then
			-- We don't want to call the success handler or the failure handler,
			-- we just reject this promise outright.
			reject(Error.new({
				error = "Promise is cancelled",
				kind = Error.Kind.AlreadyCancelled,
				context = "Promise created at\n\n" .. traceback,
			}))
		end
	end, self)
end


Prompt: -- Tweens volume for more dynamic shut off

Response:
local function TweenVolume(FromVolume,ToVolume,Duration,ShouldStopAfterTween)
	local CurrentSession = math.random(0,9999999)
	IsTweeningVolumeSession = CurrentSession
	for i=0,1,1/(Duration/0.03) do

		if IsTweeningVolumeSession ~= CurrentSession then
			return CurrentSession
		end

		local NewVol = FromVolume * (1-i) + ToVolume * i

		WaterLoop.Volume = NewVol

		wait()
	end

	WaterLoop.Volume = ToVolume

	if ShouldStopAfterTween then
		WaterLoop:Stop()
	end
end


Prompt:
--[[
	Promise.new, except pcall on a new thread is automatic.
]]

Response:
function Promise.defer(callback)
	local traceback = debug.traceback(nil, 2)
	local promise
	promise = Promise._new(traceback, function(resolve, reject, onCancel)
		local connection
		connection = Promise._timeEvent:Connect(function()
			connection:Disconnect()
			local ok, _, result = runExecutor(traceback, callback, resolve, reject, onCancel)

			if not ok then
				reject(result[1])
			end
		end)
	end)

	return promise
end


Prompt:
--health.Changed:connect(function()
--root.Velocity = Vector3.new(0,5000,0)
--end)

Response:
local anims = {}
local lastAttack= tick()

local target,targetType

local lastLock = tick()

local fleshDamage = 100
local structureDamage = 250

local path = nil

for _,animObject in next,animations do
anims[animObject.Name] = hum:LoadAnimation(animObject)
end

function Attack(thing,dmg)
if tick()-lastAttack > 2 then
hum:MoveTo(root.Position)
lastAttack = tick()
anims.AntWalk:Stop()
anims.AntMelee:Play()

if thing.ClassName == "Player" then
root.FleshHit:Play()
ant:SetPrimaryPartCFrame(CFrame.new(root.Position,Vector3.new(target.Character.PrimaryPart.Position.X,root.Position.Y,target.Character.PrimaryPart.Position.Z)))

elseif thing.ClassName == "Model" then
root.StructureHit:Play()
end

rep.Events.NPCAttack:Fire(thing,dmg)
end
end

function Move(point)
hum:MoveTo(point)
if not anims.AntWalk.IsPlaying then
anims.AntWalk:Play()
end
end

function ScanForPoint()
local newPoint
local rayDir = Vector3.new(math.random(-100,100)/100,0,math.random(-100,100)/100)
local ray = Ray.new(root.Position,rayDir*math.random(10,50),ant)
local part,pos = workspace:FindPartOnRay(ray)
Move(pos)
enRoute = true
end


Prompt:
--[[**
	Encodes a string in Base64.
	@param [t:string] Input The input string to encode.
	@returns [t:string] The string encoded in Base64.
**--]]

Response:
function Base64.Encode(Input)
	local Output = {}
	local Length = 0

	for Index = 1, #Input, 3 do
		local C1, C2, C3 = string.byte(Input, Index, Index + 2)

		local A = bit32_rshift(C1, 2)
		local B = bit32_lshift(bit32_band(C1, 3), 4) + bit32_rshift(C2 or 0, 4)
		local C = bit32_lshift(bit32_band(C2 or 0, 15), 2) + bit32_rshift(C3 or 0, 6)
		local D = bit32_band(C3 or 0, 63)

		Length = Length + 1
		Output[Length] = Alphabet[A + 1]

		Length = Length + 1
		Output[Length] = Alphabet[B + 1]

		Length = Length + 1
		Output[Length] = C2 and Alphabet[C + 1] or 61

		Length = Length + 1
		Output[Length] = C3 and Alphabet[D + 1] or 61
	end

	local NewOutput = {}
	local NewLength = 0
	local IndexAdd4096Sub1

	for Index = 1, Length, 4096 do
		NewLength = NewLength + 1
		IndexAdd4096Sub1 = Index + 4096 - 1

		NewOutput[NewLength] = string.char(table.unpack(
			Output,
			Index,
			IndexAdd4096Sub1 > Length and Length or IndexAdd4096Sub1
		))
	end

	return table.concat(NewOutput)
end


Prompt: --[[Muffins variables]]

Response:
	local CurrKickdown = 0
	local LaunchBuild = _Tune.IdleRPM
	local Rev = script.Parent.Values.RPM

	script.Parent.DriveMode.Changed:Connect(function()
		if script.Parent.DriveMode.Value == "SportPlus" then
		   if _Tune.TCSEnabled and _IsOn then
					_TCS = false
		   end
		else
		   if _Tune.TCSEnabled and _IsOn then
					_TCS = true
		   end
		end
	end)


Prompt: ----- Water particle handler -----

Response:
function waterOutput()
	if script.Parent.ColdOn.Value == false and script.Parent.HotOn.Value == false then
		showerHead.Enabled = false
		showerSound:Stop()
	else
		showerHead.Enabled = true
		showerSound:Play()
	end
end

script.Parent.ColdOn.Changed:connect(function()
	waterOutput()
end)

script.Parent.HotOn.Changed:connect(function()
	waterOutput()
end)


Prompt: -- attempt at welding

Response:
script.Parent.Equipped:connect(function()
	local weld1 = Instance.new("WeldConstraint")
	weld1.Parent = script.Parent.Parent:FindFirstChild("RightLowerArm")
	weld1.Part0 = script.Parent.Right.BandR
	script.Parent.Right.BandR.CFrame = script.Parent.Parent:FindFirstChild("RightLowerArm").CFrame * CFrame.Angles(math.rad(-90),math.rad(0) ,0)
	weld1.Part1 = script.Parent.Parent:FindFirstChild("RightLowerArm")

	wait(.15)
	script:Destroy()
end)


Prompt: --["Walk"] = "rbxassetid://507777826",

Response:
	["Walk"] = "http://www.roblox.com/asset/?id=180435792",
	["Idle"] = "http://www.roblox.com/asset/?id=180435792",
	["SwingTool"] = "http://www.roblox.com/asset/?id=180435792"
}
local anims = {}
for animName,animId in next,preAnims do
local anim = Instance.new("Animation")
anim.AnimationId = animId
game:GetService("ContentProvider"):PreloadAsync({anim})
anims[animName] = animController:LoadAnimation(anim)
end

		if not anims["Walk"].IsPlaying then
		anims["Walk"]:Play()
		end


Prompt: -- Get a reference to the existing TextLabel

Response: local textLabel = script.Parent


Prompt: -- Join or leave a special feature such as a Dropdown or Menu

Response:
function Icon:join(parentIcon, featureName, dontUpdate)
	if self._parentIcon then
		self:leave()
	end
	local newFeatureName = (featureName and featureName:lower()) or "dropdown"
	local beforeName = "before"..featureName:sub(1,1):upper()..featureName:sub(2)
	local parentFrame = parentIcon.instances[featureName.."Frame"]
	self.presentOnTopbar = false
	self.joinedFeatureName = featureName
	self._parentIcon = parentIcon
	self.instances.iconContainer.Parent = parentFrame
	for noticeId, noticeDetail in pairs(self.notices) do
		parentIcon:notify(noticeDetail.clearNoticeEvent, noticeId)
		--parentIcon:notify(noticeDetail.completeSignal, noticeId)
	end

	if featureName == "dropdown" then
		local squareCorners = parentIcon:get("dropdownSquareCorners")
		self:set("iconSize", UDim2.new(1, 0, 0, self:get("iconSize", "deselected").Y.Offset), "deselected", beforeName)
		self:set("iconSize", UDim2.new(1, 0, 0, self:get("iconSize", "selected").Y.Offset), "selected", beforeName)
		if squareCorners then
			self:set("iconCornerRadius", UDim.new(0, 0), "deselected", beforeName)
			self:set("iconCornerRadius", UDim.new(0, 0), "selected", beforeName)
		end
		self:set("captionBlockerTransparency", 0.4, nil, beforeName)
	end
	local array = parentIcon[newFeatureName.."Icons"]
	table.insert(array, self)
	if not dontUpdate then
		if featureName == "dropdown" then
			parentIcon:_updateDropdown()
		elseif featureName == "menu" then
			parentIcon:_updateMenu()
		end
	end
	parentIcon.deselectWhenOtherIconSelected = false
	--
	IconController:_updateSelectionGroup()
	self:_decideToCallSignal("dropdown")
	self:_decideToCallSignal("menu")
	--
	return self
end

function Icon:leave()
	if self._destroyed or self.instances.iconContainer.Parent == nil then
		return
	end
	local settingsToReset = {"iconSize", "captionBlockerTransparency", "iconCornerRadius"}
	local parentIcon = self._parentIcon
	self.instances.iconContainer.Parent = topbarContainer
	self.presentOnTopbar = true
	self.joinedFeatureName = nil
	local function scanFeature(t, prevReference, updateMethod)
		for i, otherIcon in pairs(t) do
			if otherIcon == self then
				for _, settingName in pairs(settingsToReset) do
					local states = {"deselected", "selected"}
					for _, toggleState in pairs(states) do
						local currentSetting, previousSetting = self:get(settingName, toggleState, prevReference)
						if previousSetting then
							self:set(settingName, previousSetting, toggleState)
						end
					end
				end
				table.remove(t, i)
				updateMethod(parentIcon)
				if #t == 0 then
					self._parentIcon.deselectWhenOtherIconSelected = true
				end
				break
			end
		end
	end
	scanFeature(parentIcon.dropdownIcons, "beforeDropdown", parentIcon._updateDropdown)
	scanFeature(parentIcon.menuIcons, "beforeMenu", parentIcon._updateMenu)
	--
	for noticeId, noticeDetail in pairs(self.notices) do
		local parentIconNoticeDetail = parentIcon.notices[noticeId]
		if parentIconNoticeDetail then
			parentIconNoticeDetail.completeSignal:Fire()
		end
	end
	--
	self._parentIcon = nil
	--
	IconController:_updateSelectionGroup()
	self:_decideToCallSignal("dropdown")
	self:_decideToCallSignal("menu")
	--
	return self
end

function Icon:_decideToCallSignal(featureName)
	local isOpen = self[featureName.."Open"]
	local previousIsOpenName = "_previous"..string.sub(featureName, 1, 1):upper()..featureName:sub(2).."Open"
	local previousIsOpen = self[previousIsOpenName]
	local totalIcons = #self[featureName.."Icons"]
	if isOpen and totalIcons > 0 and previousIsOpen == false then
		self[previousIsOpenName] = true
		self[featureName.."Opened"]:Fire()
	elseif (not isOpen or totalIcons == 0) and previousIsOpen == true then
		self[previousIsOpenName] = false
		self[featureName.."Closed"]:Fire()
	end
end

function Icon:_ignoreClipping(featureName)
	local ignoreClipping = self:get(featureName.."IgnoreClipping")
	if self._parentIcon then
		local maid = self["_"..featureName.."ClippingMaid"]
		local frame = self.instances[featureName.."Container"]
		maid:clean()
		if ignoreClipping then
			local fakeFrame = Instance.new("Frame")
			fakeFrame.Name = frame.Name.."FakeFrame"
			fakeFrame.ClipsDescendants = true
			fakeFrame.BackgroundTransparency = 1
			fakeFrame.Size = frame.Size
			fakeFrame.Position = frame.Position
			fakeFrame.Parent = activeItems
			--
			for a,b in pairs(frame:GetChildren()) do
				b.Parent = fakeFrame
			end
			--
			local function updateSize()
				local absoluteSize = frame.AbsoluteSize
				fakeFrame.Size = UDim2.new(0, absoluteSize.X, 0, absoluteSize.Y)
			end
			maid:give(frame:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
				updateSize()
			end))
			updateSize()
			local function updatePos()
				local absolutePosition = frame.absolutePosition
				fakeFrame.Position = UDim2.new(0, absolutePosition.X, 0, absolutePosition.Y+36)
			end
			maid:give(frame:GetPropertyChangedSignal("AbsolutePosition"):Connect(function()
				updatePos()
			end))
			updatePos()
			maid:give(function()
				for a,b in pairs(fakeFrame:GetChildren()) do
					b.Parent = frame
				end
				fakeFrame.Name = "Destroying..."
				fakeFrame:Destroy()
			end)
		end
	end
	self._ignoreClippingChanged:Fire(featureName, ignoreClipping)
end


Prompt: -- Modules

Response:
local ReplicatedModuleScripts = ReplicatedStorage:FindFirstChild("ModuleScripts")
local RaceManager = require(ReplicatedModuleScripts:FindFirstChild("RaceManager"))

local displayValues = ReplicatedStorage:WaitForChild("DisplayValues")
local timer = displayValues:WaitForChild("TimeLeft")
local textLabel = script.Parent


Prompt: --//Animaton//--

Response:
local Action = Humanoid:LoadAnimation(Animation)

Action:Play()


Prompt: --// Functions

Response:
function Weld(L_53_arg1, L_54_arg2, L_55_arg3)
	local L_56_ = Instance.new("Motor6D", L_53_arg1)
	L_56_.Part0 = L_53_arg1
	L_56_.Part1 = L_54_arg2
	L_56_.Name = L_53_arg1.Name
	L_56_.C0 = L_55_arg3 or L_53_arg1.CFrame:inverse() * L_54_arg2.CFrame
	return L_56_
end


Response:
Monster:Initialize()
Monster:InitializeUnique()

while true do
	if not Monster:IsAlive() then
		if Data.IsDead == false then
			Data.IsDead = true
			Data.TimeOfDeath = tick()
			Self.Died:Fire()
		end
		if Data.IsDead == true then
			task.wait(0.5)
			for i, v in pairs(Self:GetDescendants()) do
				if v:IsA("BasePart") then
					v.Anchored = true
					TweenService:Create(v,TweenInfo.new(0.5),{Transparency = 1}):Play()
				end
			end
			Self:Destroy()
			script.Enabled = false
		end
	end

	if Monster:IsAlive() then
		Monster:Update()
	end

	wait()
end


Prompt: -- EVENTS

Response:
SLING.Parent.ChildAdded:connect(function(newChild)
	print("Child Added")
	if newChild.Name:lower() == WEP_NAME:lower() then
		for i, v in pairs(SLING:GetChildren()) do
			if v.Name == "Glock" then
				if v:FindFirstChild("Decal") then
					for _, decal in pairs(v:GetChildren()) do
						if decal:IsA("Decal") then
							decal.Transparency = 1
						end
					end
				end
				v.Transparency = 1
			end
		end
	end
end)
SLING.Parent.ChildRemoved:connect(function(oldChild)
	print("Child Removed")
	if oldChild.Name:lower() == WEP_NAME:lower() then
		for i, v in pairs(SLING:GetChildren()) do
			if v.Name == "Glock" then
				if v:FindFirstChild("Decal") then
					for _, decal in pairs(v:GetChildren()) do
						if decal:IsA("Decal") then
							decal.Transparency = 0
						end
					end
				end
				v.Transparency = 0
			end
		end
	end
end)


Prompt:
-- Formerly getCurrentCameraMode, this function resolves developer and user camera control settings to
-- decide which camera control module should be instantiated. The old method of converting redundant enum types

Response:
function CameraModule:GetCameraControlChoice()
	local player = Players.LocalPlayer

	if player then
		if self.lastInputType == Enum.UserInputType.Touch or UserInputService.TouchEnabled then
			-- Touch
			if player.DevTouchCameraMode == Enum.DevTouchCameraMovementMode.UserChoice then
				return CameraUtils.ConvertCameraModeEnumToStandard( UserGameSettings.TouchCameraMovementMode )
			else
				return CameraUtils.ConvertCameraModeEnumToStandard( player.DevTouchCameraMode )
			end
		else
			-- Computer
			if player.DevComputerCameraMode == Enum.DevComputerCameraMovementMode.UserChoice then
				local computerMovementMode = CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.ComputerCameraMovementMode)
				return CameraUtils.ConvertCameraModeEnumToStandard(computerMovementMode)
			else
				return CameraUtils.ConvertCameraModeEnumToStandard(player.DevComputerCameraMode)
			end
		end
	end
end

function CameraModule:OnCharacterAdded(char, player)
	if self.activeOcclusionModule then
		self.activeOcclusionModule:CharacterAdded(char, player)
	end
end

function CameraModule:OnCharacterRemoving(char, player)
	if self.activeOcclusionModule then
		self.activeOcclusionModule:CharacterRemoving(char, player)
	end
end

function CameraModule:OnPlayerAdded(player)
	player.CharacterAdded:Connect(function(char)
		self:OnCharacterAdded(char, player)
	end)
	player.CharacterRemoving:Connect(function(char)
		self:OnCharacterRemoving(char, player)
	end)
end

function CameraModule:OnMouseLockToggled()
	if self.activeMouseLockController then
		local mouseLocked = self.activeMouseLockController:GetIsMouseLocked()
		local mouseLockOffset = self.activeMouseLockController:GetMouseLockOffset()
		if self.activeCameraController then
			self.activeCameraController:SetIsMouseLocked(mouseLocked)
			self.activeCameraController:SetMouseLockOffset(mouseLockOffset)
		end
	end
end

local cameraModuleObject = CameraModule.new()
local cameraApi = {}

if FFlagUserRemoveTheCameraApi then
	return cameraApi
else
	return cameraModuleObject
end


Prompt: -- t: a runtime typechecker for Roblox

Response:
local t = {}

function t.type(typeName)
	return function(value)
		local valueType = type(value)
		if valueType == typeName then
			return true
		else
			return false, string.format("%s expected, got %s", typeName, valueType)
		end
	end
end

function t.typeof(typeName)
	return function(value)
		local valueType = typeof(value)
		if valueType == typeName then
			return true
		else
			return false, string.format("%s expected, got %s", typeName, valueType)
		end
	end
end


Prompt:
--This sound plays when it falls onto the ground, gets hit, or when someone touches it.
--SOOO easy.

Response:
function onTouched(hit)
	script.Parent.RAH:play()
end
script.Parent.Touched:connect(onTouched)


Prompt:
-- Hologram announcements
-- JuzzbyXfalcon
-- 23 Nov. 2013

Response:
Interval = 5
Content = script.Parent.Base.Content
Footer = script.Parent.Base.Footer
Title = script.Parent.Base.Title

CurIndex = 0
MaxIndex = 1

function Update()
	local function AnimateOut()
		Title:TweenPosition(UDim2.new(0, 0, 0, -50), "Out", "Quart", 0.5, false)
		Footer:TweenPosition(UDim2.new(0,0,1,0), "Out", "Quart", 0.5, false)
		wait(0.3)
		Content:TweenPosition(UDim2.new(1, 0, 0, 60), "Out", "Quart", 0.5, false)
	end

	local function AnimateIn()
		Title:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quart", 0.5, false)
		Footer:TweenPosition(UDim2.new(0,0,1,-25), "Out", "Quart", 0.5, false)
		Content.Position = UDim2.new(-1, 0, 0, 60)
		wait(0.3)
		Content:TweenPosition(UDim2.new(0, 0, 0, 60), "Out", "Quart", 0.5, false)
	end

	-- Actual updating process
	AnimateOut()
	if CurIndex >= MaxIndex then
		CurIndex = 1
	else
		CurIndex = CurIndex + 1
	end
	local Screens = script.Parent.Screens:GetChildren()
	wait(0.5)
	Title.Text = "  "..Screens[CurIndex].Title.Value
	Content.Content.Text = Screens[CurIndex].Content.Value
	wait(0.25)
	AnimateIn()
end

function Index()
	MaxIndex = #script.Parent.Screens:GetChildren()
end

Index()
script.Parent.Screens.DescendantAdded:connect(Index)

while true do
	wait(Interval)
	Update()
end


Prompt: -- Called when a new character model is created

Response:
local function onCharacterAdded(character)
	local humanoid = character:WaitForChild("Humanoid")
	local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
	local floorChangedSignal = humanoid:GetPropertyChangedSignal("FloorMaterial")

	-- Create fire effect to show the player if they are taking damage
	local fire = createFire()
	fire.Parent = humanoidRootPart

	-- Connects function to when the floor under the character changes
	signalBindings[character] = floorChangedSignal:Connect(function()
		-- If the character is standing on lava, add them to the list of on fire
		-- characters and turn on the fire effect. Otherwise to the opposite
		if humanoid.FloorMaterial == Enum.Material.CrackedLava then
			charactersOnFire[character] = true
			fire.Enabled = true
		else
			charactersOnFire[character] = nil
			fire.Enabled = false
		end
	end)
end


Prompt: -- Mobile Input

Response:
local function GetMobileInput(step)
	-- Declare & initialize new control inputs
	local yaw, pitch, boost = 0, 0, 0

	yaw = guiController.Yaw
	pitch = -guiController.Pitch
	boost = ((UpdateBoost(guiController.Boost, step) and 1) or 0)

	-- Throttle is off during countdown
	if countdownGui.TimerFrame.Visible then
		speeder.main.Anchored = true
		boost = -1
		yaw = 0
		pitch = 0
	else
		speeder.main.Anchored = false
	end

	-- Set engine input variables
	engine.BoostInput = boost
	engine.YawInput = yaw
	engine.PitchInput = pitch
end -- GetMobileInput()


Prompt:
--[[
	Evercyan @ March 2023
	PlayerLeveling

	Some simple functions relating to player leveling is housed here to be used
	in the ServerMain script.
]]


Prompt:
--[=[
	Creates a new promise from the given promise that will
	reject after the given `timeoutTime`

	@param timeoutTime number
	@param fromPromise Promise<T>
	@return Promise<T>
]=]

Response:
function PromiseUtils.timeout(timeoutTime, fromPromise)
	assert(type(timeoutTime) == "number", "Bad timeoutTime")
	assert(fromPromise, "Bad fromPromise")

	if not fromPromise:IsPending() then
		return fromPromise
	end

	local promise = Promise.new()

	promise:Resolve(fromPromise)

	task.delay(timeoutTime, function()
		promise:Reject()
	end)

	return promise
end

return PromiseUtils


Prompt: -- SETUP ICON TEMPLATE

Response:
local topbarPlusGui = Instance.new("ScreenGui")
topbarPlusGui.Enabled = true
topbarPlusGui.DisplayOrder = 0
topbarPlusGui.IgnoreGuiInset = true
topbarPlusGui.ResetOnSpawn = false
topbarPlusGui.Name = "TopbarPlus"

local activeItems = Instance.new("Folder")
activeItems.Name = "ActiveItems"
activeItems.Parent = topbarPlusGui

local topbarContainer = Instance.new("Frame")
topbarContainer.BackgroundTransparency = 1
topbarContainer.Name = "TopbarContainer"
topbarContainer.Position = UDim2.new(0, 0, 0, 0)
topbarContainer.Size = UDim2.new(1, 0, 0, 36)
topbarContainer.Visible = true
topbarContainer.ZIndex = 1
topbarContainer.Parent = topbarPlusGui
topbarContainer.Active = false

local iconContainer = Instance.new("Frame")
iconContainer.BackgroundTransparency = 1
iconContainer.Name = "IconContainer"
iconContainer.Position = UDim2.new(0, 104, 0, 4)
iconContainer.Visible = false
iconContainer.ZIndex = 1
iconContainer.Parent = topbarContainer
iconContainer.Active = false

local iconButton = Instance.new("TextButton")
iconButton.Name = "IconButton"
iconButton.Visible = true
iconButton.Text = ""
iconButton.ZIndex = 10--2
iconButton.BorderSizePixel = 0
iconButton.AutoButtonColor = false
iconButton.Parent = iconContainer
iconButton.Active = true
iconButton.TextTransparency = 1
iconButton.RichText = true

local iconImage = Instance.new("ImageLabel")
iconImage.BackgroundTransparency = 1
iconImage.Name = "IconImage"
iconImage.AnchorPoint = Vector2.new(0, 0.5)
iconImage.Visible = true
iconImage.ZIndex = 11--3
iconImage.ScaleType = Enum.ScaleType.Fit
iconImage.Parent = iconButton
iconImage.Active = false

local iconLabel = Instance.new("TextLabel")
iconLabel.BackgroundTransparency = 1
iconLabel.Name = "IconLabel"
iconLabel.AnchorPoint = Vector2.new(0, 0.5)
iconLabel.Position = UDim2.new(0.5, 0, 0.5, 0)
iconLabel.Text = ""
iconLabel.RichText = true
iconLabel.TextScaled = false
iconLabel.ClipsDescendants = true
iconLabel.ZIndex = 11--3
iconLabel.Parent = iconButton
iconLabel.Active = false

local iconGradient = Instance.new("UIGradient")
iconGradient.Name = "IconGradient"
iconGradient.Enabled = true
iconGradient.Parent = iconButton

local iconCorner = Instance.new("UICorner")
iconCorner.Name = "IconCorner"
iconCorner.Parent = iconButton

local iconOverlay = Instance.new("Frame")
iconOverlay.Name = "IconOverlay"
iconOverlay.BackgroundTransparency = 1
iconOverlay.Position = iconButton.Position
iconOverlay.Size = UDim2.new(1, 0, 1, 0)
iconOverlay.Visible = true
iconOverlay.ZIndex = iconButton.ZIndex + 1
iconOverlay.BorderSizePixel = 0
iconOverlay.Parent = iconContainer
iconOverlay.Active = false

local iconOverlayCorner = iconCorner:Clone()
iconOverlayCorner.Name = "IconOverlayCorner"
iconOverlayCorner.Parent = iconOverlay


Prompt: -- Functional Services

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


Prompt: --[[ Functions of BaseCamera that are overridden by OrbitalCamera ]]

Response:
--
function OrbitalCamera:GetCameraToSubjectDistance()
	return self.curDistance
end

function OrbitalCamera:SetCameraToSubjectDistance(desiredSubjectDistance)
	print("OrbitalCamera SetCameraToSubjectDistance ",desiredSubjectDistance)
	local player = PlayersService.LocalPlayer
	if player then
		self.currentSubjectDistance = math.clamp(desiredSubjectDistance, self.minDistance, self.maxDistance)

		-- OrbitalCamera is not allowed to go into the first-person range
		self.currentSubjectDistance = math.max(self.currentSubjectDistance, self.FIRST_PERSON_DISTANCE_THRESHOLD)
	end
	self.inFirstPerson = false
	self:UpdateMouseBehavior()
	return self.currentSubjectDistance
end

function OrbitalCamera:CalculateNewLookVector(suppliedLookVector, xyRotateVector)
	local currLookVector = suppliedLookVector or self:GetCameraLookVector()
	local currPitchAngle = math.asin(currLookVector.y)
	local yTheta = math.clamp(xyRotateVector.y, currPitchAngle - math.rad(MAX_ALLOWED_ELEVATION_DEG), currPitchAngle - math.rad(MIN_ALLOWED_ELEVATION_DEG))
	local constrainedRotateInput = Vector2.new(xyRotateVector.x, yTheta)
	local startCFrame = CFrame.new(ZERO_VECTOR3, currLookVector)
	local newLookVector = (CFrame.Angles(0, -constrainedRotateInput.x, 0) * startCFrame * CFrame.Angles(-constrainedRotateInput.y,0,0)).lookVector
	return newLookVector
end

function OrbitalCamera:GetGamepadPan(name, state, input)
	if input.UserInputType == self.activeGamepad and input.KeyCode == Enum.KeyCode.Thumbstick2 then
		if self.r3ButtonDown or self.l3ButtonDown then
		-- R3 or L3 Thumbstick is depressed, right stick controls dolly in/out
			if (input.Position.Y > THUMBSTICK_DEADZONE) then
				self.gamepadDollySpeedMultiplier = 0.96
			elseif (input.Position.Y < -THUMBSTICK_DEADZONE) then
				self.gamepadDollySpeedMultiplier = 1.04
			else
				self.gamepadDollySpeedMultiplier = 1.00
			end
		else
			if state == Enum.UserInputState.Cancel then
				self.gamepadPanningCamera = ZERO_VECTOR2
				return
			end

			local inputVector = Vector2.new(input.Position.X, -input.Position.Y)
			if inputVector.magnitude > THUMBSTICK_DEADZONE then
				self.gamepadPanningCamera = Vector2.new(input.Position.X, -input.Position.Y)
			else
				self.gamepadPanningCamera = ZERO_VECTOR2
			end
		end
		return Enum.ContextActionResult.Sink
	end
	return Enum.ContextActionResult.Pass
end

function OrbitalCamera:DoGamepadZoom(name, state, input)
	if input.UserInputType == self.activeGamepad and (input.KeyCode == Enum.KeyCode.ButtonR3 or input.KeyCode == Enum.KeyCode.ButtonL3) then
		if (state == Enum.UserInputState.Begin) then
			self.r3ButtonDown = input.KeyCode == Enum.KeyCode.ButtonR3
			self.l3ButtonDown = input.KeyCode == Enum.KeyCode.ButtonL3
		elseif (state == Enum.UserInputState.End) then
			if (input.KeyCode == Enum.KeyCode.ButtonR3) then
				self.r3ButtonDown = false
			elseif (input.KeyCode == Enum.KeyCode.ButtonL3) then
				self.l3ButtonDown = false
			end
			if (not self.r3ButtonDown) and (not self.l3ButtonDown) then
				self.gamepadDollySpeedMultiplier = 1.00
			end
		end
		return Enum.ContextActionResult.Sink
	end
	return Enum.ContextActionResult.Pass
end

function OrbitalCamera:BindGamepadInputActions()
	self:BindAction("OrbitalCamGamepadPan", function(name, state, input) return self:GetGamepadPan(name, state, input) end,
		false, Enum.KeyCode.Thumbstick2)
	self:BindAction("OrbitalCamGamepadZoom", function(name, state, input) return self:DoGamepadZoom(name, state, input) end,
		false, Enum.KeyCode.ButtonR3, Enum.KeyCode.ButtonL3)
end