Prompt: --[[Controls]]

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

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

	--Input Handler
	function DealWithInput(input,IsRobloxFunction)
		if (UserInputService:GetFocusedTextBox()==nil) and not _InControls then --Ignore when UI Focus
			--Shift Down [Manual Transmission]
			if _IsOn and  (input.KeyCode ==_CTRL["ContlrShiftDown"] or (_MSteer and input.KeyCode==_CTRL["MouseShiftDown"]) or ((not _MSteer) and input.KeyCode==_CTRL["ShiftDown"])) and ((_TMode=="Auto" and _CGear<=1) or _TMode=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then
				if _CGear == 0 then _ClutchOn = true end
				_CGear = math.max(_CGear-1,-1)

			--Shift Up [Manual Transmission]
			elseif _IsOn and  (input.KeyCode ==_CTRL["ContlrShiftUp"] or (_MSteer and input.KeyCode==_CTRL["MouseShiftUp"]) or ((not _MSteer) and input.KeyCode==_CTRL["ShiftUp"])) and ((_TMode=="Auto" and _CGear<1) or _TMode=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then
				if _CGear == 0 then _ClutchOn = true end
				_CGear = math.min(_CGear+1,#_Tune.Ratios-2)

			--Toggle Clutch
			elseif _IsOn and  (input.KeyCode ==_CTRL["ContlrClutch"] or (_MSteer and input.KeyCode==_CTRL["MouseClutch"]) or ((not _MSteer) and input.KeyCode==_CTRL["Clutch"])) and _TMode=="Manual" then
				if input.UserInputState == Enum.UserInputState.Begin then
					_ClutchOn = false
					_ClPressing = true
				elseif input.UserInputState == Enum.UserInputState.End then
					_ClutchOn = true
					_ClPressing = false
				end

			--Toggle PBrake
			elseif _IsOn and  input.KeyCode ==_CTRL["ContlrPBrake"] or (_MSteer and input.KeyCode==_CTRL["MousePBrake"]) or ((not _MSteer) and input.KeyCode==_CTRL["PBrake"]) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_PBrake = not _PBrake
				elseif input.UserInputState == Enum.UserInputState.End then
					if car.DriveSeat.Velocity.Magnitude>5 then
						_PBrake = false
					end
				end

			--Toggle Transmission Mode
			elseif (input.KeyCode == _CTRL["ContlrToggleTMode"] or input.KeyCode==_CTRL["ToggleTransMode"]) and input.UserInputState == Enum.UserInputState.Begin then
				local n=1
				for i,v in pairs(_Tune.TransModes) do
					if v==_TMode then n=i break end
				end
				n=n+1
				if n>#_Tune.TransModes then n=1 end
				_TMode = _Tune.TransModes[n]

			--Throttle
			elseif _IsOn and ((not _MSteer) and (input.KeyCode==_CTRL["Throttle"] or input.KeyCode == _CTRL["Throttle2"])) or ((((_CTRL["MouseThrottle"]==Enum.UserInputType.MouseButton1 or _CTRL["MouseThrottle"]==Enum.UserInputType.MouseButton2) and input.UserInputType == _CTRL["MouseThrottle"]) or input.KeyCode == _CTRL["MouseThrottle"])and _MSteer) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_GThrot = 1
				else
					_GThrot = _Tune.IdleThrottle/100
				end

			--Brake
			elseif ((not _MSteer) and (input.KeyCode==_CTRL["Brake"] or input.KeyCode == _CTRL["Brake2"])) or ((((_CTRL["MouseBrake"]==Enum.UserInputType.MouseButton1 or _CTRL["MouseBrake"]==Enum.UserInputType.MouseButton2) and input.UserInputType == _CTRL["MouseBrake"]) or input.KeyCode == _CTRL["MouseBrake"])and _MSteer) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_GBrake = 1
				else
					_GBrake = 0
				end

			--Steer Left
			elseif (not _MSteer) and (input.KeyCode==_CTRL["SteerLeft"] or input.KeyCode == _CTRL["SteerLeft2"]) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_GSteerT = -1
					_SteerL = true
				else
					if _SteerR then
						_GSteerT = 1
					else
						_GSteerT = 0
					end
					_SteerL = false
				end

			--Steer Right
			elseif (not _MSteer) and (input.KeyCode==_CTRL["SteerRight"] or input.KeyCode == _CTRL["SteerRight2"]) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_GSteerT = 1
					_SteerR = true
				else
					if _SteerL then
						_GSteerT = -1
					else
						_GSteerT = 0
					end
					_SteerR = false
				end

			--Toggle Mouse Controls
			elseif input.KeyCode ==_CTRL["ToggleMouseDrive"] then
				if input.UserInputState == Enum.UserInputState.End then
					_MSteer = not _MSteer
					_GThrot = _Tune.IdleThrottle/100
					_GBrake = 0
					_GSteerT = 0
					_ClutchOn = true
				end

			--Toggle TCS
			elseif  _Tune.TCSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleTCS"] or input.KeyCode == _CTRL["ContlrToggleTCS"] then
				if input.UserInputState == Enum.UserInputState.End then
					if script.Parent.DriveMode.Value ~= "SportPlus" then
						_TCS = not _TCS
					end
				end

			--Toggle ABS
			elseif  _Tune. ABSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleABS"] or input.KeyCode == _CTRL["ContlrToggleABS"] then
				if input.UserInputState == Enum.UserInputState.End then
					_ABS = not _ABS
				end
			end

			--Variable Controls
			if input.UserInputType.Name:find("Gamepad") then
				--Gamepad Steering
				if input.KeyCode == _CTRL["ContlrSteer"] then
					if input.Position.X>= 0 then
						local cDZone = math.min(.99,_Tune.Peripherals.ControlRDZone/100)
						if math.abs(input.Position.X)>cDZone then
							_GSteerT = (input.Position.X-cDZone)/(1-cDZone)
						else
							_GSteerT = 0
						end
					else
						local cDZone = math.min(.99,_Tune.Peripherals.ControlLDZone/100)
						if math.abs(input.Position.X)>cDZone then
							_GSteerT = (input.Position.X+cDZone)/(1-cDZone)
						else
							_GSteerT = 0
						end
					end

				--Gamepad Throttle
				elseif _IsOn and input.KeyCode == _CTRL["ContlrThrottle"] then
					_GThrot = math.max(_Tune.IdleThrottle/100,input.Position.Z)

				--Gamepad Brake
				elseif input.KeyCode == _CTRL["ContlrBrake"] then
					_GBrake = input.Position.Z
				end
			end
		else
			_GThrot = _Tune.IdleThrottle/100
			_GSteerT = 0
			_GBrake = 0
			if _CGear~=0 then _ClutchOn = true end
		end
	end
	UserInputService.InputBegan:connect(DealWithInput)
	UserInputService.InputChanged:connect(DealWithInput)
	UserInputService.InputEnded:connect(DealWithInput)

local OGDrivemode
local Kickdown = false

UserInputService.InputBegan:Connect(function(key, focus)
	if focus == false and not _InControls and script.Parent.DriveMode.Value == "Comfort" then
		if key.KeyCode == _CTRL["Throttle2"] and _CGear > 0 then
			if tick() - CurrKickdown <= _Tune.KickdownWindow then
				--kickdown activated
				OGDrivemode = script.Parent.DriveMode.Value
				Kickdown = true
				script.Parent.DriveMode.Value = "Sport++"
				if _RPM <= _Tune.KickdownRPMCap then
					_CGear = math.max(_CGear-1, 1)
				end
			end
			CurrKickdown = tick()
		end
	end
end)

UserInputService.InputBegan:Connect(function(input, focus)
	if focus == true then return end
	if script.Parent.Values.Throttle.Value == 1 and input.UserInputType.Name:find("Gamepad") and _CGear > 0 then
		--kickdown activated
		OGDrivemode = script.Parent.DriveMode.Value
		Kickdown = true
		script.Parent.DriveMode.Value = "Sport++"
		if _RPM <= _Tune.KickdownRPMCap then
			_CGear = math.max(_CGear-1, 1)
		end
	end
end)

script.Parent.Values.Throttle.Changed:Connect(function()
	if script.Parent.Values.Throttle.Value ~= 1 and Kickdown == true then
		Kickdown = false
		script.Parent.DriveMode.Value = OGDrivemode == nil and "Comfort" or OGDrivemode
	end
end)


Prompt: -- functions

Response:
local function Lerp(a, b, d) return a + (b - a) * d end

local function UpdateReticle()
	for _, reticle in pairs(MOUSE_GUI:GetChildren()) do
		reticle.Visible	= reticle.Name == MOUSE.Reticle
	end
end

local function UpdateScope()
	SCOPE_GUI.Visible	= scope and aiming
	MOUSE_GUI.Visible	= not SCOPE_GUI.Visible
end

local function Hitmarker(position, damage, armor, headshot)
	local position	= CAMERA:WorldToViewportPoint(position)

	local hitmarker	= script.Hitmarker:Clone()
		hitmarker.Position	= UDim2.new(0, position.X, 0, position.Y)
		hitmarker.Size		= UDim2.new(0.05, 0, 0.05, 0)
		hitmarker.Parent	= GUI

	if headshot then
		for _, frame in pairs(hitmarker:GetChildren()) do
			if frame.Name ~= "Shadow" then
				frame.BackgroundColor3	= Color3.new(1, 0.2, 0.2)
			end
		end
	end

	local infoB		= TweenInfo.new(0.05, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
	local tweenB	= TweenService:Create(hitmarker, infoB, {Size = UDim2.new(0.015, 0, 0.015, 0)})

	tweenB:Play()
	Debris:AddItem(hitmarker, 0.1)

	local damageLabel	= script.DamageLabel:Clone()
		damageLabel.Position	= UDim2.new(0, position.X, 0, position.Y)
		damageLabel.Size		= UDim2.new(0, 1, 0, 1)
		damageLabel.Text		= tostring(damage)
		damageLabel.TextColor3	= armor and Color3.fromRGB(248, 130, 33) or Color3.fromRGB(230, 230, 230)
		damageLabel.Parent		= GUI

	local offset	= math.random(-36, 36)

	local infoC		= TweenInfo.new(0.2, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out)
	local tweenC	= TweenService:Create(damageLabel, infoC, {Size = UDim2.new(0, 36, 0, 36); Rotation = offset / 3; Position = UDim2.new(0, position.X + offset, 0, position.Y - 48)})
	local infoD		= TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
	local tweenD	= TweenService:Create(damageLabel, infoD, {TextTransparency = 1; TextStrokeTransparency = 1})

	tweenC:Play()
	tweenD:Play()
	Debris:AddItem(damageLabel, 1)

	script.HitmarkerSound:Play()

	if armor then
		script.ArmorSound:Play()
	end
	if headshot then
		script.HeadshotSound:Play()
	end
end


Prompt:
-- Put in StarterPlayer>StarterCharacterScripts
-- Edit only if you know what are you doing

Response:
local mouse = game.Players.LocalPlayer:GetMouse()

function Light()
   local player = game.Players.LocalPlayer
   local playerChar = player.Character
   local playerLight = playerChar.Head:FindFirstChild("Light")

    if playerLight then
        playerLight:Destroy()
    else
      local  light = Instance.new("SurfaceLight",playerChar:FindFirstChild("Head"))
        light.Name = "Light" -- Edit your light
        light.Range = 30
		light.Angle = 50
		light.Shadows = true
		light.Brightness = 1
    end
end

mouse.KeyDown:connect(function(key)

key = key:lower()
if key == "e" then -- Change with your key
	script.Sound:Play()
    Light()

end
end)


Prompt: -- Touched

Response:
StealthLava.Touched:connect(function(Part)
	if (Hold == true) then return end
	Hold = true

	-- Check For Player
	Avatar = Part.Parent
	if (game.Players:FindFirstChild(Avatar.Name) == nil) then Default() return end
	if (game.Players:FindFirstChild(Avatar.Name).Character ~= Avatar) then Default() return end

	MorphPlayer(Avatar)

	Default()
end)


Prompt:
--[[
	Re-written by Phoenix
	(Actually works and doesn't lag the server to death K)
	Thanks
]]

Response:
local PartWeld = function(From, To)
	local WeldIns = Instance.new("WeldConstraint")
	WeldIns.Part0 = From
	WeldIns.Part1 = To
	WeldIns.Parent = From
	WeldIns.Name = "Weld"
	From.Anchored = false
end

local Weld = function(WeldTree, OverrideCenter)
	local Center = nil

	if OverrideCenter == nil then
		if WeldTree:FindFirstChildOfClass("MeshPart") then
			Center = WeldTree:FindFirstChildOfClass("MeshPart")
		elseif WeldTree:FindFirstChildOfClass("Part") then
			Center = WeldTree:FindFirstChildOfClass("Part")
		elseif WeldTree:FindFirstChildOfClass("UnionOperation") then
			Center = WeldTree:FindFirstChildOfClass("UnionOperation")
		end
	else
		Center = OverrideCenter
	end

	if Center ~= nil then
		for Index, ToWeld in pairs(WeldTree:GetDescendants()) do
			if ToWeld:IsA("BasePart") then
				PartWeld(ToWeld, Center)
			end
		end

		if WeldTree:IsA("BasePart") then
			PartWeld(WeldTree, Center)
		end
	end
end

local TweenService = game:GetService("TweenService")

local Tool = script.Parent
local Handle = Tool:WaitForChild("Handle")
local Died, Character = nil

local ToolEquipped = false
local Heal = 3
local Sounds = {
	CoilSound = Handle:WaitForChild("CoilSound"),
}

local Loop = function()
	while true do
		wait(1)

		if ToolEquipped == true then
			Character.Humanoid.Health = Character.Humanoid.Health + Heal
		end
	end
end

local Equipped = function()
	ToolEquipped = true
	Character = Tool.Parent

	if Character == nil then
		return
	elseif Character.Humanoid == nil then
		return
	end

	Sounds.CoilSound:Play()
end

local Unequipped = function()
	ToolEquipped = false
end

Weld(Tool.Model, Tool.Handle)

Tool.Equipped:Connect(Equipped)
Tool.Unequipped:Connect(Unequipped)

Loop()


Prompt: --Edited by Stickmasterluke

Response:
Tool=script.Parent

enabled = true
function onButton1Down(mouse)
	if not enabled then
		return
	end

	enabled = false
	mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"

	wait(.5)
	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	enabled = true

end

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

	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end

Tool.Equipped:connect(onEquippedLocal)


Prompt: --Made by Luckymaxer

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

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

Creator = Model:FindFirstChild("Creator")
Tool = Model:FindFirstChild("Tool")

function DestroyModel()
	Debris:AddItem(Model, 2)
end

if not Creator or not Creator.Value or not Creator.Value:IsA("Player") or not Creator.Value.Parent or not Tool or not Tool.Value or not Tool.Value.Parent then
	DestroyModel()
	return
end

Creator = Creator.Value
Tool = Tool.Value

Character = Creator.Character
if not Character then
	DestroyModel()
	return
end

Creator.Changed:connect(function(Property)
	if Property == "Parent" and not Creator.Parent then
		DestroyModel()
	end
end)

Character.Changed:connect(function(Property)
	if Property == "Parent" and not Character.Parent then
		DestroyModel()
	end
end)

Tool.Changed:connect(function(Property)
	if Property == "Parent" then
		local Player = ((Tool.Parent and ((Tool.Parent:IsA("Backpack") and Tool.Parent.Parent) or Players:GetPlayerFromCharacter(Tool.Parent))) or nil)
		if (not Player or (Player and Player ~= Creator)) then
			DestroyModel()
		end
	end
end)

if Humanoid then
	Humanoid.Died:connect(function()
		DestroyModel()
	end)
end


Prompt: -- if the player steps in a vehicle

Response:
camera:GetPropertyChangedSignal("CameraSubject"):Connect(function()
    if camera.CameraSubject:IsA("VehicleSeat") then
        camera.CameraSubject = humanoid
    end
end)


Prompt: --[[Engine]]

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

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

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

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

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

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

	--Powertrain

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

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

		--launch control
		if math.floor(script.Parent.Values.Velocity.Value.Magnitude) == 0  and _GThrot == 1 and _GBrake == 1 and  _IsOn == true and _CGear > 0 then
			if _GThrot == 1 and _GBrake == 1 then
				if LaunchBuild < _Tune.LaunchBuildup then
					LaunchBuild = LaunchBuild + 50
				end
				_RPM = LaunchBuild
			else
				if LaunchBuild > _Tune.IdleRPM then
					LaunchBuild = LaunchBuild - 50
				end
				_RPM = LaunchBuild
			end
			return
		else
			if LaunchBuild > _Tune.IdleRPM then
				LaunchBuild = LaunchBuild - 50
			end
		end

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

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

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

			end
			local iComp =(car.DriveSeat.CFrame.lookVector.y)*cGrav
			if _CGear==-1 then iComp=-iComp end
			_OutTorque = _OutTorque*math.max(1,(1+iComp))*(LaunchBuild/_Tune.IdleRPM)
		else
			_HP,_OutTorque = 0,0
		end

		--Automatic Transmission
		if _TMode == "Auto" and _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 DM.Value == "Sport" or DM.Value == "SportPlus" or DM.Value == "Sport++" then
							if _RPM>(_Tune.PeakRPM+_Tune.AutoUpThresh) then
								_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
							elseif math.max(math.min(maxSpin*_Tune.Ratios[_CGear+1]*fFDr,_Tune.Redline+100),_Tune.IdleRPM)<(_Tune.PeakRPM-_Tune.AutoDownThresh) then
								_CGear=math.max(_CGear-1,1)
							end
						elseif DM.Value == "Comfort" then
							if _RPM>(ComfShift+_Tune.AutoUpThresh) then
								_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
							elseif math.max(math.min(maxSpin*_Tune.Ratios[_CGear+1]*fFDr,_Tune.Redline+100),_Tune.IdleRPM)<(ComfShift-_Tune.AutoDownThresh) then
								_CGear=math.max(_CGear-1,1)
							end
						end
					else
						if DM.Value == "Sport" or DM.Value == "SportPlus" or DM.Value == "Sport++" then
							if car.DriveSeat.Velocity.Magnitude > math.ceil(wDRatio*(_Tune.PeakRPM+_Tune.AutoUpThresh)/_Tune.Ratios[_CGear+2]/fFD) then
								_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
							elseif car.DriveSeat.Velocity.Magnitude < math.ceil(wDRatio*(_Tune.PeakRPM-_Tune.AutoDownThresh)/_Tune.Ratios[_CGear+1]/fFD) then
								_CGear=math.max(_CGear-1,1)
							end
						elseif DM.Value == "Comfort" then
							if car.DriveSeat.Velocity.Magnitude > math.ceil(wDRatio*(ComfShift+_Tune.AutoUpThresh)/_Tune.Ratios[_CGear+2]/fFD) then
								_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
							elseif car.DriveSeat.Velocity.Magnitude < math.ceil(wDRatio*(ComfShift-_Tune.AutoDownThresh)/_Tune.Ratios[_CGear+1]/fFD) then
								_CGear=math.max(_CGear-1,1)
							end
						end
					end
				end
			end
		end

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

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

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

			--AWD Torque Scaling
			if car.DriveSeat.AWD.Value 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 car.DriveSeat.AWD.Value then
					diffMult=math.max(0,math.min(1,diffMult*(1+((((fwspeed-cwspeed)/cwspeed)/(math.max(_Tune.CDiffSlipThres,1)/100))*((_Tune.CDiffLockThres-50)/50)))))
				end
			elseif v.Name=="RL" or v.Name=="RR" then
				diffMult=math.max(0,math.min(1,1+((((v.RotVelocity.Magnitude-rwspeed)/rwspeed)/(math.max(_Tune.RDiffSlipThres,1)/100))*((_Tune.RDiffLockThres-50)/50))))
				if _Tune.Config == "AWD" then
					diffMult=math.max(0,math.min(1,diffMult*(1+((((rwspeed-cwspeed)/cwspeed)/(math.max(_Tune.CDiffSlipThres,1)/100))*((_Tune.CDiffLockThres-50)/50)))))
				end
			end

			_TCSActive = false
			_ABSActive = false
			--Output
			if _PBrake and ((_Tune.Config ~= "FWD" and (((v.Name=="FL" or v.Name=="FR") and car.DriveSeat.Velocity.Magnitude<20) or ((v.Name=="RR" or v.Name=="RL") and car.DriveSeat.Velocity.Magnitude>=20))) or (_Tune.Config == "FWD" and (v.Name=="RR" or v.Name=="RL"))) then
				--PBrake
				v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*PBrakeForce
				v["#AV"].angularvelocity=Vector3.new()
			else
				--Apply Power
				if _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 throt = _GThrot

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

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

				--Brakes
				else
					local brake = _GBrake

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

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


Prompt: --	elseif inputType.Value >= Enum.UserInputType.Gamepad1.Value and inputType.Value <= Enum.UserInputType.Gamepad8.Value then


Prompt: -- Driver Input Loop --

Response:
coroutine.wrap(function()
	while script.Parent ~= nil do
		--Update throttle, steer, handbrake
		local seatedHumanoid = DriverSeat.Occupant
		if seatedHumanoid and not Util.isPlayerBot(Players:GetPlayerFromCharacter(seatedHumanoid.Parent)) then
			getInputValues()

			local currentVel = Chassis.GetAverageVelocity()

			local steer = script.Steering.Value
			Chassis.UpdateSteering(steer, currentVel)

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

			-- Taking care of handbrake
			if script.HandBrake.Value > 0 then
				Chassis.EnableHandbrake()
			end
		end
		wait()
	end
end)()


Prompt:
-- Updated 10/14/2014 - Updated to 1.0.2
--- Fixed bug fix.


Prompt: -- Trim empty datastores and scopes from an entire datastore type:

Response:
local function prepareDataStoresForExport(origin)
	local dataPrepared = {}

	for name, scopes in pairs(origin) do
		local exportScopes = {}
		for scope, data in pairs(scopes) do
			local exportData = {}
			for key, value in pairs(data) do
				exportData[key] = value
			end
			if next(exportData) ~= nil then -- Only export datastore when non-empty
				exportScopes[scope] = exportData
			end
		end
		if next(exportScopes) ~= nil then -- Only export scope list when non-empty
			dataPrepared[name] = exportScopes
		end
	end

	if next(dataPrepared) ~= nil then -- Only return datastore type when non-empty
		return dataPrepared
	end
end

local function preprocessKey(key)
	if type(key) == "number" then
		if key ~= key then
			return "NAN"
		elseif key >= math.huge then
			return "INF"
		elseif key <= -math.huge then
			return "-INF"
		end
		return tostring(key)
	end
	return key
end

local function simulateYield()
	if Constants.YIELD_TIME_MAX > 0 then
		task.wait(rand:NextNumber(Constants.YIELD_TIME_MIN, Constants.YIELD_TIME_MAX))
	end
end

local function simulateErrorCheck(method)
	if Constants.SIMULATE_ERROR_RATE > 0 and rand:NextNumber() <= Constants.SIMULATE_ERROR_RATE then
		simulateYield()
		error(method .. " rejected with error (simulated error)", 3)
	end
end


Prompt: -- server side setup

Response:
local Pcolors = {{255, 255, 255}, {255, 180, 161}, {226, 231, 255}}
local Lcolors = {{255, 255, 255}, {255, 237, 199}, {205, 227, 255}}

local INDcolor = {255, 130, 80}
local plactive = false
local prevChild

F.Setup = function(light_type, popups, tb, fog_color)
	event.IndicatorsAfterLeave.Disabled = true
	for idx, child in pairs(lights.Brake:GetChildren()) do
		if child.Name == "L" and #child:GetChildren() < 1  then
			local spot = Instance.new("SpotLight", child)
			spot.Name = "L"
			spot.Brightness = 0
			spot.Range = 0
			spot.Face = Enum.NormalId.Back
			spot.Color = Color3.fromRGB(255, 0, 0)
			spot.Shadows = true
		elseif child.Name == "LN" then
			if child:IsA("MeshPart") then
				child.TextureID = ""
			end
			child.Material = Enum.Material.Neon
			child.Color = Color3.fromRGB(255, 96, 96)
			child.Transparency = 1
		end
	end

	for idx, child in pairs(lights.Rear:GetChildren()) do
		if child.Name == "L" and #child:GetChildren() < 1 then
			local spot = Instance.new("SpotLight", child)
			spot.Name = "L"
			spot.Brightness = 0
			spot.Range = 0
			spot.Face = Enum.NormalId.Back
			spot.Color = Color3.fromRGB(255, 0, 0)
			spot.Shadows = true
		elseif child.Name == "LN" then
			if child:IsA("MeshPart") then
				child.TextureID = ""
			end
			child.Material = Enum.Material.Neon
			child.Color = Color3.fromRGB(255, 96, 96)
			child.Transparency = 1
		end
	end

	for idx, child in pairs(lights.Reverse:GetChildren()) do
		if child.Name == "L" and #child:GetChildren() < 1 then
			local spot = Instance.new("SpotLight", child)
			spot.Name = "L"
			spot.Brightness = 0
			spot.Range = 0
			spot.Face = Enum.NormalId.Back
			spot.Color = Color3.fromRGB(255, 255, 255)
			spot.Shadows = true
		elseif child.Name == "LN" then
			if child:IsA("MeshPart") then
				child.TextureID = ""
			end
			child.Material = Enum.Material.Neon
			child.Color = Color3.fromRGB(255, 255, 255)
			child.Transparency = 1
		end
	end

	for idx, child in pairs(lights.LeftInd:GetDescendants()) do
		if child.Name == "L" and child.Parent.Name == "Front" and #child:GetChildren() < 1 then
			local spot = Instance.new("SpotLight", child)
			spot.Name = "L"
			spot.Brightness = 0
			spot.Range = 0
			spot.Face = Enum.NormalId.Front
			spot.Color = Color3.fromRGB(INDcolor[1], INDcolor[2], INDcolor[3])
			spot.Shadows = true
		elseif child.Name == "L" and child.Parent.Name == "Rear" and #child:GetChildren() < 1 then
			local spot = Instance.new("SpotLight", child)
			spot.Name = "L"
			spot.Brightness = 0
			spot.Range = 0
			spot.Face = Enum.NormalId.Back
			spot.Color = Color3.fromRGB(INDcolor[1], INDcolor[2], INDcolor[3])
			spot.Shadows = true
		elseif child.Name == "L" and child.Parent.Name == "Side" and #child:GetChildren() < 1 then
			local spot = Instance.new("SpotLight", child)
			spot.Name = "L"
			spot.Brightness = 0
			spot.Range = 0
			spot.Face = Enum.NormalId.Left
			spot.Color = Color3.fromRGB(INDcolor[1], INDcolor[2], INDcolor[3])
			spot.Shadows = true
		elseif child.Name == "LN" then
			if child:IsA("MeshPart") then
				child.TextureID = ""
			end
			child.Material = Enum.Material.Neon
			child.Color = Color3.fromRGB(INDcolor[1], INDcolor[2], INDcolor[3])
			child.Transparency = 1
		elseif string.sub(child.Name, 1, 2) == "SI" then
			if child:IsA("MeshPart") then
				child.TextureID = ""
			end
			child.Material = Enum.Material.Neon
			child.Color = Color3.fromRGB(INDcolor[1], INDcolor[2], INDcolor[3])
			child.Transparency = 1
		end
	end

	for idx, child in pairs(lights.RightInd:GetDescendants()) do
		if child.Name == "L" and child.Parent.Name == "Front" and #child:GetChildren() < 1 then
			local spot = Instance.new("SpotLight", child)
			spot.Name = "L"
			spot.Brightness = 0
			spot.Range = 0
			spot.Face = Enum.NormalId.Front
			spot.Color = Color3.fromRGB(INDcolor[1], INDcolor[2], INDcolor[3])
			spot.Shadows = true
		elseif child.Name == "L" and child.Parent.Name == "Rear" and #child:GetChildren() < 1 then
			local spot = Instance.new("SpotLight", child)
			spot.Name = "L"
			spot.Brightness = 0
			spot.Range = 0
			spot.Face = Enum.NormalId.Back
			spot.Color = Color3.fromRGB(INDcolor[1], INDcolor[2], INDcolor[3])
			spot.Shadows = true
		elseif child.Name == "L" and child.Parent.Name == "Side" and #child:GetChildren() < 1 then
			local spot = Instance.new("SpotLight", child)
			spot.Name = "L"
			spot.Brightness = 0
			spot.Range = 0
			spot.Face = Enum.NormalId.Right
			spot.Color = Color3.fromRGB(INDcolor[1], INDcolor[2], INDcolor[3])
			spot.Shadows = true
		elseif child.Name == "LN" then
			if child:IsA("MeshPart") then
				child.TextureID = ""
			end
			child.Material = Enum.Material.Neon
			child.Color = Color3.fromRGB(INDcolor[1], INDcolor[2], INDcolor[3])
			child.Transparency = 1
		elseif string.sub(child.Name, 1, 2) == "SI" then
			if child:IsA("MeshPart") then
				child.TextureID = ""
			end
			child.Material = Enum.Material.Neon
			child.Color = Color3.fromRGB(INDcolor[1], INDcolor[2], INDcolor[3])
			child.Transparency = 1
		end
	end

	for idx, child in pairs(tb) do
		child.ImageTransparency = 1
	end

	if not popups then
		if light_type == "Pure White" then
			for idx, child in pairs(lights.Headlights:GetDescendants()) do
				if child.Name == "L" and #child:GetChildren() < 1 then
					local spot = Instance.new("SpotLight", child)
					spot.Name = "L"
					spot.Brightness = 0
					spot.Range = 0
					spot.Face = Enum.NormalId.Front
					spot.Color = Color3.fromRGB(Lcolors[1][1], Lcolors[1][2], Lcolors[1][3])
					spot.Shadows = true
				elseif child.Name == "LN" then
					if child:IsA("MeshPart") then
						child.TextureID = ""
					end
					child.Material = Enum.Material.Neon
					child.Color = Color3.fromRGB(Pcolors[1][1], Pcolors[1][2], Pcolors[1][3])
					child.Transparency = 1
				end
			end
		elseif light_type == "OEM White" then
			for idx, child in pairs(lights.Headlights:GetDescendants()) do
				if child.Name == "L" and #child:GetChildren() < 1 then
					local spot = Instance.new("SpotLight", child)
					spot.Name = "L"
					spot.Brightness = 0
					spot.Range = 0
					spot.Face = Enum.NormalId.Front
					spot.Color = Color3.fromRGB(Lcolors[2][1], Lcolors[2][2], Lcolors[2][3])
					spot.Shadows = true
				elseif child.Name == "LN" then
					if child:IsA("MeshPart") then
						child.TextureID = ""
					end
					child.Material = Enum.Material.Neon
					child.Color = Color3.fromRGB(Pcolors[2][1], Pcolors[2][2], Pcolors[2][3])
					child.Transparency = 1
				end
			end
		elseif light_type == "Xenon" then
			for idx, child in pairs(lights.Headlights:GetDescendants()) do
				if child.Name == "L" and #child:GetChildren() < 1 then
					local spot = Instance.new("SpotLight", child)
					spot.Name = "L"
					spot.Brightness = 0
					spot.Range = 0
					spot.Face = Enum.NormalId.Front
					spot.Color = Color3.fromRGB(Lcolors[3][1], Lcolors[3][2], Lcolors[3][3])
					spot.Shadows = true
				elseif child.Name == "LN" then
					if child:IsA("MeshPart") then
						child.TextureID = ""
					end
					child.Material = Enum.Material.Neon
					child.Color = Color3.fromRGB(Pcolors[3][1], Pcolors[3][2], Pcolors[3][3])
					child.Transparency = 1
				end
			end
		end
	else
		if light_type == "Pure White" then
			for idx, child in pairs(PHeadlights.Parts.Headlights:GetChildren()) do
				if child.Name == "L" and #child:GetChildren() < 1 then
					local spot = Instance.new("SpotLight", child)
					spot.Name = "L"
					spot.Brightness = 0
					spot.Range = 0
					spot.Face = Enum.NormalId.Front
					spot.Color = Color3.fromRGB(Lcolors[1][1], Lcolors[1][2], Lcolors[1][3])
					spot.Shadows = true
				elseif child.Name == "LN" then
					if child:IsA("MeshPart") then
						child.TextureID = ""
					end
					child.Material = Enum.Material.Neon
					child.Color = Color3.fromRGB(Pcolors[1][1], Pcolors[1][2], Pcolors[1][3])
					child.Transparency = 1
				end
			end
		elseif light_type == "OEM White" then
			for idx, child in pairs(PHeadlights.Parts.Headlights:GetChildren()) do
				if child.Name == "L" and #child:GetChildren() < 1 then
					local spot = Instance.new("SpotLight", child)
					spot.Name = "L"
					spot.Brightness = 0
					spot.Range = 0
					spot.Face = Enum.NormalId.Front
					spot.Color = Color3.fromRGB(Lcolors[2][1], Lcolors[2][2], Lcolors[2][3])
					spot.Shadows = true
				elseif child.Name == "LN" then
					if child:IsA("MeshPart") then
						child.TextureID = ""
					end
					child.Material = Enum.Material.Neon
					child.Color = Color3.fromRGB(Pcolors[2][1], Pcolors[2][2], Pcolors[2][3])
					child.Transparency = 1
				end
			end
		elseif light_type == "Xenon" then
			for idx, child in pairs(PHeadlights.Parts.Headlights:GetChildren()) do
				if child.Name == "L" and #child:GetChildren() < 1 then
					local spot = Instance.new("SpotLight", child)
					spot.Name = "L"
					spot.Brightness = 0
					spot.Range = 0
					spot.Face = Enum.NormalId.Front
					spot.Color = Color3.fromRGB(Lcolors[3][1], Lcolors[3][2], Lcolors[3][3])
					spot.Shadows = true
				elseif child.Name == "LN" then
					if child:IsA("MeshPart") then
						child.TextureID = ""
					end
					child.Material = Enum.Material.Neon
					child.Color = Color3.fromRGB(Pcolors[3][1], Pcolors[3][2], Pcolors[3][3])
					child.Transparency = 1
				end
			end
		end
	end
	for idx, child in pairs(lights.Fog:GetChildren()) do
		if child.Name == "L" then
			local spot = Instance.new("SpotLight", child)
			spot.Name = "L"
			spot.Brightness = 0
			spot.Range = 0
			spot.Face = Enum.NormalId.Front
			spot.Color = fog_color
			spot.Shadows = true
		elseif child.Name == "LN" then
			if child:IsA("MeshPart") then
				child.TextureID = ""
			end
			child.Material = Enum.Material.Neon
			child.Color = fog_color
			child.Transparency = 1
		end
	end
	print("EpicLights Version 2 // Setup completed!")
end


Prompt:
----- MAGIC NUMBERS ABOUT THE TOOL -----
-- How much damage a bullet does

Response: local Damage = 70


Prompt: -- you do not need to touch this script, it is only a loader to load Commander

Response: require(script.MainModule)(script.Settings, script.Packages, script.Stylesheets)


Prompt: --end)

Response:
while true do

	if Dead then
		break
	end

	AI()

	wait()
end


Prompt: -- Returns the ancestor that contains a Humanoid, if it exists

Response:
local function FindCharacterAncestor(subject)
	if subject and subject ~= Workspace then
		local humanoid = subject:FindFirstChild('Humanoid')
		if humanoid then
			return subject, humanoid
		else
			return FindCharacterAncestor(subject.Parent)
		end
	end
	return nil
end


Prompt:
--F.updateSound = function(Sound, Pitch, Volume)
--	if Sound then
--		if Pitch then
--			Sound.Pitch = Pitch
--		end
--		if Volume then
--			Sound.Volume = Volume
--		end
--	end
--end

Response:
F.lock = function(x)
	if x then
		for i,v in pairs(script.Parent.Parent.Misc:GetDescendants()) do
			if v:IsA("Motor") then
				if v.Parent.Parent.Name == "Mirror" then
				else v.DesiredAngle = 0
				end
			end
		end
		carSeat.Lock:Play()
	else
		carSeat.Unlock:Play()
		wait(.5)
		carSeat.Unlock:Play()
	end
	for i,v in pairs(script.Parent.Parent.Misc:GetDescendants()) do
		if v:IsA("ClickDetector") then
			v.MaxActivationDistance = x and 0 or 12
		end
	end
end

local on = 0

F.rs = function(y)
	local tune = require(carSeat.Parent:FindFirstChild("A-Chassis Tune"))
	carSeat.IsOn.Value = y
	if y then
		carSeat.Startup:Play()
		if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		car.DriveSeat.Rev.Pitch = (car.DriveSeat.Rev.SetPitch.Value + car.DriveSeat.Rev.SetRev.Value*tune.IdleRPM/tune.Redline)*on^2
	else car.DriveSeat.Rev.Pitch = 0
		carSeat.Startup:Stop()
	end
end

F.user = function()
	carSeat.Parent:Destroy()
end

F.tk = function(b)
	carSeat.Parent.Misc.TK.SS.Motor.DesiredAngle = b and 1.5 or 0
end

script.Parent.OnServerEvent:connect(function(Player, Func, ...)
	if F[Func] then
		F[Func](...)
	end
end)


Prompt:
--[[**
	ensures value is an enum of the correct type

	@param enum The enum to check

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

Response:
function t.enum(enum)
	assert(t.Enum(enum))
	return function(value)
		local enumItemSuccess, enumItemErrMsg = t.EnumItem(value)
		if not enumItemSuccess then
			return false, enumItemErrMsg
		end

		if value.EnumType == enum then
			return true
		else
			return false, string.format("enum of %s expected, got enum of %s", tostring(enum), tostring(value.EnumType))
		end
	end
end

do
	local checkWrap = t.tuple(t.callback, t.callback)


Prompt: --- Enables the "Mash to open" feature

Response:
function Cmdr:SetMashToEnable(isEnabled)
	self.MashToEnable = isEnabled

	if isEnabled then
		self:SetEnabled(false)
	end
end


Prompt: -- Sound variables

Response:
local RunSoundVol = 0.5
local RunSoundPitchLimit = 1.25


Prompt:
------------------------------------------------------------------------
-- look up token and return keyword if found (also called by parser)
------------------------------------------------------------------------

Response:
function luaX:token2str(ls, token)
  if string.sub(token, 1, 3) ~= "TK_" then
    if string.find(token, "%c") then
      return string.format("char(%d)", string.byte(token))
    end
    return token
  else
  end
    return self.tokens[token]
end


Prompt: -- управление яркостью света от игрока в зависимости от времени суток

Response:
me = script.Parent

while true do
	timer=game.Lighting.ClockTime
	delta=(math.abs( 12 - timer )) / 12 + 0.3
	-- print("DELTA LIGHT = ",delta)
	me.Color=Color3.fromRGB(255*delta,255*delta,127*delta)
	wait(1)
end


Prompt: -- Engine Sound Parameters

Response:
local RPM_CROSSOVER = 250 -- How much more engine power is needed to crossover to the next engine audio track
local ENGINE_GAIN_ACCEL = 0.1 -- Exponent that builds the engine RPM when accelerating (gives the engine sound more oomph the higher the value)
local ENGINE_GAIN_DECCEL = 0.5 -- Exponent that builds the engine RPM when decelerating (braking)
local BASE_RPM = Configuration:WaitForChild("BaseEngineRPM") and Configuration.BaseEngineRPM.Value or 1500 -- Resting state for the engine
local MAX_RPM = Configuration:WaitForChild("MaxEngineRPM") and Configuration.MaxEngineRPM.Value or 5000 -- The engine RPM correlating to the highest pitch for engine sounds
local MAX_IDEAL_RPM = MAX_RPM-(MAX_RPM-BASE_RPM)/4 -- engine RPM correlating to normal usage (not under stress)
local MAX_SPEED = 125 -- The rotational velocity a vehicle's wheels would be reaching for the highest pitched engine sounds


Prompt: --//Client Animations

Response:
		IdleAnim = function(char, speed, objs)
			ts:Create(objs[2],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).RightPos}):Play() -- require(script).FakeRightPos (For fake arms) | require(script).RightArmPos (For real arms)
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).LeftPos}):Play() -- require(script).FakeLeftPos (For fake arms) | require(script).LeftArmPos (For real arms)
		end;

		StanceDown = function(char, speed, objs)
			ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-.875, 0.45, -1.25) * CFrame.Angles(math.rad(-75), math.rad(0), math.rad(0))}):Play()
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.1,-0.05,-1.65) * CFrame.Angles(math.rad(-90),math.rad(35),math.rad(-25))}):Play()
			wait(0.3)
		end;

		StanceUp = function(char, speed, objs)
			ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-1, -.75, -1.25) * CFrame.Angles(math.rad(-160), math.rad(0), math.rad(0))}):Play()
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(.75,-0.75,-1.35) * CFrame.Angles(math.rad(-170),math.rad(60),math.rad(15))}):Play()
			wait(0.3)
		end;

		Patrol = function(char, speed, objs)
			ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-.8, 0.3, -1.15) * CFrame.Angles(math.rad(-65), math.rad(0), math.rad(0))}):Play()
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.9,0.4,-0.9) * CFrame.Angles(math.rad(-50),math.rad(45),math.rad(-45))}):Play()
			wait(0.3)
		end;

		SprintAnim = function(char, speed, objs)
			ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-1, -.75, -1.25) * CFrame.Angles(math.rad(-160), math.rad(0), math.rad(0))}):Play()
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(.75,-0.75,-1.35) * CFrame.Angles(math.rad(-170),math.rad(60),math.rad(15))}):Play()
			wait(0.3)
		end;

		EquipAnim = function(char, speed, objs)
			ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play()
			ts:Create(objs[3],TweenInfo.new(0),{C1 = CFrame.new(1.2,-0.05,-1.65) * CFrame.Angles(math.rad(-90),math.rad(35),math.rad(-25))}):Play()
			wait(0.1)
			objs[5].Handle:WaitForChild("AimUp"):Play()
			ts:Create(objs[2],TweenInfo.new(0.5),{C1 = require(script.Parent.Settings).RightPos}):Play()
			ts:Create(objs[3],TweenInfo.new(0.5),{C1 = require(script.Parent.Settings).LeftPos}):Play()
			wait(0.5)
		end;

		ZoomAnim = function(char, speed, objs)
			--ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play()
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.65, -0.7, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(30))}):Play()
			wait(0.3)
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.25, -1.1, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(5))}):Play()
			ts:Create(objs[5].g33:WaitForChild("g33"),TweenInfo.new(0.3),{C1 = CFrame.new(-0.2, 0.21, 0)*CFrame.Angles(0, 0, math.rad(90))*CFrame.new(0.225, -0.75, 0)}):Play()
			wait(0.3)
		end;

		UnZoomAnim = function(char, speed, objs)
			--ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play()
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.25, -1.1, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(5))}):Play()
			wait(0.3)
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.65, -0.7, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(30))}):Play()
			ts:Create(objs[5].g33:WaitForChild("g33"),TweenInfo.new(0.3),{C1 = CFrame.new()}):Play()
			wait(0.3)
		end;

	ChamberAnim = function(char, speed, objs)
		ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(0.6, -0.2, -1) * CFrame.Angles(math.rad(-95), math.rad(30), math.rad(-60))}):Play()
		ts:Create(objs[3],TweenInfo.new(0.35),{C1 = CFrame.new(0.3,-0.9,-0.7) * CFrame.Angles(math.rad(-120),math.rad(70),math.rad(15))}):Play()
		wait(0.35)
		objs[5].Bolt:WaitForChild("SlidePull"):Play()
		ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(0.6, -0.5, -1) * CFrame.Angles(math.rad(-110), math.rad(30), math.rad(-60))}):Play()
		ts:Create(objs[3],TweenInfo.new(0.25),{C1 = CFrame.new(-0.2,-1,-0.6) * CFrame.Angles(math.rad(-120),math.rad(70),math.rad(15))}):Play()
		ts:Create(objs[5].Handle:WaitForChild("Bolt"),TweenInfo.new(0.25),{C0 = CFrame.new(0,0,0.4) * CFrame.Angles(0,math.rad(0),0)}):Play()
		ts:Create(objs[5].Handle:WaitForChild("Slide"),TweenInfo.new(0.25),{C0 = CFrame.new(0,0,0.4) * CFrame.Angles(0,math.rad(0),0)}):Play()
		wait(0.3)
		ts:Create(objs[2],TweenInfo.new(0.2),{C1 = CFrame.new(0.6, 0, -1) * CFrame.Angles(math.rad(-95), math.rad(30), math.rad(-60))}):Play()
		ts:Create(objs[3],TweenInfo.new(0.25),{C1 = CFrame.new(-0.2,-1.8,-0.8) * CFrame.Angles(math.rad(-120),math.rad(70),math.rad(15))}):Play()
		objs[5].Bolt:WaitForChild("SlideRelease"):Play()
		ts:Create(objs[5].Handle:WaitForChild("Bolt"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play()
		ts:Create(objs[5].Handle:WaitForChild("Slide"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play()
		wait(0.2)
	end;

	ChamberBKAnim = function(char, speed, objs)
		ts:Create(objs[2],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).RightPos}):Play()
		ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(0.38,0.05,-1.5) * CFrame.Angles(math.rad(-120),math.rad(20),math.rad(0))}):Play()
		wait(0.3)
		objs[5].Bolt:WaitForChild("SlideRelease"):Play()
		ts:Create(objs[5].Handle:WaitForChild("Bolt"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play()
		ts:Create(objs[5].Handle:WaitForChild("Slide"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play()
		wait(0.15)
	end;

		CheckAnim = function(char, speed, objs)
			ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.875, 0.5, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5))}):Play()
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.5,0.475,-1.6) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play()
			wait(.35)
			local MagC = objs[5]:WaitForChild("Mag"):clone()
				objs[5].Mag.Transparency = 1
				MagC.Parent = objs[5]
				MagC.Name = "MagC"
				MagC.Transparency = 0

			local MagCW = Instance.new("Motor6D")
				MagCW.Part0 = MagC
				MagCW.Part1 = objs[3].Parent.Parent:WaitForChild("Left Arm")
				MagCW.Parent = MagC
				MagCW.C1 = MagC.CFrame:toObjectSpace(objs[3].Parent.Parent:WaitForChild("Left Arm").CFrame)
			ts:Create(MagCW,TweenInfo.new(0),{C0 = CFrame.new(.3, -0.2, .85) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(90))}):Play()
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.45,0.475,-2.05) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play()
			objs[5].Handle:WaitForChild("MagOut"):Play()
			wait(0.3)
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(0.15,0.475,-1.5) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(0))}):Play()
			wait(1.5)
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.45,0.475,-2.05) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play()
			wait(0.3)
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.5,0.475,-1.6) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play()
			objs[5].Handle:WaitForChild("MagIn"):Play()
			MagC:Destroy()
			objs[5].Mag.Transparency = 0
			wait(0.3)
		end;

		ShellInsertAnim = function(char, speed, objs)
			ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-115), math.rad(-2), math.rad(9))}):Play()
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.55,-0.4,-1.15) * CFrame.Angles(math.rad(-100),math.rad(70),math.rad(-41))}):Play()
			wait(0.3)
			objs[5].Handle:WaitForChild("ShellInsert"):Play()
			ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-110), math.rad(-2), math.rad(9))}):Play()
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.6,-0.3,-1.1) * CFrame.Angles(math.rad(-100),math.rad(70),math.rad(-41))}):Play()
			objs[6].Value = objs[6].Value - 1
			objs[7].Value = objs[7].Value + 1
			wait(0.3)
		end;

		ReloadAnim = function(char, speed, objs)
			ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, 0.425, -0.75) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(30))}):Play()
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.35,-0.95,-1.45) * CFrame.Angles(math.rad(-130),math.rad(75),math.rad(15))}):Play()
			wait(0.3)
			ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, 0.425, -0.75) * CFrame.Angles(math.rad(-85), math.rad(0), math.rad(30))}):Play()
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.2,-1.5,-1.65) * CFrame.Angles(math.rad(-125),math.rad(75),math.rad(15))}):Play()

			local MagC = objs[5]:WaitForChild("Mag"):clone()
				objs[5].Mag.Transparency = 1
				MagC.Parent = objs[5]
				MagC.Name = "MagC"
				MagC.Transparency = 0

			local MagCW = Instance.new("Motor6D")
				MagCW.Part0 = MagC
				MagCW.Part1 = objs[3].Parent.Parent:WaitForChild("Left Arm")
				MagCW.Parent = MagC
				MagCW.C1 = MagC.CFrame:toObjectSpace(objs[5].Mag.CFrame)

			objs[5].Handle:WaitForChild("MagOut"):Play()

			wait(0.3)
			ts:Create(objs[3],TweenInfo.new(0.4),{C1 = CFrame.new(1.195,1.4,-0.5) * CFrame.Angles(math.rad(0),math.rad(25),math.rad(0))}):Play()
			wait(0.75)
			ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, 0.425, -0.75) * CFrame.Angles(math.rad(-85), math.rad(0), math.rad(30))}):Play()
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.2,-1.5,-1.65) * CFrame.Angles(math.rad(-125),math.rad(75),math.rad(15))}):Play()
			wait(0.3)
			ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, 0.425, -0.75) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(30))}):Play()
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.35,-0.95,-1.45) * CFrame.Angles(math.rad(-130),math.rad(75),math.rad(15))}):Play()
			objs[5].Handle:WaitForChild("MagIn"):Play()
			MagC:Destroy()
			objs[5].Mag.Transparency = 0

			if (objs[6].Value - (objs[8].Ammo - objs[7].Value)) < 0 then
				objs[7].Value = objs[7].Value + objs[6].Value
				objs[6].Value = 0
				--Evt.Recarregar:FireServer(objs[5].Value)

			elseif objs[7].Value <= 0 then
				objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value)
				--Evt.Recarregar:FireServer(objs[5].Value)
				objs[7].Value = objs[8].Ammo
				objs[9] = false

			elseif objs[7].Value > 0 and objs[9] and objs[8].IncludeChamberedBullet then
				objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value) - 1
				--objs[10].Recarregar:FireServer(objs[6].Value)
				objs[7].Value = objs[8].Ammo + 1

			elseif objs[7].Value > 0 and objs[9] and not objs[8].IncludeChamberedBullet then
				objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value)
				--Evt.Recarregar:FireServer(objs[5].Value)
				objs[7].Value = objs[8].Ammo
			end
			wait(0.55)
		end;


Prompt: -- Remote Functions

Response:
local remoteEvents = game:GetService("ReplicatedStorage").Remotes.RemoteEvents
local remoteFunctions = game:GetService("ReplicatedStorage").Remotes.RemoteFunctions


Prompt:
--local ClickerModule = require(343254562)
--local clickEvent = ClickerModule.RemoteEvent

Response:
local interactiveParts = {}
local activationDistance = 12
local flushing = false
local water = script.Parent.Parent.Water
local sound = script.Parent.Parent.ToiletBowl.Sound
sound:Play()
wait(0.75)

			for i = 1, 5 do
				water.CFrame = water.CFrame * CFrame.new(0, 0.01, 0)
				wait()
			end
			--wait(1)
			for i = 1, 23 do
				water.Mesh.Scale = water.Mesh.Scale + Vector3.new(-0.0149, 0, -0.0149)
				water.CFrame = water.CFrame * CFrame.new(0, -0.0149, 0)
				wait()
			end
			for i, v in pairs(script.Parent.Parent:GetChildren()) do
				if v.Name == "WaterSwirl" then
					v.ParticleEmitter.Transparency = NumberSequence.new(0.9)
					v.ParticleEmitter.Rate = 900
				end
end

			wait(1)

			for i = 1, 10 do
				for ii, v in pairs(script.Parent.Parent:GetChildren()) do
					if v.Name == "WaterSwirl" then
						v.ParticleEmitter.Transparency = NumberSequence.new(0.9 + (0.015 * i))
						if i == 10 then
							v.ParticleEmitter.Rate = 0
						end
end
				end
				wait(0.2)
			end

			script.Parent.Parent.ToiletUsed.Value = false
			water.BrickColor = BrickColor.new("Fog")

			for i = 1, 145 do
				water.Mesh.Scale = water.Mesh.Scale + Vector3.new(0.0021, 0, 0.0021)
				water.CFrame = water.CFrame * CFrame.new(0, 0.0021, 0)
				wait()
			end
			water.CFrame = script.Parent.Parent.WaterResetPos.CFrame
			water.Mesh.Scale = Vector3.new(1,0,1)

			flushing = false
			script.Disabled = true


Prompt: --- Gets the text in the command bar text box

Response:
function Window:GetEntryText()
	return Entry.TextBox.Text:gsub("\t", "")
end


Prompt: --// Start and stop fading sequences / timers

Response:
UpdateFadingForMouseState(true)
UpdateFadingForMouseState(false)


Prompt: -- EXPOSED TO "update_handler" DURING ProfileStore:GlobalUpdateProfileAsync() CALL

Response:
function GlobalUpdates:AddActiveUpdate(update_data)
	if type(update_data) ~= "table" then
		error("[ProfileService]: Invalid update_data")
	end
	if self._new_active_update_listeners ~= nil then
		error("[ProfileService]: Can't add active global updates in loaded Profile; Use ProfileStore:GlobalUpdateProfileAsync()")
	elseif self._update_handler_mode ~= true then
		error("[ProfileService]: Can't add active global updates in view mode; Use ProfileStore:GlobalUpdateProfileAsync()")
	end
	-- self._updates_latest = {}, -- [table] {update_index, {{update_id, version_id, update_locked, update_data}, ...}}
	local updates_latest = self._updates_latest
	local update_index = updates_latest[1] + 1 -- Incrementing global update index
	updates_latest[1] = update_index
	-- Add new active global update:
	table.insert(updates_latest[2], {update_index, 1, false, update_data})
end

function GlobalUpdates:ChangeActiveUpdate(update_id, update_data)
	if type(update_id) ~= "number" then
		error("[ProfileService]: Invalid update_id")
	end
	if type(update_data) ~= "table" then
		error("[ProfileService]: Invalid update_data")
	end
	if self._new_active_update_listeners ~= nil then
		error("[ProfileService]: Can't change active global updates in loaded Profile; Use ProfileStore:GlobalUpdateProfileAsync()")
	elseif self._update_handler_mode ~= true then
		error("[ProfileService]: Can't change active global updates in view mode; Use ProfileStore:GlobalUpdateProfileAsync()")
	end
	-- self._updates_latest = {}, -- [table] {update_index, {{update_id, version_id, update_locked, update_data}, ...}}
	local updates_latest = self._updates_latest
	local get_global_update = nil
	for _, global_update in ipairs(updates_latest[2]) do
		if update_id == global_update[1] then
			get_global_update = global_update
			break
		end
	end
	if get_global_update ~= nil then
		if get_global_update[3] == true then
			error("[ProfileService]: Can't change locked global update")
		end
		get_global_update[2] = get_global_update[2] + 1 -- Increment version id
		get_global_update[4] = update_data -- Set new global update data
	else
		error("[ProfileService]: Passed non-existant update_id")
	end
end

function GlobalUpdates:ClearActiveUpdate(update_id)
	if type(update_id) ~= "number" then
		error("[ProfileService]: Invalid update_id argument")
	end
	if self._new_active_update_listeners ~= nil then
		error("[ProfileService]: Can't clear active global updates in loaded Profile; Use ProfileStore:GlobalUpdateProfileAsync()")
	elseif self._update_handler_mode ~= true then
		error("[ProfileService]: Can't clear active global updates in view mode; Use ProfileStore:GlobalUpdateProfileAsync()")
	end
	-- self._updates_latest = {}, -- [table] {update_index, {{update_id, version_id, update_locked, update_data}, ...}}
	local updates_latest = self._updates_latest
	local get_global_update_index = nil
	local get_global_update = nil
	for index, global_update in ipairs(updates_latest[2]) do
		if update_id == global_update[1] then
			get_global_update_index = index
			get_global_update = global_update
			break
		end
	end
	if get_global_update ~= nil then
		if get_global_update[3] == true then
			error("[ProfileService]: Can't clear locked global update")
		end
		table.remove(updates_latest[2], get_global_update_index) -- Remove active global update
	else
		error("[ProfileService]: Passed non-existant update_id")
	end
end


Prompt:
--[[

The mirror will only work when ingame (or test mode), due to its scripted nature.

]]

Response:
local mirror = script.Mirror

mirror.Adornee = script.Parent

mirror:Clone().Parent = game.StarterGui


Prompt:
--[=[
	Stops the shake effect. If using `OnSignal` or `BindToRenderStep`, those bound
	functions will be disconnected/unbound.

	`Stop` is automatically called when the shake effect is completed _or_ when the
	`Destroy` method is called.
]=]

Response:
function Shake:Stop()
	self._trove:Clean()
end


Prompt: -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote

Response:
local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}

function configureAnimationSet(name, fileList)
	if (animTable[name] ~= nil) then
		for _, connection in pairs(animTable[name].connections) do
			connection:disconnect()
		end
	end
	animTable[name] = {}
	animTable[name].count = 0
	animTable[name].totalWeight = 0
	animTable[name].connections = {}

	-- check for config values
	local config = script:FindFirstChild(name)
	if (config ~= nil) then


Prompt:
--[[

	19 -- All Accessories
	9 -- Hat
	20 -- HairAccessory
	21 -- FaceAccessory
	22 -- NeckAccessory
	23 -- ShoulderAccessory
	24 -- FrontAccessory
	25 -- BackAccessory
	26 -- WaistAccessory

	4 -- Faces+Heads
	10 -- Faces
	15 -- Heads

--]]

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

local subcategory = 9
local url = "https://search.roblox.com/catalog/json?Subcategory=" .. subcategory .. "&IncludeNotForSale=true&ResultsPerPage=60&PageNumber="

local pages = 25

local assets = {}

for i = 1, pages do
	local urlPage = url .. i
	local data = Http:JSONEncode(Http:GetAsync(urlPage))
	data = Http:JSONDecode(data)

	for ii = 1, #data do
		local asset = data[ii]

		local id = asset.AssetId
		local name = asset.Name

		assets[#assets + 1] = "{Id = " ..id .. ", Name = \"" .. name .. "\"}"
	end
	print(i)
end

local source = "return { \n\t" .. table.concat(assets, ",\n\t") .. "\n}"
local module = Instance.new("ModuleScript")
module.Source = source
module.Parent = workspace


Prompt:
-- upstream: https://github.com/facebook/react/blob/a9b035b0c2b8235405835beca0c4db2cc37f18d0/packages/shared/shallowEqual.js
--!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 is = require(script.Parent.objectIs)


Prompt:
-- BannedPlayerKicking fires right before a banned player is kicked
-- from the game, sending the Player and the payload from data stores
-- (see below for the format of this table). It is recommended that you
-- hook this event up to some analytics solution.


Prompt: ----- water handler -----

Response:
while true do
	if script.Parent.HotOn.Value == true and script.Parent.ColdOn.Value == true and script.Parent.Plugged.Value == true and water.Scale.Y <= 2 then -- if BOTH ON and PLUGGED
		water.Scale = water.Scale + Vector3.new(0,0.01,0)
		water.Offset = Vector3.new(0,water.Scale.Y/2,0)
		hotWater = hotWater + 1
		coldWater = coldWater + 1
		drainSound:Stop()
	elseif (script.Parent.HotOn.Value == true or script.Parent.ColdOn.Value == true) and script.Parent.Plugged.Value == true and water.Scale.Y <= 2 then -- if ON and PLUGGED
		water.Scale = water.Scale + Vector3.new(0,0.01,0)
		water.Offset = Vector3.new(0,water.Scale.Y/2,0)
		if script.Parent.HotOn.Value == true then
			hotWater = hotWater + 1
		else
			coldWater = coldWater + 1
		end
		drainSound:Stop()
	elseif (script.Parent.HotOn.Value == true or script.Parent.ColdOn.Value == true) and script.Parent.Plugged.Value == false and water.Scale.Y <= 2 then -- if ON and NOT PLUGGED
		if script.Parent.HotOn.Value == true then
			coldWater = coldWater - 1
		else
			hotWater = hotWater - 1
		end
		drainSound:Stop()
	elseif (script.Parent.HotOn.Value == false and script.Parent.ColdOn.Value == false) and script.Parent.Plugged.Value == false and water.Scale.Y > 0 then -- if NOT ON and NOT PLUGGED
		water.Scale = water.Scale + Vector3.new(0,-0.01,0)
		water.Offset = Vector3.new(0,water.Scale.Y/2,0)
		coldWater = coldWater - 1
		hotWater = hotWater - 1
		drainSound:Play()
	end

	if coldWater < 1 then
		coldWater = 1
	end
	if hotWater < 1 then
		hotWater = 1
	end

	waterTemp = hotWater/coldWater

	if waterTemp > 1 then
		water.Parent.SteamEmitter.Enabled = true
	else
		water.Parent.SteamEmitter.Enabled = false
	end
	wait(0.1)

	if script.Parent.ColdOn.Value == true or script.Parent.HotOn.Value == true then
		script.Parent.Splash.ParticleEmitter.Enabled = true
	else
		script.Parent.Splash.ParticleEmitter.Enabled = false
	end

	if water.Scale.Y <= 0 then
		drainSound:Stop()
	end
end


Prompt:
--[=[
	@return Promise
	Returns a promise that is resolved once Knit has started. This is useful
	for any code that needs to tie into Knit services but is not the script
	that called `Start`.
	```lua
	Knit.OnStart():andThen(function()
		local MyService = Knit.Services.MyService
		MyService:DoSomething()
	end):catch(warn)
	```
]=]

Response:
function KnitServer.OnStart()
	if startedComplete then
		return Promise.resolve()
	else
		return Promise.fromEvent(onStartedComplete.Event)
	end
end

return KnitServer


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

function Signal.new(maid)
	local self = setmetatable({
		_bindable = Instance.new("BindableEvent");
		_connections = {};
		_args = {};
		_threads = 0;
		_id = 0;
	}, Signal)
	if (maid) then
		maid:GiveTask(self)
	end
	return self
end

function Signal.Is(obj)
	return (type(obj) == "table" and getmetatable(obj) == Signal)
end

function Signal:Fire(...)
	local id = self._id
	self._id += 1
	self._args[id] = {#self._connections + self._threads, {n = select("#", ...), ...}}
	self._threads = 0
	self._bindable:Fire(id)
end

function Signal:Wait()
	self._threads += 1
	local id = self._bindable.Event:Wait()
	local args = self._args[id]
	args[1] -= 1
	if (args[1] <= 0) then
		self._args[id] = nil
	end
	return table.unpack(args[2], 1, args[2].n)
end

function Signal:WaitPromise()
	return Promise.new(function(resolve)
		resolve(self:Wait())
	end)
end

function Signal:Connect(handler)
	local connection = Connection.new(self, self._bindable.Event:Connect(function(id)
		local args = self._args[id]
		args[1] -= 1
		if (args[1] <= 0) then
			self._args[id] = nil
		end
		handler(table.unpack(args[2], 1, args[2].n))
	end))
	table.insert(self._connections, connection)
	return connection
end

function Signal:DisconnectAll()
	for _,c in ipairs(self._connections) do
		if (c._conn) then
			c._conn:Disconnect()
		end
	end
	self._connections = {}
	self._args = {}
end

function Signal:Destroy()
	self:DisconnectAll()
	self._bindable:Destroy()
end

return Signal


Prompt: --------------| SYSTEM SETTINGS |--------------

Response:
Prefix				= ";";			-- The character you use before every command (e.g. ';jump me').
SplitKey 			= " ";			-- The character inbetween command arguments (e.g. setting it to '/' would change ';jump me' to ';jump/me').
BatchKey 			= "";			-- The character inbetween batch commands (e.g. setting it to '|' would change ';jump me ;fire me ;smoke me' to ';jump me | ;fire me | ;smoke me'
QualifierBatchKey 	= ",";			-- The character used to split up qualifiers (e.g. ;jump player1,player2,player3)

Theme				= "Blue";		-- The default UI theme.
NoticeSoundId		= 2865227271;	-- The SoundId for notices.
NoticeVolume		= 0.1;			-- The Volume for notices.
NoticePitch			= 1;			-- The Pitch/PlaybackSpeed for notices.
ErrorSoundId		= 2865228021;	-- The SoundId for error notifications.
ErrorVolume			= 0.1;			-- The Volume for error notifications.
ErrorPitch			= 1;			-- The Pitch/PlaybackSpeed for error notifications.
AlertSoundId		= 3140355872;	-- The SoundId for alerts.
AlertVolume			= 0;			-- The Volume for alerts.
AlertPitch			= 0;			-- The Pitch/PlaybackSpeed for alerts.

WelcomeBadgeId		= 0;			-- Award new players a badge, such as 'Welcome to the game!'. Set to 0 for no badge.

CommandDebounce		= true;			-- Wait until the command effect is over to use again. Helps to limit abuse & lag. Set to 'false' to disable.
SaveRank			= true;			-- Saves a player's rank in the server they received it. (e.g. ;rank plrName rank). Use ';permRank plrName rank' to permanently save a rank. Set to 'false' to disable.
LoopCommands		= 3;			-- The minimum rank required to use LoopCommands.
MusicList 			= {505757009,};	-- Songs which automatically appear in a user's radio. Type '!radio' to display the radio.

ThemeColors = {						-- The colours players can set their HD Admin UI (in the 'Settings' menu). | Format: {ThemeName, ThemeColor3Value};
	{"Red", 	Color3.fromRGB(150, 0, 0),		};
	{"Orange", 	Color3.fromRGB(150, 75, 0),		};
	{"Brown", 	Color3.fromRGB(120, 80, 30),	};
	{"Yellow", 	Color3.fromRGB(130, 120, 0),	};
	{"Green", 	Color3.fromRGB(0, 120, 0),		};
	{"Blue", 	Color3.fromRGB(0, 100, 150),	};
	{"Purple", 	Color3.fromRGB(100, 0, 150),	};
	{"Pink",	Color3.fromRGB(150, 0, 100),	};
	{"Black", 	Color3.fromRGB(60, 60, 60),		};
};

Colors = {							-- The colours for ChatColors and command arguments. | Format: {"ShortName", "FullName", Color3Value};
	{"r", 		"Red",		 		Color3.fromRGB(255, 0, 0)		};
	{"o", 		"Orange",	 		Color3.fromRGB(250, 100, 0)		};
	{"y", 		"Yellow",			Color3.fromRGB(255, 255, 0)		};
	{"g", 		"Green"	,			Color3.fromRGB(0, 255, 0)		};
	{"dg", 		"DarkGreen"	, 		Color3.fromRGB(0, 125, 0)		};
	{"b", 		"Blue",		 		Color3.fromRGB(0, 255, 255)		};
	{"db", 		"DarkBlue",			Color3.fromRGB(0, 50, 255)		};
	{"p", 		"Purple",	 		Color3.fromRGB(150, 0, 255)		};
	{"pk",		"Pink",		 		Color3.fromRGB(255, 85, 185)	};
	{"bk",		"Black",		 	Color3.fromRGB(0, 0, 0)			};
	{"w",		"White",	 		Color3.fromRGB(255, 255, 255)	};
};
ChatColors = {						-- The colour a player's chat will appear depending on their rank. '["Owner"] = "Yellow";' makes the owner's chat yellow.
	[5] 		= "Yellow";
};

Cmdbar						= 1;			-- The minimum rank required to use the Cmdbar.
Cmdbar2						= 3;			-- The minimum rank required to use the Cmdbar2.
ViewBanland					= 3;			-- The minimum rank required to view the banland.
OnlyShowUsableCommands		= false;		-- Only display commands equal to or below the user's rank on the Commands page.
RankRequiredToViewPage		= {				-- || The pages on the main menu ||
	["Commands"]		= 0;
	["Admin"]			= 0;
	["Settings"]		= 0;
};
RankRequiredToViewRank		= {				-- || The rank categories on the 'Ranks' subPage under Admin ||
	["Owner"]			= 0;
	["HeadAdmin"]		= 0;
	["Admin"]			= 0;
	["Mod"]				= 0;
	["VIP"]				= 0;
};
RankRequiredToViewRankType	= {				-- || The collection of loader-rank-rewarders on the 'Ranks' subPage under Admin ||
	["Owner"]			= 0;
	["SpecificUsers"]	= 5;
	["Gamepasses"] 		= 0;
	["Assets"] 			= 0;
	["Groups"] 			= 0;
	["Friends"] 		= 0;
	["FreeAdmin"] 		= 0;
	["VipServerOwner"] 	= 0;
};
RankRequiredToViewIcon		= 0;

WelcomeRankNotice			= true;			-- The 'You're a [rankName]' notice that appears when you join the game. Set to false to disable.
WelcomeDonorNotice			= true;			-- The 'You're a Donor' notice that appears when you join the game. Set to false to disable.
WarnIncorrectPrefix			= true;			-- Warn the user if using the wrong prefix | "Invalid prefix! Try using [correctPrefix][commandName] instead!"
DisableAllNotices			= false;		-- Set to true to disable all HD Admin notices.

ScaleLimit					= 4;			-- The maximum size players with a rank lower than 'IgnoreScaleLimit' can scale theirself. For example, players will be limited to ;size me 4 (if limit is 4) - any number above is blocked.
IgnoreScaleLimit			= 3;			-- Any ranks equal or above this value will ignore 'ScaleLimit'
CommandLimits				= {				-- Enables you to set limits for commands which have a number argument. Ranks equal to or higher than 'IgnoreLimit' will not be affected by Limit.
	["fly"]	= {
		Limit 				= 10000;
		IgnoreLimit 		= 3;
	};
	["fly2"]	= {
		Limit 				= 10000;
		IgnoreLimit 		= 3;
	};
	["noclip"]	= {
		Limit 				= 10000;
		IgnoreLimit 		= 3;
	};
	["noclip2"]	= {
		Limit 				= 10000;
		IgnoreLimit 		= 3;
	};
	["speed"]	= {
		Limit 				= 10000;
		IgnoreLimit 		= 3;
	};
	["jumpPower"]	= {
		Limit 				= 10000;
		IgnoreLimit 		= 3;
	};
};

VIPServerCommandBlacklist	= {"permRank", "permBan", "globalAnnouncement"};	-- Commands players are probihited from using in VIP Servers.
GearBlacklist				= {67798397};	-- The IDs of gear items to block when using the ;gear command.
IgnoreGearBlacklist			= 4;			-- The minimum rank required to ignore the gear blacklist.

PlayerDataStoreVersion		= "V1.0";		-- Data about the player (i.e. permRanks, custom settings, etc). Changing the Version name will reset all PlayerData.
SystemDataStoreVersion		= "V1.0";		-- Data about the game (i.e. the banland, universal message system, etc). Changing the Version name will reset all SystemData.

CoreNotices					= {				-- Modify core notices. You can find a table of all CoreNotices under [MainModule > Client > SharedModules > CoreNotices]
	--NoticeName = NoticeDetails;
};


Prompt: --[[ Script Variables ]]

Response:
--
while not Players.LocalPlayer do
	wait()
end
local LocalPlayer = Players.LocalPlayer
local DPadFrame = nil
local TouchObject = nil
local OnInputEnded = nil		-- defined in Create()


Prompt:
--[[
	Drop #1: 61.44
	Drop #2: 123.165
	Drop #3: 184.482
]]

Response:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local CollectionService = game:GetService("CollectionService")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer


Prompt:
--[[Maid
Manages the cleaning of events and other things.

API:
	HireMaid()                        Returns a new Maid object.

	Maid[key] = (function)            Adds a task to perform when cleaning up.
	Maid[key] = (event connection)    Manages an event connection. Anything that isn't a function is assumed to be this.
	Maid[key] = nil                   Removes a named task. If the task is an event, it is disconnected.

	Maid:GiveTask(task)               Same as above, but uses an incremented number as a key.
	Maid:DoCleaning()                 Disconnects all managed events and performs all clean-up tasks.
]]

Response:
local MakeMaid do
	local index = {
		GiveTask = function(self, task)
			local n = #self.Tasks+1
			self.Tasks[n] = task
			return n
		end;
		DoCleaning = function(self)
			local tasks = self.Tasks
			for name,task in pairs(tasks) do
				if type(task) == 'function' then
					task()
				else
					task:disconnect()
				end
				tasks[name] = nil
			end
			-- self.Tasks = {}
		end;
	};

	local mt = {
		__index = function(self, k)
			if index[k] then
				return index[k]
			else
				return self.Tasks[k]
			end
		end;
		__newindex = function(self, k, v)
			local tasks = self.Tasks
			if v == nil then
				-- disconnect if the task is an event
				if type(tasks[k]) ~= 'function' and tasks[k] then
					tasks[k]:disconnect()
				end
			elseif tasks[k] then
				-- clear previous task
				self[k] = nil
			end
			tasks[k] = v
		end;
	}

	function MakeMaid()
		return setmetatable({Tasks={},Instances={}},mt)
	end
end

local function GetCharacter(Descendant)
	-- Returns the Player and Charater that a descendent is part of, if it is part of one.
	-- @param Descendant A child of the potential character.

	local Charater = Descendant
	local Player   = Players:GetPlayerFromCharacter(Charater)

	while not Player do
		if Charater.Parent then
			Charater = Charater.Parent
			Player   = Players:GetPlayerFromCharacter(Charater)
		else
			return nil
		end
	end

	-- Found the player, character must be true.
	return Charater, Player
end


Prompt: -- Connect 'Blocked' event to the 'onPathBlocked' function

Response: path.Blocked:Connect(onPathBlocked)


Prompt: --// Events

Response:
local L_29_ = L_6_:WaitForChild('Equipped')
local L_30_ = L_6_:WaitForChild('ShootEvent')
local L_31_ = L_6_:WaitForChild('DamageEvent')
local L_32_ = L_6_:WaitForChild('CreateOwner')
local L_33_ = L_6_:WaitForChild('Stance')
local L_34_ = L_6_:WaitForChild('HitEvent')
local L_35_ = L_6_:WaitForChild('KillEvent')
local L_36_ = L_6_:WaitForChild('AimEvent')
local L_37_ = L_6_:WaitForChild('ExploEvent')
local L_38_ = L_6_:WaitForChild('AttachEvent')


Prompt: --Made by Luckymaxer

Response:
Knife = script.Parent

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

RbxUtility = LoadLibrary("RbxUtility")
Create = RbxUtility.Create

Creator = Knife:WaitForChild("Creator")
Damage = Knife:WaitForChild("Damage")

KnifeHit = false

Rate = (1 / 60)

function CheckTableForString(Table, String)
	for i, v in pairs(Table) do
		if string.find(string.lower(String), string.lower(v)) then
			return true
		end
	end
	return false
end

function CheckIntangible(Hit)
	local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Laser", "Bullet"}
	if Hit and Hit.Parent then
		if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
			return true
		end
	end
	return false
end

function CastRay(StartPos, Vec, Length, Ignore, DelayIfHit)
	local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
	local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Vec * Length), Ignore)
	if RayHit and CheckIntangible(RayHit) then
		if DelayIfHit then
			wait()
		end
		RayHit, RayPos, RayNormal = CastRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
	end
	return RayHit, RayPos, RayNormal
end

function GetCreator()
	return (((Creator and Creator.Value and Creator.Value:IsA("Player")) and Creator.Value) or nil)
end

function IsTeamMate(Player1, Player2)
	return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
end

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

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

function Blow(Hit)
	if not Hit or not Hit.Parent or KnifeHit then
		return
	end
	local character = Hit.Parent
	if character:IsA("Hat") then
		character = character.Parent
	end
	local creator = GetCreator()
	local player = Players:GetPlayerFromCharacter(character)
	if player and creator and (player == creator or IsTeamMate(creator, player)) then
		return
	end
	local humanoid = character:FindFirstChild("Humanoid")
	if humanoid and humanoid.Health > 0 then
		UntagHumanoid(humanoid)
		TagHumanoid(humanoid, creator)
		humanoid:TakeDamage(Damage.Value)
	end
	KnifeHit = true
end

while Knife and Knife.Parent and not KnifeHit do
	local creator = GetCreator()
	local IgnoreList = {}
	if creator and creator.Character then
		table.insert(IgnoreList, creator.Character)
		for i, v in pairs(Players:GetChildren()) do
			if v:IsA("Player") and IsTeamMate(creator, v) and v.Character then
				table.insert(IgnoreList, v.Character)
			end
		end
	end
	local BodyVelocity = Knife:FindFirstChild("BodyVelocity")
	if BodyVelocity then
		local RayHit, RayPos, RayNormal = CastRay(Knife.Position, BodyVelocity.velocity.Unit, (Knife.Size.Z * 1), IgnoreList, false)
		if RayHit then
			local PartCFrame = (CFrame.new(Knife.Position, RayPos) * CFrame.new(0, 0, -(Knife.Size.Z * 0.75)) * CFrame.Angles(0, 0, (math.pi / 2)))
			local Weld = Create("Motor"){
				Name = "Stick",
				Part0 = Knife,
				Part1 = RayHit,
				C0 = PartCFrame:inverse(),
				C1 = RayHit.CFrame:inverse(),
				Parent = Knife,
			}
			for i, v in pairs(Knife:GetChildren()) do
				if v:IsA("BodyVelocity") or v:IsA("BodyAngularVelocity") then
					v:Destroy()
				end
			end
			Blow(RayHit)
		end
	end
	wait(Rate)
end


Prompt:
---	Manages the cleaning of events and other things.
-- Useful for encapsulating state and make deconstructors easy
-- @classmod Maid
-- @see Signal

Response:
local Maid = {}
Maid.ClassName = "Maid"


Prompt: -- the random part/tool spawn positions.

Response:
Pos1 = script.Parent.Pos1.CFrame
Pos2 = script.Parent.Pos2.CFrame
Pos3 = script.Parent.Pos3.CFrame


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

Response:
local l__Players__1 = game:GetService("Players");
local l__CurrentCamera__1 = game.Workspace.CurrentCamera;
local l__math_rad__2 = math.rad;
local u3 = nil;
local l__math_tan__4 = math.tan;
local u5 = nil;
local function v2()
	local l__ViewportSize__3 = l__CurrentCamera__1.ViewportSize;
	u3 = 2 * l__math_tan__4(l__math_rad__2(l__CurrentCamera__1.FieldOfView) / 2);
	u5 = l__ViewportSize__3.X / l__ViewportSize__3.Y * u3;
end;
l__CurrentCamera__1:GetPropertyChangedSignal("FieldOfView"):Connect(v2);
l__CurrentCamera__1:GetPropertyChangedSignal("ViewportSize"):Connect(v2);
local l__ViewportSize__4 = l__CurrentCamera__1.ViewportSize;
u3 = 2 * l__math_tan__4(l__math_rad__2(l__CurrentCamera__1.FieldOfView) / 2);
u5 = l__ViewportSize__4.X / l__ViewportSize__4.Y * u3;
local u6 = l__CurrentCamera__1.NearPlaneZ;
l__CurrentCamera__1:GetPropertyChangedSignal("NearPlaneZ"):Connect(function()
	u6 = l__CurrentCamera__1.NearPlaneZ;
end);
local u7 = {};
local u8 = {};
local function v5(p1)
	p1.CharacterAdded:Connect(function(p2)
		u8[p1] = p2;
		local v6 = 1;
		u7 = {};
		for v7, v8 in pairs(u8) do
			u7[v6] = v8;
			v6 = v6 + 1;
		end;
	end);
	p1.CharacterRemoving:Connect(function()
		u8[p1] = nil;
		local v9 = 1;
		u7 = {};
		for v10, v11 in pairs(u8) do
			u7[v9] = v11;
			v9 = v9 + 1;
		end;
	end);
	if p1.Character then
		u8[p1] = p1.Character;
		local v12 = 1;
		u7 = {};
		for v13, v14 in pairs(u8) do
			u7[v12] = v14;
			v12 = v12 + 1;
		end;
	end;
end;
l__Players__1.PlayerAdded:Connect(v5);
l__Players__1.PlayerRemoving:Connect(function(p3)
	u8[p3] = nil;
	local v15 = 1;
	u7 = {};
	for v16, v17 in pairs(u8) do
		u7[v15] = v17;
		v15 = v15 + 1;
	end;
end);
local v18, v19, v20 = ipairs(l__Players__1:GetPlayers());
while true do
	v18(v19, v20);
	if not v18 then
		break;
	end;
	v20 = v18;
	v5(v19);
end;
local v21 = 1;
u7 = {};
for v22, v23 in pairs(u8) do
	u7[v21] = v23;
	v21 = v21 + 1;
end;
u8 = nil;
local u9 = nil;
l__CurrentCamera__1:GetPropertyChangedSignal("CameraSubject"):Connect(function()
	local l__CameraSubject__24 = l__CurrentCamera__1.CameraSubject;
	if l__CameraSubject__24:IsA("Humanoid") then
		u9 = l__CameraSubject__24.RootPart;
		return;
	end;
	if l__CameraSubject__24:IsA("BasePart") then
		u9 = l__CameraSubject__24;
		return;
	end;
	u9 = nil;
end);
local l__Ray_new__10 = Ray.new;
local l__math_huge__11 = math.huge;
local function u12(p4, p5, p6, p7)
	debug.profilebegin("queryPoint");
	p6 = p6 + u6;
	local v25 = p4 + p5 * p6;
	local v26 = l__math_huge__11;
	local v27 = l__math_huge__11;
	local v28 = p4;
	local v29 = 0;
	while true do
		local v30, v31 = workspace:FindPartOnRayWithIgnoreList(l__Ray_new__10(v28, v25 - v28), u7, false, true);
		v29 = v29 + 1;
		if v30 then
			local v32 = v29 >= 64;
			local v33 = false;
			if 1 - (1 - v30.Transparency) * (1 - v30.LocalTransparencyModifier) < 0.25 then
				v33 = v30.CanCollide;
				if v33 then
					v33 = false;
					if u8 ~= (v30:GetRootPart() and v30) then
						v33 = not v30:IsA("TrussPart");
					end;
				end;
			end;
			if v33 or v32 then
				local v34 = { v30 };
				local l__Magnitude__35 = (v31 - p4).Magnitude;
				if workspace:FindPartOnRayWithWhitelist(l__Ray_new__10(v25, v31 - v25), v34, true) and not v32 then
					local v36 = false;
					if p7 then
						v36 = workspace:FindPartOnRayWithWhitelist(l__Ray_new__10(p7, v25 - p7), v34, true) or workspace:FindPartOnRayWithWhitelist(l__Ray_new__10(v25, p7 - v25), v34, true);
					end;
					if v36 then
						v27 = l__Magnitude__35;
					elseif p6 < v26 then
						v26 = l__Magnitude__35;
					end;
				else
					v27 = l__Magnitude__35;
				end;
			end;
			u7[#u7 + 1] = v30;
			v28 = v31 - p5 * 0.001;
		end;
		if v27 < l__math_huge__11 then
			break;
		end;
		if not v30 then
			break;
		end;
	end;
	for v37 = #u7, #u7 + 1, -1 do
		u7[v37] = nil;
	end;
	debug.profileend();
	return v26 - u6, v27 - u6;
end;
local function u13(p8, p9)
	local v38 = #u7;
	while true do
		local v39, v40 = workspace:FindPartOnRayWithIgnoreList(l__Ray_new__10(p8, p9), u7, false, true);
		if v39 then
			if v39.CanCollide then
				for v41 = #u7, v38 + 1, -1 do
					u7[v41] = nil;
				end;
				return v40, true;
			end;
			u7[#u7 + 1] = v39;
		end;
		if not v39 then
			break;
		end;
	end;
	for v42 = #u7, v38 + 1, -1 do
		u7[v42] = nil;
	end;
	return p8 + p9, false;
end;
local l__math_min__14 = math.min;
local u15 = { Vector2.new(0.4, 0), Vector2.new(-0.4, 0), Vector2.new(0, -0.4), Vector2.new(0, 0.4), Vector2.new(0, 0.2) };
local function u16(p10, p11)
	debug.profilebegin("queryViewport");
	local l__p__43 = p10.p;
	local l__rightVector__44 = p10.rightVector;
	local l__upVector__45 = p10.upVector;
	local v46 = -p10.lookVector;
	local l__ViewportSize__47 = l__CurrentCamera__1.ViewportSize;
	local v48 = l__math_huge__11;
	local v49 = l__math_huge__11;
	for v50 = 0, 1 do
		local v51 = l__rightVector__44 * ((v50 - 0.5) * u5);
		for v52 = 0, 1 do
			local v53, v54 = u12(l__p__43 + u6 * (v51 + l__upVector__45 * ((v52 - 0.5) * u3)), v46, p11, l__CurrentCamera__1:ViewportPointToRay(l__ViewportSize__47.x * v50, l__ViewportSize__47.y * v52).Origin);
			if v54 < v48 then
				v48 = v54;
			end;
			if v53 < v49 then
				v49 = v53;
			end;
		end;
	end;
	debug.profileend();
	return v49, v48;
end;
local function u17(p12, p13, p14)
	debug.profilebegin("testPromotion");
	local l__p__55 = p12.p;
	local l__rightVector__56 = p12.rightVector;
	local l__upVector__57 = p12.upVector;
	local v58 = -p12.lookVector;
	debug.profilebegin("extrapolate");
	for v59 = 0, l__math_min__14(1.25, p14.rotVelocity.magnitude + (u13(l__p__55, p14.posVelocity * 1.25) - l__p__55).Magnitude / p14.posVelocity.magnitude), 0.0625 do
		local v60 = p14.extrapolate(v59);
		if p13 <= u12(v60.p, -v60.lookVector, p13) then
			return false;
		end;
	end;
	debug.profileend();
	debug.profilebegin("testOffsets");
	local v61, v62, v63 = ipairs(u15);
	while true do
		v61(v62, v63);
		if not v61 then
			break;
		end;
		v63 = v61;
		local v64 = u13(l__p__55, l__rightVector__56 * v62.x + l__upVector__57 * v62.y);
		if u12(v64, (l__p__55 + v58 * p13 - v64).Unit, p13) == l__math_huge__11 then
			return false;
		end;
	end;
	debug.profileend();
	debug.profileend();
	return true;
end;
return function(p15, p16, p17)
	debug.profilebegin("popper");
	u8 = u9 and u9:GetRootPart() or u9;
	local v65 = p16;
	local v66, v67 = u16(p15, p16);
	if v67 < v65 then
		v65 = v67;
	end;
	if v66 < v65 and u17(p15, p16, p17) then
		v65 = v66;
	end;
	u8 = nil;
	debug.profileend();
	return v65;
end;


Prompt:
---------------------------------------------------------------
--
-- урон лопастями
--
---------------------------------------------------------------

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

me=script.Parent
plr=Players:FindFirstChild(me.Parent.Owner.Value)

me=script.Parent


Prompt: --Ignore above

Response:
local function place(plr, name, location, prefabs, cframe, c)
	local item = prefabs:FindFirstChild(name):Clone()
	item.PrimaryPart.CanCollide = false
	item:SetPrimaryPartCFrame(cframe)

	ChangeTransparency(item, 1)

	item.Parent = location

	if c then
		if not checkHitbox(plr.Character, item) then
			ChangeTransparency(item, 0)

			item.PrimaryPart.Transparency = 1

			return true
		else
			item:Destroy()

			return false
		end
	else
		ChangeTransparency(item, 0)

		item.PrimaryPart.Transparency = 1

		return true
	end
end

game.ReplicatedStorage.Remotes.place.OnServerInvoke = place


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

	@param value The value to check against

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

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


Prompt: --- Sets the text in the command bar text box, and captures focus

Response:
function Window:SetEntryText(text)
	Entry.TextBox.Text = text

	if self:IsVisible() then
		Entry.TextBox:CaptureFocus()
		Entry.TextBox.CursorPosition = #text + 1
		Window:UpdateWindowHeight()
	end
end


Response:
while true do
	local p = game.Players:GetChildren()
	for i = 1,#p do
		if p[i].Character~=nil then
			if p[i].Character:findFirstChild("Torso")~=nil then
				if (p[i].Character.Torso.Position - script.Parent.Torso.Position).magnitude < 5 then
					local anim = Instance.new("StringValue")
					anim.Value = possibleAnims[math.random(1, #possibleAnims)]
					anim.Name = "toolanim"
					anim.Parent = script.Parent.LinkedSword
					if anim.Value == "Lunge" then
	script.Parent.LinkedSword2.GripForward = Vector3.new(0,0,1)
	script.Parent.LinkedSword2.GripRight = Vector3.new(0,-1,0)
	script.Parent.LinkedSword2.GripUp = Vector3.new(-1,0,0)
		wait(.30)
	script.Parent.LinkedSword2.GripForward = Vector3.new(-1,0,0)
	script.Parent.LinkedSword2.GripRight = Vector3.new(0,1,0)
	script.Parent.LinkedSword2.GripUp = Vector3.new(0,0,1)

					end
				end
			end
		end
	end
	wait(1.5)
end


Response:
local Monster = {} -- Create the monster class

function Monster:GetCFrame()
	-- Returns the CFrame of the monster's humanoidrootpart

	local humanoidRootPart = Self:FindFirstChild('HumanoidRootPart')

	if humanoidRootPart ~= nil and humanoidRootPart:IsA('BasePart') then
		return humanoidRootPart.CFrame
	else
		return CFrame.new()
	end
end

function Monster:GetMaximumDetectionDistance()
	-- Returns the maximum detection distance

	local setting = Settings.MaximumDetectionDistance.Value

	if setting < 0 then
		return math.huge
	else
		return setting
	end
end

function Monster:SearchForTarget()
	-- Finds the closest player and sets the target

	local players = Info.Players:GetPlayers()
	local closestCharacter, closestCharacterDistance

	for i=1, #players do
		local player = players[i]

		if player.Neutral or player.TeamColor ~= Settings.FriendlyTeam.Value then
			local character = player.Character

			if character ~= nil and character:FindFirstChild('Humanoid') ~= nil and character.Humanoid:IsA('Humanoid') and character.Name ~= player.Name.."'s Ragdoll" and character:FindFirstChild("HumanoidRootPart") ~= nil then
				local distance = player:DistanceFromCharacter(Monster:GetCFrame().p)

				if distance < Monster:GetMaximumDetectionDistance() then
					if closestCharacter == nil then
						closestCharacter, closestCharacterDistance = character, distance
					else
						if closestCharacterDistance > distance then
							closestCharacter, closestCharacterDistance = character, distance
						end
					end
				end
			end
		end
	end

	if closestCharacter ~= nil then
		Mind.CurrentTargetHumanoid.Value = closestCharacter.Humanoid
	end
end

function Monster:TryRecomputePath()
	if Data.AutoRecompute or tick() - Data.LastRecomputePath > 1/Info.RecomputePathFrequency then
		Monster:RecomputePath()
	end
end

function Monster:GetTargetCFrame()
	local targetHumanoid = Mind.CurrentTargetHumanoid.Value

	if Monster:TargetIsValid() then
		return targetHumanoid.Parent.Torso.CFrame
	else
		return CFrame.new()
	end
end

function Monster:IsAlive()
	return Self.Humanoid.Health > 0 and Self.Humanoid ~= nil
end

function Monster:TargetIsValid()
	local targetHumanoid = Mind.CurrentTargetHumanoid.Value

	if targetHumanoid ~= nil and targetHumanoid:IsA'Humanoid' and targetHumanoid.Parent:FindFirstChild("HumanoidRootPart") and targetHumanoid.Health > 0 then
		return true
	else
		return false
	end
end

function Monster:HasClearLineOfSight()
	-- Going to cast a ray to see if I can just see my target
	local myPos, targetPos = Monster:GetCFrame().p, Monster:GetTargetCFrame().p

	local hit, pos = workspace:FindPartOnRayWithIgnoreList(
		Ray.new(
			myPos,
			targetPos - myPos
		),
		{
			Self,
			Mind.CurrentTargetHumanoid.Value.Parent
		}
	)

	if hit == nil then
		return true
	else
		return false
	end
end

function Monster:RecomputePath()
	if not Data.Recomputing then
		if Monster:IsAlive() and Monster:TargetIsValid() then
			if Monster:HasClearLineOfSight() then
				Data.AutoRecompute = true
				Data.PathCoords = {
					Monster:GetCFrame().p,
					Monster:GetTargetCFrame().p
				}

				Data.LastRecomputePath = tick()
				Data.CurrentNode = nil
				Data.CurrentNodeIndex = 2 -- Starts chasing the target without evaluating its current position
			else
				-- Do pathfinding since you can't walk straight
				Data.Recomputing = true -- Basically a debounce.
				Data.AutoRecompute = false

				local path = Info.PathfindingService:ComputeSmoothPathAsync(
					Monster:GetCFrame().p,
					Monster:GetTargetCFrame().p,
					500
				)
				Data.PathCoords = path:GetPointCoordinates()

				Data.Recomputing = false
				Data.LastRecomputePath = tick()
				Data.CurrentNode = nil
				Data.CurrentNodeIndex = 1
			end
		end
	end
end

function Monster:Update()
	Monster:ReevaluateTarget()
	Monster:SearchForTarget()
	Monster:TryRecomputePath()
	Monster:TravelPath()
end

function Monster:TravelPath()
	local closest, closestDistance, closestIndex
	local myPosition = Monster:GetCFrame().p
	local skipCurrentNode = Data.CurrentNode ~= nil and (Data.CurrentNode - myPosition).magnitude < 3

	for i=Data.CurrentNodeIndex, #Data.PathCoords do
		local coord = Data.PathCoords[i]
		if not (skipCurrentNode and coord == Data.CurrentNode) then
			local distance = (coord - myPosition).magnitude

			if closest == nil then
				closest, closestDistance, closestIndex = coord, distance, i
			else
				if distance < closestDistance then
					closest, closestDistance, closestIndex = coord, distance, i
				else
					break
				end
			end
		end
	end

	--
	if closest ~= nil then
		Data.CurrentNode = closest
		Data.CurrentNodeIndex = closestIndex

		local humanoid = Self:FindFirstChild 'Humanoid'

		if humanoid ~= nil and humanoid:IsA'Humanoid' then
			humanoid:MoveTo(closest)
		end

		if Monster:IsAlive() and Monster:TargetIsValid() then
			Monster:TryJumpCheck()
			Monster:TryAttack()
		end

		if closestIndex == #Data.PathCoords then
			-- Reached the end of the path, force a new check
			Data.AutoRecompute = true
		end
	end
end

function Monster:TryJumpCheck()
	if tick() - Data.LastJumpCheck > 1/Info.JumpCheckFrequency then
		Monster:JumpCheck()
	end
end

function Monster:TryAttack()
	if tick() - Data.LastAttack > 1/Settings.AttackFrequency.Value then
		Monster:Attack()
	end
end

function Monster:Attack()
	local myPos, targetPos = Monster:GetCFrame().p, Monster:GetTargetCFrame().p

	if (myPos - targetPos).magnitude <= Settings.AttackRange.Value then
		Mind.CurrentTargetHumanoid.Value:TakeDamage(Settings.AttackDamage.Value)
		Data.LastAttack = tick()
		Data.AttackTrack:Play()

		for _,v in pairs(game.Players:GetPlayers()) do
			if v:IsA("Player") then
				local deathmessage = game.ReplicatedStorage.deathtemplate:Clone()
				deathmessage.Parent = v.PlayerGui.DeathList.Frame
				deathmessage.enemy.Text = script.Parent.Name
				deathmessage.player.Text = Mind.CurrentTargetHumanoid.Value.Parent.Name
				deathmessage.death.Image = script.Parent.HumanoidRootPart:FindFirstChildOfClass("Beam").Texture
			end
		end
	end
end

function Monster:JumpCheck()
	-- Do a raycast to check if we need to jump
	local myCFrame = Monster:GetCFrame()
	local checkVector = (Monster:GetTargetCFrame().p - myCFrame.p).unit*2

	local hit, pos = workspace:FindPartOnRay(
		Ray.new(
			myCFrame.p + Vector3.new(0, -2.4, 0),
			checkVector
		),
		Self
	)

	if hit ~= nil and not hit:IsDescendantOf(Mind.CurrentTargetHumanoid.Value.Parent) then
		-- Do a slope check to make sure we're not walking up a ramp

		local hit2, pos2 = workspace:FindPartOnRay(
			Ray.new(
				myCFrame.p + Vector3.new(0, -2.3, 0),
				checkVector
			),
			Self
		)

		if hit2 == hit then
			if ((pos2 - pos)*Vector3.new(1,0,1)).magnitude < 0.05 then -- Will pass for any ramp with <2 slope
				Self.Humanoid.Jump = true
			end
		end
	end

	Data.LastJumpCheck = tick()
end

function Monster:Connect()
	Mind.CurrentTargetHumanoid.Changed:connect(function(humanoid)
		if humanoid ~= nil then
			assert(humanoid:IsA'Humanoid', 'Monster target must be a humanoid')

			Monster:RecomputePath()
		end
	end)
end

function Monster:Initialize()
	Monster:Connect()

	if Settings.AutoDetectSpawnPoint.Value then
		Settings.SpawnPoint.Value = Monster:GetCFrame().p
	end
end

function Monster:Respawn(point)
	local point = point or Settings.SpawnPoint.Value

	for index, obj in next, Data.BaseMonster:Clone():GetChildren() do
		if obj.Name == 'Configurations' or obj.Name == 'Mind' or obj.Name == 'Respawned' or obj.Name == 'Died' or obj.Name == 'MonsterScript' or obj.Name == 'Respawn' then
			obj:Destroy()
		else
			Self[obj.Name]:Destroy()
			obj.Parent = Self
		end
	end

	Monster:InitializeUnique()

	Self.Parent = workspace

	Self.HumanoidRootPart.CFrame = CFrame.new(point)
	Settings.SpawnPoint.Value = point
	Self.Respawned:Fire()
end

function Monster:InitializeUnique()
	Data.AttackTrack = Self.Humanoid:LoadAnimation(script.Attack)
end

function Monster:ReevaluateTarget()
	local currentTarget = Mind.CurrentTargetHumanoid.Value

	if currentTarget ~= nil and currentTarget:IsA'Humanoid' then
		local character = currentTarget.Parent

		if character ~= nil then
			local player = Info.Players:GetPlayerFromCharacter(character)

			if player ~= nil then
				if not player.Neutral and player.TeamColor == Settings.FriendlyTeam.Value then
					Mind.CurrentTargetHumanoid.Value = nil
				end
			end
		end

		if currentTarget == Mind.CurrentTargetHumanoid.Value then
			if currentTarget.Parent:FindFirstChild("HumanoidRootPart") then
				local torso = currentTarget.Parent.HumanoidRootPart

				if torso ~= nil and torso:IsA 'BasePart' then
					if Settings.CanGiveUp.Value and (torso.Position - Monster:GetCFrame().p).magnitude > Monster:GetMaximumDetectionDistance() then
						Mind.CurrentTargetHumanoid.Value = nil
					end
				end
			else
				Mind.CurrentTargetHumanoid.Value = nil
			end
		end
	end
end


Prompt: -- / Wind Shake / --

Response:
WindShake:SetDefaultSettings(WindShakeSettings)

WindShake:Init()

game.Workspace.DescendantAdded:Connect(function(Object)
	if table.find(ShakableObjects, Object.Name) then
		WindShake:AddObjectShake(Object, WindShakeSettings)
	end
end)


Prompt: --// Find Element in Table

Response:
local Find = function(What, InTable)
	for Index, Value in pairs(InTable) do
		if Index == What or Value == What then
			return true
		end
	end

	return false
end


Response:
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
				if key == "c" then --Camera controls
				        if cam == ("car") then
							Camera.CameraSubject = player.Character.Humanoid
							Camera.CameraType = ("Custom")
							cam = ("freeplr")
							Camera.FieldOfView = 70
							limitButton.Text = "Free Camera"
							wait(3)
							limitButton.Text = ""
						elseif cam == ("freeplr") then
							Camera.CameraSubject = player.Character.Humanoid
							Camera.CameraType = ("Attach")
							cam = ("lockplr")
							Camera.FieldOfView = 60
							limitButton.Text = "FPV Camera"
							wait(3)
							limitButton.Text = ""
				        elseif cam == ("lockplr") then
							Camera.CameraSubject = carSeat
							Camera.CameraType = ("Attach")
							cam = ("car")
							Camera.FieldOfView = 50
							limitButton.Text = "Standard Camera"
							wait(3)
							limitButton.Text = ""
				        end
			end
		end)


Prompt: --[ FUNCTIONS ]--

Response:
game.Players.PlayerAdded:Connect(function(player) -- When Player Join
	player.CharacterAdded:Connect(function(chr) -- Grabs Player Character
		player.Chatted:Connect(function(msg) -- When Player Chats

			local Humanoid = chr:WaitForChild("Humanoid") -- Getting Humanoid
			local Desc = Humanoid:GetAppliedDescription() -- Getting Humanoid Description
			Desc.RightLeg = 134082579 -- Korblox Leg

			-- IF command match start --

			if msg:sub(1, Command:len()):lower() == Command:lower() then -- if msg is /e headless then
				Humanoid:ApplyDescription(Desc)
			end

			-- IF command match end --

		end)
	end)
end)