Currently I have been at work in my game (Haddock Tech computer core - Roblox), and have decided to make a halloween meltdown event. I would like to personally know what you guys have to say for this?
(skip to 3:38 for event start)
Known bugs:
- Zombpocalypse screen disappears/goes nil when player dies/possibly if new players spawn in. (
Patched) - Guns are not automatically given if you respawned/die, and possibly might be the same issue if a new player spawns in. (
Patched) - Bit of some music issues going on, haven’t implemented a cutoff yet which likely means the event runs infinitely, which will be implemented.
Thanks guys!
Homage to Innovation Labs’ 2015 Zombpocalypse, a favorite thing I greatly miss. Inspired mainly off of.
Edits:
- Corrected 2 known bugs: gun and screen.
- Changed and added time for precision on the start and end day.
local manualOverride = false
-- Date range for Halloween decorations (UTC)
local START_MONTH = 10
local START_DAY = 24
local END_MONTH = 10
local END_DAY = 31
-- Helper function to check if current UTC date/time is within the Halloween range
local function isHalloween()
if manualOverride then
return true
end
local now = os.date("!*t") -- UTC time
local year = now.year
-- Start: Oct 24, 00:00:00 UTC
local startTime = os.time({
year = year,
month = START_MONTH,
day = START_DAY,
hour = 0,
min = 0,
sec = 0,
isdst = false
})
-- End: Oct 31, 23:59:59 UTC
local endTime = os.time({
year = year,
month = END_MONTH,
day = END_DAY,
hour = 23,
min = 59,
sec = 59,
isdst = false
})
local nowTime = os.time(now)
return nowTime >= startTime and nowTime <= endTime
end
-- Debug print to show current Halloween status and UTC date/time
do
local now = os.date("!*t")
print("Halloween override:", manualOverride)
print(string.format("Current UTC date/time: %04d-%02d-%02d %02d:%02d:%02d", now.year, now.month, now.day, now.hour, now.min, now.sec))
print("Is Halloween:", isHalloween())
end