The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Coconut Simulator GUI script pastebin roblox
By LINK GAME on 2024-09-20 08:00 am | Syntax: LUA | Views: 10



New Script | Raw | Show/Hide line no. | Copy text to clipboard
  1. local library = loadstring(game:HttpGet(('https://raw.githubusercontent.com/Maxgat5/UiLib/main/lua')))()
  2. local w = library:CreateWindow("Coconut Simulator")
  3. local b = w:CreateFolder("AutoFarm")
  4. local e = w:CreateFolder("Mix")
  5. local u = w:CreateFolder("Credits")
  6.  
  7. b:Toggle("PlaceTreeBase",function(bool)
  8.     shared.toggle = bool
  9.     PlaceTreeBase = bool
  10. end)
  11.  
  12. b:Toggle("ClickTreeBase",function(bool)
  13.     shared.toggle = bool
  14.     ClickTreeBase = bool
  15. end)
  16.  
  17. b:Toggle("ClickTreeOutSide",function(bool)
  18.     shared.toggle = bool
  19.     ClickTreeOutSide = bool
  20. end)
  21.  
  22. b:Toggle("CollectCoconut",function(bool)
  23.     shared.toggle = bool
  24.     CollectCoconut = bool
  25. end)
  26.  
  27. b:Toggle("CollectCheats",function(bool)
  28.     shared.toggle = bool
  29.     CollectCheats = bool
  30. end)
  31.  
  32. b:Toggle("AutoSell",function(bool)
  33.     shared.toggle = bool
  34.     AutoSell = bool
  35. end)
  36.  
  37. e:Toggle("AntiAfk",function(bool)
  38.     shared.toggle = bool
  39.     AntiAfk = bool
  40. end)
  41.  
  42. e:Button("Open Shop",function()
  43.     firetouchinterest(game.Players.LocalPlayer.Character.HumanoidRootPart, game:GetService("Workspace").Shop.Ring.Part, 1)
  44.     firetouchinterest(game.Players.LocalPlayer.Character.HumanoidRootPart, game:GetService("Workspace").Shop.Ring.Part, 0)
  45. end)
  46.  
  47. e:Button("Tp Base",function()
  48.     base = nil
  49.     for i,v in pairs(game:GetService("Workspace").OwnerSigns:GetDescendants()) do
  50.         if v.ClassName == "TextLabel" then
  51.             if v.Text == game.Players.LocalPlayer.Name.."'s Farm" then
  52.                 base = v.Parent.Parent.Parent.Name
  53.             end
  54.         end
  55.     end
  56.     game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Workspace").Plots[base].Base.CFrame.Position + Vector3.new(0,30,0))
  57. end)
  58.  
  59. --Credits
  60. u:Button("maxgat5#8395",function()
  61.     setclipboard("maxgat5#8395")
  62. end)
  63.  
  64. u:Button("Discord Server",function()
  65.     setclipboard("https://discord.gg/K4txdRSVfq")
  66. end)
  67.  
  68. base5 = nil
  69. for i,v in pairs(game:GetService("Workspace").OwnerSigns:GetDescendants()) do
  70.     if v.ClassName == "TextLabel" then
  71.         if v.Text == game.Players.LocalPlayer.Name.."'s Farm" then
  72.             base5 = v.Parent.Parent.Parent.Name
  73.         end
  74.     end
  75. end
  76.  
  77. if base5 == nil then
  78.     for i,v in pairs(game:GetService("Workspace").ClaimParts:GetDescendants()) do
  79.         if v.ClassName == "TouchTransmitter" then
  80.             if base5 == nil then
  81.                 base5 = "https://youtu.be/dQw4w9WgXcQ"
  82.                 game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(v.Parent.CFrame.Position + Vector3.new(0,0,0))
  83.             end
  84.         end
  85.     end
  86. end
  87.  
  88. while wait() do
  89.     spawn(function()
  90.         pcall(function()
  91.             if ClickTreeBase == true then
  92.                 base = nil
  93.                 for i,v in pairs(game:GetService("Workspace").OwnerSigns:GetDescendants()) do
  94.                     if v.ClassName == "TextLabel" then
  95.                         if v.Text == game.Players.LocalPlayer.Name.."'s Farm" then
  96.                             base = v.Parent.Parent.Parent.Name
  97.                         end
  98.                     end
  99.                 end
  100.                
  101.                 for i,v in pairs(game:GetService("Workspace").Plots[base]:GetDescendants()) do
  102.                     if string.find(v.Name,"Position") then
  103.                         for i,v1 in pairs(v:GetChildren()) do
  104.                             if v1.ClassName == "Model" then
  105.                                 for i,v2 in pairs(v1:GetDescendants()) do
  106.                                     if v2.ClassName == "ClickDetector" then
  107.                                         string = game:GetService("Players").LocalPlayer.PlayerGui.MainUI.BasketCount.Text
  108.                                         a,b = string:match("(.+)/(.+)")
  109.                                         if a ~= b then
  110.                                             fireclickdetector(v2, 1)
  111.                                             wait(.1)
  112.                                             fireclickdetector(v2, 0)
  113.                                             wait(.1)
  114.                                         end
  115.                                     end
  116.                                 end
  117.                             end
  118.                         end
  119.                     end
  120.                 end
  121.             end
  122.         end)
  123.     end)
  124.    
  125.     spawn(function()
  126.         pcall(function()
  127.             if PlaceTreeBase == true then
  128.                 base = nil
  129.                 Number = {}
  130.                 for i,v in pairs(game:GetService("Players").LocalPlayer.DataStorage.SeedCount:GetChildren()) do
  131.                     if v.Value ~= 0 then
  132.                         table.insert(Number,v.Value)
  133.                     end
  134.                 end
  135.                
  136.                 for i,v in pairs(game:GetService("Players").LocalPlayer.DataStorage.SeedCount:GetChildren()) do
  137.                     if v.Value == math.min(table.unpack(Number)) then
  138.                         seeds = string.gsub(v.Name,"Count","")
  139.                     end
  140.                 end
  141.                
  142.                 for i,v in pairs(game:GetService("Workspace").OwnerSigns:GetDescendants()) do
  143.                     if v.ClassName == "TextLabel" then
  144.                         if v.Text == game.Players.LocalPlayer.Name.."'s Farm" then
  145.                             base = v.Parent.Parent.Parent.Name
  146.                         end
  147.                     end
  148.                 end
  149.                
  150.                 for i,v1 in pairs(game:GetService("Workspace").Plots[base]:GetDescendants()) do
  151.                     if v1.ClassName == "RemoteEvent" then
  152.                         if string.find(v1.Name,"PlantRequest") then
  153.                             v1:FireServer(seeds)
  154.                         end
  155.                     end
  156.                 end
  157.             end
  158.         end)
  159.     end)
  160.  
  161.     spawn(function()
  162.         pcall(function()
  163.             if ClickTreeOutSide == true then
  164.                 for i,v in pairs(game:GetService("Workspace"):GetDescendants()) do
  165.                     if v.ClassName == "Part" then
  166.                         if string.find(v.Name,"Tree") then
  167.                             for i,v1 in pairs(v:GetDescendants()) do
  168.                                 if v1.ClassName == "ClickDetector" then
  169.                                     string = game:GetService("Players").LocalPlayer.PlayerGui.MainUI.BasketCount.Text
  170.                                     a,b = string:match("(.+)/(.+)")
  171.                                     if a ~= b then
  172.                                         fireclickdetector(v1, 0)
  173.                                         fireclickdetector(v1, 1)
  174.                                         fireclickdetector(v1, 0)
  175.                                     end
  176.                                 end
  177.                             end
  178.                         end
  179.                     end
  180.                 end
  181.             end
  182.         end)
  183.     end)
  184.    
  185.     spawn(function()
  186.         pcall(function()
  187.             if CollectCoconut == true then
  188.                 for i,v in pairs(game:GetService("Workspace").CoconutEntities:GetDescendants()) do
  189.                     if v.ClassName == "TouchTransmitter" then
  190.                         string = game:GetService("Players").LocalPlayer.PlayerGui.MainUI.BasketCount.Text
  191.                         a,b = string:match("(.+)/(.+)")
  192.                         if a ~= b then
  193.                             firetouchinterest(game.Players.LocalPlayer.Character.HumanoidRootPart, v.Parent, 1)
  194.                             firetouchinterest(game.Players.LocalPlayer.Character.HumanoidRootPart, v.Parent, 0)
  195.                         end
  196.                     end
  197.                 end
  198.             end
  199.         end)
  200.     end)
  201.    
  202.     spawn(function()
  203.         pcall(function()
  204.             if CollectCheats == true then
  205.                 for i,v in pairs(game:GetService("Workspace"):GetDescendants()) do
  206.                     if v.ClassName == "TouchTransmitter" then
  207.                         if string.find(v.Parent.Name,"Chest") then
  208.                             firetouchinterest(game.Players.LocalPlayer.Character.HumanoidRootPart, v.Parent, 1)
  209.                             firetouchinterest(game.Players.LocalPlayer.Character.HumanoidRootPart, v.Parent, 0)
  210.                         end
  211.                     end
  212.                 end
  213.             end
  214.         end)
  215.     end)
  216.    
  217.     pcall(function()
  218.         if AutoSell == true then
  219.             game:GetService("Workspace").SellRing.Part.CanCollide = false
  220.             game:GetService("Workspace").SellRing.Part.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame + Vector3.new(0,0,100)
  221.             wait(.1)
  222.             game:GetService("Workspace").SellRing.Part.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame + Vector3.new(0,0,0)
  223.             wait(.1)
  224.         end
  225.     end)
  226.    
  227.     spawn(function()
  228.         if AntiAfk == true then
  229.             local bb=game:service'VirtualUser'
  230.             bb:CaptureController()
  231.             bb:ClickButton2(Vector2.new())
  232.         end
  233.     end)
  234. end