Prompt: --[[ The Module ]]

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

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

	-- So that derived classes have access to this
	self.FIRST_PERSON_DISTANCE_THRESHOLD = FIRST_PERSON_DISTANCE_THRESHOLD

	self.cameraType = nil
	self.cameraMovementMode = nil

	self.lastCameraTransform = nil
	self.rotateInput = ZERO_VECTOR2
	self.userPanningCamera = false
	self.lastUserPanCamera = tick()

	self.humanoidRootPart = nil
	self.humanoidCache = {}

	-- Subject and position on last update call
	self.lastSubject = nil
	self.lastSubjectPosition = Vector3.new(0,5,0)

	-- These subject distance members refer to the nominal camera-to-subject follow distance that the camera
	-- is trying to maintain, not the actual measured value.
	-- The default is updated when screen orientation or the min/max distances change,
	-- to be sure the default is always in range and appropriate for the orientation.
	self.defaultSubjectDistance = math.clamp(DEFAULT_DISTANCE, player.CameraMinZoomDistance, player.CameraMaxZoomDistance)
	self.currentSubjectDistance = math.clamp(DEFAULT_DISTANCE, player.CameraMinZoomDistance, player.CameraMaxZoomDistance)

	self.inFirstPerson = false
	self.inMouseLockedMode = false
	self.portraitMode = false
	self.isSmallTouchScreen = false

	-- Used by modules which want to reset the camera angle on respawn.
	self.resetCameraAngle = true

	self.enabled = false

	-- Input Event Connections
	self.inputBeganConn = nil
	self.inputChangedConn = nil
	self.inputEndedConn = nil

	self.startPos = nil
	self.lastPos = nil
	self.panBeginLook = nil

	self.panEnabled = true
	self.keyPanEnabled = true
	self.distanceChangeEnabled = true

	self.PlayerGui = nil

	self.cameraChangedConn = nil
	self.viewportSizeChangedConn = nil

	self.boundContextActions = {}

	-- VR Support
	self.shouldUseVRRotation = false
	self.VRRotationIntensityAvailable = false
	self.lastVRRotationIntensityCheckTime = 0
	self.lastVRRotationTime = 0
	self.vrRotateKeyCooldown = {}
	self.cameraTranslationConstraints = Vector3.new(1, 1, 1)
	self.humanoidJumpOrigin = nil
	self.trackingHumanoid = nil
	self.cameraFrozen = false
	self.subjectStateChangedConn = nil

	-- Gamepad support
	self.activeGamepad = nil
	self.gamepadPanningCamera = false
	self.lastThumbstickRotate = nil
	self.numOfSeconds = 0.7
	self.currentSpeed = 0
	self.maxSpeed = 6
	self.vrMaxSpeed = 4
	self.lastThumbstickPos = Vector2.new(0,0)
	self.ySensitivity = 0.65
	self.lastVelocity = nil
	self.gamepadConnectedConn = nil
	self.gamepadDisconnectedConn = nil
	self.currentZoomSpeed = 1.0
	self.L3ButtonDown = false
	self.dpadLeftDown = false
	self.dpadRightDown = false

	-- Touch input support
	self.isDynamicThumbstickEnabled = false
	self.fingerTouches = {}
	self.dynamicTouchInput = nil
	self.numUnsunkTouches = 0
	self.inputStartPositions = {}
	self.inputStartTimes = {}
	self.startingDiff = nil
	self.pinchBeginZoom = nil
	self.userPanningTheCamera = false
	self.touchActivateConn = nil

	-- Mouse locked formerly known as shift lock mode
	self.mouseLockOffset = ZERO_VECTOR3

	-- [[ NOTICE ]] --
	-- Initialization things used to always execute at game load time, but now these camera modules are instantiated
	-- when needed, so the code here may run well after the start of the game

	if player.Character then
		self:OnCharacterAdded(player.Character)
	end

	player.CharacterAdded:Connect(function(char)
		self:OnCharacterAdded(char)
	end)

	if self.cameraChangedConn then self.cameraChangedConn:Disconnect() end
	self.cameraChangedConn = workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function()
		self:OnCurrentCameraChanged()
	end)
	self:OnCurrentCameraChanged()

	if self.playerCameraModeChangeConn then self.playerCameraModeChangeConn:Disconnect() end
	self.playerCameraModeChangeConn = player:GetPropertyChangedSignal("CameraMode"):Connect(function()
		self:OnPlayerCameraPropertyChange()
	end)

	if self.minDistanceChangeConn then self.minDistanceChangeConn:Disconnect() end
	self.minDistanceChangeConn = player:GetPropertyChangedSignal("CameraMinZoomDistance"):Connect(function()
		self:OnPlayerCameraPropertyChange()
	end)

	if self.maxDistanceChangeConn then self.maxDistanceChangeConn:Disconnect() end
	self.maxDistanceChangeConn = player:GetPropertyChangedSignal("CameraMaxZoomDistance"):Connect(function()
		self:OnPlayerCameraPropertyChange()
	end)

	if self.playerDevTouchMoveModeChangeConn then self.playerDevTouchMoveModeChangeConn:Disconnect() end
	self.playerDevTouchMoveModeChangeConn = player:GetPropertyChangedSignal("DevTouchMovementMode"):Connect(function()
		self:OnDevTouchMovementModeChanged()
	end)
	self:OnDevTouchMovementModeChanged() -- Init

	if self.gameSettingsTouchMoveMoveChangeConn then self.gameSettingsTouchMoveMoveChangeConn:Disconnect() end
	self.gameSettingsTouchMoveMoveChangeConn = UserGameSettings:GetPropertyChangedSignal("TouchMovementMode"):Connect(function()
		self:OnGameSettingsTouchMovementModeChanged()
	end)
	self:OnGameSettingsTouchMovementModeChanged() -- Init

	UserGameSettings:SetCameraYInvertVisible()
	UserGameSettings:SetGamepadCameraSensitivityVisible()

	self.hasGameLoaded = game:IsLoaded()
	if not self.hasGameLoaded then
		self.gameLoadedConn = game.Loaded:Connect(function()
			self.hasGameLoaded = true
			self.gameLoadedConn:Disconnect()
			self.gameLoadedConn = nil
		end)
	end

	self:OnPlayerCameraPropertyChange()

	return self
end

function BaseCamera:GetModuleName()
	return "BaseCamera"
end

function BaseCamera:OnCharacterAdded(char)
	self.resetCameraAngle = self.resetCameraAngle or self:GetEnabled()
	self.humanoidRootPart = nil
	if UserInputService.TouchEnabled then
		self.PlayerGui = player:WaitForChild("PlayerGui")
		for _, child in ipairs(char:GetChildren()) do
			if child:IsA("Tool") then
				self.isAToolEquipped = true
			end
		end
		char.ChildAdded:Connect(function(child)
			if child:IsA("Tool") then
				self.isAToolEquipped = true
			end
		end)
		char.ChildRemoved:Connect(function(child)
			if child:IsA("Tool") then
				self.isAToolEquipped = false
			end
		end)
	end
end

function BaseCamera:GetHumanoidRootPart()
	if not self.humanoidRootPart then
		if player.Character then
			local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
			if humanoid then
				self.humanoidRootPart = humanoid.RootPart
			end
		end
	end
	return self.humanoidRootPart
end

function BaseCamera:GetBodyPartToFollow(humanoid, isDead)
	-- If the humanoid is dead, prefer the head part if one still exists as a sibling of the humanoid
	if humanoid:GetState() == Enum.HumanoidStateType.Dead then
		local character = humanoid.Parent
		if character and character:IsA("Model") then
			return character:FindFirstChild("Head") or humanoid.RootPart
		end
	end

	return humanoid.RootPart
end

function BaseCamera:GetSubjectPosition()
	local result = self.lastSubjectPosition
	local camera = game.Workspace.CurrentCamera
	local cameraSubject = camera and camera.CameraSubject

	if cameraSubject then
		if cameraSubject:IsA("Humanoid") then
			local humanoid = cameraSubject
			local humanoidIsDead = humanoid:GetState() == Enum.HumanoidStateType.Dead

			if VRService.VREnabled and humanoidIsDead and humanoid == self.lastSubject then
				result = self.lastSubjectPosition
			else
				local bodyPartToFollow = humanoid.RootPart

				-- If the humanoid is dead, prefer their head part as a follow target, if it exists
				if humanoidIsDead then
					if humanoid.Parent and humanoid.Parent:IsA("Model") then
						bodyPartToFollow = humanoid.Parent:FindFirstChild("Head") or bodyPartToFollow
					end
				end

				if bodyPartToFollow and bodyPartToFollow:IsA("BasePart") then
					local heightOffset
					if humanoid.RigType == Enum.HumanoidRigType.R15 then
						if humanoid.AutomaticScalingEnabled then
							heightOffset = R15_HEAD_OFFSET
							if bodyPartToFollow == humanoid.RootPart then
								local rootPartSizeOffset = (humanoid.RootPart.Size.Y/2) - (HUMANOID_ROOT_PART_SIZE.Y/2)
								heightOffset = heightOffset + Vector3.new(0, rootPartSizeOffset, 0)
							end
						else
							heightOffset = R15_HEAD_OFFSET_NO_SCALING
						end
					else
						heightOffset = HEAD_OFFSET
					end

					if humanoidIsDead then
						heightOffset = ZERO_VECTOR3
					end

					result = bodyPartToFollow.CFrame.p + bodyPartToFollow.CFrame:vectorToWorldSpace(heightOffset + humanoid.CameraOffset)
				end
			end

		elseif cameraSubject:IsA("VehicleSeat") then
			local offset = SEAT_OFFSET
			if VRService.VREnabled then
				offset = VR_SEAT_OFFSET
			end
			result = cameraSubject.CFrame.p + cameraSubject.CFrame:vectorToWorldSpace(offset)
		elseif cameraSubject:IsA("SkateboardPlatform") then
			result = cameraSubject.CFrame.p + SEAT_OFFSET
		elseif cameraSubject:IsA("BasePart") then
			result = cameraSubject.CFrame.p
		elseif cameraSubject:IsA("Model") then
			if cameraSubject.PrimaryPart then
				result = cameraSubject:GetPrimaryPartCFrame().p
			else
				result = cameraSubject:GetModelCFrame().p
			end
		end
	else
		-- cameraSubject is nil
		-- Note: Previous RootCamera did not have this else case and let self.lastSubject and self.lastSubjectPosition
		-- both get set to nil in the case of cameraSubject being nil. This function now exits here to preserve the
		-- last set valid values for these, as nil values are not handled cases
		return
	end

	self.lastSubject = cameraSubject
	self.lastSubjectPosition = result

	return result
end

function BaseCamera:UpdateDefaultSubjectDistance()
	if self.portraitMode then
		self.defaultSubjectDistance = math.clamp(PORTRAIT_DEFAULT_DISTANCE, player.CameraMinZoomDistance, player.CameraMaxZoomDistance)
	else
		self.defaultSubjectDistance = math.clamp(DEFAULT_DISTANCE, player.CameraMinZoomDistance, player.CameraMaxZoomDistance)
	end
end

function BaseCamera:OnViewportSizeChanged()
	local camera = game.Workspace.CurrentCamera
	local size = camera.ViewportSize
	self.portraitMode = size.X < size.Y
	self.isSmallTouchScreen = UserInputService.TouchEnabled and (size.Y < 500 or size.X < 700)

	self:UpdateDefaultSubjectDistance()
end


Prompt: --//Controller/--

Response:
Humanoid.Died:Connect(function()
	for i, Joint in pairs(Character:GetDescendants()) do
		if Joint:IsA("Motor6D") then
			local A0 = Instance.new("Attachment")
			A0.Parent = Joint.Part0
			A0.CFrame = Joint.C0

			local A1 = Instance.new("Attachment")
			A1.Parent = Joint.Part1
			A1.CFrame = Joint.C1

			local BallSocketConstraint = Instance.new("BallSocketConstraint")
			BallSocketConstraint.Parent = Joint.Parent
			BallSocketConstraint.Attachment0 = A0
			BallSocketConstraint.Attachment1 = A1

			Joint:Destroy()
		elseif Joint.Name == "Head" and Joint:IsA("BasePart") then
			local WeldConstraint = Instance.new("WeldConstraint")
			WeldConstraint.Parent = Joint
			WeldConstraint.Part0 = Joint
			WeldConstraint.Part1 = HRP

		end
	end
end)


Prompt:
-- local REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL =
-- 	Constants.REGEX_BACKSLASH,
-- 	Constants.REGEX_REMOVE_BACKSLASH,
-- 	Constants.REGEX_SPECIAL_CHARS,
-- 	Constants.REGEX_SPECIAL_CHARS_GLOBAL
-- ROBLOX TODO END

Response:
function exports.isObject(val)
	return val ~= nil and typeof(val) == "table" and not Array.isArray(val)
end
function exports.hasRegexChars(str)
	return string.match(str, REGEX_SPECIAL_CHARS) ~= nil
end
function exports.isRegexChar(str: string)
	return #str == 1 and exports.hasRegexChars(str)
end


Prompt: --Made by Luckymaxer

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

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

RemovalMonitor = script:WaitForChild("RemovalMonitor")

CarpetPieces = {
	{MeshId = 223079795, Angle = 160},
	{MeshId = 223079835, Angle = 100},
	{MeshId = 223079888, Angle = 100},
	{MeshId = 223079981, Angle = 160},
}

CarpetSize = Vector3.new(6, 0.5, 6.5)

BaseUrl = "http://www.roblox.com/asset/?id="

Rate = (1 / 10)

BasePart = Instance.new("Part")
BasePart.Material = Enum.Material.Plastic
BasePart.Shape = Enum.PartType.Block
BasePart.TopSurface = Enum.SurfaceType.Smooth
BasePart.BottomSurface = Enum.SurfaceType.Smooth
BasePart.FormFactor = Enum.FormFactor.Custom
BasePart.Size = Vector3.new(0.2, 0.2, 0.2)
BasePart.CanCollide = false
BasePart.Locked = true

ColorPart = BasePart:Clone()
ColorPart.Name = "ColorPart"
ColorPart.Reflectance = 0.25
ColorPart.Transparency = 0.1
ColorPart.Material = Enum.Material.SmoothPlastic
ColorPart.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
ColorPart.BackSurface = Enum.SurfaceType.SmoothNoOutlines
ColorPart.TopSurface = Enum.SurfaceType.SmoothNoOutlines
ColorPart.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
ColorPart.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
ColorPart.RightSurface = Enum.SurfaceType.SmoothNoOutlines
ColorPart.Size = Vector3.new(1, 1, 1)
ColorPart.Anchored = true
ColorPart.CanCollide = false
ColorMesh = Instance.new("SpecialMesh")
ColorMesh.Name = "Mesh"
ColorMesh.MeshType = Enum.MeshType.FileMesh
ColorMesh.MeshId = (BaseUrl .. "9856898")
ColorMesh.TextureId = (BaseUrl .. "1361097")
ColorMesh.Scale = (ColorPart.Size * 2) --Default mesh scale is 1/2 the size of a 1x1x1 brick.
ColorMesh.Offset = Vector3.new(0, 0, 0)
ColorMesh.VertexColor = Vector3.new(1, 1, 1)
ColorMesh.Parent = ColorPart
ColorLight = Instance.new("PointLight")
ColorLight.Name = "Light"
ColorLight.Brightness = 50
ColorLight.Range = 8
ColorLight.Shadows = false
ColorLight.Enabled = true
ColorLight.Parent = ColorPart

RainbowColors = {
	Vector3.new(1, 0, 0),
	Vector3.new(1, 0.5, 0),
	Vector3.new(1, 1, 0),
	Vector3.new(0, 1, 0),
	Vector3.new(0, 1, 1),
	Vector3.new(0, 0, 1),
	Vector3.new(0.5, 0, 1)
}

Animations = {
	Sit = {Animation = Tool:WaitForChild("Sit"), FadeTime = nil, Weight = nil, Speed = nil, Duration = nil},
}

Grips = {
	Normal = CFrame.new(-1.5, 0, -0.75, 0, 0, -1, -1, 8.90154915e-005, 0, 8.90154915e-005, 1, 0),
	Flying = CFrame.new(0, 0.5, -0.125, -1, 0, -8.99756625e-009, -8.99756625e-009, 8.10000031e-008, 1, 7.28802977e-016, 0.99999994, -8.10000103e-008)
}

Flying = false
ToolEquipped = false

ServerControl = (Tool:FindFirstChild("ServerControl") or Instance.new("RemoteFunction"))
ServerControl.Name = "ServerControl"
ServerControl.Parent = Tool

ClientControl = (Tool:FindFirstChild("ClientControl") or Instance.new("RemoteFunction"))
ClientControl.Name = "ClientControl"
ClientControl.Parent = Tool

Handle.Transparency = 0
Tool.Grip = Grips.Normal
Tool.Enabled = true

function Clamp(Number, Min, Max)
	return math.max(math.min(Max, Number), Min)
end

function TransformModel(Objects, Center, NewCFrame, Recurse)
	local Objects = ((type(Objects) ~= "table" and {Objects}) or Objects)
	for i, v in pairs(Objects) do
		if v:IsA("BasePart") then
			v.CFrame = NewCFrame:toWorldSpace(Center:toObjectSpace(v.CFrame))
		end
		if Recurse then
			TransformModel(v:GetChildren(), Center, NewCFrame, true)
		end
	end
end

function Weld(Parent, PrimaryPart)
	local Parts = {}
	local Welds = {}
	local function WeldModel(Parent, PrimaryPart)
		for i, v in pairs(Parent:GetChildren()) do
			if v:IsA("BasePart") then
				if v ~= PrimaryPart then
					local Weld = Instance.new("Weld")
					Weld.Name = "Weld"
					Weld.Part0 = PrimaryPart
					Weld.Part1 = v
					Weld.C0 = PrimaryPart.CFrame:inverse()
					Weld.C1 = v.CFrame:inverse()
					Weld.Parent = PrimaryPart
					table.insert(Welds, Weld)
				end
				table.insert(Parts, v)
			end
			WeldModel(v, PrimaryPart)
		end
	end
	WeldModel(Parent, PrimaryPart)
	return Parts, Welds
end

function CleanUp()
	Handle.Transparency = 0
	for i, v in pairs(Tool:GetChildren()) do
		if v:IsA("BasePart") and v ~= Handle then
			v:Destroy()
		end
	end
end

function CreateRainbow(Length)
	local RainbowModel = Instance.new("Model")
	RainbowModel.Name = "RainbowPart"
	for i, v in pairs(RainbowColors) do
		local Part = ColorPart:Clone()
		Part.Name = "Part"
		Part.Size = Vector3.new(0.5, 0.5, Length)
		Part.CFrame = Part.CFrame * CFrame.new((Part.Size.X * (i - 1)), 0, 0)
		Part.Mesh.Scale = (Part.Size * 2)
		Part.Mesh.VertexColor = v
		Part.Light.Color = Color3.new(v.X, v.Y, v.Z)
		Part.Parent = RainbowModel
	end
	local RainbowBoundingBox = BasePart:Clone()
	RainbowBoundingBox.Name = "BoundingBox"
	RainbowBoundingBox.Transparency = 1
	RainbowBoundingBox.Size = RainbowModel:GetModelSize()
	RainbowBoundingBox.Anchored = true
	RainbowBoundingBox.CanCollide = false
	RainbowBoundingBox.CFrame = RainbowModel:GetModelCFrame()
	RainbowBoundingBox.Parent = RainbowModel
	return RainbowModel
end

function GetRainbowModel()
	local ModelName = (Player.Name .. "'s Rainbow")
	local Model = game:GetService("Workspace"):FindFirstChild(ModelName)
	if not Model then
		Model = Instance.new("Model")
		Model.Name = ModelName
		local RemovalMonitorClone = RemovalMonitor:Clone()
		RemovalMonitorClone.Disabled = false
		RemovalMonitorClone.Parent = Model
	end
	return Model
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 Activated()
	if not Tool.Enabled then
		return
	end
	Tool.Enabled = false
	Flying = not Flying
	if Flying then
		CleanUp()
		Handle.Transparency = 1
		local CarpetParts = {}
		Seat = Instance.new("Seat")
		Seat.Name = "Seat"
		Seat.Transparency = 1
		Seat.Material = Enum.Material.Plastic
		Seat.Shape = Enum.PartType.Block
		Seat.TopSurface = Enum.SurfaceType.Smooth
		Seat.BottomSurface = Enum.SurfaceType.Smooth
		Seat.FormFactor = Enum.FormFactor.Custom
		Seat.Size = Vector3.new(0.5, 0.2, 0.5)
		Seat.CanCollide = true
		Seat.Locked = true
		Seat.Disabled = false
		local SeatWeld = Instance.new("Weld")
		SeatWeld.Name = "Weld"
		SeatWeld.Part0 = Handle
		SeatWeld.Part1 = Seat
		SeatWeld.C0 = (CFrame.new(-1.5, 0, -3.25) * CFrame.Angles(0, math.pi, 0))
		SeatWeld.C1 = CFrame.new(0, 0, 0)
		SeatWeld.Parent = Seat
		Seat.Parent = Tool
		for i, v in pairs(CarpetPieces) do
			local CarpetPart = BasePart:Clone()
			CarpetPart.Size = Vector3.new(CarpetSize.X, CarpetSize.Y, (CarpetSize.Z / #CarpetPieces))
			local Mesh = Instance.new("SpecialMesh")
			Mesh.MeshType = Enum.MeshType.FileMesh
			Mesh.MeshId = (BaseUrl .. v.MeshId)
			Mesh.TextureId = (BaseUrl .. "223080038")
			Mesh.Scale = Vector3.new(2, 1.125, 1.5)
			Mesh.VertexColor = Vector3.new(1, 1, 1)
			Mesh.Offset = Vector3.new(0, 0, 0)
			Mesh.Parent = CarpetPart
			local Weld = Instance.new("Weld")
			Weld.Part0 = Handle
			Weld.Part1 = CarpetPart
			local XOffset = (((i == 1 or i == #CarpetPieces) and -0.005) or 0)
			local YOffset = ((-((Handle.Size.Z / 2) - (CarpetPart.Size.Z / 2))) + ((CarpetPart.Size.Z * (i - 1))) + ((i == 2 and 0.85) or (i == 3 and 1.1) or (i == #CarpetPieces and 1.97) or 0))
			Weld.C1 = CFrame.new(0, XOffset, YOffset)
			Weld.Parent = CarpetPart
			table.insert(CarpetParts, {Part = CarpetPart, Weld = Weld, InitialCFrame = Weld.C0, Angle = v.Angle})
			CarpetPart.Parent = Tool
		end

		spawn(function()
			InvokeClient("PlayAnimation", Animations.Sit)
			Tool.Grip = Grips.Flying
		end)

		Torso.Anchored = true
		delay(.2,function()
			Torso.Anchored = false
			Torso.Velocity = Vector3.new(0,0,0)
			Torso.RotVelocity = Vector3.new(0,0,0)
		end)

		FlightSpin = Instance.new("BodyGyro")
		FlightSpin.Name = "FlightSpin"
		FlightSpin.P = 10000
		FlightSpin.maxTorque = Vector3.new(FlightSpin.P, FlightSpin.P, FlightSpin.P)*100
		FlightSpin.cframe = Torso.CFrame

		FlightPower = Instance.new("BodyVelocity")
		FlightPower.Name = "FlightPower"
		FlightPower.velocity = Vector3.new(0, 0, 0)
		FlightPower.maxForce = Vector3.new(1,1,1)*1000000
		FlightPower.P = 1000

		FlightHold = Instance.new("BodyPosition")
		FlightHold.Name = "FlightHold"
		FlightHold.P = 100000
		FlightHold.maxForce = Vector3.new(0, 0, 0)
		FlightHold.position = Torso.Position

		FlightSpin.Parent = Torso
		FlightPower.Parent = Torso
		FlightHold.Parent = Torso

		spawn(function()
			local LastPlace = nil
			while Flying and ToolEquipped and CheckIfAlive() do

				local CurrentPlace = Handle.Position
				local Velocity = Torso.Velocity
				Velocity = Vector3.new(Velocity.X, 0, Velocity.Z).magnitude

				if LastPlace and Velocity > 10 then

					spawn(function()
						local Model = GetRainbowModel()
						local Distance = (LastPlace - CurrentPlace).magnitude
						local Length = Distance + 3.5

						local RainbowModel = CreateRainbow(Length)
						local RainbowCFrame = CFrame.new((LastPlace + (CurrentPlace - LastPlace).unit * (Distance / 2)), CurrentPlace)

						TransformModel(RainbowModel, RainbowModel:GetModelCFrame(), RainbowCFrame, true)
						Debris:AddItem(RainbowModel, 1)
						RainbowModel.Parent = Model

						if Model and not Model.Parent then
							Model.Parent = game:GetService("Workspace")
						end

						LastPlace = CurrentPlace
					end)
				elseif not LastPlace then
					LastPlace = CurrentPlace
				end

				wait(Rate)
			end
		end)
	elseif not Flying then
		Torso.Velocity = Vector3.new(0, 0, 0)
		Torso.RotVelocity = Vector3.new(0, 0, 0)
		for i, v in pairs({FlightSpin, FlightPower, FlightHold}) do
			if v and v.Parent then
				v:Destroy()
			end
		end
		if Seat and Seat.Parent and Seat.Occupant and Seat.Occupant:IsA("Humanoid") then
			local humanoid = Seat.Occupant
			humanoid.Sit = false
		end
		CleanUp()
		spawn(function()
			Tool.Grip = Grips.Normal
			InvokeClient("StopAnimation", Animations.Sit)
		end)
	end

	wait(2)

	Tool.Enabled = true
end

function Equipped(Mouse)
	Character = Tool.Parent
	Humanoid = Character:FindFirstChild("Humanoid")
	Torso = Character:FindFirstChild("HumanoidRootPart")
	Player = Players:GetPlayerFromCharacter(Character)
	if not CheckIfAlive() then
		return
	end
	if Humanoid then
		if Humanoid.RigType == Enum.HumanoidRigType.R15 then
			Animations = {
				Sit = {Animation = Tool:WaitForChild("SitR15"), FadeTime = nil, Weight = nil, Speed = nil, Duration = nil},
			}
		else
			Animations = {
				Sit = {Animation = Tool:WaitForChild("Sit"), FadeTime = nil, Weight = nil, Speed = nil, Duration = nil},
			}
		end
	end
	Tool.Grip = Grips.Normal
	ToolEquipped = true
end

function Unequipped()
	Flying = false
	for i, v in pairs({FlightSpin, FlightPower, FlightHold}) do
		if v and v.Parent then
			v:Destroy()
		end
	end
	CleanUp()
	Handle.Transparency = 0
	ToolEquipped = false
end

function OnServerInvoke(player, mode, value)
	if player ~= Player or not ToolEquipped or not value or not CheckIfAlive() then
		return
	end
end

function InvokeClient(Mode, Value)
	local ClientReturn = nil
	pcall(function()
		ClientReturn = ClientControl:InvokeClient(Player, Mode, Value)
	end)
	return ClientReturn
end

CleanUp()

ServerControl.OnServerInvoke = OnServerInvoke

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


Prompt: --[[Misc]]

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


Prompt: -- << VARIABLES >>

Response:
local subPageOrders = {
	["About"] = {"Info", "Updates", "Credits"};
	--["Commands"] = {"Commands", "VoiceChat", "Morphs", "Details"};
	["Commands"] = {"Commands", "Morphs", "Details"};
	["Special"] = {"Donor", "Coming soon"};
	["Admin"] = {"Ranks", "Server Ranks", "Banland"};
	["Settings"] = {"Custom"};
}
local mainFrame = main.gui.MainFrame
local TopBarFrame = main.gui.CustomTopBar
local TopBarButton = TopBarFrame.ImageButton
local pages = mainFrame.Pages
local currentPage = pages.Home
local guiDe = true


Prompt: --// Services

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


Prompt: --Initialization--

Response:
xSSR.Anchored = true
xSSL.Anchored = true
zBRR.Anchored = true
zBRL.Anchored = true

weight.Rotation = alig.Rotation
engine.Rotation = alig.Rotation
fuel.Rotation = alig.Rotation
diff.Rotation = alig.Rotation
trans.Rotation = alig.Rotation
hitboxF.Rotation = alig.Rotation
hitboxR.Rotation = alig.Rotation
alig:remove()

xSSR.CFrame = xSSR.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(CamberFront*-1))
xSSL.CFrame = xSSL.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(CamberFront*1))

zBRR.CFrame = zBRR.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(CamberRear*-1))
zBRL.CFrame = zBRL.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(CamberRear*1))

if Drivetrain == "FWD" then
vRdifferential.Value = 0
elseif Drivetrain == "RWD" then
	vFdifferential.Value = 0
end
script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(math.rad(-0.59), math.rad(0), math.rad(0))

local D = script.Assets.Screen:Clone()
D.Parent = script.Parent

local bodyweld = script.Assets.BodyWeld:Clone()
bodyweld.Parent = script.Parent.Parent
bodyweld.Disabled = false

for _,i in pairs(script.Parent.Parent.Parent:GetChildren()) do
 local new = script.Assets.Weld:Clone()
 if i.Name~="Wheels" and i.Name~="Body" then new.Parent = i end
 new.Disabled = false
end

for _,i in pairs(script.Parent.Parent.Parent.Wheels:GetChildren()) do
	local new = script.Assets.Weld:Clone()
	new.Parent = i
	new.Disabled = false
end


Prompt: -- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage

Response:
hitPart.Touched:Connect(function(hit)
	if debounce == true then
		if hit.Parent:FindFirstChild("Humanoid") then
			local plr = game.Players:FindFirstChild(hit.Parent.Name)
			if plr then
				debounce = false
				hitPart.BrickColor = BrickColor.new("Bright red")
				tool:Clone().Parent = plr.Backpack
				wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again
				debounce = true
				hitPart.BrickColor = BrickColor.new("Bright green")
			end
		end
	end
end)


Prompt: --[[ FUNCTIONS ]]

Response:
local function lerpLength(msg, min, max)
	return min + (max-min) * math.min(string.len(msg)/75.0, 1.0)
end

local function createFifo()
	local this = {}
	this.data = {}

	local emptyEvent = Instance.new("BindableEvent")
	this.Emptied = emptyEvent.Event

	function this:Size()
		return #this.data
	end

	function this:Empty()
		return this:Size() <= 0
	end

	function this:PopFront()
		table.remove(this.data, 1)
		if this:Empty() then emptyEvent:Fire() end
	end

	function this:Front()
		return this.data[1]
	end

	function this:Get(index)
		return this.data[index]
	end

	function this:PushBack(value)
		table.insert(this.data, value)
	end

	function this:GetData()
		return this.data
	end

	return this
end

local function createCharacterChats()
	local this = {}

	this.Fifo = createFifo()
	this.BillboardGui = nil

	return this
end

local function createMap()
	local this = {}
	this.data = {}
	local count = 0

	function this:Size()
		return count
	end

	function this:Erase(key)
		if this.data[key] then count = count - 1 end
		this.data[key] = nil
	end

	function this:Set(key, value)
		this.data[key] = value
		if value then count = count + 1 end
	end

	function this:Get(key)
		if not key then return end
		if not this.data[key] then
			this.data[key] = createCharacterChats()
			local emptiedCon = nil
			emptiedCon = this.data[key].Fifo.Emptied:connect(function()
				emptiedCon:disconnect()
				this:Erase(key)
			end)
		end
		return this.data[key]
	end

	function this:GetData()
		return this.data
	end

	return this
end

local function createChatLine(message, bubbleColor, isLocalPlayer)
	local this = {}

	function this:ComputeBubbleLifetime(msg, isSelf)
		if isSelf then
			return lerpLength(msg,8,15)
		else
			return lerpLength(msg,12,20)
		end
	end

	this.Origin = nil
	this.RenderBubble = nil
	this.Message = message
	this.BubbleDieDelay = this:ComputeBubbleLifetime(message, isLocalPlayer)
	this.BubbleColor = bubbleColor
	this.IsLocalPlayer = isLocalPlayer

	return this
end

local function createPlayerChatLine(player, message, isLocalPlayer)
	local this = createChatLine(message, BubbleColor.WHITE, isLocalPlayer)

	if player then
		this.User = player.Name
		this.Origin = player.Character
	end

	return this
end

local function createGameChatLine(origin, message, isLocalPlayer, bubbleColor)
	local this = createChatLine(message, bubbleColor, isLocalPlayer)
	this.Origin = origin

	return this
end

function createChatBubbleMain(filePrefix, sliceRect)
	local chatBubbleMain = Instance.new("ImageLabel")
	chatBubbleMain.Name = "ChatBubble"
	chatBubbleMain.ScaleType = Enum.ScaleType.Slice
	chatBubbleMain.SliceCenter = sliceRect
	chatBubbleMain.Image = "rbxasset://textures/" .. tostring(filePrefix) .. ".png"
	chatBubbleMain.BackgroundTransparency = 1
	chatBubbleMain.BorderSizePixel = 0
	chatBubbleMain.Size = UDim2.new(1.0, 0, 1.0, 0)
	chatBubbleMain.Position = UDim2.new(0,0,0,0)

	return chatBubbleMain
end

function createChatBubbleTail(position, size)
	local chatBubbleTail = Instance.new("ImageLabel")
	chatBubbleTail.Name = "ChatBubbleTail"
	chatBubbleTail.Image = "rbxasset://textures/ui/dialog_tail.png"
	chatBubbleTail.BackgroundTransparency = 1
	chatBubbleTail.BorderSizePixel = 0
	chatBubbleTail.Position = position
	chatBubbleTail.Size = size

	return chatBubbleTail
end

function createChatBubbleWithTail(filePrefix, position, size, sliceRect)
	local chatBubbleMain = createChatBubbleMain(filePrefix, sliceRect)

	local chatBubbleTail = createChatBubbleTail(position, size)
	chatBubbleTail.Parent = chatBubbleMain

	return chatBubbleMain
end

function createScaledChatBubbleWithTail(filePrefix, frameScaleSize, position, sliceRect)
	local chatBubbleMain = createChatBubbleMain(filePrefix, sliceRect)

	local frame = Instance.new("Frame")
	frame.Name = "ChatBubbleTailFrame"
	frame.BackgroundTransparency = 1
	frame.SizeConstraint = Enum.SizeConstraint.RelativeXX
	frame.Position = UDim2.new(0.5, 0, 1, 0)
	frame.Size = UDim2.new(frameScaleSize, 0, frameScaleSize, 0)
	frame.Parent = chatBubbleMain

	local chatBubbleTail = createChatBubbleTail(position, UDim2.new(1,0,0.5,0))
	chatBubbleTail.Parent = frame

	return chatBubbleMain
end

function createChatImposter(filePrefix, dotDotDot, yOffset)
	local result = Instance.new("ImageLabel")
	result.Name = "DialogPlaceholder"
	result.Image = "rbxasset://textures/" .. tostring(filePrefix) .. ".png"
	result.BackgroundTransparency = 1
	result.BorderSizePixel = 0
	result.Position = UDim2.new(0, 0, -1.25, 0)
	result.Size = UDim2.new(1, 0, 1, 0)

	local image = Instance.new("ImageLabel")
	image.Name = "DotDotDot"
	image.Image = "rbxasset://textures/" .. tostring(dotDotDot) .. ".png"
	image.BackgroundTransparency = 1
	image.BorderSizePixel = 0
	image.Position = UDim2.new(0.001, 0, yOffset, 0)
	image.Size = UDim2.new(1, 0, 0.7, 0)
	image.Parent = result

	return result
end

local this = {}
this.ChatBubble = {}
this.ChatBubbleWithTail = {}
this.ScalingChatBubbleWithTail = {}
this.CharacterSortedMsg = createMap()


Prompt: --> CUSTOMISATION

Response:
local FireAnimationSpeed = 3.5
local ReloadAnimationSpeed = 1.6


Prompt:
-- @Description Return true if the specified instance got a property named as specified.
-- @Arg1 Instance
-- @Arg2 PropertyName
-- @Return boolean

Response:
function Basic.HasProperty(instance, Property)
	local CachedProp = rawget(CachedProperties, instance.ClassName) and rawget(rawget(CachedProperties, instance.ClassName), Property)
	if CachedProp then return CachedProp end

	local success = pcall(function()
		return instance[Property]
	end)

	if not rawget(CachedProperties, instance.ClassName) then rawset(CachedProperties, instance.ClassName, {}) end
	rawset(rawget(CachedProperties, instance.ClassName), Property, success)

	return success
end


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

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

function methods:CreateGuiObjects(targetParent)
	self.ChatBarParentFrame = targetParent

	local backgroundImagePixelOffset = 7
	local textBoxPixelOffset = 5

	local BaseFrame = Instance.new("Frame")
	BaseFrame.Selectable = false
	BaseFrame.Size = UDim2.new(1, 0, 1, 0)
	BaseFrame.BackgroundTransparency = 0.6
	BaseFrame.BorderSizePixel = 0
	BaseFrame.BackgroundColor3 = ChatSettings.ChatBarBackGroundColor
	BaseFrame.Parent = targetParent

	local BoxFrame = Instance.new("Frame")
	BoxFrame.Selectable = false
	BoxFrame.Name = "BoxFrame"
	BoxFrame.BackgroundTransparency = 0.6
	BoxFrame.BorderSizePixel = 0
	BoxFrame.BackgroundColor3 = ChatSettings.ChatBarBoxColor
	BoxFrame.Size = UDim2.new(1, -backgroundImagePixelOffset * 2, 1, -backgroundImagePixelOffset * 2)
	BoxFrame.Position = UDim2.new(0, backgroundImagePixelOffset, 0, backgroundImagePixelOffset)
	BoxFrame.Parent = BaseFrame

	local TextBoxHolderFrame = Instance.new("Frame")
	TextBoxHolderFrame.BackgroundTransparency = 1
	TextBoxHolderFrame.Size = UDim2.new(1, -textBoxPixelOffset * 2, 1, -textBoxPixelOffset * 2)
	TextBoxHolderFrame.Position = UDim2.new(0, textBoxPixelOffset, 0, textBoxPixelOffset)
	TextBoxHolderFrame.Parent = BoxFrame

	local TextBox = Instance.new("TextBox")
	TextBox.Selectable = ChatSettings.GamepadNavigationEnabled
	TextBox.Name = "ChatBar"
	TextBox.BackgroundTransparency = 1
	TextBox.Size = UDim2.new(1, 0, 1, 0)
	TextBox.Position = UDim2.new(0, 0, 0, 0)
	TextBox.TextSize = ChatSettings.ChatBarTextSize
	TextBox.Font = ChatSettings.ChatBarFont
	TextBox.TextColor3 = ChatSettings.ChatBarTextColor
	TextBox.TextTransparency = 0.4
	TextBox.TextStrokeTransparency = 1
	TextBox.ClearTextOnFocus = false
	TextBox.TextXAlignment = Enum.TextXAlignment.Left
	TextBox.TextYAlignment = Enum.TextYAlignment.Top
	TextBox.TextWrapped = true
	TextBox.Text = ""
	TextBox.Parent = TextBoxHolderFrame

	local MessageModeTextButton = Instance.new("TextButton")
	MessageModeTextButton.Selectable = false
	MessageModeTextButton.Name = "MessageMode"
	MessageModeTextButton.BackgroundTransparency = 1
	MessageModeTextButton.Position = UDim2.new(0, 0, 0, 0)
	MessageModeTextButton.TextSize = ChatSettings.ChatBarTextSize
	MessageModeTextButton.Font = ChatSettings.ChatBarFont
	MessageModeTextButton.TextXAlignment = Enum.TextXAlignment.Left
	MessageModeTextButton.TextWrapped = true
	MessageModeTextButton.Text = ""
	MessageModeTextButton.Size = UDim2.new(0, 0, 0, 0)
	MessageModeTextButton.TextYAlignment = Enum.TextYAlignment.Center
	MessageModeTextButton.TextColor3 = self:GetDefaultChannelNameColor()
	MessageModeTextButton.Visible = true
	MessageModeTextButton.Parent = TextBoxHolderFrame

	local TextLabel = Instance.new("TextLabel")
	TextLabel.Selectable = false
	TextLabel.TextWrapped = true
	TextLabel.BackgroundTransparency = 1
	TextLabel.Size = TextBox.Size
	TextLabel.Position = TextBox.Position
	TextLabel.TextSize = TextBox.TextSize
	TextLabel.Font = TextBox.Font
	TextLabel.TextColor3 = TextBox.TextColor3
	TextLabel.TextTransparency = TextBox.TextTransparency
	TextLabel.TextStrokeTransparency = TextBox.TextStrokeTransparency
	TextLabel.TextXAlignment = TextBox.TextXAlignment
	TextLabel.TextYAlignment = TextBox.TextYAlignment
	TextLabel.Text = "..."
	TextLabel.Parent = TextBoxHolderFrame

	self.GuiObject = BaseFrame
	self.TextBox = TextBox
	self.TextLabel  = TextLabel

	self.GuiObjects.BaseFrame = BaseFrame
	self.GuiObjects.TextBoxFrame = BoxFrame
	self.GuiObjects.TextBox = TextBox
	self.GuiObjects.TextLabel = TextLabel
	self.GuiObjects.MessageModeTextButton = MessageModeTextButton

	self:AnimGuiObjects()
	self:SetUpTextBoxEvents(TextBox, TextLabel, MessageModeTextButton)
	if self.UserHasChatOff then
		self:DoLockChatBar()
	end
	self.eGuiObjectsChanged:Fire()
end


Prompt: --[[ Local Functions ]]

Response:
--
local function getHumanoid()
	local character = LocalPlayer and LocalPlayer.Character
	if character then
		if CachedHumanoid and CachedHumanoid.Parent == character then
			return CachedHumanoid
		else
			CachedHumanoid = nil
			for _,child in pairs(character:GetChildren()) do
				if child:IsA('Humanoid') then
					CachedHumanoid = child
					return CachedHumanoid
				end
			end
		end
	end
end


Prompt: -- Local Functions

Response:
local function OnTimeChanged(newValue)
	local currentTime = math.max(0, newValue)
	local minutes = math.floor(currentTime / 60)-- % 60
	local seconds = math.floor(currentTime) % 60
	Timer.Text = string.format("%02d:%02d", minutes, seconds)
end

local function OnDisplayTimerInfo(intermission, waitingForPlayers)
	Timer.Intermission.Visible = intermission
	Timer.WaitingForPlayers.Visible = waitingForPlayers
end


Response:
	 TeamKill = false					--- Enable TeamKill?
	,TeamDmgMult = .1					--- Between 0-1 | This will make you cause less damage if you hit your teammate

	,ReplicatedBullets = true			--- Keep in mind that some bullets will pass through surfaces...

	,AntiBunnyHop = true				--- Enable anti bunny hop system?
	,JumpCoolDown = 1.5					--- Seconds before you can jump again
	,JumpPower = 20						--- Jump power, default is 50

	,RealisticLaser = true				--- True = Laser line is invisible
	,ReplicatedLaser = true
	,ReplicatedFlashlight = true

	,EnableRagdoll = true				--- Enable ragdoll death?
	,TeamTags = true					--- Aaaaaaa
	,HitmarkerSound = false				--- GGWP MLG 360 NO SCOPE xD
	,Crosshair = false					--- Crosshair for Hipfire shooters and arcade modes
	,CrosshairOffset = 5				--- Crosshair size offset


Prompt: --Register touched events.

Response:
Rocket.Touched:Connect(function(TouchPart)
	if not Exploded and not IGNORE_LIST[string.lower(TouchPart.Name)] and (not TouchPart:IsDescendantOf(FiredCharacter) or GetReflectedByPlayer()) then
		Explode((Rocket.CFrame * CFrame.new(0,0,-Rocket.Size.Z/2)).p)
	end
end)

ExplodeEvent.OnServerEvent:Connect(function(Player,Position)
	local PositionDelta = (Rocket.Position - Position).magnitude
	if PositionDelta < 50 or PositionDelta > 5000 then
		Explode(Position)
	end
end)


Prompt: --Weld stuff here

Response:
MakeWeld(misc.Hood.Hinge,car.DriveSeat,"Motor",.1)
ModelWeld(misc.Hood.Parts,misc.Hood.Hinge)

car.DriveSeat.ChildAdded:connect(function(child)
	if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
		child.C0=CFrame.new(0,-.5,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)*CFrame.Angles(math.rad(13),0,0)
	end
end)


Prompt: -- Function to handle the skip action

Response:
local function SkipLoadingScreen()
	-- Calculate the end position for the animation
	local startPos = frame.Position
	local endPos = UDim2.new(startPos.X.Scale, startPos.X.Offset, startPos.Y.Scale - 2, startPos.Y.Offset)

	-- Animate the position of the frame
	local tweenService = game:GetService("TweenService")
	local tweenInfo = TweenInfo.new(FadeTime, Enum.EasingStyle.Linear)
	local tween = tweenService:Create(frame, tweenInfo, { Position = endPos })

	-- Play the animation
	tween:Play()

	-- Hide the frame when the animation completes
	tween.Completed:Connect(function()
		frame.Visible = false
	end)
end


Prompt:
--///////////////////////// Constructors
--//////////////////////////////////////

Response:
function module.new(CommandProcessor, ChatWindow)
	local obj = setmetatable({}, methods)

	obj.GuiObject = nil
	obj.ChatBarParentFrame = nil
	obj.TextBox = nil
	obj.TextLabel = nil
	obj.GuiObjects = {}
	obj.eGuiObjectsChanged = Instance.new("BindableEvent")
	obj.GuiObjectsChanged = obj.eGuiObjectsChanged.Event
	obj.TextBoxConnections = {}
	obj.PreviousText = ""

	obj.InCustomState = false
	obj.CustomState = nil

	obj.TargetChannel = nil
	obj.CommandProcessor = CommandProcessor
	obj.ChatWindow = ChatWindow

	obj.TweenPixelsPerSecond = 500
	obj.TargetYSize = 0

	obj.AnimParams = {}
	obj.CalculatingSizeLock = false

	obj.ChannelNameColors = {}

	obj.UserHasChatOff = false

	obj:InitializeAnimParams()

	ChatSettings.SettingsChanged:connect(function(setting, value)
		if (setting == "ChatBarTextSize") then
			obj:SetTextSize(value)
		end
	end)

	coroutine.wrap(function()
		local success, canLocalUserChat = pcall(function()
			return Chat:CanUserChatAsync(LocalPlayer.UserId)
		end)
		local canChat = success and (RunService:IsStudio() or canLocalUserChat)
		if canChat == false then
			obj.UserHasChatOff = true
			obj:DoLockChatBar()
		end
	end)()

	return obj
end

return module


Prompt: --------------------[ HIT HANDLING FUNCTIONS ]----------------------------------------

Response:
function getBaseDamage(Dist)
	local startDmg = S.damageSettings.Start.Damage
	local startDist = S.damageSettings.Start.Dist
	local endDmg = S.damageSettings.End.Damage
	local endDist = S.damageSettings.End.Dist
	return (
		(
			Dist < startDist * S.bulletSettings.Range
		) and startDmg or
		(
			Dist >= startDist * S.bulletSettings.Range and
			Dist < endDist * S.bulletSettings.Range
		) and numLerp(startDmg, endDmg, Map(Dist / S.bulletSettings.Range, startDist, endDist, 0, 1)) or
		(
			Dist >= endDist * S.bulletSettings.Range
		) and endDmg
	)
end

function Damage(H, P, N, D, Dist, customIgnore)
	local hVal = S.damageSettings.Multipliers.Head
	local cVal = S.damageSettings.Multipliers.Chest
	local lVal = S.damageSettings.Multipliers.Limbs
	local baseDamage = getBaseDamage(Dist)
	if Humanoid.Health ~= 0 then
		local hitHumanoid = nil
		if H.Parent:IsA("Hat") then
			table.insert(customIgnore, H)
			local newRay = Ray.new(P - D * 0.1, D * (S.bulletSettings.Range - Dist + 0.1))
			local newH, newP, newN = workspace:FindPartOnRayWithIgnoreList(newRay, customIgnore)
			if newH then
				hitHumanoid = Damage(newH, newP, newN, D, Dist + (newP - P).magnitude, customIgnore)
			end
		else
			hitHumanoid = findFirstClass(H.Parent, "Humanoid")
			if hitHumanoid and hitHumanoid.Health > 0 and isEnemy(hitHumanoid) then
				local Tag = Instance.new("ObjectValue")
				Tag.Value = Player
				Tag.Name = "creator"
				Tag.Parent = hitHumanoid
				DS:AddItem(Tag, 0.3)
				local chosenDamage = 0
				if H.Name == "Head" then
					chosenDamage = baseDamage  * RAND(hVal, hVal + 0.1, 0.01)
				elseif H.Name == "Torso" then
					chosenDamage = baseDamage  * RAND(cVal, cVal + 0.1, 0.01)
				else
					chosenDamage = baseDamage  * RAND(lVal, lVal + 0.1, 0.01)
				end
				hitHumanoid:TakeDamage(chosenDamage)
				markHit()
			end
		end
		return hitHumanoid
	end
end

function isWallIgnored(Wall)
	return (
		Wall.Transparency >= S.penetrationSettings.transparencyThreshold or
		(S.penetrationSettings.ignoreNonCanCollide and (not Wall.CanCollide)) or
		isIgnored(Wall, S.penetrationSettings.ignoreCustom)
	)
end

function penetrateWall(Wall, hitPos, Direction, Normal, Ignore, totalPDist, totalBDist, lastDamagedHumanoid)
	local wallIgnore = isWallIgnored(Wall)
	local hitHumanoid = (Wall.Parent:IsA("Hat") and findFirstClass(Wall.Parent.Parent, "Humanoid") or findFirstClass(Wall.Parent, "Humanoid"))
	local damagedHumanoid = nil
	if hitHumanoid and hitHumanoid ~= lastDamagedHumanoid then
		lastDamagedHumanoid = hitHumanoid
		damagedHumanoid = Damage(Wall, hitPos, Normal, Direction, totalBDist, {Char, ignoreModel})
	else
		lastDamagedHumanoid = nil
	end
	local ignoreObject = hitHumanoid and (Wall.Parent:IsA("Hat") and Wall.Parent.Parent or Wall.Parent) or Wall
	table.insert(Ignore, ignoreObject)
	local rayLength = S.bulletSettings.Range - totalBDist
	local testRay = Ray.new(hitPos, Direction * (S.bulletSettings.Range - totalBDist))
	local H1, P1, N1 = workspace:FindPartOnRayWithIgnoreList(testRay, Ignore)
	local newIgnore = removeElement(Ignore, ignoreObject)
	local wallRay = Ray.new(P1 + Direction * 0.1, -Direction * (rayLength + 1))
	local H2, P2, N2 = workspace:FindPartOnRayWithIgnoreList(wallRay, Ignore)
	local newPDist = totalPDist + (wallIgnore and 0 or (getNearestPoint(P1, P2, hitPos) - hitPos).magnitude)
	local newBDist = totalBDist + (P1 - hitPos).magnitude
	local outOfRange = Round(newPDist, 0.001) > S.penetrationSettings.Dist or Round(newBDist, 0.001) > S.bulletSettings.Range
	if (not wallIgnore) then
		createBulletImpact:FireServer(Wall, hitPos, Normal, Direction, hitHumanoid, gunIgnore, S)
		if (not hitHumanoid) then
			createShockwave:FireServer(hitPos, S.shockwaveSettings.Radius, gunIgnore, S)
		end
	end
	if hitHumanoid and hitHumanoid.Health > 0 and isEnemy(hitHumanoid) and hitHumanoid == damagedHumanoid then
		createBlood:FireServer(Wall, P2, Direction, gunIgnore, S)
	end
	if outOfRange or (not H1) then
		if (not outOfRange) and (not wallIgnore) then
			createBulletImpact:FireServer(Wall, P2, N2, Direction, hitHumanoid, gunIgnore, S)
			if (not hitHumanoid) then
				createShockwave:FireServer(P2, S.shockwaveSettings.Radius, gunIgnore, S)
			end
		end
		return Wall, hitPos
	else
		if Wall == H2 and (not wallIgnore) then
			createBulletImpact:FireServer(Wall, P2, N2, Direction, hitHumanoid, gunIgnore, S)
			if (not hitHumanoid) then
				createShockwave:FireServer(P2, S.shockwaveSettings.Radius, gunIgnore, S)
			end
		end
		return penetrateWall(H1, P1, Direction, N1, Ignore, newPDist, newBDist, lastDamagedHumanoid)
	end
end

function PenetrateWall(HitPos, Direction, HitHumanoid, OriginPos, Bullet, CurrentPDist)
	local HitDist = (HitPos - OriginPos).magnitude
	local Wall, WallHitPos = nil, nil
	local Hum, HumHitPos = nil, nil
	local CustomIgnore = {unpack(Ignore)}
	for i = 1, 10 do
		local WallRay = Ray.new(HitPos - (Direction * 0.1), Direction * S.Penetration)
		local H, P = game.Workspace:FindPartOnRayWithIgnoreList(WallRay, CustomIgnore)
		if H then
			local HitHumanoid = nil
			if H.Parent.ClassName == "Hat" then
				HitHumanoid = findFirstClass(H.Parent.Parent, "Humanoid")
			else
				HitHumanoid = findFirstClass(H.Parent, "Humanoid")
			end
			if HitHumanoid and i ~= 1 then
				Hum, HumHitPos = H, P
				break
			else
				Wall, WallHitPos = H, P
				table.insert(CustomIgnore, H)
			end
		else
			break
		end
	end
	if Wall then
		if S.InstantHit then
			if Hum then
				Damage(Hum.Parent:FindFirstChild("Head"), HumHitPos)
				return HumHitPos
			else
				local HitObj2, HitPos2 = nil, nil
				if HitHumanoid then
					HitObj2, HitPos2 = AdvRayCast(WallHitPos, Direction, S.BulletRange - HitDist, {Wall, HitHumanoid.Parent, unpack(Ignore)})
				else
					HitObj2, HitPos2 = AdvRayCast(WallHitPos, Direction, S.BulletRange - HitDist, {Wall, unpack(Ignore)})
				end
				Damage(HitObj2, HitPos2)

				local NewPDist = CurrentPDist + (WallHitPos - HitPos).magnitude
				local NewHitPos2 = HitPos2
				if NewPDist < S.Penetration and HitObj2 then
					NewHitPos2 = PenetrateWall(HitPos2, Direction, HitHumanoid, OriginPos, Bullet, CurrentPDist + NewPDist)
				end
				return NewHitPos2
			end
		else
			local LastPos = WallHitPos
			local TotalDistTraveled = 0
			spawn(function()
				if Hum then
					Damage(Hum.Parent:FindFirstChild("Head"), HumHitPos)
					return HumHitPos
				else
					while true do
						RS.RenderStepped:wait()
						if TotalDistTraveled >= S.BulletRange - HitDist then
							Bullet:Destroy()
							break
						end
						local DistTraveled = (Bullet.Position - LastPos).magnitude
						local NewDirection = (Bullet.Position - LastPos).unit
						local TempHitObj, TempHitPos = nil, nil
						if HitHumanoid then
							TempHitObj, TempHitPos = AdvRayCast(LastPos, NewDirection, DistTraveled, {Wall, HitHumanoid.Parent, unpack(Ignore)})
						else
							TempHitObj, TempHitPos = AdvRayCast(LastPos, NewDirection, DistTraveled, {Wall, unpack(Ignore)})
						end
						if TempHitObj then
							Damage(TempHitObj, TempHitPos)

							local NewPDist = CurrentPDist + (WallHitPos - HitPos).magnitude
							local NewTempPos = TempHitPos
							if NewPDist < S.Penetration and TempHitObj then
								NewTempPos = PenetrateWall(TempHitPos, Direction, HitHumanoid, OriginPos, Bullet, CurrentPDist + NewPDist)
							else
								Bullet:Destroy()
							end
							return NewTempPos
						else
							LastPos = Bullet.Position
							TotalDistTraveled = TotalDistTraveled + DistTraveled
						end
					end
				end
			end)
		end
	else
		if Bullet then Bullet:Destroy() end
		return HitPos
	end
end

function isEnemy(Human)
	local Plyr = game.Players:GetPlayerFromCharacter(Human.Parent)
	if (not Plyr) then return S.CanDamageNPCs end
	return S.AllowFriendlyFire or (Plyr.TeamColor ~= Player.TeamColor or Plyr.Neutral)
end


Prompt: --------|     Library     |--------

Response: local _L; coroutine.wrap(function()  _L = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"))  end)()


Response:
if(vParts.Values.On.Value== false) then
PS.EngineOff:TweenPosition(UDim2.new(1.70000005, 100, -1, 0),"Out","Quad",1,true)
elseif(vParts.Values.On.Value == true) then
PS.EngineOff:TweenPosition(UDim2.new(1.70000005, 100, -2, 0),"Out","Quad",1,true)
end


Prompt: --Precalculated paths

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


Prompt: --Creates a display Gui for the soft shutdown.

Response:
return function()
	local ScreenGui = Instance.new("ScreenGui")
	ScreenGui.Name = "SoftShutdownGui"
	ScreenGui.DisplayOrder = 100

	--Create background to cover behind top bar.
	local Frame = Instance.new("Frame")
	Frame.BackgroundColor3 = Color3.fromRGB(66, 66, 67)
	Frame.Position = UDim2.new(-0.5,0,-0.5,0)
	Frame.Size = UDim2.new(2,0,2,0)
	Frame.ZIndex = 10
	Frame.Parent = ScreenGui

	local function CreateTextLabel(Size,Position,Text)
		local TextLabel = Instance.new("TextLabel")
		TextLabel.BackgroundTransparency = 1
		TextLabel.Size = Size
		TextLabel.Position = Position
		TextLabel.Text = Text
		TextLabel.ZIndex = 10
		TextLabel.Font = "Code"
		TextLabel.TextScaled = true
		TextLabel.TextColor3 = Color3.new(1,1,1)
		TextLabel.TextStrokeColor3 = Color3.new(0,0,0)
		TextLabel.TextStrokeTransparency = 0
		TextLabel.Parent = Frame
	end

	--Create text.
	CreateTextLabel(UDim2.new(0.5,0,0.1,0),UDim2.new(0.25,0,0.4,0),"Hey,")
	CreateTextLabel(UDim2.new(0.5,0,0.05,0),UDim2.new(0.25,0,0.475,0),"Servers are being updated")
	CreateTextLabel(UDim2.new(0.5,0,0.03,0),UDim2.new(0.25,0,0.55,0),"Please wait")

	--Return the ScreenGui and the background.
	return ScreenGui,Frame
end


Prompt:
--1 = white
--208 = Light stone grey
--194 = Medium stone grey
--199 = Dark stone grey
--26 = Black
--21 = Bright red
--24 = Bright yellow
--226 = Cool yellow
--23 = Bright blue
--107 = Bright bluish green
--102 = Medium blue
--11 = Pastel blue
--45 = Light blue
--135 = Sand blue
--106 = Bright orange
--105 = Br. yellowish orange
--141 = Earth green
--28 = Dark green
--37 = Bright green
--119 = Br. yellowish green
--29 = Medium green
--151 = Sand green
--38 = Dark orange
--192 = Reddish brown
--104 = Bright violet
--9 = Light reddish violet
--101 = Medium red
--5 = Brick Yellow
--153 = Sand red
--217 = Brown
--18 = Nougat
--125 = Light orange


Prompt: -- Tell the ActiveCast factory module what FastCast actually *is*.

Response: ActiveCastStatic.SetStaticFastCastReference(FastCast)


Prompt: --Main Control------------------------------------------------------------------------

Response:
Red = script.Parent.Red.Lamp
Yellow = script.Parent.Yellow.Lamp
Green = script.Parent.Green.Lamp
DRed = script.Parent.Red.DynamicLight
DYellow = script.Parent.Yellow.DynamicLight
DGreen = script.Parent.Green.DynamicLight
function Active()
	if Signal.Value == 0 then
		Green.Enabled = false
		Yellow.Enabled = false
		Red.Enabled = false
		DGreen.Enabled = false
		DYellow.Enabled = false
		DRed.Enabled = false
	elseif Signal.Value == 1 then
		Green.Enabled = true
		Yellow.Enabled = false
		Red.Enabled = false
		DGreen.Enabled = true
		DYellow.Enabled = false
		DRed.Enabled = false
	elseif Signal.Value == 2 then
		Green.Enabled = false
		Yellow.Enabled = true
		Red.Enabled = false
		DGreen.Enabled = false
		DYellow.Enabled = true
		DRed.Enabled = false
	elseif Signal.Value == 3 then
		Green.Enabled = false
		Yellow.Enabled = false
		Red.Enabled = true
		DGreen.Enabled = false
		DYellow.Enabled = false
		DRed.Enabled = true
	end
end
Signal.Changed:connect(Active)


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

Response:
local l__Parent__1 = script.Parent;
local v2 = TweenInfo.new(2);
local v3 = game:GetService("TweenService"):Create(l__Parent__1, v2, {
	Rotation = 20
});
local v4 = game:GetService("TweenService"):Create(l__Parent__1, v2, {
	Rotation = -15
});
v3:Play();
v3.Completed:Connect(function()
	v4:Play();
end);
v4.Completed:Connect(function()
	v3:Play();
end);


Prompt: -- Libraries

Response: local ListenForManualWindowTrigger = require(Tool.Core:WaitForChild('ListenForManualWindowTrigger'))


Prompt:
--!strict
-- upstream: https://github.com/facebook/react/blob/376d5c1b5aa17724c5fea9412f8fcde14a7b23f1/packages/react/src/ReactCurrentDispatcher.js
--[[*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
]]


Prompt:
--[[
	Called when the original table is changed.

	This will firstly find any keys meeting any of the following criteria:

	- they were not previously present
	- their associated value has changed
	- a dependency used during generation of this value has changed

	It will recalculate those key/value pairs, storing information about any
	dependencies used in the processor callback during value generation, and
	save the new key/value pair to the output array. If it is overwriting an
	older key/value pair, that older pair will be passed to the destructor
	for cleanup.

	Finally, this function will find keys that are no longer present, and remove
	their key/value pairs from the output table and pass them to the destructor.
]]

Response:
function class:update(): boolean
	local inputIsState = self._inputIsState
	local newInputTable = if inputIsState then self._inputTable:get(false) else self._inputTable
	local oldInputTable = self._oldInputTable

	local keyIOMap = self._keyIOMap
	local meta = self._meta

	local didChange = false

	-- clean out main dependency set
	for dependency in self.dependencySet do
		dependency.dependentSet[self] = nil
	end

	self._oldDependencySet, self.dependencySet = self.dependencySet, self._oldDependencySet
	table.clear(self.dependencySet)

	-- if the input table is a state object, add it as a dependency
	if inputIsState then
		self._inputTable.dependentSet[self] = true
		self.dependencySet[self._inputTable] = true
	end

	-- clean out output table
	self._oldOutputTable, self._outputTable = self._outputTable, self._oldOutputTable

	local oldOutputTable = self._oldOutputTable
	local newOutputTable = self._outputTable
	table.clear(newOutputTable)

	-- Step 1: find key/value pairs that changed or were not previously present

	for newInKey, newInValue in pairs(newInputTable) do
		-- get or create key data
		local keyData = self._keyData[newInKey]

		if keyData == nil then
			keyData = {
				dependencySet = setmetatable({}, utility.WEAK_KEYS_METATABLE),
				oldDependencySet = setmetatable({}, utility.WEAK_KEYS_METATABLE),
				dependencyValues = setmetatable({}, utility.WEAK_KEYS_METATABLE),
			}
			self._keyData[newInKey] = keyData
		end

		-- check if the pair is new or changed
		local shouldRecalculate = oldInputTable[newInKey] ~= newInValue

		-- check if the pair's dependencies have changed
		if shouldRecalculate == false then
			for dependency, oldValue in pairs(keyData.dependencyValues) do
				if oldValue ~= dependency:get(false) then
					shouldRecalculate = true
					break
				end
			end
		end

		-- recalculate the output pair if necessary
		if shouldRecalculate then
			keyData.oldDependencySet, keyData.dependencySet = keyData.dependencySet, keyData.oldDependencySet
			table.clear(keyData.dependencySet)

			local processOK, newOutKey, newOutValue, newMetaValue = Dependencies.captureDependencies(
				keyData.dependencySet,
				self._processor,
				newInKey,
				newInValue
			)

			if processOK then
				if self._destructor == nil and (utility.needsDestruction(newOutKey) or utility.needsDestruction(newOutValue) or utility.needsDestruction(newMetaValue)) then
					warn("destructorNeededForPairs")
				end

				-- if this key was already written to on this run-through, throw a fatal error.
				if newOutputTable[newOutKey] ~= nil then
					-- figure out which key/value pair previously wrote to this key
					local previousNewKey, previousNewValue
					for inKey, outKey in pairs(keyIOMap) do
						if outKey == newOutKey then
							previousNewValue = newInputTable[inKey]
							if previousNewValue ~= nil then
								previousNewKey = inKey
								break
							end
						end
					end

					if previousNewKey ~= nil then
						utility.parseError(
							"forPairsKeyCollision",
						--	nil,
							tostring(newOutKey),
							tostring(previousNewKey),
							tostring(previousNewValue),
							tostring(newInKey),
							tostring(newInValue)
						)
					end
				end

				local oldOutValue = oldOutputTable[newOutKey]

				if oldOutValue ~= newOutValue then
					local oldMetaValue = meta[newOutKey]
					if oldOutValue ~= nil then
						local destructOK, err = xpcall(self._destructor or utility.cleanup, utility.parseError, newOutKey, oldOutValue, oldMetaValue)
						if not destructOK then
							warn("forPairsDestructorError", err)
						end
					end

					oldOutputTable[newOutKey] = nil
				end

				-- update the stored data for this key/value pair
				oldInputTable[newInKey] = newInValue
				keyIOMap[newInKey] = newOutKey
				meta[newOutKey] = newMetaValue
				newOutputTable[newOutKey] = newOutValue

				-- if we had to recalculate the output, then we did change
				didChange = true
			else
				-- restore old dependencies, because the new dependencies may be corrupt
				keyData.oldDependencySet, keyData.dependencySet = keyData.dependencySet, keyData.oldDependencySet

				warn("forPairsProcessorError", newOutKey)
			end
		else
			local storedOutKey = keyIOMap[newInKey]

			-- check for key collision
			if newOutputTable[storedOutKey] ~= nil then
				-- figure out which key/value pair previously wrote to this key
				local previousNewKey, previousNewValue
				for inKey, outKey in pairs(keyIOMap) do
					if storedOutKey == outKey then
						previousNewValue = newInputTable[inKey]

						if previousNewValue ~= nil then
							previousNewKey = inKey
							break
						end
					end
				end

				if previousNewKey ~= nil then
					utility.parseError(
						"forPairsKeyCollision",
					--	nil,
						tostring(storedOutKey),
						tostring(previousNewKey),
						tostring(previousNewValue),
						tostring(newInKey),
						tostring(newInValue)
					)
				end
			end

			-- copy the stored key/value pair into the new output table
			newOutputTable[storedOutKey] = oldOutputTable[storedOutKey]
		end

		-- save dependency values and add to main dependency set
		for dependency in pairs(keyData.dependencySet) do
			keyData.dependencyValues[dependency] = dependency:get(false)

			self.dependencySet[dependency] = true
			dependency.dependentSet[self] = true
		end
	end

	-- STEP 2: find keys that were removed
	for oldOutKey, oldOutValue in pairs(oldOutputTable) do
		-- check if this key/value pair is in the new output table
		if newOutputTable[oldOutKey] ~= oldOutValue then
			-- clean up the old output pair
			local oldMetaValue = meta[oldOutKey]
			if oldOutValue ~= nil then
				local destructOK, err = xpcall(self._destructor or utility.cleanup, utility.parseError, oldOutKey, oldOutValue, oldMetaValue)
				if not destructOK then
					warn("forPairsDestructorError", err)
				end
			end

			-- check if the key was completely removed from the output table
			if newOutputTable[oldOutKey] == nil then
				meta[oldOutKey] = nil
				self._keyData[oldOutKey] = nil
			end

			didChange = true
		end
	end

	for key in pairs(oldInputTable) do
		if newInputTable[key] == nil then
			oldInputTable[key] = nil
			keyIOMap[key] = nil
		end
	end

	return didChange
end

local function ForPairs<KI, VI, KO, VO, M>(
	inputTable,
	processor: (KI, VI) -> (KO, VO, M?),
	destructor: (KO, VO, M?) -> ()?
)

	local inputIsState = inputTable.type == "State" and typeof(inputTable.get) == "function"

	local self = setmetatable({
		type = "State",
		kind = "ForPairs",
		dependencySet = {},
		-- if we held strong references to the dependents, then they wouldn't be
		-- able to get garbage collected when they fall out of scope
		dependentSet = setmetatable({}, utility.WEAK_KEYS_METATABLE),
		_oldDependencySet = {},

		_processor = processor,
		_destructor = destructor,
		_inputIsState = inputIsState,

		_inputTable = inputTable,
		_oldInputTable = {},
		_outputTable = {},
		_oldOutputTable = {},
		_keyIOMap = {},
		_keyData = {},
		_meta = {},
	}, CLASS_METATABLE)

	self:update()

	return self
end

return ForPairs


Prompt: --okay, for some dumb reason we made duplicate purchasing functions... go to ItemBuyScript

Response:
game.ServerStorage.RemoteFunctions.GetObjectFromID.OnInvoke = function(id)
	for _,v in pairs(game.ReplicatedStorage.Objects:GetChildren()) do
		if v.ItemID.Value == id then
			return v
		end
	end
end

game.ServerStorage.RemoteFunctions.ChangeCash.Event:connect(function(plr,amt)
	local data = game.ReplicatedStorage.PlayerData:FindFirstChild(plr.userId)
	if data then
		data.cash.Value = data.cash.Value + amt
	end
end)


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

Response:
local v1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
while not v1.Loaded do
	game:GetService("RunService").Heartbeat:Wait();
end;
local u1 = {};
local u2 = {};
local u3 = Random.new();
local u4 = nil;
function Shuffle()
	local v2 = v1.Functions.CloneTable(u1);

		for v3, v4 in ipairs(u2) do
		if v3 then

		else
			break;
		end;

			for v6, v7 in ipairs(v2) do
			if v6 then

			else
				break;
			end;
			if v7 == v4 then
				table.remove(v2, v6);
				break;
			end;
		end;
	end;
	local v9 = v2[u3:NextInteger(1, #v2)];
	if not v9 then
		return;
	end;
	u4 = v1.Sound.PlayMusic(v9, 0.5, 4, nil, false);
	if 4 <= #u2 then
		table.remove(u2, 1);
	end;
	table.insert(u2, v9);
end;
function Clear()
	v1.Sound.StopMusic(1);
	u4 = nil;
	u2 = {};
end;
local u5 = nil;
function Set(p1)
	local v10 = v1.Directory.Worlds[p1];
	u1 = v10.music;
	Clear();
	if u5 then
		v1.Functions.Tween(u5, { 2 }, {
			Volume = 0
		}).Completed:Connect(function()
			u5:Stop();
			u5:Destroy();
		end);
	end;
	local l__ambience__11 = v10.ambience;
	if l__ambience__11 then
		if l__ambience__11 ~= 0 then
			u5 = v1.Sound.Play(l__ambience__11, script, 1, 0.3, nil, nil, true);
		end;
	end;
end;
v1.Signal.Fired("World Changed"):Connect(function(p2)
	Set(p2);
end);
task.defer(function()
	while true do
		if v1.Settings.MusicEnabled and #u1 > 0 then
			if not u4 or u4.TimeLength - 0.5 <= u4.TimePosition and u4.IsLoaded then
				Shuffle();
			end;
		elseif not v1.Settings.MusicEnabled and u4 then
			Clear();
		end;
		v1.Heartbeat(5);
	end;
end);


Prompt:
--------------------------------------------------------------------------------------
--------------------[ TOOL SELECTION AND DESELECTION ]--------------------------------
--------------------------------------------------------------------------------------

Response:
function OnEquipped(M_Icon)
	wait(math.random(10, 40) / 100)
	if Humanoid.Health ~= 0 and (not Selected) and Gun.Parent == Character then
		Selected = true

		BreakReload = false

		--------------------[ FAILSAFE RESETING ]-------------------------------------

		for _, GM in pairs(Ignore_Model:GetChildren()) do
			if GM.Name == "Gun_Ignore_"..Player.Name then
				GM:Destroy()
			end
		end

		for _,c in pairs(Connections) do
			c:disconnect()
		end

		Connections = {}

		--------------------[ CREATING IGNORE MODELS ]--------------------------------

		Gun_Ignore = Instance.new("Model")
		Gun_Ignore.Name = "Gun_Ignore_"..Player.Name
		Gun_Ignore.Parent = Ignore_Model

		--------------------[ MODIFYING THE PLAYER ]----------------------------------

		M_Icon.Icon = "rbxasset://textures\\Blank.png"

		Gui_Clone = Main_Gui:Clone()
		Gui_Clone.Parent = Player.PlayerGui

		SetUpGui()

		Shoulders.Right.Part1 = nil
		Shoulders.Left.Part1 = nil

		PrevNeckCF.C0 = Neck.C0
		PrevNeckCF.C1 = Neck.C1

		BG = Instance.new("BodyGyro", HRP)
		BG.maxTorque = VEC3(HUGE, HUGE, HUGE)
		BG.Name = "BG"
		BG.P = 1e5
		BG.cframe = CF(Torso.CFrame.p, Torso.CFrame.p + Torso.CFrame.lookVector)

		local PlayerFolder = Instance.new("Model")
		PlayerFolder.Name = "PlayerFolder"
		PlayerFolder.Parent = Gun_Ignore

		local AnimBase = Instance.new("Part")
		AnimBase.Transparency = 1
		AnimBase.Name = "AnimBase"
		AnimBase.CanCollide = false
		AnimBase.FormFactor = Enum.FormFactor.Custom
		AnimBase.Size = VEC3(0.2, 0.2, 0.2)
		AnimBase.BottomSurface = Enum.SurfaceType.Smooth
		AnimBase.TopSurface = Enum.SurfaceType.Smooth
		AnimBase.Parent = PlayerFolder

		AnimWeld = Instance.new("Weld")
		AnimWeld.Part0 = AnimBase
		AnimWeld.Part1 = Head
		AnimWeld.C0 = CF(0, 1, 0)
		AnimWeld.Parent = AnimBase

		local ArmBase = Instance.new("Part")
		ArmBase.Transparency = 1
		ArmBase.Name = "ArmBase"
		ArmBase.CanCollide = false
		ArmBase.FormFactor = Enum.FormFactor.Custom
		ArmBase.Size = VEC3(0.2, 0.2, 0.2)
		ArmBase.BottomSurface = Enum.SurfaceType.Smooth
		ArmBase.TopSurface = Enum.SurfaceType.Smooth
		ArmBase.Parent = PlayerFolder

		ABWeld = Instance.new("Weld")
		ABWeld.Part0 = ArmBase
		ABWeld.Part1 = AnimBase
		ABWeld.Parent = ArmBase

		local LArmBase = Instance.new("Part")
		LArmBase.Transparency = 1
		LArmBase.Name = "LArmBase"
		LArmBase.CanCollide = false
		LArmBase.FormFactor = Enum.FormFactor.Custom
		LArmBase.Size = VEC3(0.2, 0.2, 0.2)
		LArmBase.BottomSurface = Enum.SurfaceType.Smooth
		LArmBase.TopSurface = Enum.SurfaceType.Smooth
		LArmBase.Parent = PlayerFolder

		local RArmBase = Instance.new("Part")
		RArmBase.Transparency = 1
		RArmBase.Name = "RArmBase"
		RArmBase.CanCollide = false
		RArmBase.FormFactor = Enum.FormFactor.Custom
		RArmBase.Size = VEC3(0.2, 0.2, 0.2)
		RArmBase.BottomSurface = Enum.SurfaceType.Smooth
		RArmBase.TopSurface = Enum.SurfaceType.Smooth
		RArmBase.Parent = PlayerFolder

		LWeld = Instance.new("Weld")
		LWeld.Name = "LWeld"
		LWeld.Part0 = ArmBase
		LWeld.Part1 = LArmBase
		LWeld.C0 = ArmC0[1]
		LWeld.C1 = S.ArmC1_UnAimed.Left
		LWeld.Parent = ArmBase

		RWeld = Instance.new("Weld")
		RWeld.Name = "RWeld"
		RWeld.Part0 = ArmBase
		RWeld.Part1 = RArmBase
		RWeld.C0 = ArmC0[2]
		RWeld.C1 = S.ArmC1_UnAimed.Right
		RWeld.Parent = ArmBase

		LWeld2 = Instance.new("Weld")
		LWeld2.Name = "LWeld"
		LWeld2.Part0 = LArmBase
		LWeld2.Part1 = LArm
		LWeld2.Parent = LArmBase

		RWeld2 = Instance.new("Weld")
		RWeld2.Name = "RWeld"
		RWeld2.Part0 = RArmBase
		RWeld2.Part1 = RArm
		RWeld2.Parent = RArmBase

		if S.PlayerArms then
			FakeLArm = LArm:Clone()
			FakeLArm.Parent = PlayerFolder
			FakeLArm.Transparency = S.FakeArmTransparency
			FakeLArm:BreakJoints()

			LArm.Transparency = 1

			local FakeLWeld = Instance.new("Weld")
			FakeLWeld.Part0 = FakeLArm
			FakeLWeld.Part1 = LArm
			FakeLWeld.Parent = FakeLArm

			FakeRArm = RArm:Clone()
			FakeRArm.Parent = PlayerFolder
			FakeRArm.Transparency = S.FakeArmTransparency
			FakeRArm:BreakJoints()

			RArm.Transparency = 1

			local FakeRWeld = Instance.new("Weld")
			FakeRWeld.Part0 = FakeRArm
			FakeRWeld.Part1 = RArm
			FakeRWeld.Parent = FakeRArm

			Instance.new("Humanoid", PlayerFolder)

			for _,Obj in pairs(Character:GetChildren()) do
				if Obj:IsA("CharacterMesh") or Obj:IsA("Shirt") then
					Obj:Clone().Parent = PlayerFolder
				end
			end
		else
			local ArmTable = CreateArms()
			ArmTable[1].Model.Parent = PlayerFolder
			ArmTable[2].Model.Parent = PlayerFolder

			FakeLArm = ArmTable[1].ArmPart

			LArm.Transparency = 1

			local FakeLWeld = Instance.new("Weld")
			FakeLWeld.Part0 = FakeLArm
			FakeLWeld.Part1 = LArm
			FakeLWeld.Parent = FakeLArm

			FakeRArm = ArmTable[2].ArmPart

			RArm.Transparency = 1

			local FakeRWeld = Instance.new("Weld")
			FakeRWeld.Part0 = FakeRArm
			FakeRWeld.Part1 = RArm
			FakeRWeld.Parent = FakeRArm
		end

		--------------------[ MODIFYING THE GUN ]-------------------------------------

		for _, Tab in pairs(Parts) do
			local Weld = Instance.new("Weld")
			Weld.Name = "MainWeld"
			Weld.Part0 = Handle
			Weld.Part1 = Tab.Obj
			Weld.C0 = Tab.Obj.WeldCF.Value
			Weld.Parent = Handle
			Tab.Weld = Weld
		end

		Grip = RArm:WaitForChild("RightGrip")

		local HandleCF = ArmBase.CFrame * ArmC0[2] * S.ArmC1_Aimed.Right:inverse() * CF(0, -1, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
		local HandleOffset = AimPart.CFrame:toObjectSpace(Handle.CFrame)
		Aimed_GripCF = (Head.CFrame * HandleOffset):toObjectSpace(HandleCF)

		--------------------[ CONNECTIONS ]-------------------------------------------

		INSERT(Connections, Humanoid.Died:connect(function()
			OnUnequipped(true)
		end))

		INSERT(Connections, M2.Button1Down:connect(function()
			MB1_Down = true
			if S.GunType.Auto and (not S.GunType.Semi) and (not S.GunType.Burst) then
				if (not CanFire) then return end
				CanFire = false
				if (not Running) and (not Knifing) and (not ThrowingGrenade) then
					CurrentSpread = (
						Aimed and S.Spread.Aimed or
						((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
					)
					while MB1_Down and (not Reloading) do
						if Knifing and (not ThrowingGrenade) then break end
						if Running then break end
						if Ammo.Value > 0 then
							Ammo.Value = Ammo.Value - 1
							if Humanoid.Health ~= 0 then
								if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
									Run_Key_Pressed = false
									CurrentSteadyTime = 0
								end
								Fire_Gun()
							end
						end
						if Ammo.Value == 0 and S.AutoReload then
							wait(0.2)
							Reload()
						end
						wait(60 / S.FireRate)
					end
				end
				CanFire = true
			elseif (not S.GunType.Auto) and S.GunType.Burst then
				if (not CanFire) then return end
				CanFire = false
				if (not Running) and (not Knifing) and (not ThrowingGrenade) then
					CurrentSpread = (
						Aimed and S.Spread.Aimed or
						((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
					)
					for i = 1, S.BurstAmount do
						if Ammo.Value > 0 then
							Ammo.Value = Ammo.Value - 1
							if Humanoid.Health ~= 0 then
								if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
									Run_Key_Pressed = false
									CurrentSteadyTime = 0
								end
								Fire_Gun()
							end
						end
						if Ammo.Value == 0 and S.AutoReload then
							wait(0.2)
							Reload()
							break
						end
						wait(S.BurstTime / S.BurstAmount)
					end
				end
				wait(S.BurstWait)
				CanFire = true
			elseif (not S.GunType.Auto) and S.GunType.Semi then
				if (not CanFire) then return end
				CanFire = false
				if (not Running) and (not Knifing) and (not ThrowingGrenade) then
					CurrentSpread = (
						Aimed and S.Spread.Aimed or
						((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
					)
					if Ammo.Value > 0 then
						Ammo.Value = Ammo.Value - 1
						if Humanoid.Health ~= 0 then
							if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
								Run_Key_Pressed = false
								CurrentSteadyTime = 0
							end
							Fire_Gun()
						end
					end
					if Ammo.Value == 0 and S.AutoReload then
						wait(0.2)
						Reload()
					end
					wait(60 / S.FireRate)
				end
				CanFire = true
			elseif (not S.GunType.Auto) and (not S.GunType.Semi) and (not S.GunType.Burst) and S.GunType.Shot then
				if (not CanFire) then return end
				CanFire = false
				if (not Running) and (not Knifing) and (not ThrowingGrenade) then
					CurrentSpread = (
						Aimed and S.Spread.Aimed or
						((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
					)
					if Ammo.Value > 0 then
						Ammo.Value = Ammo.Value - 1
						if Humanoid.Health ~= 0 then
							if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
								Run_Key_Pressed = false
								CurrentSteadyTime = 0
							end
							Fire_Gun()
						end
					end
					if Ammo.Value == 0 and S.AutoReload then
						wait(0.2)
						Reload()
					end
					wait(60 / S.FireRate)
				end
				CanFire = true
			elseif (not S.GunType.Auto) and (not S.GunType.Semi) and S.GunType.Burst and (not S.GunType.Shot) then
				if (not CanFire) then return end
				CanFire = false
				if (not Running) and (not Knifing) and (not ThrowingGrenade) then
					CurrentSpread = (
						Aimed and S.Spread.Aimed or
						((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
					)
					for i = 1, S.BurstAmount do
						if Ammo.Value > 0 then
							Ammo.Value = Ammo.Value - 1
							if Humanoid.Health ~= 0 then
								if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
									Run_Key_Pressed = false
									CurrentSteadyTime = 0
								end
								Fire_Gun()
							end
						end
						if Ammo.Value == 0 and S.AutoReload then
							wait(0.2)
							Reload()
							break
						end
						wait(S.BurstTime / S.BurstAmount)
					end
				end
				wait(S.BurstWait)
				CanFire = true
			elseif (not S.GunType.Auto) and (not S.GunType.Burst) and (not S.GunType.Shot) and S.GunType.Explosive then
				if (not CanFire) then return end
				CanFire = false
				if (not Running) and (not Knifing) and (not ThrowingGrenade) then
					CurrentSpread = (
						Aimed and S.Spread.Aimed or
						((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
					)
					if Ammo.Value > 0 then
						Ammo.Value = Ammo.Value - 1
						if Humanoid.Health ~= 0 then
							if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
								Run_Key_Pressed = false
								CurrentSteadyTime = 0
							end
							Fire_Gun()
						end
					end
					if Ammo.Value == 0 and S.AutoReload then
						wait(0.2)
						Reload()
					end
					wait(60 / S.FireRate)
				end
				CanFire = true
			end
		end))

		INSERT(Connections, M2.Button1Up:connect(function()
			MB1_Down = false
			CurrentSpread = (
				Aimed and S.Spread.Aimed or
				((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
			)
		end))

		INSERT(Connections, M2.Button2Down:connect(function()
			if S.HoldMouseOrKeyToADS then
				if (not AimingIn) and (not Aimed) then
					AimingIn = true
					AimGun()
					AimingIn = false
				end
			else
				if Aimed then
					UnAimGun()
				else
					AimGun()
				end
			end
		end))

		INSERT(Connections, M2.Button2Up:connect(function()
			if S.HoldMouseOrKeyToADS then
				if (not AimingOut) and Aimed then
					AimingOut = true
					UnAimGun()
					AimingOut = false
				end
			end
		end))

		INSERT(Connections, M2.KeyDown:connect(KeyDown))

		INSERT(Connections, M2.KeyUp:connect(KeyUp))

		INSERT(Connections, RS:connect(function()
			local CrossHair = Gui_Clone:WaitForChild("CrossHair")
			local HitMarker = Gui_Clone:WaitForChild("HitMarker")
			local HUD = Gui_Clone:WaitForChild("HUD")

			CrossHair.Position = UDim2.new(0, M2.X, 0, M2.Y)
			HitMarker.Position = UDim2.new(0, M2.X - 13, 0, M2.Y - 13)

			local Clip_Ammo_L = HUD:WaitForChild("Ammo"):WaitForChild("Clip")
			local Stored_Ammo_L = HUD:WaitForChild("Ammo"):WaitForChild("Stored")
			Clip_Ammo_L.Text = Ammo.Value
			Clip_Ammo_L.TextColor3 = (Ammo.Value <= (ClipSize.Value / 3) and Color3.new(1, 0, 0) or Color3.new(1, 1, 1))
			Stored_Ammo_L.Text = StoredAmmo.Value
			Stored_Ammo_L.TextColor3 = (StoredAmmo.Value <= (ClipSize.Value * 2) and Color3.new(1, 0, 0) or Color3.new(1, 1, 1))

			local Lethal_Grenade_Num_L = HUD:WaitForChild("Grenades"):WaitForChild("Lethals"):WaitForChild("Num")
			Lethal_Grenade_Num_L.Text = LethalGrenades.Value
			Lethal_Grenade_Num_L.TextColor3 = (LethalGrenades.Value < 3 and Color3.new(1, 0, 0) or Color3.new(1, 1, 1))

			local Tactical_Grenade_Num_L = HUD:WaitForChild("Grenades"):WaitForChild("Tacticals"):WaitForChild("Num")
			Tactical_Grenade_Num_L.Text = TacticalGrenades.Value
			Tactical_Grenade_Num_L.TextColor3 = (TacticalGrenades.Value < 3 and Color3.new(1, 0, 0) or Color3.new(1, 1, 1))

			local Mode = HUD:WaitForChild("Mode"):WaitForChild("Main")
			if S.GunType.Auto
			and (not S.GunType.Semi)
			and (not S.GunType.Burst)
			and (not S.GunType.Explosive) then

				Mode.Text = "Auto"

			elseif (not S.GunType.Auto)
			and S.GunType.Burst
			and (not S.GunType.Explosive) then

				Mode.Text = "Burst"

			elseif (not S.GunType.Auto)
			and S.GunType.Semi
			and (not S.GunType.Explosive) then

				Mode.Text = "Semi"

			elseif (not S.GunType.Auto)
			and (not S.GunType.Semi)
			and (not S.GunType.Burst)
			and S.GunType.Shot
			and (not S.GunType.Explosive) then

				Mode.Text = "Shotgun"

			elseif (not S.GunType.Auto)
			and (not S.GunType.Semi)
			and S.GunType.Burst
			and (not S.GunType.Shot)
			and (not S.GunType.Explosive) then

				Mode.Text = "Burst"

			elseif S.GunType.Explosive then

				Mode.Text = "Explosive"

			end

			if tick() - LastBeat > (Humanoid.Health / 75) then
				LastBeat = tick()
				HUD.Health.Tray.Beat:TweenPosition(
					UDim2.new(0, -21, 0, 0),
					Enum.EasingDirection.Out,
					Enum.EasingStyle.Linear,
					0.7 - ((100 - Humanoid.Health) / 400),
					false,
					function()
						HUD.Health.Tray.Beat.Position = UDim2.new(1, 0, 0, 0)
					end
				)
			end

			HUD.Health.Num.Text = CEIL(Humanoid.Health).."%"
			HUD.Health.Num.TextColor3 = (
				(Humanoid.Health > 200 / 3) and Color3.new(1, 1, 1) or
				(Humanoid.Health <= 200 / 3 and Humanoid.Health > 100 / 3) and Color3.new(1, 1, 0) or
				(Humanoid.Health <= 100 / 3) and Color3.new(1, 0, 0)
			)
		end))

		INSERT(Connections, RS:connect(function()
			local MDir = M2.UnitRay.Direction.unit

			local HRPCF = HRP.CFrame * CF(0, 1.5, 0) * CF(Humanoid.CameraOffset)
			Neck.C0 = Torso.CFrame:toObjectSpace(HRPCF)

			if MDir.y == MDir.y then
				HeadRot = -math.asin(MDir.y)
				Neck.C1 = CFANG(HeadRot,0,0)

				local RotTarget = VEC3(MDir.x,0,MDir.z)
				local Rotation = CF(Torso.Position,Torso.Position + RotTarget)
				BG.cframe = Rotation

				local MouseX = FLOOR((M2.X - M2.ViewSizeX / 2) + 0.5)
				local MouseY = FLOOR((M2.Y - M2.ViewSizeY / 2) + 0.5)
				local AppliedMaxTorque = nil
				if (Camera.CoordinateFrame.p - Head.Position).magnitude < 0.6 then
					if (MouseX >= 50 or MouseX <= -50)
					or (MouseY >= 50 or MouseY <= -50) then
						AppliedMaxTorque = VEC3()
					else
						AppliedMaxTorque = VEC3(HUGE,HUGE,HUGE)
					end
				else
					AppliedMaxTorque = VEC3(HUGE,HUGE,HUGE)
				end
				if (not S.RotateWhileSitting) and Humanoid.Sit then
					AppliedMaxTorque = VEC3()
				end
				BG.maxTorque = AppliedMaxTorque
			end
		end))

		INSERT(Connections, RS:connect(function()
			local Forward = (Keys["w"] or Keys[string.char(17)])
			local Backward = (Keys["s"] or Keys[string.char(18)])
			local Right = (Keys["d"] or Keys[string.char(19)])
			local Left = (Keys["a"] or Keys[string.char(20)])

			local WalkingForward = (Forward and (not Backward))
			local WalkingBackward = ((not Forward) and Backward)
			local WalkingRight = (Right and (not Left))
			local WalkingLeft = ((not Right) and Left)

			ArmTilt = (
				((WalkingForward or WalkingBackward) and WalkingRight) and 5 or
				((WalkingForward or WalkingBackward) and WalkingLeft) and -5 or
				((not (WalkingForward and WalkingBackward)) and WalkingRight) and 10 or
				((not (WalkingForward and WalkingBackward)) and WalkingLeft) and -10 or 0
			)
		end))

		INSERT(Connections, RS:connect(function()
			if (not Idleing) and Walking then
				if Running then
					Humanoid.WalkSpeed = S.SprintSpeed
				else
					local SpeedRatio = (S.AimedWalkSpeed / S.BaseWalkSpeed)
					if Stance == 0 then
						Humanoid.WalkSpeed = (Aimed and S.AimedWalkSpeed or S.BaseWalkSpeed)
					elseif Stance == 1 then
						Humanoid.WalkSpeed = (Aimed and S.CrouchWalkSpeed * SpeedRatio or S.CrouchWalkSpeed)
					elseif Stance == 2 then
						Humanoid.WalkSpeed = (Aimed and S.ProneWalkSpeed * SpeedRatio or S.ProneWalkSpeed)
					end
				end
			else
				Humanoid.WalkSpeed = 16
			end

			StanceSway = 1 - (0.25 * Stance)
		end))

		--------------------[ ANIMATE GUN ]-------------------------------------------

		Animate()
	end
end

function OnUnequipped(DeleteTool)
	if Selected then
		Selected = false

		BreakReload = true

		--------------------[ MODIFYING THE PLAYER ]----------------------------------

		Camera.FieldOfView = 70

		game:GetService("UserInputService").MouseIconEnabled = true

		Gui_Clone:Destroy()
		BG:Destroy()

		RArm.Transparency = 0
		LArm.Transparency = 0

		Shoulders.Right.Part1 = RArm
		Shoulders.Left.Part1 = LArm

		Neck.C0 = PrevNeckCF.C0
		Neck.C1 = PrevNeckCF.C1

		Humanoid.WalkSpeed = 16

		--------------------[ RESETING THE TOOL ]-------------------------------------

		Gun_Ignore:Destroy()

		Aimed = false

		for _, Tab in pairs(Parts) do
			Tab.Weld:Destroy()
			Tab.Weld = nil
		end

		for _,c in pairs(Connections) do
			c:disconnect()
		end

		Connections = {}

		if DeleteTool then
			Camera:ClearAllChildren()
			Gun:Destroy()
		end

		if S.StandOnDeselect and Stance ~= 0 then Stand(true) end
	end
end

Gun.Equipped:connect(OnEquipped)
Gun.Unequipped:connect(function() OnUnequipped(false) end)


Prompt:
--[[
	The entry point for the Fusion library.
]]

Response:
local PubTypes = require(script.PubTypes)
local restrictRead = require(script.Utility.restrictRead)

export type StateObject<T> = PubTypes.StateObject<T>
export type CanBeState<T> = PubTypes.CanBeState<T>
export type Symbol = PubTypes.Symbol
export type Value<T> = PubTypes.Value<T>
export type Computed<T> = PubTypes.Computed<T>
export type ForPairs<KO, VO> = PubTypes.ForPairs<KO, VO>
export type ForKeys<KI, KO> = PubTypes.ForKeys<KI, KO>
export type ForValues<VI, VO> = PubTypes.ForKeys<VI, VO>
export type Observer = PubTypes.Observer
export type Tween<T> = PubTypes.Tween<T>
export type Spring<T> = PubTypes.Spring<T>

type Fusion = {
	version: PubTypes.Version,

	New: (className: string) -> ((propertyTable: PubTypes.PropertyTable) -> Instance),
	Hydrate: (target: Instance) -> ((propertyTable: PubTypes.PropertyTable) -> Instance),
	Ref: PubTypes.SpecialKey,
	Cleanup: PubTypes.SpecialKey,
	Children: PubTypes.SpecialKey,
	Out: PubTypes.SpecialKey,
	OnEvent: (eventName: string) -> PubTypes.SpecialKey,
	OnChange: (propertyName: string) -> PubTypes.SpecialKey,

	Value: <T>(initialValue: T) -> Value<T>,
	Computed: <T>(callback: () -> T, destructor: (T) -> ()?) -> Computed<T>,
	ForPairs: <KI, VI, KO, VO, M>(inputTable: CanBeState<{[KI]: VI}>, processor: (KI, VI) -> (KO, VO, M?), destructor: (KO, VO, M?) -> ()?) -> ForPairs<KO, VO>,
	ForKeys: <KI, KO, M>(inputTable: CanBeState<{[KI]: any}>, processor: (KI) -> (KO, M?), destructor: (KO, M?) -> ()?) -> ForKeys<KO, any>,
	ForValues: <VI, VO, M>(inputTable: CanBeState<{[any]: VI}>, processor: (VI) -> (VO, M?), destructor: (VO, M?) -> ()?) -> ForValues<any, VO>,
	Observer: (watchedState: StateObject<any>) -> Observer,

	Tween: <T>(goalState: StateObject<T>, tweenInfo: TweenInfo?) -> Tween<T>,
	Spring: <T>(goalState: StateObject<T>, speed: number?, damping: number?) -> Spring<T>,

	cleanup: (...any) -> (),
	doNothing: (...any) -> ()
}

return restrictRead("Fusion", {
	version = {major = 0, minor = 2, isRelease = true},

	New = require(script.Instances.New),
	Hydrate = require(script.Instances.Hydrate),
	Ref = require(script.Instances.Ref),
	Out = require(script.Instances.Out),
	Cleanup = require(script.Instances.Cleanup),
	Children = require(script.Instances.Children),
	OnEvent = require(script.Instances.OnEvent),
	OnChange = require(script.Instances.OnChange),

	Value = require(script.State.Value),
	Computed = require(script.State.Computed),
	ForPairs = require(script.State.ForPairs),
	ForKeys = require(script.State.ForKeys),
	ForValues = require(script.State.ForValues),
	Observer = require(script.State.Observer),

	Tween = require(script.Animation.Tween),
	Spring = require(script.Animation.Spring),

	cleanup = require(script.Utility.cleanup),
	doNothing = require(script.Utility.doNothing)
}) :: Fusion


Prompt: -- get

Response:
local getAsset, getNameFromID do
	local cache = {
		Passes = {},
		Products = {}
	}

	for i, pass in pairs(script.Passes:GetChildren()) do
		cache.Passes[pass.Name] = require(pass)
	end

	for i, product in pairs(script.Products:GetChildren()) do
		cache.Products[product.Name] = require(product)
	end

	function getAsset(identity)
		for class, content in pairs(cache) do
			for name, module in pairs(content) do
				if (identity == name or identity == module.Id) then
					return module, class
				end
			end
		end
	end

	function getNameFromID(id)
		for class, content in pairs(cache) do
			for name, module in pairs(content) do
				if id == module.Id then
					return name
				end
			end
		end
	end
end


Prompt: -- Initialize new part tool

Response:
local NewPartTool = require(CoreTools:WaitForChild 'NewPart')
Core.AssignHotkey('J', Core.Support.Call(Core.EquipTool, NewPartTool));
Core.Dock.AddToolButton(Core.Assets.NewPartIcon, 'J', NewPartTool, 'NewPartInfo');


Prompt:
--[[BodyColors.HeadColor=BrickColor.new("Grime")
local randomcolor1=colors[math.random(1,#colors)]
BodyColors.TorsoColor=BrickColor.new(randomcolor1)
BodyColors.LeftArmColor=BrickColor.new(randomcolor1)
BodyColors.RightArmColor=BrickColor.new(randomcolor1)
local randomcolor2=colors[math.random(1,#colors)]
BodyColors.LeftLegColor=BrickColor.new(randomcolor2)
BodyColors.RightLegColor=BrickColor.new(randomcolor2)]]

Response:
function onRunning(speed)
	if speed>0 then
		pose="Running"
	else
		pose="Standing"
	end
end
function onDied()
	pose="Dead"
end
function onJumping()
	pose="Jumping"
end
function onClimbing()
	pose="Climbing"
end
function onGettingUp()
	pose = "GettingUp"
end
function onFreeFall()
	pose = "FreeFall"
end
function onFallingDown()
	pose = "FallingDown"
end
function onSeated()
	pose = "Seated"
end
function onPlatformStanding()
	pose = "PlatformStanding"
end

function moveJump()
	RightShoulder.MaxVelocity = 0.5
	LeftShoulder.MaxVelocity = 0.5
  RightShoulder.DesiredAngle=3.14
	LeftShoulder.DesiredAngle=-3.14
	RightHip.DesiredAngle=0
	LeftHip.DesiredAngle=0
end

function moveFreeFall()
	RightShoulder.MaxVelocity = 0.5
	LeftShoulder.MaxVelocity =0.5
	RightShoulder.DesiredAngle=3.14
	LeftShoulder.DesiredAngle=-3.14
	RightHip.DesiredAngle=0
	LeftHip.DesiredAngle=0
end

function moveSit()
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder.DesiredAngle=3.14 /2
	LeftShoulder.DesiredAngle=-3.14 /2
	RightHip.DesiredAngle=3.14 /2
	LeftHip.DesiredAngle=-3.14 /2
end

function animate(time)
	local amplitude
	local frequency
	if (pose == "Jumping") then
		moveJump()
		return
	end
	if (pose == "FreeFall") then
		moveFreeFall()
		return
	end
	if (pose == "Seated") then
		moveSit()
		return
	end
	local climbFudge = 0
	if (pose == "Running") then
		RightShoulder.MaxVelocity = 0.15
		LeftShoulder.MaxVelocity = 0.15
		amplitude = 1
		frequency = 9
	elseif (pose == "Climbing") then
		RightShoulder.MaxVelocity = 0.5
		LeftShoulder.MaxVelocity = 0.5
		amplitude = 1
		frequency = 9
		climbFudge = 3.14
	else
		amplitude = 0.1
		frequency = 1
	end
	desiredAngle = amplitude * math.sin(time*frequency)
	if not chasing and frequency==9 then
		frequency=4
	end
	if chasing then
		--[[RightShoulder.DesiredAngle=math.pi/2
		LeftShoulder.DesiredAngle=-math.pi/2
		RightHip.DesiredAngle=-desiredAngle*2
		LeftHip.DesiredAngle=-desiredAngle*2]]
	else
		RightShoulder.DesiredAngle=desiredAngle + climbFudge
		LeftShoulder.DesiredAngle=desiredAngle - climbFudge
		RightHip.DesiredAngle=-desiredAngle
		LeftHip.DesiredAngle=-desiredAngle
	end
end

function attack(time,attackpos)
	if time-lastattack>=0.25 then
		local hit,pos=raycast(Torso.Position,(attackpos-Torso.Position).unit,attackrange)
		if hit and hit.Parent~=nil then
			local h=hit.Parent:FindFirstChild("Humanoid")
			local TEAM=hit.Parent:FindFirstChild("TEAM")
			if h and TEAM and TEAM.Value~=sp.TEAM.Value then
				local creator=sp:FindFirstChild("creator")
				if creator then
					if creator.Value~=nil then
						if creator.Value~=game.Players:GetPlayerFromCharacter(h.Parent) then
							for i,oldtag in ipairs(h:GetChildren()) do
								if oldtag.Name=="creator" then
									oldtag:remove()
								end
							end
							creator:clone().Parent=h
						else
							return
						end
					end
				end
				hitsound.Volume=1
				hitsound.Pitch=.75+(math.random()*.5)
				hitsound:Play()
				wait(0.15)
				h:TakeDamage(damage)
				--[[if RightShoulder and LeftShoulder then
					RightShoulder.CurrentAngle=0
					LeftShoulder.CurrentAngle=0
				end]]
			end
		end
		lastattack=time
	end
end

Humanoid.Died:connect(onDied)
Humanoid.Running:connect(onRunning)
Humanoid.Jumping:connect(onJumping)
Humanoid.Climbing:connect(onClimbing)
Humanoid.GettingUp:connect(onGettingUp)
Humanoid.FreeFalling:connect(onFreeFall)
Humanoid.FallingDown:connect(onFallingDown)
Humanoid.Seated:connect(onSeated)
Humanoid.PlatformStanding:connect(onPlatformStanding)

function populatehumanoids(mdl)
	if mdl.ClassName=="Humanoid" then
		if mdl.Parent:FindFirstChild("TEAM") and mdl.Parent:FindFirstChild("TEAM").Value~=sp.TEAM.Value then
			table.insert(humanoids,mdl)
		end
	end
	for i2,mdl2 in ipairs(mdl:GetChildren()) do
		populatehumanoids(mdl2)
	end
end


Prompt:
--[[
	Contains the logic to run a test plan and gather test results from it.

	TestRunner accepts a TestPlan object, executes the planned tests, and
	produces a TestResults object. While the tests are running, the system's
	state is contained inside a TestSession object.
]]

Response:
local TestEnum = require(script.Parent.TestEnum)
local TestSession = require(script.Parent.TestSession)
local LifecycleHooks = require(script.Parent.LifecycleHooks)

local RUNNING_GLOBAL = "__TESTEZ_RUNNING_TEST__"
local JEST_TEST_CONTEXT = "__JEST_TEST_CONTEXT__"

local TestRunner = {
	environment = {},
}

local function wrapExpectContextWithPublicApi(expectationContext)
	return setmetatable({
		extend = function(...)
			expectationContext:extend(...)
		end,
	}, {
		__call = function(_self, ...)
			return expectationContext:startExpectationChain(...)
		end,
	})
end


Prompt: --//Main Function

Response:
ProximityPrompt.Triggered:Connect(function(Player)
	local Character = Player.Character
	local Torso = Character:WaitForChild("Left Arm")
	ProximityPrompt.ActionText = "Wear"
	if Character:FindFirstChild(script.Parent.Parent.Name) then
		Character[script.Parent.Parent.Name]:Destroy()
	else
		local NewArmor = Armor:Clone()
		NewArmor:SetPrimaryPartCFrame(Torso.CFrame)
		NewArmor.PrimaryPart:Destroy()
		ProximityPrompt.ActionText = "Take off"
		for _, part in pairs (NewArmor:GetChildren()) do
			if part:IsA("BasePart") then
				WeldParts(Torso, part)
				part.CanCollide = false
				part.Anchored = false
			end
		end
		NewArmor.Parent = Character
	end
end)


Prompt: --[[Unsprung Weight]]

Response:
--
	Tune.FWheelDensity	= .1 		-- Front Wheel Density
	Tune.RWheelDensity	= .1 		-- Rear Wheel Density

	Tune.AxleSize		= 1 		-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1 		-- Density of structural members
	Tune.AxlesVisible	= false 	-- Makes axle structural parts visible (Debug)

	Tune.HingeSize		= 1 		-- Size of steering hinges (larger = more stable/carry more weight)
	Tune.HingeDensity	= .1 		-- Density of steering hinges
	Tune.HingesVisible	= false 	-- Makes steering hinges visible (Debug)


Prompt:
--Don't edit anything below unless you can script well!
--This plane was made by TurboFusion

Response:
repeat wait() until game.Players.LocalPlayer --This line makes the tool wait until it is in the Player's backpack
wait(0.1)


Prompt: -- Visualizes an impact. This will not run if FastCast.VisualizeCasts is false.

Response:
function DbgVisualizeHit(atCF: CFrame, wasPierce: boolean): SphereHandleAdornment?
	if FastCast.VisualizeCasts ~= true then return nil end
	local adornment = Instance.new("SphereHandleAdornment")
	adornment.Adornee = workspace.Terrain
	adornment.CFrame = atCF
	adornment.Radius = 0.4
	adornment.Transparency = 0.25
	adornment.Color3 = (wasPierce == false) and Color3.new(0.2, 1, 0.5) or Color3.new(1, 0.2, 0.2)
	adornment.Parent = GetFastCastVisualizationContainer()
	return adornment
end


Prompt: --// SERVICES //--

Response:
local CoreGuiService = game:GetService('CoreGui')
local PlayersService = game:GetService('Players')
local GuiService = game:GetService('GuiService')
local UserInputService = game:GetService('UserInputService')
local StarterGui = game:GetService('StarterGui')
local STS_Settings = script.Parent:WaitForChild('STS_Settings')
local StaminaButton = script.Parent:WaitForChild('Mobile')
local Border = StaminaButton:WaitForChild('UIStroke')
local Bar = script.Parent:WaitForChild('Frame_Bar')
local SprintGui = script.Parent
local UIS = game:GetService("UserInputService")
local TS = game:GetService("TweenService")
local plr = game.Players.LocalPlayer
local player = game.Players.LocalPlayer

local SprintingValue = STS_Settings.SprintingValue

local Character = game.Players.LocalPlayer.Character
if Character == nil then
	repeat
		wait()
	until (Character ~= nil)
	print('FoundCharacter')
end

local walking = script.IsWalking

local Breath = script.Breath

local BreathRunning = game:GetService("TweenService"):Create(Breath, TweenInfo.new(2), {Volume = 0.3})
Breath:Play()

local BreathRunningStop = game:GetService("TweenService"):Create(Breath, TweenInfo.new(2), {Volume = 0})

local Debounce = false
local Stamina = Character:WaitForChild('Stamina')
local Sprinting = false
local StaminaReductionRate = STS_Settings:WaitForChild('StaminaDeductionAmount').Value -- Amount taken from Stamina per SprintReductionDelay
local StaminaReductionDelay = STS_Settings:WaitForChild('StaminaDeductionDelay').Value -- Time in Seconds for SprintReductionRate to be removed from stamina
local OriginalWalkSpeed = Character.Humanoid.WalkSpeed -- Get Original WalkSpeed
local SprintSpeed = STS_Settings:WaitForChild('SprintSpeed').Value
local RegenerateDelay = STS_Settings:WaitForChild('StaminaRegenerationDelay').Value
local RegenerateValue = STS_Settings:WaitForChild('StaminaRegenerationAmount').Value