Advertisement
Sungmingamerpro13

Bossfight System 2 (STORY GAME)

Nov 25th, 2024
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.96 KB | None | 0 0
  1. local TweenService = game:GetService("TweenService")
  2.  
  3. local BossMonster = game.Workspace.EvilSungmin --- Change by your BossNPC
  4.  
  5. local function playMonsterAnimation()
  6.     local animation = Instance.new("Animation",BossMonster)
  7.     animation.AnimationId = "https://roblox.com/assets/?id=1083195517"
  8.  
  9.     local humanoid = BossMonster:FindFirstChild("Humanoid")
  10.     humanoid:LoadAnimation(animation):Play()
  11.  
  12.     wait(1)
  13.  
  14.     animation:Destroy()
  15. end
  16.  
  17. local function FireballChallenge()
  18.     for i=1,3 do
  19.  
  20.         playMonsterAnimation()
  21.  
  22.         for i,player in pairs(game.Players:GetPlayers()) do
  23.             if player.Character then
  24.                 local fireball = game.ReplicatedStorage.Fireball:Clone()
  25.                 local target = game.ReplicatedStorage.Target:Clone()
  26.  
  27.  
  28.                 target.Parent = game.Workspace
  29.                 target.CFrame = (player.Character.HumanoidRootPart.CFrame - Vector3.new(0,3,0)) * CFrame.Angles(0,0,math.rad(90))
  30.  
  31.                 wait(0.5)
  32.  
  33.                 fireball.Parent = game.Workspace
  34.                 fireball.CFrame = target.CFrame + Vector3.new(0,60,0)
  35.  
  36.                 wait(2)
  37.  
  38.                 target:Destroy()
  39.             end
  40.         end
  41.  
  42.         wait(1)
  43.     end
  44. end
  45.  
  46. local function LavaChallange()
  47.    
  48.     local tweenInfo = TweenInfo.new(2)
  49.    
  50.     local Plataforms = game.ReplicatedStorage.PlataformsModel:Clone()
  51.     Plataforms.Parent = workspace
  52.    
  53.     wait(2)
  54.    
  55.     local goalLavaUp = {}
  56.     goalLavaUp.CFrame = workspace.Lava.goalPositionPart.CFrame
  57.     local moveLavaUpTween = TweenService:Create(workspace.Lava.Handle, tweenInfo, goalLavaUp)
  58.  
  59.     moveLavaUpTween:Play()
  60.    
  61.     wait(7)
  62.    
  63.     local goalLavaDown = {}
  64.     goalLavaDown.CFrame = workspace.Lava.goalPositionPart.CFrame - Vector3.new(0,10,0)
  65.     local goalLavaDownTween = TweenService:Create(workspace.Lava.Handle, tweenInfo, goalLavaDown)
  66.  
  67.     goalLavaDownTween:Play()
  68.    
  69.     wait(3)
  70.    
  71.     Plataforms:Destroy()
  72.    
  73. end
  74.  
  75. while wait(5) do
  76.     if BossMonster.Humanoid.Health > 800 then
  77.        
  78.         BossMonster.ForceField.Visible = true
  79.        
  80.         FireballChallenge()
  81.         LavaChallange()
  82.        
  83.         BossMonster.ForceField.Visible = false
  84.        
  85.     else
  86.         break
  87.     end
  88. end
  89.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement