Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local gui = Instance.new("ScreenGui", game.CoreGui)
- local frame = Instance.new("Frame", gui)
- frame.Size = UDim2.new(0, 220, 0, 100)
- frame.Position = UDim2.new(0, 20, 0, 200)
- frame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- frame.Active, frame.Draggable = true, true
- local title = Instance.new("TextLabel", frame)
- title.Size = UDim2.new(1, -30, 0, 30)
- title.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- title.Text = "Script made by userr0011"
- title.TextColor3 = Color3.new(1, 1, 1)
- title.TextSize = 16
- title.TextXAlignment = Enum.TextXAlignment.Left
- local minimize = Instance.new("TextButton", frame)
- minimize.Position = UDim2.new(1, -30, 0, 0)
- minimize.Size = UDim2.new(0, 30, 0, 30)
- minimize.Text = "-"
- minimize.TextColor3 = Color3.new(1, 1, 1)
- minimize.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- local btn = Instance.new("TextButton", frame)
- btn.Position = UDim2.new(0.1, 0, 0.5, 0)
- btn.Size = UDim2.new(0.8, 0, 0.4, 0)
- btn.Text = "GodMode: OFF"
- btn.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
- btn.TextColor3 = Color3.new(1, 1, 1)
- btn.TextSize = 18
- btn.Font = Enum.Font.SourceSansBold
- local god = false
- btn.MouseButton1Click:Connect(function()
- god = not god
- btn.Text = god and "GodMode: ON" or "GodMode: OFF"
- if god then
- coroutine.wrap(function()
- while god do
- local h = player.Character and player.Character:FindFirstChildOfClass("Humanoid")
- if h then h.Health = h.MaxHealth end
- wait(0.1)
- end
- end)()
- end
- end)
- -- Restore image
- local restore = Instance.new("ImageButton", gui)
- restore.Size = UDim2.new(0, 40, 0, 40)
- restore.Position = UDim2.new(0, 10, 0, 10)
- restore.Image = "rbxassetid://6031094678"
- restore.BackgroundTransparency = 1
- restore.Visible = false
- local drag = Instance.new("Frame", gui)
- drag.Size = restore.Size
- drag.Position = restore.Position
- drag.BackgroundTransparency = 1
- drag.Active, drag.Draggable = true, true
- drag.Visible = false
- restore.Parent = drag
- minimize.MouseButton1Click:Connect(function()
- frame.Visible = false
- restore.Visible = true
- drag.Visible = true
- end)
- restore.MouseButton1Click:Connect(function()
- frame.Visible = true
- restore.Visible = false
- drag.Visible = false
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement