Advertisement
Sub-Urban

thingy e 91839128390829123

Aug 10th, 2022
1,274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.53 KB | None | 0 0
  1. --[[
  2.     FE infinite huge
  3.     How does it work?
  4.     It gets other player's backpacks when they respawn and uses their potions :P,
  5.     so the more people join, reset, rejoin, etc.
  6.     The more you grow!
  7. ]]
  8.  
  9.  
  10.  
  11. local players = game:GetService("Players") -- get players
  12.  
  13. local robBag = function(bag) -- function
  14.     for _, tool in next, bag:GetChildren() do -- get all tools in the players backpack. (I just like naming the backpack 'bag' for short. :P)
  15.        if tool:IsA("Tool") and tool:FindFirstChild("LocalScript") then -- simple way of knowing if its a potion
  16.            if tool.LocalScript:FindFirstChild("RemoteEvent") then
  17.                local remote = tool.LocalScript:FindFirstChild("RemoteEvent")
  18.                remote:FireServer("funni goofy ahh :P, this is useless text lol") -- we already know that the localscript exists, no need to re-findfirstchild, now to fire the remote event !
  19.            end
  20.        end
  21.     end
  22. end
  23.  
  24. for _, plr in next, players:GetPlayers() do -- look through all the players that are in the game
  25.     local bag = plr:WaitForChild("Backpack") -- waitforchild for their backpack
  26.     robBag(bag) -- fire the function with the following backpack
  27.  
  28.     plr.CharacterAdded:Connect(function() -- run it when they respawn, this is because they get new tools
  29.         local bag = plr:WaitForChild("Backpack")
  30.         robBag(bag)
  31.     end)
  32. end
  33.  
  34. players.PlayerAdded:Connect(function(plr) -- get all players that are joining and do the same thing
  35.     local bag = plr:WaitForChild("Backpack")
  36.     robBag(bag)
  37. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement