Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- admin = "Bendittt"
- points = {}
- function eventNewPlayer(pN)
- ui.addTextArea(1, "<a href = 'event:shop'>Shop!</a>", pN, 6, 25, 100, 20, 0x111111, 0x111111, 1, true)
- system.bindMouse(pN, true)
- if pN == admin then
- cash[pN] = 888888
- else
- cash[pN] = 10
- end
- ui.addTextArea(2, "You have "..cash[pN].." Points!", pN, 625, 25, 170, 20, 0x111111, 0x111111, 1, true)
- end
- function eventLoop(eT, rT)
- for pN in pairs(tfm.get.room.playerList) do
- cash[pN] = cash[pN] + 0.1
- ui.updateTextArea(2, "You have "..cash[pN].." Points!", pN, 625, 25, 170, 20, 0x111111, 0x111111, 1, true)
- end
- end
- function eventTextAreaCallback(id, pN, req)
- if req == "shop" then
- ui.addTextArea(1, "Shop!\n-> <a href = 'event:meep'>Meep - 250 coins</a>\n-> <a href = 'event:vampire'>Vampire - 300 coins</a>\n-> <a href = 'event:shaman'>Shaman - 350 coins</a>\n-> <a href = 'event:color'>Random nick color - 750 coins</a>", pN, 6, 25, 200, 85, 0x111111, 0x111111, 1, true)
- elseif req == "meep" then
- if cash[pN] > 250 then
- cash[pN] = cash[pN] - 250
- tfm.exec.giveMeep(pN)
- ui.updateTextArea(2, "You have "..cash[pN].." coins!", pN, 625, 25, 170, 20, 0x111111, 0x111111, 1, true)
- end
- elseif req == "vampire" then
- if cash[pN] > 300 then
- cash[pN] = cash[pN] - 300
- tfm.exec.setVampirePlayer(pN)
- ui.updateTextArea(2, "You have "..cash[pN].." coins!", pN, 625, 25, 170, 20, 0x111111, 0x111111, 1, true)
- end
- elseif req == "shaman" then
- if cash[pN] > 350 then
- cash[pN] = cash[pN] - 350
- tfm.exec.setShaman(pN)
- ui.updateTextArea(2, "You have "..cash[pN].." coins!", pN, 625, 25, 170, 20, 0x111111, 0x111111, 1, true)
- end
- elseif req == "color" then
- if cash[pN] > 750 then
- cash[pN] = cash[pN] - 750
- tfm.exec.setNameColor(pN, string.format("%x", math.random(0xFFFFFF, 0xFFFFFF)))
- ui.updateTextArea(2, "You have "..cash[pN].." coins!", pN, 625, 25, 170, 20, 0x111111, 0x111111, 1, true)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement