Advertisement
Sungmingamerpro13

BossFight System (STORY GAME)

Nov 6th, 2023
904
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.46 KB | None | 0 0
  1. local BossTeacher = game.Workspace.EvilTeacher
  2.  
  3. local function playMonsterAnimation()
  4.     local animation = Instance.new("Animation",BossTeacher)
  5.     animation.AnimationId = "https://roblox.com/assets/?id=1083195517"
  6.  
  7.     local humanoid = BossTeacher:FindFirstChild("Humanoid")
  8.     humanoid:LoadAnimation(animation):Play()
  9.  
  10.     wait(1)
  11.  
  12.     animation:Destroy()
  13. end
  14.  
  15. local function fireballChallenge()
  16.  
  17.     for i=1,3 do
  18.  
  19.         playMonsterAnimation()
  20.  
  21.         for i,player in pairs(game.Players:GetPlayers()) do
  22.             if player.Character then
  23.                 local fireball = game.ReplicatedStorage.Fireball:Clone()
  24.                 local target = game.ReplicatedStorage.Target:Clone()
  25.  
  26.  
  27.                 target.Parent = game.Workspace
  28.                 target.CFrame = (player.Character.HumanoidRootPart.CFrame - Vector3.new(0,3,0)) * CFrame.Angles(0,0,math.rad(90))
  29.  
  30.                 wait(0.5)
  31.  
  32.                 fireball.Parent = game.Workspace
  33.                 fireball.CFrame = target.CFrame + Vector3.new(0,60,0)
  34.  
  35.                 wait(2)
  36.  
  37.                 target:Destroy()
  38.             end
  39.         end
  40.  
  41.         wait(1)
  42.     end
  43. end
  44.  
  45. local function LavaChallenge()
  46.    
  47.     local LavaPart = game.ReplicatedStorage.LavaPart:Clone()
  48.     LavaPart.Parent = workspace
  49.    
  50.     wait(10)
  51.    
  52.     LavaPart:Destroy()
  53. end
  54.  
  55. spawn(function()
  56.     while true do
  57.         wait(0.5)
  58.         fireballChallenge()
  59.         wait(0.5)
  60.         fireballChallenge()
  61.         wait(0.5)
  62.         fireballChallenge()
  63.         wait(0.5)
  64.         LavaChallenge()
  65.         wait(0.5)
  66.         if BossTeacher.Humanoid.Health <= 0 then
  67.             break
  68.         end
  69.     end
  70. end)
  71.  
  72. repeat wait(0.1) until BossTeacher.Humanoid.Health <= 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement