Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.20 KB | None | 0 0
  1.  
  2. local base_hp = 250
  3. local base_spd = 20
  4. local base_dmg = 15
  5.  
  6. local hp = base_hp
  7. local spd = base_spd
  8. local dmg = base_dmg
  9. local heal = false
  10. local knock = false
  11.  
  12. local flame = fx.GetFlame("Storm")
  13. local pflame = fx.GetFlame("Storm",3)
  14. local mode_id = math.random(3)
  15. function switch()
  16. local flame_id = "Haze"
  17. hp = base_hp
  18. spd = base_spd
  19. dmg = base_dmg
  20. if mode_id == 1 then
  21. flame_id = "Storm"
  22. dmg = base_dmg + 10
  23. elseif mode_id == 2 then
  24. flame_id = "Flux"
  25. hp = base_hp * 2
  26. elseif mode_id == 3 then
  27. flame_id = "Narukami"
  28. dmg = base_dmg + 5
  29. hp = base_hp + 50
  30. --[[
  31. elseif mode_id == 4 then
  32. flame_id = "Haze"
  33. hp = base_hp * 2
  34. spd = base_spd
  35. dmg = base_dmg * -2
  36. elseif mode_id == 5 then
  37. flame_id = "Sky"
  38. local resizeModule = require(game.ReplicatedStorage.Models.resizeModule.ResizeModule)
  39. resizeModule.ScaleCharacter(character,0.5,{ScaleHats = true})
  40. dmg = dmg * -1
  41. spd = spd * 1.5
  42. hp = hp * 2
  43. --]]
  44. end
  45. flame = fx.GetFlame(flame_id)
  46. pflame = fx.GetFlame(flame_id,1/2)
  47. character.Humanoid.MaxHealth = hp
  48. character.Humanoid.Health = hp
  49. character.Humanoid.WalkSpeed = spd
  50. end
  51. switch()
  52. local blade
  53. local goal
  54. local active
  55. local debounces = {}
  56. local anims = script -- Animation parent
  57. -- Animation Objects should go into the base of the script
  58. -- Same goes for particles
  59. local anim = {}
  60. if anims then
  61. for _,animation in pairs(anims:GetChildren()) do
  62. if animation:IsA("Animation") then
  63. anim[animation.Name] = character.Humanoid:LoadAnimation(animation)
  64. end
  65. end
  66. end
  67. local container = Instance.new("Folder",character)
  68. local ContextActionModule = require(game.ReplicatedStorage.ContextActionModule)
  69. ContextActionModule.InputBegan(function(k,chatting)
  70. if character.Humanoid.Health <= 0 or character.Torso.Anchored or chatting then return false end
  71. local n = k.UserInputType
  72. if k.UserInputType == Enum.UserInputType.Keyboard then
  73. local n = k.KeyCode
  74. if k.KeyCode == Enum.KeyCode.Q and not debounces["Basic"] then
  75. debounces["Basic"] = true
  76. debounces["Global"] = true
  77. local part = fx.Projectile({Parent = character, Size = Vector3.new(1,6,1), Color = flame}, true)
  78. fx.Mesh(part, 582110789).Scale = Vector3.new(1,1,1)*1.5
  79. fx.Emitter(part,game.ReplicatedStorage.EmitterService.Ace.Flash)
  80. local mainWeld = Instance.new("Weld",part)
  81. mainWeld.Part0 = character["Right Arm"]
  82. mainWeld.Part1 = part
  83. mainWeld.C0 = CFrame.new(0, -1, -1.5) * CFrame.Angles(math.rad(270),math.rad(0),math.rad(0))
  84. part.Touched:Connect(function(hit)
  85. if active and damage(part,hit,dmg,1,player,dmg,dmg) then
  86.  
  87. end
  88. end)
  89. blade = part
  90. character.Humanoid.MaxHealth = hp
  91. fx.Orb(character.Torso,flame,{Special = function() character.Humanoid.Health = hp end})
  92. character.Humanoid.WalkSpeed = spd
  93. debounces["Global"] = false
  94. if anims:FindFirstChild("Idle") then
  95. anim.Idle:Play()
  96. end
  97. elseif not debounces["Basic"] or debounces["Global"] then
  98. return
  99. --[[elseif k.KeyCode == Enum.KeyCode.Q and not debounces[n] then
  100. debounces[n] = true
  101. mode_id = mode_id%5 + 1
  102. switch()
  103. blade.Color = flame
  104. fx.Orb(character.Torso,flame,{Material = "Glass", Duration = 2, Damage = dmg, Healing = dmg})
  105. wait(3)
  106. debounces[n] = false
  107. --]]
  108. elseif k.KeyCode == Enum.KeyCode.E and not debounces[n] then
  109. debounces[n] = true
  110. local barrier = fx.Projectile({Parent = character, CanCollide = false, Material = Enum.Material.Glass, Color = flame},10)
  111. local mainWeld = Instance.new("Weld",barrier)
  112. mainWeld.Part0 = character["Torso"]
  113. mainWeld.Part1 = barrier
  114. mainWeld.C0 = CFrame.new(0,0,0) * CFrame.Angles(math.rad(90),0,0)
  115. fx.Mesh(barrier,16606212).Scale = Vector3.new(1,1,1)*3
  116.  
  117. for i=1,10 do
  118. local target = (dmg>0 and fx.AutoTarget(125) or fx.AutoTargetFriendly(250))
  119. if target then
  120. pcall(function() damage(barrier,target.Torso,dmg,0.5,player,-dmg,dmg) end)
  121. local a = Instance.new("Attachment",target.Torso)
  122. local b = Instance.new("Attachment",barrier)
  123. goal = target.Torso
  124. local c = Instance.new("Beam",barrier)
  125. c.Color = ColorSequence.new(pflame)
  126. c.Attachment0 = a
  127. c.Attachment1 = b
  128. fx.Sound(537581716,barrier,2,1.5)
  129. wait(1)
  130. goal = false
  131. a:Destroy()
  132. b:Destroy()
  133. else
  134. wait(1)
  135. end
  136. end
  137. debounces[n] = false
  138. elseif k.KeyCode == Enum.KeyCode.R and not debounces[n] and goal then
  139. debounces[n] = true
  140. fx.Sound(491270608,character.Torso)
  141. fx.Velocity(character.Torso,CFrame.new(character.HumanoidRootPart.Position,goal.Position).lookVector*100,0.25)
  142. wait(0.5)
  143. fx.Sound(576124533,character.Torso)
  144. spawn(function()
  145. fx.Orb(goal,flame,{Rings = 2, Duration = 1.5, Reach = 1.5, Damage = dmg/2, Material = "Neon"})
  146. end)
  147. wait(1)
  148. debounces[n] = false
  149. --[[elseif k.KeyCode == Enum.KeyCode.T and not debounces[n] and goal then
  150. debounces[n] = true
  151. fx.Sound(491270608,goal)
  152. fx.Velocity(goal,CFrame.new(goal.Position,character.HumanoidRootPart.Position).lookVector*100,0.25)
  153. wait(0.5)
  154. fx.Sound(576124533,character.Torso)
  155. spawn(function()
  156. fx.Orb(goal,flame,{Rings = 2, Duration = 1.5, Reach = 1.5, Damage = dmg/2, Material = "Neon"})
  157. end)
  158. wait(1)
  159. debounces[n] = false
  160. --]]
  161. elseif k.KeyCode == Enum.KeyCode.F and not debounces[n] then
  162. debounces[n] = true
  163. debounces["Global"] = true
  164. anim.Strike:Play()
  165. dmg = dmg * 3
  166. wait(0.9)
  167. active = true
  168. fx.Velocity(character.Torso,character.HumanoidRootPart.CFrame.lookVector*50,0.5)
  169. wait(1.1)
  170. active = false
  171. fx.Orb(character.Torso,flame,{Rings = 2, Duration = 2.5, Reach = 1.5, Damage = dmg/2, Material = "Neon"})
  172. dmg = dmg / 3
  173. debounces["Global"] = false
  174. wait(5)
  175. debounces[n] = false
  176. end
  177. elseif k.UserInputType == Enum.UserInputType.MouseButton1 and not debounces[n] and debounces["Basic"] then
  178. debounces[n] = true
  179. debounces["Global"] = true
  180. anim.Poke:Play()
  181. fx.Sound(182765513,character.Torso)
  182. wait(0.2)
  183. active = true
  184. wait(0.45)
  185. active = false
  186. debounces["Global"] = false
  187. debounces[n] = false
  188. fx.Orb(character.Torso,flame,{Rings = 2, Duration = 0.5, Reach = 1.5, Damage = dmg/2, Material = "Neon"})
  189. end
  190. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement