Advertisement
Hachem16

Untitled

Dec 8th, 2013
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.71 KB | None | 0 0
  1. -- Main FrameWork :
  2. numbers=10
  3. emote=5
  4.  
  5. function eventNewPlayer(name)
  6.     tfm.exec.bindKeyboard(name,32,true,true)
  7. end
  8.  
  9. for name,player in pairs(tfm.get.room.playerList) do
  10.     eventNewPlayer(name)
  11. end
  12.  
  13.  
  14. function eventKeyboard(playerName,key,down,x,y)
  15.     if key==32 then
  16.         if tfm.get.room.playerList[playerName].isFacingRight then
  17.             tfm.exec.displayParticle(emote, x, y+30, 5, 0.05, 0.05, 0, nil)
  18.             tfm.exec.displayParticle(emote, x, y+20, 5, 0.05, 0.05, 0, nil)
  19.             tfm.exec.displayParticle(emote, x, y+10, 5, 0.05, 0.05, 0, nil)
  20.             tfm.exec.displayParticle(emote, x, y, 5, 0.05, 0.05, 0, nil)
  21.         else
  22.             tfm.exec.displayParticle(emote, x, y+30, -5, 0.05, -0.05, 0, nil)
  23.             tfm.exec.displayParticle(emote, x, y+20, -5, 0.05, -0.05, 0, nil)
  24.             tfm.exec.displayParticle(emote, x, y+10, -5, 0.05, -0.05, 0, nil)
  25.             tfm.exec.displayParticle(emote, x, y, -5, 0.05, -0.05, 0, nil)
  26.     end
  27. end
  28. end
  29.  
  30.  
  31.  
  32. function eventChatCommand(playerName, cmd)
  33. local Stats = [[<font color="#f564ae" size="23">]]..playerName..[[</font>]]
  34.                 if cmd:sub(0,1) == "s" then
  35.                         ui.addTextArea(1, [[<font color="#99999f" size="25">>]]..playerName..[[</font> : <font color="#00f98a" size="25">]]..cmd:sub(3)..[[</u></font>]], nil,150,y,nil,nil,nil,nil,0.5, true)
  36.                 elseif cmd == "rpop" then
  37.                         ui.removeTextArea(1)
  38.                         ui.removeTextArea(2)
  39.                         ui.removeTextArea(3)
  40.                 elseif cmd:sub(0,1) == "t" then
  41.                         ui.addTextArea(2, [[<font color="#99eec9" size="25">>]]..playerName..[[</font> : <font color="#bebb9f" size="25">]]..cmd:sub(3)..[[</u></font>]], nil,150,100,nil,nil,nil,nil,0.5, true)
  42.                 elseif cmd:sub(0,1) == "a" then
  43.                         ui.addTextArea(3, [[<font color="#6e3ea5" size="25">>]]..playerName..[[</font> : <font color="#993a3d" size="25">]]..cmd:sub(3)..[[</u></font>]], nil,150,150,nil,nil,nil,nil,0.5, true)
  44.                 elseif cmd:sub(0,4) == "kill" then
  45.                         tfm.exec.killPlayer(cmd:sub(6))
  46. end
  47.                 if cmd:sub(0,4) == "part" then
  48.                         emote=cmd:sub(6)
  49.                 end
  50. end
  51.  
  52. system.disableChatCommandDisplay("s", true)
  53. system.disableChatCommandDisplay("a", true)
  54. system.disableChatCommandDisplay("kill", true)
  55. system.disableChatCommandDisplay("t", true)
  56. system.disableChatCommandDisplay("rpop", true)
  57. system.disableChatCommandDisplay("part", true)
  58.  
  59. -- do "!s word" for a popup at 50 y
  60. -- do "!t word" for a popup at 100 y
  61. -- do "!a word" for a popup at 100 y
  62.  
  63.  
  64. function eventLoop()
  65. for i=1,numbers do
  66.                 tfm.exec.displayParticle(math.random(0,7), math.random(50,100), math.random(20, 250), 1, 0, 0, 0, nil)
  67. end
  68. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement