Advertisement
2AreYouMental110

Rainbow Piece V2 Fruits Admin

Jun 6th, 2023 (edited)
895
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.89 KB | None | 0 0
  1. -- https://www.roblox.com/games/9824379165/GAME-FIXED-REOPENED-Rainbow-Piece-2
  2.  
  3. local prefix = "."
  4.  
  5. if getgenv().started then
  6.     return
  7. end
  8.  
  9. print([[
  10. Rainbown Piece Admin!
  11.  
  12. end (no prefix) - ends the admin
  13.  
  14. startfarm - starts farming fruits
  15. stopfarm - stops farming fruits
  16. unhidefruits - unhides the fruits
  17. dropfruits - drops all fruits
  18. dropfruitsdelay - drops all fruits with delay to not lag
  19. ]])
  20.  
  21. getgenv().started = true
  22. getgenv().farm = false
  23. local ended = false
  24. local ontext = game.Players.LocalPlayer.Chatted:Connect(function(txt)
  25.     if string.sub(txt,1,string.len(prefix)) == prefix then
  26.         local cmd
  27.         if string.find(txt," ") then
  28.             cmd = string.sub(txt,string.len(prefix)+1,string.find(txt," ")-1)
  29.         else
  30.             cmd = string.sub(txt,string.len(prefix)+1)
  31.         end
  32.         print(txt,cmd)
  33.         if cmd == "startfarm" then
  34.             getgenv().farm = true
  35.         elseif cmd == "stopfarm" then
  36.             getgenv().farm = false
  37.         elseif cmd == "unhidefruits" then
  38.             for i,v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
  39.                 v.TextureId = ""
  40.             end
  41.         elseif cmd == "dropfruits" then
  42.             for i,v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
  43.                 if v:FindFirstChild("EatScript") and v.EatScript:FindFirstChild("Eat") then
  44.                     v.Parent = game.Players.LocalPlayer.Character
  45.                     v.Parent = game.Workspace
  46.                 end
  47.             end
  48.         elseif cmd == "dropfruitsdelay" then
  49.             for i,v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
  50.                 if v:FindFirstChild("EatScript") and v.EatScript:FindFirstChild("Eat") then
  51.                     wait()
  52.                     v.Parent = game.Players.LocalPlayer.Character
  53.                     v.Parent = game.Workspace
  54.                 end
  55.             end
  56.         end
  57.     elseif txt == "end" then
  58.         ended = true
  59.     end
  60. end)
  61. repeat
  62.     wait()
  63.     if getgenv().farm == true then
  64.         fireclickdetector(game:GetService("Workspace").FruitSeller.ClickPart.ClickDetector,1)
  65.     end
  66. until ended == true
  67. getgenv().started = false
  68. ontext:Disconnect()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement