Advertisement
Sungmingamerpro13

New Bossfight System (STORY GAME)

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