Advertisement
flopa2677

Skibi Toilets VS Cameramen [10M!] Fast Auto Farm

Jul 18th, 2023
1,047
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
  2.  
  3.  
  4.  
  5. local Window = Library.CreateLib("Auto Farm Gui", "DarkTheme")
  6.  
  7.  
  8.  
  9. local Tab = Window:NewTab("Auto Farm")
  10.  
  11.  
  12.  
  13. local Section = Tab:NewSection("Auto Farm")
  14.  
  15.  
  16.  
  17. Section:NewButton("use before using auto farm and click again if you died", "ButtonInfo", function()
  18. local player = game:GetService("Players").LocalPlayer
  19. local proximityRadius = 50
  20. local activationInterval = 00.1
  21.  
  22. local function activateProximityPrompts()
  23. local character = player.Character or player.CharacterAdded:Wait()
  24. local rootPart = character:WaitForChild("HumanoidRootPart")
  25.  
  26. while true do
  27. for _, v in pairs(game:GetService("Workspace"):GetDescendants()) do
  28. if v:IsA("ProximityPrompt") then
  29. local distance = (rootPart.Position - v.Parent.Position).Magnitude
  30. if distance <= proximityRadius then
  31. fireproximityprompt(v)
  32. end
  33. end
  34. end
  35.  
  36. wait(activationInterval)
  37. end
  38. end
  39.  
  40. activateProximityPrompts()
  41.  
  42. end)
  43.  
  44.  
  45.  
  46. Section:NewButton("Auto Farm", "ButtonInfo", function()
  47. local player = game:GetService("Players").LocalPlayer
  48. local teleportInterval = 0.5
  49.  
  50. local function getRandomObjectWithHumanoidRootPart(folder)
  51. local objectsWithRootPart = {}
  52. for _, obj in ipairs(folder:GetChildren()) do
  53. if obj:IsA("Model") and obj:FindFirstChild("HumanoidRootPart") then
  54. table.insert(objectsWithRootPart, obj)
  55. end
  56. end
  57.  
  58. if #objectsWithRootPart > 0 then
  59. return objectsWithRootPart[math.random(1, #objectsWithRootPart)]
  60. else
  61. return nil
  62. end
  63. end
  64.  
  65. local function teleportToRandomObject()
  66. local toiletsFolder = game:GetService("Workspace").Toilets
  67. if toiletsFolder then
  68. while true do
  69. local randomToilet = getRandomObjectWithHumanoidRootPart(toiletsFolder)
  70. if randomToilet then
  71. player.Character:SetPrimaryPartCFrame(randomToilet.HumanoidRootPart.CFrame)
  72. end
  73. wait(teleportInterval)
  74. end
  75. end
  76. end
  77.  
  78. teleportToRandomObject()
  79.  
  80. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement