wait(.1)local g=script.Parent function GetPlayerFromWeld(g)if g.Part1.Name=="\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116"then local q=g.Part1.Parent:findFirstChild("\072\117\109\097\110\111\105\100")if q then local g=game.Players:GetPlayerFromCharacter(q.Parent)if g then return g end end end return nil end g.ChildAdded:connect(function(q)if q:IsA("\087\101\108\100")then q.C0=CFrame.new(0,-1,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2.4),0,0)local N=GetPlayerFromWeld(q)if N then local q=script.SpeedGUI:Clone()wait(.1)q.Seat.Value=g q.Parent=N.PlayerGui end end end)g.ChildRemoved:connect(function(g)if g:IsA("\087\101\108\100")then local q=GetPlayerFromWeld(g)if q then if q.PlayerGui:findFirstChild("\083\112\101\101\100\071\085\073")then q.PlayerGui.SpeedGUI:Destroy()end end end end)
-- Instruction: Put in a (Vehicle)Seat.
wait(0.1)

local seat = script.Parent

function GetPlayerFromWeld(weld)
	if weld.Part1.Name == "HumanoidRootPart" then
		local character = weld.Part1.Parent:findFirstChild("Humanoid")
		if character then
			local player = game.Players:GetPlayerFromCharacter(character.Parent)
			if player then
				return player
			end
		end
	end
	return nil
end

seat.ChildAdded:connect(function(newChild)
	if newChild:IsA("Weld") then
		newChild.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-(math.pi / 2.4), 0, 0)
		local player = GetPlayerFromWeld(newChild)
		if player then
			local newGUI = script.SpeedGUI:Clone()
			wait(0.1)
			newGUI.Seat.Value = seat
			newGUI.Parent = player.PlayerGui
		end
	end
end)

seat.ChildRemoved:connect(function(oldChild)
	if oldChild:IsA("Weld") then
		local player = GetPlayerFromWeld(oldChild)
		if player then
			if player.PlayerGui:findFirstChild("SpeedGUI") then
				player.PlayerGui.SpeedGUI:Destroy()
			end
		end
	end
end)
