Advertisement
CaramelDogey

cool egg game!

Apr 13th, 2024 (edited)
730
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.88 KB | None | 0 0
  1. -- is this what you wanted?????
  2. local TweenService = game:GetService("TweenService")
  3. local SoundService = game:GetService("SoundService")
  4. local RunService = game:GetService("RunService")
  5. local Debris = game:GetService("Debris")
  6. local StarterGui = game:GetService("StarterGui")
  7. local Lighting = game:GetService("Lighting")
  8.  
  9. -- Disable core GUI elements
  10. StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
  11.  
  12. local player = game.Players.LocalPlayer
  13. local character = player.Character or player.CharacterAdded:Wait()
  14. local humanoid = character:WaitForChild("Humanoid")
  15. local camera = game.Workspace.CurrentCamera
  16.  
  17. local props = script:GetChildren()
  18. local gerclone = script["small ger"]:Clone()
  19. local eggs = game.ReplicatedStorage.Eggs:GetChildren()
  20.  
  21. for _, prop in pairs(props) do
  22.     prop.Parent = game.ReplicatedStorage
  23. end
  24.  
  25. local shaking = false
  26. local explode = false
  27.  
  28. -- Function to spawn mini character
  29. local function spawnGer()
  30.     task.spawn(function()
  31.         local smallGer = gerclone:Clone()
  32.         smallGer.PrimaryPart.Anchored = true
  33.         smallGer.Parent = game.Workspace
  34.  
  35.         while true do
  36.             local quantity = 8
  37.             local radius = 4
  38.             for i = 1, quantity do
  39.                 local midpoint = character.PrimaryPart.Position
  40.                 local angle = i * ((math.pi * 2) / quantity)
  41.                 local position = midpoint + Vector3.new(math.cos(angle) * radius, 0, math.sin(angle) * radius)
  42.                 smallGer.PrimaryPart.CFrame = CFrame.new(position, midpoint)
  43.                 task.wait()
  44.             end
  45.         end
  46.     end)
  47. end
  48.  
  49. -- Function to create repeating sound
  50. local function playSound(sound, speed)
  51.     local newSound = sound:Clone()
  52.     newSound.Parent = SoundService
  53.     if speed then
  54.         newSound.PlaybackSpeed = speed
  55.         newSound.Looped = true
  56.     end
  57.     newSound:Play()
  58. end
  59.  
  60. -- Function to choose random element from a list
  61. local function getRandomElement(list)
  62.     return list[math.random(#list)]
  63. end
  64.  
  65. -- Function to display random pop-up text
  66. local function showPopup(text)
  67.     local label = Instance.new("TextLabel")
  68.     label.Size = UDim2.new(Random.new():NextNumber(0, 0.5), 0, Random.new():NextNumber(0, 0.2), 0)
  69.     label.Position = UDim2.new(Random.new():NextNumber(0, 0.5), 0, Random.new():NextNumber(0, 0.8), 0)
  70.     label.Rotation = math.random(-50, 50)
  71.     label.Text = text
  72.     label.ZIndex = #script.Parent:GetChildren()
  73.  
  74.     if math.random(1, 3) == 1 then
  75.         label.TextScaled = true
  76.     end
  77.  
  78.     label.TextColor3 = Color3.fromRGB(math.random(0, 255), math.random(0, 255), math.random(0, 255))
  79.     label.Transparency = Random.new():NextNumber()
  80.  
  81.     if math.random(1, 8) == 1 then
  82.         label.TextStrokeTransparency = 0
  83.         label.TextStrokeColor3 = Color3.fromRGB(math.random(0, 255), math.random(0, 255), math.random(0, 255))
  84.     else
  85.         label.TextStrokeTransparency = 1
  86.     end
  87.  
  88.     label.Font = getRandomElement({Enum.Font.SciFi, Enum.Font.Gotham, Enum.Font.Fantasy, Enum.Font.Creepster, Enum.Font.FredokaOne, Enum.Font.Arial, Enum.Font.Cartoon})
  89.     label.BackgroundTransparency = 1
  90.  
  91.     label.Parent = script.Parent
  92.     Debris:AddItem(label, 2)
  93. end
  94.  
  95. -- Display countdown hint for egg spawning
  96. local hint = Instance.new("Hint", game.Workspace)
  97. for seconds = 10, 1, -1 do
  98.     hint.Text = string.format("Eggs will spawn in %01d:%02d", math.floor(seconds / 60), seconds % 60)
  99.     task.wait(1)
  100. end
  101. hint.Text = "Spawning eggs..."
  102.  
  103. -- Spawn eggs periodically
  104. task.spawn(function()
  105.     while true do
  106.         local primary = player.Character.PrimaryPart
  107.         local egg = getRandomElement(eggs)
  108.         egg.CanCollide = true
  109.         egg.Anchored = false
  110.         egg.Shape = Enum.PartType.Ball
  111.         egg.Position = Vector3.new(math.random(primary.Position.X - 30, primary.Position.X + 30), 90, math.random(primary.Position.Z - 30, primary.Position.Z + 30))
  112.         egg.Orientation = Vector3.new(math.random(-360, 360), math.random(-360, 360), math.random(-360, 360))
  113.         egg.Parent = game.Workspace
  114.  
  115.         task.spawn(function()
  116.             repeat task.wait() until explode == true
  117.             task.wait(Random.new():NextNumber(0, 4) * 2)
  118.             local boom = script.Parent.Boom:Clone()
  119.             boom.Parent = egg
  120.             local explosion = Instance.new("Explosion", egg)
  121.             explosion.Position = egg.Position
  122.             explosion.DestroyJointRadiusPercent = 0
  123.             boom:Play()
  124.         end)
  125.  
  126.         task.wait(0.1)
  127.     end
  128. end)
  129.  
  130. task.wait(3)
  131. hint.Text = "GET GER'ED!"
  132. for _, prop in ipairs(props) do
  133.     prop.Parent = game.Workspace
  134. end
  135. playSound(script.Parent.ger)
  136.  
  137. task.wait(17)
  138. TweenService:Create(camera, TweenInfo.new(3, Enum.EasingStyle.Linear), {FieldOfView = 50})
  139.  
  140. local info = TweenInfo.new(20, Enum.EasingStyle.Linear)
  141.  
  142. shaking = true
  143.  
  144. task.spawn(function()
  145.     for i = 1, 4 do
  146.         playSound(script.Parent.whyyoucallmeger, 2 + (1 / time()))
  147.         task.wait(2)
  148.     end
  149. end)
  150.  
  151. task.spawn(function()
  152.     while true do
  153.         local words = {"FIND", "GET", "REGISTER", "SEARCH", "ADD", "GIVE"}
  154.         local chars = {
  155.             ["A"] = {"A", "ᴀ", "ᗩ", "Α", "a", "A̴̛͎̳͌", "Ⱥ", "₳", "∆", "Ä"},
  156.             ["B"] = {"B", "ʙ", "ʙ", "ᗷ", "Β", "b", "𝐵", "𝕭", "ß", "฿"},
  157.             ["C"] = {"C", "ᑕ", "Ⅽ", "Ϲ", "c", "₵", "©", "↻", "☾", "☪"},
  158.             ["D"] = {"D", "ᗪ", "Ⅾ", "ⅾ", "ⅾ", "D", "d", "Ð", "Ð"},
  159.             ["E"] = {"E", "ᴇ", "ᴇ", "ᗴ", "E", "e", "Ǝ", "ɘ", "∑", "€"},
  160.             ["F"] = {"F", "ғ", "ғ", "Ϝ", "F", "f", "℉", "₣", "Ⅎ", "Ŧ"},
  161.             ["G"] = {"G", "ɢ", "ɢ", "ɢ", "ɢ", "ɢ", "Ꮆ", "Ꮐ", "G", "g"},
  162.             ["H"] = {"H", "ʜ", "ʜ", "ᕼ", "H", "h", "♄", "ℍ", "Ħ"},
  163.             ["I"] = {"I", "ɪ", "ɪ", "ᴉ", "ᴉ", "Ι", "I", "i", "Ɨ", "¡"},
  164.             ["J"] = {"J", "ᒍ", "J", "j", "♁", "Ј"},
  165.             ["K"] = {"K", "ᴋ", "ᴋ", "Ꮶ", "Κ", "K", "k", "₭", "K", "𝐾"},
  166.             ["L"] = {"L", "ʟ", "ʟ", "ʟ", "ᒪ", "Ⅼ", "L", "l", "£", "Ł"},
  167.             ["M"] = {"M", "ᴍ", "ᴍ", "ᗰ", "Ⅿ", "M", "m", "♍", "₥", "ℳ"},
  168.             ["N"] = {"N", "ɴ", "ɴ", "ɴ", "ɴ", "ᑎ", "N", "n", "♫", "ℕ"},
  169.             ["O"] = {"O", "ᴏ", "ᴏ", "ᴏ", "ᴏ", "0", "𝐎", "O", "o", "Φ"},
  170.             ["P"] = {"P", "ᴘ", "ᴘ", "ᑭ", "𝐏", "P", "p", "ℙ", "₱", "℘"},
  171.             ["Q"] = {"Q", "ϙ", "𝐐", "Q", "q", "🅀", "Ǫ", "q", "Ҩ", "ℚ"},
  172.             ["R"] = {"R", "ʀ", "ʀ", "ᖇ", "ℝ", "R", "r", "®", "℞", "ℛ"},
  173.             ["S"] = {"S", "s", "ꜱ", "ꜱ", "Ꮪ", "S", "s", "§", "℣"},
  174.             ["T"] = {"T", "ᴛ", "ᴛ", "Ꭲ", "T", "t", "†", "⊤", "✞", "Ŧ"},
  175.             ["U"] = {"U", "ᴜ", "ᴜ", "ᑌ", "U", "u", "ʉ", "Ü", "∪", "Ц"},
  176.             ["V"] = {"V", "ᴠ", "ᴠ", "Ⅴ", "ᐯ", "V", "v", "Ѵ", "⋁"},
  177.             ["W"] = {"W", "ᴡ", "ᴡ", "ᗯ", "W", "w", "Ш", "₩", "ω"},
  178.             ["X"] = {"X", "x", "х", "Ⅹ", "ⅹ", "X", "x", "×", "✗", "⨯"},
  179.             ["Y"] = {"Y", "ʏ", "ʏ", "ʏ", "Υ", "Y", "y", "¥", "ψ", "ү"},
  180.             ["Z"] = {"Z", "ᴢ", "ᴢ", "ᘔ", "Z", "z", "Z̵̫͉͙̖̥̗̭̘͙̆̈̄̀̑͠", "Ƶ", "ℤ", "Ȥ"}
  181.         }
  182.        
  183.         -- More code for random text transformation
  184.        
  185.         hint.Text = text
  186.     end
  187. end)
  188.  
  189. -- Add effects
  190. TweenService:Create(Lighting.ColorCorrection, info, {Saturation = 10}):Play()
  191. TweenService:Create(Lighting.Atmosphere, info, {Density = 1, Offset = 1, Glare = 5, Haze = 5}):Play()
  192. task.wait(1)
  193. TweenService:Create(Lighting.SunRays, info, {Intensity = 1, Spread = 1}):Play()
  194. task.wait(1)
  195. TweenService:Create(Lighting.Blur, info, {Size = 10}):Play()
  196. task.wait(3)
  197.  
  198. -- Modify parts in the workspace
  199. task.spawn(function()
  200.     for _, part in ipairs(game.Workspace:GetDescendants()) do
  201.         if part:IsA("BasePart") then
  202.             pcall(function()
  203.                 local lol = part:Clone()
  204.                 lol.Parent = part
  205.                 lol.Material = getRandomElement({Enum.Material.Wood, Enum.Material.WoodPlanks, Enum.Material.Cobblestone, Enum.Material.Neon, Enum.Material.Foil})
  206.                 lol.BrickColor = BrickColor.random()
  207.                 task.wait()
  208.             end)
  209.         end
  210.     end
  211. end)
  212.  
  213. task.wait(4)
  214.  
  215. -- Show popups periodically
  216. task.delay(2, function()
  217.     while true do
  218.         if math.random(1, 2) == 1 then
  219.             showPopup(hint.Text)
  220.         else
  221.             showPopup("GER")
  222.         end
  223.     end
  224. end)
  225.  
  226. print("Exploding :3")
  227. explode = true
  228.  
  229. task.wait(3)
  230.  
  231. -- Spawn mini characters
  232. for i = 1, 10 do
  233.     spawnGer()
  234.     task.wait(2)
  235. end
  236.  
  237. task.wait(6)
  238.  
  239. -- Fill parts with water
  240. for _, part in ipairs(game.Workspace:GetDescendants()) do
  241.     if part:IsA("BasePart") then
  242.         pcall(function()
  243.             local terrain = game.Workspace.Terrain
  244.             terrain:FillBlock(part.CFrame, part.Size * 1.2, Enum.Material.Water)
  245.             task.wait()
  246.         end)
  247.     end
  248. end
  249.  
  250. -- is this what you wanted?????
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement