function PlayerConverter.SpeederToPlayer(M,o)LoadCharacter:FireServer()PlayerConverter:SpeederToPlayerClient(o)end function PlayerConverter.SpeederToPlayerServer(M,o)o:LoadCharacter()LoadCharacter:FireClient(o)end function PlayerConverter.SpeederToPlayerClient(M,o)if o==nil then o=true end if o and UserInputService.MouseBehavior~=Enum.MouseBehavior.Default then ExitSound:Play()end UserInputService.MouseBehavior=Enum.MouseBehavior.Default UserInputService.MouseIconEnabled=true RemoveActivePlayer:FireServer()local U=game:GetService("\080\108\097\121\101\114\115")local k=U.LocalPlayer local v=k:FindFirstChild("\080\108\097\121\101\114\071\117\105")if IS_MOBILE then local o=v:WaitForChild("\084\111\117\099\104\071\117\105")o.Enabled=true end local q=v:WaitForChild("\084\111\112\066\097\114")q.Enabled=false end function PlayerConverter.UnlockPlayerControls(o)UserInputService.MouseBehavior=Enum.MouseBehavior.Default UserInputService.MouseIconEnabled=true RemoveActivePlayer:FireServer()local M=game:GetService("\080\108\097\121\101\114\115")local U=M.LocalPlayer local k=U:FindFirstChild("\080\108\097\121\101\114\071\117\105")if IS_MOBILE then local o=k:WaitForChild("\084\111\117\099\104\071\117\105")o.Enabled=true end local v=k:WaitForChild("\084\111\112\066\097\114")v.Enabled=false end
-- Must be called client-side
function PlayerConverter:SpeederToPlayer(playSound)
	-- LoadCharacter has to be fired server-side, so fire a RemoteEvent
	-- to get it there
	LoadCharacter:FireServer()
	PlayerConverter:SpeederToPlayerClient(playSound)
end -- PlayerConverter:SpeederToPlayer()

function PlayerConverter:SpeederToPlayerServer(player)
	player:LoadCharacter()

	LoadCharacter:FireClient(player)
end -- PlayerConverter:SpeederToPlayer()

function PlayerConverter:SpeederToPlayerClient(playSound)
	if playSound == nil then
		playSound = true
	end

	-- Play sounds
	if playSound and (UserInputService.MouseBehavior ~= Enum.MouseBehavior.Default) then
		ExitSound:Play()
	end

	-- Unlock and show mouse
	UserInputService.MouseBehavior = Enum.MouseBehavior.Default
	UserInputService.MouseIconEnabled = true

	-- Remove user from race ActivePlayer's list (if racing)
	RemoveActivePlayer:FireServer()

	-- Enable touch control GUIs on mobile devices
	local Players = game:GetService("Players")
	local player = Players.LocalPlayer
	local PlayerGui = player:FindFirstChild("PlayerGui")
	if IS_MOBILE then
		local TouchGui = PlayerGui:WaitForChild("TouchGui")

		TouchGui.Enabled = true
	end

	local TopBar = PlayerGui:WaitForChild("TopBar")
	TopBar.Enabled = false
end -- PlayerConverter:SpeederToPlayerClient()

function PlayerConverter:UnlockPlayerControls()
	UserInputService.MouseBehavior = Enum.MouseBehavior.Default
	UserInputService.MouseIconEnabled = true

	-- Remove user from race ActivePlayer's list (if racing)
	RemoveActivePlayer:FireServer()

	-- Enable touch control GUIs on mobile devices
	local Players = game:GetService("Players")
	local player = Players.LocalPlayer
	local PlayerGui = player:FindFirstChild("PlayerGui")
	if IS_MOBILE then
		local TouchGui = PlayerGui:WaitForChild("TouchGui")

		TouchGui.Enabled = true
	end

	local TopBar = PlayerGui:WaitForChild("TopBar")
	TopBar.Enabled = false
end -- PlayerConverter:UnlockPlayerControls()
