BobloScript.com

Sell Lemons script: Auto Tycoon, Auto Upgrade, Auto Pick up fruits

Published by bebraPublished May 30
Open in Roblox
74Views
48Copies
NeverUpdated

Description

This script helps you to build your lemon empire in this place. Automatically collects lemons, automatically buys new items of your tycoon.

Functions

  • This script helps you to build your lemon empire in this place. Automatically collects lemons, automatically buys new items of your tycoon.

Script Code

Raw Code

This script loads code from an external source. Review the URL and understand what it does before running it in Roblox.

https://sirius.menu/rayfield

--// Rayfieldlocal Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()local Window = Rayfield:CreateWindow({	Name = "Lemon Sells",	LoadingTitle = "Lemon Sell Auto",	LoadingSubtitle = "By ChatGPT & Gouang",	ConfigurationSaving = {		Enabled = false,	},	KeySystem = false,})local MainTab = Window:CreateTab("Main", 4483362458)--// Serviceslocal Players = game:GetService("Players")local LocalPlayer = Players.LocalPlayer--// Find Tycoonlocal userTycoon = (function()	for _, v in pairs(workspace:GetChildren()) do		if v:IsA("Folder") and v.Name:match("Tycoon%d") then			if v:FindFirstChild("Owner") and v.Owner.Value == LocalPlayer then				return v			end		end	endend)()if not userTycoon then	Rayfield:Notify({		Title = "Error",		Content = "Tycoon not found!",		Duration = 5,	})	returnend--// Variableslocal AutoBuy = falselocal AutoUpgrade = falselocal AutoFruit = falselocal Buying = falselocal function getButtons()	local Buttons = {}	for _, obj in ipairs(userTycoon.Purchases:GetDescendants()) do		if obj:IsA("Model") then			local shown = obj:GetAttribute("Shown")			local purchased = obj:GetAttribute("Purchased")			if shown == true and purchased ~= true then				local buttonPart = obj:FindFirstChild("Button")				if buttonPart and buttonPart:IsA("BasePart") then					table.insert(Buttons, {						Name = obj.Name,						Button = buttonPart,					})				end			end		end	end	return Buttonsendlocal function buyButton(buttonData)	if Buying then		return	end	Buying = true	local character = LocalPlayer.Character	if not character then		Buying = false		return	end	local hrp = character:FindFirstChild("HumanoidRootPart")	if not hrp then		Buying = false		return	end	local buttonPart = buttonData.Button	pcall(function()		firetouchinterest(hrp, buttonPart, 0)		firetouchinterest(hrp, buttonPart, 1)	end)	Buying = falseendtask.spawn(function()	while true do		task.wait(0.0000001)		if AutoBuy then			local Buttons = getButtons()			for _, button in ipairs(Buttons) do				pcall(function()					buyButton(button)				end)			end		end	endend)local function upgradeMachines()	for _, obj in ipairs(userTycoon.Purchases:GetDescendants()) do		if obj:IsA("RemoteFunction") and obj.Name == "Upgrade" then			pcall(function()				for level = 1, 100 do					obj:InvokeServer(level)				end			end)		end	endendtask.spawn(function()	while true do		task.wait(0.00001)		if AutoUpgrade then			pcall(function()				upgradeMachines()			end)		end	endend)local Trees = {}local function addTree(obj)	if obj:IsA("Model") and obj.Name == "LemonTree" then		if not table.find(Trees, obj) then			table.insert(Trees, obj)		end	endendlocal function removeTree(obj)	local index = table.find(Trees, obj)	if index then		table.remove(Trees, index)	endend-- initial scanfor _, v in ipairs(workspace:GetDescendants()) do	addTree(v)end-- realtime updateworkspace.DescendantAdded:Connect(addTree)workspace.DescendantRemoving:Connect(removeTree)local function noCollisionTree(tree)	for _, obj in ipairs(tree:GetDescendants()) do		if obj:IsA("BasePart") then			obj.CanCollide = false		end	endendlocal function teleportToTree(tree)	local character = LocalPlayer.Character	if not character then		return false	end	local hrp = character:FindFirstChild("HumanoidRootPart")	if not hrp then		return false	end	local cf = tree:GetPivot()	hrp.CFrame = cf + Vector3.new(0, 5, 0)	return trueendlocal function collectFruit(tree)	noCollisionTree(tree)	local success = teleportToTree(tree)	if not success then		return	end	for _, obj in ipairs(tree:GetDescendants()) do		if obj:IsA("BasePart") and obj.Name == "Fruit" then			obj.CanCollide = false			local clickPart = obj:FindFirstChild("ClickPart")			if clickPart then				local detector = clickPart:FindFirstChildOfClass("ClickDetector")				if detector then					task.wait(0.45)					pcall(function()						fireclickdetector(detector)					end)				end			end		end	endendtask.spawn(function()	while true do		task.wait(0.1)		if AutoFruit then			for _, tree in ipairs(Trees) do				if not AutoFruit then					break				end				if tree and tree.Parent then					pcall(function()						collectFruit(tree)					end)				end			end		end	endend)MainTab:CreateToggle({	Name = "Auto Buy",	CurrentValue = false,	Flag = "AutoBuy",	Callback = function(Value)		AutoBuy = Value		Rayfield:Notify({			Title = "Auto Buy",			Content = Value and "Enabled" or "Disabled",			Duration = 3,		})	end,})MainTab:CreateToggle({	Name = "Auto Upgrade",	CurrentValue = false,	Flag = "AutoUpgrade",	Callback = function(Value)		AutoUpgrade = Value		Rayfield:Notify({			Title = "Auto Upgrade",			Content = Value and "Enabled" or "Disabled",			Duration = 3,		})	end,})MainTab:CreateToggle({	Name = "Auto Fruit",	CurrentValue = false,	Flag = "AutoFruit",	Callback = function(Value)		AutoFruit = Value		Rayfield:Notify({			Title = "Auto Fruit",			Content = Value and "Enabled" or "Disabled",			Duration = 3,		})	end,})MainTab:CreateButton({	Name = "Destroy GUI",	Callback = function()		Rayfield:Destroy()	end,})Rayfield:Notify({	Title = "Loaded",	Content = "Tycoon Autofarm Loaded Successfully",	Duration = 5,})

Comments

Loading comments…