|
| 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
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 18 Nov 2015 06:27 PM |
"how hot it is" No.
u sicko! |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 18 Nov 2015 06:30 PM |
I totally misread your title as "AM/FM"
Forget what I just said xD |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
| |
|
|
| 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 |
|
|
|
| 18 Nov 2015 08:48 PM |
@Klink
So I ran into caching...so I don't think it's gonna...well. |
|
|
| Report Abuse |
|
|
|
| 18 Nov 2015 09:03 PM |
| GetAsync has a second parameter that controls caching. Try true and false, idk which |
|
|
| Report Abuse |
|
|