local function GetPercentage(Value, Accuracy)
if Accuracy then
return Value * 100 -- Accurate percentages (float)
else
return math.floor((Value * 100) + 0.5) -- Rounded to the nearest whole
end
-- int bool
return Value, Accuracy
end
print("Cuurent %:", GetPercentage(8557 / 9009, false) .. "%")
print("(Accuracy):", GetPercentage(8557 / 9009, true) .. "%")
To embed this project on your website, copy the following code and paste it into your website's HTML: