Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- admin = "Bendittt"
- adminC = {Bendittt = 1}
- cash = {}
- item = {}
- particle = {}
- function eventNewPlayer(pN)
- item[pN] = 0
- 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] = 100
- 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] + 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:plank'>Plank - 10 points</a>\n-> <a href = 'event:largebox'>Large box - 40 points</a>\n-> <a href = 'event:spirit'>Spirit - 50 points</a>\n-> <a href = 'event:frogballoon'>Frog balloon - 90 points</a>", pN, 6, 25, 200, 85, 0x111111, 0x111111, 1, true)
- elseif req == "plank" then
- if cash[pN] >= 10 then
- cash[pN] = cash[pN] - 10
- item[pN] = 3 -- it's default plank id
- ui.updateTextArea(2, "You have "..cash[pN].." points!", pN, 625, 25, 170, 20, 0x111111, 0x111111, 1, true)
- end
- elseif req == "largebox" then
- if cash[pN] >= 40 then
- cash[pN] = cash[pN] - 40
- item[pN] = 1
- ui.updateTextArea(2, "You have "..cash[pN].." points!", pN, 625, 25, 170, 20, 0x111111, 0x111111, 1, true)
- end
- elseif req == "spirit" then
- if cash[pN] >= 50 then
- cash[pN] = cash[pN] - 50
- particle[pN] = 10
- ui.updateTextArea(2, "You have "..cash[pN].." points!", pN, 625, 25, 170, 20, 0x111111, 0x111111, 1, true)
- end
- elseif req == "frogballoon" then
- if cash[pN] >= 90 then
- cash[pN] = cash[pN] - 90
- item[pN] = 2805
- ui.updateTextArea(2, "You have "..cash[pN].." points!", pN, 625, 25, 170, 20, 0x111111, 0x111111, 1, true)
- end
- end
- end
- function eventMouse(pN, x, y)
- if item[pN] > 0 then
- tfm.exec.addShamanObject(item[pN], x, y, 0, 0, 0, false)
- item[pN] = 0
- elseif particle[pN] > 0 then
- tfm.exec.displayParticle(particle[pN], x, y)
- particle[pN] = 0
- end
- end
- function eventChatCommand(pN, c)
- if c == "disable" and adminC[pN] then
- system.exit()
- end
- end
- for pN in pairs(tfm.get.room.playerList) do
- eventNewPlayer(pN)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement