-- Speedometer Script V3 (Fixed) local Players = game:GetService("Players") local RunService = game:GetService("RunService") local player = Players.LocalPlayer local character local humanoidRootPart local useMPH = false local function setupCharacter(char) character = char humanoidRootPart = character:WaitForChild("HumanoidRootPart") end if player.Character then setupCharacter(player.Character) end player.CharacterAdded:Connect(setupCharacter) local screenGui = Instance.new("ScreenGui") screenGui.Name = "SpeedometerGUI" screenGui.ResetOnSpawn = false screenGui.Parent = player:WaitForChild("PlayerGui") local frame = Instance.new("Frame") frame.Size = UDim2.fromOffset(170, 160) frame.Position = UDim2.new(0.5, -85, 1, -190) frame.BackgroundColor3 = Color3.fromRGB(25, 25, 25) frame.BorderSizePixel = 0 frame.Parent = screenGui Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 16) local speedLabel = Instance.new("TextLabel") speedLabel.Size = UDim2.new(1, -10, 0.6, 0) speedLabel.Position = UDim2.new(0, 5, 0.05, 0) speedLabel.BackgroundTransparency = 1 speedLabel.TextColor3 = Color3.fromRGB(255, 255, 255) speedLabel.TextScaled = true speedLabel.Font = Enum.Font.GothamBold speedLabel.Text = "0 KM/H" speedLabel.Parent = frame local toggleButton = Instance.new("TextButton") toggleButton.Size = UDim2.new(0.85, 0, 0.25, 0) toggleButton.Position = UDim2.new(0.075, 0, 0.7, 0) toggleButton.BackgroundColor3 = Color3.fromRGB(45, 45, 45) toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255) toggleButton.TextScaled = true toggleButton.Font = Enum.Font.GothamMedium toggleButton.Text = "Switch to MPH" toggleButton.Parent = frame Instance.new("UICorner", toggleButton).CornerRadius = UDim.new(0, 12) toggleButton.MouseButton1Click:Connect(function() useMPH = not useMPH if useMPH then toggleButton.Text = "Switch to KM/H" else toggleButton.Text = "Switch to MPH" end end) RunService.RenderStepped:Connect(function() if not humanoidRootPart then return end local velocity = humanoidRootPart.AssemblyLinearVelocity local studsPerSecond = velocity.Magnitude local kmh = studsPerSecond * 0.28 * 3.6 local mph = studsPerSecond * 0.28 * 2.23694 if useMPH then speedLabel.Text = string.format("%d MPH", mph) else speedLabel.Text = string.format("%d KM/H", kmh) end end)