Hi, i’m working on bee swarm simulator game, for experience, i’m really fascinated at Onet’s game, and i trying to do something like his pollen collecting system, i see it in two games, i’m make some simulations, and some summing, and finaly i do it! i think bee swarm fans can use it to make a fan game or something like this, i really thank Onet, for making bee swarm for few years, and here is a scripts. [I not included stats system, it cointains storage[Backpack], Capacity [Current backpack space], [Pollen is capacity , but for converting], and some flower values] here is a script:
Simulation
game.Players.PlayerAdded:Connect(function(player)
local Folder = player:WaitForChild("Stats"):WaitForChild("BasicStats")
local RP = Folder:WaitForChild("RedPollen")
local BP = Folder:WaitForChild("BluePollen")
local WP = Folder:WaitForChild("WhitePollen")
local Limit = Folder:WaitForChild("Storage")
local Capacity = Folder:WaitForChild("Capacity")
while wait(0.5) do
local sum = RP.Value + BP.Value + WP.Value
local random1 = RP.Value + math.random(1,3)
local random2 = BP.Value + math.random(1,3)
local random3 = WP.Value + math.random(1,3)
local sum2 = random1 + random2 + random3
if sum2 <= Limit.Value then
RP.Value = random1
BP.Value = random2
WP.Value = random3
elseif sum2 == Limit.Value then
print("Simulating Maxed")
else
WP.Value += Limit.Value - Capacity.Value
task.wait(0.1)
print("Maxed", Capacity.Value)
break
end
end
end)
Update Script
game.Players.PlayerAdded:Connect(function(player)
local Stats = player:WaitForChild("Stats")
if Stats then
local Folder = Stats:WaitForChild("BasicStats")
if Folder then
while wait(0.01) and script.Parent.Enabled.Value == true do
local RP = Folder:WaitForChild("RedPollen")
local BP = Folder:WaitForChild("BluePollen")
local WP = Folder:WaitForChild("WhitePollen")
local Pollen = Folder:WaitForChild("Pollen")
local Limit = Folder:WaitForChild("Storage")
local Capacity = Folder:WaitForChild("Capacity")
local sum = RP.Value + BP.Value + WP.Value
if sum <= Limit.Value then
Pollen.Value = sum
Capacity.Value = Pollen.Value
else
print("max")
end
end
end
end
end)
and enabled is value to disable script , if you wan’t, you can use this script, it updates values in statistics, if the limit is hitted, it stops