Advertisement
PeaPattern

babft

Jul 10th, 2024 (edited)
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.97 KB | None | 0 0
  1. local relief = loadstring(game:HttpGet("https://raw.githubusercontent.com/PeaPattern/relief-lib/main/new.lua"))()
  2. relief.addCategory("Player", "rbxassetid://16149111731")
  3.  
  4. local Config = {
  5.     earlyChest = true,
  6.     instantClaim = false,--dont use with earlyChest
  7.     tpDelay = 2.05,
  8.     restartDelay = 4.85,
  9.     stageToTouchChest = 3,
  10. }
  11.  
  12. local function createPlatforms()
  13.     if not workspace:FindFirstChild("Platforms") then
  14.         local Storage = Instance.new("Folder", workspace)
  15.         Storage.Name = "Platforms"
  16.         for i = 1, 10 do
  17.             local Platform = Instance.new("Part", Storage)
  18.             Platform.Anchored = true
  19.             Platform.Size = Vector3.new(5, 0.5, 5)
  20.             Platform.CFrame = workspace.BoatStages.NormalStages["CaveStage" .. i].DarknessPart.CFrame * CFrame.new(0, -3, 0)
  21.             Platform.Transparency = 1
  22.         end
  23.     end
  24. end
  25.  
  26. local function touchChest(Root)
  27.     firetouchinterest(workspace.BoatStages.NormalStages.TheEnd.GoldenChest.Trigger, Root, 0)
  28.     firetouchinterest(workspace.BoatStages.NormalStages.TheEnd.GoldenChest.Trigger, Root, 1)
  29. end
  30.  
  31. local function claimGold()
  32.     workspace.ClaimRiverResultsGold:FireServer()
  33. end
  34.  
  35. local function autoFarm()
  36.     local LocalPlayer = game:GetService("Players").LocalPlayer
  37.     local Character = LocalPlayer.Character
  38.     local Root = Character.HumanoidRootPart
  39.     local TargetPart = workspace.BoatStages.NormalStages["CaveStage1"].DarknessPart
  40.  
  41.     local Connection
  42.     Connection = game:GetService("RunService").Heartbeat:Connect(function()
  43.         Root.CFrame = TargetPart.CFrame
  44.     end)
  45.  
  46.     task.spawn(function()
  47.         for i = 1, 10 do
  48.             task.spawn(function()
  49.                 if Config.earlyChest and i == Config.stageToTouchChest then
  50.                     task.wait(0.5)
  51.                     touchChest(Root)
  52.                 end
  53.                 if Config.instantClaim then
  54.                     if Config.earlyChest and i >= Config.stageToTouchChest then
  55.                         claimGold()
  56.                     elseif not Config.earlyChest then
  57.                         claimGold()
  58.                     end
  59.                 end
  60.             end)
  61.  
  62.             TargetPart = workspace.BoatStages.NormalStages["CaveStage" .. i].DarknessPart
  63.             if i < 10 then
  64.                 task.wait(Config.tpDelay)
  65.             end
  66.         end
  67.  
  68.         if not Config.earlyChest then
  69.             touchChest(Root)
  70.             Character:BreakJoints()
  71.         else
  72.             TargetPart = workspace.BoatStages.NormalStages.TheEnd.GoldenChest.Trigger
  73.         end
  74.     end)
  75. end
  76.  
  77. local Restart
  78. relief.addModule("Player", "AutoFarm", function(Toggled)
  79.     if Toggled then
  80.         createPlatforms()
  81.         autoFarm()
  82.         Restart = game:GetService("Players").LocalPlayer.CharacterAdded:Connect(function()
  83.             task.wait(Config.restartDelay)
  84.             autoFarm()
  85.         end)
  86.     else
  87.         if Restart then
  88.             Restart:Disconnect()
  89.         end
  90.     end
  91. end)
  92.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement