Advertisement
AERQ1111

ROBLOX Speed Notifier GUI Script

Feb 26th, 2025 (edited)
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.03 KB | None | 0 0
  1. -- Speed Notifier GUI, Updates every 0.25 seconds.
  2. local player = game.Players.LocalPlayer
  3. local starterGui = game:GetService("StarterGui")
  4. local runService = game:GetService("RunService")
  5.  
  6. local function createSpeedNotifier()
  7.     -- Check if GUI alreayd exists
  8.     if player:FindFirstChild("PlayerGui") then
  9.         local existingGui = player.PlayerGui:FindFirstChild("SpeedNotifier")
  10.         if existingGui then
  11.             existingGui:Destroy()
  12.         end
  13.     end
  14.  
  15.     local screenGui = Instance.new("ScreenGui")
  16.     screenGui.Name = "SpeedNotifier"
  17.     screenGui.ResetOnSpawn = false -- Prevents GUI from disappearing and changed on respawn
  18.     screenGui.Parent = player:WaitForChild("PlayerGui")
  19.  
  20.     local frame = Instance.new("Frame")
  21.     frame.Size = UDim2.new(0.3, 0, 0.1, 0)
  22.     frame.Position = UDim2.new(0.35, 0, 0.05, 0)
  23.     frame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  24.     frame.BorderSizePixel = 2 -- Added outline
  25.     frame.BorderColor3 = Color3.fromRGB(255, 255, 255)
  26.     frame.Active = true
  27.     frame.Draggable = true -- Makes the GUI moveable
  28.     frame.Parent = screenGui
  29.  
  30.     local textLabel = Instance.new("TextLabel")
  31.     textLabel.Size = UDim2.new(1, 0, 0.7, 0)
  32.     textLabel.Position = UDim2.new(0, 0, 0, 0)
  33.     textLabel.BackgroundTransparency = 1
  34.     textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  35.     textLabel.TextScaled = false
  36.     textLabel.TextSize = 45 -- Increased text size
  37.     textLabel.Font = Enum.Font.SourceSansBold
  38.     textLabel.Parent = frame
  39.  
  40.     local subTextLabel = Instance.new("TextLabel")
  41.     subTextLabel.Size = UDim2.new(1, 0, 0.3, 0)
  42.     subTextLabel.Position = UDim2.new(0, 0, 0.6, 0)
  43.     subTextLabel.BackgroundTransparency = 1
  44.     subTextLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
  45.     subTextLabel.TextSize = 20
  46.     subTextLabel.TextScaled = false
  47.     subTextLabel.Font = Enum.Font.SourceSans
  48.     subTextLabel.Text = "[IGNORES VELOCITY.]"
  49.     subTextLabel.Parent = frame
  50.  
  51.     -- update speed
  52.     runService.RenderStepped:Connect(function()
  53.         local character = player.Character
  54.         if character and character:FindFirstChild("HumanoidRootPart") then
  55.             local root = character.HumanoidRootPart
  56.             local speed = (root.Velocity * Vector3.new(1, 0, 1)).magnitude -- Ignore Y velocity
  57.             textLabel.Text = math.floor(speed) .. " Studs/Sec"
  58.         end
  59.     end)
  60.  
  61.     -- CHECK THIS OUT BRO FADING EFFECT COOL RIGHT?
  62.     task.spawn(function()
  63.         while screenGui.Parent do
  64.             for i = 35, 0, -1 do -- Fades from winter black to pure black
  65.                 frame.BackgroundColor3 = Color3.fromRGB(i, i, i)
  66.                 task.wait(0.05)
  67.             end
  68.             for i = 0, 35 do -- Fades back
  69.                 frame.BackgroundColor3 = Color3.fromRGB(i, i, i)
  70.                 task.wait(0.05)
  71.             end
  72.         end
  73.     end)
  74. end
  75.  
  76. -- Make sure gui doesnt disappeara
  77. player.CharacterAdded:Connect(function()
  78.     task.wait(1) -- Short delay for you to load
  79.     createSpeedNotifier()
  80. end)
  81.  
  82. createSpeedNotifier()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement