Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tool = Instance.new'Tool'
- me = game:GetService'Players'.LocalPlayer
- tool.RequiresHandle = false
- tool.TextureId = 'http://www.roblox.com/asset/?id=12223874'
- tool.Name = 'Delete'
- tool.Parent = me.Backpack
- buttonf = nil
- tool.Equipped:connect(function()
- local m = game:GetService'Players'.LocalPlayer:GetMouse()
- m.Icon = 'rbxasset://textures/HammerCursor.png'
- buttonf = m.Button1Down:connect(function()
- if m.Target == nil then return end
- local ob = m.Target
- if ob:IsA'BasePart' or ob:IsA'WedgePart' then
- if ob:IsDescendantOf(me.Character) then return end
- m.Icon = 'rbxasset://textures/HammerOverCursor.png'
- local ex = Instance.new'Explosion'
- ex.BlastRadius = 0
- ex.Position = ob.Position
- ex.Parent = workspace
- game.ReplicatedStorage.Events.destryObj:FireServer(ob)
- wait(0.3)
- m.Icon = 'rbxasset://textures/HammerCursor.png'
- end
- end)
- end)
- tool.Unequipped:connect(function()
- if buttonf ~= nil then
- buttonf:Disconnect()
- buttonf = nil
- end
- local m = game:GetService'Players'.LocalPlayer:GetMouse()
- m.Icon = ''
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement