Categories > Exploiting > Scripts >
CTRL + Click (Delete Script) - Someone couldn't get this to work so I fixed it. (They just indented wrongly.)
Posted
local Plr = game:GetService("Players").LocalPlayer
local Mouse = Plr:GetMouse()
Mouse.Button1Down:connect(function()
-- NOTE: The if statements gets an indent or '4' spaces from the start of the line
if not game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftControl) then
-- This gets 2 indents or '8' spaces from the start of the line
return end
if not Mouse.Target then
-- This also gets 2 indents or '8' spaces from the start of the line
return end
Mouse.Target:Destroy()
end)
-- Copy and paste this script and then execute it. Then press CTRL + Click to destroy/delete objects for your view only
-- You can delete all of the comments, too!
-- Attached is an image of what it should look like in the executor!
Replied
local Plr = game:GetService("Players").LocalPlayer
local Mouse = Plr:GetMouse()
local DeleteList = {}
Mouse.Button1Down:connect(function()
if not game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftControl) then return end
if not Mouse.Target then return end
if not Mouse.Target.Parent then return end
table.insert(DeleteList, {Mouse.Target, Mouse.Target.Parent})
Mouse.Target.Parent = nil
end)
game:GetService("UserInputService").InputBegan:Connect(function (input)
if #DeleteList > 0 and input.KeyCode == Enum.KeyCode.Z and game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftControl) then
DeleteList[#DeleteList][1].Parent = DeleteList[#DeleteList][2]
table.remove(DeleteList, #DeleteList)
end
end)
-- Copy and paste this script and then execute it. Then press CTRL + Click to destroy/delete objects for your view only
-- press CTRL + Z for undo
Cancel
Post
https://imgur.com/a/oOomuUo
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post