Advertisement
SigmaBoy456

Roblox Rock Fruit FROG HUB v1 script

Jul 12th, 2024 (edited)
1,401
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.19 KB | None | 0 0
  1. local OrionLib = loadstring(game:HttpGet(('https://raw.githubusercontent.com/shlexware/Orion/main/source')))()
  2. local Window = OrionLib:MakeWindow({Name = "Rock Fruit FROG HUB v1", HidePremium = false, SaveConfig = true, ConfigFolder = "OrionTest"})
  3.  
  4. local Section = Window:MakeTab({
  5.     Name = "Script"
  6. })
  7.  
  8. local toggleButtons = {}
  9. local activeConnections = {}
  10.  
  11. local function removeToggleButton(name)
  12.     if toggleButtons[name] then
  13.         toggleButtons[name]:Destroy()
  14.         toggleButtons[name] = nil
  15.     end
  16. end
  17.  
  18. local function createAutoFarmToggle(name, modelName)
  19.     removeToggleButton(name)
  20.  
  21.     toggleButtons[name] = Section:AddToggle({
  22.         Name = name,
  23.         Default = false,
  24.         Callback = function(Value)
  25.             if Value then
  26.                 activeConnections[name] = game:GetService("RunService").Heartbeat:Connect(function()
  27.                     local player = game.Players.LocalPlayer.Character.HumanoidRootPart
  28.                     for _, v in ipairs(game.Workspace.Mob:GetDescendants()) do
  29.                         if v:IsA("Model") and v.Name == modelName and v:FindFirstChild("HumanoidRootPart") then
  30.                             local JN = v:FindFirstChild("HumanoidRootPart")
  31.                             if JN and player and v.Humanoid.Health > 0 then
  32.                                 -- Teleport 11 studs above NPC's head and point towards the floor
  33.                                 local targetPosition = JN.Position + Vector3.new(0, JN.Size.Y/2 + 11, 0) -- Adjust to NPC's head position + 11 studs up
  34.                                 player.CFrame = CFrame.new(targetPosition, targetPosition - Vector3.new(0, 1, 0))
  35.                                 wait() -- Wait briefly (default interval)
  36.                             end
  37.                         end
  38.                     end
  39.                 end)
  40.             else
  41.                 if activeConnections[name] then
  42.                     activeConnections[name]:Disconnect()
  43.                     activeConnections[name] = nil
  44.                 end
  45.             end
  46.         end
  47.     })
  48. end
  49.  
  50. local function populateDropdown()
  51.     local options = {}
  52.     for _, v in ipairs(game.Workspace.Mob:GetDescendants()) do
  53.         if v:FindFirstChild("HumanoidRootPart") then
  54.             table.insert(options, v.Name)
  55.         end
  56.     end
  57.     return options
  58. end
  59.  
  60. local function populateNpcDropdown()
  61.     local options = {}
  62.     for _, v in ipairs(game.Workspace.npcClick:GetDescendants()) do
  63.         if v:FindFirstChild("HumanoidRootPart") then
  64.             table.insert(options, v.Name)
  65.         end
  66.     end
  67.     return options
  68. end
  69.  
  70. Section:AddDropdown({
  71.     Name = "Select Mob to Auto Farm",
  72.     Default = "",
  73.     Options = populateDropdown(),
  74.     Callback = function(selectedMob)
  75.         createAutoFarmToggle("Auto Farm " .. selectedMob, selectedMob)
  76.     end
  77. })
  78.  
  79. Section:AddDropdown({
  80.     Name = "Select NPC to Teleport",
  81.     Default = "",
  82.     Options = populateNpcDropdown(),
  83.     Callback = function(selectedNpc)
  84.         local player = game.Players.LocalPlayer.Character.HumanoidRootPart
  85.         for _, v in ipairs(game.Workspace.npcClick:GetDescendants()) do
  86.             if v:IsA("Model") and v.Name == selectedNpc and v:FindFirstChild("HumanoidRootPart") then
  87.                 local JN = v:FindFirstChild("HumanoidRootPart")
  88.                 if JN and player then
  89.                     -- Teleport 11 studs above NPC's head and point towards the floor
  90.                     local targetPosition = JN.Position + Vector3.new(0, JN.Size.Y/2 + 11, 0) -- Adjust to NPC's head position + 11 studs up
  91.                     player.CFrame = CFrame.new(targetPosition, targetPosition - Vector3.new(0, 1, 0))
  92.                 end
  93.             end
  94.         end
  95.     end
  96. })
  97.  
  98. Section:AddToggle({
  99.     Name = "Collect Existing Fruit",
  100.     Default = false,
  101.     Callback = function(Value)
  102.         if Value then
  103.             activeConnections["Collect Existing Fruit"] = game:GetService("RunService").Heartbeat:Connect(function()
  104.                 local player = game.Players.LocalPlayer.Character.HumanoidRootPart
  105.                 for _, v in ipairs(game.Workspace.Fruits:GetChildren()) do
  106.                     if v:IsA("Tool") then
  107.                         player.CFrame = v.Handle.CFrame
  108.                     end
  109.                 end
  110.             end)
  111.         else
  112.             if activeConnections["Collect Existing Fruit"] then
  113.                 activeConnections["Collect Existing Fruit"]:Disconnect()
  114.                 activeConnections["Collect Existing Fruit"] = nil
  115.             end
  116.         end
  117.     end
  118. })
  119.  
  120. Section:AddToggle({
  121.     Name = "Enlarge HumanoidRootParts",
  122.     Default = false,
  123.     Callback = function(Value)
  124.         if Value then
  125.             for _, v in ipairs(game.Workspace.Mob:GetDescendants()) do
  126.                 if v:FindFirstChild("HumanoidRootPart") then
  127.                     local HRP = v:FindFirstChild("HumanoidRootPart")
  128.                     HRP.Size = Vector3.new(50, 50, 50)
  129.                     HRP.Transparency = 0.5
  130.                     HRP.Color = Color3.fromRGB(255, 255, 255)
  131.                     HRP.Visible = true
  132.                 end
  133.             end
  134.         end
  135.     end
  136. })
  137.  
  138. Section:AddToggle({
  139.     Name = "Equip All Tools",
  140.     Default = false,
  141.     Callback = function(Value)
  142.         if Value then
  143.             activeConnections["Equip All Tools"] = game:GetService("RunService").Heartbeat:Connect(function()
  144.                 for _, v in ipairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
  145.                     if v:IsA("Tool") then
  146.                         v.Parent = game.Players.LocalPlayer.Character
  147.                     end
  148.                 end
  149.             end)
  150.         else
  151.             if activeConnections["Equip All Tools"] then
  152.                 activeConnections["Equip All Tools"]:Disconnect()
  153.                 activeConnections["Equip All Tools"] = nil
  154.             end
  155.         end
  156.     end
  157. })
  158.  
  159. local function autoSkillAttack()
  160.     activeConnections["Auto Skill Attack"] = game:GetService("RunService").Heartbeat:Connect(function()
  161.         -- Check if the player has any tool equipped
  162.         local tool = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
  163.         if tool then
  164.             -- Get the equipped tool's name and fire server actions for {"x", "z", "c", "v"}
  165.             local toolName = tool.Name
  166.             for _, skillKey in ipairs({"x", "z", "c", "v"}) do
  167.                 local args = {
  168.                     [1] = toolName, -- Use the equipped tool's name
  169.                     [2] = skillKey,
  170.                     [3] = game:GetService("Players").LocalPlayer.PlayerGui.HUD.MobileSkill
  171.                 }
  172.                 game:GetService("ReplicatedStorage").Remote.Action:FireServer(unpack(args))
  173.             end
  174.         end
  175.     end)
  176. end
  177.  
  178. Section:AddToggle({
  179.     Name = "Auto Skill Attack",
  180.     Default = false,
  181.     Callback = function(Value)
  182.         if Value then
  183.             autoSkillAttack()
  184.         else
  185.             if activeConnections["Auto Skill Attack"] then
  186.                 activeConnections["Auto Skill Attack"]:Disconnect()
  187.                 activeConnections["Auto Skill Attack"] = nil
  188.             end
  189.         end
  190.     end
  191. })
  192.  
  193. -- Initialize the UI library
  194. OrionLib:Init()
  195.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement