Advertisement
Guest User

Untitled

a guest
Nov 20th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. --Created by Drahazar#5976 aka MintyLatios
  2. --Press the num keys to place that tower
  3. --Can be placed anywhere, and no tower limit when placing towers like this.
  4.  
  5. local me = game:service'Players'.localPlayer
  6. local map = workspace.Map
  7. local mouse = me:GetMouse()
  8. local lite = game:service'Lighting'
  9. function GetHigh()
  10. for _,v in next, map:GetDescendants() do
  11. if(v.Name=='High' and v:FindFirstChild'Team')then
  12. if(v.Team.Value==me.TeamColor)then
  13. return v
  14. end
  15. end
  16. end
  17. end
  18.  
  19. function GetGrass()
  20. for _,v in next, map:children() do
  21. if(v.Name=='Grass' and v:FindFirstChild'Team')then
  22. if(v.Team.Value==me.TeamColor)then
  23. return v
  24. end
  25. end
  26. end
  27. end
  28.  
  29. function GetShit(tower)
  30. local what = lite:FindFirstChild(tower)
  31. if(what)then
  32. if(what.Type.Value=='High')then
  33. return GetHigh()
  34. else
  35. return GetGrass()
  36. end
  37. end
  38. end
  39.  
  40. mouse.KeyDown:connect(function(k)
  41. if(me.StuffToSave:FindFirstChild("Tower"..k))then
  42. local what=me.StuffToSave['Tower'..k].Value
  43. workspace.Placed:InvokeServer(mouse.Hit.p,1,what,GetShit(what))
  44. end
  45. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement