generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: [ Free ] AM/PM Clock & week days (16 lines)

Previous Thread :: Next Thread 
CLIMAXIMUS is not online. CLIMAXIMUS
Joined: 22 Jun 2012
Total Posts: 1738
18 Nov 2015 06:26 PM
--[[
I basically made this for one of my games, and I want it to be open source because of how hot it is. Added a Time multiplier so you can easily change the speed. Works perfectly. Atm every second is a minute ingame.
You got to fix the print() part because im pretty sure that its going to get cut off in this thread.
]]--

local TimeMultiplier = 1
local CurrentDay = 1
local Days = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}

local function ChangeTime()
local TotalSec = workspace.DistributedGameTime * TimeMultiplier
local HourBase = math.floor(TotalSec/60)
local Hour = HourBase % 12
print(Days[CurrentDay]..string.format(", "..(Hour < 10 and "%01i" or "%02i")..":%02i ", tonumber((Hour == 0 and 12 or Hour)), TotalSec % 60)..((HourBase % 24) < 12 and "AM" or "PM"))
game.Lighting:SetMinutesAfterMidnight(TotalSec)
end
game:GetService("RunService").Stepped:connect(ChangeTime)

while wait(1440/TimeMultiplier) do
CurrentDay = CurrentDay + 1
end
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
18 Nov 2015 06:27 PM
"how hot it is"
No.

u sicko!
Report Abuse
phoenix53124 is not online. phoenix53124
Joined: 25 Feb 2009
Total Posts: 4889
18 Nov 2015 06:30 PM
Did you know that I can make a unified, centralized "radio" mechanic that would allow for the broadcasting of messages, music, code, etc to every active radio at the same time?

And without HttpService. The trick is to GET data from things that way; it's impossible as per my method, but of course there's always HttpService...pfft.
Report Abuse
phoenix53124 is not online. phoenix53124
Joined: 25 Feb 2009
Total Posts: 4889
18 Nov 2015 06:30 PM
I totally misread your title as "AM/FM"

Forget what I just said xD
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
18 Nov 2015 06:31 PM
@phoenix
MAKE IT

u sicko!
Report Abuse
phoenix53124 is not online. phoenix53124
Joined: 25 Feb 2009
Total Posts: 4889
18 Nov 2015 06:35 PM
Ok...that should take like one minute; it's not hard. But I have to decide on syntax...hm, I'll go with stupidly simple.
Report Abuse
phoenix53124 is not online. phoenix53124
Joined: 25 Feb 2009
Total Posts: 4889
18 Nov 2015 08:48 PM
@Klink

So I ran into caching...so I don't think it's gonna...well.
Report Abuse
TickerOfTime is not online. TickerOfTime
Joined: 02 Sep 2012
Total Posts: 2030
18 Nov 2015 09:03 PM
GetAsync has a second parameter that controls caching. Try true and false, idk which
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image