Ovovuevuevue

God mode script

Feb 6th, 2025
1,277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. --
  2. local ScreenGui = Instance.new("ScreenGui")
  3. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  4. ScreenGui.Name = "GodModeGUI"
  5.  
  6. local Frame = Instance.new("Frame")
  7. Frame.Parent = ScreenGui
  8. Frame.Size = UDim2.new(0, 200, 0, 100)
  9. Frame.Position = UDim2.new(0.5, -100, 0.1, 0)
  10. Frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  11. Frame.Active = true
  12. Frame.Draggable = true --
  13.  
  14. local Title = Instance.new("TextLabel")
  15. Title.Parent = Frame
  16. Title.Size = UDim2.new(1, 0, 0.3, 0)
  17. Title.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  18. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  19. Title.Text = "God Mode"
  20. Title.Font = Enum.Font.SourceSansBold
  21. Title.TextSize = 20
  22.  
  23. local ToggleButton = Instance.new("TextButton")
  24. ToggleButton.Parent = Frame
  25. ToggleButton.Size = UDim2.new(0.8, 0, 0.4, 0)
  26. ToggleButton.Position = UDim2.new(0.1, 0, 0.5, 0)
  27. ToggleButton.BackgroundColor3 = Color3.fromRGB(100, 100, 255)
  28. ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  29. ToggleButton.Text = "ON"
  30. ToggleButton.Font = Enum.Font.SourceSansBold
  31. ToggleButton.TextSize = 20
  32.  
  33. --
  34. local godModeEnabled = true
  35.  
  36. ToggleButton.MouseButton1Click:Connect(function()
  37. godModeEnabled = not godModeEnabled
  38. if godModeEnabled then
  39. ToggleButton.Text = "ON"
  40. ToggleButton.BackgroundColor3 = Color3.fromRGB(100, 100, 255)
  41. else
  42. ToggleButton.Text = "OFF"
  43. ToggleButton.BackgroundColor3 = Color3.fromRGB(255, 100, 100)
  44. end
  45. end)
  46.  
  47. local player = game.Players.LocalPlayer
  48. local character = player.Character or player.CharacterAdded:Wait()
  49.  
  50. local function monitorHealth()
  51. local humanoid = character:FindFirstChildOfClass("Humanoid")
  52. if humanoid then
  53. humanoid.HealthChanged:Connect(function()
  54. if godModeEnabled and humanoid.Health < humanoid.MaxHealth then
  55. humanoid.Health = humanoid.MaxHealth
  56. end
  57. end)
  58. end
  59. end
  60.  
  61. character.ChildAdded:Connect(function(child)
  62. if child:IsA("Humanoid") then
  63. monitorHealth()
  64. end
  65. end)
  66.  
  67. monitorHealth()
  68.  
Tags: #Scripts
Advertisement
Add Comment
Please, Sign In to add comment