Vzurxy

Untitled

Sep 3rd, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. local NewTool = Instance.new("Tool",game.Players.LocalPlayer.Backpack)
  2. local SelectionBox = Instance.new("SelectionBox",game.Workspace)
  3. SelectionBox.Name = "BTOOL BOX"
  4. SelectionBox.LineThickness = 0.05
  5. SelectionBox.Adornee = nil
  6. SelectionBox.Color3 = Color3.fromRGB(255,0,0)
  7. SelectionBox.Visible = false
  8. NewTool.Name = "FE BTOOL"
  9. NewTool.RequiresHandle = false
  10. local IsEquipped = false
  11. local Mouse = game.Players.LocalPlayer:GetMouse()
  12.  
  13.  
  14. function DestroyObj(Obj)
  15. game:GetService("ReplicatedStorage").Channels.HouseChannel:FireServer("PlaceFurniture",Obj or nil,CFrame.new(0,-math.huge,0),0)
  16. end
  17.  
  18. NewTool.Equipped:connect(function()
  19. IsEquipped = true
  20. SelectionBox.Visible = true
  21. SelectionBox.Adornee = nil
  22. end)
  23.  
  24. NewTool.Unequipped:connect(function()
  25. IsEquipped = false
  26. SelectionBox.Visible = false
  27. SelectionBox.Adornee = nil
  28. end)
  29.  
  30.  
  31. NewTool.Activated:connect(function()
  32. if IsEquipped then
  33. DestroyObj(Mouse.Target)
  34. end
  35. end)
  36.  
  37.  
  38. function GetPlrByPart(Prt)
  39. if Prt then
  40. for _,Plr in pairs(game.Players:GetPlayers()) do
  41. if Plr.Character then
  42. if Prt:IsDescendantOf(Plr.Character) then
  43. return Plr
  44. end
  45. end
  46. end
  47. end
  48. return nil
  49.  
  50. end
  51.  
  52.  
  53. local NewTool2 = Instance.new("Tool",game.Players.LocalPlayer.Backpack)
  54. local SelectionBox2 = Instance.new("SelectionBox",game.Workspace)
  55. SelectionBox2.Name = "PLAYER BOX"
  56. SelectionBox2.LineThickness = 0.05
  57. SelectionBox2.Adornee = nil
  58. SelectionBox2.Color3 = Color3.fromRGB(0,255,0)
  59. SelectionBox2.Visible = false
  60. NewTool2.Name = "PLAYER KICKER"
  61. NewTool2.RequiresHandle = false
  62. local IsEquipped2 = false
  63. local Mouse2 = game.Players.LocalPlayer:GetMouse()
  64.  
  65.  
  66.  
  67. NewTool2.Equipped:connect(function()
  68. IsEquipped2 = true
  69. SelectionBox2.Visible = true
  70. SelectionBox2.Adornee = nil
  71. end)
  72.  
  73. NewTool2.Unequipped:connect(function()
  74. IsEquipped2 = false
  75. SelectionBox2.Visible = false
  76. SelectionBox2.Adornee = nil
  77. end)
  78.  
  79.  
  80. NewTool2.Activated:connect(function()
  81. if IsEquipped2 and GetPlrByPart(Mouse.Target) then
  82. DestroyObj(GetPlrByPart(Mouse.Target))
  83. end
  84. end)
  85.  
  86. while true do
  87. if GetPlrByPart(Mouse.Target or nil) then
  88. SelectionBox2.Color3 = Color3.fromRGB(0,255,0)
  89. else
  90. SelectionBox2.Color3 = Color3.fromRGB(255,0,0)
  91. end
  92. SelectionBox.Adornee = Mouse.Target or nil
  93. SelectionBox2.Adornee = Mouse.Target or nil
  94. wait(0.1)
  95. end
Add Comment
Please, Sign In to add comment