Advertisement
Guest User

Untitled

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