Prompt:
--[=[
	@within ClientRemoteSignal
	@interface Connection
	.Disconnect () -> nil
]=]

Response:
function ClientRemoteSignal.new(re: RemoteEvent, inboundMiddleware: ClientMiddleware?, outboudMiddleware: ClientMiddleware?)
	local self = setmetatable({}, ClientRemoteSignal)
	self._re = re
	if outboudMiddleware and #outboudMiddleware > 0 then
		self._hasOutbound = true
		self._outbound = outboudMiddleware
	else
		self._hasOutbound = false
	end
	if inboundMiddleware and #inboundMiddleware > 0 then
		self._directConnect = false
		self._signal = Signal.new(nil)
		self._reConn = self._re.OnClientEvent:Connect(function(...)
			local args = table.pack(...)
			for _,middlewareFunc in ipairs(inboundMiddleware) do
				local middlewareResult = table.pack(middlewareFunc(args))
				if not middlewareResult[1] then
					return
				end
			end
			self._signal:Fire(table.unpack(args, 1, args.n))
		end)
	else
		self._directConnect = true
	end
	return self
end

function ClientRemoteSignal:_processOutboundMiddleware(...: any)
	local args = table.pack(...)
	for _,middlewareFunc in ipairs(self._outbound) do
		local middlewareResult = table.pack(middlewareFunc(args))
		if not middlewareResult[1] then
			return table.unpack(middlewareResult, 2, middlewareResult.n)
		end
	end
	return table.unpack(args, 1, args.n)
end


Prompt: -----------------------------------PATHER--------------------------------------

Response:
local function Pather(endPoint, surfaceNormal, overrideUseDirectPath)
	local this = {}

	local directPathForHumanoid
	local directPathForVehicle
	if overrideUseDirectPath ~= nil then
		directPathForHumanoid = overrideUseDirectPath
		directPathForVehicle = overrideUseDirectPath
	else
		directPathForHumanoid = UseDirectPath
		directPathForVehicle = UseDirectPathForVehicle
	end

	this.Cancelled = false
	this.Started = false

	this.Finished = Instance.new("BindableEvent")
	this.PathFailed = Instance.new("BindableEvent")

	this.PathComputing = false
	this.PathComputed = false

	this.OriginalTargetPoint = endPoint
	this.TargetPoint = endPoint
	this.TargetSurfaceNormal = surfaceNormal

	this.DiedConn = nil
	this.SeatedConn = nil
	this.BlockedConn = nil
	this.TeleportedConn = nil

	this.CurrentPoint = 0

	this.HumanoidOffsetFromPath = ZERO_VECTOR3

	this.CurrentWaypointPosition = nil
	this.CurrentWaypointPlaneNormal = ZERO_VECTOR3
	this.CurrentWaypointPlaneDistance = 0
	this.CurrentWaypointNeedsJump = false;

	this.CurrentHumanoidPosition = ZERO_VECTOR3
	this.CurrentHumanoidVelocity = 0

	this.NextActionMoveDirection = ZERO_VECTOR3
	this.NextActionJump = false

	this.Timeout = 0

	this.Humanoid = findPlayerHumanoid(Player)
	this.OriginPoint = nil
	this.AgentCanFollowPath = false
	this.DirectPath = false
	this.DirectPathRiseFirst = false

	local rootPart = this.Humanoid and this.Humanoid.RootPart
	if rootPart then
		-- Setup origin
		this.OriginPoint = rootPart.CFrame.p

		-- Setup agent
		local agentRadius = 2
		local agentHeight = 5
		local agentCanJump = true

		local seat = this.Humanoid.SeatPart
		if seat and seat:IsA("VehicleSeat") then
			-- Humanoid is seated on a vehicle
			local vehicle = seat:FindFirstAncestorOfClass("Model")
			if vehicle then
				-- Make sure the PrimaryPart is set to the vehicle seat while we compute the extends.
				local tempPrimaryPart = vehicle.PrimaryPart
				vehicle.PrimaryPart = seat

				-- For now, only direct path
				if directPathForVehicle then
					local extents = vehicle:GetExtentsSize()
					agentRadius = AgentSizeIncreaseFactor * 0.5 * math.sqrt(extents.X * extents.X + extents.Z * extents.Z)
					agentHeight = AgentSizeIncreaseFactor * extents.Y
					agentCanJump = false
					this.AgentCanFollowPath = true
					this.DirectPath = directPathForVehicle
				end

				-- Reset PrimaryPart
				vehicle.PrimaryPart = tempPrimaryPart
			end
		else
			local extents = GetCharacter():GetExtentsSize()
			agentRadius = AgentSizeIncreaseFactor * 0.5 * math.sqrt(extents.X * extents.X + extents.Z * extents.Z)
			agentHeight = AgentSizeIncreaseFactor * extents.Y
			agentCanJump = (this.Humanoid.JumpPower > 0)
			this.AgentCanFollowPath = true
			this.DirectPath = directPathForHumanoid
			this.DirectPathRiseFirst = this.Humanoid.Sit
		end

		-- Build path object
		this.pathResult = PathfindingService:CreatePath({AgentRadius = agentRadius, AgentHeight = agentHeight, AgentCanJump = agentCanJump})
	end

	function this:Cleanup()
		if this.stopTraverseFunc then
			this.stopTraverseFunc()
			this.stopTraverseFunc = nil
		end

		if this.MoveToConn then
			this.MoveToConn:Disconnect()
			this.MoveToConn = nil
		end

		if this.BlockedConn then
			this.BlockedConn:Disconnect()
			this.BlockedConn = nil
		end

		if this.DiedConn then
			this.DiedConn:Disconnect()
			this.DiedConn = nil
		end

		if this.SeatedConn then
			this.SeatedConn:Disconnect()
			this.SeatedConn = nil
		end

		if this.TeleportedConn then
			this.TeleportedConn:Disconnect()
			this.TeleportedConn = nil
		end

		this.Started = false
	end

	function this:Cancel()
		this.Cancelled = true
		this:Cleanup()
	end

	function this:IsActive()
		return this.AgentCanFollowPath and this.Started and not this.Cancelled
	end

	function this:OnPathInterrupted()
		-- Stop moving
		this.Cancelled = true
		this:OnPointReached(false)
	end

	function this:ComputePath()
		if this.OriginPoint then
			if this.PathComputed or this.PathComputing then return end
			this.PathComputing = true
			if this.AgentCanFollowPath then
				if this.DirectPath then
					this.pointList = {
						PathWaypoint.new(this.OriginPoint, Enum.PathWaypointAction.Walk),
						PathWaypoint.new(this.TargetPoint, this.DirectPathRiseFirst and Enum.PathWaypointAction.Jump or Enum.PathWaypointAction.Walk)
					}
					this.PathComputed = true
				else
					this.pathResult:ComputeAsync(this.OriginPoint, this.TargetPoint)
					this.pointList = this.pathResult:GetWaypoints()
					this.BlockedConn = this.pathResult.Blocked:Connect(function(blockedIdx) this:OnPathBlocked(blockedIdx) end)
					this.PathComputed = this.pathResult.Status == Enum.PathStatus.Success
				end
			end
			this.PathComputing = false
		end
	end

	function this:IsValidPath()
		this:ComputePath()
		return this.PathComputed and this.AgentCanFollowPath
	end

	this.Recomputing = false
	function this:OnPathBlocked(blockedWaypointIdx)
		local pathBlocked = blockedWaypointIdx >= this.CurrentPoint
		if not pathBlocked or this.Recomputing then
			return
		end

		this.Recomputing = true

		if this.stopTraverseFunc then
			this.stopTraverseFunc()
			this.stopTraverseFunc = nil
		end

		this.OriginPoint = this.Humanoid.RootPart.CFrame.p

		this.pathResult:ComputeAsync(this.OriginPoint, this.TargetPoint)
		this.pointList = this.pathResult:GetWaypoints()
		if #this.pointList > 0 then
			this.HumanoidOffsetFromPath = this.pointList[1].Position - this.OriginPoint
		end
		this.PathComputed = this.pathResult.Status == Enum.PathStatus.Success

		if ShowPath then
			this.stopTraverseFunc, this.setPointFunc = ClickToMoveDisplay.CreatePathDisplay(this.pointList)
		end
		if this.PathComputed then
			this.CurrentPoint = 1 -- The first waypoint is always the start location. Skip it.
			this:OnPointReached(true) -- Move to first point
		else
			this.PathFailed:Fire()
			this:Cleanup()
		end

		this.Recomputing = false
	end

	function this:OnRenderStepped(dt)
		if this.Started and not this.Cancelled then
			-- Check for Timeout (if a waypoint is not reached within the delay, we fail)
			this.Timeout = this.Timeout + dt
			if this.Timeout > UnreachableWaypointTimeout then
				this:OnPointReached(false)
				return
			end

			-- Get Humanoid position and velocity
			this.CurrentHumanoidPosition = this.Humanoid.RootPart.Position + this.HumanoidOffsetFromPath
			this.CurrentHumanoidVelocity = this.Humanoid.RootPart.Velocity

			-- Check if it has reached some waypoints
			while this.Started and this:IsCurrentWaypointReached() do
				this:OnPointReached(true)
			end

			-- If still started, update actions
			if this.Started then
				-- Move action
				this.NextActionMoveDirection = this.CurrentWaypointPosition - this.CurrentHumanoidPosition
				if this.NextActionMoveDirection.Magnitude > ALMOST_ZERO then
					this.NextActionMoveDirection = this.NextActionMoveDirection.Unit
				else
					this.NextActionMoveDirection = ZERO_VECTOR3
				end
				-- Jump action
				if this.CurrentWaypointNeedsJump then
					this.NextActionJump = true
					this.CurrentWaypointNeedsJump = false	-- Request jump only once
				else
					this.NextActionJump = false
				end
			end
		end
	end

	function this:IsCurrentWaypointReached()
		local reached = false

		-- Check we do have a plane, if not, we consider the waypoint reached
		if this.CurrentWaypointPlaneNormal ~= ZERO_VECTOR3 then
			-- Compute distance of Humanoid from destination plane
			local dist = this.CurrentWaypointPlaneNormal:Dot(this.CurrentHumanoidPosition) - this.CurrentWaypointPlaneDistance
			-- Compute the component of the Humanoid velocity that is towards the plane
			local velocity = -this.CurrentWaypointPlaneNormal:Dot(this.CurrentHumanoidVelocity)
			-- Compute the threshold from the destination plane based on Humanoid velocity
			local threshold = math.max(1.0, 0.0625 * velocity)
			-- If we are less then threshold in front of the plane (between 0 and threshold) or if we are behing the plane (less then 0), we consider we reached it
			reached = dist < threshold
		else
			reached = true
		end

		if reached then
			this.CurrentWaypointPosition = nil
			this.CurrentWaypointPlaneNormal	= ZERO_VECTOR3
			this.CurrentWaypointPlaneDistance = 0
		end

		return reached
	end

	function this:OnPointReached(reached)

		if reached and not this.Cancelled then
			-- First, destroyed the current displayed waypoint
			if this.setPointFunc then
				this.setPointFunc(this.CurrentPoint)
			end

			local nextWaypointIdx = this.CurrentPoint + 1

			if nextWaypointIdx > #this.pointList then
				-- End of path reached
				if this.stopTraverseFunc then
					this.stopTraverseFunc()
				end
				this.Finished:Fire()
				this:Cleanup()
			else
				local currentWaypoint = this.pointList[this.CurrentPoint]
				local nextWaypoint = this.pointList[nextWaypointIdx]

				-- If airborne, only allow to keep moving
				-- if nextWaypoint.Action ~= Jump, or path mantains a direction
				-- Otherwise, wait until the humanoid gets to the ground
				local currentState = this.Humanoid:GetState()
				local isInAir = currentState == Enum.HumanoidStateType.FallingDown
					or currentState == Enum.HumanoidStateType.Freefall
					or currentState == Enum.HumanoidStateType.Jumping

				if isInAir then
					local shouldWaitForGround = nextWaypoint.Action == Enum.PathWaypointAction.Jump
					if not shouldWaitForGround and this.CurrentPoint > 1 then
						local prevWaypoint = this.pointList[this.CurrentPoint - 1]

						local prevDir = currentWaypoint.Position - prevWaypoint.Position
						local currDir = nextWaypoint.Position - currentWaypoint.Position

						local prevDirXZ = Vector2.new(prevDir.x, prevDir.z).Unit
						local currDirXZ = Vector2.new(currDir.x, currDir.z).Unit

						local THRESHOLD_COS = 0.996 -- ~cos(5 degrees)
						shouldWaitForGround = prevDirXZ:Dot(currDirXZ) < THRESHOLD_COS
					end

					if shouldWaitForGround then
						this.Humanoid.FreeFalling:Wait()

						-- Give time to the humanoid's state to change
						-- Otherwise, the jump flag in Humanoid
						-- will be reset by the state change
						wait(0.1)
					end
				end

				-- Move to the next point
				if FFlagUserNavigationClickToMoveSkipPassedWaypoints then
					this:MoveToNextWayPoint(currentWaypoint, nextWaypoint, nextWaypointIdx)
				else
					if this.setPointFunc then
						this.setPointFunc(nextWaypointIdx)
					end
					if nextWaypoint.Action == Enum.PathWaypointAction.Jump then
						this.Humanoid.Jump = true
					end
					this.Humanoid:MoveTo(nextWaypoint.Position)

					this.CurrentPoint = nextWaypointIdx
				end
			end
		else
			this.PathFailed:Fire()
			this:Cleanup()
		end
	end

	function this:MoveToNextWayPoint(currentWaypoint, nextWaypoint, nextWaypointIdx)
		-- Build next destination plane
		-- (plane normal is perpendicular to the y plane and is from next waypoint towards current one (provided the two waypoints are not at the same location))
		-- (plane location is at next waypoint)
		this.CurrentWaypointPlaneNormal = currentWaypoint.Position - nextWaypoint.Position
		this.CurrentWaypointPlaneNormal = Vector3.new(this.CurrentWaypointPlaneNormal.X, 0, this.CurrentWaypointPlaneNormal.Z)
		if this.CurrentWaypointPlaneNormal.Magnitude > ALMOST_ZERO then
			this.CurrentWaypointPlaneNormal	= this.CurrentWaypointPlaneNormal.Unit
			this.CurrentWaypointPlaneDistance = this.CurrentWaypointPlaneNormal:Dot(nextWaypoint.Position)
		else
			-- Next waypoint is the same as current waypoint so no plane
			this.CurrentWaypointPlaneNormal	= ZERO_VECTOR3
			this.CurrentWaypointPlaneDistance = 0
		end

		-- Should we jump
		this.CurrentWaypointNeedsJump = nextWaypoint.Action == Enum.PathWaypointAction.Jump;

		-- Remember next waypoint position
		this.CurrentWaypointPosition = nextWaypoint.Position

		-- Move to next point
		this.CurrentPoint = nextWaypointIdx

		-- Finally reset Timeout
		this.Timeout = 0
	end

	function this:Start(overrideShowPath)
		if not this.AgentCanFollowPath then
			this.PathFailed:Fire()
			return
		end

		if this.Started then return end
		this.Started = true

		ClickToMoveDisplay.CancelFailureAnimation()

		if ShowPath then
			if overrideShowPath == nil or overrideShowPath then
				this.stopTraverseFunc, this.setPointFunc = ClickToMoveDisplay.CreatePathDisplay(this.pointList, this.OriginalTargetPoint)
			end
		end

		if #this.pointList > 0 then
			-- Determine the humanoid offset from the path's first point
			-- Offset of the first waypoint from the path's origin point
			this.HumanoidOffsetFromPath = Vector3.new(0, this.pointList[1].Position.Y - this.OriginPoint.Y, 0)

			-- As well as its current position and velocity
			this.CurrentHumanoidPosition = this.Humanoid.RootPart.Position + this.HumanoidOffsetFromPath
			this.CurrentHumanoidVelocity = this.Humanoid.RootPart.Velocity

			-- Connect to events
			this.SeatedConn = this.Humanoid.Seated:Connect(function(isSeated, seat) this:OnPathInterrupted() end)
			this.DiedConn = this.Humanoid.Died:Connect(function() this:OnPathInterrupted() end)
			this.TeleportedConn = this.Humanoid.RootPart:GetPropertyChangedSignal("CFrame"):Connect(function() this:OnPathInterrupted() end)

			-- Actually start
			this.CurrentPoint = 1 -- The first waypoint is always the start location. Skip it.
			this:OnPointReached(true) -- Move to first point
		else
			this.PathFailed:Fire()
			if this.stopTraverseFunc then
				this.stopTraverseFunc()
			end
		end
	end

	--We always raycast to the ground in the case that the user clicked a wall.
	local offsetPoint = this.TargetPoint + this.TargetSurfaceNormal*1.5
	local ray = Ray.new(offsetPoint, Vector3.new(0,-1,0)*50)
	local newHitPart, newHitPos = Workspace:FindPartOnRayWithIgnoreList(ray, getIgnoreList())
	if newHitPart then
		this.TargetPoint = newHitPos
	end
	this:ComputePath()

	return this
end


Prompt: --// Handling Settings

Response:
	Firerate = 60 / 300; -- 60 = 1 Minute, 700 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!

	FireMode = 1; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive


Prompt: --// Math

Response:
local L_129_ = function(L_166_arg1, L_167_arg2, L_168_arg3)
	if L_166_arg1 > L_168_arg3 then
		return L_168_arg3
	elseif L_166_arg1 < L_167_arg2 then
		return L_167_arg2
	end
	return L_166_arg1
end

local L_130_ = L_118_.new(Vector3.new())
L_130_.s = 30
L_130_.d = 0.55

local L_131_ = CFrame.Angles(0, 0, 0)


Response:
local force = Instance.new("BodyForce")
force.Parent = torso
f = force
if AJ == false then
AJ = true
antijump = script.AntiJump:clone()
antijump.Parent = Tool.Parent
antijump.Disabled = false
elseif AJ == true then
antijump.Disabled = false
end

wait(0.01)

elseif ison == 0 then
if arms then
sh[1].Part1 = arms[1]
sh[2].Part1 = arms[2]
f.Parent = nil
arms[2].Name = "Right Leg"
arms[1].Name = "Left Leg"
welds[1].Parent = nil
welds[2].Parent = nil
Tool.Parent:findFirstChild("Humanoid").WalkSpeed = 16
antijump.Disabled = true
end
end


Prompt: -------------Motor6Ding Section------------------------

Response:
Character.Humanoid.Died:connect(function()
	Stand()
	_G.Proned = false
	_G.Crouched = false
	_G.Sprinting = false
end)
game:GetService("RunService").RenderStepped:connect(function()
	Mouse.TargetFilter = game.Workspace
	if not _G.Viewing then
	local HRPCF =  Character.UpperTorso.CFrame * CFrame.new(0, .5, 0)* CFrame.new(Humanoid.CameraOffset)
	if Lean then
		HRPCF = HRPCF
	end
	Neck.C0 =  Torso.CFrame:toObjectSpace(HRPCF)
	Neck.C1 =  CFrame.Angles(-math.asin(Camera.CoordinateFrame.lookVector.y), 0, 0)
	elseif _G.Viewing then
	Character.Torso.Neck.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 0, 0)
	Character.Torso.Neck.C1 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 0, 0)
	end
	if player.PlayerScripts.CameraScript.RootCamera:FindFirstChild("Sensitivity") then
		if Aiming then
			player.PlayerScripts.CameraScript.RootCamera.Sensitivity.Value = Player.PlayerGui.MouseSensitivity.Frame.Data.Value
		else
			player.PlayerScripts.CameraScript.RootCamera.Sensitivity.Value = 1
		end
	Mouse.Button2Down:connect(function()
		if not Aiming then
			Aiming = true
		end
	end)
	Mouse.Button2Up:connect(function()
		if Aiming then
			Aiming = false
		end
	end)
	end
end)--]]
Humanoid.HipHeight = 1


Prompt: -- Constructor

Response:
local Camera = workspace.CurrentCamera
local Looping = true
local Speed = 1
local FreezeControls = false


Prompt: --!strict

Response:
local LuauPolyfill = script.Parent.Parent
local types = require(LuauPolyfill.types)
type Array<T> = types.Array<T>
type reduceFn<T, U> = (previousValue: U, currentValue: T, currentIndex: number, array: Array<T>) -> U


Prompt:
--[[
	Stage implementation
]]

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

function EndGame.new(gameStageHandler)
	local self = setmetatable({
		gameStageHandler = gameStageHandler,
	}, EndGame)

	return self
end

function EndGame:initialize()
	wait(5) -- TODO: Have a buffer time at the end of the game based on a configuration

	-- Teleport players back to the main lobby place
	for _, player in pairs(Players:GetPlayers()) do
		TeleportService:Teleport(Conf.lobby_place, player)
	end
end

function EndGame:playerAdded(player)
	local warningMessage = "Player " .. player.Name .. " joined after game start"
	warn(warningMessage)
	WarningEvent:FireAllClients(warningMessage)
end

function EndGame:destroy()
end

return EndGame


Prompt: -- this code hijacked from the new rocket launcher

Response:
local Rocket = Instance.new("Part")
Rocket.Locked = true
Rocket.BackSurface = 3
Rocket.BottomSurface = 3
Rocket.FrontSurface = 3
Rocket.LeftSurface = 3
Rocket.RightSurface = 3
Rocket.TopSurface = 3
Rocket.Size = Vector3.new(1,1,4)
Rocket.BrickColor = BrickColor.new(21)
script.Parent.RocketScript:clone().Parent = Rocket
script.Parent.Explosion:clone().Parent = Rocket
script.Parent.Swoosh:clone().Parent = Rocket

function fire(target)

	local dir = target - sphere.Position
	dir = computeDirection(dir)

	local missile = Rocket:clone()

	local spawnPos = sphere.Position

	local pos = spawnPos + (dir * 8)

	--missile.Position = pos
	missile.CFrame = CFrame.new(pos,  pos + dir)

	missile.RocketScript.Disabled = false
	missile.Parent = game.Workspace

end

function computeDirection(vec)
	local lenSquared = vec.magnitude * vec.magnitude
	local invSqrt = 1 / math.sqrt(lenSquared)
	return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
end

function scanForHumans()
	-- KILL THE HUMANS!!!!!!!!!!

	-- for now, pick a random one. In the future, pick the closest. Or use hit test to pick a visible one.
	local humansFound = {}

	local players = game.Players:children()

	if (#players < 1) then return end

	local i = math.random(1, #players)

	myTarget = players[i].Character

end

function moveKillbot()

	-- killbots move using a biased random walk toward the target
	-- they also like to float at least 10 studs above the ground

	local dx = math.random(-100,100)
	local dy = math.random(-40,40)
	local dz = math.random(-100,100)

	if (sphere.Position.y < 10 and dy < 0) then dy = -dy end
	if (sphere.Position.y > 80 and dy > 0) then dy = -dy end

	if (myTarget ~= nil) then
		local dir = computeDirection(myTarget.PrimaryPart.Position - sphere.Position)
		dx = dx + (dir.x * 80) -- change this number to alter player trophism
		dz = dz + (dir.z * 80)
	end

	local vec = computeDirection(Vector3.new(dx,dy,dz))

	sphere.BodyPosition.position = sphere.Position + (vec * 40) -- change this number to alter speed

end

function onTouched(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	if humanoid~=nil then
		humanoid.Health = humanoid.Health - 2000 -- Killbots kill you when you touch them! duh.
	end
end

sphere.Touched:connect(onTouched)

while true do  -- loop forever
	scanForHumans()

	for n=1,5 do
		if (myTarget ~= nil) then
			if(math.random(1,3) == 2) then fire(myTarget.PrimaryPart.Position) end
			wait(math.random(1,2))
			moveKillbot()
			wait(math.random(1,2))
		end
	end
	wait(1) -- don't hog CPU
end


Prompt:
--	====================
--	BASIC
--	A basic settings for the gun
--	====================

Response:
		Auto = true;
		MuzzleOffset = Vector3.new(0, 0.625, 1.25);
		BaseDamage = 40;
		FireRate = 0.1; --In second
		ReloadTime = 2; --In second
		AmmoPerClip = 30; --Put "math.huge" to make this gun has infinite ammo and never reload
		Spread = 1.25; --In degree
		HeadshotEnabled = true; --Enable the gun to do extra damage on headshot
		HeadshotDamageMultiplier = 4;
		MouseIconID = "316279304";
		HitSoundIDs = {186809061,186809249,186809250,186809252};
		IdleAnimationID = 94331086; --Set to "nil" if you don't want to animate
		IdleAnimationSpeed = 1;
		FireAnimationID = 94332152; --Set to "nil" if you don't want to animate
		FireAnimationSpeed = 6;
		ReloadAnimationID = nil; --Set to "nil" if you don't want to animate
		ReloadAnimationSpeed = 1;


Prompt: -- Set up character event binding when player joins the game

Response:
local function onPlayerAdded(player)
	player.CharacterAdded:Connect(onCharacterAdded)
	player.CharacterRemoving:Connect(onCharacterRemoving)
end


Prompt: --Search Event

Response: frame.Search:GetPropertyChangedSignal("Text"):Connect(update)


Prompt: -- Listeners

Response:
Tool.Equipped:connect(function()

	-- Redefine character and humanoid just in case
	Character = Player.Character
	Humanoid = Character:WaitForChild("Humanoid")

	-- Show the segway menu gui and color gui
	NewDisplayGui = DisplayGui:Clone()
	NewDisplayGui.Parent = PlayerGui

	NewColorGui = ColorGui:Clone()
	NewColorGui.Parent = PlayerGui
	NewColorGui:WaitForChild("MyTool").Value = Tool

	local OpenButton = NewDisplayGui:WaitForChild("OpenButton")
	local ColorOpenButton = NewColorGui:WaitForChild("OpenButton")

	OpenButton:TweenPosition(UDim2.new(1, -92,1, -38),0,0,0.4,true)
	ColorOpenButton:TweenPosition(UDim2.new(0, -6,0.5, -70),0,0,0.4,true)
end)

Tool.Unequipped:connect(function() -- Remove segway when tool is unequipped
	game:GetService("ContextActionService"):UnbindAction("segInputAction")

	if NewDisplayGui and NewColorGui then
		NewDisplayGui:Destroy()
		NewColorGui:Destroy()
	end

	if SpawnedSegway.Value then
		RemoveSegway()
	end
end)

Tool.Activated:connect(function()
	if HasSpawnedSegway.Value == false and IsCoolingDown == false then -- So workspace won't be spammed with segways
	IsCoolingDown = true
	HasSpawnedSegway.Value = true

	-- Hide the tool player is holding
	ConfigTool:FireServer(1,Tool,false,nil)

	-- Spawn segway
	SpawnSegway:FireServer(Character,Tool,SpawnedSegway,StarterColor.Value) -- Fire remote event to spawn

	-- Prevent spamming of segways which may lag the server
	wait(ToolCoolDown)
	IsCoolingDown = false
	end
end)

Humanoid.Died:connect(function()
	RemoveSegway()
end)


Prompt: --Allow players to chat to force their character to respawn?

Response: allow_force_respawn = false


Prompt: --[[Output Scaling Factor]]

Response:
	local hpScaling = _Tune.WeightScaling*10
	local FBrakeForce = _Tune.FBrakeForce
	local RBrakeForce = _Tune.RBrakeForce
	local PBrakeForce = _Tune.PBrakeForce


Prompt: --model by CatLeoYT script--

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

Players = game:GetService("Players")

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

Gravity = 196.20
JumpHeightPercentage = 0.12

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: --Rain script. Do not remove or it will not function correctly.

Response: local l1IlIIlll1Il1I1iIIi = assert local Ill1Ii1llliiIl1Il1i = select local iili111llI111lIiI11 = tonumber local iIiiII1IiI1lil1l1l1 = unpack local IiiiillI1i1ill111lI = pcall local l1lilll11i11lIIi1Ii = setfenv local llI1II1li1l1I1I11Ii = setmetatable local lIllIl1i1iIii1liiIlli = type local liI11IIlil1lIIIilI1 = getfenv local lIli1l1iilliiiillIIl1 = tostring local IiII1ll11lliIiill1I = error local lliill1llIlilliIll1 = string.sub local lIl11iiIIIllIIIill11I = string.byte local IIII1i11i1liiIiIi11 = string.char local illlli1IiIIIiliIiI1 = string.rep local iiiilIlIIliiill1111 = string.gsub local iil1I1Il1l1IllIIil1 = string.match local lIl1Ii1iIlllliil1IIil = table.insert local lIl1Ii1il1IlllIi1IlII = lIl11iiIIIllIIIill11I("E", 1) local liiilllillI1iIli1ll, liilIllIlil1iiI11II = #{6113}, #{ 784, 1155, 3010, 2956, 6710, 2370, 5262, 6681, 1932, 5686, 1457, 1487, 6916, 5274, 761, 3530, 1309, 170, 2150, 5525, 679, 6927 } + lIl1Ii1il1IlllIi1IlII + 130980 local i1il111IilllIiIIilI = {} local ilI1l1lllI1lll1I1II = 1 local li1ii1ili11liIilI1I, l1i1IlIIIiIil1lI1l1 local function lIlIlllIiili1iliI11li(IIll1l11iIII11Ilil1, lI1Il1Ii1I1liIIi1Ii) local lii11IIIll1ili1llll IIll1l11iIII11Ilil1 = iiiilIlIIliiill1111(lliill1llIlilliIll1(IIll1l11iIII11Ilil1, 5), "..", function(lIll1Il11111II1I11lll) if lIl11iiIIIllIIIill11I(lIll1Il11111II1I11lll, 2) == 72 then lii11IIIll1ili1llll = iili111llI111lIiI11(lliill1llIlilliIll1(lIll1Il11111II1I11lll, 1, 1)) return "" else local Iil1ili1I1I1Il11iii = IIII1i11i1liiIiIi11(iili111llI111lIiI11(lIll1Il11111II1I11lll, 16)) if lii11IIIll1ili1llll then local ii1I111Iill1lillIiI = illlli1IiIIIiliIiI1(Iil1ili1I1I1Il11iii, lii11IIIll1ili1llll) lii11IIIll1ili1llll = nil return ii1I111Iill1lillIiI else return Iil1ili1I1I1Il11iii end end end) local function illiIIi1lIl111iIlli() local lIlI11Iii11I11liII11i = lIl11iiIIIllIIIill11I(IIll1l11iIII11Ilil1, ilI1l1lllI1lll1I1II, ilI1l1lllI1lll1I1II) ilI1l1lllI1lll1I1II = ilI1l1lllI1lll1I1II + 1 return lIlI11Iii11I11liII11i end local function il1i11IiiiiIi1I1i11() local lIlI11Iii11I11liII11i, Iil1ili1I1I1Il11iii, ii1I111Iill1lillIiI, lili1IiIIl1lIl1lIIl = lIl11iiIIIllIIIill11I(IIll1l11iIII11Ilil1, ilI1l1lllI1lll1I1II, ilI1l1lllI1lll1I1II + 3) ilI1l1lllI1lll1I1II = ilI1l1lllI1lll1I1II + 4 return lili1IiIIl1lIl1lIIl * 16777216 + ii1I111Iill1lillIiI * 65536 + Iil1ili1I1I1Il11iii * 256 + lIlI11Iii11I11liII11i end local function l11i1lii1I1i1li1l1i(iI11illIiiIliiIllll, illIilIlliiliI1I1i1, il11Ii1lIi1IIl1i1ll) if il11Ii1lIi1IIl1i1ll then local lI1I1iill1i1IIll1ii, i1111iiI1llllllI1ll = 0, 0 for ll1i1IiIlIiIIIiIiIi = illIilIlliiliI1I1i1, il11Ii1lIi1IIl1i1ll do lI1I1iill1i1IIll1ii = lI1I1iill1i1IIll1ii + 2 ^ i1111iiI1llllllI1ll * l11i1lii1I1i1li1l1i(iI11illIiiIliiIllll, ll1i1IiIlIiIIIiIiIi) i1111iiI1llllllI1ll = i1111iiI1llllllI1ll + 1 end return lI1I1iill1i1IIll1ii else local i11llIii1l1Ii1IliiI = 2 ^ (illIilIlliiliI1I1i1 - 1) return i11llIii1l1Ii1IliiI <= iI11illIiiIliiIllll % (i11llIii1l1Ii1IliiI + i11llIii1l1Ii1IliiI) and 1 or 0 end end local function Ii1l1I11liIlI1iiIIi() local lIlI11Iii11I11liII11i, Iil1ili1I1I1Il11iii = il1i11IiiiiIi1I1i11(), il1i11IiiiiIi1I1i11() if lIlI11Iii11I11liII11i == 0 and Iil1ili1I1I1Il11iii == 0 then return 0 end return (-2 * l11i1lii1I1i1li1l1i(Iil1ili1I1I1Il11iii, 32) + 1) * 2 ^ (l11i1lii1I1i1li1l1i(Iil1ili1I1I1Il11iii, 21, 31) - 1023) * ((l11i1lii1I1i1li1l1i(Iil1ili1I1I1Il11iii, 1, 20) * 4294967296 + lIlI11Iii11I11liII11i) / 4503599627370496 + 1) end local lIlIIililiiIlIlI1i1ii = bit or bit32 local lllIii1IIl1lii1lII1 = lIlIIililiiIlIlI1i1ii and lIlIIililiiIlIlI1i1ii.bxor or function(lIlI11Iii11I11liII11i, Iil1ili1I1I1Il11iii) local lIlllIIl1lllliIIii11I = 1 local ii1I111Iill1lillIiI = 0 while lIlI11Iii11I11liII11i > 0 and Iil1ili1I1I1Il11iii > 0 do local li1il1lIIiIlIli1lII = lIlI11Iii11I11liII11i % 2 local IIIIiiiliI1iii1ll1i = Iil1ili1I1I1Il11iii % 2 if li1il1lIIiIlIli1lII ~= IIIIiiiliI1iii1ll1i then ii1I111Iill1lillIiI = ii1I111Iill1lillIiI + lIlllIIl1lllliIIii11I end lIlI11Iii11I11liII11i = (lIlI11Iii11I11liII11i - li1il1lIIiIlIli1lII) / 2 Iil1ili1I1I1Il11iii = (Iil1ili1I1I1Il11iii - IIIIiiiliI1iii1ll1i) / 2 lIlllIIl1lllliIIii11I = lIlllIIl1lllliIIii11I * 2 end if lIlI11Iii11I11liII11i < Iil1ili1I1I1Il11iii then lIlI11Iii11I11liII11i = Iil1ili1I1I1Il11iii end while lIlI11Iii11I11liII11i > 0 do local li1il1lIIiIlIli1lII = lIlI11Iii11I11liII11i % 2 if li1il1lIIiIlIli1lII > 0 then ii1I111Iill1lillIiI = ii1I111Iill1lillIiI + lIlllIIl1lllliIIii11I end lIlI11Iii11I11liII11i = (lIlI11Iii11I11liII11i - li1il1lIIiIlIli1lII) / 2 lIlllIIl1lllliIIii11I = lIlllIIl1lllliIIii11I * 2 end return ii1I111Iill1lillIiI end local function lilI111il1iI11Ilii1(I1Iii1111IIlIIlIli1) local i1I1IIi1IIlli11lIii = { lIl11iiIIIllIIIill11I(IIll1l11iIII11Ilil1, ilI1l1lllI1lll1I1II, ilI1l1lllI1lll1I1II + 3) } ilI1l1lllI1lll1I1II = ilI1l1lllI1lll1I1II + 4 local lIlI11Iii11I11liII11i = lllIii1IIl1lii1lII1(i1I1IIi1IIlli11lIii[1], l1i1IlIIIiIil1lI1l1) local Iil1ili1I1I1Il11iii = lllIii1IIl1lii1lII1(i1I1IIi1IIlli11lIii[2], l1i1IlIIIiIil1lI1l1) local ii1I111Iill1lillIiI = lllIii1IIl1lii1lII1(i1I1IIi1IIlli11lIii[3], l1i1IlIIIiIil1lI1l1) local lili1IiIIl1lIl1lIIl = lllIii1IIl1lii1lII1(i1I1IIi1IIlli11lIii[4], l1i1IlIIIiIil1lI1l1) l1i1IlIIIiIil1lI1l1 = (37 * l1i1IlIIIiIil1lI1l1 + I1Iii1111IIlIIlIli1) % 256 return lili1IiIIl1lIl1lIIl * 16777216 + ii1I111Iill1lillIiI * 65536 + Iil1ili1I1I1Il11iii * 256 + lIlI11Iii11I11liII11i end local function iiiIIliiii1iIIiI1iI(l1IlI1IiiIll11IiIll) local lIIiiiIl1lIiIIIlI1l = il1i11IiiiiIi1I1i11() local II1Ill111ii1l1iliil = "" for ll1i1IiIlIiIIIiIiIi = liiilllillI1iIli1ll, lIIiiiIl1lIiIIIlI1l do II1Ill111ii1l1iliil = II1Ill111ii1l1iliil .. IIII1i11i1liiIiIi11(lllIii1IIl1lii1lII1(lIl11iiIIIllIIIill11I(IIll1l11iIII11Ilil1, ilI1l1lllI1lll1I1II + ll1i1IiIlIiIIIiIiIi - 1), li1ii1ili11liIilI1I)) li1ii1ili11liIilI1I = (l1IlI1IiiIll11IiIll * li1ii1ili11liIilI1I + 165) % 256 end ilI1l1lllI1lll1I1II = ilI1l1lllI1lll1I1II + lIIiiiIl1lIiIIIlI1l return II1Ill111ii1l1iliil end li1ii1ili11liIilI1I = illiIIi1lIl111iIlli() l1i1IlIIIiIil1lI1l1 = illiIIi1lIl111iIlli() local l1IiII1iIl11l1II1l1 = {} for ll1i1IiIlIiIIIiIiIi = liiilllillI1iIli1ll, illiIIi1lIl111iIlli() do local lIlIlliIllii1ii1iIll1 = illiIIi1lIl111iIlli() local IlIl1IliIII111IiilI = (ll1i1IiIlIiIIIiIiIi - 1) * 2 l1IiII1iIl11l1II1l1[IlIl1IliIII111IiilI] = l11i1lii1I1i1li1l1i(lIlIlliIllii1ii1iIll1, 1, 4) l1IiII1iIl11l1II1l1[IlIl1IliIII111IiilI + 1] = l11i1lii1I1i1li1l1i(lIlIlliIllii1ii1iIll1, 5, 8) end local function liil11lIIl1liIIl1l1() local l111Ilill1lli1iIli1 = { [20475] = {}, [118329] = {}, [123880] = {}, [103143] = {} } illiIIi1lIl111iIlli() l111Ilill1lli1iIli1[9483] = illiIIi1lIl111iIlli() l111Ilill1lli1iIli1[20668] = illiIIi1lIl111iIlli() il1i11IiiiiIi1I1i11() il1i11IiiiiIi1I1i11() illiIIi1lIl111iIlli() local I1111iII11l1lilllI1 = il1i11IiiiiIi1I1i11() - (#{ 3585, 6414, 3304, 5239, 2372, 538, 4809, 2398, 5500, 3271, 6146, 4811, 743, 5987, 2930, 2732, 1007, 4089, 864, 3898, 1812, 2841, 2588 } + lIl1Ii1il1IlllIi1IlII + 133635) local iliilIlI1lii1l11i11 = illiIIi1lIl111iIlli() for ll1i1IiIlIiIIIiIiIi = liiilllillI1iIli1ll, I1111iII11l1lilllI1 do local Illli111111I1IIi1II = {} local lIlIlliIllii1ii1iIll1 = lilI111il1iI11Ilii1(iliilIlI1lii1l11i11) Illli111111I1IIi1II[36691] = l11i1lii1I1i1li1l1i(lIlIlliIllii1ii1iIll1, #{ 4599, 1434, 2604, 5834, 2324, 4315, 1092, 6395, 953, 5073 }, #{ 6915, 4165, 5221, 6880, 4086, 5474, 4018, 3370, 6365, 2510, 1707, 564, 84, 1753, 4548, 1966, 4680, 6623 }) Illli111111I1IIi1II[123859] = l11i1lii1I1i1li1l1i(lIlIlliIllii1ii1iIll1, #{3358}, #{ 6347, 4968, 3862, 6826, 1363, 1983, 36, 1321, 1042, 3594, 5023, 1729, 6555, 1583, 2451, 676, 4718, 248 }) Illli111111I1IIi1II[36151] = l11i1lii1I1i1li1l1i(lIlIlliIllii1ii1iIll1, #{6787}, #{ 5258, 5069, 667, 3215, 5359, 6150, 4904, 1898, 6154 }) Illli111111I1IIi1II[20051] = l11i1lii1I1i1li1l1i(lIlIlliIllii1ii1iIll1, #{ 5009, 4898, 5976, 549, 3255, 6635, 1514, 3099, 6331, 5738, 5748, 5761, 1924, 4609, 4738, 2234, 6615, 2499, 918, 2276, 2335 } + lIl1Ii1il1IlllIi1IlII + -63, #{ 2934, 4209, 2369, 1858, 4078, 2424, 2084, 6314, 1020, 2137, 271, 291, 6786, 423, 4631, 705, 2357, 367, 5058, 3978 } + lIl1Ii1il1IlllIi1IlII + -57) Illli111111I1IIi1II[130555] = l11i1lii1I1i1li1l1i(lIlIlliIllii1ii1iIll1, #{ 3830, 4946, 1520, 6440, 6804, 4071, 5426, 4556, 490, 562, 101, 3111, 126, 2759, 2555, 6371, 165, 4075, 3876 }, #{ 6355, 2755, 3321, 1869, 3482, 2829, 3640, 2488, 6308, 2335, 2823, 4683, 777, 5546, 1101, 6110, 374, 4389, 4926, 36, 6877, 3608 } + lIl1Ii1il1IlllIi1IlII + -65) l111Ilill1lli1iIli1[20475][ll1i1IiIlIiIIIiIiIi] = Illli111111I1IIi1II end il1i11IiiiiIi1I1i11() l111Ilill1lli1iIli1[85389] = illiIIi1lIl111iIlli() local li1l111i1liIllI1lI1 = il1i11IiiiiIi1I1i11() for ll1i1IiIlIiIIIiIiIi = liiilllillI1iIli1ll, li1l111i1liIllI1lI1 do l111Ilill1lli1iIli1[118329][ll1i1IiIlIiIIIiIiIi] = il1i11IiiiiIi1I1i11() end local li1l111i1liIllI1lI1 = il1i11IiiiiIi1I1i11() - (#{ 637, 642, 4024, 5292, 97, 3013, 758, 429, 1400, 1179, 4860, 691, 64, 4660, 4981, 4312, 4213, 6663, 3966, 1625, 925, 3508, 5704 } + lIl1Ii1il1IlllIi1IlII + 133688) local IilIIlliIIlIIl1l1l1 = illiIIi1lIl111iIlli() for ll1i1IiIlIiIIIiIiIi = liiilllillI1iIli1ll, li1l111i1liIllI1lI1 do local i1lIililiiII1Ii1i1l local lIllIl1i1iIii1liiIlli = illiIIi1lIl111iIlli() if lIllIl1i1iIii1liiIlli == #{ 5781, 4961, 589, 2370, 2541, 276, 2814, 2074, 1385, 3750, 6931, 6746, 4541, 2676, 3239, 2764, 2980, 4536, 4883, 78 } + lIl1Ii1il1IlllIi1IlII + 85 then i1lIililiiII1Ii1i1l = lliill1llIlilliIll1(iiiIIliiii1iIIiI1iI(insEncKey), #{6472, 1606}) end if lIllIl1i1iIii1liiIlli == #{ 231, 2599, 21, 5797, 4913, 3794, 30, 2320, 6886, 5621, 2954, 884, 1015, 455, 6164, 5951, 3757, 5306, 5603, 4273, 1529, 4198, 6296 } + lIl1Ii1il1IlllIi1IlII + 78 then i1lIililiiII1Ii1i1l = #{ 145, 6781, 5792, 5890, 1459, 5802, 2497, 6955, 2425, 835, 5391, 6387, 494, 2907, 2867, 6623, 302, 242, 1220, 1045, 6483, 5987, 6940, 4501 } + lIl1Ii1il1IlllIi1IlII + 36949 == #{ 631, 5748, 4343, 819, 3181, 4033, 5554, 2432, 6772, 6132, 1729, 5941, 3042, 159, 1309, 5872, 3466, 1520, 987, 2726, 485, 1914, 4408 } + lIl1Ii1il1IlllIi1IlII + 53808 end if lIllIl1i1iIii1liiIlli == #{ 1116, 4676, 2243, 1900, 832, 1993, 6330, 3192, 1471, 2205, 603, 4809, 4002, 6960, 1202, 2719, 6734, 4899, 3007, 6811, 824 } + lIl1Ii1il1IlllIi1IlII + -5 then i1lIililiiII1Ii1i1l = illiIIi1lIl111iIlli() end if lIllIl1i1iIii1liiIlli == #{ 1285, 1998, 3336, 1401, 5172, 1916, 5539, 2819, 4248, 1727, 3125, 6077, 2046, 885, 5230, 3947, 757, 487, 2214, 1450, 4652, 4448, 4219 } + lIl1Ii1il1IlllIi1IlII + 148 then i1lIililiiII1Ii1i1l = il1i11IiiiiIi1I1i11() end if lIllIl1i1iIii1liiIlli == #{ 3333, 142, 792, 5130, 6629, 4833, 3964, 18, 5530, 631, 6257, 2406, 4865, 1138, 1042, 596, 845, 4083, 4584, 1481 } + lIl1Ii1il1IlllIi1IlII + 29 then i1lIililiiII1Ii1i1l = illiIIi1lIl111iIlli() + il1i11IiiiiIi1I1i11() + Ii1l1I11liIlI1iiIIi() end if lIllIl1i1iIii1liiIlli == #{ 6096, 6262, 2307, 25, 513, 2816, 3613, 1428, 5782, 1413, 4771, 3051, 166, 6110, 4250, 5000, 2938, 2049, 2864, 165, 4680, 1859, 5120 } + lIl1Ii1il1IlllIi1IlII + 112 then i1lIililiiII1Ii1i1l = illiIIi1lIl111iIlli() + il1i11IiiiiIi1I1i11() + Ii1l1I11liIlI1iiIIi() end if lIllIl1i1iIii1liiIlli == #{ 6337, 9, 5144, 1536, 1969, 2498, 213, 1356, 4596, 2569, 6282, 6077, 1434, 3370, 4482, 2834, 6750, 275, 5090, 1465, 2162, 4985, 1944, 697 } + lIl1Ii1il1IlllIi1IlII + 108 then i1lIililiiII1Ii1i1l = Ii1l1I11liIlI1iiIIi() end if lIllIl1i1iIii1liiIlli == #{ 6446, 4205, 6650, 4305, 6404, 6761, 757, 3824, 786, 438, 3129, 2396, 2023, 1861, 3787, 5045, 454, 5490, 4573, 1516, 4242 } + lIl1Ii1il1IlllIi1IlII + 161 then i1lIililiiII1Ii1i1l = #{ 2003, 4481, 6892, 1530, 4810, 1929, 2054, 1196, 508, 3041, 5426, 203, 2363, 2287, 3242, 6750, 817, 346, 4108, 642, 4837, 4944, 320, 3617 } + lIl1Ii1il1IlllIi1IlII + 38538 == #{ 2003, 4481, 6892, 1530, 4810, 1929, 2054, 1196, 508, 3041, 5426, 203, 2363, 2287, 3242, 6750, 817, 346, 4108, 642, 4837, 4944, 320, 3617 } + lIl1Ii1il1IlllIi1IlII + 38538 end if lIllIl1i1iIii1liiIlli == #{ 5932, 1957, 4091, 5950, 5094, 4021, 2015, 5636, 6220, 5624, 6220, 1070, 1097, 5346, 5378, 926, 1466, 2256, 4876, 2156 } + lIl1Ii1il1IlllIi1IlII + 39 then i1lIililiiII1Ii1i1l = lliill1llIlilliIll1(iiiIIliiii1iIIiI1iI(IilIIlliIIlIIl1l1l1), #{ 3624, 3156, 438, 4265, 6319 }) end l111Ilill1lli1iIli1[103143][ll1i1IiIlIiIIIiIiIi - liiilllillI1iIli1ll] = i1lIililiiII1Ii1i1l end for ll1i1IiIlIiIIIiIiIi = liiilllillI1iIli1ll, I1111iII11l1lilllI1 do local Illli111111I1IIi1II = l111Ilill1lli1iIli1[20475][ll1i1IiIlIiIIIiIiIi] local Ii1liI11I1i11liIl1i = l1IiII1iIl11l1II1l1[Illli111111I1IIi1II[20051]] if Ii1liI11I1i11liIl1i == #{ 4044, 6070, 460 } then if Illli111111I1IIi1II[36151] > 255 then Illli111111I1IIi1II[96649] = l111Ilill1lli1iIli1[103143][Illli111111I1IIi1II[36151] - 256] end if Illli111111I1IIi1II[36691] > 255 then Illli111111I1IIi1II[11142] = l111Ilill1lli1iIli1[103143][Illli111111I1IIi1II[36691] - 256] end end if Ii1liI11I1i11liIl1i == #{4732} and Illli111111I1IIi1II[36151] > 255 then Illli111111I1IIi1II[96649] = l111Ilill1lli1iIli1[103143][Illli111111I1IIi1II[36151] - 256] end if Ii1liI11I1i11liIl1i == #{5327, 855} and Illli111111I1IIi1II[36691] > 255 then Illli111111I1IIi1II[11142] = l111Ilill1lli1iIli1[103143][Illli111111I1IIi1II[36691] - 256] end if Ii1liI11I1i11liIl1i == #{ 403, 1155, 6095, 3568 } then Illli111111I1IIi1II[67984] = l111Ilill1lli1iIli1[103143][Illli111111I1IIi1II[123859]] end end illiIIi1lIl111iIlli() illiIIi1lIl111iIlli() il1i11IiiiiIi1I1i11() il1i11IiiiiIi1I1i11() il1i11IiiiiIi1I1i11() illiIIi1lIl111iIlli() illiIIi1lIl111iIlli() illiIIi1lIl111iIlli() local li1l111i1liIllI1lI1 = il1i11IiiiiIi1I1i11() for ll1i1IiIlIiIIIiIiIi = liiilllillI1iIli1ll, li1l111i1liIllI1lI1 do l111Ilill1lli1iIli1[123880][ll1i1IiIlIiIIIiIiIi - liiilllillI1iIli1ll] = liil11lIIl1liIIl1l1() end il1i11IiiiiIi1I1i11() return l111Ilill1lli1iIli1 end local function il11i1iIIillI11lii1(l111Ilill1lli1iIli1, lI1Il1Ii1I1liIIi1Ii, illil1I1iIIlliil1Il) local I1IiilliiIil1liI1Ii, llIIl1IIIiIiIIili1i = -1, 3 local II1i11Illl1lIlliI11 = l111Ilill1lli1iIli1[20475] local IiI1IIlllililIIllli = 20668 local lIllII111lii1iiIl1liI = l111Ilill1lli1iIli1[123880] local lIlIIiiIiil11llillIlI = l111Ilill1lli1iIli1[9483] local iI1I1I1IiiI1illiI1l = l111Ilill1lli1iIli1[85389] local IIIl11Illl1illilIil = 20051 local iIiiIili1liiIi1ilI1 = l111Ilill1lli1iIli1[118329] local lIlIIlIli1II11l11IIll = 36151 local function l1IiIlil1i1lIIIllIl(...) local ll1iIIll1iiIi1II1Il = 0 local IIlii1illiiiIii1il1 = { iIiiII1IiI1lil1l1l1({}, 1, iI1I1I1IiiI1illiI1l) } local ili1lIiIlllI1iIllll = 1 local lIllIilIlI1i1li11Illi = {} local llii1ilI1II1Il1i1il = {} local lI1Il1Ii1I1liIIi1Ii = liI11IIlil1lIIIilI1() local lIlIIli1liII1I1II1i1i = { ... } local Iili1IlIIlilI1iI1Ii = #lIlIIli1liII1I1II1i1i - 1 for ll1i1IiIlIiIIIiIiIi = 0, Iili1IlIIlilI1iI1Ii do if ll1i1IiIlIiIIIiIiIi < lIlIIiiIiil11llillIlI then IIlii1illiiiIii1il1[ll1i1IiIlIiIIIiIiIi] = lIlIIli1liII1I1II1i1i[ll1i1IiIlIiIIIiIiIi + 1] end end local function lIiIIiIli1illl11lIl(...) local ii1I111Iill1lillIiI = Ill1Ii1llliiIl1Il1i("#", ...) local lIlill1IIliIlliI1lI = { ... } return ii1I111Iill1lillIiI, lIlill1IIliIlliI1lI end local function l11iiIllIIlI1liIIil() while true do local IiIi11i11ililiIlIil = II1i11Illl1lIlliI11[ili1lIiIlllI1iIllll] local l1i1lIlIi1lii1ilIiI = IiIi11i11ililiIlIil[20051] ili1lIiIlllI1iIllll = ili1lIiIlllI1iIllll + 1 if l1i1lIlIi1lii1ilIiI < 10 then if l1i1lIlIi1lii1ilIiI >= 5 then if l1i1lIlIi1lii1ilIiI < 7 then if l1i1lIlIi1lii1ilIiI == 6 then lIllIilIlI1i1li11Illi[IIlii1illiiiIii1il1] = nil local iI11i1IIIl1l1ilIii1 = IiIi11i11ililiIlIil[130555] local llilIii11i1l1li1llI = IiIi11i11ililiIlIil[36151] if llilIii11i1l1li1llI == 1 then return true end local lil1ii11lIllilI1iii = iI11i1IIIl1l1ilIii1 + llilIii11i1l1li1llI - 2 if llilIii11i1l1li1llI == 0 then lil1ii11lIllilI1iii = ll1iIIll1iiIi1II1Il end return true, iI11i1IIIl1l1ilIii1, lil1ii11lIllilI1iii elseif not not IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[130555]] == (IiIi11i11ililiIlIil[36691] == 0) then ili1lIiIlllI1iIllll = ili1lIiIlllI1iIllll + 1 end elseif l1i1lIlIi1lii1ilIiI >= 8 then if l1i1lIlIi1lii1ilIiI == 9 then if IiIi11i11ililiIlIil[36691] == 200 then ili1lIiIlllI1iIllll = ili1lIiIlllI1iIllll - 1 II1i11Illl1lIlliI11[ili1lIiIlllI1iIllll] = { [20051] = 6, [130555] = (IiIi11i11ililiIlIil[130555] - 199) % 256, [36151] = (IiIi11i11ililiIlIil[36151] - 199) % 256 } else local iIli1I1IIllIi1IIIii = IiIi11i11ililiIlIil[130555] local lIli11i1I1llIi11il1lI = {} for III1I1l1iilli1lIiil, III1i1Ii1Il1ilIi1iI in pairs(lIllIilIlI1i1li11Illi[IIlii1illiiiIii1il1]) do for III1I1l1iilli1lIiil, iliI1iI1l1l1IliII1l in pairs(III1i1Ii1Il1ilIi1iI) do if iliI1iI1l1l1IliII1l[1] == IIlii1illiiiIii1il1 and iIli1I1IIllIi1IIIii <= iliI1iI1l1l1IliII1l[2] then local iiIIl1IlIi1IiI11i1I = iliI1iI1l1l1IliII1l[2] if not lIli11i1I1llIi11il1lI[iiIIl1IlIi1IiI11i1I] then il11i1iIIillI11lii1(llii1ilI1II1Il1i1il, IIlii1illiiiIii1il1[iiIIl1IlIi1IiI11i1I]) lIli11i1I1llIi11il1lI[iiIIl1IlIi1IiI11i1I] = #llii1ilI1II1Il1i1il end iliI1iI1l1l1IliII1l[1] = llii1ilI1II1Il1i1il iliI1iI1l1l1IliII1l[2] = lIli11i1I1llIi11il1lI[iiIIl1IlIi1IiI11i1I] end end end end else IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[130555]] = #IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[36151]] end else IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[130555]] = (IiIi11i11ililiIlIil[96649] or IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[36151]]) - (IiIi11i11ililiIlIil[11142] or IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[36691]]) end elseif l1i1lIlIi1lii1ilIiI < 2 then if l1i1lIlIi1lii1ilIiI == 1 then IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[130555]] = IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[36151]][IiIi11i11ililiIlIil[11142] or IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[36691]]] else local IlI111iilI1lllil111 = IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[36151]] IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[130555] + 1] = IlI111iilI1lllil111 IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[130555]] = IlI111iilI1lllil111[IiIi11i11ililiIlIil[11142] or IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[36691]]] end elseif l1i1lIlIi1lii1ilIiI >= 3 then if l1i1lIlIi1lii1ilIiI == 4 then lI1Il1Ii1I1liIIi1Ii[IiIi11i11ililiIlIil[67984]] = IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[130555]] else IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[130555]] = illil1I1iIIlliil1Il[IiIi11i11ililiIlIil[36151]] end else IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[130555]] = IiIi11i11ililiIlIil[67984] end elseif l1i1lIlIi1lii1ilIiI >= 15 then if l1i1lIlIi1lii1ilIiI >= 18 then if l1i1lIlIi1lii1ilIiI < 19 then local iI11i1IIIl1l1ilIii1 = IiIi11i11ililiIlIil[130555] local lIlIIli1liII1I1II1i1i = IiIi11i11ililiIlIil[36151] local Iii1ll1Ilii111li11i = IiIi11i11ililiIlIil[36691] local lIlIliiI1lIIIiIi1iIli, lil1ii11lIllilI1iii, l11iiIllIIlI1liIIil if lIlIIli1liII1I1II1i1i ~= 1 then if lIlIIli1liII1I1II1i1i ~= 0 then lil1ii11lIllilI1iii = iI11i1IIIl1l1ilIii1 + lIlIIli1liII1I1II1i1i - 1 else lil1ii11lIllilI1iii = ll1iIIll1iiIi1II1Il end lil1ii11lIllilI1iii, lIlIliiI1lIIIiIi1iIli = lIiIIiIli1illl11lIl(IIlii1illiiiIii1il1[iI11i1IIIl1l1ilIii1](iIiiII1IiI1lil1l1l1(IIlii1illiiiIii1il1, iI11i1IIIl1l1ilIii1 + 1, lil1ii11lIllilI1iii))) else lil1ii11lIllilI1iii, lIlIliiI1lIIIiIi1iIli = lIiIIiIli1illl11lIl(IIlii1illiiiIii1il1[iI11i1IIIl1l1ilIii1]()) end if Iii1ll1Ilii111li11i ~= 1 then if Iii1ll1Ilii111li11i ~= 0 then lil1ii11lIllilI1iii = iI11i1IIIl1l1ilIii1 + Iii1ll1Ilii111li11i - 2 ll1iIIll1iiIi1II1Il = lil1ii11lIllilI1iii + 1 else lil1ii11lIllilI1iii = lil1ii11lIllilI1iii + iI11i1IIIl1l1ilIii1 - 1 ll1iIIll1iiIi1II1Il = lil1ii11lIllilI1iii end l11iiIllIIlI1liIIil = 0 for ll1i1IiIlIiIIIiIiIi = iI11i1IIIl1l1ilIii1, lil1ii11lIllilI1iii do l11iiIllIIlI1liIIil = l11iiIllIIlI1liIIil + 1 IIlii1illiiiIii1il1[ll1i1IiIlIiIIIiIiIi] = lIlIliiI1lIIIiIi1iIli[l11iiIllIIlI1liIIil] end else ll1iIIll1iiIi1II1Il = iI11i1IIIl1l1ilIii1 - 1 end for ll1i1IiIlIiIIIiIiIi = ll1iIIll1iiIi1II1Il + 1, iI1I1I1IiiI1illiI1l do IIlii1illiiiIii1il1[ll1i1IiIlIiIIIiIiIi] = nil end elseif l1i1lIlIi1lii1ilIiI ~= 20 then local lIlIIIlIi1i1iII1iIili = lIllII111lii1iiIl1liI[IiIi11i11ililiIlIil[123859]] local iI1iIl1lIilli1li1lI = {} if lIlIIIlIi1i1iII1iIili[IiI1IIlllililIIllli] > 0 then do local III1i1Ii1Il1ilIi1iI = {} iI1iIl1lIilli1li1lI = llI1II1li1l1I1I11Ii({}, { __index = function(lIlill1IIliIlliI1lI, lii11I1lll1lii1I1I1) local iliI1iI1l1l1IliII1l = III1i1Ii1Il1ilIi1iI[lii11I1lll1lii1I1I1] return iliI1iI1l1l1IliII1l[1][iliI1iI1l1l1IliII1l[2]] end, __newindex = function(lIlill1IIliIlliI1lI, lii11I1lll1lii1I1I1, iI11IiI1lil1l1llII1) local iliI1iI1l1l1IliII1l = III1i1Ii1Il1ilIi1iI[lii11I1lll1lii1I1I1] iliI1iI1l1l1IliII1l[1][iliI1iI1l1l1IliII1l[2]] = iI11IiI1lil1l1llII1 end }) for ll1i1IiIlIiIIIiIiIi = 1, lIlIIIlIi1i1iII1iIili[IiI1IIlllililIIllli] do local i1ll11iii1IiiIiIiI1 = II1i11Illl1lIlliI11[ili1lIiIlllI1iIllll] if i1ll11iii1IiiIiIiI1[IIIl11Illl1illilIil] == I1IiilliiIil1liI1Ii then III1i1Ii1Il1ilIi1iI[ll1i1IiIlIiIIIiIiIi - 1] = { IIlii1illiiiIii1il1, i1ll11iii1IiiIiIiI1[lIlIIlIli1II11l11IIll] } elseif i1ll11iii1IiiIiIiI1[IIIl11Illl1illilIil] == llIIl1IIIiIiIIili1i then III1i1Ii1Il1ilIi1iI[ll1i1IiIlIiIIIiIiIi - 1] = { illil1I1iIIlliil1Il, i1ll11iii1IiiIiIiI1[lIlIIlIli1II11l11IIll] } end ili1lIiIlllI1iIllll = ili1lIiIlllI1iIllll + 1 end if not lIllIilIlI1i1li11Illi[IIlii1illiiiIii1il1] then lIllIilIlI1i1li11Illi[IIlii1illiiiIii1il1] = {III1i1Ii1Il1ilIi1iI} else lIl1Ii1iIlllliil1IIil(lIllIilIlI1i1li11Illi[IIlii1illiiiIii1il1], III1i1Ii1Il1ilIi1iI) end end end local I1Iilli11lIIIillilI = il11i1iIIillI11lii1(lIlIIIlIi1i1iII1iIili, lI1Il1Ii1I1liIIi1Ii, iI1iIl1lIilli1li1lI) IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[130555]] = I1Iilli11lIIIillilI else IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[130555]] = { iIiiII1IiI1lil1l1l1(i1il111IilllIiIIilI, 1, IiIi11i11ililiIlIil[36151] == 0 and 255 or IiIi11i11ililiIlIil[36151]) } end elseif l1i1lIlIi1lii1ilIiI < 16 then local II1I1II1lIiI1liiIi1 = IiIi11i11ililiIlIil[130555] if not not II1I1II1lIiI1liiIi1 == (IiIi11i11ililiIlIil[36691] == 0) then ili1lIiIlllI1iIllll = ili1lIiIlllI1iIllll + 1 else IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[130555]] = II1I1II1lIiI1liiIi1 end elseif l1i1lIlIi1lii1ilIiI ~= 17 then IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[130555]] = (IiIi11i11ililiIlIil[96649] or IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[36151]]) * (IiIi11i11ililiIlIil[11142] or IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[36691]]) else ili1lIiIlllI1iIllll = ili1lIiIlllI1iIllll + (IiIi11i11ililiIlIil[123859] - liilIllIlil1iiI11II) end elseif l1i1lIlIi1lii1ilIiI < 12 then if l1i1lIlIi1lii1ilIiI == 11 then IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[130555]][IiIi11i11ililiIlIil[96649] or IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[36151]]] = IiIi11i11ililiIlIil[11142] or IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[36691]] else IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[130555]] = lI1Il1Ii1I1liIIi1Ii[IiIi11i11ililiIlIil[67984]] end elseif l1i1lIlIi1lii1ilIiI >= 13 then if l1i1lIlIi1lii1ilIiI == 14 then if IiIi11i11ililiIlIil[36691] == 21 then ili1lIiIlllI1iIllll = ili1lIiIlllI1iIllll - 1 II1i11Illl1lIlliI11[ili1lIiIlllI1iIllll] = { [20051] = 13, [130555] = (IiIi11i11ililiIlIil[130555] - 34) % 256, [36151] = (IiIi11i11ililiIlIil[36151] - 34) % 256 } elseif IiIi11i11ililiIlIil[36691] == 6 then ili1lIiIlllI1iIllll = ili1lIiIlllI1iIllll - 1 II1i11Illl1lIlliI11[ili1lIiIlllI1iIllll] = { [20051] = 8, [130555] = (IiIi11i11ililiIlIil[130555] - 3) % 256, [36151] = (IiIi11i11ililiIlIil[36151] - 3) % 256 } else local iI11i1IIIl1l1ilIii1 = IiIi11i11ililiIlIil[130555] local li1l111i1liIllI1lI1 = IiIi11i11ililiIlIil[36151] local l1lllIiiiiIl1lIlIiI = li1l111i1liIllI1lI1 > 0 and li1l111i1liIllI1lI1 - 1 or Iili1IlIIlilI1iI1Ii - lIlIIiiIiil11llillIlI if l1lllIiiiiIl1lIlIiI < 0 then l1lllIiiiiIl1lIlIiI = -1 end for ll1i1IiIlIiIIIiIiIi = iI11i1IIIl1l1ilIii1, iI11i1IIIl1l1ilIii1 + l1lllIiiiiIl1lIlIiI do IIlii1illiiiIii1il1[ll1i1IiIlIiIIIiIiIi] = lIlIIli1liII1I1II1i1i[lIlIIiiIiil11llillIlI + (ll1i1IiIlIiIIIiIiIi - iI11i1IIIl1l1ilIii1) + 1] end if li1l111i1liIllI1lI1 == 0 then ll1iIIll1iiIi1II1Il = iI11i1IIIl1l1ilIii1 + l1lllIiiiiIl1lIlIiI for ll1i1IiIlIiIIIiIiIi = ll1iIIll1iiIi1II1Il + 1, iI1I1I1IiiI1illiI1l do IIlii1illiiiIii1il1[ll1i1IiIlIiIIIiIiIi] = nil end end end elseif IiIi11i11ililiIlIil[36691] == 199 then ili1lIiIlllI1iIllll = ili1lIiIlllI1iIllll - 1 II1i11Illl1lIlliI11[ili1lIiIlllI1iIllll] = { [20051] = 5, [130555] = (IiIi11i11ililiIlIil[130555] - 100) % 256, [36691] = (IiIi11i11ililiIlIil[36151] - 100) % 256 } else for ll1i1IiIlIiIIIiIiIi = IiIi11i11ililiIlIil[130555], IiIi11i11ililiIlIil[36151] do IIlii1illiiiIii1il1[ll1i1IiIlIiIIIiIiIi] = nil end end else IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[130555]] = (IiIi11i11ililiIlIil[96649] or IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[36151]]) / (IiIi11i11ililiIlIil[11142] or IIlii1illiiiIii1il1[IiIi11i11ililiIlIil[36691]]) end end end local lllIIil1ll1Ili111i1, II1Ill111ii1l1iliil, iIli1I1IIllIi1IIIii, lIIiI1lll1IIiliIllI = IiiiillI1i1ill111lI(l11iiIllIIlI1liIIil) if lllIIil1ll1Ili111i1 then if iIli1I1IIllIi1IIIii then return iIiiII1IiI1lil1l1l1(IIlii1illiiiIii1il1, iIli1I1IIllIi1IIIii, lIIiI1lll1IIiliIllI) end else IiII1ll11lliIiill1I("Luraph Script:" .. (iIiiIili1liiIi1ilI1[ili1lIiIlllI1iIllll - 1] or "") .. ": " .. lIli1l1iilliiiillIIl1(II1Ill111ii1l1iliil), 0) end end l1lilll11i11lIIi1Ii(l1IiIlil1i1lIIIllIl, lI1Il1Ii1I1liIIi1Ii) return l1IiIlil1i1lIIIllIl end local lIli11i1I1llIi11il1lI = liil11lIIl1liIIl1l1() return il11i1iIIillI11lii1(lIli11i1I1llIi11il1lI, lI1Il1Ii1I1liIIi1Ii)() end lIlIlllIiili1iliI11li("LPH!8A090B222H043000340300032H007A2H0087B05423E486240DA0660A0200A32H090B4DF12HF0BC3H531F3HA2B23H0D25852H84CC3HB7AF875F82635H00950A020065C95H00E49440097D3D6FE8405571184FD9CCC07A5822E0013H00872H004069C97AF762087CD3EC0A0200B3411614522HE3E1A9332H38102HCBC98F002H0A222H2527252F0C0E487F6E6F5B4241BFFA02292B6DAB2HA088F6D3D197113230768BC765D52HF6F4BCFC2HF7DF2H6664227B2H71592H080A08C9DBD99F8A5B5A6E494AB4F12HDCDE98752H7F570B170C22B72HB9912H707234E92HE3CB8882868A92827C39293BC580122D8F3FB5B2B6FE658F90342HD8DA9C2HEBE9AFA8AAA8EE4E2H456D4253ADE82H8D8FC7512H5E7606494B2H0D4042042HF1F3BBD02HD2FA2H0D0F499E2H94BC170D15172B0604429B2H91B92HA8AAA82HFBF9BF1DD072C22HD7D59DB4EC615B989F9B972HAEACEADFF351E12H121058002H032B2822206628B715A56760642C43A9B6122H5654122H2123659087793C002H0B232H4A480E6F2H654D49554E60A6AFADEB2HFEFCBA632H6941E1E0E4E82H131157707372462F292D652H343670941DBF0FA7A4A6EE074EB0F5462H48602H1B195F902H9AB2FFF5F1FDB5E31D5838BEBF8BB2B14F0AF8F9FBBD3HB0FC292H230BCD2HC2EAAFBDBFF9140406404E472H4F2HF6F4B2D74041751B1C18502B0B292B2HEAE8AED1AF0DBDEEE8ECA42H30CE8BFB100FAB2H898BCD2H8082C4AECC32771C2H123A85B24C09DE2HD4FC91A856134C2H466ED2D1D5F92HE8EAAC313B3F133E3A32122H151751B6BCB4947820DE9B4B11EFAA132H1931585054782H4341076862664AD9DDD5F52HA4A6E06D676F4F2A6997D2DB9E602559AD688339C6A25431FE79B9AC40B6BCD87E3CDCF5FC81D3BD1FC17CC8610AAD1725E763B38F505F4FBEF689D15CD25B03827H00093H000A9H002H000A9H006H000F3H00109H006H00033H00049H002H00049H009H005H00023H00039H002H00039H006H00013H00019H002H00013H00027H00043H00079H002H000A3H000D9H002H000D9H002H00109H002H00103H00113H000E9H002H000E3H000F9H002H00073H00079H002H00073H00089H002H00089H006H000F9H002H000F9H002H000F7H00099H002H00099H009H009H00019H002H000D9H002H000D3H000D9H002H000D7H000D9H002H000D3H000E9H009H001H00019H002H00019H009H005H00079H002H00079H009H001H00A50A0200D9800B3H008A9F6C316AC6A3812048CDC92H0040E622EDF44180083H0039F62B189A7BC299800B3H0041BEB3607787463120F45E80093H00A80DAABFFC2327AD84800C3H00157247D41D7F38597F56AA7880043H0061DED380C99A5H99B93F80093H00250257640CD429A75F800E3H00CADFAC713C967E66F7158210550EC98H00800A3H00583D5AEF4FE28C9AD031FB800E3H0022778489811E9C1E8F8DBAF8ED6680083H003055B28763F83FFF800C3H00785D7A0F2EC06976B11023FB800C3H00A4A9E69B411E596B99D5C74CB1E0472CD6411D08711ECE431F694005AB4H00FB0E7938AF118C66", liI11IIlil1lIIIilI1())


Prompt:
--[[**
	ensures value is either nil or passes check

	@param check The check to use

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

Response:
function t.optional(check)
	assert(t.callback(check))
	return function(value)
		if value == nil then
			return true
		end

		local success, errMsg = check(value)
		if success then
			return true
		else
			return false, string.format("(optional) %s", errMsg or "")
		end
	end
end


Prompt:
--[=[
	Binds the given update function to [RunService.RenderStepped].

	```lua
	local spring = Spring.new(0)
	local maid = Maid.new()

	local startAnimation, maid._stopAnimation = StepUtils.bindToRenderStep(function()
		local animating, position = SpringUtils.animating(spring)

		print(position)

		return animating
	end)

	spring.t = 1
	startAnimation()
	```

	:::tip
	Be sure to call the disconnect function when cleaning up, otherwise you may memory leak.
	:::

	@param update () -> boolean -- should return true while it needs to update
	@return (...) -> () -- Connect function
	@return () -> () -- Disconnect function
]=]

Response:
function StepUtils.bindToRenderStep(update)
	return StepUtils.bindToSignal(RunService.RenderStepped, update)
end


Prompt: -- SOUND SETTINGS

Response:
local Indicator_Stack_On = 6212970852 -- ID for the indicator stack being on.

local Indicator_Stack_Off = 6212970338 -- ID for the indicator stack being off.

local Indicator_Click_On = 6212969851 -- ID for the indicator state being on.

local Indicator_Click_Off = 6212969290 -- ID for the indicator state being off.


Prompt: --[[ The Module ]]

Response:
--
local MouseLockController = {}
MouseLockController.__index = MouseLockController

function MouseLockController.new()
	local self = setmetatable({}, MouseLockController)

	self.isMouseLocked = false
	self.savedMouseCursor = nil
	self.boundKeys = {Enum.KeyCode.LeftShift, Enum.KeyCode.RightShift} -- defaults

	self.mouseLockToggledEvent = Instance.new("BindableEvent")

	local boundKeysObj = script:FindFirstChild("BoundKeys")
	if (not boundKeysObj) or (not boundKeysObj:IsA("StringValue")) then
		-- If object with correct name was found, but it's not a StringValue, destroy and replace
		if boundKeysObj then
			boundKeysObj:Destroy()
		end

		boundKeysObj = Instance.new("StringValue")
		boundKeysObj.Name = "BoundKeys"
		boundKeysObj.Value = "LeftShift,RightShift"
		boundKeysObj.Parent = script
	end

	if boundKeysObj then
		boundKeysObj.Changed:Connect(function(value)
			self:OnBoundKeysObjectChanged(value)
		end)
		self:OnBoundKeysObjectChanged(boundKeysObj.Value) -- Initial setup call
	end

	-- Watch for changes to user's ControlMode and ComputerMovementMode settings and update the feature availability accordingly
	GameSettings.Changed:Connect(function(property)
		if property == "ControlMode" or property == "ComputerMovementMode" then
			self:UpdateMouseLockAvailability()
		end
	end)

	-- Watch for changes to DevEnableMouseLock and update the feature availability accordingly
	PlayersService.LocalPlayer:GetPropertyChangedSignal("DevEnableMouseLock"):Connect(function()
		self:UpdateMouseLockAvailability()
	end)

	-- Watch for changes to DevEnableMouseLock and update the feature availability accordingly
	PlayersService.LocalPlayer:GetPropertyChangedSignal("DevComputerMovementMode"):Connect(function()
		self:UpdateMouseLockAvailability()
	end)

	self:UpdateMouseLockAvailability()

	return self
end

function MouseLockController:GetIsMouseLocked()
	return self.isMouseLocked
end

function MouseLockController:GetBindableToggleEvent()
	return self.mouseLockToggledEvent.Event
end

function MouseLockController:GetMouseLockOffset()
	local offsetValueObj = script:FindFirstChild("CameraOffset")
	if offsetValueObj and offsetValueObj:IsA("Vector3Value") then
		return offsetValueObj.Value
	else
		-- If CameraOffset object was found but not correct type, destroy
		if offsetValueObj then
			offsetValueObj:Destroy()
		end
		offsetValueObj = Instance.new("Vector3Value")
		offsetValueObj.Name = "CameraOffset"
		offsetValueObj.Value = Vector3.new(1.75,0,0) -- Legacy Default Value
		offsetValueObj.Parent = script
	end

	if offsetValueObj and offsetValueObj.Value then
		return offsetValueObj.Value
	end

	return Vector3.new(1.75,0,0)
end

function MouseLockController:UpdateMouseLockAvailability()
	local devAllowsMouseLock = PlayersService.LocalPlayer.DevEnableMouseLock
	local devMovementModeIsScriptable = PlayersService.LocalPlayer.DevComputerMovementMode == Enum.DevComputerMovementMode.Scriptable
	local userHasMouseLockModeEnabled = GameSettings.ControlMode == Enum.ControlMode.MouseLockSwitch
	local userHasClickToMoveEnabled =  GameSettings.ComputerMovementMode == Enum.ComputerMovementMode.ClickToMove
	local MouseLockAvailable = devAllowsMouseLock and userHasMouseLockModeEnabled and not userHasClickToMoveEnabled and not devMovementModeIsScriptable

	if MouseLockAvailable~=self.enabled then
		self:EnableMouseLock(MouseLockAvailable)
	end
end

function MouseLockController:OnBoundKeysObjectChanged(newValue)
	self.boundKeys = {} -- Overriding defaults, note: possibly with nothing at all if boundKeysObj.Value is "" or contains invalid values
	for token in string.gmatch(newValue,"[^%s,]+") do
		for keyCode, keyEnum in pairs(Enum.KeyCode:GetEnumItems()) do
			if token == keyEnum.Name then
				self.boundKeys[#self.boundKeys+1] = keyEnum
				break
			end
		end
	end
	self:UnbindContextActions()
	self:BindContextActions()
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 then
		cast.RayInfo.Parameters = CloneCastParams(cast.RayInfo.Parameters)
	else
		cast.RayInfo.Parameters = RaycastParams.new()
	end

	local usingProvider = false
	if not castDataPacket.CosmeticBulletProvider then
		-- The provider is nil. Use a cosmetic object clone.
		if cast.RayInfo.CosmeticBulletObject 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 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: --// Animations

Response:
	-- Idle Anim
	IdleAnim = function(char, speed, objs)
		TweenJoint(objs[2],  nil , CFrame.new(-0.902175903, 0.295501232, -1.32277012, 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(1.06851184, 0.973718464, -2.29667926, 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;

	-- Reload Anim
	ReloadAnim = function(char, speed, objs)
			ts:Create(objs[2],TweenInfo.new(0.5),{C1 = CFrame.new(-1.83314121, 0.112866193, -0.954399943, 0.758022368, -0.558526218, -0.336824089, 0.157115281, -0.344846308, 0.925416529, -0.633021891, -0.75440675, -0.173648208)}):Play()
			ts:Create(objs[3],TweenInfo.new(0.5),{C1 = CFrame.new(-0.570892751, 0.765644431, -2.10391617, 0.545084536, -0.836516321, 0.0558858961, -0.482962906, -0.258818835, 0.836516321, -0.685295284, -0.482962966, -0.545084476)}):Play()
			wait(0.2)

			local MagC = objs[4]: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()

			ts:Create(objs[3],TweenInfo.new(0.4),{C1 = CFrame.new(-0.970892727, 0.365644425, -3.30391622, 0.545084536, -0.836516321, 0.0558858961, -0.482962906, -0.258818835, 0.836516321, -0.685295284, -0.482962966, -0.545084476)}):Play()
			ts:Create(objs[2],TweenInfo.new(0.13),{C1 = CFrame.new(-1.83314121, 0.112866193, -1.15439999, 0.758022368, -0.558526218, -0.336824089, 0.157115281, -0.344846308, 0.925416529, -0.633021891, -0.75440675, -0.173648208)}):Play()
			wait(0.1)
			ts:Create(objs[2],TweenInfo.new(0.4),{C1 = CFrame.new(-1.83314121, 0.112866193, -0.954399943, 0.758022368, -0.558526218, -0.336824089, 0.157115281, -0.344846308, 0.925416529, -0.633021891, -0.75440675, -0.173648208)}):Play()
			ts:Create(objs[3],TweenInfo.new(0.5),{C1 = CFrame.new(-2.63354445, 0.365644455, -0.92290014, -0.0482801795, -0.826441228, 0.560948968, 0.376857162, 0.505025029, 0.776484549, -0.925012231, 0.248886406, 0.287067622)}):Play()
			wait(0.75)
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-1.98033559, 0.365644455, -1.12859631, -0.281058222, -0.892398655, -0.353031129, -0.101086289, -0.338284373, 0.935598731, -0.954351902, 0.298644274, 0.00486823916)}):Play()
			wait(0.10)
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.970892727, 0.365644425, -3.30391622, 0.545084536, -0.836516321, 0.0558858961, -0.482962906, -0.258818835, 0.836516321, -0.685295284, -0.482962966, -0.545084476)}):Play()
			wait(0.10)
			objs[6]:WaitForChild('MagIn'):Play()
			ts:Create(objs[3],TweenInfo.new(0.2),{C1 = CFrame.new(-0.570892751, 0.765644431, -2.10391617, 0.545084536, -0.836516321, 0.0558858961, -0.482962906, -0.258818835, 0.836516321, -0.685295284, -0.482962966, -0.545084476)}):Play()
			wait(0.10)
			ts:Create(objs[2],TweenInfo.new(0.13),{C1 = CFrame.new(-1.83314121, 0.112866186, -0.954399943, 0.758022368, -0.558526218, -0.336824089, 0.0448053852, -0.470608532, 0.881203771, -0.650687635, -0.683063805, -0.331706822)}):Play()
			ts:Create(objs[3],TweenInfo.new(0.13),{C1 = CFrame.new(-0.543338716, 0.753075361, -2.10391617, 0.491499543, -0.870869577, -0.00377259403, -0.594625771, -0.338752329, 0.729154944, -0.63627702, -0.356136084, -0.684338093)}):Play()
			wait(0.1)
			MagC:Destroy()
			objs[4].Transparency = 0
		end;

	-- Bolt Anim
		BoltBackAnim = function(char, speed, objs)
			TweenJoint(objs[3],  nil , CFrame.new(-0.833141267, -0.530990303, -1.55439997, 0.642787576, 3.34848629e-08, -0.766044378, 0.766044378, -2.80971371e-08, 0.642787576, 0, -1, -4.37113883e-08), function(X) return math.sin(math.rad(X)) end, 0.45)
			TweenJoint(objs[2],  nil , CFrame.new(2.1115706, -0.937148452, -1.32660568, 0.803367436, 0.238225982, 0.545755446, -0.118667498, -0.834062338, 0.538755715, 0.583539844, -0.497582287, -0.641788721), function(X) return math.sin(math.rad(X)) end, 0.2)
			wait(0.5)
			objs[5]:WaitForChild("BoltBack"):Play()
			TweenJoint(objs[2],  nil , CFrame.new(1.00409043, -1.18411899, -1.32660568, 0.803367436, 0.238225982, 0.545755446, -0.118667498, -0.834062338, 0.538755715, 0.583539844, -0.497582287, -0.641788721), function(X) return math.sin(math.rad(X)) end, 0.25)
			TweenJoint(objs[1],  nil , CFrame.new(0, 0, 0.817838132, 1, 0, 0, 0, 1, 0, 0, 0, 1), function(X) return math.sin(math.rad(X)) end, 0.25)
			TweenJoint(objs[3],  nil , CFrame.new(-0.833141267, -0.854931653, -1.55439997, 0.642787576, 3.34848629e-08, -0.766044378, 0.766044378, -2.80971371e-08, 0.642787576, 0, -1, -4.37113883e-08), function(X) return math.sin(math.rad(X)) end, 0.25)
			wait(0.1)
		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.299306631, -1.18411899, -1.32660568, 0.803367436, 0.238225982, 0.545755446, -0.118667498, -0.834062338, 0.538755715, 0.583539844, -0.497582287, -0.641788721), function(X) return math.sin(math.rad(X)) end, 0.1)
			TweenJoint(objs[3],  nil , CFrame.new(-0.833141267, -0.291854143, -1.55439997, 0.642787576, 3.34848629e-08, -0.766044378, 0.766044378, -2.80971371e-08, 0.642787576, 0, -1, -4.37113883e-08), function(X) return math.sin(math.rad(X)) end, 0.2)
			wait(0.1)
		end;

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

		BoltingForwardAnim = function(char, speed, objs)
			TweenJoint(objs[1],  nil , CFrame.new(), function(X) return math.sin(math.rad(X)) end, 0.001)
		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;

		nadeReload = function(char, speed, objs)
			ts:Create(objs[1], TweenInfo.new(0.6), {C1 = CFrame.new(-0.902175903, -1.15645337, -1.32277012, 0.984807789, -0.163175702, -0.0593911409, 0, -0.342020363, 0.939692557, -0.17364797, -0.925416529, -0.336824328)}):Play()
			ts:Create(objs[2], TweenInfo.new(0.6), {C1 = CFrame.new(0.805950999, 0.654529691, -1.92835355, 0.787567914, -0.220087856, 0.575584888, -0.323594928, 0.647189975, 0.690240026, -0.524426222, -0.72986728, 0.438486755)}):Play()
			wait(0.6)
			ts:Create(objs[2], TweenInfo.new(0.6), {C1 = CFrame.new(0.805950999, 0.559619546, -1.73060048, 0.802135408, -0.348581612, 0.484839559, -0.597102284, -0.477574915, 0.644508123, 0.00688350201, -0.806481719, -0.59121877)}):Play()
			wait(0.6)
		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: -- Adds a service to this provider only

Response:
function ServiceBag:_addServiceType(serviceType)
	if not self._serviceTypesToInitializeSet then
		error(("Already finished initializing, cannot add %q"):format(tostring(serviceType)))
		return
	end

	-- Already added
	if self._services[serviceType] then
		return
	end

	-- Construct a new version of this service so we're isolated
	local service = setmetatable({}, { __index = serviceType })
	self._services[serviceType] = service

	self:_ensureInitialization(serviceType)
end

function ServiceBag:_ensureInitialization(serviceType)
	if self._initializedServiceTypeSet[serviceType] then
		return
	end

	if self._initializing then
		self._serviceTypesToInitializeSet[serviceType] = nil
		self._initializedServiceTypeSet[serviceType] = true
		self:_initService(serviceType)
	elseif self._serviceTypesToInitializeSet then
		self._serviceTypesToInitializeSet[serviceType] = true
	else
		error("[ServiceBag._ensureInitialization] - Cannot initialize past initializing phase ")
	end
end

function ServiceBag:_initService(serviceType)
	local service = assert(self._services[serviceType], "No service")

	if service.Init then
		local current
		task.spawn(function()
			current = coroutine.running()
			service:Init(self)
		end)

		assert(coroutine.status(current) == "dead", "Initializing service yielded")
	end

	table.insert(self._serviceTypesToStart, serviceType)
end


Prompt: --the animation is under the script, you can rename it but you would have to change the script.Put your anim ID where the anim is instead of mine


Prompt: -- return to idle if finishing an emote

Response:
if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
oldAnim = "idle"
end

currentAnim = ""
currentAnimInstance = nil
if (currentAnimKeyframeHandler ~= nil) then
currentAnimKeyframeHandler:Disconnect()
end

if (currentAnimTrack ~= nil) then
currentAnimTrack:Stop()
currentAnimTrack:Destroy()
currentAnimTrack = nil
end
return oldAnim
end

function setAnimationSpeed(speed)
if speed ~= currentAnimSpeed then
currentAnimSpeed = speed
currentAnimTrack:AdjustSpeed(currentAnimSpeed)
end
end

function keyFrameReachedFunc(frameName)
if (frameName == "End") then

local repeatAnim = currentAnim


Prompt:
--[=[
	@class Signal

	Signals allow events to be dispatched and handled.

	For example:
	```lua
	local signal = Signal.new()

	signal:Connect(function(msg)
		print("Got message:", msg)
	end)

	signal:Fire("Hello world!")
	```
]=]

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


Prompt: -- Private Methods

Response:
function init(self)
	local frame = self.Frame
	local maid = self._Maid

	maid:Mark(frame:GetPropertyChangedSignal("Text"):Connect(function()
		local mask = self._MaskType
		local result = mask:Process(frame.Text):sub(1, self._MaxLength)
		frame.Text = result
	end))

	maid:Mark(frame.FocusLost:Connect(function()
		local mask = self._MaskType
		if (not mask:Verify(frame.Text)) then
			frame.Text = mask.Default
		end
	end))
end


Prompt: -- Tracking variables for auto-throttling

Response:
local frameCount = 0
local frameTick = tick()

local difSegmentsPerArc = Constants.SEGMENT_PER_ARC_MAX - Constants.SEGMENT_PER_ARC_MIN
local difDistanceModifier = Constants.THROTTLE_DISTANCE_MODIFIER_MAX - Constants.THROTTLE_DISTANCE_MODIFIER_MIN


Prompt: --REVERSE

Response:
				if _CGear==1 and _GBrake > 0  and car.DriveSeat.Velocity.Magnitude < .05 then
					_CGear = -1
				else
					if _Tune.AutoShiftMode == "RPM" then
						if _RPM>(_Tune.PeakRPM+_Tune.AutoUpThresh) then
							_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
						elseif math.max(math.min(maxSpin*_Tune.Ratios[_CGear+1]*fFDr,_Tune.Redline+100),_Tune.IdleRPM)<(_Tune.PeakRPM-_Tune.AutoDownThresh) then
							_CGear=math.max(_CGear-1,1)
						end
					else
						if car.DriveSeat.Velocity.Magnitude > math.ceil(wDRatio*(_Tune.PeakRPM+_Tune.AutoUpThresh)/_Tune.Ratios[_CGear+2]/fFD) then
							_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
						elseif car.DriveSeat.Velocity.Magnitude < math.ceil(wDRatio*(_Tune.PeakRPM-_Tune.AutoDownThresh)/_Tune.Ratios[_CGear+1]/fFD) then
							_CGear=math.max(_CGear-1,1)
						end
					end
				end
			else
				if _GThrot-(_Tune.IdleThrottle/100) > 0 and car.DriveSeat.Velocity.Magnitude < 20 then
					_CGear = 1
				end
			end
		end

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

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

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

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

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

			_TCSActive = false
			_ABSActive = false
			--Output
			if _PBrake and ((_Tune.Config ~= "FWD" and (((v.Name=="FL" or v.Name=="FR") and car.DriveSeat.Velocity.Magnitude<20) or ((v.Name=="RR" or v.Name=="RL") and car.DriveSeat.Velocity.Magnitude>=20))) or (_Tune.Config == "FWD" and (v.Name=="RR" or v.Name=="RL"))) then
				--PBrake
				v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*PBrakeForce
				v["#AV"].angularvelocity=Vector3.new()
			else
				--Apply Power
				if ((_TMode == "Manual" or _TMode == "Semi") and _GBrake==0) or (_TMode == "Auto" and ((_CGear>-1 and _GBrake==0 ) or (_CGear==-1 and _GThrot-(_Tune.IdleThrottle/100)==0 )))then
					local driven = false
					for _,a in pairs(Drive) do if a==v then driven = true end end
					if driven then
						local on=1
						if not script.Parent.IsOn.Value then on=0 end
						local throt = _GThrot
						if _TMode == "Auto" and _CGear==-1 then throt = _GBrake end

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

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

				--Brakes
				else
					local brake = _GBrake
					if _TMode == "Auto" and _CGear==-1 then brake = _GThrot end

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

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


Prompt: -- This function is used to set configuration values from outside configuration objects/folders

Response:
function BaseWeapon:importConfiguration(config)
	if not config or not config:IsA("Configuration") then
		for _, child in pairs(config:GetChildren()) do
			if child:IsA("ValueBase") then
				local valueName = child.Name
				local newValue = child.Value
				local oldValue = self.configValues[valueName]
				self.configValues[valueName] = newValue
				self:onConfigValueChanged(valueName, newValue, oldValue)
			end
		end
	end
end

function BaseWeapon:setConfiguration(config)
	self:cleanupConnection("configChildAdded", "configChildRemoved")
	if not config or not config:IsA("Configuration") then
		return
	end

	for _, child in pairs(config:GetChildren()) do
		if child:IsA("ValueBase") then
			self:onConfigValueAdded(child)
		end
	end
	self.connections.configChildAdded = config.ChildAdded:Connect(function(child)
		if child:IsA("ValueBase") then
			self:onConfigValueAdded(child)
		end
	end)
	self.connections.configChildRemoved = config.ChildRemoved:Connect(function(child)
		if child:IsA("ValueBase") then
			self:onConfigValueRemoved(child)
		end
	end)
end

function BaseWeapon:onChildAdded(child)
	if child:IsA("Configuration") then
		self:setConfiguration(child)
	end
end

function BaseWeapon:onChildRemoved(child)
	if child:IsA("Configuration") then
		self:setConfiguration(nil)
	end
end

function BaseWeapon:onConfigValueChanged(valueName, newValue, oldValue)

end

function BaseWeapon:onRenderStepped(dt)

end

function BaseWeapon:onStepped(dt)

end

function BaseWeapon:getAnimationController()
	if self.animController then
		if not self.instanceIsTool or (self.animController.Parent and self.animController.Parent:IsAncestorOf(self.instance)) then
			return self.animController
		end
	end

	self:setAnimationController(nil)

	if self.instanceIsTool then
		local humanoid = IsServer and self.instance.Parent:FindFirstChildOfClass("Humanoid") or self.instance.Parent:WaitForChild("Humanoid", math.huge)
		local animController = nil
		if not humanoid then
			animController = self.instance.Parent:FindFirstChildOfClass("AnimationController")
		end

		self:setAnimationController(humanoid or animController)
		return self.animController
	end
end

function BaseWeapon:setAnimationController(animController)
	if animController == self.animController then
		return
	end
	self:stopAnimations()
	self.animController = animController
end

function BaseWeapon:stopAnimations()
	for _, track in pairs(self.animTracks) do
		if track.IsPlaying then
			track:Stop()
		end
	end
	self.animTracks = {}
end

function BaseWeapon:getAnimTrack(key)
	local track = self.animTracks[key]
	if not track then
		local animController = self:getAnimationController()
		if not animController then
			warn("No animation controller when trying to play ", key)
			return nil
		end

		local animation = AnimationsFolder:FindFirstChild(key)
		if not animation then
			error(string.format("No such animation \"%s\" ", tostring(key)))
		end

		track = animController:LoadAnimation(animation)
		self.animTracks[key] = track
	end

	return track
end

function BaseWeapon:reload(player, fromNetwork)
	if
		not self.equipped or
		self.reloading or
		not self.canReload or
		self:getAmmoInWeapon() == self:getConfigValue("AmmoCapacity", 30)
	then
		return false
	end

	if not IsServer then
		if self.player ~= nil and self.player ~= Players.LocalPlayer then
			return
		end
		self.weaponsSystem.getRemoteEvent("WeaponReloadRequest"):FireServer(self.instance)
		self:onReloaded(self.player)
	else
		self:onReloaded(player, fromNetwork)
		self.weaponsSystem.getRemoteEvent("WeaponReloaded"):FireAllClients(player, self.instance)
	end
end

function BaseWeapon:onReloaded(player, fromNetwork)
	if fromNetwork and player == Players.LocalPlayer then -- make sure localplayer doesn't reload twice
		return
	end

	self.reloading = true
	self.canReload = false

	-- Play reload animation and sound
	if not IsServer then
		local reloadTrackKey = self:getConfigValue("ReloadAnimation", "RifleReload")
		if reloadTrackKey then
			self.reloadTrack = self:getAnimTrack(reloadTrackKey)
			if self.reloadTrack then
				self.reloadTrack:Play()
			end
		end

		self.curReloadSound = self:tryPlaySound("Reload", nil)
		if self.curReloadSound then
			self.curReloadSound.Ended:Connect(function()
				self.curReloadSound = nil
			end)
		end
	end

	local reloadTime = self:getConfigValue("ReloadTime", 2)
	local startTime = tick()

	if self.connections.reload ~= nil then -- this prevents an endless ammo bug
		return
	end
	self.connections.reload = RunService.Heartbeat:Connect(function()
		-- Stop trying to reload if the player unequipped this weapon or reloading was canceled some other way
		if not self.reloading then
			if self.connections.reload then
				self.connections.reload:Disconnect()
				self.connections.reload = nil
			end
		end

		-- Wait until gun finishes reloading
		if tick() < startTime + reloadTime then
			return
		end

		-- Add ammo to weapon
		if self.ammoInWeaponValue then
			self.ammoInWeaponValue.Value = self:getConfigValue("AmmoCapacity", 30)
		end

		if self.connections.reload then
			self.connections.reload:Disconnect()
			self.connections.reload = nil
		end

		self.reloading = false
		self.canReload = false
	end)
end

function BaseWeapon:cancelReload(player, fromNetwork)
	if not self.reloading then
		return
	end
	if fromNetwork and player == Players.LocalPlayer then
		return
	end

	if not IsServer and not fromNetwork and player == Players.LocalPlayer then
		self.weaponsSystem.getRemoteEvent("WeaponReloadCanceled"):FireServer(self.instance)
	elseif IsServer and fromNetwork then
		self.weaponsSystem.getRemoteEvent("WeaponReloadCanceled"):FireAllClients(player, self.instance)
	end

	self.reloading = false
	self.canReload = true

	if not IsServer and self.reloadTrack and self.reloadTrack.IsPlaying then
		warn("Stopping reloadTrack")
		self.reloadTrack:Stop()
	end
	if self.curReloadSound then
		self.curReloadSound:Stop()
		self.curReloadSound:Destroy()
		self.curReloadSound = nil
	end
end

function BaseWeapon:getAmmoInWeapon()
	if self.ammoInWeaponValue then
		return self.ammoInWeaponValue.Value
	end
	return 0
end

function BaseWeapon:useAmmo(amount)
	if self.ammoInWeaponValue then
		local ammoUsed = math.min(amount, self.ammoInWeaponValue.Value)
		self.ammoInWeaponValue.Value = self.ammoInWeaponValue.Value - ammoUsed
		self.canReload = true
		return ammoUsed
	else
		return 0
	end
end

function BaseWeapon:renderCharge()

end

return BaseWeapon


Prompt:
-----------------------------------------------------------------------------------------
--[[
Thanks for using Zed's Mesh Giver 2.0!

Instructions:
1) Find the mesh in you weapon. Generally it should be inside a brick called "Handle"
2) Copy and Paste that mesh into the scenebrick, remove the mesh currently in the scenebrick first.
3) Open up the settings folder in thsi model and edit the following settings:
	- Regen Time: Time it takes for a person to be able to use the giver again.
	- StartColor: Colour of the bricks that are currently blue.
	- RegenColor: Colour of the current blue bricks will be turned to a different color meaning its currently regenrating.
	- WeaponName: Copy and past the exact name of the weapon into the value of the WeaponName value.
4) Cut and paste the weapon into ServerStorage
5) Done!
----------------Don't edit below unless you know what you're doing--------------------------
--]]

Response:
SColor = script.Parent.Settings:FindFirstChild("StartColor")
RColor = script.Parent.Settings:FindFirstChild("RegenColor")
RTime = script.Parent.Settings:FindFirstChild("RegenTime")
Weapon = script.Parent.Settings:FindFirstChild("WeaponName")
Center = script.Parent.ColoredParts:FindFirstChild("TouchMe")
deb = false

Center.Touched:connect(function(part)
	if part.Parent:FindFirstChild("Humanoid") then
		if part.Parent.Humanoid.Health > 0 then
			if game.Players:FindFirstChild(part.Parent.Name) then
				if game.ServerStorage:FindFirstChild(Weapon.Value) then
					if deb == false then
						deb = true
						for i,v in pairs (script.Parent.ColoredParts:GetChildren()) do
							if v:IsA("Part") then
								v.BrickColor = RColor.Value
							end
						end
						local wep = game.ServerStorage:FindFirstChild(Weapon.Value)
						wep:Clone().Parent = game.Players:FindFirstChild(part.Parent.Name).Backpack
						wait(RTime.Value)
						deb = false
						for i,v in pairs (script.Parent.ColoredParts:GetChildren()) do
							if v:IsA("Part") then
								v.BrickColor = SColor.Value
							end
						end
					end
				else
					print("Error: "..Weapon.Value.." not found in 'ServerStorage'.")
				end
			end
		end
	end
end)


Prompt: --- These are the IDs of possible blood textures, I already set 3 up for u k

Response:
local blood_textures = {
	176678030,
	176678048,
	176678086
}


Prompt: -- initialize to idle

Response:
playAnimation("idle", 0.1, Humanoid)
pose = "Standing"

while Figure.Parent~=nil do
	local _, time = wait(0.1)
	move(time)
end


Prompt: --wait()

Response:
local creator = script.Parent:findFirstChild("creator")
local move = script.Parent:findFirstChild("Move")

local active = true

function tagHumanoid(humanoid, creator)
	if creator ~= nil then
		local new_tag = creator:clone()
		new_tag.Parent = humanoid
	end
end

function onPlayerBlownUp(part, distance, creator)
	if part.Name == "Head" then
		local humanoid = part.Parent.Humanoid
		tagHumanoid(humanoid, creator)
	end
end

function set_Off(hit)
	if active == true then
		active = false
		explosion = Instance.new("Explosion")
		explosion.BlastRadius = 45
		explosion.BlastPressure = 50000

		local creator = script.Parent:findFirstChild("creator")
		if creator ~= nil then
			explosion.Hit:connect(function(part, distance)  onPlayerBlownUp(part, distance, creator) end)
		end

		explosion.Position = script.Parent.Position
		explosion.Parent = game.Workspace
		wait()
		script.Parent:remove()
	end
end
script.Parent.Touched:connect(set_Off)

for i = 1,100 do
	wait()
	local desired = Instance.new("Vector3Value")
	desired.Value = script.Parent.CFrame.lookVector * 2100

	local difference = desired.Value - move.velocity

	if difference.magnitude >= move.velocity.magnitude then
		move.velocity = move.velocity + (difference*(0.01*i))
	end
end


Prompt:
--[=[
	Prop that fires when saving. Promise will resolve once saving is complete.
	@prop Saving Signal<Promise>
	@within DataStore
]=]

Response:
	self.Saving = Signal.new() -- :Fire(promise)
	self._maid:GiveTask(self.Saving)

	task.spawn(function()
		while self.Destroy do
			for _=1, CHECK_DIVISION do
				task.wait(AUTO_SAVE_TIME/CHECK_DIVISION)
				if not self.Destroy then
					break
				end
			end

			if not self.Destroy then
				break
			end

			-- Apply additional jitter on auto-save
			task.wait(math.random(1, JITTER))

			if not self.Destroy then
				break
			end

			self:Save()
		end
	end)

	return self
end