Advertisement
Aquarius_Raverus

Finally

Sep 5th, 2020
1,294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.08 KB | None | 0 0
  1. -- Spawning Script
  2.  
  3. local ServerStorage = game:GetService("ServerStorage")
  4. local RS = game:GetService("RunService")
  5.  
  6. local WSP = game:GetService("Workspace")
  7. local Live = WSP:WaitForChild("Live")
  8. local TweenService = game:GetService("TweenService")
  9.  
  10. function sub(...)
  11.     coroutine.wrap(...)()
  12. end
  13.  
  14. local RandomizedColor = {
  15.     "Alder",
  16.     "Black"
  17. }
  18.  
  19. while wait(math.random(10, 20)) do
  20.     local HollowSpawns = math.random(1,39)
  21.     if not workspace.Live:FindFirstChild("Hollow"..HollowSpawns) then
  22.    
  23.         local tppart = workspace.World.HollowSpawns["Part"..HollowSpawns]
  24.                
  25.         local Garganta = game.ServerStorage.Assets.Garganta:Clone()
  26.         Garganta.Parent = workspace.FX
  27.         Garganta.CFrame = tppart.CFrame * CFrame.new(0,100,0)
  28.         local GoalSize = Garganta.Size
  29.         local GoalCFrame = Garganta.CFrame
  30.         Garganta.Size = Vector3.new(24, 0, 0.05)
  31.         game.Debris:AddItem(Garganta,5)
  32.        
  33.         local Sound = script.GargantaSound:Clone()
  34.         Sound.Parent = Garganta
  35.         Sound.Pitch = 1.15 * math.random(.9, 1.11)
  36.         Sound:Play()
  37.         game.Debris:AddItem(Sound, Sound.TimeLength)
  38.        
  39.         delay(.1,function()
  40.             Garganta.Transparency = 0
  41.             TweenService:Create(Garganta, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {
  42.                 Size = Vector3.new(23.3, 12.471, 0.05),
  43.                 CFrame = GoalCFrame --* CFrame.new(0,1.5,0)
  44.             }):Play()
  45.             wait(1)
  46.             local hollow = game.ServerStorage.HollowMobs["Hollow"..math.random(1,3)]:Clone()
  47.             hollow.Name = "Hollow"..HollowSpawns
  48.             hollow.Parent = workspace.Live
  49.             hollow:SetPrimaryPartCFrame(tppart.CFrame*CFrame.new(0,100,0))
  50.             local PickedColor = BrickColor.new(RandomizedColor[math.random(1, #RandomizedColor)])
  51.             sub(function()
  52.                 for i,v in pairs(hollow:GetChildren()) do
  53.                     if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then
  54.                         v.BrickColor = PickedColor
  55.                     end
  56.                 end
  57.             end)
  58.         end)
  59.        
  60.         delay(3,function()
  61.             TweenService:Create(Garganta, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {
  62.                 Size = Vector3.new(23.3, .05, 0.05),
  63.                 CFrame = GoalCFrame --* CFrame.new(0,1.5,0)
  64.             }):Play()
  65.         end)
  66.     end
  67.    
  68. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement