local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local RootPart = LocalPlayer.Character.HumanoidRootPart local Tycoons = workspace["Zednov's Tycoon Kit"].Tycoons:GetChildren() local OurTycoon = nil -- Find and Save our tycoon for later for i, Tycoon in pairs(Tycoons) do local Owner = Tycoon.Owner.Value if Owner == LocalPlayer then print("Found Our Tycoon") OurTycoon = Tycoon break end end local CashGiver = OurTycoon.Essentials.Giver local function GetCurrentCash() -- While a string replace commas with empty return tonumber(LocalPlayer.leaderstats.Cash.Value:gsub(',', '')) end local Buttons = OurTycoon.Buttons:GetChildren() local function QuickTouch(Part) firetouchinterest(RootPart, Part, 0) firetouchinterest(RootPart, Part, 1) end local function PressCheapestButton() --Sort Buttons by Cost and Label Active-ness. local EasyButtons = {} for i, Button in pairs(Buttons) do local Cost = Button.Price.Value local Part = Button.Head table.insert(EasyButtons, { ["Cost"] = Cost, ["Part"] = Part, ["Active"] = Part.Transparency == 0 }) end table.sort(EasyButtons, function(a, b) return a.Cost < b.Cost end) -- Attempt to press buttons in order of importance. for i, EasyButton in pairs(EasyButtons) do if EasyButton.Active == true and EasyButton.Cost ~= 1 then QuickTouch(EasyButton.Part) end end end local function CollectCash() QuickTouch(CashGiver) end while task.wait() do PressCheapestButton() CollectCash() end