local z=script.MobileGui if userInputService.TouchEnabled then userInputService.ModalEnabled=true z.Parent=player.PlayerGui z.DrivePad.Up.MouseButton1Down:connect(function()movement=Vector2.new(movement.X,1)end)z.DrivePad.Up.MouseButton1Up:connect(function()movement=Vector2.new(movement.X,0)end)z.DrivePad.Down.MouseButton1Down:connect(function()movement=Vector2.new(movement.X,-1)end)z.DrivePad.Down.MouseButton1Up:connect(function()movement=Vector2.new(movement.X,0)end)z.TurnPad.Left.MouseButton1Down:connect(function()movement=Vector2.new(-1,movement.Y)end)z.TurnPad.Left.MouseButton1Up:connect(function()movement=Vector2.new(0,movement.Y)end)z.TurnPad.Right.MouseButton1Down:connect(function()movement=Vector2.new(1,movement.Y)end)z.TurnPad.Right.MouseButton1Up:connect(function()movement=Vector2.new(0,movement.Y)end)z.ExitButton.Text="\069\120\105\116 "..car.Name z.ExitButton.MouseButton1Click:connect(function()character.Humanoid.Jump=true end)else z:Destroy()end

local mobileGui = script.MobileGui
if userInputService.TouchEnabled then
	userInputService.ModalEnabled = true
	mobileGui.Parent = player.PlayerGui
	
	mobileGui.DrivePad.Up.MouseButton1Down:connect(function()
		movement = Vector2.new(movement.X, 1)
	end)
	mobileGui.DrivePad.Up.MouseButton1Up:connect(function()
		movement = Vector2.new(movement.X, 0)
	end)
	mobileGui.DrivePad.Down.MouseButton1Down:connect(function()
		movement = Vector2.new(movement.X, -1)
	end)
	mobileGui.DrivePad.Down.MouseButton1Up:connect(function()
		movement = Vector2.new(movement.X, 0)
	end)
	mobileGui.TurnPad.Left.MouseButton1Down:connect(function()
		movement = Vector2.new(-1, movement.Y)
	end)
	mobileGui.TurnPad.Left.MouseButton1Up:connect(function()
		movement = Vector2.new(0, movement.Y)
	end)
	mobileGui.TurnPad.Right.MouseButton1Down:connect(function()
		movement = Vector2.new(1, movement.Y)
	end)
	mobileGui.TurnPad.Right.MouseButton1Up:connect(function()
		movement = Vector2.new(0, movement.Y)
	end)
	
	mobileGui.ExitButton.Text = "Exit " .. car.Name
	mobileGui.ExitButton.MouseButton1Click:connect(function()
		character.Humanoid.Jump = true
	end)
else
	mobileGui:Destroy()
end
