Advertisement
SUUKIDIS_69

Royal High Easter Event Script

Apr 1st, 2022
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. local eggs = game:GetService("Workspace").EggHuntMinigame.Eggs
  2. local plr = game.Players.LocalPlayer
  3. local char = plr.Character
  4. local hum = char.HumanoidRootPart
  5. local timer = plr.PlayerGui.EasterEventOriginal.InGameOverhead.Timer
  6. local Counter = plr.PlayerGui.EasterEventOriginal.InGameOverhead.Counter
  7. local nest = game:GetService("Workspace").EggHuntMinigame:WaitForChild("NestClickbox")
  8. local button = plr.PlayerGui.ProximityPrompts
  9.  
  10. getgenv().eggFarm = true --true/on false/off
  11.  
  12. local function getCounter()
  13. for i,v in pairs(string.split(Counter.Text,"/5","")) do
  14. if tonumber(v) then
  15. return tonumber(v)
  16. end
  17. end
  18. end
  19.  
  20. local function folderCount(folder)
  21. local children = folder:GetChildren()
  22. local count = #children
  23.  
  24. return count
  25. end
  26. local function press(path)
  27. for i,v in pairs(path:GetDescendants()) do
  28. if v:IsA("TextButton") then
  29. for k,w in next,getconnections(v.MouseButton1Click) do
  30. wait()
  31. w.Function()
  32. end
  33. end
  34. end
  35. end
  36.  
  37. --Egg Farm
  38. local function eggFarm()
  39. if getCounter() < 5 and folderCount(eggs) ~= 0 then
  40. for i,egg in pairs(eggs:GetChildren()) do
  41. hum.CFrame = egg.CFrame
  42. fireclickdetector(egg:WaitForChild("ClickDetector"))
  43. end
  44. else
  45. hum.CFrame = nest.CFrame
  46. fireproximityprompt(nest.ProximityPrompt)
  47. end
  48. if folderCount(eggs) == 0 then
  49. local spawn = game:GetService("Workspace").EggHuntMinigame.SpawnPositions
  50. for i,v in pairs(spawn:GetChildren()) do
  51. hum.CFrame = v.CFrame
  52.  
  53. wait(1)
  54. if folderCount(eggs) > 0 or timer.Time.Text == "GAME OVER" then
  55. break
  56. end
  57. end
  58. end
  59. end
  60.  
  61.  
  62. --Intro skip
  63. local Event = plr.PlayerGui.EasterEventOriginal
  64. local eButton =Event.IntroText
  65.  
  66. local function skipIntro()
  67. if eButton.Visible == true then
  68. for i=1,5 do
  69. press(eButton)
  70. wait(0.1)
  71. end
  72. end
  73. end
  74.  
  75.  
  76.  
  77. while getgenv().eggFarm do
  78. wait()
  79. if timer.Time.Text == "GAME OVER" then
  80. skipIntro()
  81. else
  82. eggFarm()
  83. end
  84. end
  85.  
  86.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement