Advertisement
debanhiescobar171

Piggy Ultimate Script

Nov 26th, 2024
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.11 KB | None | 0 0
  1. local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
  2. local Window = Library.CreateLib("Piggy Ultimate Script", "Ocean")
  3.  
  4. -- Botón para minimizar
  5. local MinimizeButton = Instance.new("TextButton")
  6. MinimizeButton.Position = UDim2.new(0.95, 0, 0, 0)
  7. MinimizeButton.Size = UDim2.new(0, 30, 0, 30)
  8. MinimizeButton.Text = "-"
  9. MinimizeButton.Parent = Window.Frame
  10. local minimized = false
  11. MinimizeButton.MouseButton1Click:Connect(function()
  12.     minimized = not minimized
  13.     if minimized then
  14.         Window.Frame.Size = UDim2.new(0, Window.Frame.Size.X.Offset, 0, 30)
  15.         MinimizeButton.Text = "+"
  16.     else
  17.         Window.Frame.Size = UDim2.new(0, Window.Frame.Size.X.Offset, 0, Window.Frame.OriginalSize.Y.Offset)
  18.         MinimizeButton.Text = "-"
  19.     end
  20. end)
  21.  
  22. -- MAIN
  23. local Main = Window:NewTab("Main")
  24. local MainSection = Main:NewSection("Principal")
  25.  
  26. -- God Mode mejorado
  27. MainSection:NewToggle("God Mode", "Te hace invencible", function(state)
  28.     local Players = game:GetService("Players")
  29.     local Player = Players.LocalPlayer
  30.    
  31.     if state then
  32.         if Player.Character then
  33.             -- Crear un nuevo humanoid
  34.             local humanoid = Player.Character:FindFirstChild("Humanoid")
  35.             if humanoid then
  36.                 local newHumanoid = humanoid:Clone()
  37.                 newHumanoid.Parent = Player.Character
  38.                 humanoid:Destroy()
  39.                 newHumanoid.Health = math.huge
  40.                 newHumanoid.MaxHealth = math.huge
  41.                
  42.                 -- Conexión para mantener la salud infinita
  43.                 game:GetService("RunService").Heartbeat:Connect(function()
  44.                     if state then
  45.                         newHumanoid.Health = math.huge
  46.                     end
  47.                 end)
  48.             end
  49.            
  50.             -- Prevenir daño
  51.             local function preventDamage()
  52.                 if Player.Character then
  53.                     local humanoid = Player.Character:FindFirstChild("Humanoid")
  54.                     if humanoid then
  55.                         humanoid.Health = math.huge
  56.                     end
  57.                 end
  58.             end
  59.            
  60.             Player.Character.ChildAdded:Connect(preventDamage)
  61.             Player.Character.ChildRemoved:Connect(preventDamage)
  62.         end
  63.     end
  64. end)
  65.  
  66. -- MAPAS (Forzador mejorado)
  67. local Maps = Window:NewTab("Maps")
  68. local MapsSection = Maps:NewSection("Forzador de Mapas")
  69.  
  70. local mapList = {
  71.     "House", "Station", "Gallery", "Forest", "School",
  72.     "Hospital", "Metro", "City", "Factory", "Mall",
  73.     "Carnival", "Outpost"
  74. }
  75.  
  76. for _, mapName in ipairs(mapList) do
  77.     MapsSection:NewToggle(mapName, "Forzar "..mapName, function(state)
  78.         if state then
  79.             spawn(function()
  80.                 while state do
  81.                     -- Método 1: Evento directo
  82.                     game:GetService("ReplicatedStorage").RemoteEvents.GameEvent:FireServer("Map", mapName, true)
  83.                    
  84.                     -- Método 2: Votación
  85.                     game:GetService("ReplicatedStorage").RemoteEvents.GameEvent:FireServer("Vote", mapName)
  86.                    
  87.                     -- Método 3: Actualización de valor
  88.                     if game:GetService("ReplicatedStorage"):FindFirstChild("Map") then
  89.                         game:GetService("ReplicatedStorage").Map.Value = mapName
  90.                     end
  91.                    
  92.                     -- Método 4: Actualización directa
  93.                     pcall(function()
  94.                         game:GetService("ReplicatedStorage").RemoteEvents.UpdateMap:FireServer(mapName)
  95.                     end)
  96.                    
  97.                     -- Método 5: Forzado adicional
  98.                     local args = {
  99.                         [1] = "MapVote",
  100.                         [2] = mapName
  101.                     }
  102.                     game:GetService("ReplicatedStorage").RemoteEvents.GameEvent:FireServer(unpack(args))
  103.                    
  104.                     wait(0.1)
  105.                 end
  106.             end)
  107.         end
  108.     end)
  109. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement