Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAfkDeath(true)
- gr_speed=40
- players={}
- iduri={}
- map='@6429129'
- candy={[1]={x=10,y=340,g=10},[2]={x=20,y=340,g=10},[3]={x=30,y=340,g=10},[4]={x=40,y=340,g=10},[5]={x=50,y=340,g=10},[6]={x=60,y=340,g=10},[7]={x=70,y=340,g=10},[8]={x=80,y=340,g=10},[9]={x=90,y=340,g=10},[10]={x=100,y=340,g=10},[11]={x=110,y=340,g=10},[12]={x=120,y=340,g=10},[13]={x=130,y=340,g=10},[14]={x=140,y=340,g=10},[15]={x=150,y=340,g=10},[16]={x=160,y=340,g=10},[17]={x=170,y=340,g=10},[18]={x=180,y=340,g=10},[19]={x=190,y=340,g=10},[20]={x=200,y=340,g=10},[21]={x=210,y=340,g=10},[22]={x=220,y=340,g=10},[23]={x=230,y=340,g=10},[24]={x=240,y=340,g=10},[25]={x=250,y=340,g=10},[26]={x=260,y=340,g=10},[27]={x=270,y=340,g=10},[28]={x=280,y=340,g=10},[29]={x=290,y=340,g=10},[30]={x=300,y=340,g=10},[31]={x=310,y=340,g=10},[32]={x=320,y=340,g=10},[33]={x=330,y=340,g=10},[34]={x=340,y=340,g=10},[35]={x=350,y=340,g=10},[36]={x=360,y=340,g=10},[37]={x=370,y=340,g=10},[38]={x=380,y=340,g=10},[39]={x=390,y=340,g=10},[40]={x=400,y=340,g=10},[41]={x=410,y=340,g=10},[42]={x=420,y=340,g=10},[43]={x=430,y=340,g=10},[44]={x=440,y=340,g=10},[45]={x=450,y=340,g=10},[46]={x=460,y=340,g=10},[47]={x=470,y=340,g=10},[48]={x=480,y=340,g=10},[49]={x=490,y=340,g=10},[50]={x=500,y=340,g=10},[51]={x=510,y=340,g=10},[52]={x=520,y=340,g=10},[53]={x=530,y=340,g=10},[54]={x=540,y=340,g=10},[55]={x=550,y=340,g=10},[56]={x=560,y=340,g=10},[57]={x=570,y=340,g=10},[58]={x=580,y=340,g=10},[59]={x=590,y=340,g=10},[60]={x=600,y=340,g=10},[61]={x=610,y=340,g=10},[62]={x=620,y=340,g=10},[63]={x=630,y=340,g=10},[64]={x=640,y=340,g=10},[65]={x=650,y=340,g=10},[66]={x=660,y=340,g=10},[67]={x=670,y=340,g=10},[68]={x=680,y=340,g=10},[69]={x=690,y=340,g=10},[70]={x=700,y=340,g=10},[71]={x=710,y=340,g=10},[72]={x=720,y=340,g=10},[73]={x=730,y=340,g=10},[74]={x=740,y=340,g=10},[75]={x=750,y=340,g=10},[76]={x=760,y=340,g=10},[77]={x=770,y=340,g=10},[78]={x=780,y=340,g=10},[79]={x=790,y=340,g=10}}
- function eventNewGame()
- for candyz=1,#candy do
- imagineID = tfm.exec.addImage("169a7218c3b.png", "!1", candy[candyz].x-15, candy[candyz].y, nil)
- iduri[candyz] = imagineID
- end
- end
- function eventNewPlayer(n)
- players[n]={look=string.sub(tfm.get.room.playerList[n].look,1,2)}
- tfm.exec.respawnPlayer(n)
- tfm.exec.bindKeyboard(n,3,true,true)
- end
- for n,p in pairs(tfm.get.room.playerList) do
- eventNewPlayer(n)
- end
- function eventKeyboard(n,k,down,x,y)
- look=players[n].look
- for i=1,#candy do
- if candy[i].g==0 and x>candy[i].x-15 and x<candy[i].x+15 and y<candy[i].y+15 and y>candy[i].y-15 then
- candy[i].g=gr_speed
- tfm.exec.removeImage(iduri[i])
- iduri[i] = -1
- break
- end
- end
- end
- function eventLoop()
- for i=1,#candy do
- if candy[i].g>0 then candy[i].g=candy[i].g-1 else
- if iduri[i] == -1 then
- imagineID = tfm.exec.addImage("169a7218c3b.png", "!1", candy[i].x-15, candy[i].y, nil)
- iduri[i] = imagineID
- end
- end
- end
- end
- function eventPlayerDied(n)
- players[n].look=string.sub(tfm.get.room.playerList[n].look,1,2)
- tfm.exec.respawnPlayer(n)
- end
- tfm.exec.newGame(map)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement