Advertisement
GETFREEROBUX

Toilet Tower Defence (THE HUNT)

Mar 18th, 2024
573
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.43 KB | None | 0 0
  1. function ManFace()
  2.     local message = "man face man"
  3.     local recipient = "All"
  4.     for i = 1, 3 do
  5.         game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(message, recipient)
  6.         wait(1)
  7.     end
  8. end
  9.  
  10. local worlds = game.Workspace.Worlds
  11.  
  12. local eggHuntLocation = worlds:FindFirstChild("Lobby") or worlds:FindFirstChild("TradingPlaza")
  13.  
  14. if not eggHuntLocation then
  15.     error("Neither Lobby nor TradingPlaza was found in Workspace > Worlds.")
  16. end
  17.  
  18. if eggHuntLocation.Name == "TradingPlaza" then
  19.     ManFace()
  20. end
  21.  
  22. local eggHuntEggs = eggHuntLocation.EggHuntEggs
  23.  
  24. local function fireClickDetectors(object)
  25.     for _, child in ipairs(object:GetChildren()) do
  26.         if child:IsA("ClickDetector") then
  27.             fireclickdetector(child)
  28.         end
  29.         fireClickDetectors(child)
  30.     end
  31. end
  32.  
  33. local function fireAllClickDetectors()
  34.     for _, item in ipairs(eggHuntEggs:GetChildren()) do
  35.         fireClickDetectors(item)
  36.         wait(1)
  37.     end
  38. end
  39.  
  40. fireAllClickDetectors()
  41.  
  42. if eggHuntLocation.Name == "TradingPlaza" then
  43.     game.StarterGui:SetCore("SendNotification", {
  44.         Title = "Egg Hunt";
  45.         Text = "Finished collecting all the eggs, now you only need to complete a trade to get the golden egg!";
  46.     })
  47. else
  48.     game.StarterGui:SetCore("SendNotification", {
  49.         Title = "Egg Hunt";
  50.         Text = "Finished grabbing all the eggs!";
  51.     })
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement