Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Disabled = false;
- local RestrictedId = {3369366264};
- repeat wait() until game:IsLoaded();
- wait(2);
- local Players = game:GetService('Players');
- local Player = Players.LocalPlayer;
- if (game.PlaceId == 8916037983) and (not Disabled) and (table.find(RestrictedId, Player.UserId)) then
- local MinimumBuyers = 4; -- How Many Buyers there Must Be
- local MinimumPlayers = 10; -- How Many Players there Must Be
- local ServerHopAfterMinutes = 1.5; -- How Many Minutes you Want To Wait Before Hopping
- local JoinMessageBool = true; -- Announce Your Art Price Range
- local AutoClaimBooth = true; -- Automatically Find/Claim A Booth
- local RichHunt = true; -- Hunt for Rich Players
- local RichMinimum = 175; -- How Rich the Players Have To Be
- local RichTime = 10; -- How Many Seconds each Rich Player Adds to The Hop Timer
- local RobuxTime = 30/1000; -- How Much Time each Robux Spent by Rich People Adds in Seconds
- -- Tip: Use Values like '30/1000' to Signify that You Want to Add 30 Seconds for Every 1000 Robux
- local ArtAddsTime = true; -- If Selling Art Adds Time To Stay In Server
- local ArtTimeAddition = 20; -- How Much Time to Add If Art Is Selling
- local ArtWorkThreshold = 20; -- How Much Art has To Sell For To Add Time even If It Wasn't Yours
- -- Ignore --
- local Buyers = 0;
- local RichCount = 0;
- local RichSpent = 0;
- -- Ignore --
- rconsoleclear();
- rconsolename('Starving Artists Server Finder | v.0.5.6 | Fungbert');
- -- Ignore --
- local ServerLoadedTime = tick();
- local RecentlySoldArt = 0;
- -- Ignore --
- local StringBuilder = {};
- local Ansi_ESC_Colours = {
- raw = 0,
- black = 30,
- red = 31,
- green = 32,
- yellow = 33,
- blue = 34,
- purple = 35,
- cyan = 36,
- white = 37
- };
- StringBuilder.new = function(ss)
- local Output = ss or '';
- local InheritLibrary = {};
- table.foreach(Ansi_ESC_Colours, function(c, v)
- InheritLibrary[c] = function(s)
- Output = Output .. string.format('[%dm', v) .. s .. '[0m';
- return InheritLibrary;
- end;
- end);
- setmetatable(InheritLibrary, {
- __call = function()
- return Output;
- end;
- __tostring = function()
- return Output;
- end;
- });
- return InheritLibrary;
- end;
- local PlayerCount = #Players:GetChildren();
- local function Comma(Num)
- return tostring(Num):reverse():gsub('%d%d%d', '%1,'):gsub(',$', ''):reverse();
- end;
- spawn(function()
- local Network = require(game:GetService('ReplicatedStorage').Modules.Network);
- Network:OnClientEvent('Notify', function(Target, Event)
- if (Target == 'System') then
- local Buyer, Recipient, Amount = string.match(Event, '([%w_]+) bought ([%w_]+)\'s art for ([%d]+) robux!');
- if (Recipient == Player.Name) then
- RecentlySoldArt += 1;
- rconsoleprint(StringBuilder.new().raw('Sold for [').green('R$').green(tostring(Amount)).raw('];\n')());
- appendfile('StarvingLogs.txt', string.format('[@%s (%s)]: R$%s;\n', Buyer, Players:FindFirstChild(Buyer).Name, Comma(Amount)));
- return;
- end;
- if (tonumber(Amount) >= ArtWorkThreshold) then
- RecentlySoldArt += 1;
- return;
- end;
- end;
- end);
- end);
- local Plots = game:GetService('Workspace'):WaitForChild('Plots');
- local function GetServerList(Limit)
- local Cursor, Servers = nil, {};
- repeat
- local Response = game:GetService('HttpService'):JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. game.PlaceId .. '/servers/Public?sortOrder=Asc&limit=100' .. (Cursor and ('&cursor=' .. Cursor) or '')));
- for _, Server in pairs(Response.data) do
- table.insert(Servers, Server);
- end;
- Cursor = Response.nextPageCursor;
- until (not Cursor) or (#Servers >= Limit);
- return Servers;
- end;
- local function Hop()
- local IgnoreIds = {};
- local Success, Servers = pcall(GetServerList, 1024);
- if (Success) then
- rconsoleprint(StringBuilder.new().raw('Hopping Servers [').cyan(tostring(#Servers)).raw('];\n')());
- while true do
- for _, ServerInfo in pairs(Servers) do
- if (not table.find(IgnoreIds, ServerInfo.id)) and (ServerInfo.playing < ServerInfo.maxPlayers) then
- game:GetService('TeleportService'):TeleportToPlaceInstance(game.PlaceId, ServerInfo.id, Players.LocalPlayer);
- table.insert(IgnoreIds, ServerInfo.id);
- wait();
- end;
- end;
- end;
- else
- rconsoleprint(StringBuilder.new().raw('Failed to Get Servers [').red('Retrying in 5 Seconds').raw('];\n')());
- rconsoleprint(StringBuilder.new('Error Message: [').red(tostring(Servers)).raw('];\n')());
- wait(5);
- return spawn(Hop);
- end;
- end;
- local SayMessageRequest = game:GetService('ReplicatedStorage').DefaultChatSystemChatEvents.SayMessageRequest;
- local function Message(m)
- SayMessageRequest:FireServer(m, 'All');
- end;
- local function GetArtPrice()
- local LowestPriceArt, HighestPriceArt = (function()
- local LowestPrice, HighestPrice;
- for _, Easel in ipairs(Plots:FindFirstChild(Player.Name).Easels:GetChildren()) do
- if (Easel.Canvas.SurfaceGui:FindFirstChild('Grid')) then
- local Price = tonumber(string.match(Easel.ArtInfo.Frame.Info.Price.Text, '%d+'));
- if (not LowestPrice) or (Price <= LowestPrice) then
- LowestPrice = Price;
- end;
- if (not HighestPrice) or (Price >= HighestPrice) then
- HighestPrice = Price;
- end;
- end;
- end;
- return LowestPrice or 0, HighestPrice or 0;
- end)();
- return LowestPriceArt, HighestPriceArt;
- end;
- local function GetBuyers()
- local Buyers, RichCount, RichSpent = 0, 0, 0;
- for _, Player in ipairs(Players:GetChildren()) do
- if (Player ~= Players.LocalPlayer) then
- if (Player:WaitForChild('leaderstats')) then
- local Bought = Player.leaderstats.Bought.Value;
- if (Bought > 0) then
- Buyers = Buyers + 1;
- if (RichHunt) and (Bought >= RichMinimum) then
- RichCount = RichCount + 1;
- RichSpent += Bought;
- end;
- end;
- end;
- end;
- end;
- return Buyers, RichCount, RichSpent;
- end;
- local function SetupStay(StayTime)
- local StartTime = tick();
- local Buyers, RichCount, RichSpent = GetBuyers();
- local HopTimer = ((ServerHopAfterMinutes * 60) * math.clamp(RichCount, 0, 1) + (RichCount * RichTime) + math.ceil(RichSpent * RobuxTime));
- HopTimer += (ArtAddsTime) and (ArtTimeAddition * RecentlySoldArt) or 0;
- rconsoleprint(StringBuilder.new().raw('Staying for [').cyan(tostring(HopTimer)).raw('] seconds;\n')());
- repeat
- local Unclaimed = Plots:FindFirstChild('Unclaimed');
- if (Unclaimed) then
- (Player.Character or Player.CharacterAdded:Wait()):WaitForChild('HumanoidRootPart').CFrame = Unclaimed.Table.Username.CFrame * CFrame.new(0, 3, 0);
- local ClaimAttach = Unclaimed.Circle:FindFirstChild('ClaimAttach') or Unclaimed.Table.Username:FindFirstChild('ClaimAttach');
- fireproximityprompt(ClaimAttach.BoothClaimPrompt);
- end;
- wait(1);
- until Plots:FindFirstChild(Player.Name);
- wait(5);
- if (JoinMessageBool) then
- local function SendJoinMessage()
- local Lowest, Highest = GetArtPrice();
- if (Lowest == 0) and (Highest == 0) then
- wait(30);
- return spawn(Hop);
- end;
- local JoinMessage;
- if (Lowest == Highest) then
- JoinMessage = string.format('I sell quality art for %d robux only :)', Lowest);
- else
- JoinMessage = string.format('I sell quality art for %d - %d robux only :)', Lowest, Highest);
- end;
- Message(JoinMessage);
- end;
- SendJoinMessage();
- spawn(function()
- while wait(60) do
- SendJoinMessage();
- end;
- end);
- end;
- spawn(function()
- while true do
- local ElapsedTime = (tick() - ServerLoadedTime);
- local Buyers, RichCount, RichSpent = GetBuyers();
- local NewHopTimer = (StayTime >= ArtTimeAddition) and StayTime or ((ServerHopAfterMinutes * 60) * math.clamp(RichCount, 0, 1) + (RichCount * RichTime) + math.ceil(RichSpent * RobuxTime));
- NewHopTimer += (ArtAddsTime) and (ArtTimeAddition * RecentlySoldArt) or 0;
- if (NewHopTimer ~= HopTimer) then
- local Difference = (NewHopTimer - HopTimer);
- local MoreTime = (Difference > 0);
- HopTimer = NewHopTimer;
- rconsoleprint(StringBuilder.new().raw('Staying for [').cyan(tostring(math.abs(Difference))).raw('] ')[MoreTime and 'green' or 'red'](MoreTime and 'more' or 'less').raw(' seconds = ').yellow(tostring(NewHopTimer)).raw(';\n')());
- end;
- if (ElapsedTime >= NewHopTimer) then
- return Hop();
- end;
- wait(1);
- end;
- end);
- end;
- local function TryStay()
- if (PlayerCount >= MinimumPlayers) then
- for _, Player in ipairs(Players:GetChildren()) do
- if (Player:WaitForChild('leaderstats', 5)) then
- local Bought = Player.leaderstats.Bought.Value;
- if (Bought > 0) then
- Buyers = Buyers + 1;
- if (RichHunt) and (Bought >= RichMinimum) then
- RichCount = RichCount + 1;
- RichSpent += Bought;
- end;
- end;
- end;
- end;
- local BuyerRequirementMet = (Buyers >= MinimumBuyers);
- rconsoleprint(string.rep('-', string.len(string.format('Buyers: [%d];', Buyers))) .. '\n');
- rconsoleprint(StringBuilder.new().raw('Buyers: [')[(BuyerRequirementMet and (not RichHunt)) and 'green' or (RichHunt and 'yellow' or 'red')](tostring(Buyers)).raw('];\n')());
- if (BuyerRequirementMet) or (RichHunt) then
- if (RichHunt) then
- local RichRequirementMet = (RichCount >= 1);
- rconsoleprint(StringBuilder.new().raw('RichHunt: [')[RichRequirementMet and 'green' or 'red'](tostring(RichCount)).raw('];\n')());
- if (RichRequirementMet) then
- rconsoleprint(StringBuilder.new().raw('RichSpent: [').green(tostring(RichSpent)).raw(']; (Adds [').cyan(math.ceil(RichSpent * RobuxTime)).raw(']) seconds;\n')());
- return spawn(SetupStay);
- else
- return spawn(Hop);
- end;
- end;
- return spawn(SetupStay);
- else
- return spawn(Hop);
- end;
- else
- return spawn(Hop);
- end;
- end;
- spawn(TryStay);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement