Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Instances:
- local MenuGui = Instance.new("ScreenGui")
- local BackGround = Instance.new("Frame")
- local ActivatedLabel = Instance.new("TextLabel")
- local ActiveButtom = Instance.new("TextButton")
- local canDestroy = false
- local player = game:GetService("Players").LocalPlayer
- local mouse = player:GetMouse()
- local mouseHIT = nil
- local inputService = game:GetService("UserInputService")
- local KEY_TO_DELET = Enum.KeyCode.E
- --Properties:
- MenuGui.Name = "MenuGui"
- MenuGui.Parent = player.PlayerGui
- MenuGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- MenuGui.ResetOnSpawn = false
- BackGround.Name = "BackGround"
- BackGround.Parent = MenuGui
- BackGround.BackgroundColor3 = Color3.new(0.105882, 0.0901961, 0.0901961)
- BackGround.BorderColor3 = Color3.new(1, 1, 1)
- BackGround.Position = UDim2.new(0.01390923, 0, 0.598101199, 0)
- BackGround.Size = UDim2.new(0, 102, 0, 76)
- ActivatedLabel.Name = "ActivatedLabel"
- ActivatedLabel.Parent = BackGround
- ActivatedLabel.BackgroundColor3 = Color3.new(0.105882, 0.0901961, 0.0901961)
- ActivatedLabel.BorderColor3 = Color3.new(1, 1, 1)
- ActivatedLabel.BorderSizePixel = 0
- ActivatedLabel.Position = UDim2.new(0.0294117648, 0, 0.105263159, 0)
- ActivatedLabel.Size = UDim2.new(0, 95, 0, 25)
- ActivatedLabel.Font = Enum.Font.Arial
- ActivatedLabel.Text = "CanDestroy: FALSE"
- ActivatedLabel.TextColor3 = Color3.new(1, 0, 0.0156863)
- ActivatedLabel.TextScaled = true
- ActivatedLabel.TextSize = 20
- ActivatedLabel.TextWrapped = true
- ActiveButtom.Name = "ActiveButtom"
- ActiveButtom.Parent = BackGround
- ActiveButtom.BackgroundColor3 = Color3.new(0.105882, 0.0901961, 0.0901961)
- ActiveButtom.BorderColor3 = Color3.new(1, 1, 1)
- ActiveButtom.Position = UDim2.new(0.0582493618, 0, 0.603514373, 0)
- ActiveButtom.Size = UDim2.new(0, 89, 0, 22)
- ActiveButtom.Font = Enum.Font.Arial
- ActiveButtom.Text = "Active"
- ActiveButtom.TextColor3 = Color3.new(1, 1, 1)
- ActiveButtom.TextScaled = true
- ActiveButtom.TextSize = 14
- ActiveButtom.TextWrapped = true
- -- Scripts:
- while wait() do
- ActiveButtom.MouseButton1Click:Connect(function()
- if canDestroy == false then
- canDestroy = true
- ActivatedLabel.Text = "CanDestroy: TRUE"
- ActivatedLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
- elseif canDestroy == true then
- canDestroy = false
- ActivatedLabel.Text = "CanDestroy: FALSE"
- ActivatedLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
- end
- end)
- inputService.InputBegan:Connect(function(key)
- if key.KeyCode == KEY_TO_DELET and canDestroy == true and mouseHIT == nil then
- mouseHIT = mouse.Target
- mouseHIT:Destroy()
- mouseHIT = nil
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement