Advertisement
A_GUES

Infinity Gauntlet | Thanos Simulator script

Jul 19th, 2023 (edited)
6,803
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.17 KB | None | 0 0
  1. local godmode = false -- set true if u want farm without dying
  2.  
  3. local executecheck = false -- initialize as false
  4. if executecheck then
  5.     print("Already Executed")
  6.     return
  7. end
  8.  
  9. game.Players.LocalPlayer.Character:BreakJoints()
  10.  
  11. game.Players.LocalPlayer.Character.Humanoid.Died:Connect(function()
  12.     game.Players.LocalPlayer.CharacterAdded:Connect(function()
  13.         for i, v in pairs(game:GetService("Workspace").Spawn.Classes.Class1:GetDescendants()) do
  14.             if v:IsA("ClickDetector") then
  15.                 fireclickdetector(v)
  16.                 executecheck = true
  17.             end
  18.         end
  19.     end)
  20. end)
  21.  
  22. game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
  23. wait(7)
  24.  
  25. if godmode then
  26.     local speaker = game.Players.LocalPlayer
  27.     local Cam = workspace.CurrentCamera
  28.     local Char = speaker.Character
  29.     local Human = Char:FindFirstChildWhichIsA("Humanoid")
  30.     local nHuman = Human:Clone()
  31.     nHuman.Parent = Char
  32.     speaker.Character = nil
  33.     nHuman:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
  34.     nHuman:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
  35.     nHuman:SetStateEnabled(Enum.HumanoidStateType.Running, false)
  36.     nHuman.BreakJointsOnDeath = true
  37.     Human:Destroy()
  38.     speaker.Character = Char
  39.     Cam.CameraSubject = nHuman
  40.     Cam.CFrame = Pos
  41.     nHuman.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
  42.     local Script = Char:FindFirstChild("Animate")
  43.     nHuman.Health = nHuman.MaxHealth
  44.     Char.Animate.Disabled = true
  45.     wait(.05)
  46.     Char.Animate.Disabled = false
  47.     wait(.10)
  48. end
  49.  
  50. game.Players.LocalPlayer.Backpack["Infinity Gauntlet"].Parent = game.Players.LocalPlayer.Character
  51.  
  52. while wait() do
  53.     pcall(function()
  54.         for i, v in pairs(game:GetService("Workspace").Enemies:GetChildren()) do
  55.             repeat wait(.01)
  56.                 game.Players.LocalPlayer.Character["Infinity Gauntlet"]:Activate()
  57.                 game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame =
  58.                     v.HumanoidRootPart.CFrame * CFrame.new(1, -1,math.random(-2,2))
  59.             until (v:FindFirstChildWhichIsA("Humanoid").Health <= 0 or not v)
  60.         end
  61.     end)
  62. end
  63.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement