Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Account_Age = 2585 -- (in days) (game.Players.Player.AccountAge)
- function dec(AA,Amount_of_decimals)
- local g = "0."
- for i=1,Amount_of_decimals do
- if i ~= Amount_of_decimals then
- g = g.."0"
- else
- g = g.."1"
- end
- end
- g=tonumber(g)
- local ekk = g
- for i=1,string.len(AA) do
- if string.sub(AA,i,i) == "." then
- if tonumber(string.sub(AA,i+Amount_of_decimals+1,i+Amount_of_decimals+1)) >= 5 then
- AA = tonumber(string.sub(AA,1,i+Amount_of_decimals))
- AA = AA+ekk
- else
- AA = tonumber(string.sub(AA,1,i+Amount_of_decimals))
- end
- end
- end
- return AA
- end
- function math.round(AA)
- num = tostring(AA)
- for i=1,#num do
- if string.sub(num,i,i) == "." then
- if string.sub(num,i+1,i+1) ~= "" and tonumber(string.sub(num,i+1,i+1)) >= 5 then
- num2 = string.sub(num,1,i-1)
- num2 = tonumber(num2) + 1
- elseif string.sub(num,i+1,i+1) ~= "" and tonumber(string.sub(num,i+1,i+1)) < 5 then
- num2 = string.sub(num,1,i-1)
- num2 = tonumber(num2)
- end
- end
- end
- return num2
- end
- local years = dec(Account_Age/365,1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement