Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Main FrameWork :
- ui.addTextArea(0, "thing", nil, nil, nil, nil, nil, nil, nil, 0.5, true)
- string = {}
- Particle = {3, 30}
- numbers=10
- emote={}
- function eventNewPlayer(name)
- tfm.exec.bindKeyboard(name,32,true,true)
- end
- for name,player in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- end
- function eventKeyboard(playerName,key,down,x,y)
- if key==32 then
- if tfm.get.room.playerList[playerName].isFacingRight then
- for i=1,4 do
- if emote[playerName] then
- tfm.exec.displayParticle(emote[playerName], x, y+(i*10), 5, 0.05, 0.05, 0, nil)
- else
- tfm.exec.displayParticle(5, x, y+(i*10), 5, 0.05, 0.05, 0, nil)
- end
- end
- else
- for i=1,4 do
- if emote[playerName] then
- tfm.exec.displayParticle(emote[playerName], x, y+(i*10), -5, 0.05, -0.05, 0, nil)
- else
- tfm.exec.displayParticle(5, x, y+(i*10), -5, 0.05, -0.05, 0, nil)
- end
- end
- end
- end
- end
- function eventChatCommand(playerName, cmd)
- if cmd:sub(0,4) == "kill" then
- tfm.exec.killPlayer(cmd:sub(6))
- elseif cmd:sub(0,4) == "part" then
- emote[playerName]=cmd:sub(6)
- elseif cmd:sub(0,1)=="p" then
- table.insert(string, "<font color='#0880fe' size='16'><b>"..playerName.."</b></font> : <font size='16'>"..cmd:sub(3).."</font>")
- elseif cmd=="reset" then -- command reset don't work properly :c
- for i=0,#string do
- table.remove(string, i)
- end
- table.insert(string, "<font size='18' color='#008000f'>Updated for the longest</font>")
- elseif cmd=="input" then
- ui.addPopup(0, 2, "<font color='#00800f' size='15.4'>Input</font>", playerName, 400, 50)
- end
- end
- function eventLoop()
- for i=1,numbers do
- tfm.exec.displayParticle(math.random(3, 4), math.random(50,100), math.random(20, 250), 1, 0, 0, 0, nil)
- end
- ui.updateTextArea(0, table.concat(string, "\n"))
- end
- function eventPopupAnswer(iD, playerName, ans)
- if iD==0 then
- table.insert(string, "<font color='#0880fe' size='16'><b>"..playerName.."</b></font> : <font size='16'>"..ans.."</font>")
- end
- end
- for i,command in ipairs({"part","p","kill","input","reset"}) do
- system.disableChatCommandDisplay(command,true)
- end
Advertisement
Add Comment
Please, Sign In to add comment