Advertisement
FurkyYT

fruit sniper

Jan 5th, 2025
8,003
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.32 KB | None | 0 0
  1. -- Get Exploits from here: https://roxploits.com
  2. -- Codex: https://codex.lol
  3. -- Wave: https://getwave.gg
  4.  
  5. local Config = {
  6. Name = "Blox Fruits - Auto Fruit",
  7. Team = "Marines",
  8. TweenSpeed = 200,
  9. SkipFruits = true,
  10. MaxIndividualFruit = 1,
  11. MaxStore = 3600,
  12. CheckInterval = 2500,
  13. TeleportInterval = 1000,
  14. }
  15.  
  16. if not game:IsLoaded() then
  17. game.Loaded:Wait()
  18. end
  19.  
  20. local Players = game:GetService("Players")
  21. local Player = Players.LocalPlayer
  22. local TweenService = game:GetService("TweenService")
  23. local TeleportService = game:GetService("TeleportService")
  24. local HttpService = game:GetService("HttpService")
  25. local StarterGui = game:GetService("StarterGui")
  26. local RunService = game:GetService("RunService")
  27. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  28. local Remotes = ReplicatedStorage:WaitForChild("Remotes")
  29. local CommF_ = Remotes:WaitForChild("CommF_")
  30.  
  31. local function Notify(Text)
  32. StarterGui:SetCore("SendNotification", {
  33. Title = Config.Name,
  34. Text = Text,
  35. })
  36. end
  37.  
  38. local function SetTeam(Team)
  39. Notify(`Setting Team: {Team}`)
  40. CommF_:InvokeServer("SetTeam", Team)
  41. end
  42.  
  43. local function GetCharacter(Player)
  44. return Player.Character or Player.CharacterAdded:Wait()
  45. end
  46.  
  47. local function GetHumanoid(Player)
  48. local Character = GetCharacter(Player)
  49. return Character:WaitForChild("Humanoid")
  50. end
  51.  
  52. local function GetRootPart(Player)
  53. local Character = GetCharacter(Player)
  54. return Character:WaitForChild("HumanoidRootPart")
  55. end
  56.  
  57. local function TeleportTo(CFrame)
  58. local RootPart = GetRootPart(Player)
  59. local CurrentPos = RootPart.Position
  60. local TargetPos = CFrame.Position
  61. local Distance = (TargetPos - CurrentPos).magnitude
  62. local Duration = Distance / Config.TweenSpeed
  63. local TweenInfo = TweenInfo.new(Duration, Enum.EasingStyle.Linear)
  64. local Tween = TweenService:Create(RootPart, TweenInfo, {
  65. CFrame = CFrame,
  66. })
  67.  
  68. Tween:Play()
  69. Tween.Completed:Wait()
  70. end
  71.  
  72. local NoClipConnection
  73.  
  74. local function DisableNoClip()
  75. if NoClipConnection then
  76. NoClipConnection:Disconnect()
  77. NoClipConnection = nil
  78. end
  79. end
  80.  
  81. local function EnableNoClip()
  82. DisableNoClip()
  83.  
  84. NoClipConnection = RunService.Stepped:Connect(function()
  85. if not Player.Character then
  86. return
  87. end
  88.  
  89. for _, Item in pairs(Player.Character:GetDescendants()) do
  90. if Item:IsA("BasePart") and Item.CanCollide then
  91. Item.CanCollide = false
  92. end
  93. end
  94. end)
  95. end
  96.  
  97. local function DisableSitting()
  98. local Humanoid = GetHumanoid(Player)
  99. Humanoid:SetStateEnabled("Seated", false)
  100. Humanoid.Sit = true
  101. end
  102.  
  103. local function EnableSitting()
  104. local Humanoid = GetHumanoid(Player)
  105. Humanoid:SetStateEnabled("Seated", true)
  106. Humanoid.Sit = false
  107. end
  108.  
  109. local function GetStoreName(Name)
  110. local Word = Name:split(" ")[1]
  111. return `{Word}-{Word}`
  112. end
  113.  
  114. local function MonitorCharacter()
  115. local Character = GetCharacter(Player)
  116.  
  117. Character.ChildAdded:Connect(function(Item)
  118. local Fruit = Item:FindFirstChild("Fruit")
  119.  
  120. if Fruit then
  121. Notify(`Storing: {Item.Name}`)
  122. CommF_:InvokeServer("StoreFruit", GetStoreName(Item.Name), Item)
  123. end
  124. end)
  125. end
  126.  
  127. local function GetFruitInventory()
  128. local Inventory = CommF_:InvokeServer("getInventoryFruits")
  129. local Names = {}
  130.  
  131. for _, Fruit in pairs(Inventory) do
  132. if Fruit.Name then
  133. table.insert(Names, Fruit.Name)
  134. end
  135. end
  136.  
  137. return Names
  138. end
  139.  
  140. local function CountOccurrences(Table, Target)
  141. local Count = 0
  142.  
  143. for _, Value in pairs(Table) do
  144. if Value == Target then
  145. Count = Count + 1
  146. end
  147. end
  148.  
  149. return Count
  150. end
  151.  
  152. local function TeleportToFruits()
  153. local Found = false
  154.  
  155. for _, Item in pairs(game.Workspace:GetChildren()) do
  156. local Fruit = Item:FindFirstChild("Handle")
  157. local Handle = Item:FindFirstChild("Handle")
  158.  
  159. if not Fruit and not Handle then
  160. continue
  161. end
  162.  
  163. if Config.SkipFruits then
  164. local Inventory = GetFruitInventory()
  165. local StoreName = GetStoreName(Item.Name)
  166. local Occurrences = CountOccurrences(Inventory, StoreName)
  167.  
  168. if (Occurrences + 1) > Config.MaxIndividualFruit then
  169. Notify(`Skipping: {Item.Name}`)
  170. continue
  171. end
  172. end
  173.  
  174. if not Found then
  175. Found = true
  176. end
  177.  
  178. Notify(`Teleporting: {Item.Name}`)
  179. TeleportTo(Handle.CFrame)
  180. task.wait()
  181. end
  182.  
  183. Notify(Found and "Collected Fruits" or "No Fruits")
  184. end
  185.  
  186. local function ServerHop()
  187. local PlaceId = game.PlaceId
  188. local JobId = game.JobId
  189.  
  190. local RootFolder = "ServerHop"
  191. local StorageFile = `{RootFolder}/{tostring(PlaceId)}.json`
  192. local Data = {
  193. Start = tick(),
  194. Jobs = {},
  195. }
  196.  
  197. if not isfolder(RootFolder) then
  198. makefolder(RootFolder)
  199. end
  200.  
  201. if isfile(StorageFile) then
  202. local NewData = HttpService:JSONDecode(readfile(StorageFile))
  203.  
  204. if tick() - NewData.Start < Config.MaxStore then
  205. Data = NewData
  206. end
  207. end
  208.  
  209. if not table.find(Data.Jobs, JobId) then
  210. table.insert(Data.Jobs, JobId)
  211. end
  212.  
  213. writefile(StorageFile, HttpService:JSONEncode(Data))
  214.  
  215. local Servers = {}
  216. local Cursor = ""
  217.  
  218. while Cursor and #Servers <= 0 and task.wait(Config.CheckInterval / 1000) do
  219. local Request = request or HttpService.RequestAsync
  220. local RequestSuccess, Response = pcall(Request, {
  221. Url = `https://games.roblox.com/v1/games/{PlaceId}/servers/Public?sortOrder=Desc&limit=100&excludeFullGames=true&cursor{Cursor}`,
  222. Method = "GET",
  223. })
  224.  
  225. if not RequestSuccess then
  226. continue
  227. end
  228.  
  229. local DecodeSuccess, Body = pcall(HttpService.JSONDecode, HttpService, Response.Body)
  230.  
  231. if not DecodeSuccess or not Body or not Body.data then
  232. continue
  233. end
  234.  
  235. task.spawn(function()
  236. for _, Server in pairs(Body.data) do
  237. if
  238. typeof(Server) ~= "table"
  239. or not Server.id
  240. or not tonumber(Server.playing)
  241. or not tonumber(Server.maxPlayers)
  242. then
  243. continue
  244. end
  245.  
  246. if Server.playing < Server.maxPlayers and not table.find(Data.Jobs, Server.id) then
  247. table.insert(Servers, 1, Server.id)
  248. end
  249. end
  250. end)
  251.  
  252. if Body.nextPageCursor then
  253. Cursor = Body.nextPageCursor
  254. end
  255. end
  256.  
  257. while #Servers > 0 and task.wait(Config.TeleportInterval / 1000) do
  258. Notify("Server Hopping")
  259. local Server = Servers[math.random(1, #Servers)]
  260. TeleportService:TeleportToPlaceInstance(PlaceId, Server, Player)
  261. end
  262. end
  263.  
  264. SetTeam(Config.Team)
  265. EnableNoClip()
  266. DisableSitting()
  267. MonitorCharacter()
  268. TeleportToFruits()
  269. EnableSitting()
  270. DisableNoClip()
  271. ServerHop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement