Universal Script πŸ“Œ
7.4k Views
61 Executions

Real time clock

Universal Script πŸ“Œ
AdorbsxVibesPr3ppy
AdorbsxVibesPr3ppy100 followers
3 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

This shows the real time

Updates

  1. Script edited: Update script

  2. Script edited: Update script

  3. Script edited: Update script

  4. Script edited: Update script

  5. Script edited: Update script

View Raw
-- Load the Kavo UI library
local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/DenDenZZZ/Kavo-UI-Library/main/Kavo.lua"))()

-- Create the main window
local Window = Library.CreateLib("Real-Time Clock", "Ocean")

-- Create a tab for the clock
local ClockTab = Window:NewTab("Clock")

-- Create a section for the clock display
local ClockSection = ClockTab:NewSection("Real-Time Clock")

-- Create a label to display the time and date
local TimeLabel = ClockSection:NewLabel("Loading...")

-- Function to update the time and date display
local function UpdateTimeDisplay()
    local currentTime = os.date("*t")
    local hour = currentTime.hour
    local minute = string.format("%02d", currentTime.min)
    local second = string.format("%02d", currentTime.sec)
    local ampm = currentTime.hour >= 12 and "PM" or "AM"
    local day = currentTime.day
    local month = currentTime.month
    local year = currentTime.year

    -- Handle special cases for 12 PM and 12 AM
    if hour == 0 then
        hour = 12
    elseif hour > 12 then
        hour = hour - 12
    end

    -- Update the label with the current time and date
    TimeLabel:UpdateLabel(string.format("%02d:%02d:%02d %s\n%02d/%02d/%04d", hour, minute, second, ampm, month, day, year))
end

-- Update the time display every second
while true do
    UpdateTimeDisplay()


Comments

2
Log in to join the conversation. Login
nam_'s profile picture
nam_3 years ago(edited)

thankz my mom wont beat me cuz im late to sleep again !1!1!

1
CMDS's profile picture
CMDS3 years ago(edited)

Best SCRIPT in the World?!!!1?!

1

More universal scripts

See all
Script hub
33.1k
298.1k
Bumped 40 minutes ago
Script hub
23.6k
5.2k
Bumped 41 minutes ago
Key System
Paid
High QualityΒ Offering
Universal Script πŸ“Œ
184
555
Bumped 1 hour ago
Universal Script πŸ“Œ
1.6k
30.3k
Bumped 1 hour ago
Script hub
4.1M
558.5k
Bumped 2 hours ago
Key System

Script hub

Hall of Fame #3

Verified script badgeOverflow 35 Supported Games

Script hub
5.5k
28.9k
Bumped 2 hours ago
Key System
Script hub
14.0k
28.5k
Bumped 4 hours ago