RomashkaHEHE

Spider afk farm

Jul 22nd, 2021
1,073
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. _G.enable = false
  2. wait(1)
  3. _G.enable = true
  4. lplr = game.Players.LocalPlayer
  5.  
  6. function itemsfunc()
  7.     -- Crowbar
  8.     if _G.enable and game:GetService("Workspace")["Map01_Cabin"].DockGate.BoardEvent:FindFirstChild('Trigger') and game.Workspace.Items:FindFirstChild('Crowbar') then
  9.         lplr.Character.HumanoidRootPart.CFrame = game.Workspace.Items.Crowbar.Hitbox.CFrame
  10.         while wait() and _G.enable and not lplr.Backpack:FindFirstChild('Crowbar') do
  11.             game:GetService("ReplicatedStorage").modules.up.Network.RemoteFunction:InvokeServer("AttemptSwapItems", game.Workspace.Items.Crowbar.Hitbox)
  12.         end
  13.         lplr.Backpack.Crowbar.Parent = lplr.Character
  14.         while wait() and _G.enable and game:GetService("Workspace")["Map01_Cabin"].DockGate.BoardEvent:FindFirstChild('Trigger') do
  15.             lplr.Character.HumanoidRootPart.CFrame = game:GetService("Workspace")["Map01_Cabin"].DockGate.BoardEvent.Trigger.CFrame
  16.             game:GetService("ReplicatedStorage").modules.up.Network.RemoteEvent:FireServer("AttemptTriggerMapEvent", game.Workspace.Map01_Cabin.DockGate.DockDoorSystem.Indicators.IndicatorShed.Trigger)
  17.         end
  18.     end
  19.  
  20.     -- Battery
  21.     if _G.enable and not game:GetService("Workspace")["Map01_Cabin"].Shed.BatteryLever.BatteryHolder.Powered.Value and game.Workspace.Items:FindFirstChild('Battery') then
  22.         lplr.Character.HumanoidRootPart.CFrame = game.Workspace.Items.Battery.Hitbox.CFrame
  23.         while wait() and _G.enable and not lplr.Backpack:FindFirstChild('Battery') do
  24.             game:GetService("ReplicatedStorage").modules.up.Network.RemoteFunction:InvokeServer("AttemptSwapItems", game.Workspace.Items.Battery.Hitbox)
  25.         end
  26.         lplr.Backpack.Battery.Parent = lplr.Character
  27.         while wait() and _G.enable and not game:GetService("Workspace")["Map01_Cabin"].Shed.BatteryLever.BatteryHolder.Powered.Value do
  28.             lplr.Character.HumanoidRootPart.CFrame = game:GetService("Workspace")["Map01_Cabin"].Shed.BatteryLever.BatteryHolder.Trigger.CFrame
  29.             game:GetService("ReplicatedStorage").modules.up.Network.RemoteEvent:FireServer("AttemptTriggerMapEvent", game.Workspace.Map01_Cabin.Shed.BatteryLever.BatteryHolder.Trigger)
  30.         end
  31.     elseif _G.enable and not game:GetService("Workspace")["Map01_Cabin"].Shed.BatteryLever.PoweredLeverSwitch.State.Value then
  32.         while wait() and _G.enable and not game:GetService("Workspace")["Map01_Cabin"].Shed.BatteryLever.PoweredLeverSwitch.State.Value do
  33.             lplr.Character.HumanoidRootPart.CFrame = game:GetService("Workspace")["Map01_Cabin"].Shed.BatteryLever.PoweredLeverSwitch.Trigger.CFrame
  34.             game:GetService("ReplicatedStorage").modules.up.Network.RemoteEvent:FireServer("AttemptTriggerMapEvent", game.Workspace.Map01_Cabin.Shed.BatteryLever.PoweredLeverSwitch.Trigger)
  35.         end
  36.     end
  37.  
  38.     -- Lever
  39.     while wait() and _G.enable and not game:GetService("Workspace")["Map01_Cabin"].BunkerUnderground.LeverSwitch.State.Value do
  40.         lplr.Character.HumanoidRootPart.CFrame = game:GetService("Workspace")["Map01_Cabin"].BunkerUnderground.LeverSwitch.Trigger.CFrame
  41.         game:GetService("ReplicatedStorage").modules.up.Network.RemoteEvent:FireServer("AttemptTriggerMapEvent", game.Workspace.Map01_Cabin.BunkerUnderground.LeverSwitch.Trigger)
  42.     end
  43.  
  44.     -- Purple Key
  45.     if _G.enable and game:GetService("Workspace").Items:FindFirstChild("Purple Key") and game:GetService("Workspace")["Map01_Cabin"].DockGate.DockDoorSystem.DockDoor:FindFirstChild('Lock') and game:GetService("Workspace")["Map01_Cabin"].Shed.BatteryLever.PoweredLeverSwitch.State.Value and game:GetService("Workspace")["Map01_Cabin"].BunkerUnderground.LeverSwitch.State.Value and not game:GetService("Workspace")["Map01_Cabin"].DockGate.BoardEvent:FindFirstChild('Trigger') then
  46.         while wait() and _G.enable and game:GetService("Workspace").Items:FindFirstChild("Purple Key") do
  47.             lplr.Character.HumanoidRootPart.CFrame = game:GetService("Workspace").Items["Purple Key"].Hitbox.CFrame
  48.             game:GetService("ReplicatedStorage").modules.up.Network.RemoteFunction:InvokeServer("AttemptSwapItems", game.Workspace.Items['Purple Key'].Hitbox)
  49.         end
  50.         lplr.Backpack['Purple Key'].Parent = lplr.Character
  51.         while wait() and _G.enable and game:GetService("Workspace")["Map01_Cabin"].DockGate.DockDoorSystem.DockDoor:FindFirstChild('Lock') and game:GetService("Workspace")["Map01_Cabin"].Shed.BatteryLever.PoweredLeverSwitch.State.Value and game:GetService("Workspace")["Map01_Cabin"].BunkerUnderground.LeverSwitch.State.Value and not game:GetService("Workspace")["Map01_Cabin"].DockGate.BoardEvent:FindFirstChild('Trigger') do
  52.             lplr.Character.HumanoidRootPart.CFrame = game:GetService("Workspace")["Map01_Cabin"].DockGate.DockDoorSystem.DockDoor.HumanoidRootPart.CFrame
  53.             game:GetService("ReplicatedStorage").modules.up.Network.RemoteEvent:FireServer("AttemptToggleDoor", game.Workspace.Map01_Cabin.DockGate.DockDoorSystem.DockDoor, false)
  54.         end
  55.     end
  56. end
  57.  
  58. function playerfunc()
  59.     print('Player')
  60.     if _G.enable and game:GetService("Workspace")["Map01_Cabin"].DockGate.DockDoorSystem.DockDoor:FindFirstChild('Lock') then
  61.         itemsfunc()
  62.     else
  63.         while wait() and _G.enable and not game:GetService("Players").RomashaHEHEHE.PlayerGui.GUI.Escape.Visible do
  64.             lplr.Character.HumanoidRootPart.CFrame = game:GetService("Workspace")["Map01_Cabin"].Victory.CFrame
  65.         end
  66.     end
  67. end
  68.  
  69. function spiderfunc()
  70.     diedlist = {}
  71.     diedlist['RomashaHEHEHE'] = true
  72.     spideren = true
  73.     while wait() and _G.enable and spideren do
  74.         for i,v in pairs(game.Players:GetChildren()) do
  75.             if v ~= lplr and game.Workspace:FindFirstChild(v.Name) then
  76.                 if v.Character:FindFirstChild('Humanoid') then
  77.                     if v.Character.Humanoid.Health > 0 and (v.Character.HumanoidRootPart.Position - Vector3.new(36.2506, 60.2236, -192.726)).magnitude > 250 then
  78.                         if not diedlist[v.Name] then
  79.                             lplr.Character.HumanoidRootPart.CFrame = v.Character.HumanoidRootPart.CFrame
  80.                         end
  81.                     else
  82.                         diedlist[v.Name] = true
  83.                     end
  84.                 end
  85.             end
  86.         end
  87.         estpla = false
  88.         for i,v in pairs(game.Players:GetChildren()) do
  89.             if v ~= lplr and not diedlist[v.Name] then
  90.                 estpla = true
  91.             end
  92.         end
  93.         if not estpla then
  94.             spideren = false
  95.         end
  96.     end
  97. end
  98.  
  99. while wait() and _G.enable   do
  100.     pcall(function()
  101.         game:GetService("ReplicatedStorage").modules.up.Network.RemoteEvent:FireServer("VoteSkipScene", 253)
  102.         if lplr.Character:FindFirstChild('IsSpiderCharacter') then
  103.             spiderfunc()
  104.         elseif (lplr.Character.HumanoidRootPart.Position - Vector3.new(36.2506, 60.2236, -192.726)).magnitude > 250 and not game:GetService("Players").RomashaHEHEHE.PlayerGui.GUI.Escape.Visible then
  105.             playerfunc()
  106.         else
  107.             game:GetService("ReplicatedStorage").modules.up.Network.RemoteFunction:InvokeServer("AttemptJoinGame")
  108.         end
  109.     end)
  110. end
RAW Paste Data