Advertisement
ExamV1

Realtime Clock Roblox Script

Feb 7th, 2023
887
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.91 KB | None | 0 0
  1. local player = game:GetService("Players").LocalPlayer
  2. local gui = Instance.new("ScreenGui")
  3. local textLabel = Instance.new("TextLabel")
  4. local frame = Instance.new("Frame")
  5.  
  6. gui.Name = "TimeDisplay"
  7. frame.Name = "Background"
  8. frame.Parent = gui
  9. frame.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  10. frame.Position = UDim2.new(0.5, 0, 0, 0)
  11. frame.Size = UDim2.new(0, 150, 0, 30)
  12. frame.AnchorPoint = Vector2.new(0.5, 0)
  13.  
  14. textLabel.Name = "Time"
  15. textLabel.Parent = frame
  16. textLabel.Text = tostring(os.date("%X"))
  17. textLabel.Position = UDim2.new(0.5, 0, 0.5, 0)
  18. textLabel.Size = UDim2.new(0, 100, 0, 50)
  19. textLabel.TextScaled = true
  20. textLabel.TextWrapped = true
  21. textLabel.TextColor3 = Color3.new(1, 1, 1)
  22. textLabel.BackgroundTransparency = 1
  23. textLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  24.  
  25. gui.Parent = player:WaitForChild("PlayerGui")
  26.  
  27. while true do
  28.     wait(1)
  29.     textLabel.Text = tostring(os.date("%X"))
  30. end
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement