Guest User

server

a guest
Dec 14th, 2019
112
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local regmod = require(game.ServerScriptService.RotatedRegion3)
  2. debounce = false
  3.  
  4.  
  5. game.ReplicatedStorage.Classes.Demon.Trigger.OnServerEvent:Connect(function(player, Action)
  6. local char = player.Character
  7. local Combo = char:FindFirstChild("Combo")
  8. local humanoid = char:FindFirstChild("Humanoid")
  9. local attack1 = humanoid:LoadAnimation(script.Combo1)
  10. local attack2 = humanoid:LoadAnimation(script.Combo2)
  11. local attack3 = humanoid:LoadAnimation(script.Combo3)
  12. local attack4 = humanoid:LoadAnimation(script.Combo4)
  13. local attack5 = humanoid:LoadAnimation(script.Combo5)
  14.  
  15. local IC = game.ReplicatedStorage.Effects.Demon.Otherthing:Clone()
  16. local transformation = game.ReplicatedStorage.Effects.Demon.Transformation:Clone()
  17. local HB = game.ReplicatedStorage.Classes.Demon.Hitbox:Clone()
  18.  
  19. local LA = game.ReplicatedStorage.Classes.Demon.Left:Clone()
  20. local RA = game.ReplicatedStorage.Classes.Demon.Right:Clone()
  21. local torso = game.ReplicatedStorage.Classes.Demon.Torso:Clone()
  22.  
  23. if Action == "Attack" then
  24. if debounce == true then return end
  25. if Combo.Value == 1 then
  26. HB.Parent = workspace
  27. HB.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0,1,-2.5)
  28. HB.Size = Vector3.new(3.4, 6.3, 3)
  29. HB.Orientation = HB.Orientation + Vector3.new(0, 0, -35)
  30. local BV = Instance.new("BodyVelocity", char.HumanoidRootPart) BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  31. BV.Velocity = BV.Parent.CFrame.lookVector * 5
  32. debounce = true
  33. wait()
  34. char["Right Arm"].Right.one.Enabled = true
  35. char["Right Arm"].Right.two.Enabled = true
  36. char["Right Arm"].Right.three.Enabled = true
  37.  
  38. char["Left Arm"].Left.one.Enabled = true
  39. char["Left Arm"].Left.two.Enabled = true
  40. char["Left Arm"].Left.three.Enabled = true
  41. attack1:Play()
  42. game:GetService("Debris"):AddItem(BV, .1)
  43. wait(.1)
  44. HB.BrickColor = BrickColor.new("Really red")
  45. HB.SelectionBox.Color3 = Color3.new(255,0,0)
  46. local NewRegion = regmod.Block(HB.CFrame, HB.Size) local RTable = NewRegion.Cast(NewRegion)
  47. for i,v in ipairs(RTable) do
  48. if v.Parent:FindFirstChild("Humanoid") and v.Parent:FindFirstChild("HumanoidRootPart") and v.Parent:FindFirstChild("Torso") and v.Parent:FindFirstChild("Head") and v.Parent:FindFirstChild("Left Arm") and v.Parent:FindFirstChild("Right Arm") and v.Parent:FindFirstChild("Left Leg") and v.Parent:FindFirstChild("Right Leg") and v.Parent:FindFirstChild("Deb") == nil and v.Parent ~= char then
  49. local Deb = Instance.new("BoolValue", v.Parent)Deb.Name = "Deb" game:GetService("Debris"):AddItem(Deb,1)
  50. v.Parent.Humanoid:TakeDamage(25)
  51. elseif v.Parent:FindFirstChild("Humanoid") and v.Parent:FindFirstChild("HumanoidRootPart") == nil and v.Parent:FindFirstChild("Torso") == nil and v.Parent:FindFirstChild("Head") == nil and v.Parent:FindFirstChild("Left Arm") == nil and v.Parent:FindFirstChild("Right Arm") == nil and v.Parent:FindFirstChild("Left Leg") == nil and v.Parent:FindFirstChild("Right Leg") == nil and v.Parent == char then
  52. Combo.Value = 1
  53. end
  54. end
  55. wait(.45)
  56. char["Right Arm"].Right.one.Enabled = false
  57. char["Right Arm"].Right.two.Enabled = false
  58. char["Right Arm"].Right.three.Enabled = false
  59.  
  60. char["Left Arm"].Left.one.Enabled = false
  61. char["Left Arm"].Left.two.Enabled = false
  62. char["Left Arm"].Left.three.Enabled = false
  63. Combo.Value = 2
  64. game:GetService("Debris"):AddItem(HB, .35)
  65. debounce = false
  66. elseif Combo.Value == 2 then
  67. HB.Parent = workspace
  68. HB.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0,1, -2.5)
  69. HB.Size = Vector3.new(3, 6.3, 3)
  70. HB.Orientation = HB.Orientation + Vector3.new(0,0,35)
  71. local BV = Instance.new("BodyVelocity", char.HumanoidRootPart) BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  72. BV.Velocity = BV.Parent.CFrame.lookVector * 5
  73. debounce = true
  74. wait()
  75. char["Right Arm"].Right.one.Enabled = true
  76. char["Right Arm"].Right.two.Enabled = true
  77. char["Right Arm"].Right.three.Enabled = true
  78.  
  79. char["Left Arm"].Left.one.Enabled = true
  80. char["Left Arm"].Left.two.Enabled = true
  81. char["Left Arm"].Left.three.Enabled = true
  82. attack2:Play()
  83. game:GetService("Debris"):AddItem(BV, .1)
  84. wait(.1)
  85. HB.BrickColor = BrickColor.new("Really red")
  86. HB.SelectionBox.Color3 = Color3.new(255,0,0)
  87. local NewRegion = regmod.Block(HB.CFrame, HB.Size) local RTable = NewRegion.Cast(NewRegion)
  88. for i,v in ipairs(RTable) do
  89. if v.Parent:FindFirstChild("Humanoid") and v.Parent:FindFirstChild("HumanoidRootPart") and v.Parent:FindFirstChild("Torso") and v.Parent:FindFirstChild("Head") and v.Parent:FindFirstChild("Left Arm") and v.Parent:FindFirstChild("Right Arm") and v.Parent:FindFirstChild("Left Leg") and v.Parent:FindFirstChild("Right Leg") and v.Parent:FindFirstChild("Deb") == nil and v.Parent ~= char then
  90. local Deb = Instance.new("BoolValue", v.Parent)Deb.Name = "Deb" game:GetService("Debris"):AddItem(Deb,1)
  91. v.Parent.Humanoid:TakeDamage(25)
  92. elseif v.Parent:FindFirstChild("Humanoid") and v.Parent:FindFirstChild("HumanoidRootPart") == nil and v.Parent:FindFirstChild("Torso") == nil and v.Parent:FindFirstChild("Head") == nil and v.Parent:FindFirstChild("Left Arm") == nil and v.Parent:FindFirstChild("Right Arm") == nil and v.Parent:FindFirstChild("Left Leg") == nil and v.Parent:FindFirstChild("Right Leg") == nil and v.Parent == char then
  93. Combo.Value = 1
  94. end
  95. end
  96. wait(.45)
  97. char["Right Arm"].Right.one.Enabled = false
  98. char["Right Arm"].Right.two.Enabled = false
  99. char["Right Arm"].Right.three.Enabled = false
  100.  
  101. char["Left Arm"].Left.one.Enabled = false
  102. char["Left Arm"].Left.two.Enabled = false
  103. char["Left Arm"].Left.three.Enabled = false
  104. Combo.Value = 3
  105. game:GetService("Debris"):AddItem(HB, .35)
  106. debounce = false
  107. elseif Combo.Value == 3 then
  108. HB.Parent = workspace
  109. HB.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0,0,-3)
  110. HB.Size = Vector3.new(4, 6.2, 3.1)
  111. local BV = Instance.new("BodyVelocity", char.HumanoidRootPart) BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  112. BV.Velocity = BV.Parent.CFrame.lookVector * 5
  113. debounce = true
  114. wait()
  115. char["Right Arm"].Right.one.Enabled = true
  116. char["Right Arm"].Right.two.Enabled = true
  117. char["Right Arm"].Right.three.Enabled = true
  118.  
  119. char["Left Arm"].Left.one.Enabled = true
  120. char["Left Arm"].Left.two.Enabled = true
  121. char["Left Arm"].Left.three.Enabled = true
  122. attack3:Play()
  123. game:GetService("Debris"):AddItem(BV, .1)
  124. wait(.1)
  125. HB.BrickColor = BrickColor.new("Really red")
  126. HB.SelectionBox.Color3 = Color3.new(255,0,0)
  127. local NewRegion = regmod.Block(HB.CFrame, HB.Size) local RTable = NewRegion.Cast(NewRegion)
  128. for i,v in ipairs(RTable) do
  129. if v.Parent:FindFirstChild("Humanoid") and v.Parent:FindFirstChild("HumanoidRootPart") and v.Parent:FindFirstChild("Torso") and v.Parent:FindFirstChild("Head") and v.Parent:FindFirstChild("Left Arm") and v.Parent:FindFirstChild("Right Arm") and v.Parent:FindFirstChild("Left Leg") and v.Parent:FindFirstChild("Right Leg") and v.Parent:FindFirstChild("Deb") == nil and v.Parent ~= char then
  130. local Deb = Instance.new("BoolValue", v.Parent)Deb.Name = "Deb" game:GetService("Debris"):AddItem(Deb,1)
  131. v.Parent.Humanoid:TakeDamage(25)
  132. elseif v.Parent:FindFirstChild("Humanoid") and v.Parent:FindFirstChild("HumanoidRootPart") == nil and v.Parent:FindFirstChild("Torso") == nil and v.Parent:FindFirstChild("Head") == nil and v.Parent:FindFirstChild("Left Arm") == nil and v.Parent:FindFirstChild("Right Arm") == nil and v.Parent:FindFirstChild("Left Leg") == nil and v.Parent:FindFirstChild("Right Leg") == nil and v.Parent == char then
  133. Combo.Value = 1
  134. end
  135. end
  136. wait(.4)
  137. char["Right Arm"].Right.one.Enabled = false
  138. char["Right Arm"].Right.two.Enabled = false
  139. char["Right Arm"].Right.three.Enabled = false
  140.  
  141. char["Left Arm"].Left.one.Enabled = false
  142. char["Left Arm"].Left.two.Enabled = false
  143. char["Left Arm"].Left.three.Enabled = false
  144. Combo.Value = 4
  145. game:GetService("Debris"):AddItem(HB, .35)
  146. debounce = false
  147. elseif Combo.Value == 4 then
  148. HB.Parent = workspace
  149. HB.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0,0, -2.5)
  150. HB.Size = Vector3.new(2.6, 5.4, 2.5)
  151. HB.Orientation = HB.Orientation + Vector3.new(0,0,65)
  152. local BV = Instance.new("BodyVelocity", char.HumanoidRootPart) BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  153. BV.Velocity = BV.Parent.CFrame.lookVector * 5
  154. debounce = true
  155. wait()
  156. char["Right Arm"].Right.one.Enabled = true
  157. char["Right Arm"].Right.two.Enabled = true
  158. char["Right Arm"].Right.three.Enabled = true
  159.  
  160. char["Left Arm"].Left.one.Enabled = true
  161. char["Left Arm"].Left.two.Enabled = true
  162. char["Left Arm"].Left.three.Enabled = true
  163. attack4:Play()
  164. game:GetService("Debris"):AddItem(BV, .1)
  165. wait(.1)
  166. HB.BrickColor = BrickColor.new("Really red")
  167. HB.SelectionBox.Color3 = Color3.new(255,0,0)
  168. local NewRegion = regmod.Block(HB.CFrame, HB.Size) local RTable = NewRegion.Cast(NewRegion)
  169. for i,v in ipairs(RTable) do
  170. if v.Parent:FindFirstChild("Humanoid") and v.Parent:FindFirstChild("HumanoidRootPart") and v.Parent:FindFirstChild("Torso") and v.Parent:FindFirstChild("Head") and v.Parent:FindFirstChild("Left Arm") and v.Parent:FindFirstChild("Right Arm") and v.Parent:FindFirstChild("Left Leg") and v.Parent:FindFirstChild("Right Leg") and v.Parent:FindFirstChild("Deb") == nil and v.Parent ~= char then
  171. local Deb = Instance.new("BoolValue", v.Parent)Deb.Name = "Deb" game:GetService("Debris"):AddItem(Deb,1)
  172. v.Parent.Humanoid:TakeDamage(25)
  173. elseif v.Parent:FindFirstChild("Humanoid") and v.Parent:FindFirstChild("HumanoidRootPart") == nil and v.Parent:FindFirstChild("Torso") == nil and v.Parent:FindFirstChild("Head") == nil and v.Parent:FindFirstChild("Left Arm") == nil and v.Parent:FindFirstChild("Right Arm") == nil and v.Parent:FindFirstChild("Left Leg") == nil and v.Parent:FindFirstChild("Right Leg") == nil and v.Parent == char then
  174. Combo.Value = 1
  175. end
  176. end
  177. wait(.45)
  178. char["Right Arm"].Right.one.Enabled = false
  179. char["Right Arm"].Right.two.Enabled = false
  180. char["Right Arm"].Right.three.Enabled = false
  181.  
  182. char["Left Arm"].Left.one.Enabled = false
  183. char["Left Arm"].Left.two.Enabled = false
  184. char["Left Arm"].Left.three.Enabled = false
  185. Combo.Value = 5
  186. game:GetService("Debris"):AddItem(HB, .35)
  187. debounce = false
  188. elseif Combo.Value == 5 then
  189. HB.Parent = workspace
  190. HB.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0,.5,-3)
  191. HB.Size = Vector3.new(3.2, 2.7, 3.2)
  192. local BV = Instance.new("BodyVelocity", char.HumanoidRootPart) BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  193. BV.Velocity = BV.Parent.CFrame.lookVector * 5
  194. debounce = true
  195. wait()
  196. char["Right Arm"].Right.one.Enabled = true
  197. char["Right Arm"].Right.two.Enabled = true
  198. char["Right Arm"].Right.three.Enabled = true
  199.  
  200. char["Left Arm"].Left.one.Enabled = true
  201. char["Left Arm"].Left.two.Enabled = true
  202. char["Left Arm"].Left.three.Enabled = true
  203. attack5:Play()
  204. game:GetService("Debris"):AddItem(BV, .1)
  205. wait(.1)
  206. HB.BrickColor = BrickColor.new("Really red")
  207. HB.SelectionBox.Color3 = Color3.new(255,0,0)
  208. local NewRegion = regmod.Block(HB.CFrame, HB.Size) local RTable = NewRegion.Cast(NewRegion)
  209. for i,v in ipairs(RTable) do
  210. if v.Parent:FindFirstChild("Humanoid") and v.Parent:FindFirstChild("HumanoidRootPart") and v.Parent:FindFirstChild("Torso") and v.Parent:FindFirstChild("Head") and v.Parent:FindFirstChild("Left Arm") and v.Parent:FindFirstChild("Right Arm") and v.Parent:FindFirstChild("Left Leg") and v.Parent:FindFirstChild("Right Leg") and v.Parent:FindFirstChild("Deb") == nil and v.Parent ~= char then
  211. local Deb = Instance.new("BoolValue", v.Parent)Deb.Name = "Deb" game:GetService("Debris"):AddItem(Deb,1)
  212. v.Parent.Humanoid:TakeDamage(25)
  213. elseif v.Parent:FindFirstChild("Humanoid") and v.Parent:FindFirstChild("HumanoidRootPart") == nil and v.Parent:FindFirstChild("Torso") == nil and v.Parent:FindFirstChild("Head") == nil and v.Parent:FindFirstChild("Left Arm") == nil and v.Parent:FindFirstChild("Right Arm") == nil and v.Parent:FindFirstChild("Left Leg") == nil and v.Parent:FindFirstChild("Right Leg") == nil and v.Parent == char then
  214. Combo.Value = 1
  215. end
  216. end
  217. wait(1)
  218. char["Right Arm"].Right.one.Enabled = false
  219. char["Right Arm"].Right.two.Enabled = false
  220. char["Right Arm"].Right.three.Enabled = false
  221.  
  222. char["Left Arm"].Left.one.Enabled = false
  223. char["Left Arm"].Left.two.Enabled = false
  224. char["Left Arm"].Left.three.Enabled = false
  225. Combo.Value = 1
  226. game:GetService("Debris"):AddItem(HB, .35)
  227. debounce = false
  228. end
  229. end
  230. end)
RAW Paste Data