Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Max = 6
- local Laggy = true
- local SellFireflies = false
- local Dupes = 50
- local FireflyNum = 1313
- local Events = game.ReplicatedStorage.Events
- local Player = game.Players.LocalPlayer
- local Inventory = Player:WaitForChild('Inventory')
- local function goto(pos)
- local active = true
- if not game.Workspace.HOLE:FindFirstChild("HoleTPEntrance") then
- repeat
- local prevPos = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(1304, 96, -525)
- wait()
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = prevPos
- wait(1)
- until game.Workspace.HOLE:FindFirstChild("HoleTPEntrance")
- end
- if (game.Players.LocalPlayer.Character.HumanoidRootPart.Position - pos).magnitude < 200 then
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(pos)
- wait(0.3)
- active = false
- else
- local hole = game.Workspace.HOLE.HoleTPEntrance
- local oPos = hole.Position
- local oSize = hole.Size
- hole.Size = Vector3.new(1, 1, 1)
- hole.Transparency = 1
- hole.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- repeat
- hole.Position = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
- wait()
- until (hole.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude < 10
- hole.Position = oPos
- hole.Size = oSize
- repeat wait() until (game.Players.LocalPlayer.Character.HumanoidRootPart.Position - Vector3.new(430, 441, 102)).magnitude < 10
- for i = 1, 4 do
- game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = true
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(pos)
- wait(0.1)
- end
- wait(0.1)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = false
- active = false
- end
- end
- local function GetItems()
- local n = 0
- for _, x in ipairs(workspace:GetChildren()) do
- if x.Name == 'ItemDrop' then
- n = n + 1
- end
- end
- return n
- end
- local function GetQuantity()
- local Quantity = 0
- for _, x in ipairs(Inventory:GetChildren()) do
- if x.Value == FireflyNum then
- Quantity = x.Quantity.Value
- break
- end
- end
- return Quantity
- end
- local function ToSell()
- local t = {}
- for _, x in ipairs(Inventory:GetChildren()) do
- if x.Value ~= FireflyNum then
- t[x.Value] = x.Quantity.Value
- end
- end
- return t
- end
- local function PickupAll()
- for _, x in ipairs(workspace:GetChildren()) do
- if x.Name == 'ItemDrop' then
- Events.PickupItem:FireServer(x)
- end
- end
- end
- local function Dupe(x)
- local oldQ = GetQuantity()
- warn(('Started dupe!\nOld Fireflies: %s'):format(oldQ))
- for i = 1, x do
- local q = GetQuantity()
- local m = q < 100 and 100 or q * 1.2 + 1
- for i = 1, math.max(m, Max) do
- Events.DropItem:FireServer(FireflyNum, 3/2, Player.Character.PrimaryPart.Position + Vector3.new(100, 100, 100))
- if not Laggy then
- game:GetService('RunService').Stepped:Wait()
- end
- end
- local i
- repeat
- wait()
- i = GetItems()
- PickupAll()
- until i <= 0
- wait(1)
- print(('Dupe %s'):format(i + 1))
- end
- wait()
- local i, n
- repeat
- wait()
- i = GetItems()
- n = GetQuantity()
- PickupAll()
- until i <= 0 and n >= Max
- warn('Successfully duped!')
- wait(0.5)
- local newQ = GetQuantity()
- local diff = newQ - oldQ
- warn(('New Fireflies: %s\nDifference: %s'):format(GetQuantity(), diff))
- end
- local Stick = game:GetService("Workspace").PassiveNPCs.NPC_Stick
- local function Redeem()
- Stick.Dialog1.D.D1.D1.C2.D1.E.RE2:FireServer()
- end
- local function getSell()
- local Sellers = workspace.Shops.Sellers
- local Sellers2 = workspace.Shops.SellersTwo
- if #Sellers:GetChildren() >= 1 then
- return Sellers
- end
- if #Sellers2:GetChildren() >= 1 then
- return Sellers
- end
- end
- local function SellItems()
- local at = getSell()
- if not at then
- return
- end
- goto(at.SellBrick.Position)
- wait(0.1)
- local Sellable = ToSell()
- for i = 1, 3 do
- for id, n in pairs(Sellable) do
- Events.SellShop:FireServer(id, at, n)
- wait()
- end
- wait(1)
- end
- return warn('Sold items!')
- end
- local function SpendStuff()
- local q = GetQuantity()
- local t = math.floor(q / 200)
- if q - t * 200 >= 2 then
- if not Stick.PrimaryPart then
- return warn('Stick was not found!')
- end
- warn('Redeeming and selling items now...')
- delay(0.2, function()
- spawn(function()
- Player.Character.Humanoid:MoveTo(Vector3.new(100, 0, 100))
- for i = 1, 3 do
- Player.Character.Humanoid.Jump = true
- wait(0.5)
- end
- end)
- end)
- for i = 1, 3 do
- goto(Stick.PrimaryPart.Position)
- wait(1)
- end
- for i = 1, t do
- Redeem()
- wait()
- end
- wait(0.5)
- SellItems()
- return
- end
- return warn('Could not sell/redeem items...')
- end
- local function WaitForNoItems()
- local i
- repeat
- wait(1)
- i = GetItems()
- PickupAll()
- until i <= 0
- end
- -- Main Execution
- Dupe(Dupes)
- local sellLocation = getSell()
- if SellFireflies and GetQuantity() >= Max / 2 then
- SpendStuff()
- end
- WaitForNoItems()
Advertisement
Comments
-
- idk if its not working properly or if it got patched but when i do it, it just gets rid of all the fireflies in my inventory
-
- This script from 2020, it might have been fully patched. I havenโt updated the script during that time of post.
Add Comment
Please, Sign In to add comment
Advertisement