Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Mouse = game.Players.LocalPlayer:GetMouse()
- Mouse.KeyDown:connect(function(key)
- if key:lower() == "l" then
- delitem = Mouse.Target
- end
- if delitem == nil then
- else
- itemr = delitem.Parent
- print("Selected Item: "..tostring(itemr))
- RemoveItem(itemr)
- end
- end)
- function RemoveItem(SelectedPart)
- if SelectedPart:FindFirstChild("Owner") and SelectedPart.Owner.Value ~= nil and SelectedPart:FindFirstChild("ItemName") and SelectedPart:FindFirstChild("Type") and (SelectedPart.PrimaryPart ~= nil or SelectedPart:FindFirstChild("MainCFrame")) then
- game:GetService("ReplicatedStorage").Interaction.DestroyStructure:FireServer(SelectedPart)
- end
- end
Add Comment
Please, Sign In to add comment