Advertisement
Rawoas13

Untitled

Apr 3rd, 2020
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. --[[
  2. Explosion power script!
  3. Usage: Mouse click anywhere in the screen to spawn eplosion.(The closer you click to a mice the further the mice will fly away)
  4. Check the explosionSettings to Enbale/Disable the particles/effects of the explosion.
  5. ]]
  6.  
  7. local hasPowerAccess =
  8. {
  9. --Players that have access to use explosion power.
  10. ["Ctmce#0000"] = true; --Has permission to use the explosion power.
  11. ["CtmceBot#5123"] = false; --Has NO permission to use the explosion power. Delete this line if you want to give this power for only 1 person.
  12. --true == has access | false == no access--
  13. } --Replace "Ctmce#0000" with your name and remove "CtmceBot#5123" if you want to give power access to one player
  14. --or change it as well if you want to give power access for multiple ppl.
  15. local explosionSettings =
  16. {
  17. --Please use recommended settings if you not sure how or to what change it.
  18. hasParticles = false; --Does the explosion has a particles/effects when you spawn it with each mouse click? (true = enabled | false = disabled)
  19. explosionPower = 26; --How far should the explosion throw the players away. (The higher the number, the stronger it will be)
  20. explosionDistance = 60; --From how far should the explosion effect the player (The higher the number the more players will be effected)
  21. --Dont go too high with the Power nor the Distance of the explosion because it will just kill everyone(If the map has ways for players to fly through the map)
  22. --[[Defualt settings:
  23. explosionPower: 10
  24. explosionDistance: 10
  25. --]]
  26. }
  27.  
  28. for n,p in next , hasPowerAccess do
  29. system.bindMouse(n,true)
  30. end
  31.  
  32. local explosion = function(x,y,invisible)
  33. tfm.exec.explosion(x, y, explosionSettings.explosionPower, explosionSettings.explosionDistance, true)
  34. if invisible then
  35. tfm.exec.displayParticle(10, x, y, 0, 0, 0, 0, nil)
  36. end
  37. end
  38.  
  39. function eventMouse(name, x, y)
  40. if hasPowerAccess[name] then
  41. explosion(x,y,explosionSettings.hasParticles)
  42. end
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement