Prompt: -- Reset the camera look vector when the camera is enabled for the first time

Response:
local SetCameraOnSpawn = true

local UseRenderCFrame = false
pcall(function()
	local rc = Instance.new('Part'):GetRenderCFrame()
	UseRenderCFrame = (rc ~= nil)
end)

local function GetRenderCFrame(part)
	return UseRenderCFrame and part:GetRenderCFrame() or part.CFrame
end

local function CreateCamera()
	local this = {}

	this.ShiftLock = false
	this.Enabled = false
	local pinchZoomSpeed = 20
	local isFirstPerson = false
	local isRightMouseDown = false
	this.RotateInput = Vector2.new()

	function this:GetShiftLock()
		return ShiftLockController:IsShiftLocked()
	end

	function this:GetHumanoid()
		local player = PlayersService.LocalPlayer
		return findPlayerHumanoid(player)
	end

	function this:GetHumanoidRootPart()
		local humanoid = this:GetHumanoid()
		return humanoid and humanoid.Torso
	end

	function this:GetRenderCFrame(part)
		GetRenderCFrame(part)
	end

	function this:GetSubjectPosition()
		local result = nil
		local camera = workspace.CurrentCamera
		local cameraSubject = camera and camera.CameraSubject
		if cameraSubject then
			if cameraSubject:IsA('VehicleSeat') then
				local subjectCFrame = GetRenderCFrame(cameraSubject)
				result = subjectCFrame.p + subjectCFrame:vectorToWorldSpace(SEAT_OFFSET)
			elseif cameraSubject:IsA('SkateboardPlatform') then
				local subjectCFrame = GetRenderCFrame(cameraSubject)
				result = subjectCFrame.p + SEAT_OFFSET
			elseif cameraSubject:IsA('BasePart') then
				local subjectCFrame = GetRenderCFrame(cameraSubject)
				result = subjectCFrame.p
			elseif cameraSubject:IsA('Model') then
				result = cameraSubject:GetModelCFrame().p
			elseif cameraSubject:IsA('Humanoid') then
				local humanoidRootPart = cameraSubject.Torso
				if humanoidRootPart and humanoidRootPart:IsA('BasePart') then
					local subjectCFrame = GetRenderCFrame(humanoidRootPart)
					result = subjectCFrame.p +
						subjectCFrame:vectorToWorldSpace(HEAD_OFFSET + cameraSubject.CameraOffset)
				end
			end
		end
		return result
	end

	function this:ResetCameraLook()
	end

	function this:GetCameraLook()
		return workspace.CurrentCamera and workspace.CurrentCamera.CoordinateFrame.lookVector or Vector3.new(0,0,1)
	end

	function this:GetCameraZoom()
		if this.currentZoom == nil then
			local player = PlayersService.LocalPlayer
			this.currentZoom = player and clamp(player.CameraMinZoomDistance, player.CameraMaxZoomDistance, 10) or 10
		end
		return this.currentZoom
	end

	function this:GetCameraActualZoom()
		local camera = workspace.CurrentCamera
		if camera then
			return (camera.CoordinateFrame.p - camera.Focus.p).magnitude
		end
	end

	function this:ViewSizeX()
		local result = 1024
		local player = PlayersService.LocalPlayer
		local mouse = player and player:GetMouse()
		if mouse then
			result = mouse.ViewSizeX
		end
		return result
	end

	function this:ViewSizeY()
		local result = 768
		local player = PlayersService.LocalPlayer
		local mouse = player and player:GetMouse()
		if mouse then
			result = mouse.ViewSizeY
		end
		return result
	end

	function this:ScreenTranslationToAngle(translationVector)
		local screenX = this:ViewSizeX()
		local screenY = this:ViewSizeY()
		local xTheta = (translationVector.x / screenX)
		local yTheta = (translationVector.y / screenY)
		return Vector2.new(xTheta, yTheta)
	end

	function this:MouseTranslationToAngle(translationVector)
		local xTheta = (translationVector.x / 1920)
		local yTheta = (translationVector.y / 1200)
		return Vector2.new(xTheta, yTheta)
	end

	function this:RotateCamera(startLook, xyRotateVector)
		-- Could cache these values so we don't have to recalc them all the time
		local startCFrame = CFrame.new(Vector3.new(), startLook)
		local startVertical = math.asin(startLook.y)
		local yTheta = clamp(-MAX_Y + startVertical, -MIN_Y + startVertical, xyRotateVector.y)
		local resultLookVector = (CFrame.Angles(0, -xyRotateVector.x, 0) * startCFrame * CFrame.Angles(-yTheta,0,0)).lookVector
		return resultLookVector, Vector2.new(xyRotateVector.x, yTheta)
	end

	function this:IsInFirstPerson()
		return isFirstPerson
	end

	-- there are several cases to consider based on the state of input and camera rotation mode
	function this:UpdateMouseBehavior()
		-- first time transition to first person mode or shiftlock
		if isFirstPerson or self:GetShiftLock() then
			if UserInputService.MouseBehavior ~= Enum.MouseBehavior.LockCenter then
				pcall(function() GameSettings.RotationType = Enum.RotationType.CameraRelative end)
				UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
			end
		else
			pcall(function() GameSettings.RotationType = Enum.RotationType.MovementRelative end)
			if isRightMouseDown then
				UserInputService.MouseBehavior = Enum.MouseBehavior.LockCurrentPosition
			else
				UserInputService.MouseBehavior = Enum.MouseBehavior.Default
			end
		end
	end

	function this:ZoomCamera(desiredZoom)
		local player = PlayersService.LocalPlayer
		if player then
			if player.CameraMode == Enum.CameraMode.LockFirstPerson then
				this.currentZoom = 0
			else
				this.currentZoom = clamp(player.CameraMinZoomDistance, player.CameraMaxZoomDistance, desiredZoom)
			end
		end

		isFirstPerson = self:GetCameraZoom() < 2

		ShiftLockController:SetIsInFirstPerson(isFirstPerson)
		-- set mouse behavior
		self:UpdateMouseBehavior()
		return self:GetCameraZoom()
	end

	local function rk4Integrator(position, velocity, t)
		local direction = velocity < 0 and -1 or 1
		local function acceleration(p, v)
			local accel = direction * math.max(1, (p / 3.3) + 0.5)
			return accel
		end

		local p1 = position
		local v1 = velocity
		local a1 = acceleration(p1, v1)
		local p2 = p1 + v1 * (t / 2)
		local v2 = v1 + a1 * (t / 2)
		local a2 = acceleration(p2, v2)
		local p3 = p1 + v2 * (t / 2)
		local v3 = v1 + a2 * (t / 2)
		local a3 = acceleration(p3, v3)
		local p4 = p1 + v3 * t
		local v4 = v1 + a3 * t
		local a4 = acceleration(p4, v4)

		local positionResult = position + (v1 + 2 * v2 + 2 * v3 + v4) * (t / 6)
		local velocityResult = velocity + (a1 + 2 * a2 + 2 * a3 + a4) * (t / 6)
		return positionResult, velocityResult
	end

	function this:ZoomCameraBy(zoomScale)
		local zoom = this:GetCameraActualZoom()
		if zoom then
			-- Can break into more steps to get more accurate integration
			zoom = rk4Integrator(zoom, zoomScale, 1)
			self:ZoomCamera(zoom)
		end
		return self:GetCameraZoom()
	end

	function this:ZoomCameraFixedBy(zoomIncrement)
		return self:ZoomCamera(self:GetCameraZoom() + zoomIncrement)
	end

	function this:Update()
	end

	---- Input Events ----
	local startPos = nil
	local lastPos = nil
	local panBeginLook = nil

	local fingerTouches = {}
	local NumUnsunkTouches = 0

	local StartingDiff = nil
	local pinchBeginZoom = nil

	this.ZoomEnabled = true
	this.PanEnabled = true
	this.KeyPanEnabled = true

	local function OnTouchBegan(input, processed)
		fingerTouches[input] = processed
		if not processed then
			NumUnsunkTouches = NumUnsunkTouches + 1
		end
	end

	local function OnTouchChanged(input, processed)
		if fingerTouches[input] == nil then
			fingerTouches[input] = processed
			if not processed then
				NumUnsunkTouches = NumUnsunkTouches + 1
			end
		end

		if NumUnsunkTouches == 1 then
			if fingerTouches[input] == false then
				panBeginLook = panBeginLook or this:GetCameraLook()
				startPos = startPos or input.Position
				lastPos = lastPos or startPos
				this.UserPanningTheCamera = true

				local delta = input.Position - lastPos
				if this.PanEnabled then
					local desiredXYVector = this:ScreenTranslationToAngle(delta) * TOUCH_SENSITIVTY
					this.RotateInput = this.RotateInput + desiredXYVector
				end

				lastPos = input.Position
			end
		else
			panBeginLook = nil
			startPos = nil
			lastPos = nil
			this.UserPanningTheCamera = false
		end
		if NumUnsunkTouches == 2 then
			local unsunkTouches = {}
			for touch, wasSunk in pairs(fingerTouches) do
				if not wasSunk then
					table.insert(unsunkTouches, touch)
				end
			end
			if #unsunkTouches == 2 then
				local difference = (unsunkTouches[1].Position - unsunkTouches[2].Position).magnitude
				if StartingDiff and pinchBeginZoom then
					local scale = difference / math.max(0.01, StartingDiff)
					local clampedScale = clamp(0.1, 10, scale)
					if this.ZoomEnabled then
						this:ZoomCamera(pinchBeginZoom / clampedScale)
					end
				else
					StartingDiff = difference
					pinchBeginZoom = this:GetCameraActualZoom()
				end
			end
		else
			StartingDiff = nil
			pinchBeginZoom = nil
		end
	end

	local function OnTouchEnded(input, processed)
		if fingerTouches[input] == false then
			if NumUnsunkTouches == 1 then
				panBeginLook = nil
				startPos = nil
				lastPos = nil
				this.UserPanningTheCamera = false
			elseif NumUnsunkTouches == 2 then
				StartingDiff = nil
				pinchBeginZoom = nil
			end
		end

		if fingerTouches[input] ~= nil and fingerTouches[input] == false then
			NumUnsunkTouches = NumUnsunkTouches - 1
		end
		fingerTouches[input] = nil
	end

	local function OnMouse2Down(input, processed)
		if processed then return end
		isRightMouseDown = true
		this:UpdateMouseBehavior()
		panBeginLook = this:GetCameraLook()
		startPos = input.Position
		lastPos = startPos
		this.UserPanningTheCamera = true
	end

	local function OnMouse2Up(input, processed)
		isRightMouseDown = false
		this:UpdateMouseBehavior()
		panBeginLook = nil
		startPos = nil
		lastPos = nil
		this.UserPanningTheCamera = false
	end

	local function OnMouseMoved(input, processed)
		if startPos and lastPos and panBeginLook then
			local currPos = lastPos + input.Delta
			local totalTrans = currPos - startPos
			if this.PanEnabled then
				local desiredXYVector = this:MouseTranslationToAngle(input.Delta) * MOUSE_SENSITIVITY
				this.RotateInput = this.RotateInput + desiredXYVector
			end
			lastPos = currPos
		elseif this:IsInFirstPerson() or this:GetShiftLock() then
			if this.PanEnabled then
				local desiredXYVector = this:MouseTranslationToAngle(input.Delta) * MOUSE_SENSITIVITY
				this.RotateInput = this.RotateInput + desiredXYVector
			end
		end
	end

	local function OnMouseWheel(input, processed)
		if not processed then
			if this.ZoomEnabled then
				this:ZoomCameraBy(clamp(-1, 1, -input.Position.Z) * 1.4)
			end
		end
	end

	local function round(num)
		return math.floor(num + 0.5)
	end

	local eight2Pi = math.pi / 4

	local function rotateVectorByAngleAndRound(camLook, rotateAngle, roundAmount)
		if camLook ~= Vector3.new(0,0,0) then
			camLook = camLook.unit
			local currAngle = math.atan2(camLook.z, camLook.x)
			local newAngle = round((math.atan2(camLook.z, camLook.x) + rotateAngle) / roundAmount) * roundAmount
			return newAngle - currAngle
		end
		return 0
	end

	local function OnKeyDown(input, processed)
		if processed then return end
		if this.ZoomEnabled then
			if input.KeyCode == Enum.KeyCode.I then
				this:ZoomCameraBy(-5)
			elseif input.KeyCode == Enum.KeyCode.O then
				this:ZoomCameraBy(5)
			end
		end
		if panBeginLook == nil and this.KeyPanEnabled then
			if input.KeyCode == Enum.KeyCode.Left then
				this.TurningLeft = true
			elseif input.KeyCode == Enum.KeyCode.Right then
				this.TurningRight = true
			elseif input.KeyCode == Enum.KeyCode.Comma then
				local angle = rotateVectorByAngleAndRound(this:GetCameraLook() * Vector3.new(1,0,1), -eight2Pi * (3/4), eight2Pi)
				if angle ~= 0 then
					this.RotateInput = this.RotateInput + Vector2.new(angle, 0)
					this.LastUserPanCamera = tick()
					this.LastCameraTransform = nil
				end
			elseif input.KeyCode == Enum.KeyCode.Period then
				local angle = rotateVectorByAngleAndRound(this:GetCameraLook() * Vector3.new(1,0,1), eight2Pi * (3/4), eight2Pi)
				if angle ~= 0 then
					this.RotateInput = this.RotateInput + Vector2.new(angle, 0)
					this.LastUserPanCamera = tick()
					this.LastCameraTransform = nil
				end
			elseif input.KeyCode == Enum.KeyCode.PageUp then
			--elseif input.KeyCode == Enum.KeyCode.Home then
				this.RotateInput = this.RotateInput + Vector2.new(0,math.rad(15))
				this.LastCameraTransform = nil
			elseif input.KeyCode == Enum.KeyCode.PageDown then
			--elseif input.KeyCode == Enum.KeyCode.End then
				this.RotateInput = this.RotateInput + Vector2.new(0,math.rad(-15))
				this.LastCameraTransform = nil
			end
		end
	end

	local function OnKeyUp(input, processed)
		if input.KeyCode == Enum.KeyCode.Left then
			this.TurningLeft = false
		elseif input.KeyCode == Enum.KeyCode.Right then
			this.TurningRight = false
		end
	end

	local lastThumbstickRotate = nil
	local numOfSeconds = 0.7
	local currentSpeed = 0
	local maxSpeed = 0.1
	local thumbstickSensitivity = 1.0
	local lastThumbstickPos = Vector2.new(0,0)
	local ySensitivity = 0.65
	local lastVelocity = nil

	-- K is a tunable parameter that changes the shape of the S-curve
	-- the larger K is the more straight/linear the curve gets
	local k = 0.35
	local lowerK = 0.8
	local function SCurveTranform(t)
		t = clamp(-1,1,t)
		if t >= 0 then
			return (k*t) / (k - t + 1)
		end
		return -((lowerK*-t) / (lowerK + t + 1))
	end

	-- DEADZONE
	local DEADZONE = 0.1
	local function toSCurveSpace(t)
		return (1 + DEADZONE) * (2*math.abs(t) - 1) - DEADZONE
	end

	local function fromSCurveSpace(t)
		return t/2 + 0.5
	end

	local function gamepadLinearToCurve(thumbstickPosition)
		local function onAxis(axisValue)
			local sign = 1
			if axisValue < 0 then
				sign = -1
			end
			local point = fromSCurveSpace(SCurveTranform(toSCurveSpace(math.abs(axisValue))))
			point = point * sign
			return clamp(-1,1,point)
		end
		return Vector2.new(onAxis(thumbstickPosition.x), onAxis(thumbstickPosition.y))
	end

	function this:UpdateGamepad()
		local gamepadPan = this.GamepadPanningCamera
		if gamepadPan then
			gamepadPan = gamepadLinearToCurve(gamepadPan)
			local currentTime = tick()
			if gamepadPan.X ~= 0 or gamepadPan.Y ~= 0 then
				this.userPanningTheCamera = true
			elseif gamepadPan == Vector2.new(0,0) then
				lastThumbstickRotate = nil
				if lastThumbstickPos == Vector2.new(0,0) then
					currentSpeed = 0
				end
			end

			local finalConstant = 0

			if lastThumbstickRotate then
				local elapsedTime = (currentTime - lastThumbstickRotate) * 10
				currentSpeed = currentSpeed + (maxSpeed * ((elapsedTime*elapsedTime)/numOfSeconds))

				if currentSpeed > maxSpeed then currentSpeed = maxSpeed end

				if lastVelocity then
					local velocity = (gamepadPan - lastThumbstickPos)/(currentTime - lastThumbstickRotate)
					local velocityDeltaMag = (velocity - lastVelocity).magnitude

					if velocityDeltaMag > 12 then
						currentSpeed = currentSpeed * (20/velocityDeltaMag)
						if currentSpeed > maxSpeed then currentSpeed = maxSpeed end
					end
				end

				finalConstant = thumbstickSensitivity * currentSpeed
				lastVelocity = (gamepadPan - lastThumbstickPos)/(currentTime - lastThumbstickRotate)
			end

			lastThumbstickPos = gamepadPan
			lastThumbstickRotate = currentTime

			return Vector2.new( gamepadPan.X * finalConstant, gamepadPan.Y * finalConstant * ySensitivity)
		end

		return Vector2.new(0,0)
	end

	local InputBeganConn, InputChangedConn, InputEndedConn, ShiftLockToggleConn = nil, nil, nil, nil

	function this:DisconnectInputEvents()
		if InputBeganConn then
			InputBeganConn:disconnect()
			InputBeganConn = nil
		end
		if InputChangedConn then
			InputChangedConn:disconnect()
			InputChangedConn = nil
		end
		if InputEndedConn then
			InputEndedConn:disconnect()
			InputEndedConn = nil
		end
		if ShiftLockToggleConn then
			ShiftLockToggleConn:disconnect()
			ShiftLockToggleConn = nil
		end
		this.TurningLeft = false
		this.TurningRight = false
		this.LastCameraTransform = nil
		self.LastSubjectCFrame = nil
		this.UserPanningTheCamera = false
		this.RotateInput = Vector2.new()
		this.GamepadPanningCamera = Vector2.new(0,0)

		-- Reset input states
		startPos = nil
		lastPos = nil
		panBeginLook = nil
		isRightMouseDown = false

		fingerTouches = {}
		NumUnsunkTouches = 0

		StartingDiff = nil
		pinchBeginZoom = nil

		-- Unlock mouse for example if right mouse button was being held down
		if UserInputService.MouseBehavior ~= Enum.MouseBehavior.LockCenter then
			UserInputService.MouseBehavior = Enum.MouseBehavior.Default
		end
	end

	function this:ConnectInputEvents()
		InputBeganConn = UserInputService.InputBegan:connect(function(input, processed)
			if input.UserInputType == Enum.UserInputType.Touch and IsTouch then
				OnTouchBegan(input, processed)
			elseif input.UserInputType == Enum.UserInputType.MouseButton2 and not IsTouch then
				OnMouse2Down(input, processed)
			end
			-- Keyboard
			if input.UserInputType == Enum.UserInputType.Keyboard then
				OnKeyDown(input, processed)
			end
		end)

		InputChangedConn = UserInputService.InputChanged:connect(function(input, processed)
			if input.UserInputType == Enum.UserInputType.Touch and IsTouch then
				OnTouchChanged(input, processed)
			elseif input.UserInputType == Enum.UserInputType.MouseMovement and not IsTouch then
				OnMouseMoved(input, processed)
			elseif input.UserInputType == Enum.UserInputType.MouseWheel and not IsTouch then
				OnMouseWheel(input, processed)
			end
		end)

		InputEndedConn = UserInputService.InputEnded:connect(function(input, processed)
			if input.UserInputType == Enum.UserInputType.Touch and IsTouch then
				OnTouchEnded(input, processed)
			elseif input.UserInputType == Enum.UserInputType.MouseButton2 and not IsTouch then
				OnMouse2Up(input, processed)
			end
			-- Keyboard
			if input.UserInputType == Enum.UserInputType.Keyboard then
				OnKeyUp(input, processed)
			end
		end)

		ShiftLockToggleConn = ShiftLockController.OnShiftLockToggled.Event:connect(function()
			this:UpdateMouseBehavior()
		end)

		this.RotateInput = Vector2.new()

		local getGamepadPan = function(name, state, input)
			if input.UserInputType == Enum.UserInputType.Gamepad1 and input.KeyCode == Enum.KeyCode.Thumbstick2 then

				if state == Enum.UserInputState.Cancel then
					this.GamepadPanningCamera = Vector2.new(0,0)
					return
				end

				local inputVector = Vector2.new(input.Position.X, -input.Position.Y)
				if inputVector.magnitude > THUMBSTICK_DEADZONE then
					this.GamepadPanningCamera = Vector2.new(input.Position.X, -input.Position.Y)
				else
					this.GamepadPanningCamera = Vector2.new(0,0)
				end
			end
		end

		local doGamepadZoom = function(name, state, input)
			if input.UserInputType == Enum.UserInputType.Gamepad1 and input.KeyCode == Enum.KeyCode.ButtonR3 and state == Enum.UserInputState.Begin then
				if this.currentZoom > 0.5 then
					this:ZoomCamera(0)
				else
					this:ZoomCamera(10)
				end
			end
		end

		game.ContextActionService:BindAction("RootCamGamepadPan", getGamepadPan, false, Enum.KeyCode.Thumbstick2)
		game.ContextActionService:BindAction("RootCamGamepadZoom", doGamepadZoom, false, Enum.KeyCode.ButtonR3)

		-- set mouse behavior
		self:UpdateMouseBehavior()
	end

	function this:SetEnabled(newState)
		if newState ~= self.Enabled then
			self.Enabled = newState
			if self.Enabled then
				self:ConnectInputEvents()
			else
				self:DisconnectInputEvents()
			end
		end
	end

	local function OnPlayerAdded(player)
		player.Changed:connect(function(prop)
			if this.Enabled then
				if prop == "CameraMode" or prop == "CameraMaxZoomDistance" or prop == "CameraMinZoomDistance" then
					 this:ZoomCameraFixedBy(0)
				end
			end
		end)

		local function OnCharacterAdded(newCharacter)
			this:ZoomCamera(12.5)
			local humanoid = findPlayerHumanoid(player)
			local start = tick()
			while tick() - start < 0.3 and (humanoid == nil or humanoid.Torso == nil) do
				wait()
				humanoid = findPlayerHumanoid(player)
			end
			local function setLookBehindChatacter()
				if humanoid and humanoid.Torso and player.Character == newCharacter then
					local newDesiredLook = (humanoid.Torso.CFrame.lookVector - Vector3.new(0,0.23,0)).unit
					local horizontalShift = findAngleBetweenXZVectors(newDesiredLook, this:GetCameraLook())
					local vertShift = math.asin(this:GetCameraLook().y) - math.asin(newDesiredLook.y)
					if not IsFinite(horizontalShift) then
						horizontalShift = 0
					end
					if not IsFinite(vertShift) then
						vertShift = 0
					end
					this.RotateInput = Vector2.new(horizontalShift, vertShift)

					-- reset old camera info so follow cam doesn't rotate us
					this.LastCameraTransform = nil
				end
			end
			wait()
			setLookBehindChatacter()
		end

		player.CharacterAdded:connect(function(character)
			if this.Enabled or SetCameraOnSpawn then
				OnCharacterAdded(character)
				SetCameraOnSpawn = false
			end
		end)
		if player.Character then
			spawn(function() OnCharacterAdded(player.Character) end)
		end
	end
	if PlayersService.LocalPlayer then
		OnPlayerAdded(PlayersService.LocalPlayer)
	end
	PlayersService.ChildAdded:connect(function(child)
		if child and PlayersService.LocalPlayer == child then
			OnPlayerAdded(PlayersService.LocalPlayer)
		end
	end)

	return this
end

return CreateCamera


Prompt:
----------------------------------------------------------------------------
---  Functionality Loop  ---------------------------------------------------
----------------------------------------------------------------------------

Response:
math.randomseed(tick())
while true do
	wait(1 / script.Rate.Value)
	--Only render droplets if:
		--Camera isn't looking down
		--Render settings are high enough
		--Camera isn't under an awning or roof or something

	if CanShow and ScreenBlockCFrame.LookVector.Y > -0.4 and not UnderObject(ScreenBlockCFrame.Position) then
		CreateDroplet()
	end
end


Prompt: -- variables

Response:
local initialized	= false

local actions		= {}
local defaults		= {}

local actionBegan, actionEnded


Prompt: -- Close Button Functions

Response:
local topbar_closeButton_nf = TweenService:Create(closeButton, Bar_Button_TweenInfo, button_not_focused)
local topbar_closeButton_f = TweenService:Create(closeButton, Bar_Button_TweenInfo, button_focused)
local topbar_closeButton_p = TweenService:Create(closeButton, Bar_Button_TweenInfo, button_pressed)
local topbar_closebutton_r = TweenService:Create(closeButton, Bar_Button_TweenInfo, button_released)


Prompt:
-- ClientRemoteProperty
-- Stephen Leitnick
-- December 20, 2021

Response:
local Promise = require(script.Parent.Parent.Parent.Promise)
local Signal = require(script.Parent.Parent.Parent.Signal)
local ClientRemoteSignal = require(script.Parent.ClientRemoteSignal)
local Types = require(script.Parent.Parent.Types)


Prompt: -- hopefully this won't use all the bandwith, limit how often it fires the server if possible

Response:
local heightSliderFrame = NumberSlider.new(function(newValue, oldValue)
	remoteEvent:FireServer("scale", "BodyHeightScale", newValue)
end, scaleFrame.Height, 90, 105, true)

local widthSliderFrame = NumberSlider.new(function(newValue, oldValue)
	remoteEvent:FireServer("scale", "BodyWidthScale", newValue)
end, scaleFrame.Width, 70, 100, true)

local headSliderFrame = NumberSlider.new(function(newValue, oldValue)
	remoteEvent:FireServer("scale", "HeadScale", newValue)
end, scaleFrame.Head, 95, 100, true)

local proportionSliderFrame = NumberSlider.new(function(newValue, oldValue)
	remoteEvent:FireServer("scale", "BodyProportionScale", newValue)
end, scaleFrame.Proportion, 0, 100, true)

local bodySliderFrame = NumberSlider.new(function(newValue, oldValue)
	remoteEvent:FireServer("scale", "BodyTypeScale", newValue)
end, scaleFrame.BodyType, 0, 100, true)

avatarEditorFrame.Visible = false
catalogFrameCloseTween:Play()
viewerFrameCloseTween:Play()

do
	local success = pcall(function()
		wearingAssets = Players:GetCharacterAppearanceInfoAsync(player.UserId)
	end)
	if not success then
		print("failed to load")
	end
end

loadAccessories(currentSubCategory)
updateScaleFrameCanvasSize()

heightSliderFrame:Set(wearingAssets.scales.height * 100)
widthSliderFrame:Set(wearingAssets.scales.width * 100)
headSliderFrame:Set(wearingAssets.scales.head * 100)
proportionSliderFrame:Set(wearingAssets.scales.proportion * 100)
bodySliderFrame:Set(wearingAssets.scales.bodyType * 100)

clearSearchButton.Activated:Connect(clearSearch)
searchTextBox:GetPropertyChangedSignal("Text"):Connect(search)
player.CharacterAdded:Connect(characterAdded)
toggleButton.Activated:Connect(toggle)
viewButton.Activated:Connect(toggleView)
doneButton.Activated:Connect(closeSequence)
remoteEvent.OnClientEvent:Connect(onClientEvent)
scaleFrameUIGridLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(updateScaleFrameCanvasSize)


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

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

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

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

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

local lastTick = 0

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

	local climbFudge = 0
	local setAngles = false

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

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

	-- Tool Animation handling
	local tool = Character:FindFirstChildOfClass("Tool")
	if tool and (tool.RequiresHandle or tool:FindFirstChild("Handle")) then

		local animStringValueObject = getToolAnim(tool)

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

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

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


Prompt: --				{ id = "slash.xml", weight = 10 }

Response:
			},
	toollunge = {
				{ id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
			},
	wave = {
				{ id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
			},
	point = {
				{ id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
			},
	dance1 = {
				{ id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
				{ id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
				{ id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
			},
	dance2 = {
				{ id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
				{ id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
				{ id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
			},
	dance3 = {
				{ id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
				{ id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
				{ id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
			},
	laugh = {
				{ id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
			},
	cheer = {
				{ id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
			},
}
local dances = {"dance1", "dance2", "dance3"}


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

Response:
client = nil;
cPcall = nil;
Pcall = nil;
Routine = nil;
service = nil;
gTable = nil;
return function(p1)
	local v1 = nil;
	local l__PlayerGui__2 = service.PlayerGui;
	local l__LocalPlayer__3 = service.Players.LocalPlayer;
	local v4 = service.New("ScreenGui");
	local v5 = service.New("ImageButton", v4);
	v1 = client.UI.Register(v4);
	local v6 = service.New("Sound");
	v6.Parent = v5;
	v6.Volume = 0.25;
	v6.SoundId = "rbxassetid://156286438";
	if client.UI.Get("HelpButton", v4, true) then
		v4:Destroy();
		v1:Destroy();
		return nil;
	end;
	v1.Name = "HelpButton";
	v1.CanKeepAlive = false;
	v5.Name = "Toggle";
	v5.BackgroundTransparency = 1;
	v5.Position = UDim2.new(1, -45, 1, -45);
	v5.Size = UDim2.new(0, 40, 0, 40);
	v5.Image = client.HelpButtonImage;
	v5.ImageTransparency = 0.35;
	v5.Modal = client.Variables.ModalMode;
	v5.ClipsDescendants = true;
	v5.MouseButton1Down:Connect(function()
		spawn(function()
			local v7 = Instance.new("ImageLabel", v5);
			v7.AnchorPoint = Vector2.new(0.5, 0.5);
			v7.BorderSizePixel = 0;
			v7.ZIndex = v5.ZIndex + 1;
			v7.BackgroundTransparency = 1;
			v7.ImageTransparency = 0.8;
			v7.Image = "rbxasset://textures/whiteCircle.png";
			v7.Position = UDim2.new(0.5, 0, 0.5, 0);
			v7:TweenSize(UDim2.new(0, v5.AbsoluteSize.X * 2.5, 0, v5.AbsoluteSize.X * 2.5), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.2);
			wait(0.2);
			v7:Destroy();
		end);
		local v8 = client.UI.Get("UserPanel", nil, true);
		if v8 then
			v8.Object:Destroy();
			return;
		end;
		v6:Play();
		client.UI.Make("UserPanel", {});
	end);
	v1:Ready();
end;


Prompt:
--[[*
 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 ]]

Response:
local CurrentModule = script.Parent
local Packages = CurrentModule.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
local Array = LuauPolyfill.Array
local Boolean = LuauPolyfill.Boolean
local Map = LuauPolyfill.Map
type Array<T> = LuauPolyfill.Array<T>
type Map<K, V> = LuauPolyfill.Map<K, V>

local exports = {}

local picomatch = require(Packages.Picomatch)
local typesModule = require(Packages.JestTypes)
type Config_Path = typesModule.Config_Path
type Config_Glob = typesModule.Config_Glob


Prompt: --[[Engine]]

Response:
	--Torque Curve
	Tune.Horsepower		= 380		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16

	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)

	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)


Prompt:
--- Returns Maid[key] if not part of Maid metatable
-- @return Maid[key] value

Response:
function Maid:__index(index)
	if Maid[index] then
		return Maid[index]
	else
		return self._tasks[index]
	end
end


Prompt:
--[=[
	Sets the scope for the datastore to retrieve.

	:::info
	Must be done before start and after init.
	:::

	@param dataStoreScope string
]=]

Response:
function PlayerDataStoreService:SetDataStoreScope(dataStoreScope)
	assert(type(dataStoreScope) == "string", "Bad dataStoreScope")
	assert(self._started, "Not initialized")
	assert(self._started:IsPending(), "Already started, cannot configure")

	self._dataStoreScope = dataStoreScope
end


Prompt: -- NumberValue to store the user's preferred speed

Response: local uiSpeedUser = appManager.Settings.UISpeed.LocalScript.uiSpeedUser


Prompt: -- Public Functions

Response:
function GameManager:Initialize()
	MapManager:SaveMap()
end

function GameManager:RunIntermission()
	IntermissionRunning = true
	TimeManager:StartTimer(Configurations.INTERMISSION_DURATION)
	DisplayManager:StartIntermission()
	EnoughPlayers = Players.NumPlayers >= Configurations.MIN_PLAYERS
	DisplayManager:UpdateTimerInfo(true, not EnoughPlayers)
	spawn(function()
		repeat
			if EnoughPlayers and Players.NumPlayers < Configurations.MIN_PLAYERS then
				EnoughPlayers = false
			elseif not EnoughPlayers and Players.NumPlayers >= Configurations.MIN_PLAYERS then
				EnoughPlayers = true
			end
			DisplayManager:UpdateTimerInfo(true, not EnoughPlayers)
			wait(.5)
		until IntermissionRunning == false
	end)

	wait(Configurations.INTERMISSION_DURATION)
	IntermissionRunning = false
end

function GameManager:StopIntermission()
	--IntermissionRunning = false
	DisplayManager:UpdateTimerInfo(false, false)
	DisplayManager:StopIntermission()
end

function GameManager:GameReady()
	return Players.NumPlayers >= Configurations.MIN_PLAYERS
end

function GameManager:StartRound()
	TeamManager:ClearTeamScores()

	PlayerManager:AllowPlayerSpawn(true)
	PlayerManager:LoadPlayers()

	GameRunning = true
	PlayerManager:SetGameRunning(true)
	TimeManager:StartTimer(Configurations.ROUND_DURATION)
end

function GameManager:Update()
	--TODO: Add custom custom game code here
end

function GameManager:RoundOver()
	local winningTeam = TeamManager:HasTeamWon()
	if winningTeam then
		DisplayManager:DisplayVictory(winningTeam)
		return true
	end
	if TimeManager:TimerDone() then
		if TeamManager:AreTeamsTied() then
			DisplayManager:DisplayVictory('Tie')
		else
			winningTeam = TeamManager:GetWinningTeam()
			DisplayManager:DisplayVictory(winningTeam)
		end
		return true
	end
	return false
end

function GameManager:RoundCleanup()
	PlayerManager:SetGameRunning(false)
	wait(Configurations.END_GAME_WAIT)
	PlayerManager:AllowPlayerSpawn(false)
	PlayerManager:DestroyPlayers()
	DisplayManager:DisplayVictory(nil)
	TeamManager:ClearTeamScores()
	TeamManager:ShuffleTeams()
	MapManager:ClearMap()
	MapManager:LoadMap()

end


Prompt: --GUI setup--

Response: local BoostGaugeVisible = true -- true=visible false=not visible


Prompt: ------ this is all of the stuff that happens when you drill the vault (DONT REMOVE OR ADD ANYTHING IF YOU DONT KNOW WHAT YOU ARE DOING)------


Prompt:
--- Splits a string by a single delimeter chosen from the given set.
-- The first matching delimeter from the set becomes the split character.

Response:
function Util.SplitPrioritizedDelimeter(text, delimeters)
	for i, delimeter in ipairs(delimeters) do
		if text:find(delimeter) or i == #delimeters then
			return Util.SplitStringSimple(text, delimeter)
		end
	end
end


Prompt: --Optimization--

Response:
local rad = math.rad
local Clamp = math.clamp
local NewCFrame = CFrame.new
local Angles = CFrame.Angles
local NewVector = Vector3.new
local CFLookAt = CFrame.lookAt
local EulerAngles = CFrame.fromEulerAnglesYXZ

function actions.aim()

	local aimPos = NewVector()
	local sightIndex = 50

	status:set("weaponAimed",true)
	myHuman.AutoRotate = false
	bodyRotate.Enabled = true
	myHuman.WalkSpeed = 10

	while true do

		local target = status:get("currentTarget")

		if myHuman.Health <=0 or not target or not target.Parent then
			break
		elseif not status:get("m4Equipped") and not status:get("reloading") then
			break
		end

		local target = status:get("currentTarget")
		local dist = core.checkDist(target,myTorso)
		local canSee = core.checkSight(target)

		if not canSee then
			sightIndex = sightIndex - 1
		else
			sightIndex = 50
		end

		if not canSee and myRoot.Velocity.Magnitude > 3 and sightIndex <= 0 then

			local walkPoint = myHuman.WalkToPoint
			local myPos = myRoot.Position
			local dir = (NewVector(walkPoint.X,0,walkPoint.Z) - NewVector(myPos.X,0,myPos.Z)).Unit * 20
			aimPos = myRoot.Position + NewVector(0,1.5,0) + dir
		else
			aimPos = target.Position + target.Velocity/(10 - dist/50)
		end

		local tilt = (myRoot.Position.Y - aimPos.Y) / (dist*0.04)
		tilt = Clamp(tilt,-45,45)
		rootJoint.C0 = rootJointOrg * EulerAngles(rad(tilt),0,0)
		lHip.C0 = lHipOrg * EulerAngles(0,0,rad(-tilt))
		rHip.C0 = rHipOrg * EulerAngles(0,0,rad(tilt))

		xAxisAttach.WorldCFrame = CFLookAt(m4.Position,aimPos)
		m4Hinge.Attachment0.WorldCFrame = NewCFrame(m4Hinge.Attachment0.WorldPosition) * EulerAngles(rad(0),rad(myRoot.Orientation.Y),0)
		m4Hinge.TargetAngle = xAxisAttach.Orientation.X
		headHinge.TargetAngle = xAxisAttach.Orientation.X

		torsoHingeAttach.Position = torsoHingAttachOrgPos + NewVector(0,tilt/90,0)

		yAxisAttach.WorldCFrame = CFLookAt(m4.Position,NewVector(
			aimPos.X,
			myRoot.Position.Y,
			aimPos.Z
			))

		if status:get("m4Equipped") then
			neck.C0 = NewCFrame(0,1,0) * Angles(-1.5 + rad(xAxisAttach.Orientation.X),rad(15),rad(180))
		else
			neck.C0 = NewCFrame(0,1,0) * Angles(-1.5 + rad(xAxisAttach.Orientation.X),0,rad(180))
		end

		runService.Heartbeat:Wait()
		runService.Heartbeat:Wait()
	end

	actions.resetHead()
	bodyRotate.Enabled = false
	myHuman.WalkSpeed = 16
	myHuman.AutoRotate = true

	rootJoint.C0 = rootJointOrg
	lHip.C0 = lHipOrg
	rHip.C0 = rHipOrg

	status:set("weaponAimed",false)
end

function actions.reload()
	status:set("weaponAimed",false)
	reloadSound:Play()
	status:set("reloading",true)

	actions.yieldM4()

	m4Weld.Part0 = nil
	m4.CFrame = lArm.CFrame * NewCFrame(0.5,-0.2,0) * Angles(rad(-90),rad(180),rad(0))
	m4Weld.Part0 = lArm

	reloadAnimation:Play()
	reloadAnimation:AdjustSpeed(3)

	wait(0.2)

	local fakeMag = magazine:Clone()
	fakeMag.CanCollide = true
	fakeMag.Parent = workspace
	debrisService:AddItem(fakeMag,4)
	magazine.Transparency = 1

	reloadAnimation.Stopped:Wait()

	magazine.Transparency = 0
	status:set("reloading",false)
	status:set("mag",marine.Settings.MagSize.Value)
	actions.drawM4()
end

function actions.drawM4()
	actions.yieldKnife()
	if not status:get("m4Equipped") and not status:get("reloading") then
		status:set("m4Equipped",true)
		status:set("m4Lowered",false)
		m4.Equip:Play()

		xAxisAttach.CFrame = myTorso.CFrame

		--M4 Setup
		m4Weld.Part0 = nil
		m4.CFrame = myRoot.CFrame * NewCFrame(0.3,0.85,1.75) * Angles(rad(-180),rad(180),rad(0))
		m4HingeAttach.WorldPosition = torsoHingeAttach.WorldPosition
		m4Hinge.Enabled = true

		--Right Arm Setup
		rShoulder.Part1 = nil
		rArmWeld.Part1 = nil --x 1.25
		rArmWeld.Enabled = false
		rArm.CFrame = m4.CFrame * NewCFrame(-0.6,-0.5,-0.5) * Angles(rad(-80),rad(-180),rad(-15))
		rArmWeld.Part1 = rArm
		rArmWeld.Enabled = true

		--Left Arm Setup
		lShoulder.Part1 = nil
		lArmWeld.Part1 = nil
		lArm.CFrame = m4.CFrame * NewCFrame(0.7,-0.3,0) * Angles(rad(-90),rad(183),rad(28)) --x84
		lArmWeld.Part1 = lArm

		wait(0.5)
	end
end

function actions.yieldM4()
	if status:get("m4Equipped") or status:get("m4Lowered") then

		status:set("m4Equipped",false)
		status:set("weaponAimed",false)
		status:set("m4Lowered",false)

		m4.Equip:Play()

		--Right Arm setup
		rArmWeld.Part1 = nil
		rShoulder.Part1 = rArm

		--Left Arm Setup
		lArmWeld.Part1 = nil
		lShoulder.Part1 = lArm

		--M4 Setup
		m4Weld.Part0 = nil
		m4Hinge.Enabled = false
		m4.CFrame = myTorso.CFrame * NewCFrame(0,0,0.7) * Angles(rad(-90),rad(-135),rad(270))
		m4Weld.Part0 = myTorso
	end
end

function actions.lowerM4()
	if not status:get("m4Lowered") and status:get("m4Equipped") and not status:get("reloading") then

		status:set("m4Equipped",false)
		status:set("m4Lowered",true)

		m4.Equip:Play()

		--M4 Setup
		m4Hinge.Enabled = false
		m4Weld.Part0 = nil
		m4.CFrame = myTorso.CFrame * NewCFrame(-0.2,-1,-1) * Angles(rad(75),rad(55),rad(-75)) -- z 35 x 0
		m4Weld.Part0 = myTorso

		--Right Arm Setup
		rShoulder.Part1 = nil
		rArmWeld.Part1 = nil
		rArm.CFrame = myRoot.CFrame * NewCFrame(1.3,-0.2,-0.3) * Angles(rad(30),rad(14),rad(-25))
		rArmWeld.Part1 = rArm

		--Left Arm Setup
		lShoulder.Part1 = nil
		lArmWeld.Part1 = nil
		lArm.CFrame = myRoot.CFrame * NewCFrame(-1.3,-0.1,-0.3) * Angles(rad(40),rad(-3),rad(10)) --x84
		lArmWeld.Part1 = lArm

		wait(0.5)
	end
end

local knife = marine.Knife
function actions.drawKnife()
	if not status:get("knifeEquipped") then
		actions.yieldM4()
		knife.Equip:Play()
		status:set("knifeEquipped",true)
		knife.Weld.Part0 = nil
		knife.CFrame = rArm.CFrame * NewCFrame(0,-1,-1) * Angles(rad(90),rad(180),rad(180))
		knife.Weld.Part0 = rArm
	end
end

function actions.yieldKnife()
	if status:get("knifeEquipped") then
		status:set("knifeEquipped",false)
		knife.Weld.Part0 = nil
		knife.CFrame = myTorso.CFrame * NewCFrame(-1,-1,0.5) * Angles(rad(-65),0,rad(180))
		knife.Weld.Part0 = myTorso
	end
end

function actions.yieldWeapons()
	actions.yieldKnife()
	actions.yieldM4()
end

function actions.resetHead()
	tweenService:Create(neck,TweenInfo.new(0.5),{C0 = NewCFrame(0,1,0) * Angles(rad(-90),0,rad(180))}):Play()
end

local faces = myHead.Faces
function actions.updateFace(newStatus,recovered)
	if status:get("mood") ~= "Dead" then
		if status:get("mood") ~= "Hurt" or recovered or newStatus == "Dead" then
			local currentFace = status:get("currentFace")
			currentFace.Parent = faces
			status:set("currentFace",faces["face"..newStatus])
			status:get("currentFace").Parent = myHead
		end
		status:set("mood",newStatus)
	end
end

return actions


Prompt:
--[=[
	A class which holds data and methods for ScriptSignals.

	@class ScriptSignal
]=]

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


Prompt:
--[[
	Flush all pending actions since the last change event was dispatched.
]]

Response:
function Store:flush()
	if not self._mutatedSinceFlush then
		return
	end

	self._mutatedSinceFlush = false

	-- On self.changed:fire(), further actions may be immediately dispatched, in
	-- which case self._lastState will be set to the most recent self._state,
	-- unless we cache this value first
	local state = self._state

	-- If a changed listener yields, *very* surprising bugs can ensue.
	-- Because of that, changed listeners cannot yield.
	NoYield(function()
		self.changed:fire(state, self._lastState)
	end)

	self._lastState = state
end

return Store


Prompt: --Miscellaneous Settings:

Response:
HANDBRAKE_ANG	= 17	--Angle of handbrake when active in degrees
PADDLE_ANG		= 15	--Angle of paddle shifter
PADDLE_INVERTED	= false	--Sets right paddle to shift down and vice versa
PEDAL_ANGLE		= 55	--Angle of pedals when active in degrees
PED_INVERTED	= true	--Inverts the pedal angle (for top mounted pedals)
SHIFTER_TYPE	= "H"	--"H" for H-Pattern, "Seq" for sequential shifter
SEQ_INVERTED	= false	--Inverts the sequential shifter motion
SHIFT_TIME		= 0.15	--Time it takes to shift between all parts (Clutch pedal, Paddle shifter, Shifter
VERTICAL_ANG	= 10	--Vertical shifter movement angle in degrees
HORIZONTAL_ANG	= 10.0	--Horizontal shifter increments in degrees (H-Pattern only)
STEER_MULT		= 7.0	--Steering multiplier angle (Arbitrary)


Prompt: -- Player specific convenience variables

Response:
local MyPlayer = nil
local MyCharacter = nil
local MyHumanoid = nil
local MyTorso = nil
local MyMouse = nil

local RecoilAnim
local RecoilTrack = nil

local ReloadAnim
local ReloadTrack = nil

local IconURL = Tool.TextureId
local DebrisService = game:GetService('Debris')
local PlayersService = game:GetService('Players')

local FireSound

local OnFireConnection = nil
local OnReloadConnection = nil

local DecreasedAimLastShot = false
local LastSpreadUpdate = time()

local flare = script.Parent:WaitForChild("Flare")


Prompt: ---It's a while wait() because of how badly it interacts with framerate changes

Response:
while wait(0.2) do

	---Activating/Dezactivating the mobile controls
	if script.Parent.Parent.Parent:FindFirstChild("TouchGui") then
		script.Parent.Parent.Parent["TouchGui"].Enabled = false
		script.Parent.Parent.MobileControls.Visible = true
		script.Parent.Parent.PCHandbrake.Visible = false
	else
		script.Parent.Parent.MobileControls.Visible = false
		script.Parent.Parent.PCHandbrake.Visible = true
	end

	if Humanoid.SeatPart ~= nil and Humanoid.SeatPart.Parent:FindFirstChild("Stats") then

		local Cached_Magnitude = Char.Head.Velocity.magnitude
		---Camera shake on collision
		--if Old_Magnitude ~= nil then
		--	print(Cached_Magnitude)
		--	print(Old_Magnitude)
		--	print(Cached_Magnitude - Old_Magnitude)
		--	print("__")
		--end

		if Old_Magnitude ~= nil and Cached_Magnitude - Old_Magnitude < -70 then
			--print("Collision")
			--Sound
			--game.SoundService.CrashSound:Play(0.1)

			-- Explosion shake:
			--camShake:Shake(CameraShaker.Presets.Explosion)
		end
		Old_Magnitude = Cached_Magnitude
	end
end


Prompt: --------------------[ GUI SETUP FUNCTION ]--------------------------------------------

Response:
function convertKey(Key)
	if Key == string.char(8) then
		return "BKSPCE"
	elseif Key == string.char(9) then
		return "TAB"
	elseif Key == string.char(13) then
		return "ENTER"
	elseif Key == string.char(17) then
		return "UP"
	elseif Key == string.char(18) then
		return "DOWN"
	elseif Key == string.char(19) then
		return "RIGHT"
	elseif Key == string.char(20) then
		return "LEFT"
	elseif Key == string.char(22) then
		return "HOME"
	elseif Key == string.char(23) then
		return "END"
	elseif Key == string.char(27) then
		return "F2"
	elseif Key == string.char(29) then
		return "F4"
	elseif Key == string.char(30) then
		return "F5"
	elseif Key == string.char(32) or Key == " " then
		return "F7"
	elseif Key == string.char(33) or Key == "!" then
		return "F8"
	elseif Key == string.char(34) or Key == '"' then
		return "F9"
	elseif Key == string.char(35) or Key == "#" then
		return "F10"
	elseif Key == string.char(37) or Key == "%" then
		return "F12"
	elseif Key == string.char(47) or Key == "/" then
		return "R-SHIFT"
	elseif Key == string.char(48) or Key == "0" then
		return "L-SHIFT"
	elseif Key == string.char(49) or Key == "1" then
		return "R-CTRL"
	elseif Key == string.char(50) or Key == "2" then
		return "L-CTRL"
	elseif Key == string.char(51) or Key == "3" then
		return "R-ALT"
	elseif Key == string.char(52) or Key == "4" then
		return "L-ALT"
	else
		return string.upper(Key)
	end
end

function createControlFrame(Key, Desc, Num)
	local C = Instance.new("Frame")
	C.BackgroundTransparency = ((Num % 2) == 1 and 0.7 or 1)
	C.BorderSizePixel = 0
	C.Name = "C"..Num
	C.Position = UDim2.new(0, 0, 0, Num * 20)
	C.Size = UDim2.new(1, 0, 0, 20)
	C.ZIndex = 10

	local K = Instance.new("TextLabel")
	K.BackgroundTransparency = 1
	K.Name = "Key"
	K.Size = UDim2.new(0, 45, 1, 0)
	K.ZIndex = 10
	K.Font = Enum.Font.ArialBold
	K.FontSize = Enum.FontSize.Size14
	K.Text = Key
	K.TextColor3 = Color3.new(1, 1, 1)
	K.TextScaled = (string.len(Key) > 5)
	K.TextWrapped = (string.len(Key) > 5)
	K.Parent = C

	local D = Instance.new("TextLabel")
	D.BackgroundTransparency = 1
	D.Name = "Desc"
	D.Position = UDim2.new(0, 50, 0, 0)
	D.Size = UDim2.new(1, -50, 1, 0)
	D.ZIndex = 10
	D.Font = Enum.Font.SourceSansBold
	D.FontSize = Enum.FontSize.Size14
	D.Text = "- "..Desc
	D.TextColor3 = Color3.new(1, 1, 1)
	D.TextXAlignment = Enum.TextXAlignment.Left
	D.Parent = C

	C.Parent = Controls
end

function createModes()
	numModes = 0
	for i, v in pairs(S.selectFireSettings.Modes) do
		if v then
			numModes = numModes + 1
		end
	end

	local currentMode = 0
	for i, v in pairs(S.selectFireSettings.Modes) do
		if v then
			local Frame = Instance.new("Frame")
			Frame.BackgroundTransparency = 1
			Frame.Name = currentMode
			Frame.Position = UDim2.new()
			Frame.Size = UDim2.new()
			Frame.Parent = fireModes
			local modeLabel = Instance.new("TextLabel")
			modeLabel.BackgroundTransparency = 1
			modeLabel.Name = "Label"
			modeLabel.Position = UDim2.new(0, -20, 0, 0)
			modeLabel.Size = UDim2.new(0, 40, 0, 20)
			modeLabel.Font = Enum.Font.SourceSansBold
			modeLabel.FontSize = Enum.FontSize.Size18
			modeLabel.Text = string.upper(i)
			modeLabel.TextColor3 = Color3.new(1, 1, 1)
			modeLabel.TextScaled = true
			modeLabel.TextStrokeTransparency = 0
			modeLabel.TextTransparency = 0.5
			modeLabel.TextWrapped = true
			modeLabel.Parent = Frame
			table.insert(Modes, string.upper(i))
			currentMode = currentMode + 1
		end
	end

	guiAngOffset = -15 * (numModes ^ 3) + 150 * (numModes ^ 2) - 525 * numModes + 660
end

function setUpGUI()
	local currentNum = 1

	for _, v in pairs(Controls:GetChildren()) do
		if v.Name ~= "Title" then
			v:Destroy()
		end
	end

	for _, PTable in pairs(Plugins.KeyDown) do
		createControlFrame(convertKey(PTable.Key), PTable.Description, currentNum)
		currentNum = currentNum + 1
	end

	if S.canChangeStance then
		local Dive = (S.dolphinDive and " / Dive" or "")
		createControlFrame(convertKey(S.Keys.lowerStance), "Lower Stance"..Dive, currentNum)
		currentNum = currentNum + 1

		createControlFrame(convertKey(S.Keys.raiseStance), "Raise Stance", currentNum)
		currentNum = currentNum + 1
	end

	if S.selectFire then
		createControlFrame(convertKey(S.Keys.selectFire), "Select Fire", currentNum)
		currentNum = currentNum + 1
	end

	createControlFrame(convertKey(S.Keys.Reload), "Reload", currentNum)
	currentNum = currentNum + 1

	createControlFrame(convertKey(S.Keys.Sprint), "Sprint", currentNum)
	currentNum = currentNum + 1

	if S.canADS then
		local Hold = (S.aimSettings.holdToADS and "HOLD " or "")
		if S.Keys.ADS ~= "" then
			createControlFrame(Hold..convertKey(S.Keys.ADS).." OR R-MOUSE", "Aim Down Sights", currentNum)
		else
			createControlFrame(Hold.." R-MOUSE", "Aim Down Sights", currentNum)
		end
		currentNum = currentNum + 1
	end

	Controls.Size = UDim2.new(1, 0, 0, currentNum * 20)
	Controls.Position = UDim2.new(0, 0, 0, -(currentNum * 20) - 80)

	if S.guiScope then
		scopeSteady.Text = "Hold "..convertKey(S.Keys.scopeSteady).." to Steady"
	end

	if mainGUI:FindFirstChild("Co") then
		mainGUI.Co:Destroy()
	end
	local Co = Instance.new("TextLabel")
	Co.BackgroundTransparency = 1
	Co.Name = "Co"
	Co.Visible = true
	Co.Position = UDim2.new(0, 0, 0, 0)
	Co.Size = UDim2.new(1, 0, 0, 20)
	Co.Font = Enum.Font.ArialBold
	Co.FontSize = Enum.FontSize.Size14
	Co.Text = ("~ soidutS s'tEhYuM morf srepoleved yb ekameR // tik nug noisuFobruT ~"):reverse()
	Co.TextColor3 = Color3.new(1, 1, 1)
	Co.TextStrokeColor3 = Color3.new(1, 1, 1)
	Co.TextStrokeTransparency = 0.9
	Co.TextTransparency = 0.9
	Co.TextXAlignment = Enum.TextXAlignment.Center
	Co.Parent = mainGUI

	gunNameTitle.Text = Gun.Name

	updateClipAmmo()
	updateStoredAmmo()

	fireModes:ClearAllChildren()
	createModes()
	updateModeLabels(numModes - 1, 0, 90)

	if S.selectFire then
		modeGUI.Text = Modes[((rawFireMode - 1) % numModes) + 1]
	else
		modeGUI.Text = (
			S.gunType.Semi and "SEMI" or
			S.gunType.Auto and "AUTO" or
			S.gunType.Burst and "BURST" or
			"SAFETY"
		)
	end
end


Prompt: -- wait for local player PlayerGui

Response:
local LocalPlayer = Players.LocalPlayer
local playerGui = LocalPlayer:WaitForChild("PlayerGui")


Prompt: --Original script by Luckymaxer

Response:
Model = script.Parent
local SoundLoop
local Whinny
sound = false
Players = game:GetService("Players")
Debris = game:GetService("Debris")
RunService = game:GetService("RunService")

Humanoid = Model:WaitForChild("Humanoid")
Humanoid.Health = Humanoid.MaxHealth
Seat = Model:WaitForChild("Seat")
Torso = Model:WaitForChild("Torso")

InteractiveControl = script:WaitForChild("InteractiveControl")

Animations = {
	Walk = {Animation = script:WaitForChild("Walk"), FadeTime = nil, Weight = nil, Speed = 0.5},
	Idle = {Animation = script:WaitForChild("Idle"), FadeTime = nil, Weight = nil, Speed = 1},
	Ride = {Animation = script:WaitForChild("Ride"), FadeTime = 0.25, Weight = nil, Speed = nil},
	Rear = {Animation = script:WaitForChild("Rearing"), FadeTime = 0.25, Weight = nil, Speed = 2},
	Jump = {Animation = script:WaitForChild("Jump"), FadeTime = nil, Weight = nil, Speed = 1},
}

Walking = false
Rider = nil

AngularVelocity = (Torso:FindFirstChild("BodyAngularVelocity") or Instance.new("BodyAngularVelocity"))
AngularVelocity.Name = "BodyAngularVelocity"
AngularVelocity.P = 1250
AngularVelocity.AngularVelocity = Vector3.new(0, 0, 0)
AngularVelocity.maxTorque = Vector3.new(0, math.huge, 0)
AngularVelocity.Parent = Torso

Velocity = (Torso:FindFirstChild("BodyVelocity") or Instance.new("BodyVelocity"))
Velocity.Name = "BodyVelocity"
Velocity.maxForce = Vector3.new(math.huge, 0, math.huge)
Velocity.Parent = Torso

WalkTrack = Humanoid:LoadAnimation(Animations.Walk.Animation)
IdleTrack = Humanoid:LoadAnimation(Animations.Idle.Animation)
RearTrack = Humanoid:LoadAnimation(Animations.Rear.Animation)
JumpTrack = Humanoid:LoadAnimation(Animations.Jump.Animation)

Remotes = script:WaitForChild("Remotes")
Remotes:ClearAllChildren()

LastJump = 0
Disabled = false

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

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

function OnServerInvoke(player, Mode, Value)
	if player ~= Rider or not Mode then
		return
	end
	if Mode == "Jump" then
		local Now = tick()
		if (Now - LastJump) >= 1 then
			LastJump = Now
			Humanoid.Jump = true
				local Animation = Animations.Jump
				JumpTrack:Play(Animation.FadeTime, Animation.Weight, Animation.Speed)
		end
	elseif Mode == "Dismount" then
		Dismount()
	end
end

ServerControl.OnServerInvoke = OnServerInvoke

Humanoid.Changed:connect(function(Property)
	if Property == "Sit" and Humanoid.Sit then
		Humanoid.Sit = false
	end
end)

Humanoid.Died:connect(function()
	Disabled = true
	Debris:AddItem(Model, 3)
	Model:BreakJoints()
end)

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

function Audio(ID, Location, Looped, Volume, Duration)
	local Sound = Instance.new("Sound", Location)
	Sound.SoundId = "http://www.roblox.com/asset/?id=" .. ID
	Sound.Volume = Volume
	Sound.Looped = Looped
	if Duration then
		game:GetService("Debris"):AddItem(Sound, Duration)
	end
	return Sound -- use as Audio(134973578, FrontTorso, true, 2)
end

function Animate(Time)
	if Humanoid.Health == 0 or Disabled then
		return
	end
	--Walking
	if not Walking and Torso.Velocity.magnitude > 1 then
		IdleTrack:Stop()
		local Animation = Animations.Walk
		WalkTrack:Play(Animation.FadeTime, Animation.Weight, Animation.Speed)
		Walking = true
	end
	if Walking and Torso.Velocity.magnitude < 1 then
		WalkTrack:Stop()
		local Animation = Animations.Idle
		IdleTrack:Play(Animation.FadeTime, Animation.Weight, Animation.Speed)
		Walking = false
	end
	--Motion
	if Seat.Throttle ~= 10 then
	Velocity.velocity = (Torso.CFrame.lookVector * Seat.Throttle * Humanoid.WalkSpeed*1)
	AngularVelocity.AngularVelocity = Vector3.new(3, (2 * -Seat.Steer), 0)--steer speed
	else
	Velocity.velocity = Vector3.new(0,0, 0) --Erase for moonwalk
	Whinny = Audio(178645076, Torso, false, 3)
		if sound==false then
			sound = true
				local Animation = Animations.Rear
				RearTrack:Play(Animation.FadeTime, Animation.Weight, Animation.Speed)
				Whinny:Play()
				Whinny.Volume = 10
				Whinny.Pitch = 1
				wait(2)
			sound = false
		end
	end

	--Sound
	if not SoundLoop then
		SoundLoop = Audio(134973578, Torso, true, 0)
	elseif Torso.Velocity.magnitude > 1 then
		if not SoundLoop.IsPlaying then
			SoundLoop:Play()
		end
		SoundLoop.Volume = 10
		SoundLoop.Pitch = ((1.2 - .55) * (Torso.Velocity.Magnitude / script.Parent.MaxSpeed.Value)) + .55
	else
		SoundLoop:Stop()
	end
	if JumpTrack.IsPlaying then
		SoundLoop:Stop()
	end
end

function Dismount()
	if Rider and Rider.Parent then
		local Character = Rider.Character
		if Character then
			local Humanoid = nil
			for i, v in pairs(Character:GetChildren()) do
				if v:IsA("Humanoid") then
					Humanoid = v
					break
				end
			end
			Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
			Humanoid.Jump = true
		end
	end
end

function PlayerSeated(Child)
	local function BreakWeld()
		Debris:AddItem(Child, 0.5)
		if Child and Child.Parent then
			Child:Destroy()
		end
	end
	if not Child:IsA("Weld") or not Child.Name == "SeatWeld" then
		return
	end
	if Child.Part0 ~= Seat or not Child.Part1 or not Child.Part1.Parent then
		return
	end
	Child.C1 = (Child.C1 * CFrame.new(0, 0.5, 0.375))
	local character = Child.Part1.Parent
	local humanoid = character:FindFirstChild("Humanoid")
	if humanoid then
		local Animation = Animations.Ride
		RideTrack = humanoid:LoadAnimation(Animation.Animation)
		RideTrack:Play(Animation.FadeTime, Animation.Weight, Animation.Speed)
	end
	local Player = Players:GetPlayerFromCharacter(character)
	if not Player then
		BreakWeld()
		return
	end
	local PlayerGui = Player:FindFirstChild("PlayerGui")
	if not PlayerGui then
		BreakWeld()
		return
	end
	InteractiveControlCopy = InteractiveControl:Clone()
	local ServerCommunication = Instance.new("ObjectValue")
	ServerCommunication.Name = "ServerControl"
	ServerCommunication.Value = ServerControl
	ServerCommunication.Parent = InteractiveControlCopy
	InteractiveControlCopy.Disabled = false
	InteractiveControlCopy.Parent = PlayerGui
	Rider = Player
end

function PlayerDismounted(Child)
	if not Child:IsA("Weld") or not Child.Name == "SeatWeld" then
		return
	end
	if not Child.Part1 or not Child.Part1.Parent then
		return
	end
	local Player = Players:GetPlayerFromCharacter(Child.Part1.Parent)
	if not Player or Player ~= Rider then
		return
	end
	if InteractiveControlCopy and InteractiveControlCopy.Parent then
		InteractiveControlCopy:Destroy()
	end
	if RideTrack then
		RideTrack:Stop()
	end
	Rider = nil
end

RunService.Heartbeat:connect(Animate)
Seat.ChildAdded:connect(PlayerSeated)
Seat.ChildRemoved:connect(PlayerDismounted)


Prompt: --[[Wheel Configuration]]

Response:
	--Store Reference Orientation Function
	function getParts(model,t,a)
		for i,v in pairs(model:GetChildren()) do
			if v:IsA("BasePart") then table.insert(t,{v,a.CFrame:toObjectSpace(v.CFrame)})
			elseif v:IsA("Model") then getParts(v,t,a)
			end
		end
	end

	--PGS/Legacy
	local fDensity = _Tune.FWheelDensity
	local rDensity = _Tune.RWheelDensity
	if not PGS_ON then
		fDensity = _Tune.FWLgcyDensity
		rDensity = _Tune.RWLgcyDensity
	end

	local fDistX=_Tune.FWsBoneLen*math.cos(math.rad(_Tune.FWsBoneAngle))
	local fDistY=_Tune.FWsBoneLen*math.sin(math.rad(_Tune.FWsBoneAngle))
	local rDistX=_Tune.RWsBoneLen*math.cos(math.rad(_Tune.RWsBoneAngle))
	local rDistY=_Tune.RWsBoneLen*math.sin(math.rad(_Tune.RWsBoneAngle))

	local fSLX=_Tune.FSusLength*math.cos(math.rad(_Tune.FSusAngle))
	local fSLY=_Tune.FSusLength*math.sin(math.rad(_Tune.FSusAngle))
	local rSLX=_Tune.RSusLength*math.cos(math.rad(_Tune.RSusAngle))
	local rSLY=_Tune.RSusLength*math.sin(math.rad(_Tune.RSusAngle))

	for _,v in pairs(Drive) do
		--Apply Wheel Density
		if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then
			if v:IsA("BasePart") then
				if v.CustomPhysicalProperties == nil then v.CustomPhysicalProperties = PhysicalProperties.new(v.Material) end
				v.CustomPhysicalProperties = PhysicalProperties.new(
					fDensity,
					v.CustomPhysicalProperties.Friction,
					v.CustomPhysicalProperties.Elasticity,
					v.CustomPhysicalProperties.FrictionWeight,
					v.CustomPhysicalProperties.ElasticityWeight
				)
			end
		else
			if v:IsA("BasePart") then
				if v.CustomPhysicalProperties == nil then v.CustomPhysicalProperties = PhysicalProperties.new(v.Material) end
				v.CustomPhysicalProperties = PhysicalProperties.new(
					rDensity,
					v.CustomPhysicalProperties.Friction,
					v.CustomPhysicalProperties.Elasticity,
					v.CustomPhysicalProperties.FrictionWeight,
					v.CustomPhysicalProperties.ElasticityWeight
				)
			end
		end

		--Resurface Wheels
		for _,a in pairs({"Top","Bottom","Left","Right","Front","Back"}) do
			v[a.."Surface"]=Enum.SurfaceType.SmoothNoOutlines
		end

		--Store Axle-Anchored/Suspension-Anchored Part Orientation
		local WParts = {}

		local tPos = v.Position-car.DriveSeat.Position
		if v.Name=="FL" or v.Name=="RL" then
			v.CFrame = car.DriveSeat.CFrame*CFrame.Angles(math.rad(90),0,math.rad(90))
		else
			v.CFrame = car.DriveSeat.CFrame*CFrame.Angles(math.rad(90),0,math.rad(-90))
		end
		v.CFrame = v.CFrame+tPos

		if v:FindFirstChild("Parts")~=nil then
			getParts(v.Parts,WParts,v)
		end
		if v:FindFirstChild("Fixed")~=nil then
			getParts(v.Fixed,WParts,v)
		end

		--Align Wheels
		if v.Name=="FL" or v.Name=="FR" then
			v.CFrame = v.CFrame*CFrame.Angles(math.rad(_Tune.FCamber),0,0)
			if v.Name=="FL" then v.CFrame = v.CFrame*CFrame.Angles(0,math.rad(-_Tune.FCaster),0) end
			if v.Name=="FR" then v.CFrame = v.CFrame*CFrame.Angles(0,math.rad(_Tune.FCaster),0) end
			if v.Name=="FL" then
				v.CFrame = v.CFrame*CFrame.Angles(0,0,math.rad(_Tune.FToe))
			else
				v.CFrame = v.CFrame*CFrame.Angles(0,0,math.rad(-_Tune.FToe))
			end
		elseif v.Name=="RL" or v.Name=="RR" then
			v.CFrame = v.CFrame*CFrame.Angles(math.rad(_Tune.RCamber),0,0)
			if v.Name=="RL" then
				v.CFrame = v.CFrame*CFrame.Angles(0,0,math.rad(_Tune.RToe))
			else
				v.CFrame = v.CFrame*CFrame.Angles(0,0,math.rad(-_Tune.RToe))
			end
		end

		--Re-orient Axle-Anchored/Suspension-Anchored Parts
		for _,a in pairs(WParts) do
			a[1].CFrame=v.CFrame:toWorldSpace(a[2])
		end


Prompt: -- Data Type Handling

Response:
local function ToString(value, type)
	if type == "float" then
		return tostring(Round(value,2))
	elseif type == "Content" then
		if string.find(value,"/asset") then
			local match = string.find(value, "=") + 1
			local id = string.sub(value, match)
			return id
		else
			return tostring(value)
		end
	elseif type == "Vector2" then
		local x = value.x
		local y = value.y
		return string.format("%g, %g", x,y)
	elseif type == "Vector3" then
		local x = value.x
		local y = value.y
		local z = value.z
		return string.format("%g, %g, %g", x,y,z)
	elseif type == "Color3" then
		local r = value.r
		local g = value.g
		local b = value.b
		return string.format("%d, %d, %d", r*255,g*255,b*255)
	elseif type == "UDim2" then
		local xScale = value.X.Scale
		local xOffset = value.X.Offset
		local yScale = value.Y.Scale
		local yOffset = value.Y.Offset
		return string.format("{%d, %d}, {%d, %d}", xScale, xOffset, yScale, yOffset)
	else
		return tostring(value)
	end
end

local function ToValue(value,type)
	if type == "Vector2" then
		local list = Split(value,",")
		if #list < 2 then return nil end
		local x = tonumber(list[1]) or 0
		local y = tonumber(list[2]) or 0
		return Vector2_new(x,y)
	elseif type == "Vector3" then
		local list = Split(value,",")
		if #list < 3 then return nil end
		local x = tonumber(list[1]) or 0
		local y = tonumber(list[2]) or 0
		local z = tonumber(list[3]) or 0
		return Vector3_new(x,y,z)
	elseif type == "Color3" then
		local list = Split(value,",")
		if #list < 3 then return nil end
		local r = tonumber(list[1]) or 0
		local g = tonumber(list[2]) or 0
		local b = tonumber(list[3]) or 0
		return Color3_new(r/255,g/255, b/255)
	elseif type == "UDim2" then
		local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
		if #list < 4 then return nil end
		local xScale = tonumber(list[1]) or 0
		local xOffset = tonumber(list[2]) or 0
		local yScale = tonumber(list[3]) or 0
		local yOffset = tonumber(list[4]) or 0
		return UDim2_new(xScale, xOffset, yScale, yOffset)
	elseif type == "Content" then
		if tonumber(value) ~= nil then
			value = ContentUrl .. value
		end
		return value
	elseif type == "float" or type == "int" or type == "double" then
		return tonumber(value)
	elseif type == "string" then
		return value
	elseif type == "NumberRange" then
		local list = Split(value,",")
		if #list == 1 then
			if tonumber(list[1]) == nil then return nil end
			local newVal = tonumber(list[1]) or 0
			return NumberRange.new(newVal)
		end
		if #list < 2 then return nil end
		local x = tonumber(list[1]) or 0
		local y = tonumber(list[2]) or 0
		return NumberRange.new(x,y)
	elseif type == "UserName" then
		return Players:FindFirstChild(value)
	else
		return nil
	end
end


Prompt: --welds

Response: RW, LW = Instance.new("Weld"), Instance.new("Weld")


Prompt:
--[=[
	Returns the magnitude of the linear value.

	@return number -- The magnitude of the linear value.
]=]

Response:
function LinearValue:GetMagnitude()
	local dot = 0
	for i=1, #self._values do
		local value = self._values[i]
		dot = dot + value*value
	end
	return math.sqrt(dot)
end


Prompt: --[[Steering]]

Response:
	Tune.SteerInner		= 45		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 45		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= 1000		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= 1000		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 320		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 1 		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree

	--Steer Gyro Tuning
	Tune.SteerD			= 1000		-- Steering Dampening
	Tune.SteerMaxTorque	= 50000		-- Steering Force
	Tune.SteerP			= 20000	    -- Steering Aggressiveness


Prompt: -- functions

Response:
local function wait(t)
	local start	= tick()
	repeat
		RunService.Stepped:Wait()
	until tick() - start >= t
end

local function Raycast(position, direction, ignore)
	local ray		= Ray.new(position, direction)
	local success	= false
	local h, p, n, humanoid

	table.insert(ignore, Workspace.Effects)

	repeat
		h, p, n	= Workspace:FindPartOnRayWithIgnoreList(ray, ignore)

		if h then
			humanoid	= h.Parent:FindFirstChildOfClass("Humanoid")
			if humanoid and humanoid.Health <= 0 then
				humanoid	= nil
			end
			if humanoid then
				success	= true
			else
				if h.CanCollide and h.Transparency < 1 then
					success	= true
				else
					table.insert(ignore, h)
					success	= false
				end
			end
		else
			success	= true
		end
	until success

	return h, p, n, humanoid
end


Prompt: -- Main Work --

Response:
myaccbtn.MouseButton1Click:Connect(function()

	myaccpage:TweenPosition(openState, 'Out', 'Sine', '1')
	deppage:TweenPosition(closeState, 'Out', 'Sine', '1')
	wthpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	trnpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	cshpage:TweenPosition(closeState, 'Out', 'Sine', '1')

end)

depbtn.MouseButton1Click:Connect(function()

	myaccpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	deppage:TweenPosition(openState, 'Out', 'Sine', '1')
	wthpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	trnpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	cshpage:TweenPosition(closeState, 'Out', 'Sine', '1')

end)

wthbtn.MouseButton1Click:Connect(function()

	myaccpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	deppage:TweenPosition(closeState, 'Out', 'Sine', '1')
	wthpage:TweenPosition(openState, 'Out', 'Sine', '1')
	trnpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	cshpage:TweenPosition(closeState, 'Out', 'Sine', '1')

end)

trnbtn.MouseButton1Click:Connect(function()

	myaccpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	deppage:TweenPosition(closeState, 'Out', 'Sine', '1')
	wthpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	trnpage:TweenPosition(openState, 'Out', 'Sine', '1')
	cshpage:TweenPosition(closeState, 'Out', 'Sine', '1')

end)

cshbtn.MouseButton1Click:Connect(function()

		myaccpage:TweenPosition(closeState, 'Out', 'Sine', '1')
		deppage:TweenPosition(closeState, 'Out', 'Sine', '1')
		wthpage:TweenPosition(closeState, 'Out', 'Sine', '1')
		trnpage:TweenPosition(closeState, 'Out', 'Sine', '1')
		cshpage:TweenPosition(openState, 'Out', 'Sine', '1')
end)


Response:
local _WHEELTUNE = {
																		--[[
			SS6 Presets
	[Eco]
		WearSpeed = 1,
		TargetFriction = .7,
		MinFriction = .1,
	[Road]
		WearSpeed = 2,
		TargetFriction = .7,
		MinFriction = .1,
	[Sport]
		WearSpeed = 3,
		TargetFriction = .79,
		MinFriction = .1,											]]

	TireWearOn 		= true	,

	--Friction and Wear
	FWearSpeed		= .1	,
	FTargetFriction	= .75	,
	FMinFriction 	= .1	,

	RWearSpeed		= .1	,
	RTargetFriction	= .75	,
	RMinFriction	= .1	,

	--Tire Slip
	TCSOffRatio		= 1		,
	WheelLockRatio	= 1/4	,	--SS6 Default = 1/4
	WheelspinRatio	= 1/1.2	,	--SS6 Default = 1/1.2

	--Wheel Properties
	FFrictionWeight	= 1		,	--SS6 Default = 1
	RFrictionWeight	= 1		,	--SS6 Default = 1
	FLgcyFrWeight	= 10	,
	RLgcyFrWeight	= 10	,

	FElasticity		= .5		,	--SS6 Default = .5
	RElasticity		= .5		,	--SS6 Default = .5
	FLgcyElasticity	= 0		,
	RLgcyElasticity	= 0		,

	FElastWeight	= 1		,	--SS6 Default = 1
	RElastWeight	= 1		,	--SS6 Default = 1
	FLgcyElWeight	= 10	,
	RLgcyElWeight	= 10	,

	--Wear Regen
	RegenSpeed		= 3.6		--SS6 Default = 3.6
}


Prompt: --Brake.InputChanged:Connect(TouchBrake)

Response:
local function TouchHandbrake(input, GPE)
	if input.UserInputState == Enum.UserInputState.Begin then
		_PBrake = not _PBrake
	elseif input.UserInputState == Enum.UserInputState.End then
		if car.DriveSeat.Velocity.Magnitude>5 then
			_PBrake = false
		end
	end
end
Handbrake.InputBegan:Connect(TouchHandbrake)
Handbrake.InputEnded:Connect(TouchHandbrake)


Response:
while true do
	wait(3)
	--UpdateEveryone()  commented out by David.  OtherStats isn't currently being used anywhere
end


Prompt:
-- Moves a tree node to a new parent. Called when an existing object's parent
-- changes.

Response:
local function moveObject(object,parent)
	local objectNode = NodeLookup[object]
	if not objectNode then
		return
	end

	local parentNode = NodeLookup[parent]
	if not parentNode then
		return
	end

	local visible = nodeIsVisible(objectNode)

	remove(objectNode.Parent,objectNode.Index)
	objectNode.Parent = parentNode

	objectNode.Depth = depth(object)
	local function r(node,d)
		for i = 1,#node do
			node[i].Depth = d
			r(node[i],d+1)
		end
	end
	r(objectNode,objectNode.Depth+1)

	insert(parentNode,#parentNode+1,objectNode)

	if visible or nodeIsVisible(objectNode) then
		updateList()
	elseif nodeIsVisible(objectNode.Parent) then
		updateScroll()
	end
end


Prompt: --// Animations

Response:
local L_171_

function IdleAnim(L_342_arg1)
	L_24_.IdleAnim(L_3_, L_171_, {
		L_45_,
		L_46_,
		L_47_
	});
end;

function EquipAnim(L_343_arg1)
	L_24_.EquipAnim(L_3_, L_171_, {
		L_45_
	});
end;

function UnequipAnim(L_344_arg1)
	L_24_.UnequipAnim(L_3_, L_171_, {
		L_45_
	});
end;

function FireModeAnim(L_345_arg1)
	L_24_.FireModeAnim(L_3_, L_171_, {
		L_45_,
		L_47_,
		L_46_,
		L_58_
	});
end

function ReloadAnim(L_346_arg1)
	L_24_.ReloadAnim(L_3_, L_171_, {
		L_45_,
		L_46_,
		L_47_,
		L_61_,
		L_3_:WaitForChild('Left Arm'),
		L_58_,
		L_49_,
		L_3_:WaitForChild('Right Arm'),
		L_43_
	});
end;

function BoltingBackAnim(L_347_arg1)
	L_24_.BoltingBackAnim(L_3_, L_171_, {
		L_49_
	});
end

function BoltingForwardAnim(L_348_arg1)
	L_24_.BoltingForwardAnim(L_3_, L_171_, {
		L_49_
	});
end

function BoltingForwardAnim(L_349_arg1)
	L_24_.BoltingForwardAnim(L_3_, L_171_, {
		L_49_
	});
end

function BoltBackAnim(L_350_arg1)
	L_24_.BoltBackAnim(L_3_, L_171_, {
		L_49_,
		L_47_,
		L_46_,
		L_45_,
		L_62_
	});
end

function BoltForwardAnim(L_351_arg1)
	L_24_.BoltForwardAnim(L_3_, L_171_, {
		L_49_,
		L_47_,
		L_46_,
		L_45_,
		L_62_
	});
end

function InspectAnim(L_352_arg1)
	L_24_.InspectAnim(L_3_, L_171_, {
		L_47_,
		L_46_
	});
end

function nadeReload(L_353_arg1)
	L_24_.nadeReload(L_3_, L_171_, {
		L_46_,
		L_47_
	});
end

function AttachAnim(L_354_arg1)
	L_24_.AttachAnim(L_3_, L_171_, {
		L_46_,
		L_47_
	});
end

function PatrolAnim(L_355_arg1)
	L_24_.PatrolAnim(L_3_, L_171_, {
		L_46_,
		L_47_
	});
end


Prompt: -- Decompiled with Visenya | https://targaryentech.com

Response:
local car = script.Parent.Car.Value
local cam = workspace.CurrentCamera
local RS = game:GetService("RunService")
car.DriveSeat.ChildRemoved:connect(function(child)
  if child.Name == "SeatWeld" then
    RS:UnbindFromRenderStep("MCam")
    cam.CameraType = Enum.CameraType.Custom
  end
end)
script.Parent.Values.MouseSteerOn.Changed:connect(function(property)
  if script.Parent.Values.MouseSteerOn.Value then
    RS:BindToRenderStep("MCam", Enum.RenderPriority.Camera.Value, function()
      cam.CameraType = Enum.CameraType.Scriptable
      local pspeed = math.min(1, car.DriveSeat.Velocity.Magnitude / 500)
      local cc = car.DriveSeat.Position + Vector3.new(0, 8 + pspeed * 2, 0) - car.DriveSeat.CFrame.lookVector * 17 + car.DriveSeat.Velocity.Unit * -7 * pspeed
      cam.CoordinateFrame = CFrame.new(cc, car.DriveSeat.Position)
    end)
  else
    RS:UnbindFromRenderStep("MCam")
    cam.CameraType = Enum.CameraType.Custom
  end
end)


Prompt:
--[[
	Adds a Spring to be updated every render step.
]]

Response:
function SpringScheduler.add(spring: Spring)
	local damping = spring._damping
	local speed = spring._speed

	local dampingBucket = springBuckets[damping]

	if dampingBucket == nil then
		springBuckets[damping] = {
			[speed] = setmetatable({[spring] = true}, WEAK_KEYS_METATABLE)
		}
		return
	end

	local speedBucket = dampingBucket[speed]

	if speedBucket == nil then
		dampingBucket[speed] = setmetatable({[spring] = true}, WEAK_KEYS_METATABLE)
		return
	end

	speedBucket[spring] = true
end


Prompt:
--[[
	automatically assings an ID for the user
--]]

Response:
game.Players.PlayerAdded:Connect(function(plr)
	Network:assign_id(plr)
end)


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

Response:
local l__Character__1 = game.Players.LocalPlayer.Character;
local l__Humanoid__2 = l__Character__1:WaitForChild("Humanoid");
local l__StarterGui__3 = game:GetService("StarterGui");
local l__HumanoidRootPart__4 = l__Character__1:WaitForChild("HumanoidRootPart");
l__StarterGui__3:SetCore("ResetButtonCallback", true);
l__HumanoidRootPart__4:GetPropertyChangedSignal("Anchored"):Connect(function()
	print("god");
	if l__HumanoidRootPart__4.Anchored == true then
		print("lol");
		l__StarterGui__3:SetCore("ResetButtonCallback", false);
		return;
	end;
	if l__HumanoidRootPart__4.Anchored == false then
		l__StarterGui__3:SetCore("ResetButtonCallback", true);
	end;
end);


Prompt: --If not admin, delete admin panel

Response:
if not table.find(admins, plrId) then
	panel:Destroy()


Prompt:
--[[

= DigitalSwirl =

Source: CommonModules/Switch.lua
Purpose: Switch case implementation
Author(s): Regan "CD/TheGreenDeveloper" Green

--]]

Response:
return function(v, a, cases)
	if cases[v] ~= nil then
		return cases[v](unpack(a))
	end
end


Prompt: --------RIGHT DOOR --------

Response:
game.Workspace.doorright.l31.BrickColor = BrickColor.new(1)
game.Workspace.doorright.l32.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(1)
game.Workspace.doorright.l61.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l62.BrickColor = BrickColor.new(1)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(21)


Prompt:
--[[Remotes.Main1.OnServerEvent:Connect(function(plr,firingtype)

end)]]


Prompt: --- Creates a listable type from a singlular type

Response:
function Util.MakeListableType(type, override)
	local listableType = {
		Listable = true,
		Transform = type.Transform,
		Validate = type.Validate,
		ValidateOnce = type.ValidateOnce,
		Autocomplete = type.Autocomplete,
		Default = type.Default,
		Parse = function(...)
			return {type.Parse(...)}
		end
	}

	if override then
		for key, value in pairs(override) do
			listableType[key] = value
		end
	end

	return listableType
end

local function encodeCommandEscape(text)
	return (text:gsub("\\%$", "___!CMDR_DOLLAR!___"))
end

local function decodeCommandEscape(text)
	return (text:gsub("___!CMDR_DOLLAR!___", "$"))
end

function Util.RunCommandString(dispatcher, commandString)
	commandString = Util.ParseEscapeSequences(commandString)
	commandString = Util.EncodeEscapedOperators(commandString)

	local commands = commandString:split("&&")

	local output = ""
	for i, command in ipairs(commands) do
		local outputEncoded = output:gsub("%$", "\\x24"):gsub("%%","%%%%")
		command = command:gsub("||", output:find("%s") and ("%q"):format(outputEncoded) or outputEncoded)

		output = tostring(
			dispatcher:EvaluateAndRun(
				(
					Util.RunEmbeddedCommands(dispatcher, command)
				)
			)
		)

		if i == #commands then
			return output
		end
	end
end


Prompt: --// Holstering

Response:
	HolsteringEnabled = false;
	HolsterPos = CFrame.new(0.340751064, 0.1, 0.616261482, -4.10752676e-08, -0.342020065, 0.939692616, -1.49501727e-08, 0.939692557, 0.342020094, -0.99999994, 0, -4.37113847e-08);


Prompt:
--local url = "https://40-percent-updates.smktd.repl.co/get_updates"
--local current_version = script.Parent.Connector:InvokeServer(url)
--local main = script.Parent.Parent.Parent
--local version = main.Properties.Version
--local update_notifier = main.Popups.UpdateNotifier


Prompt: -- ROBLOX Services

Response:
local Players = game.Players
local Debris = game.Debris


Prompt: --Controls

Response:
Tune.Peripherals = {
	MSteerWidth				= 67		,			-- 0 - 100% of screen width
	MSteerDZone				= 20		,			-- 0 - 100%

	ControlLDZone			= 5			,			-- 0 - 100%
	ControlRDZone			= 5			,			-- 0 - 100%
}

Tune.Controls = {
	ToggleTCS				= Enum.KeyCode.T					,
	ToggleTransMode			= Enum.KeyCode.M					,
	ToggleMouseDrive		= Enum.KeyCode.R					,

	Throttle				= Enum.KeyCode.Up					,
	Brake					= Enum.KeyCode.Down					,
	SteerLeft				= Enum.KeyCode.Left					,
	SteerRight				= Enum.KeyCode.Right				,

	Throttle2				= Enum.KeyCode.W					,
	Brake2					= Enum.KeyCode.S					,
	SteerLeft2				= Enum.KeyCode.A					,
	SteerRight2				= Enum.KeyCode.D					,

	ShiftUp					= Enum.KeyCode.E					,
	ShiftDown				= Enum.KeyCode.Q					,
	Clutch					= Enum.KeyCode.LeftShift			,
	PBrake					= Enum.KeyCode.P					,

	MouseThrottle			= Enum.UserInputType.MouseButton1	,
	MouseBrake				= Enum.UserInputType.MouseButton2	,
	MouseClutch				= Enum.KeyCode.W					,
	MouseShiftUp			= Enum.KeyCode.E					,
	MouseShiftDown			= Enum.KeyCode.Q					,
	MousePBrake				= Enum.KeyCode.LeftShift			,

	ContlrThrottle			= Enum.KeyCode.ButtonR2				,
	ContlrBrake				= Enum.KeyCode.ButtonL2				,
	ContlrSteer				= Enum.KeyCode.Thumbstick1			,
	ContlrShiftUp			= Enum.KeyCode.ButtonY				,
	ContlrShiftDown			= Enum.KeyCode.ButtonX				,
	ContlrClutch			= Enum.KeyCode.ButtonR1				,
	ContlrPBrake			= Enum.KeyCode.ButtonL1				,
	ContlrToggleTMode		= Enum.KeyCode.DPadUp				,
	ContlrToggleTCS			= Enum.KeyCode.DPadDown				,
}
return Tune


Prompt:
-- -- -- -- -- -- --
--DIRECTION SCROLL--
-- -- -- -- -- -- --

Response:
while true do
	wait()
	if Elevator:WaitForChild("Direction").Value ~= 0 then
		for S=0,7 do
			wait(0.4)
			if Elevator:WaitForChild("Direction").Value == 0 then break end
			SetDisplay(1,(Elevator:WaitForChild("Direction").Value == 1 and "U" or "D")..S)
		end
	else
		SetDisplay(1,"NIL")
	end
end


Prompt: --------STAGE LIGHTS--------

Response:
game.Workspace.sb1.BrickColor = BrickColor.new(194)
game.Workspace.sb2.BrickColor = BrickColor.new(194)
game.Workspace.sb3.BrickColor = BrickColor.new(194)
game.Workspace.sb4.BrickColor = BrickColor.new(194)
game.Workspace.sb5.BrickColor = BrickColor.new(194)
game.Workspace.sb6.BrickColor = BrickColor.new(194)
game.Workspace.post1.Light.BrickColor = BrickColor.new(194)
game.Workspace.post2.Light.BrickColor = BrickColor.new(194)
game.Workspace.post3.Light.BrickColor = BrickColor.new(194)
game.Workspace.post4.Light.BrickColor = BrickColor.new(194)


Prompt: -- Other

Response:
local CurrentOccupant = nil
local Vector3New,CFrameNew,CFrameAngles,MathRad,MathAbs = Vector3.new,CFrame.new,CFrame.Angles,math.rad,math.abs


Prompt: -- [[ VR Support Section ]] --

Response:
function BaseCamera:ApplyVRTransform()
	if not VRService.VREnabled then
		return
	end

	--we only want this to happen in first person VR
	local rootJoint = self.humanoidRootPart and self.humanoidRootPart:FindFirstChild("RootJoint")
	if not rootJoint then
		return
	end

	local cameraSubject = game.Workspace.CurrentCamera.CameraSubject
	local isInVehicle = cameraSubject and cameraSubject:IsA("VehicleSeat")

	if self.inFirstPerson and not isInVehicle then
		local vrFrame = VRService:GetUserCFrame(Enum.UserCFrame.Head)
		local vrRotation = vrFrame - vrFrame.p
		rootJoint.C0 = CFrame.new(vrRotation:vectorToObjectSpace(vrFrame.p)) * CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
	else
		rootJoint.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
	end
end

function BaseCamera:IsInFirstPerson()
	return self.inFirstPerson
end

function BaseCamera:ShouldUseVRRotation()
	if not VRService.VREnabled then
		return false
	end

	if not self.VRRotationIntensityAvailable and tick() - self.lastVRRotationIntensityCheckTime < 1 then
		return false
	end

	local success, vrRotationIntensity = pcall(function() return StarterGui:GetCore("VRRotationIntensity") end)
	self.VRRotationIntensityAvailable = success and vrRotationIntensity ~= nil
	self.lastVRRotationIntensityCheckTime = tick()

	self.shouldUseVRRotation = success and vrRotationIntensity ~= nil and vrRotationIntensity ~= "Smooth"

	return self.shouldUseVRRotation
end

function BaseCamera:GetVRRotationInput()
	local vrRotateSum = ZERO_VECTOR2
	local success, vrRotationIntensity = pcall(function() return StarterGui:GetCore("VRRotationIntensity") end)

	if not success then
		return
	end

	local vrGamepadRotation = self.GamepadPanningCamera or ZERO_VECTOR2
	local delayExpired = (tick() - self.lastVRRotationTime) >= self:GetRepeatDelayValue(vrRotationIntensity)

	if math.abs(vrGamepadRotation.x) >= self:GetActivateValue() then
		if (delayExpired or not self.vrRotateKeyCooldown[Enum.KeyCode.Thumbstick2]) then
			local sign = 1
			if vrGamepadRotation.x < 0 then
				sign = -1
			end
			vrRotateSum = vrRotateSum + self:GetRotateAmountValue(vrRotationIntensity) * sign
			self.vrRotateKeyCooldown[Enum.KeyCode.Thumbstick2] = true
		end
	elseif math.abs(vrGamepadRotation.x) < self:GetActivateValue() - 0.1 then
		self.vrRotateKeyCooldown[Enum.KeyCode.Thumbstick2] = nil
	end
	if self.turningLeft then
		if delayExpired or not self.vrRotateKeyCooldown[Enum.KeyCode.Left] then
			vrRotateSum = vrRotateSum - self:GetRotateAmountValue(vrRotationIntensity)
			self.vrRotateKeyCooldown[Enum.KeyCode.Left] = true
		end
	else
		self.vrRotateKeyCooldown[Enum.KeyCode.Left] = nil
	end
	if self.turningRight then
		if (delayExpired or not self.vrRotateKeyCooldown[Enum.KeyCode.Right]) then
			vrRotateSum = vrRotateSum + self:GetRotateAmountValue(vrRotationIntensity)
			self.vrRotateKeyCooldown[Enum.KeyCode.Right] = true
		end
	else
		self.vrRotateKeyCooldown[Enum.KeyCode.Right] = nil
	end

	if vrRotateSum ~= ZERO_VECTOR2 then
		self.lastVRRotationTime = tick()
	end

	return vrRotateSum
end

function BaseCamera:CancelCameraFreeze(keepConstraints)
	if not keepConstraints then
		self.cameraTranslationConstraints = Vector3.new(self.cameraTranslationConstraints.x, 1, self.cameraTranslationConstraints.z)
	end
	if self.cameraFrozen then
		self.trackingHumanoid = nil
		self.cameraFrozen = false
	end
end

function BaseCamera:StartCameraFreeze(subjectPosition, humanoidToTrack)
	if not self.cameraFrozen then
		self.humanoidJumpOrigin = subjectPosition
		self.trackingHumanoid = humanoidToTrack
		self.cameraTranslationConstraints = Vector3.new(self.cameraTranslationConstraints.x, 0, self.cameraTranslationConstraints.z)
		self.cameraFrozen = true
	end
end

function BaseCamera:OnNewCameraSubject()
	if self.subjectStateChangedConn then
		self.subjectStateChangedConn:Disconnect()
		self.subjectStateChangedConn = nil
	end

	local humanoid = workspace.CurrentCamera and workspace.CurrentCamera.CameraSubject
	if self.trackingHumanoid ~= humanoid then
		self:CancelCameraFreeze()
	end
	if humanoid and humanoid:IsA("Humanoid") then
		self.subjectStateChangedConn = humanoid.StateChanged:Connect(function(oldState, newState)
			if VRService.VREnabled and newState == Enum.HumanoidStateType.Jumping and not self.inFirstPerson then
				self:StartCameraFreeze(self:GetSubjectPosition(), humanoid)
			elseif newState ~= Enum.HumanoidStateType.Jumping and newState ~= Enum.HumanoidStateType.Freefall then
				self:CancelCameraFreeze(true)
			end
		end)
	end
end

function BaseCamera:GetVRFocus(subjectPosition, timeDelta)
	local lastFocus = self.LastCameraFocus or subjectPosition
	if not self.cameraFrozen then
		self.cameraTranslationConstraints = Vector3.new(self.cameraTranslationConstraints.x, math.min(1, self.cameraTranslationConstraints.y + 0.42 * timeDelta), self.cameraTranslationConstraints.z)
	end

	local newFocus
	if self.cameraFrozen and self.humanoidJumpOrigin and self.humanoidJumpOrigin.y > lastFocus.y then
		newFocus = CFrame.new(Vector3.new(subjectPosition.x, math.min(self.humanoidJumpOrigin.y, lastFocus.y + 5 * timeDelta), subjectPosition.z))
	else
		newFocus = CFrame.new(Vector3.new(subjectPosition.x, lastFocus.y, subjectPosition.z):lerp(subjectPosition, self.cameraTranslationConstraints.y))
	end

	if self.cameraFrozen then
		-- No longer in 3rd person
		if self.inFirstPerson then -- not VRService.VREnabled
			self:CancelCameraFreeze()
		end
		-- This case you jumped off a cliff and want to keep your character in view
		-- 0.5 is to fix floating point error when not jumping off cliffs
		if self.humanoidJumpOrigin and subjectPosition.y < (self.humanoidJumpOrigin.y - 0.5) then
			self:CancelCameraFreeze()
		end
	end

	return newFocus
end

function BaseCamera:GetRotateAmountValue(vrRotationIntensity)
	vrRotationIntensity = vrRotationIntensity or StarterGui:GetCore("VRRotationIntensity")
	if vrRotationIntensity then
		if vrRotationIntensity == "Low" then
			return VR_LOW_INTENSITY_ROTATION
		elseif vrRotationIntensity == "High" then
			return VR_HIGH_INTENSITY_ROTATION
		end
	end
	return ZERO_VECTOR2
end

function BaseCamera:GetRepeatDelayValue(vrRotationIntensity)
	vrRotationIntensity = vrRotationIntensity or StarterGui:GetCore("VRRotationIntensity")
	if vrRotationIntensity then
		if vrRotationIntensity == "Low" then
			return VR_LOW_INTENSITY_REPEAT
		elseif vrRotationIntensity == "High" then
			return VR_HIGH_INTENSITY_REPEAT
		end
	end
	return 0
end

function BaseCamera:Update(dt)
	error("BaseCamera:Update() This is a virtual function that should never be getting called.", 2)
end

return BaseCamera


Prompt: -- Create a loop that updates the timer

Response:
while true do
	wait(1)
	updateTimerLabel()
end


Prompt: -- Disable the backpack

Response: StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)


Prompt: --[[Weight and CG]]

Response:
	Tune.Weight			= 1800		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		8.2		,
	 --[[Height]]		3.6		,
	 --[[Length]]		50		}
	Tune.WeightDist		= 0		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible

	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= 0.2		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]

	Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members


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

Response:
return {
	Name = "resolve",
	Aliases = {},
	Description = "Resolves Argument Value Operators into lists. E.g., resolve players * gives you a list of all players.",
	Group = "DefaultUtil",
	AutoExec = { "alias \"me|Displays your username\" resolve players ." },
	Args = { {
			Type = "type",
			Name = "Type",
			Description = "The type for which to resolve"
		}, function(p1)
			if p1:GetArgument(1):Validate() == false then
				return;
			end;
			return {
				Type = p1:GetArgument(1):GetValue(),
				Name = "Argument Value Operator",
				Description = "The value operator to resolve. One of: * ** . ? ?N",
				Optional = true
			};
		end },
	Run = function(p2)
		return table.concat(p2:GetArgument(2).RawSegments, ",");
	end
};


Prompt: --[[Steering]]

Response:
	Tune.SteeringType	= 'New'		-- New = Precise steering calculations based on real life steering assembly (LuaInt)
									-- Old = Previous steering calculations
	-- New Options
	Tune.SteerRatio		= 15/1		-- Steering ratio of your steering rack, google it for your car
	Tune.LockToLock		= 2.6		-- Number of turns of the steering wheel lock to lock, google it for your car
	Tune.Ackerman		= .9		-- If you don't know what it is don't touch it, ranges from .7 to 1.2

	-- Old Options
	Tune.SteerInner		= 45		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 38		-- Outer wheel steering angle (in degrees)

	-- General Steering
	Tune.SteerSpeed		= .05		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .1		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 330		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 10		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree

	-- Steer Gyro Tuning, avoid changing these
	Tune.SteerD			= 1000		-- Steering Dampening
	Tune.SteerMaxTorque	= 50000		-- Steering Force
	Tune.SteerP			= 100000	-- Steering Aggressiveness

	--Four Wheel Steering (LuaInt)
	Tune.FWSteer			= 'None'	-- Static, Speed, Both, or None
	Tune.RSteerOuter		= 10		-- Outer rear wheel steering angle (in degrees)
	Tune.RSteerInner		= 10		-- Inner rear wheel steering angle (in degrees)
	Tune.RSteerSpeed		= 60		-- Speed at which 4WS fully activates (Speed), deactivates (Static), or transition begins (Both) (SPS)
	Tune.RSteerDecay		= 330		-- Speed of gradient cutoff (in SPS)

	-- Rear Steer Gyro Tuning, avoid changing these
	Tune.RSteerD			= 1000		-- Steering Dampening
	Tune.RSteerMaxTorque	= 50000		-- Steering Force
	Tune.RSteerP			= 100000	-- Steering Aggressiveness


Prompt: -- R6 only!

Response:
repeat game:GetService("RunService").Stepped:Wait() until game.Players.LocalPlayer
local player = script.Parent.Parent
local mouse = player:GetMouse()
local selecting = false
local valve

local enabled = false
mouse.Button1Up:Connect(function()
	if selecting == true then
		 valve = mouse.Target
		if valve.Name == 'paper' then
			if enabled == false then
				script.Parent.Image.image.ImageLabel.Image = valve.Decal.Texture
				enabled = true

			elseif enabled == true then
				enabled = false
			end

			script.Parent.Image.Enabled = enabled

		end
	end
end)

mouse.Button1Up:Connect(function()
			if enabled == true then
				enabled = false
	script.Parent.Image.Enabled = enabled
	end
end)

while wait() do
	if mouse.Target then
		if mouse.Target.Name == 'paper' then
				if not mouse.Target:FindFirstChild('selection') and script.Parent.IsUsingValve.Value == false then
					box = script.Parent.ValveUI.selection:clone()
				box.Parent = mouse.Target

					selecting = true
					box.Adornee = mouse.Target
				end
		else
				selecting = false
				if box then
					box:Destroy()
				end
			end

	end
end


Prompt:
--- Constructs a new signal.
-- @constructor Signal.new()
-- @treturn Signal

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

	self._bindableEvent = Instance.new("BindableEvent")
	self._argData = nil
	self._argCount = nil -- Prevent edge case of :Fire("A", nil) --> "A" instead of "A", nil

	return self
end


Prompt:
--edit the below function to execute code when this response is chosen OR this prompt is shown
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data

Response:
return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	plrData.Money.Gold.Value = plrData.Money.Gold.Value - 100 -- TODO track for dissertation
	local ClassInformationTable = require(game.ReplicatedStorage.Source.Modules.CharacterScripts.Classes.ClassInformation)
	ClassInformationTable:GetClassFolder(player,"Mage").Fireball.Value = true
end