Advertisement
Guest User

xlib.rw.maptool

a guest
Mar 23rd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. local btool = Instance.new("Tool",game.Players.LocalPlayer.Backpack)
  2. local SelectionBox = Instance.new("SelectionBox",game.Workspace)
  3. SelectionBox.Name = "MapSelection"
  4. SelectionBox.LineThickness = 0.05
  5. SelectionBox.Adornee = nil
  6. SelectionBox.Color3 = Color3.fromRGB(0,0,255)
  7. SelectionBox.Visible = false
  8. btool.Name = "Click begone"
  9. btool.RequiresHandle = false
  10. local IsEquipped = false
  11. local Mouse = game.Players.LocalPlayer:GetMouse()
  12.  
  13. btool.Equipped:connect(function()
  14. IsEquipped = true
  15. SelectionBox.Visible = true
  16. SelectionBox.Adornee = nil
  17. end)
  18.  
  19. btool.Unequipped:connect(function()
  20. IsEquipped = false
  21. SelectionBox.Visible = false
  22. SelectionBox.Adornee = nil
  23. end)
  24.  
  25.  
  26. btool.Activated:connect(function()
  27. if IsEquipped then
  28. game.Workspace.resources.RemoteEvent:FireServer("toggleShield", Mouse.Target)
  29. end
  30. end)
  31.  
  32. while true do
  33. SelectionBox.Adornee = Mouse.Target or nil
  34. wait(0.1)
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement