Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function eventPlayerWon(pN)
- tfm.exec.newGame(7016471)
- tfm.exec.movePlayer(pN, 500, 100)
- tfm.exec.setUIMapName("Winner room\n")
- string = "ui.addText pN" -- put text here
- roomRecordInt = 0
- randomColorforString = {
- {c="#f7f918", b="#ec4848"}, -- gradient table
- {c="#4ce7f7", b="#2c9f5b"},
- {c="#4bd9cd", b="#2a64e9"},
- {c="#d4f31a", b="#8c8fa4"},
- {c="#8f47c1", b="#5512e5"},
- }
- function ui.addText(string, x, y, color, border, name)
- ui.addTextArea(9, string.format(string, border), nil, x, y-1, 900, 25, nil, nil, 0, true, name) -- edit just 900 and 25 (x and y position)
- ui.addTextArea(10, string.format(string, border), nil, x, y+1, 900, 25, nil, nil, 0, true, name)
- ui.addTextArea(11, string.format(string, border), nil, x+1, y, 900, 25, nil, nil, 0, true, name)
- ui.addTextArea(12, string.format(string, border), nil, x-1, y, 900, 25, nil, nil, 0, true, name)
- ui.addTextArea(13, string.format(string, color), nil, x, y, 900, 25, nil, nil, 0, true, name)
- end
- function eventNewGame()
- randomColors = randomColorforString[math.random(#randomColorforString)]
- playerList = tfm.get.room.playerList
- toggle = true
- i = 0
- for p, n in pairs(playerList) do
- eventNewPlayer(p)
- ui.addText("<font color='%s'><b>"..string.."</font>", 10, 382, randomColors.c, randomColors.b, p)
- end
- end
- function eventNewPlayer(name)
- randomColors = randomColorforString[1]
- ui.addText("<font color='%s'><b>"..string.."</font>", 10, 382, randomColors.c, randomColors.b, name)
- end
- for k, v in pairs(tfm.get.room.playerList) do
- eventNewPlayer(k)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement