local v local X local C local p local function h(h)if h==Enum.UserInputType.Keyboard then v="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\056\050\053\048\057\048\050"X="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\056\050\053\048\057\048\050"C="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\056\050\053\049\053\054\052"p="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\056\050\053\049\053\054\052"EnterImageButton.Size=UDim2.new(0,36,0,36)FlipImageButton.Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\056\051\048\055\057\056\051";(FlipImageButton:WaitForChild("\080\114\101\115\115\101\100")).Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\056\051\048\055\057\056\051"FlipImageButton.Size=UDim2.new(0,44,0,44)BackgroundConsole.Visible=false BackgroundDesktop.Visible=true BackgroundDesktop.Size=UDim2.new(0,97,0,46)BackgroundDesktop.Position=UDim2.new(.5,28,.5,0)ButtonPrompt.Visible=true ButtonPrompt.Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\057\051\053\057\049\050\053\051\054"ButtonPrompt.Size=UDim2.new(0,36,0,36)ButtonPrompt.Position=UDim2.new(.5,-46,.5,0)ButtonPrompt.TextLabel.Visible=true ButtonPrompt.TextLabel.Text=Keymap.EnterVehicleKeyboard.Name elseif h.Value>=Enum.UserInputType.Gamepad1.Value and h.Value<=Enum.UserInputType.Gamepad8.Value then v="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\056\054\051\053\048\050\057"X="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\056\054\051\053\048\050\057"C="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\056\054\051\054\053\052\053"p="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\056\054\051\054\053\052\053"EnterImageButton.Size=UDim2.new(0,60,0,60)FlipImageButton.Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\056\051\048\055\057\056\051";(FlipImageButton:WaitForChild("\080\114\101\115\115\101\100")).Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\056\051\048\055\057\056\051"FlipImageButton.Size=UDim2.new(0,44,0,44)BackgroundDesktop.Visible=false BackgroundConsole.Visible=true BackgroundConsole.Size=UDim2.new(0,136,0,66)BackgroundConsole.Position=UDim2.new(.5,40,.5,0)ButtonPrompt.Visible=true ButtonPrompt.Size=UDim2.new(0,46,0,46)ButtonPrompt.Position=UDim2.new(.5,-63,.5,0)ButtonPrompt.ImageRectSize=Vector2.new(71,71)ButtonPrompt.ImageRectOffset=Vector2.new(512,600)ButtonPrompt.TextLabel.Visible=false local h=InputImageLibrary:GetImageLabel(Keymap.EnterVehicleGamepad,"\076\105\103\104\116")ButtonPrompt.Image=h.Image ButtonPrompt.ImageRectOffset=h.ImageRectOffset ButtonPrompt.ImageRectSize=h.ImageRectSize elseif h==Enum.UserInputType.Touch then BackgroundDesktop.Visible=false BackgroundConsole.Visible=false ButtonPrompt.Visible=false v="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\055\056\057\056\050\048\048"X="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\055\056\057\056\051\053\052"C="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\056\050\049\055\056\051\049"p="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\056\050\049\056\049\048\055"EnterImageButton.Size=UDim2.new(0,44,0,44)FlipImageButton.Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\056\049\056\055\053\053\057";(FlipImageButton:WaitForChild("\080\114\101\115\115\101\100")).Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\052\056\049\056\055\057\056\050"FlipImageButton.Size=UDim2.new(0,44,0,44)end end UserInputService.LastInputTypeChanged:Connect(h)h(Enum.UserInputType.Keyboard)h(UserInputService:GetLastInputType())local function F()if LocalPlayer.Character then return LocalPlayer.Character:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")end end local D=GetSeatTag:InvokeServer()

local DriverButtonId
local DriverButtonPressedId
local PassengerButtonId
local PassengerButtonPressedId
local function setPlatformType(inputType)
	if inputType == Enum.UserInputType.Keyboard then
		DriverButtonId = "rbxassetid://2848250902"
		DriverButtonPressedId = "rbxassetid://2848250902"
		PassengerButtonId = "rbxassetid://2848251564"
		PassengerButtonPressedId = "rbxassetid://2848251564"
		EnterImageButton.Size = UDim2.new(0, 36, 0, 36)
		FlipImageButton.Image = "rbxassetid://2848307983"
		FlipImageButton:WaitForChild("Pressed").Image = "rbxassetid://2848307983"
		FlipImageButton.Size = UDim2.new(0, 44, 0, 44)

		BackgroundConsole.Visible = false
		BackgroundDesktop.Visible = true
		BackgroundDesktop.Size =  UDim2.new(0, 97, 0, 46)
		BackgroundDesktop.Position = UDim2.new(0.5, 28, 0.5, 0)

		ButtonPrompt.Visible = true
		ButtonPrompt.Image = "rbxassetid://2935912536"
		ButtonPrompt.Size = UDim2.new(0, 36, 0, 36)
		ButtonPrompt.Position = UDim2.new(0.5, -46, 0.5, 0)
		ButtonPrompt.TextLabel.Visible = true

		--Display the correct key
		ButtonPrompt.TextLabel.Text = Keymap.EnterVehicleKeyboard.Name

	elseif inputType.Value >= Enum.UserInputType.Gamepad1.Value and
		inputType.Value <= Enum.UserInputType.Gamepad8.Value then
		DriverButtonId = "rbxassetid://2848635029"
		DriverButtonPressedId = "rbxassetid://2848635029"
		PassengerButtonId = "rbxassetid://2848636545"
		PassengerButtonPressedId = "rbxassetid://2848636545"
		EnterImageButton.Size = UDim2.new(0, 60, 0, 60)
		FlipImageButton.Image = "rbxassetid://2848307983"
		FlipImageButton:WaitForChild("Pressed").Image = "rbxassetid://2848307983"
		FlipImageButton.Size = UDim2.new(0, 44, 0, 44)

		BackgroundDesktop.Visible = false
		BackgroundConsole.Visible = true
		BackgroundConsole.Size =  UDim2.new(0, 136, 0, 66)
		BackgroundConsole.Position = UDim2.new(0.5, 40, 0.5, 0)

		ButtonPrompt.Visible = true
		--ButtonPrompt.Image = "rbxassetid://408462759"
		ButtonPrompt.Size = UDim2.new(0, 46, 0, 46)
		ButtonPrompt.Position = UDim2.new(0.5, -63, 0.5, 0)
		ButtonPrompt.ImageRectSize = Vector2.new(71, 71)
		ButtonPrompt.ImageRectOffset = Vector2.new(512, 600)
		ButtonPrompt.TextLabel.Visible = false

		--Set the correct image for the gamepad button prompt
		local template = InputImageLibrary:GetImageLabel(Keymap.EnterVehicleGamepad, "Light")
		ButtonPrompt.Image = template.Image
		ButtonPrompt.ImageRectOffset = template.ImageRectOffset
		ButtonPrompt.ImageRectSize = template.ImageRectSize
	elseif inputType == Enum.UserInputType.Touch then
		BackgroundDesktop.Visible = false
		BackgroundConsole.Visible = false
		ButtonPrompt.Visible = false
		
		DriverButtonId = "rbxassetid://2847898200"
		DriverButtonPressedId = "rbxassetid://2847898354"
		PassengerButtonId = "rbxassetid://2848217831"
		PassengerButtonPressedId = "rbxassetid://2848218107"
		EnterImageButton.Size = UDim2.new(0, 44, 0, 44)
		FlipImageButton.Image = "rbxassetid://2848187559"
		FlipImageButton:WaitForChild("Pressed").Image = "rbxassetid://2848187982"
		FlipImageButton.Size = UDim2.new(0, 44, 0, 44)
	end
end

UserInputService.LastInputTypeChanged:Connect(setPlatformType)
setPlatformType(Enum.UserInputType.Keyboard)
setPlatformType(UserInputService:GetLastInputType())

local function getLocalHumanoid()
	if LocalPlayer.Character then
		return LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
	end
end

local SeatTag = GetSeatTag:InvokeServer()
