my current code only checks if the user has equal playtime but not equal or higher in a while loop, i want to make sure the missed badges are awarded without making long elseif
statements to keep it shorter
while Player do
task.wait(60)
PlayerData.GameTime.TotalTime += 1
if Configuration.Badges["_" .. PlayerData.GameTime.TotalTime] then
EpicModule.AwardBadge(Player, Configuration.Badges["_" .. PlayerData.GameTime.TotalTime])
end
end
-- Configuration ModuleScript
local Configuration = {
Badges = {
_60 = 2148326402, --> 1 Hour
_300 = 2148326442, --> 5 Hours
_600 = 2148326587, --> 10 Hours
_3000 = 2148326615, --> 50 Hours
_6000 = 2148326662, --> 100 Hours
_30000 = 2148398523, --> 500 Hours
_60000 = 2148398539, --> 1,000 Hours
_300000 = 2148398542, --> 5,000 Hours
_600000 = 2148398559, --> 10,000 Hours
}
}