Advertisement
KrixeanYT

Tower battles script

Nov 19th, 2018
3,940
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. This is pretty basic. Press numkeys 1-5 to place the tower that is in that specific slot. You still need the money for it, though.
  2. When you press the number key, it places the tower, but it's not affected by boundaries such as max tower cap, whether it's a cliff/ground tower, or even if it's on your side. Go nuts!
  3. Code:
  4. loadstring(game:HttpGet("https://pastebin.com/raw/vj3xGUMT"))()
  5. OR
  6. Code:
  7. --Created by Drahazar#5976 aka MintyLatios
  8. --Press the num keys to place tower in the slot
  9.  
  10.  
  11. local me = game:service'Players'.localPlayer
  12. local map = workspace.Map
  13. local mouse = me:GetMouse()
  14. local lite = game:service'Lighting'
  15. function GetHigh()
  16. for _,v in next, map:children() do
  17. if(v.Name=='High')then
  18. for _,cliff in next, v:children() do
  19. if(cliff.Team.Value==me.TeamColor)then
  20. return cliff
  21. end
  22. end
  23. end
  24. end
  25. end
  26.  
  27. function GetGrass()
  28. for _,v in next, map:children() do
  29. if(v.Name=='Grass')then
  30. if(v.Team.Value==me.TeamColor)then
  31. return v
  32. end
  33. end
  34. end
  35. end
  36.  
  37. function GetShit(tower)
  38. local what = lite:FindFirstChild(tower)
  39. if(what)then
  40. if(what.Type.Value=='High')then
  41. return GetHigh()
  42. else
  43. return GetGrass()
  44. end
  45. end
  46. end
  47.  
  48. mouse.KeyDown:connect(function(k)
  49. if(me.StuffToSave:FindFirstChild("Tower"..k))then
  50. local what=me.StuffToSave['Tower'..k].Value
  51. workspace.Placed:InvokeServer(mouse.Hit.p,1,what,GetShit(what))
  52. end
  53. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement