Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Explosion power script!
- Usage: Mouse click anywhere in the screen to spawn eplosion.(The closer you click to a mice the further the mice will fly away)
- Check the explosionSettings to Enbale/Disable the particles/effects of the explosion.
- ]]
- local hasPowerAccess =
- {
- --Players that have access to use explosion power.
- ["Ctmce#0000"] = true; --Has permission to use the explosion power.
- ["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.
- --true == has access | false == no access--
- } --Replace "Ctmce#0000" with your name and remove "CtmceBot#5123" if you want to give power access to one player
- --or change it as well if you want to give power access for multiple ppl.
- local explosionSettings =
- {
- --Please use recommended settings if you not sure how or to what change it.
- hasParticles = false; --Does the explosion has a particles/effects when you spawn it with each mouse click? (true = enabled | false = disabled)
- explosionPower = 26; --How far should the explosion throw the players away. (The higher the number, the stronger it will be)
- explosionDistance = 60; --From how far should the explosion effect the player (The higher the number the more players will be effected)
- --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)
- --[[Defualt settings:
- explosionPower: 10
- explosionDistance: 10
- --]]
- }
- for n,p in next , hasPowerAccess do
- system.bindMouse(n,true)
- end
- local explosion = function(x,y,invisible)
- tfm.exec.explosion(x, y, explosionSettings.explosionPower, explosionSettings.explosionDistance, true)
- if invisible then
- tfm.exec.displayParticle(10, x, y, 0, 0, 0, 0, nil)
- end
- end
- function eventMouse(name, x, y)
- if hasPowerAccess[name] then
- explosion(x,y,explosionSettings.hasParticles)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement