Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfm.exec.disableAutoShaman(true)
- tfm.exec.newGame("@2881168")
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.setNameColor('Cosmydavid', 0xFFA100)
- tfm.exec.disableAfkDeath(true)
- function eventPlayerDied(name) tfm.exec.respawnPlayer(name) end function eventNewPlayer(name) tfm.exec.respawnPlayer(name) end function eventPlayerWon(name) tfm.exec.respawnPlayer(name) end
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.setUIMapName("<font color='#56BFE4'>Nyan <font color='#60608F'>|</font> <font color='#ffffff'>Creator :</font> <font color='#56BFE4'> Cosmydavid</font>")
- lights={1,2,4,9,11,13}
- delay=os.time()
- firework_x,firework_y=400,380
- blast_x,blast_y=400,200
- trail=0
- divisions=0
- done=false
- f=0
- function eventNewPlayer(name)
- system.bindMouse(name,true)
- end
- for name in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- end
- function eventMouse(name,x,y)
- if first_person==nil and f==0 then
- first_person=name
- firework_x=x
- firework_y=y
- else
- local vx,vy
- blast_x=x
- blast_y=y
- trail_x=firework_x
- trail_y=firework_y
- divisions_x=(blast_x-firework_x)/10
- divisions_y=(blast_y-firework_y)/10
- if divisions_x<0 then divisions_x=0-(divisions_x) end
- if divisions_y<0 then divisions_y=0-(divisions_y) end
- divisions=divisions_x>divisions_y and divisions_y or divisions_x
- divisions=math.floor(divisions+0.5)
- if divisions%2==1 then
- divisions=divisions+1
- end
- path_x=(blast_x-firework_x)/divisions
- path_y=(blast_y-firework_y)/divisions
- end
- end
- function eventLoop(ct,tr)
- if trail<divisions then
- for i=1,2 do
- for i=1,3 do
- vx=math.random()+math.random(-1,1)
- vy=math.random()+math.random(-1,1)
- tfm.exec.displayParticle(lights[math.random(#lights)],trail_x,trail_y,vx,vy,0,0)
- end
- trail_x=trail_x+path_x
- trail_y=trail_y+path_y
- trail=trail+1
- end
- end
- if trail>0 and trail==divisions then
- done=true
- trail=0
- divisions=0
- end
- if done then
- for i=1,(math.random(20,100)) do
- local vx,vy
- vx=math.random()+math.random(-1,1)
- vy=math.random()+math.random(-1,1)
- tfm.exec.displayParticle(lights[math.random(#lights)],blast_x,blast_y,vx,vy,0,0)
- end
- done=false
- f=1
- time=os.time()
- end
- if f==1 and time<os.time()-300 then
- local x,y,vx,vy
- for i=1,math.random(13) do
- x=blast_x+math.random(-40,40)
- y=blast_y+math.random(-40,40)
- for i=1,math.random(7) do
- vx=math.random()+math.random(-1,1)
- vy=math.random()+math.random(-1,1)
- tfm.exec.displayParticle(lights[math.random(#lights)],x,y,vx,vy,0,0)
- end
- end
- f=math.random(0,1)
- if f==0 then first_person=nil end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement