local P_POWER = 1
_G.HARDMODE = false
local Stats = {
E_DOOR = math.random(1, 42),
W_DOOR = math.random(1, 42),
CAM_FLIPS = math.random(1, 42),
E_LIGHT = math.random(1, 42),
W_LIGHT = math.random(1, 42)
}
local Total = Stats.E_DOOR + Stats.W_DOOR + Stats.CAM_FLIPS + Stats.E_LIGHT + Stats.W_LIGHT
local Average = (Stats.E_DOOR + Stats.W_DOOR + Stats.CAM_FLIPS + Stats.E_LIGHT + Stats.W_LIGHT) / 5
print("Total Night Stats:\n")
print("East Door:", Stats.E_DOOR)
print("West Door:", Stats.W_DOOR)
print("East Light:", Stats.E_LIGHT)
print("West Light:", Stats.W_LIGHT)
print("Camera Flips:", Stats.CAM_FLIPS)
print("(Amount of uses)")
print("====================")
print("Total:", Total)
print("Average:", Average)
print("===============")
print("Percentages")
print("Total (/ 100):", Total / 100)
local function GetPercentage(Value, Accuracy, DecimalPoint)
if Accuracy then -- Accurate
return string.format("%." .. DecimalPoint .. "f", Value * 100)
else -- Rounds to the nearest whole
return math.floor((Value * 100) + 0.5)
end
end
print(GetPercentage(Total / P_POWER) .. "%")
To embed this project on your website, copy the following code and paste it into your website's HTML: