Prompt: --[[Engine]]

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

	if _Tune.Aspiration == "Single" 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
	--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
		_Boost = _Boost + ((((((_HP*(_GThrot*1.2)/_Tune.Horsepower)/8)-(((_Boost/TPsi*(TPsi/15)))))*((36/_Tune.TurboSize)*2))/TPsi)*15)
		if _Boost < 0.05 then _Boost = 0.05 elseif _Boost > 2 then _Boost = 2 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

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

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

			_TCSActive = false
			_ABSActive = false
			--Output
			if _PBrake and (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

						--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))*_OutTorque*(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: -- Settings and GameSettings are read only

Response:
local Settings = UserSettings()
local GameSettings = Settings.GameSettings


Prompt: --TABS

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

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


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

Response:
client = nil;
service = nil;
return function(p1)
	local v1 = p1.Color or Color3.new(1, 1, 1);
	local v2 = {
		Name = "ColorPicker",
		Title = p1.Title and "Color Picker",
		Icon = client.MatIcons.Create,
		Size = { 250, 230 },
		MinSize = { 150, 230 },
		MaxSize = { math.huge, 230 },
		SizeLocked = true
	};
	local u1 = nil;
	local u2 = v1;
	function v2.OnClose()
		if not u1 then
			u1 = u2;
		end;
	end;
	local v3 = client.UI.Make("Window", v2);
	local v4 = {
		Text = "Accept",
		Size = UDim2.new(1, -10, 0, 20),
		Position = UDim2.new(0, 5, 0, 175)
	};
	local v5 = {};
	function v5.MouseButton1Down()
		u1 = u2;
		v3:Close();
	end;
	v4.Events = v5;
	local v6 = v3:Add("TextButton", v4);
	local u3 = v1.r;
	local u4 = v1.g;
	local u5 = v1.b;
	local u6 = v3:Add("Frame", {
		Size = UDim2.new(1, -10, 0, 20),
		Position = UDim2.new(0, 5, 0, 150),
		BackgroundColor3 = u2
	});
	local u7 = nil;
	local u8 = nil;
	local u9 = nil;
	local u10 = nil;
	local u11 = nil;
	local u12 = nil;
	local v7 = {
		Text = "Red: ",
		BoxText = u3 * 255,
		BackgroundTransparency = 1,
		TextSize = 20,
		Size = UDim2.new(1, -20, 0, 20),
		Position = UDim2.new(0, 10, 0, 0)
	};
	local function u13()
		u2 = Color3.new(u3, u4, u5);
		u6.BackgroundColor3 = u2;
		u7:SetValue(math.floor(u3 * 255));
		u8.SliderBar.ImageColor3 = Color3.new(0, 0, 0):lerp(Color3.new(1, 0, 0), u3);
		u8:SetValue(u3);
		u9:SetValue(math.floor(u4 * 255));
		u10.SliderBar.ImageColor3 = Color3.new(0, 0, 0):lerp(Color3.new(0, 1, 0), u4);
		u10:SetValue(u4);
		u11:SetValue(math.floor(u5 * 255));
		u12.SliderBar.ImageColor3 = Color3.new(0, 0, 0):lerp(Color3.new(0, 0, 1), u5);
		u12:SetValue(u5);
	end;
	function v7.TextChanged(p2, p3, p4)
		if tonumber(p2) then
			local v8 = nil;
			p2 = math.floor(tonumber(p2));
			if p2 < 0 then
				v8 = true;
				p2 = 0;
			elseif p2 > 255 then
				v8 = true;
				p2 = 255;
			end;
			u3 = p2 / 255;
			u13();
			if v8 then
				return p2;
			end;
		elseif p3 then
			return u3 * 255;
		end;
	end;
	u7 = v3:Add("StringEntry", v7);
	u9 = v3:Add("StringEntry", {
		Text = "Green: ",
		BoxText = u4 * 255,
		BackgroundTransparency = 1,
		TextSize = 20,
		Size = UDim2.new(1, -20, 0, 20),
		Position = UDim2.new(0, 10, 0, 50),
		TextChanged = function(p5, p6, p7)
			if tonumber(p5) then
				local v9 = false;
				p5 = math.floor(tonumber(p5));
				if p5 < 0 then
					v9 = true;
					p5 = 0;
				elseif p5 > 255 then
					v9 = true;
					p5 = 255;
				end;
				u4 = p5 / 255;
				u13();
				if v9 then
					return p5;
				end;
			elseif p6 then
				return u4 * 255;
			end;
		end
	});
	u11 = v3:Add("StringEntry", {
		Text = "Blue: ",
		BoxText = u5 * 255,
		BackgroundTransparency = 1,
		TextSize = 20,
		Size = UDim2.new(1, -20, 0, 20),
		Position = UDim2.new(0, 10, 0, 100),
		TextChanged = function(p8, p9, p10)
			if tonumber(p8) then
				local v10 = false;
				p8 = math.floor(tonumber(p8));
				if p8 < 0 then
					v10 = true;
					p8 = 0;
				elseif p8 > 255 then
					v10 = true;
					p8 = 255;
				end;
				u5 = p8 / 255;
				u13();
				if v10 then
					return p8;
				end;
			elseif p9 then
				return u5 * 255;
			end;
		end
	});
	u8 = v3:Add("Slider", {
		Percent = u2.r,
		Size = UDim2.new(1, -20, 0, 20),
		Position = UDim2.new(0, 10, 0, 25),
		OnSlide = function(p11)
			u3 = p11;
			u13();
		end
	});
	u10 = v3:Add("Slider", {
		Percent = u2.r,
		Size = UDim2.new(1, -20, 0, 20),
		Position = UDim2.new(0, 10, 0, 75),
		OnSlide = function(p12)
			u4 = p12;
			u13();
		end
	});
	u12 = v3:Add("Slider", {
		Percent = u2.r,
		Size = UDim2.new(1, -20, 0, 20),
		Position = UDim2.new(0, 10, 0, 125),
		OnSlide = function(p13)
			u5 = p13;
			u13();
		end
	});
	u13();
	local l__gTable__11 = v3.gTable;
	v3:ResizeCanvas();
	v3:Ready();
	while true do
		wait();
		if u1 then
			break;
		end;
		if not l__gTable__11.Active then
			break;
		end;
	end;
	return nil;
end;


Prompt:
-- DynDS 1.1.1
--------------------------------------------------------------------------------------------------

Response:
local P = script.Parent
local body = P.Parent
local car = body.Parent

for i,v in pairs(script:GetChildren()) do
	if (v:FindFirstChild("Car")) and (v.Car:IsA("ObjectValue")) then
		v.Car.Value = car
	end
end

P.ChildAdded:connect(function(child)
	if child:IsA("Weld") and (child.Part1) and (child.Part1.Name == "HumanoidRootPart") then
		local player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
		if (player) then
			for i,v in pairs(script:GetChildren()) do
				v:Clone().Parent = player.PlayerGui
			end
		end
	end
end)


Prompt:
--fakehead:Destroy()
--tilt:Destroy()

Response:
if arms ~= nil and chr.Torso ~= nil then
if not chr.Torso:FindFirstChild("Left Shoulder") then
	local Motor = Instance.new("Motor6D", torso)
	Motor.Name = "Left Shoulder"
	Motor.Part0, Motor.Part1 = torso, torso.Parent["Left Arm"]
	Motor.MaxVelocity = 0.1
	Motor.C0 = CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
	Motor.C1 = CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
end
if not chr.Torso:FindFirstChild("Right Shoulder") then
	local Motor = Instance.new("Motor6D", torso)
	Motor.Name = "Right Shoulder"
	Motor.Part0, Motor.Part1 = torso, torso.Parent["Right Arm"]
	Motor.MaxVelocity = 0.1
	Motor.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
	Motor.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
end

local sh = {chr.Torso:FindFirstChild("Left Shoulder"), chr.Torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = arms[1]
sh[2].Part1 = arms[2]
if chr.HumanoidRootPart:FindFirstChild("Mtweld") then chr.HumanoidRootPart:FindFirstChild("Mtweld"):Destroy() end
for _,Child in pairs(arms[2]:GetChildren()) do
	if Child:IsA("Texture") or Child:IsA("Decal") then
		Child.Transparency = 0
	end
end
if hrp:FindFirstChild("RootJoint") then
	hrp.RootJoint.Part1 = torso
else
	local RootJoint = Instance.new("Motor6D",hrp)
	RootJoint.MaxVelocity, RootJoint.Name = 0.1, "RootJoint"
	RootJoint.Part0, RootJoint.Part1 = hrp,torso
end
neck.C0=OriginalC0
end
else
print("sh")
end
else
print("arms")
end
Tool.Hig.Value = 0
TweenService:Create(torso.Parent.Humanoid,TweenInfo.new(0.1),
{CameraOffset = torso.Parent.Humanoid.CameraOffset + (Vector3.new(0,0,0) - torso.Parent.Humanoid.CameraOffset)}):Play()
script.Disabled = true
script.Disabled = false
wait()
script.Speed.Value = 16
chr.Humanoid.WalkSpeed = 16
end
Tool.Equipped:connect(Equip)
Tool.Unequipped:connect(Unequip)


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

function Promise.prototype:andThen(successHandler, failureHandler)
	assert(
		successHandler == nil or type(successHandler) == "function",
		string.format(ERROR_NON_FUNCTION, "Promise:andThen")
	)
	assert(
		failureHandler == nil or type(failureHandler) == "function",
		string.format(ERROR_NON_FUNCTION, "Promise:andThen")
	)

	return self:_andThen(debug.traceback(nil, 2), successHandler, failureHandler)
end


Prompt:
--[[--------------------------------------------------------------------
-- nodes for block list (list of active blocks)
-- struct BlockCnt:
--   previous  -- chain (table: BlockCnt)
--   breaklist  -- list of jumps out of this loop
--   nactvar  -- # active local variables outside the breakable structure
--   upval  -- true if some variable in the block is an upvalue (boolean)
--   isbreakable  -- true if 'block' is a loop (boolean)
----------------------------------------------------------------------]]


Prompt: --------------------[ FIRING FUNCTIONS ]----------------------------------------------

Response:
function Fire_Gun()
	local FireSound = Handle:FindFirstChild("FireSound")
	local FlashGui = Main:FindFirstChild("FlashGui")
	local FlashFX = Main:FindFirstChild("FlashFX")

	if FireSound then FireSound:Play() end

	local MockSpread = (
		((not Aimed) and CurrentSpread <= S.Spread.Max and Idleing)
		and CurrentSpread * S.Spread.Multiplier or CurrentSpread
	)
	CurrentSpread = (MockSpread >= S.Spread.Max and S.Spread.Max or MockSpread)

	----------------------------------------------------------------------------------
	for _ = 1, (S.GunType.Shot and S.ShotAmount or 1) do
		local BSpread = CFANG(
			RAD(RAND(-CurrentSpread, CurrentSpread) / 20),
			RAD(RAND(-CurrentSpread, CurrentSpread) / 20),
			RAD(RAND(-CurrentSpread, CurrentSpread) / 20)
		)
		local OriginCF = (Aimed and (S.GuiScope and Head.CFrame or Handle.CFrame) or Head.CFrame)
		local OriginPos = Main.CFrame.p
		local Direction = (CF(OriginCF.p, OriginCF.p + OriginCF.lookVector) * BSpread).lookVector

		if S.InstantHit then
			local HitObj, HitPos = AdvRayCast(Main.CFrame.p, Direction, S.BulletRange)
			local HitHumanoid = nil
			if HitObj then
				if S.GunType.Explosive then
					if S.ExplosionSound ~= "" then
						local SoundPart = Instance.new("Part")
						SoundPart.Transparency = 1
						SoundPart.Anchored = true
						SoundPart.CanCollide = false
						SoundPart.CFrame = CFrame.new(HitPos)
						SoundPart.Parent = game.Workspace

						local Sound = Instance.new("Sound")
						Sound.Pitch = S.ExplosionSoundPitch
						Sound.SoundId = S.ExplosionSound
						Sound.Volume = S.ExplosionSoundVolume
						Sound.Parent = SoundPart
						Sound:Play()

						delay(1 / 20, function()
							SoundPart:Destroy()
						end)
					end
					CreateBulletHole(HitPos, HitObj)
					CreateShockwave(HitPos, S.ExplosionRadius)
					local E = Instance.new("Explosion")
					E.BlastPressure = S.ExplosionPressure
					E.BlastRadius = S.ExplosionRadius
					E.DestroyJointRadiusPercent = (S.RangeBasedDamage and 0 or 1)
					E.ExplosionType = S.ExplosionType
					E.Position = HitPos
					E.Hit:connect(function(HObj, HDist)
						if HObj.Name == "Torso" and (not HObj:IsDescendantOf(Character)) then
							if S.RangeBasedDamage then
								local Dir = (HObj.Position - HitPos).unit
								local H, P = AdvRayCast(HitPos - Dir, Dir, 999)
								local RayHitHuman = H:IsDescendantOf(HObj.Parent)
								if (S.RayCastExplosions and RayHitHuman) or (not S.RayCastExplosions) then
									local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid")
									if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then
										local DistFactor = HDist / S.ExplosionRadius
										local DistInvert = math.max(1 - DistFactor,0)
										local NewDamage = DistInvert * S.Damage

										local CreatorTag = Instance.new("ObjectValue")
										CreatorTag.Value = Player
										CreatorTag.Name = "creator"
										CreatorTag.Parent = HitHumanoid
										HitHumanoid:TakeDamage(NewDamage)
										MarkHit()
									end
								end
							else
								local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid")
								if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then
									local CreatorTag = Instance.new("ObjectValue")
									CreatorTag.Value = Player
									CreatorTag.Name = "creator"
									CreatorTag.Parent = HitHumanoid
									MarkHit()
								end
							end
						end
					end)
					E.Parent = game.Workspace
				else
					HitHumanoid = Damage(HitObj, HitPos)
				end
			end
			local FinalHitPos = HitPos
			if S.Penetration > 0 and (not S.GunType.Explosive) then
				FinalHitPos = PenetrateWall(HitPos, Direction, HitHumanoid, OriginPos)
			end
			if S.BulletTrail and S.TrailTransparency ~= 1 then
				local Trail = Instance.new("Part")
				Trail.BrickColor = S.TrailColor
				Trail.Transparency = S.TrailTransparency
				Trail.Anchored = true
				Trail.CanCollide = false
				Trail.Size = VEC3(1, 1, 1)
				local Mesh = Instance.new("BlockMesh")
				Mesh.Offset = VEC3(0, 0, -(FinalHitPos - OriginPos).magnitude / 2)
				Mesh.Scale = VEC3(S.TrailThickness, S.TrailThickness, (FinalHitPos - OriginPos).magnitude)
				Mesh.Parent = Trail
				Trail.Parent = Gun_Ignore
				Trail.CFrame = CF(OriginPos, FinalHitPos)
				delay(S.TrailVisibleTime, function()
					if S.TrailDisappearTime > 0 then
						local X = 0
						while true do
							if X == 90 then break end
							if (not Selected) then break end
							local NewX = X + (1.5 / S.TrailDisappearTime)
							X = (NewX > 90 and 90 or NewX)
							local Alpha = X / 90
							Trail.Transparency = NumLerp(S.TrailTransparency, 1, Alpha)
							RS:wait()
						end
						Trail:Destroy()
					else
						Trail:Destroy()
					end
				end)
			end
		else
			local Bullet = CreateBullet(Direction)
			local LastPos = Main.CFrame.p
			local TotalDistTraveled = 0
			local HitHumanoid = nil
			spawn(function()
				while true do
					RS:wait()
					if TotalDistTraveled >= S.BulletRange then
						Bullet:Destroy()
						break
					end
					local DistTraveled = (Bullet.Position - LastPos).magnitude
					local HitObj, HitPos = AdvRayCast(LastPos, (Bullet.Position - LastPos).unit, DistTraveled)
					if HitObj then
						if S.GunType.Explosive then
							if S.ExplosionSound ~= "" then
								local Sound = Instance.new("Sound")
								Sound.Pitch = S.ExplosionSoundPitch
								Sound.SoundId = S.ExplosionSound
								Sound.Volume = S.ExplosionSoundVolume
								Sound.Parent = Bullet
								Sound:Play()
							end
							CreateBulletHole(HitPos, HitObj)
							CreateShockwave(HitPos, S.ExplosionRadius)
							local E = Instance.new("Explosion")
							E.BlastPressure = S.ExplosionPressure
							E.BlastRadius = S.ExplosionRadius
							E.DestroyJointRadiusPercent = (S.RangeBasedDamage and 0 or 1)
							E.ExplosionType = S.ExplosionType
							E.Position = HitPos
							E.Hit:connect(function(HObj, HDist)
								if HObj.Name == "Torso" and (not HObj:IsDescendantOf(Character)) then
									if S.RangeBasedDamage then
										local Dir = (HObj.Position - HitPos).unit
										local H, P = AdvRayCast(HitPos - Dir, Dir, 999)
										local RayHitHuman = H:IsDescendantOf(HObj.Parent)
										if (S.RayCastExplosions and RayHitHuman) or (not S.RayCastExplosions) then
											local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid")
											if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then
												local DistFactor = HDist / S.ExplosionRadius
												local DistInvert = math.max(1 - DistFactor,0)
												local NewDamage = DistInvert * S.Damage

												local CreatorTag = Instance.new("ObjectValue")
												CreatorTag.Value = Player
												CreatorTag.Name = "creator"
												CreatorTag.Parent = HitHumanoid
												HitHumanoid:TakeDamage(NewDamage)
												MarkHit()
											end
										end
									else
										local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid")
										if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then
											local CreatorTag = Instance.new("ObjectValue")
											CreatorTag.Value = Player
											CreatorTag.Name = "creator"
											CreatorTag.Parent = HitHumanoid
											MarkHit()
										end
									end
								end
							end)
							E.Parent = game.Workspace
						else
							HitHumanoid = Damage(HitObj, HitPos)
						end
						if S.Penetration > 0 and (not S.GunType.Explosive) then
							PenetrateWall(HitPos, (Bullet.Position - LastPos).unit, HitHumanoid, OriginPos, Bullet)
						else
							Bullet:Destroy()
						end
						break
					else
						LastPos = Bullet.Position
						TotalDistTraveled = TotalDistTraveled + DistTraveled
					end
				end
			end)

			if S.BulletTrail and S.TrailTransparency ~= 1 then
				spawn(function()
					local LastPos2 = nil
					while true do
						if LastPos2 then
							if (not Bullet:IsDescendantOf(game)) then break end
							Bullet.CFrame = CFrame.new(Bullet.CFrame.p, Bullet.CFrame.p + Bullet.Velocity)
							local Trail = Instance.new("Part")
							Trail.BrickColor = S.TrailColor
							Trail.Transparency = S.TrailTransparency
							Trail.Anchored = true
							Trail.CanCollide = false
							Trail.Size = VEC3(1, 1, 1)
							local Mesh = Instance.new("BlockMesh")
							Mesh.Offset = VEC3(0, 0, -(Bullet.Position - LastPos2).magnitude / 2)
							Mesh.Scale = VEC3(S.TrailThickness, S.TrailThickness, (Bullet.Position - LastPos2).magnitude)
							Mesh.Parent = Trail
							Trail.Parent = Gun_Ignore
							Trail.CFrame = CF(LastPos2, Bullet.Position)
							delay(S.TrailVisibleTime, function()
								if S.TrailDisappearTime > 0 then
									local X = 0
									while true do
										if X == 90 then break end
										if (not Selected) then break end
										local NewX = X + (1.5 / S.TrailDisappearTime)
										X = (NewX > 90 and 90 or NewX)
										local Alpha = X / 90
										Trail.Transparency = NumLerp(S.TrailTransparency, 1, Alpha)
										RS:wait()
									end
									Trail:Destroy()
								else
									Trail:Destroy()
								end
							end)
							LastPos2 = Bullet.Position
						else
							LastPos2 = Main.CFrame.p
						end
						RS:wait()
					end
				end)
			end
		end
	end

	----------------------------------------------------------------------------------

	local RecoilX = RAD(CurrentRecoil * RAND(1, 1.5, 0.1)) * StanceSway
	local RecoilY = RAD(CurrentRecoil * RAND(-2, 2, 0.1)) * StanceSway
	RotCamera(RecoilX, RecoilY, true, 0.06)
	delay(0.05, function()
		RotCamera(-RecoilX / 5, -RecoilY / 5, true, 0.1)
	end)
	if Idleing and (not Walking) and (not Aimed) then
		local SpreadScale = (CurrentSpread / S.Spread.Max) * 50
		Gui_Clone.CrossHair.Box:TweenSizeAndPosition(
			UDim2.new(0, 70 + 2 * SpreadScale, 0, 70 + 2 * SpreadScale),
			UDim2.new(0, -35 - SpreadScale, 0, -35 - SpreadScale),
			"Out", "Linear", 0.1, true
		)
	end

	local KickSide = (
		(
			{
				CurrentRecoil * (RAND(1, 5, 1) / 150);
				CurrentRecoil * (RAND(1, 5, 1) / -150)
			}
		)[math.random(1, 2)]
	) * StanceSway
	local KickBack = CurrentRecoil * StanceSway * 0.3
	local KickUp = RAD(90 + (CurrentRecoil * RAND(1.3, 1.4, 0.01) * StanceSway))
	TweenJoint(AnimWeld, CF(KickSide, 1, -KickBack), CFANG(KickUp - RAD(90), 0, 0), Linear, 1 / 12)

	if FlashFX then FlashFX.Enabled = true end
	if FlashGui then
		FlashGui.Enabled = true
		FlashGui.Label.Rotation = RAND(0, 360)
	end

	delay(1 / 30, function()
		if Idleing and (not Walking) and (not Aimed) then
			Gui_Clone.CrossHair.Box:TweenSizeAndPosition(
				UDim2.new(0, 70, 0, 70),
				UDim2.new(0, -35, 0, -35),
				"Out", "Linear", S.AimSpeed, (not Aimed)
			)
		end
		if (not Aiming) and (not RunTween) then
			TweenJoint(AnimWeld, CF(0, 1, 0), CF(), Linear, 0.15)
		end
		if FlashFX then FlashFX.Enabled = false end
		if FlashGui then FlashGui.Enabled = false end
	end)
end

function MarkHit()
	spawn(function()
		if Gui_Clone:IsDescendantOf(game) then
			Gui_Clone.HitMarker.Visible = true
			local StartMark = tick()
			LastMark = StartMark
			wait(0.5)
			if LastMark <= StartMark then
				Gui_Clone.HitMarker.Visible = false
			end
		end
	end)
end


Prompt: --// Tables

Response:
local L_98_ = {

	"285421759";
	"151130102";
	"151130171";
	"285421804";
	"287769483";
	"287769415";
	"285421687";
	"287769261";
	"287772525";
	"287772445";
	"287772351";
	"285421819";
	"287772163";

}

local L_99_ = {

	"2282590559";
	"2282583154";
	"2282584222";
	"2282584708";
	"2282585118";
	"2282586860";
	"2282587182";
	"2282587628";
	"2282588117";
	"2282588433";
	"2282576973";
	"2282577954";
	"2282578595";
	"2282579272";
	"2282579760";
	"2282580279";
	"2282580551";
	"2282580935";
	"2282582377";
	"2282582717";
	"2282449653";

}

local L_100_ = {

	"2297264589";
	"2297264920";
	"2297265171";
	"2297265394";
	"2297266410";
	"2297266774";
	"2297267106";
	"2297267463";
	"2297267748";
	"2297268261";
	"2297268486";
	"2297268707";
	"2297268894";
	"2297269092";
	"2297269542";
	"2297269946";
	"2297270243";
	"2297270591";
	"2297270984";
	"2297271381";
	"2297271626";
	"2297272112";
	"2297272424";

}

local L_101_ = workspace:FindFirstChild("BulletModel: " .. L_2_.Name) or Instance.new("Folder", workspace)
L_101_.Name = "BulletModel: " .. L_2_.Name

local L_102_

local L_103_ = L_24_.Ammo
local L_104_ = L_24_.StoredAmmo * L_24_.MagCount

local L_105_ = L_24_.ExplosiveAmmo

IgnoreList = {
	L_3_,
	L_101_,
	L_5_
}


Prompt: -- declarations

Response:
local sDied = newSound("rbxasset://sounds/uuhhh.wav")
local sFallingDown = newSound("rbxasset://sounds/splat.wav")
local sFreeFalling = newSound("rbxasset://sounds/swoosh.wav")
local sGettingUp = newSound("rbxasset://sounds/hit.wav")
local sJumping = newSound("rbxasset://sounds/button.wav")
local sRunning = newSound("rbxasset://sounds/bfsl-minifigfoots1.mp3")
sRunning.Looped = true

local Figure = script.Parent
local Head = waitForChild(Figure, "Head")
local Humanoid = waitForChild(Figure, "Humanoid")


Prompt: --Loop For Making Rays For The Bullet's Trajectory

Response:
for i = 1, 30 do
	local thisOffset = offset + Vector3.new(0, yOffset*(i-1), 0)
	local travelRay = Ray.new(point1,thisOffset)
	local hit, position = workspace:FindPartOnRay(travelRay, parts.Parent)

	local distance 		= (position - point1).magnitude
	round.Size				= Vector3.new(0.6, distance, 0.6)
	round.CFrame			= CFrame.new(position, point1)
								* CFrame.new(0, 0, -distance/2)
								* CFrame.Angles(math.rad(90),0,0)
	round.Parent			= workspace
	point1					= point1 + thisOffset

	if hit then
  round:remove()
  local e = Instance.new("Explosion")
  e.BlastRadius = 6
  e.BlastPressure = 1600
  e.Position = position
  e.Parent = workspace
  e.ExplosionType = Enum.ExplosionType.NoCraters
  e.DestroyJointRadiusPercent = 1

  local players = game.Players:getChildren()
  for i = 1, #players do

   if players[i].TeamColor ~= script.Parent.Parent.Tank.Value then --if he's not an ally
    character = players[i].Character
    if character then
     torso = character:findFirstChild'Torso'
     if torso then

      torsoPos = torso.Position
      origPos = round.Position

      local ray = Ray.new(origPos, torsoPos-origPos)
      local hit, position = game.Workspace:FindPartOnRayWithIgnoreList(ray,ignoreList)
      if hit then
       if hit.Parent == character then
        human = hit.Parent:findFirstChild("Humanoid")
        if human then
         distance = (position-origPos).magnitude


Prompt: -- Activation]:

Response:
if TurnCharacterToMouse == true then
	MseGuide = true
	HeadHorFactor = 0
	BodyHorFactor = 0
end

game:GetService("RunService").RenderStepped:Connect(function()
	local CamCF = Cam.CoordinateFrame
	if ((IsR6 and Body["Torso"]) or Body["UpperTorso"])~=nil and Body["Head"]~=nil then	--[Check for the Torso and Head...]
		local TrsoLV = Trso.CFrame.lookVector
		local HdPos = Head.CFrame.p
		if IsR6 and Neck or Neck and Waist then	--[Make sure the Neck still exists.]
			if Cam.CameraSubject:IsDescendantOf(Body) or Cam.CameraSubject:IsDescendantOf(Plr) then
				local Dist = nil;
				local Diff = nil;
				if not MseGuide then	--[If not tracking the Mouse then get the Camera.]
					Dist = (Head.CFrame.p-CamCF.p).magnitude
					Diff = Head.CFrame.Y-CamCF.Y
					if not IsR6 then	--[R6 and R15 Neck rotation C0s are different; R15: X axis inverted and Z is now the Y.]
						Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aSin(Diff/Dist)*HeadVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
						Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang((aSin(Diff/Dist)*BodyVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
					else	--[R15s actually have the properly oriented Neck CFrame.]
						Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aSin(Diff/Dist)*HeadVertFactor), 0, -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor),UpdateSpeed/2)
					end
				else
					local Point = Mouse.Hit.p
					Dist = (Head.CFrame.p-Point).magnitude
					Diff = Head.CFrame.Y-Point.Y
					if not IsR6 then
						Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aTan(Diff/Dist)*HeadVertFactor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
						Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang(-(aTan(Diff/Dist)*BodyVertFactor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
					else
						Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aTan(Diff/Dist)*HeadVertFactor), 0, (((HdPos-Point).Unit):Cross(TrsoLV)).Y*HeadHorFactor), UpdateSpeed/2)
					end
				end
			end
		end
	end
	if TurnCharacterToMouse == true then
		Hum.AutoRotate = false
		Core.CFrame = Core.CFrame:lerp(CFrame.new(Core.Position, Vector3.new(Mouse.Hit.p.x, Core.Position.Y, Mouse.Hit.p.z)), UpdateSpeed / 2)
	else
		Hum.AutoRotate = true
	end
end)


Prompt: -- скрипт отслеживания построек

Response:
local Players = game:GetService("Players")
local ServerScriptService = game:GetService("ServerScriptService")	-- подключение серверных скриптов
local DataStore2 = require(ServerScriptService.DataStore2)			-- подключение модуля DataStore2

BaseName = game.Workspace.BaseName.Value	-- чтение имени базы данных
local GWP = game.Workspace.WorldPlayers			--
local player = Players:FindFirstChild(script.Parent.Parent.Name)

me = script.Parent


Prompt: -- Set both mobile touch gui and control

Response:
function GuiController:setMobileTouchGuiEnabled(mobileTouchGuiEnabled: boolean)
	self.UserInputService.ModalEnabled = not mobileTouchGuiEnabled

	-- Update player controls since ModalEnabled doesn't update player control
	self:setPlayerControlsEnabled(mobileTouchGuiEnabled)
end


Response:
local CFrameUtility = {}

function CFrameUtility.Encode( cframe: CFrame ): string?
    return HttpService:JSONEncode( cframe:GetComponents() )
end

function CFrameUtility.Decode( jsonTable: string ): CFrame?
    return CFrame.new( unpack(HttpService:JSONDecode(jsonTable)) )
end

return CFrameUtility


Prompt: --[Pre-Funcs]:

Response:
local Ang = CFrame.Angles	--[Storing these as variables so I dont have to type them out.]
local aSin = math.asin
local aTan = math.atan


Prompt: --		print("Loading anims " .. name)

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


Prompt: -- / Configuration / --

Response: local Configuration = script.Configuration


Prompt: -- Get references to the DockShelf and its children

Response:
local fldr = script.Parent.Parent
local Pop = script.Parent.Parent.Parent.Popular
local Trcks = script.Parent.Parent.Parent.Tracks
local Serch = script.Parent.Parent.Parent.SearchTracks
local SerchVal = script.Parent.Parent.Parent.SearchActive
local btn = script.Parent

local function toggleWindow()
	if SerchVal.Value == true then
		-- Close the window by tweening back to the button position and size
		fldr:TweenSizeAndPosition(
			UDim2.new(1, 0, 0.022, 0),
			UDim2.new(0.0,0,0.978,0),
			'Out',
			'Quad',
			0.4,
			false,
			function()
			fldr.Visible = false
			Pop.Visible = false
			Trcks.Visible = false
			Serch.Visible = true
			end
		)
	elseif SerchVal.Value == false then
		fldr:TweenSizeAndPosition(
			UDim2.new(1, 0, 0.022, 0),
			UDim2.new(0.0,0,0.978,0),
			'Out',
			'Quad',
			0.4,
			false,
			function()
				fldr.Visible = false
				Pop.Visible = true
				Trcks.Visible = true
				Serch.Visible = false
			end
		)
	end
end


Prompt:
-- DO NOT MESS WITH THE SCRIPT UNLESS YOU KNOW WHAT YOU'RE DOING!
-- DO NOT CHANGE FOOTSTEPS SCRIPT NAME OR IT WONT WORK.

Response:
game.Players.ChildAdded:connect(function(plr)
	plr.CharacterAdded:connect(function(char)
		if plr.ClassName == "Player" then
			if plr.Character:FindFirstChild("Sound") then
				plr.Character:FindFirstChild("Sound"):remove()
			else
				return
			end
			local footsteps = script.FootSteps:clone()
			footsteps.Parent = plr.Character
			footsteps.Disabled = false
		else
			return
		end
	end)
end)


Prompt: --returns the wielding player of this tool

Response:
function getPlayer()
	local char = Tool.Parent
	return game:GetService("Players"):GetPlayerFromCharacter(Character)
end

function Toss(direction)
	local handlePos = Vector3.new(Tool.Handle.Position.X, 0, Tool.Handle.Position.Z)
	local spawnPos = Character.Head.Position

	spawnPos  = spawnPos + (direction * 5)
	Tool.Handle.Part.Transparency = 1

	local Object = Tool.Handle:Clone()
	Object.Parent = workspace
	Object.Part.Transparency = 0

	Object.Swing.Pitch = Random.new():NextInteger(90, 110)/100
	Object.Swing:Play()

	Object.CanCollide = true
	Object.CFrame = Tool.Handle.CFrame
	Object.Velocity = (direction*AttackVelocity) + Vector3.new(0,AttackVelocity/7.5,0)
	Object.Trail.Enabled = true

	local rand = 11.25
	Object.RotVelocity = Vector3.new(Random.new():NextNumber(-rand,rand),Random.new():NextNumber(-rand,rand),Random.new():NextNumber(-rand,rand))
	Object:SetNetworkOwner(getPlayer())

	local ScriptClone = DamageScript:Clone()
	ScriptClone.Parent = Object
	ScriptClone.Disabled = false

	local tag = Instance.new("ObjectValue")
	tag.Value = getPlayer()
	tag.Name = "creator"
	tag.Parent = Object
end

PowerRemote.OnServerEvent:Connect(function(player, Power)
	local holder = getPlayer()
	if holder ~= player then return end

	AttackVelocity = Power
end)

TossRemote.OnServerEvent:Connect(function(player, mousePosition)
	local holder = getPlayer()
	if holder ~= player then return end

	if Cooldown.Value == true then return end
	Cooldown.Value = true

	local holder = getPlayer()

	if Humanoid and Humanoid.RigType == Enum.HumanoidRigType.R15 then
		TossRemote:FireClient(getPlayer(), "PlayAnimation", "Animation")
	end
	local targetPos = mousePosition.p
	local lookAt = (targetPos - Character.Head.Position).unit

	Toss(lookAt)

	task.wait(CooldownTime)
	Cooldown.Value = false
end)

Tool.Equipped:Connect(function()
	Character = Tool.Parent
	Humanoid = Character:FindFirstChildOfClass("Humanoid")
end)

Tool.Unequipped:Connect(function()
	Character = nil
	Humanoid = nil
end)


Prompt: --[[ Local Functions ]]

Response:
--
local function onShiftLockToggled()
	IsShiftLocked = not IsShiftLocked
	if IsShiftLocked then
		ShiftLockIcon.Image = SHIFT_LOCK_ON
		Mouse.Icon = SHIFT_LOCK_CURSOR
	else
		ShiftLockIcon.Image = SHIFT_LOCK_OFF
		Mouse.Icon = ""
	end
	ShiftLockController.OnShiftLockToggled:Fire()
end

local function initialize()
	if ScreenGui then
		ScreenGui:Destroy()
		ScreenGui = nil
	end
	ScreenGui = Instance.new('ScreenGui')
	ScreenGui.Name = "ControlGui"

	local frame = Instance.new('Frame')
	frame.Name = "BottomLeftControl"
	frame.Size = UDim2.new(0, 130, 0, 46)
	frame.Position = UDim2.new(0, 0, 1, -46)
	frame.BackgroundTransparency = 1
	frame.Parent = ScreenGui

	ShiftLockIcon = Instance.new('ImageButton')
	ShiftLockIcon.Name = "MouseLockLabel"
	ShiftLockIcon.Size = UDim2.new(0, 62, 0, 62)
	ShiftLockIcon.Position = UDim2.new(0, 2, 0, -65)
	ShiftLockIcon.BackgroundTransparency = 1
	ShiftLockIcon.Image = IsShiftLocked and SHIFT_LOCK_ON or SHIFT_LOCK_OFF
	ShiftLockIcon.Visible = IsShiftLockMode
	ShiftLockIcon.Parent = frame

	ShiftLockIcon.MouseButton1Click:connect(onShiftLockToggled)

	ScreenGui.Parent = PlayerGui
end


Prompt: -- Axis names corresponding to each face

Response:
local FaceAxisNames = {
	[Enum.NormalId.Top] = 'Y';
	[Enum.NormalId.Bottom] = 'Y';
	[Enum.NormalId.Front] = 'Z';
	[Enum.NormalId.Back] = 'Z';
	[Enum.NormalId.Left] = 'X';
	[Enum.NormalId.Right] = 'X';
};

function ShowHandles()
	-- Creates and automatically attaches handles to the currently focused part

	-- Autofocus handles on latest focused part
	if not Connections.AutofocusHandle then
		Connections.AutofocusHandle = Selection.FocusChanged:Connect(ShowHandles);
	end;

	-- If handles already exist, only show them
	if ResizeTool.Handles then
		ResizeTool.Handles:SetAdornee(Selection.Focus)
		return
	end

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

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

		-- Indicate resizing via handles
		HandleResizing = true;

		-- Stop parts from moving, and capture the initial state of the parts
		InitialState = PreparePartsForResizing();

		-- Track the change
		TrackChange();

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

	end

	local function OnHandleDrag(Face, Distance)
		-- Update parts when the handles are moved

		-- Only resize if handle is enabled
		if not HandleResizing then
			return;
		end;

		-- Calculate the increment-aligned drag distance
		Distance = GetIncrementMultiple(Distance, ResizeTool.Increment);

		-- Resize the parts on the selected faces by the calculated distance
		local Success, Adjustment = ResizePartsByFace(Face, Distance, ResizeTool.Directions, InitialState);

		-- If the resizing did not succeed, resize according to the suggested adjustment
		if not Success then
			ResizePartsByFace(Face, Adjustment, ResizeTool.Directions, InitialState);
		end;

		-- Update the "studs resized" indicator
		if ResizeTool.UI then
			ResizeTool.UI.Changes.Text.Text = 'resized ' .. Support.Round(math.abs(Adjustment or Distance), 3) .. ' studs';
		end;

		-- 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(InitialState) do
				Part.Size = State.Size;
				Part.CFrame = State.CFrame;
			end;
		end;

	end

	local function OnHandleDragEnd()
		if not HandleResizing then
			return
		end

		-- Disable resizing
		HandleResizing = false;

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

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

		-- Register the change
		RegisterChange();
	end

	-- Create the handles
	local Handles = require(Libraries:WaitForChild 'Handles')
	ResizeTool.Handles = Handles.new({
		Color = ResizeTool.Color.Color,
		Parent = Core.UIContainer,
		Adornee = Selection.Focus,
		OnDragStart = OnHandleDragStart,
		OnDrag = OnHandleDrag,
		OnDragEnd = OnHandleDragEnd
	})

end;

function HideHandles()
	-- Hides the resizing handles

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

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

	-- Clear unnecessary resources
	ClearConnection 'AutofocusHandle';

end;

function ResizePartsByFace(Face, Distance, Directions, InitialStates)
	-- Resizes the selection on face `Face` by `Distance` studs, in the given `Directions`

	-- Adjust the size increment to the resizing direction mode
	if Directions == 'Both' then
		Distance = Distance * 2;
	end;

	-- Calculate the increment vector for this resizing
	local AxisSizeMultiplier = AxisSizeMultipliers[Face];
	local IncrementVector = Distance * AxisSizeMultiplier;

	-- Get name of axis the resize will occur on
	local AxisName = FaceAxisNames[Face];

	-- Check for any potential undersizing or oversizing
	local ShortestSize, ShortestPart, LongestSize, LongestPart;
	for Part, InitialState in pairs(InitialStates) do

		-- Calculate target size for this resize
		local TargetSize = InitialState.Size[AxisName] + Distance;

		-- If target size is under 0.05, note if it's the shortest size
		if TargetSize < 0.049999 and (not ShortestSize or (ShortestSize and TargetSize < ShortestSize)) then
			ShortestSize, ShortestPart = TargetSize, Part;

		-- If target size is over 2048, note if it's the longest size
		elseif TargetSize > 2048 and (not LongestSize or (LongestSize and TargetSize > LongestSize)) then
			LongestSize, LongestPart = TargetSize, Part;
		end;

	end;

	-- Return adjustment for undersized parts (snap to lowest possible valid increment multiple)
	if ShortestSize then
		local InitialSize = InitialStates[ShortestPart].Size[AxisName];
		local TargetSize = InitialSize - ResizeTool.Increment * tonumber((tostring((InitialSize - 0.05) / ResizeTool.Increment):gsub('%..+', '')));
		return false, Distance + TargetSize - ShortestSize;
	end;

	-- Return adjustment for oversized parts (snap to highest possible valid increment multiple)
	if LongestSize then
		local TargetSize = ResizeTool.Increment * tonumber((tostring(2048 / ResizeTool.Increment):gsub('%..+', '')));
		return false, Distance + TargetSize - LongestSize;
	end;

	-- Resize each part
	for Part, InitialState in pairs(InitialStates) do

		-- Perform the size change depending on shape
		if Part:IsA 'Part' then

			-- Resize spheres on all axes
			if Part.Shape == Enum.PartType.Ball then
				Part.Size = InitialState.Size + Vector3.new(Distance, Distance, Distance);

			-- Resize cylinders on both Y & Z axes for circle sides
			elseif Part.Shape == Enum.PartType.Cylinder and AxisName ~= 'X' then
				Part.Size = InitialState.Size + Vector3.new(0, Distance, Distance);

			-- Resize block parts and cylinder lengths normally
			else
				Part.Size = InitialState.Size + IncrementVector;
			end;

		-- Perform the size change normally on all other parts
		else
			Part.Size = InitialState.Size + IncrementVector;
		end;

		-- Offset the part when resizing in the normal, one direction
		if Directions == 'Normal' then
			Part.CFrame = InitialState.CFrame * CFrame.new(AxisPositioningMultipliers[Face] * Distance / 2);

		-- Keep the part centered when resizing in both directions
		elseif Directions == 'Both' then
			Part.CFrame = InitialState.CFrame;

		end;

	end;

	-- Indicate that the resizing happened successfully
	return true;
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 directions mode
			if ResizeTool.Directions == 'Normal' then
				SetDirections('Both');

			elseif ResizeTool.Directions == 'Both' then
				SetDirections('Normal');
			end;

		-- Nudge up if the 8 button on the keypad is pressed
		elseif InputInfo.KeyCode == Enum.KeyCode.KeypadEight then
			NudgeSelectionByFace(Enum.NormalId.Top);

		-- Nudge down if the 2 button on the keypad is pressed
		elseif InputInfo.KeyCode == Enum.KeyCode.KeypadTwo then
			NudgeSelectionByFace(Enum.NormalId.Bottom);

		-- Nudge forward if the 9 button on the keypad is pressed
		elseif InputInfo.KeyCode == Enum.KeyCode.KeypadNine then
			NudgeSelectionByFace(Enum.NormalId.Front);

		-- Nudge backward if the 1 button on the keypad is pressed
		elseif InputInfo.KeyCode == Enum.KeyCode.KeypadOne then
			NudgeSelectionByFace(Enum.NormalId.Back);

		-- Nudge left if the 4 button on the keypad is pressed
		elseif InputInfo.KeyCode == Enum.KeyCode.KeypadFour then
			NudgeSelectionByFace(Enum.NormalId.Left);

		-- Nudge right if the 6 button on the keypad is pressed
		elseif InputInfo.KeyCode == Enum.KeyCode.KeypadSix then
			NudgeSelectionByFace(Enum.NormalId.Right);

		-- 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();

		end;

	end));

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

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

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

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

		-- Finish snapping when the R key is released, and it's not the selection clearing hotkey
		if InputInfo.KeyCode == Enum.KeyCode.R and not Selection.Multiselecting then
			FinishSnapping();

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

	end));

end;

function SetAxisSize(Axis, Size)
	-- Sets the selection's size on axis `Axis` to `Size`

	-- Track this change
	TrackChange();

	-- Prepare parts to be resized
	local InitialStates = PreparePartsForResizing();

	-- Update each part
	for Part, InitialState in pairs(InitialStates) do

		-- Set the part's new size
		Part.Size = Vector3.new(
			Axis == 'X' and Size or Part.Size.X,
			Axis == 'Y' and Size or Part.Size.Y,
			Axis == 'Z' and Size or Part.Size.Z
		);

		-- Keep the part in place
		Part.CFrame = InitialState.CFrame;

	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 resize parts towards the end destination
	if Core.Mode == 'Tool' and Security.ArePartsViolatingAreas(Selection.Parts, Core.Player, false, AreaPermissions) then
		for Part, State in pairs(InitialStates) do
			Part.Size = State.Size;
			Part.CFrame = State.CFrame;
		end;
	end;

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

	-- Register the change
	RegisterChange();

end;

function NudgeSelectionByFace(Face)
	-- Nudges the size of the selection in the direction of the given face

	-- Get amount to nudge by
	local NudgeAmount = ResizeTool.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 this change
	TrackChange();

	-- Prepare parts to be resized
	local InitialState = PreparePartsForResizing();

	-- Perform the resizing
	local Success, Adjustment = ResizePartsByFace(Face, NudgeAmount, ResizeTool.Directions, InitialState);

	-- If the resizing did not succeed, resize according to the suggested adjustment
	if not Success then
		ResizePartsByFace(Face, Adjustment, ResizeTool.Directions, InitialState);
	end;

	-- Update "studs resized" indicator
	if ResizeTool.UI then
		ResizeTool.UI.Changes.Text.Text = 'resized ' .. Support.Round(Adjustment or NudgeAmount, 3) .. ' studs';
	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 resize parts towards the end destination
	if Core.Mode == 'Tool' and Security.ArePartsViolatingAreas(Selection.Parts, Core.Player, false, AreaPermissions) then
		for Part, State in pairs(InitialState) do
			Part.Size = State.Size;
			Part.CFrame = State.CFrame;
		end;
	end;

	-- Restore the parts' original states
	for Part, State in pairs(InitialState) do
		Part:MakeJoints();
		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);
		BeforeSize = {};
		AfterSize = {};
		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, Size = Record.BeforeSize[Part], CFrame = Record.BeforeCFrame[Part] });
			end;

			-- Send the change request
			Core.SyncAPI:Invoke('SyncResize', 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, Size = Record.AfterSize[Part], CFrame = Record.AfterCFrame[Part] });
			end;

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

		end;

	};

	-- Collect the selection's initial state
	for _, Part in pairs(HistoryRecord.Parts) do
		HistoryRecord.BeforeSize[Part] = Part.Size;
		HistoryRecord.BeforeCFrame[Part] = Part.CFrame;
	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.AfterSize[Part] = Part.Size;
		HistoryRecord.AfterCFrame[Part] = Part.CFrame;
		table.insert(Changes, { Part = Part, Size = Part.Size, CFrame = Part.CFrame });
	end;

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

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

end;

function PreparePartsForResizing()
	-- Prepares parts for resizing and returns the initial state of the parts

	local InitialState = {};

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

	return InitialState;
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:
--!strict
--[[*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 *
 ]]

Response:
local Packages = script.Parent.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
local setTimeout = LuauPolyfill.setTimeout

return function(task)
	-- deviation: Replace with setImmediate once we create an equivalent polyfill
	return setTimeout(task, 0)
end


Prompt: -- Update the cutscene every render frame

Response:
RunService.RenderStepped:Connect(function(Delta)
	Demo:Update(Delta)
end)

if PlayOnPlayerJoin and PlayOnPlayerJoin.Value then
	-- Play the cutscene
	PlayCutscene()
end

if PlayOnPartTouch then
	local part = script.PlayOnPartTouch.Value
	if part and part:IsA("BasePart") then
		part.Touched:Connect(function(hit)
			if hit.Parent == Player.Character then
				PlayCutscene()
			end
		end)
	end
	PlayOnPartTouch:Destroy()
end

if PlayOnEventFire then
	local e = PlayOnEventFire.Value
	if e and e:IsA("BindableEvent") then
		e.Event:Connect(PlayCutscene)
	end
	PlayOnEventFire:Destroy()
end

if PlayOnRemoteEventFire then
	local e = PlayOnRemoteEventFire.Value
	if e and e:IsA("RemoteEvent") then
		e.OnClientEvent:Connect(PlayCutscene)
	end
	PlayOnRemoteEventFire:Destroy()
end

if StopOnRemoteEventFire then
	local e = StopOnRemoteEventFire.Value
	if e and e:IsA("RemoteEvent") then
		e.OnClientEvent:Connect(function()
			Demo:Stop()
		end)
	end
	StopOnRemoteEventFire:Destroy()
end

if StopOnRemoteEventFire then
	local e = StopOnRemoteEventFire.Value
	if e and e:IsA("RemoteEvent") then
		e.OnClientEvent:Connect(function()
			Demo:Stop()
		end)
	end
	StopOnRemoteEventFire:Destroy()
end

if CutsceneGui then
	CutsceneGui.Parent = Player:WaitForChild("PlayerGui")
	local SkipCutsceneButton = CutsceneGui:FindFirstChild("SkipCutscene", true)
	local PlayCutsceneButton = CutsceneGui:FindFirstChild("PlayCutscene", true)

	if SkipCutsceneButton and SkipCutsceneButton:IsA("GuiButton") then
		SkipCutsceneButton.MouseButton1Click:Connect(function()
			Demo:Stop()
		end)
	end

	if PlayCutsceneButton and PlayCutsceneButton:IsA("GuiButton") then
		PlayCutsceneButton.MouseButton1Click:Connect(function()
			PlayCutscene()
		end)
	end
	Demo.EStop.Event:Connect(function()
		CutsceneGui.Enabled = false
	end)
end

local Character = Player.Character or Player.CharacterAdded:Wait()

if PlayOnCharacterAdded and PlayOnCharacterAdded.Value then
	PlayCutscene()
end
if PlayOnCharacterDied and PlayOnCharacterDied.Value then
	local Humanoid = Character:WaitForChild("Humanoid")
	Character:WaitForChild("Humanoid").Died:Connect(function()
		PlayCutscene()
	end)
end
PlayOnCharacterAdded:Destroy()


Prompt: --print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")

Response:
idx = idx + 1
end
end
end


Prompt: ---Controller

Response:
local Controller=false
local UserInputService = game:GetService("UserInputService")
local LStickX = 0
local RStickX = 0
local RStickY = 0
local RTriggerValue = 0
local LTriggerValue = 0

local ButtonX = 0
local ButtonY = 0
local ButtonL1 = 0
local ButtonR1 = 0
local ButtonR3 = 0
local DPadUp = 0
function DealWithInput(input,IsRobloxFunction)
	if Controller then
		if input.KeyCode ==Enum.KeyCode.ButtonX then
			if input.UserInputState == Enum.UserInputState.Begin then
				ButtonX=1
			elseif input.UserInputState == Enum.UserInputState.End then
				ButtonX=0
			end
		elseif input.KeyCode ==Enum.KeyCode.ButtonY then
			if input.UserInputState == Enum.UserInputState.Begin then
				ButtonY=1
			elseif input.UserInputState == Enum.UserInputState.End then
				ButtonY=0
			end
		elseif input.KeyCode ==Enum.KeyCode.ButtonL1 then
			if input.UserInputState == Enum.UserInputState.Begin then
				ButtonL1=1
			elseif input.UserInputState == Enum.UserInputState.End then
				ButtonL1=0
			end
		elseif input.KeyCode ==Enum.KeyCode.ButtonR1 then
			if input.UserInputState == Enum.UserInputState.Begin then
				ButtonR1=1
			elseif input.UserInputState == Enum.UserInputState.End then
				ButtonR1=0
			end
		elseif input.KeyCode ==Enum.KeyCode.DPadLeft then
			if input.UserInputState == Enum.UserInputState.Begin then
				DPadUp=1
			elseif input.UserInputState == Enum.UserInputState.End then
				DPadUp=0
			end
		elseif input.KeyCode ==Enum.KeyCode.ButtonR3 then
			if input.UserInputState == Enum.UserInputState.Begin then
				ButtonR3=1
			elseif input.UserInputState == Enum.UserInputState.End then
				ButtonR3=0
			end
		end
		if input.UserInputType.Name:find("Gamepad") then --it's one of 4 gamepads
			if input.KeyCode == Enum.KeyCode.Thumbstick1 then
				LStickX = input.Position.X
			elseif input.KeyCode == Enum.KeyCode.Thumbstick2 then
				RStickX = input.Position.X
				RStickY = input.Position.Y
			elseif input.KeyCode == Enum.KeyCode.ButtonR2 then--right shoulder
				RTriggerValue = input.Position.Z
			elseif input.KeyCode == Enum.KeyCode.ButtonL2 then--left shoulder
				LTriggerValue = input.Position.Z
			end
		end
	end
end
UserInputService.InputBegan:connect(DealWithInput)
UserInputService.InputChanged:connect(DealWithInput)--keyboards don't activate with Changed, only Begin and Ended. idk if digital controller buttons do too
UserInputService.InputEnded:connect(DealWithInput)

car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" then
		for i,v in pairs(Binded) do
			run:UnbindFromRenderStep(v)
		end
		workspace.CurrentCamera.CameraType=Enum.CameraType.Custom
		workspace.CurrentCamera.FieldOfView=70
		player.CameraMaxZoomDistance=400
		getC(car.Misc.Anims,0)
		getC(player.Character,0)
	end
end)

function Camera()
	local cam=workspace.CurrentCamera
	local intcam=false
	local CRot=0
	local CBack=0
	local CUp=0
	local mode=0
	local look=0
	local camChange = 0
	local function CamUpdate()
		if not pcall (function()
			if camChange==0 and DPadUp==1 then
				intcam = not intcam
			end
			camChange=DPadUp
			if mode==1 then
				if math.abs(RStickX)>.1 then
					local sPos=1
					if RStickX<0 then sPos=-1 end
					if intcam then
						CRot=sPos*math.abs(((math.abs(RStickX)-.1)/(.9)))*-80
					else
						CRot=sPos*math.abs(((math.abs(RStickX)-.1)/(.9)))*-90
					end
				else
					CRot=0
				end
				if math.abs(RStickY)>.1 then
					local sPos=1
					if RStickY<0 then sPos=-1 end
					if intcam then
						CUp=sPos*math.abs(((math.abs(RStickY)-.1)/(.9)))*30
					else
						CUp=math.min(sPos*math.abs(((math.abs(RStickY)-.1)/(.9)))*-75,30)
					end
				else
					CUp=0
				end
			else
				if CRot>look then
					CRot=math.max(look,CRot-20)
				elseif CRot<look then
					CRot=math.min(look,CRot+20)
				end
				CUp=0
			end
			if intcam then
				CBack=0
			else
				CBack=-180*ButtonR3
			end
			if intcam then
				getC(car.Misc.Anims,1)
				getC(player.Character,1)
				cam.CameraSubject=player.Character.Humanoid
				cam.CameraType=Enum.CameraType.Scriptable
				cam.FieldOfView=80
				player.CameraMaxZoomDistance=0
				local cf=car.Body.Cam.CFrame
				if ButtonR3==1 then
					cf=car.Body.RCam.CFrame
				end
				if apexlook then
					look = car.Body.bal.Orientation.Z/3
				end
				cam.CoordinateFrame=cf*CFrame.Angles(0,math.rad(CRot+CBack),0)*CFrame.Angles(math.rad(CUp),0,math.rad(-car.Body.bal.Orientation.Z))
			else
				getC(car.Misc.Anims,0)
				getC(player.Character,0)
				cam.CameraSubject=car.DriveSeat
				cam.FieldOfView=70
				if mode==0 then
					cam.CameraType=Enum.CameraType.Custom
					player.CameraMaxZoomDistance=400
					run:UnbindFromRenderStep("CamUpdate")
				else
					cam.CameraType = "Scriptable"
					local pspeed = math.min(1,car.DriveSeat.Velocity.Magnitude/500)
					local cc = car.DriveSeat.Position+Vector3.new(0,8+(pspeed*2),0)-((car.DriveSeat.CFrame*CFrame.Angles(math.rad(CUp),math.rad(CRot+CBack),0)).lookVector*17)+(car.DriveSeat.Velocity.Unit*-7*pspeed)
					cam.CoordinateFrame = CFrame.new(cc,car.DriveSeat.Position)
				end
			end
		end) then
			cam.FieldOfView=70
			cam.CameraSubject=player.Character.Humanoid
			cam.CameraType=Enum.CameraType.Custom
			player.CameraMaxZoomDistance=400
			run:UnbindFromRenderStep("CamUpdate")
		end
	end
	local function ModeChange()
		if GMode~=mode then
			mode=GMode
			run:BindToRenderStep("CamUpdate",Enum.RenderPriority.Camera.Value,CamUpdate)
		end
	end
	mouse.KeyDown:connect(function(key)
		if key=="v" then
			run:UnbindFromRenderStep("CamUpdate")
			intcam=not intcam
			run:BindToRenderStep("CamUpdate",Enum.RenderPriority.Camera.Value,CamUpdate)
		end
	end)
	run:BindToRenderStep("CMChange",Enum.RenderPriority.Camera.Value,ModeChange)
	table.insert(Binded,"CamUpdate")
	table.insert(Binded,"CMChange")
end
Camera()

mouse.KeyDown:connect(function(key)
	if key=="b" then
		if GMode>=1 then
			GMode=0
		else
			GMode=GMode+1
		end
		if GMode==1 then
			Controller=true
		else
			Controller=false
		end
	end
end)


Prompt:
--// Techyfied \\--
-- For info, visit https://devforum.roblox.com/t/623798 --
-- Put in ReplicatedFirst to make it work --

Response:
local ChatService = game:GetService("Chat") -- Gets the Chat service
ChatService.BubbleChatEnabled = true -- Enables the bubble chat

local settings = {
	--[[ DELETE THIS LINE IF YOU HAVE BACKGROUND IMAGE
	BackgroundImage = {
		Image = "rbxassetid://6733332557",
		ScaleType = Enum.ScaleType.Slice,
		SliceCenter = Rect.new(40, 40, 360, 160),
		SliceScale = 0.5
	},
	    DELETE THIS LINE IF YOU HAVE BACKGROUND IMAGE ]]

	--[[ DELETE THIS LINE IF YOU WANT GRADIENT BACKGROUND

	BackgroundGradient = {
		Enabled = true,
		Rotation = 90,
		Color = ColorSequence.new(Color3.fromRGB(150, 225, 255), Color3.fromRGB(50, 115, 255)),
		Transparency = NumberSequence.new({
			NumberSequenceKeypoint.new(0, 0.2),
			NumberSequenceKeypoint.new(1, 0.5)
		})
	},

	    DELETE THIS LINE IF YOU WANT GRADIENT BACKGROUND]]

	BubbleDuration = 15, -- How long the bubble chat should stay on player's head
	MaxBubbles = 3, -- How many bubbles can be on a players head at one time

	BackgroundColor3 = Color3.fromRGB(250, 250, 250), -- Background Color of the bubblechat
	TextColor3 = Color3.fromRGB(57, 59, 61), -- Text Color of the bubble chat
	TextSize = 16, -- Text size of the text in bubble chat
	Font = Enum.Font.GothamSemibold, -- Font of the text in bubble chat
	Transparency = .1, -- Transparency of the bubble chat (0-1)
	CornerRadius = UDim.new(0, 12), -- CornerRadius of the bubble chat
	TailVisible = true, -- Visiblity of the tail located under bubble chat
	Padding = 8, -- Extra Height of each bubble chat (in studs)
	MaxWidth = 300, -- Max width possible for the bubble chat (in studs)

	VerticalStudsOffset = 0, -- How far (in studs) the bubble will appear from player's head (in studs)

	BubblesSpacing = 6, -- Spacing between each bubble chat

	MinimizeDistance = 40, -- The minimum distance a player must be to see the bubbles. Else it'll appear like "..."
	MaxDistance = 100, -- The maximum distance a player must be to see the bubble chat. If they're far than this, the chat text will appear like "..."

	--[[ DELETE THIS LINE IF YOU WANT CUSTOM ANIMATION

	SizeAnimation = {
		SpringDampingRatio = 0.25
	},
	TransparencyAnimation = {
		SpringFrequency = 3
	},
	    DELETE THIS LINE IF YOU WANT CUSTOM ANIMATION]]

}

pcall(function()
	game:GetService("Chat"):SetBubbleChatSettings(settings)
end)


Prompt:
--[=[
	Utility functions primarily used to bind animations into update loops of the Roblox engine.
	@class StepUtils
]=]

Response:
local HttpService = game:GetService("HttpService")
local RunService = game:GetService("RunService")

local StepUtils = {}


Prompt: --			torsoPos = torsoPos * 2 -- Turn Impeded?, off

Response:
	--		Distance = 10
		end -- if no target?
	end -- Logic 0


Prompt: ----[[ Color Settings ]]

Response:
module.BackGroundColor = Color3.new(0, 0, 0)
module.DefaultMessageColor = Color3.new(1, 1, 1)
module.DefaultChatColor = Color3.fromRGB(200, 200, 200)
module.DefaultNameColor = Color3.new(1, 1, 1)
module.ChatBarBackGroundColor = Color3.new(0, 0, 0)
module.ChatBarBoxColor = Color3.new(1, 1, 1)
module.ChatBarTextColor = Color3.new(0, 0, 0)
module.ChannelsTabUnselectedColor = Color3.new(0, 0, 0)
module.ChannelsTabSelectedColor = Color3.new(30/255, 30/255, 30/255)
module.DefaultChannelNameColor = Color3.fromRGB(35, 76, 142)
module.WhisperChannelNameColor = Color3.fromRGB(102, 14, 102)
module.ErrorMessageTextColor = Color3.fromRGB(245, 50, 50)

module.DefaultPrefix = ""
module.DefaultPrefixColor = Color3.fromRGB(255,255,255)


Prompt:
--AdditionPerIntelligence: Increase to heal power per Intelligence.
--BaseHeal: How much it will heal before any attribute modifiers.
--Cooldown: How long you have to wait before you can cast again.
--ManaCost: The amount of MP needs to cast.
--Offset: The offset to heal amount. (Example: If set to 2, it will randomly add or subtract anything from -2 to +2.)

Response:
Tool = script.Parent

Debris = Game:GetService("Debris")

script.Parent.ToolTip = "Cost: " .. script.Parent.PROPERTIES.ManaCost.Value .. " MP"

function Heal()
	Character = Tool.Parent
	Player = Game.Players:GetPlayerFromCharacter(Character)
	if script.Parent.Enabled == true and Player ~= nil then
		if Player.Stats.Mana.Value >= script.Parent.PROPERTIES.ManaCost.Value then
			script.Parent.Enabled = false
			HealAmount = script.Parent.PROPERTIES.BaseHeal.Value + (script.Parent.PROPERTIES.AdditionPerIntelligence.Value * Player.attributes.Intelligence.Value) + math.random(-script.Parent.PROPERTIES.Offset.Value, script.Parent.PROPERTIES.Offset.Value)

			--Heal text
			local part = Instance.new("BillboardGui")
			part.Size = UDim2.new(0,50,0,100)
			part.StudsOffset = Vector3.new(0,2,0)
			local part2 = Instance.new("TextLabel")
			dt = Game.ReplicatedStorage.DynamicText:Clone()
			part2.Font = "SourceSansBold"
			part2.FontSize = "Size24"
			part2.TextStrokeTransparency = 0
			part2.Size = UDim2.new(1,0,1,0)
			part2.Position = UDim2.new(0,0,0,0)
			part2.BackgroundTransparency = 1
			part2.Parent = part
			part2.TextColor3 = Color3.new(0, 1, 0)
			dt.Parent = part2
			dt.Disabled = false
			part.Parent = Character.Head
			part.Adornee = part.Parent

			part2.Text = "+" .. HealAmount
			Debris:AddItem(part, 2)

			Character.Humanoid.Health = Character.Humanoid.Health + HealAmount
			Player.Stats.Mana.Value = Player.Stats.Mana.Value - script.Parent.PROPERTIES.ManaCost.Value
			wait(script.Parent.PROPERTIES.Cooldown.Value)
			script.Parent.Enabled = true
		else print("Insufficient mana!")
		end
	else print("Either cooldown is in effect or player doesn't exist!")
	end
end

script.Parent.Activated:connect(Heal)


Prompt:
-- Helps identify side effects in render-phase lifecycle hooks and setState
-- reducers by double invoking them in Strict Mode.
-- ROBLOX TODO: we'll want to enable this for DEV app bundles

Response: exports.debugRenderPhaseSideEffectsForStrictMode = _G.__DEV__


Prompt:
-- The amount the aim will increase or decrease by
-- decreases this number reduces the speed that recoil takes effect

Response: local AimInaccuracyStepAmount = 0.0125


Prompt:
-- changes a BezierPoint in the Bezier
-- only works if the BezierPoint exists in the Bezier

Response:
function Bezier:ChangeBezierPoint(index: number, p: Vector3 | BasePart)

	-- check that index is a number
	if type(index) ~= "number" then
		error("Bezier:ChangeBezierPoint() only accepts a number index as the first argument!")
	end

	-- check if given value is a Vector3 or BasePart
	if p and (typeof(p) == "Instance" and p:IsA("BasePart")) or typeof(p) == "Vector3" then

		-- check if the bezier point exists
		local BezierPoint = self.Points[index]
		if BezierPoint then

			-- check type of point and add to bezier
			BezierPoint.Type = typeof(p) == "Vector3" and "StaicPoint" or "BasePartPoint";
			BezierPoint.Point = p

			-- update bezier
			self:UpdateLength()
		else

			-- bezier point does not exist
			error("Did not find BezierPoint at index " .. tostring(index))
		end
	else

		-- incorrect type
		error("Bezier:ChangeBezierPoint() only accepts a Vector3 or BasePart as the second argument!")
	end
end


Prompt: -- Left Arms

Response:
character.RagdollRig.ConstraintLeftUpperArm.Attachment0 = LUA
character.RagdollRig.ConstraintLeftUpperArm.Attachment1 = LUARig
character.RagdollRig.ConstraintLeftLowerArm.Attachment0 = LLA
character.RagdollRig.ConstraintLeftLowerArm.Attachment1 = LLARig
character.RagdollRig.ConstraintLeftHand.Attachment0 = LH
character.RagdollRig.ConstraintLeftHand.Attachment1 = LHRig


Prompt:
--[[

	This script will undo the global market, i.e it will take all of a player's existing
	auctions, cancel them, and put the items back into their inventory.

]]


Prompt:
-- ================================================================================
-- PUBLIC FUNCTIONS
-- ================================================================================

Response:
function PilotSeat.new(speeder)
	local newPilotSeat = {}
	setmetatable(newPilotSeat, PilotSeat)

	-- Set speeder and main (PrimaryPart)
	newPilotSeat.speeder = speeder
	newPilotSeat.main = speeder.PrimaryPart

	-- Mass equalizer
	SetMassless(newPilotSeat.speeder, newPilotSeat)
	SetMass(newPilotSeat.main)
	newPilotSeat.mass = GetMass(newPilotSeat.speeder)

	SetupCollisionDetection(newPilotSeat.speeder, newPilotSeat)

	-- Settings
	local _settings = newPilotSeat.main:FindFirstChild("Settings")
	assert(_settings, "A Settings script wasn't found. Make sure your finished Model includes a Body part with an attached Setting Script")
	newPilotSeat._settings = require(_settings)

	newPilotSeat.engine = Engine.new(newPilotSeat)

	return newPilotSeat
end -- PilotSeat.new()

function PilotSeat:Destroy()
	self.speeder:Destroy()
	self.main = false
	self.id = false
	self.engine = false
end -- PilotSeat:Destroy()


Prompt: -- Reference to the configuration module

Response: local config = require(game.ReplicatedFirst.ClipSettings) -- Assuming the new configuration module is stored in ReplicatedStorage as "Config"


Prompt: -- REMEMBER: THERE'S RESOURCES TO HELP YOU AT https://etithespirit.github.io/FastCastAPIDocs


Prompt: ----  \/Lighting\/

Response:
model = script.Parent
wait(0.5)
currentP = "Off"
script.Parent.Events.Lighting.OnServerEvent:Connect( function(player, pattern)
	if script.Parent.Values.Lighting.Value == true then
		script.Parent.Values.Lighting.Value = false
	else
		script.Parent.Values.Lighting.Value = true
	end
end)


Prompt: -- Create component

Response:
local Tooltip = Roact.PureComponent:extend(script.Name)

function Tooltip:init()
    self.FrameSize, self.SetFrameSize = Roact.createBinding(UDim2.new())
    self:UpdateTextBounds(self.props.Text)
end

function Tooltip:willUpdate(nextProps)
    if self.props.Text ~= nextProps.Text then
        self:UpdateTextBounds(nextProps.Text)
    end
end

function Tooltip:UpdateTextBounds(Text)
    self.TextBounds = TextService:GetTextSize(
        Text:gsub('<br />', '\n'):gsub('<.->', ''),
        10,
        Enum.Font.Gotham,
        Vector2.new(math.huge, math.huge)
    )
end

function Tooltip:render()
    return new('Frame', {
        AnchorPoint = Vector2.new(0.5, 0);
        BackgroundColor3 = Color3.fromRGB(58, 58, 58);
        BackgroundTransparency = 0;
        BorderSizePixel = 0;
        Position = UDim2.new(0.5, 0, 1, 2);
        Size = UDim2.fromOffset(self.TextBounds.X + 20, self.TextBounds.Y + 8);
        ZIndex = 2;
        Visible = self.props.IsVisible;
    }, {
        Corners = new('UICorner', {
            CornerRadius = UDim.new(0, 3);
        });
        Arrow = new('Frame', {
            AnchorPoint = Vector2.new(0.5, 0.5);
            BackgroundColor3 = Color3.fromRGB(58, 58, 58);
            BackgroundTransparency = 0;
            BorderSizePixel = 0;
            Position = UDim2.new(0.5, 0, 0, 0);
            Size = UDim2.new(0, 6, 0, 6);
            ZIndex = 2;
        });
        Text = new('TextLabel', {
            BackgroundTransparency = 1;
            Size = UDim2.new(1, 0, 1, 0);
            ZIndex = 2;
            Font = Enum.Font.Gotham;
            RichText = true;
            Text = self.props.Text;
            TextColor3 = Color3.fromRGB(255, 255, 255);
            TextSize = 10;
            TextXAlignment = Enum.TextXAlignment.Center;
            TextYAlignment = Enum.TextYAlignment.Center;
        });
    })
end

return Tooltip


Prompt:
--////////////////////////////// Include
--//////////////////////////////////////

Response:
local ChatConstants = require(replicatedModules:WaitForChild("ChatConstants"))
local Util = require(modulesFolder:WaitForChild("Util"))

local ChatLocalization = nil
pcall(function() ChatLocalization = require(game:GetService("Chat").ClientChatModules.ChatLocalization) end)
ChatLocalization = ChatLocalization or {}

if not ChatLocalization.FormatMessageToSend or not ChatLocalization.LocalizeFormattedMessage then
	function ChatLocalization:FormatMessageToSend(key,default) return default end
end


Prompt:
--[[**
	asserts a given check

	@param check The function to wrap with an assert

	@returns A function that simply wraps the given check in an assert
**--]]

Response:
function t.strict(check)
	return function(...)
		assert(check(...))
	end
end

return t


Response:
function onSwimming(speed)
	if speed > 1.00 then
		local scale = 10.0
		playAnimation("swim", 0.4, Humanoid)
		setAnimationSpeed(speed / scale)
		pose = "Swimming"
	else
		playAnimation("swimidle", 0.4, Humanoid)
		pose = "Standing"
	end
end

function animateTool()
	if (toolAnim == "None") then
		playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
		return
	end

	if (toolAnim == "Slash") then
		playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end

	if (toolAnim == "Lunge") then
		playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end
end

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

local lastTick = 0

function stepAnimate(currentTime)
	local amplitude = 1
	local frequency = 1
  	local deltaTime = currentTime - lastTick
  	lastTick = currentTime

	local climbFudge = 0
	local setAngles = false

  	if (jumpAnimTime > 0) then
  		jumpAnimTime = jumpAnimTime - deltaTime
  	end

	if (pose == "FreeFall" and jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	elseif (pose == "Seated") then
		playAnimation("sit", 0.5, Humanoid)
		return
	elseif (pose == "Running") then
		playAnimation("walk", 0.2, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
		stopAllAnimations()
		amplitude = 0.1
		frequency = 1
		setAngles = true
	end

	-- Tool Animation handling
	local tool = Character:FindFirstChildOfClass("Tool")
	local requireHandleCheck = not UserSettings():IsUserFeatureEnabled("UserToolR15Fix")
	if tool and ((requireHandleCheck and tool.RequiresHandle) or tool:FindFirstChild("Handle")) then
		local animStringValueObject = getToolAnim(tool)

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

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

		animateTool()
	else
		stopToolAnimations()
		toolAnim = "None"
		toolAnimInstance = nil
		toolAnimTime = 0
	end
end


Response:
function tagHumanoid(humanoid)
	local plr=game.Players:playerFromCharacter(sp.Parent)
	if plr~=nil then
		local tag=Instance.new("ObjectValue")
		tag.Value=plr
		tag.Name="creator"
		tag.Parent=humanoid
		delay(2,function()
			if tag~=nil then
				tag.Parent=nil
			end
		end)
	end
end

function reload(mouse)
	reloading=true
	mouse.Icon=ReloadCursor
	while sp.Ammo.Value<ClipSize and reloading and enabled do
		wait(ReloadTime/ClipSize)
		if reloading then
			sp.Ammo.Value=sp.Ammo.Value+1
			check()
		else
			break
		end
	end
	check()
	mouse.Icon=Cursors[1]
	reloading=false
end

function onKeyDown(key,mouse)
	key=key:lower()
	if key=="r" and not reloading then
		reload(mouse)
	end
end

function movecframe(p,pos)
	p.Parent=game.Lighting
	p.Position=pos
	p.Parent=game.Workspace
end

function fire(aim)
	sp.Handle.Fire:Play()

	t=r.Stepped:wait()
	last6=last5
	last5=last4
	last4=last3
	last3=last2
	last2=last
	last=t

	local bullet=Bullet:clone()
	local bt2=game.Lighting.BulletTexture:clone()
	bt2.BrickColor=BrickColor.new("Bright red")
	bt2.Mesh.Scale=Vector3.new(.5,.5,2)
	local totalDist=0
	Lengthdist=-RayLength/.5
	local startpoint=sp.Handle.CFrame*BarrlePos
	local dir=(aim)-startpoint
	dir=computeDirection(dir)
	local cfrm=CFrame.new(startpoint, dir+startpoint)
	local hit,pos,normal,time=raycast(game.Workspace, startpoint, cfrm*Vector3.new(0,0,Lengthdist)-startpoint, function(brick)
		if brick.Name=="Glass" then
			return true
		elseif brick.Name=="Bullet" or brick.Name=="BulletTexture" then
			return false
		elseif brick:IsDescendantOf(sp.Parent) then
			return false
		elseif brick.Name=="Handle" then
			if brick.Parent:IsDescendantOf(sp.Parent) then
				return false
			else
				return true
			end
		end
		return true
	end)
	bullet.Parent=game.Workspace
	bt2.Parent=game.Workspace
	if hit~=nil then
		local humanoid=hit.Parent:FindFirstChild("Humanoid")
		if humanoid~=nil then
			local damage=math.random(BaseDamage-(BaseDamage*.25),BaseDamage+(BaseDamage*.25))
			if hit.Name=="Head" then
				damage=damage*1.25
			elseif hit.Name=="Torso" then
			else
				damage=damage*.75
			end
			if humanoid.Health>0 then
				local eplr=game.Players:playerFromCharacter(humanoid.Parent)
				local plr=game.Players:playerFromCharacter(sp.Parent)
				if eplr~=nil and plr~=nil then
				--	if eplr.TeamColor~=plr.TeamColor or eplr.Neutral or plr.Neutral then
						tagHumanoid(humanoid)
						humanoid:TakeDamage(damage)
				--	end
				else
					tagHumanoid(humanoid)
					humanoid:TakeDamage(damage)
				end
			end
		end
		if (hit.Name == "Part10") or (hit.Name == "Part11") or (hit.Name == "Part21") or (hit.Name == "Part23") or (hit.Name == "Part24") or (hit.Name == "Part8") then
			rand = math.random(1,5)
			if rand == 1 then
				workspace.GlassSound:play()
				hit:breakJoints()
			end
		end
		if (hit.Parent:findFirstChild("Hit")) then
			hit.Parent.Health.Value = hit.Parent.Health.Value - BaseDamage/3
		end
		distance=(startpoint-pos).magnitude
		bullet.CFrame=cfrm*CFrame.new(0,0,-distance/2)
		bullet.Mesh.Scale=Vector3.new(.15,.15,distance)
	else
		bullet.CFrame=cfrm*CFrame.new(0,0,-RayLength/2)
		bullet.Mesh.Scale=Vector3.new(.15,.15,RayLength)
	end
	if pos~=nil then
		bt2.CFrame=bullet.CFrame
		movecframe(bt2,pos)
	end
	local deb=game:FindFirstChild("Debris")
	if deb==nil then
		local debris=Instance.new("Debris")
		debris.Parent=game
	end
	check()
	game.Debris:AddItem(bullet,.05)
	game.Debris:AddItem(bt2,.5)
end

function onButton1Up(mouse)
	down=false
end

function onButton1Down(mouse)
	h=sp.Parent:FindFirstChild("Humanoid")
	if not enabled or reloading or down or h==nil then
		return
	end
	if sp.Ammo.Value>0 and h.Health>0 then
		--[[if sp.Ammo.Value<=0 then
			if not reloading then
				reload(mouse)
			end
			return
		end]]
		down=true
		enabled=false
		while down do
			if sp.Ammo.Value<=0 then
				break
			end
			if burst then
				local startpoint=sp.Handle.CFrame*BarrlePos
				local mag=(mouse.Hit.p-startpoint).magnitude
				local rndm=Vector3.new(math.random(-(Spread/10)*mag,(Spread/10)*mag),math.random(-(Spread/10)*mag,(Spread/10)*mag),math.random(-(Spread/10)*mag,(Spread/10)*mag))
				fire(mouse.Hit.p+rndm)
				sp.Ammo.Value=sp.Ammo.Value-1
				if sp.Ammo.Value<=0 then
					break
				end
				wait(.05)
				local startpoint=sp.Handle.CFrame*BarrlePos
				local mag2=((mouse.Hit.p+rndm)-startpoint).magnitude
				local rndm2=Vector3.new(math.random(-(.1/10)*mag2,(.1/10)*mag2),math.random(-(.1/10)*mag2,(.1/10)*mag2),math.random(-(.1/10)*mag2,(.1/10)*mag2))
				fire(mouse.Hit.p+rndm+rndm2)
				sp.Ammo.Value=sp.Ammo.Value-1
				if sp.Ammo.Value<=0 then
					break
				end
				wait(.05)
				fire(mouse.Hit.p+rndm+rndm2+rndm2)
				sp.Ammo.Value=sp.Ammo.Value-1
			elseif shot then
				sp.Ammo.Value=sp.Ammo.Value-1
				local startpoint=sp.Handle.CFrame*BarrlePos
				local mag=(mouse.Hit.p-startpoint).magnitude
				local rndm=Vector3.new(math.random(-(Spread/10)*mag,(Spread/10)*mag),math.random(-(Spread/10)*mag,(Spread/10)*mag),math.random(-(Spread/10)*mag,(Spread/10)*mag))
				fire(mouse.Hit.p+rndm)
				local mag2=((mouse.Hit.p+rndm)-startpoint).magnitude
				local rndm2=Vector3.new(math.random(-(.2/10)*mag2,(.2/10)*mag2),math.random(-(.2/10)*mag2,(.2/10)*mag2),math.random(-(.2/10)*mag2,(.2/10)*mag2))
				fire(mouse.Hit.p+rndm+rndm2)
				local rndm3=Vector3.new(math.random(-(.2/10)*mag2,(.2/10)*mag2),math.random(-(.2/10)*mag2,(.2/10)*mag2),math.random(-(.2/10)*mag2,(.2/10)*mag2))
				fire(mouse.Hit.p+rndm+rndm3)
				local rndm4=Vector3.new(math.random(-(.2/10)*mag2,(.2/10)*mag2),math.random(-(.2/10)*mag2,(.2/10)*mag2),math.random(-(.2/10)*mag2,(.2/10)*mag2))
				fire(mouse.Hit.p+rndm+rndm4)
			else
				sp.Ammo.Value=sp.Ammo.Value-1
				local startpoint=sp.Handle.CFrame*BarrlePos
				local mag=(mouse.Hit.p-startpoint).magnitude
				local rndm=Vector3.new(math.random(-(Spread/10)*mag,(Spread/10)*mag),math.random(-(Spread/10)*mag,(Spread/10)*mag),math.random(-(Spread/10)*mag,(Spread/10)*mag))
				fire(mouse.Hit.p+rndm)
			end
			wait(Firerate)
			if not automatic then
				break
			end
		end
		enabled=true
	else
		sp.Handle.Trigger:Play()
	end
end

function onEquippedLocal(mouse)
	if mouse==nil then
		print("Mouse not found")
		return
	end
	mouse.Icon=Cursors[1]
	mouse.KeyDown:connect(function(key) onKeyDown(key,mouse) end)
	mouse.Button1Down:connect(function() onButton1Down(mouse) end)
	mouse.Button1Up:connect(function() onButton1Up(mouse) end)
	check()
	equiped=true
	if #Cursors>1 then
		while equiped do
			t=r.Stepped:wait()
			local action=sp.Parent:FindFirstChild("Pose")
			if action~=nil then
				if sp.Parent.Pose.Value=="Standing" then
					Spread=MinSpread
				else
					Spread=MinSpread+((1/10)*(MaxSpread-MinSpread))
				end
			else
				Spread=MinSpread
			end
			if t-last<SpreadRate then
				Spread=Spread+.1*(MaxSpread-MinSpread)
			end
			if t-last2<SpreadRate then
				Spread=Spread+.1*(MaxSpread-MinSpread)
			end
			if t-last3<SpreadRate then
				Spread=Spread+.1*(MaxSpread-MinSpread)
			end
			if t-last4<SpreadRate then
				Spread=Spread+.1*(MaxSpread-MinSpread)
			end
			if t-last5<SpreadRate then
				Spread=Spread+.1*(MaxSpread-MinSpread)
			end
			if t-last6<SpreadRate then
				Spread=Spread+.1*(MaxSpread-MinSpread)
			end
			if not reloading then
				local percent=(Spread-MinSpread)/(MaxSpread-MinSpread)
				for i=0,#Cursors-1 do
					if percent>(i/(#Cursors-1))-((1/(#Cursors-1))/2) and percent<(i/(#Cursors-1))+((1/(#Cursors-1))/2) then
						mouse.Icon=Cursors[i+1]
					end
				end
			end
			wait(Firerate*.9)
		end
	end
end
function onUnequippedLocal(mouse)
	equiped=false
	reloading=false
end
sp.Equipped:connect(onEquippedLocal)
sp.Unequipped:connect(onUnequippedLocal)
check()


Prompt: --[[Super Util]]

Response:
--
function WaitForChild(parent,...)
	local debugPrint = false
	for _, i in ipairs({...}) do
		if type(i)=='boolean' then
			debugPrint = i
		else
			while not parent:FindFirstChild(i) do
				wait(1/30)
				if debugPrint then
					print(script.Name..':'..parent.Name..' Waiting for '.. i)
				end
			end
			parent=parent[i]
		end
	end
	return parent
end

function ForEach(parent,func)
	if type(parent)=='table' then
		for _,i in pairs(parent) do
			func(i)
		end
	else
		for _,i in pairs(parent:GetChildren()) do
			func(i)
		end
	end
end

function MakeValue(class,name,value,parent)
	local temp = Instance.new(class)
	temp.Name = name
	temp.Value = value
	temp.Parent = parent
	return temp
end

function TweenProperty(obj, propName, inita, enda, length,sentinel)
	local startTime = tick()
	local mySentinel = sentinel.Value
	local diff = enda-inita
	while tick()-startTime<length and mySentinel==sentinel.Value do
		obj[propName] = (((tick()-startTime)/length)*diff)+inita
		wait(1/30)
	end
	obj[propName] = enda
end


Prompt: -- Animate Out, slow

Response:
for i=1,i_total do
if( math.abs(wiggle_total) > (wiggle_i * 3) ) then
wiggle_i = -wiggle_i
end
wiggle_total = wiggle_total + wiggle_i
overlay.Position = UDim2.new( (0 - (2 * (i/i_total)) + wiggle_total/2), 0, (0 - (2 * (i/i_total)) + wiggle_total/2), -22 )
overlay.Size = UDim2.new( (1 + (3.5 * (i/i_total)) + wiggle_total), 0, (1.15 + (3.5 * (i/i_total)) + wiggle_total), 30 )
wait(0.01)
end


Prompt: -- Animate stuff

Response:
waitForChild(script.Parent, "Base")
local base = script.Parent.Base
waitForChild(base, "Fire")
waitForChild(base, "Smoke")

local onColor = BrickColor.new(1,1,1)
local offColor = BrickColor.new(.2,.2,.2)
base.BrickColor = onColor

base.Fire.Enabled = true
base.Smoke.Enabled = true
wait(0.5)
base.Fire.Enabled = false
wait(0.5)
base.Smoke.Enabled = false
base.BrickColor = offColor


Prompt: -- Don't edit if you don't know what you're doing --

Response:
local DataStoreService = game:GetService("DataStoreService")
local Players = game:GetService("Players")
local DataStore = DataStoreService:GetOrderedDataStore("Fails")
local Frame = script.Parent.Frame
local Contents = Frame.Contents
local Template = script.objTemplate

local COLORS = {
	Default = Color3.fromRGB(38, 50, 56),
	Gold = Color3.fromRGB(255, 215, 0),
	Silver = Color3.fromRGB(192, 192, 192),
	Bronze = Color3.fromRGB(205, 127, 50)
}
local ABBREVIATIONS = { "K", "M", "B", "T" }

local function toHumanReadableNumber(num)
	if num < 1000 then
		return tostring(num)
	end

	local digits = math.floor(math.log10(num)) + 1
	local index = math.min(#ABBREVIATIONS, math.floor((digits - 1) / 3))
	local front = num / math.pow(10, index * 3)

	return string.format("%i%s+", front, ABBREVIATIONS[index])
end

local function getItems()
	local data = DataStore:GetSortedAsync(false, maxItems, minValueDisplay, maxValueDisplay)
	local topPage = data:GetCurrentPage()

	Contents.Items.Nothing.Visible = #topPage == 0 and true or false

	for position, v in ipairs(topPage) do
		local userId = v.key
		local value = v.value
		local username = "[Not Available]"
		local color = COLORS.Default

		local success, err = pcall(function()
			username = Players:GetNameFromUserIdAsync(userId)
		end)

		if position == 1 then
			color = COLORS.Gold
		elseif position == 2 then
			color = COLORS.Silver
		elseif position == 3 then
			color = COLORS.Bronze
		end

		local item = Template:Clone()
		item.Name = username
		item.LayoutOrder = position
		item.Values.Number.TextColor3 = color
		item.Values.Number.Text = position
		item.Values.Username.Text = username
		item.Values.Value.Text = abbreviateValue and toHumanReadableNumber(value) or value
		item.Parent = Contents.Items
	end
end

script.Parent.Parent.Color = headingColor
Frame.Heading.ImageColor3 = headingColor
Frame.Heading.Bar.BackgroundColor3 = headingColor

while true do
	for _, player in pairs(Players:GetPlayers()) do
		local leaderstats = player:FindFirstChild("leaderstats")

		if not leaderstats then
			warn("Couldn't find leaderstats!")
			break
		end

		local statsValue = leaderstats:FindFirstChild(statsName)

		if not statsValue then
			warn("Couldn't find " .. statsName .. " in leaderstats!")
			break
		end

		pcall(function()
			DataStore:UpdateAsync(player.UserId, function()
				return tonumber(statsValue.Value)
			end)
		end)
	end

	for _, item in pairs(Contents.Items:GetChildren()) do
		if item:IsA("Frame") then
			item:Destroy()
		end
	end

	getItems()

	wait()
	Frame.Heading.Heading.Text = statsName .. " Leaderboard"
	Contents.GuideTopBar.Value.Text = statsName
	wait(updateEvery)
end


Prompt:
--[[
	Returns the current value of this ComputedPairs object.
	The object will be registered as a dependency unless `asDependency` is false.
]]

Response:
function class:get(asDependency: boolean?)
	if asDependency ~= false then
		useDependency(self)
	end
	return self._outputTable
end


Prompt:
--[[**
	Returns a t.union of each value in the table as a t.literal

	@param valueTable The table to get values from

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

Response:
function t.valueOf(valueTable)
	local values = {}
	local length = 0
	for _, value in pairs(valueTable) do
		length = length + 1
		values[length] = value
	end

	return t.literal(table.unpack(values, 1, length))
end


Prompt: ---[[ Channel Settings ]]

Response:
module.GeneralChannelName = "All" -- You can set to nil to turn off echoing to a general channel.
module.EchoMessagesInGeneralChannel = true -- Should messages to channels other than general be echoed into the general channel.