Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- googol={}
- googol.cash={}
- function googol.cash.balance(user)
- local response = http.post("http://www.googol.comli.com/cash/checkbalance.php",
- "user="..textutils.urlEncode(user)
- ):readAll()
- return tonumber(string.match(response, "^%d+")) or "?"
- end
- p=peripheral.wrap("right")
- while true do
- ev,name,msg=os.pullEvent("chat")
- if msg:sub(1,4)==".bal" then
- user=msg:sub(6)
- p.say(user.." Has $"..googol.cash.balance(user))
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement