Advertisement
anphu04

Roblox Click to Destroy script pack

May 16th, 2018
2,814
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. -- CREATE A VALUE --
  2. local val = Instance.new("BoolValue")
  3. val.Name = "DESTROY?"
  4. val.Parent = workspace
  5. -- SET VALUE --
  6. workspace["DESTROY?"].Value = true
  7. workspace["DESTROY?"].Value = false
  8. -- CLICK EVENT --
  9. mouse = game.Players.LocalPlayer:GetMouse()
  10. mouse.Button1Down:Connect(function()
  11. local target = mouse.Target
  12. local val = workspace:FindFirstChild("DESTROY?")
  13. if target and val.Value == true then
  14. target:Destroy()
  15. end
  16. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement