Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function p(s)
- s = s or "Empty String."
- print(s)
- end
- function add(n1, n2)
- n1 = tonumber(n1) or 0
- n2 = tonumber(n2) or 0
- return n1 + n2
- end
- function r(n1, n2)
- n1 = tonumber(n1) or 1
- n2 = tonumber(n2) or 1
- return math.random(n1, n2)
- end
- function sub(n1, n2)
- n1 = tonumber(n1) or 0
- n2 = tonumber(n2) or 0
- return n1 - n2
- end
- function mul(n1, n2)
- n1 = tonumber(n1) or 0
- n2 = tonumber(n2) or 0
- return n1 * n2
- end
- function div(n1, n2)
- n1 = tonumber(n1) or 0
- n2 = tonumber(n2) or 0
- return n1 / n2
- end
- function randomize(amount)
- amount = tonumber(amount) or 5
- a = {"A", "a", "B", "b", "C", "c", "D", "d", "E", "e", "F", "f", "G", "g", "H", "h", "I", "i", "J", "j", "K", "k", "L", "l", "M", "m", "N", "n", "O", "o", "P", "p", "Q", "q", "R", "r", "S", "s", "T", "t", "U", "u", "V", "v", "W", "w", "X", "x", "Y", "y", "Z", "z"}
- b = {}
- for i = 1, amount do
- table.insert(b, a[math.random(1, #a)])
- end
- return table.concat(b)
- end
- function roundD(num)
- num = num or 1.5
- return math.floor(num)
- end
- function roundU(num)
- num = num or 0.5
- return math.ceil(num)
- end
- function wait(tick)
- tick = tick or 1
- delay = os.time() + tick
- while os.time() < delay do end
- end
Add Comment
Please, Sign In to add comment