Advertisement
Glexteon

Untitled

Oct 1st, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. tool = Instance.new'Tool'
  2. me = game:GetService'Players'.LocalPlayer
  3. tool.RequiresHandle = false
  4. tool.TextureId = 'http://www.roblox.com/asset/?id=12223874'
  5. tool.Name = 'Delete'
  6. tool.Parent = me.Backpack
  7. buttonf = nil
  8. tool.Equipped:connect(function()
  9. local m = game:GetService'Players'.LocalPlayer:GetMouse()
  10. m.Icon = 'rbxasset://textures/HammerCursor.png'
  11. buttonf = m.Button1Down:connect(function()
  12. if m.Target == nil then return end
  13. local ob = m.Target
  14. if ob:IsA'BasePart' or ob:IsA'WedgePart' then
  15. if ob:IsDescendantOf(me.Character) then return end
  16. m.Icon = 'rbxasset://textures/HammerOverCursor.png'
  17. local ex = Instance.new'Explosion'
  18. ex.BlastRadius = 0
  19. ex.Position = ob.Position
  20. ex.Parent = workspace
  21. game.ReplicatedStorage.Events.destryObj:FireServer(ob)
  22. wait(0.3)
  23. m.Icon = 'rbxasset://textures/HammerCursor.png'
  24. end
  25. end)
  26. end)
  27. tool.Unequipped:connect(function()
  28. if buttonf ~= nil then
  29. buttonf:Disconnect()
  30. buttonf = nil
  31. end
  32. local m = game:GetService'Players'.LocalPlayer:GetMouse()
  33. m.Icon = ''
  34. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement