Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.31 KB | None | 0 0
  1. function swait(num)
  2. if num == 0 or num == nil then
  3. game:service("RunService").Stepped:wait(0)
  4. else
  5. for i = 0, num do
  6. game:service("RunService").Stepped:wait(0)
  7. end
  8. end
  9. end
  10. function thread(f)
  11. coroutine.resume(coroutine.create(f))
  12. end
  13. function clerp(a, b, t)
  14. local qa = {
  15. QuaternionFromCFrame(a)
  16. }
  17. local qb = {
  18. QuaternionFromCFrame(b)
  19. }
  20. local ax, ay, az = a.x, a.y, a.z
  21. local bx, by, bz = b.x, b.y, b.z
  22. local _t = 1 - t
  23. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  24. end
  25. function QuaternionFromCFrame(cf)
  26. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  27. local trace = m00 + m11 + m22
  28. if trace > 0 then
  29. local s = math.sqrt(1 + trace)
  30. local recip = 0.5 / s
  31. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  32. else
  33. local i = 0
  34. if m00 < m11 then
  35. i = 1
  36. end
  37. if m22 > (i == 0 and m00 or m11) then
  38. i = 2
  39. end
  40. if i == 0 then
  41. local s = math.sqrt(m00 - m11 - m22 + 1)
  42. local recip = 0.5 / s
  43. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  44. elseif i == 1 then
  45. local s = math.sqrt(m11 - m22 - m00 + 1)
  46. local recip = 0.5 / s
  47. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  48. elseif i == 2 then
  49. local s = math.sqrt(m22 - m00 - m11 + 1)
  50. local recip = 0.5 / s
  51. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  52. end
  53. end
  54. end
  55. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  56. local xs, ys, zs = x + x, y + y, z + z
  57. local wx, wy, wz = w * xs, w * ys, w * zs
  58. local xx = x * xs
  59. local xy = x * ys
  60. local xz = x * zs
  61. local yy = y * ys
  62. local yz = y * zs
  63. local zz = z * zs
  64. return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  65. end
  66. function QuaternionSlerp(a, b, t)
  67. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  68. local startInterp, finishInterp
  69. if cosTheta >= 1.0E-4 then
  70. if 1 - cosTheta > 1.0E-4 then
  71. local theta = math.acos(cosTheta)
  72. local invSinTheta = 1 / Sin(theta)
  73. startInterp = Sin((1 - t) * theta) * invSinTheta
  74. finishInterp = Sin(t * theta) * invSinTheta
  75. else
  76. startInterp = 1 - t
  77. finishInterp = t
  78. end
  79. elseif 1 + cosTheta > 1.0E-4 then
  80. local theta = math.acos(-cosTheta)
  81. local invSinTheta = 1 / Sin(theta)
  82. startInterp = Sin((t - 1) * theta) * invSinTheta
  83. finishInterp = Sin(t * theta) * invSinTheta
  84. else
  85. startInterp = t - 1
  86. finishInterp = t
  87. end
  88. return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  89. end
  90. function rayCast(Position, Direction, Range, Ignore)
  91. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  92. end
  93. local RbxUtility = LoadLibrary("RbxUtility")
  94. local Create = RbxUtility.Create
  95.  
  96. -------------------------------------------------------
  97. --Start Damage Function--
  98. -------------------------------------------------------
  99. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  100. if hit.Parent == nil then
  101. return
  102. end
  103. local h = hit.Parent:FindFirstChildOfClass("Humanoid")
  104. for _, v in pairs(hit.Parent:children()) do
  105. if v:IsA("Humanoid") then
  106. h = v
  107. end
  108. end
  109. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
  110.  
  111. hit.Parent:FindFirstChild("Head"):BreakJoints()
  112. end
  113.  
  114. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  115. if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  116. if hit.Parent.DebounceHit.Value == true then
  117. return
  118. end
  119. end
  120. if insta == true then
  121. hit.Parent:FindFirstChild("Head"):BreakJoints()
  122. end
  123. local c = Create("ObjectValue"){
  124. Name = "creator",
  125. Value = game:service("Players").LocalPlayer,
  126. Parent = h,
  127. }
  128. game:GetService("Debris"):AddItem(c, .5)
  129. if HitSound ~= nil and HitPitch ~= nil then
  130. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  131. end
  132. local Damage = math.random(minim, maxim)
  133. local blocked = false
  134. local block = hit.Parent:findFirstChild("Block")
  135. if block ~= nil then
  136. if block.className == "IntValue" then
  137. if block.Value > 0 then
  138. blocked = true
  139. block.Value = block.Value - 1
  140. print(block.Value)
  141. end
  142. end
  143. end
  144. if blocked == false then
  145. h.Health = h.Health - Damage
  146. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  147. else
  148. h.Health = h.Health - (Damage / 2)
  149. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  150. end
  151. if Type == "Knockdown" then
  152. local hum = hit.Parent.Humanoid
  153. hum.PlatformStand = true
  154. coroutine.resume(coroutine.create(function(HHumanoid)
  155. swait(1)
  156. HHumanoid.PlatformStand = false
  157. end), hum)
  158. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  159. local bodvol = Create("BodyVelocity"){
  160. velocity = angle * knockback,
  161. P = 5000,
  162. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  163. Parent = hit,
  164. }
  165. local rl = Create("BodyAngularVelocity"){
  166. P = 3000,
  167. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  168. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  169. Parent = hit,
  170. }
  171. game:GetService("Debris"):AddItem(bodvol, .5)
  172. game:GetService("Debris"):AddItem(rl, .5)
  173. elseif Type == "Normal" then
  174. local vp = Create("BodyVelocity"){
  175. P = 500,
  176. maxForce = Vector3.new(math.huge, 0, math.huge),
  177. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  178. }
  179. if knockback > 0 then
  180. vp.Parent = hit.Parent.Torso
  181. end
  182. game:GetService("Debris"):AddItem(vp, .5)
  183. elseif Type == "Up" then
  184. local bodyVelocity = Create("BodyVelocity"){
  185. velocity = Vector3.new(0, 20, 0),
  186. P = 5000,
  187. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  188. Parent = hit,
  189. }
  190. game:GetService("Debris"):AddItem(bodyVelocity, .5)
  191. elseif Type == "DarkUp" then
  192. coroutine.resume(coroutine.create(function()
  193. for i = 0, 1, 0.1 do
  194. swait()
  195. Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  196. end
  197. end))
  198. local bodyVelocity = Create("BodyVelocity"){
  199. velocity = Vector3.new(0, 20, 0),
  200. P = 5000,
  201. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  202. Parent = hit,
  203. }
  204. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  205. elseif Type == "Snare" then
  206. local bp = Create("BodyPosition"){
  207. P = 2000,
  208. D = 100,
  209. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  210. position = hit.Parent.Torso.Position,
  211. Parent = hit.Parent.Torso,
  212. }
  213. game:GetService("Debris"):AddItem(bp, 1)
  214. elseif Type == "Freeze" then
  215. local BodPos = Create("BodyPosition"){
  216. P = 50000,
  217. D = 1000,
  218. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  219. position = hit.Parent.Torso.Position,
  220. Parent = hit.Parent.Torso,
  221. }
  222. local BodGy = Create("BodyGyro") {
  223. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  224. P = 20e+003,
  225. Parent = hit.Parent.Torso,
  226. cframe = hit.Parent.Torso.CFrame,
  227. }
  228. hit.Parent.Torso.Anchored = true
  229. coroutine.resume(coroutine.create(function(Part)
  230. swait(1.5)
  231. Part.Anchored = false
  232. end), hit.Parent.Torso)
  233. game:GetService("Debris"):AddItem(BodPos, 3)
  234. game:GetService("Debris"):AddItem(BodGy, 3)
  235. end
  236. local debounce = Create("BoolValue"){
  237. Name = "DebounceHit",
  238. Parent = hit.Parent,
  239. Value = true,
  240. }
  241. game:GetService("Debris"):AddItem(debounce, Delay)
  242. c = Create("ObjectValue"){
  243. Name = "creator",
  244. Value = Player,
  245. Parent = h,
  246. }
  247. game:GetService("Debris"):AddItem(c, .5)
  248. end
  249. end
  250. print("By Makhail07")
  251. while true do
  252. swait()
  253. sine = sine + change
  254. local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude
  255. local velderp = root.Velocity.y
  256. hitfloor, posfloor = rayCast(root.Position, CFrame.new(root.Position, root.Position - Vector3.new(0, 1, 0)).lookVector, 4* Player_Size, char)
  257. if equipped == true or equipped == false then
  258. if attack == false then
  259. idle = idle + 1
  260. else
  261. idle = 0
  262. end
  263. local Landed = false
  264. if(hitfloor)then
  265. WasAir = false
  266. else
  267. WasAir = true
  268. end
  269. if(WasAir == false)then
  270. if(InAir == true)then
  271. LandTick = time()
  272. Landed = true
  273. end
  274. end
  275. if(time()-LandTick < .3)then
  276. Landed = true
  277. end
  278. if(hitfloor)then
  279. InAir = false
  280. else
  281. InAir = true
  282. end
  283. local WALKSPEEDVALUE = 6 / (hum.WalkSpeed / 16)
  284. local Walking = (math.abs(root.Velocity.x) > 1 or math.abs(root.Velocity.z) > 1)
  285. local State = (hum.PlatformStand and 'Paralyzed' or hum.Sit and 'Sit' or Landed and 'Land' or not hitfloor and root.Velocity.y < -1 and "Fall" or not hitfloor and root.Velocity.y > 1 and "Jump" or hitfloor and Walking and "Walk" or hitfloor and "Idle")
  286. if(State == 'Jump')then
  287. hum.JumpPower = 55
  288. if attack == false then
  289. rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.1 + 0.1 * Cos(sine / 20)* Player_Size) * angles(Rad(-16), Rad(0), Rad(0)), 0.1)
  290. neck.C0 = clerp(neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(10 - 2.5 * Sin(sine / 30)), Rad(0), Rad(0)), 0.3)
  291. rl.Weld.C0 = clerp(rl.Weld.C0, CF(0.5* Player_Size, -.2 - 0.1 * Cos(sine / 20), -.3* Player_Size) * angles(Rad(0), Rad(-10), Rad(0)) * angles(Rad(-2.5), Rad(0), Rad(0)), 0.1)
  292. ll.Weld.C0 = clerp(ll.Weld.C0, CF(-0.5* Player_Size, -.9 - 0.1 * Cos(sine / 20), -.5* Player_Size) * angles(Rad(0), Rad(10), Rad(0)) * angles(Rad(-2.5), Rad(0), Rad(0)), 0.1)
  293. RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(25), Rad(-.6), Rad(13 + 4.5 * Sin(sine / 20))), 0.1)
  294. LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(25), Rad(-.6), Rad(-13 - 4.5 * Sin(sine / 20))), 0.1)
  295. end
  296. elseif(State == 'Fall')then
  297. if attack == false then
  298. rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.1 + 0.1 * Cos(sine / 20)* Player_Size) * angles(Rad(25), Rad(0), Rad(0)), 0.1)
  299. neck.C0 = clerp(neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(10 - 2.5 * Sin(sine / 30)), Rad(0), Rad(0)), 0.3)
  300. rl.Weld.C0 = clerp(rl.Weld.C0, CF(0.5* Player_Size, -1 - 0.1 * Cos(sine / 20)* Player_Size, -.3* Player_Size) * angles(Rad(0), Rad(-10), Rad(0)) * angles(Rad(25), Rad(0), Rad(0)), 0.1)
  301. ll.Weld.C0 = clerp(ll.Weld.C0, CF(-0.5* Player_Size, -.8 - 0.1 * Cos(sine / 20)* Player_Size, -.3* Player_Size) * angles(Rad(0), Rad(10), Rad(0)) * angles(Rad(25), Rad(0), Rad(0)), 0.1)
  302. RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(165), Rad(-.6), Rad(45 + 4.5 * Sin(sine / 20))), 0.1)
  303. LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(165), Rad(-.6), Rad(-45 - 4.5 * Sin(sine / 20))), 0.1)
  304. end
  305. elseif(State == 'Land')then
  306. hum.JumpPower = 0
  307. if attack == false then
  308. rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -1 + 0.1 * Cos(sine / 20)* Player_Size) * angles(Rad(10), Rad(0), Rad(0)), 0.15)
  309. neck.C0 = clerp(neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(35 - 2.5 * Sin(sine / 30)), Rad(0), Rad(0)), 0.3)
  310. rl.Weld.C0 = clerp(rl.Weld.C0, CF(0.5* Player_Size, 0.1 - 0.1 * Cos(sine / 20)* Player_Size, -.3* Player_Size) * angles(Rad(0), Rad(-10), Rad(0)) * angles(Rad(-3.5), Rad(0), Rad(5)), 0.15)
  311. ll.Weld.C0 = clerp(ll.Weld.C0, CF(-0.5* Player_Size, 0.1 - 0.1 * Cos(sine / 20)* Player_Size, -.3* Player_Size) * angles(Rad(0), Rad(10), Rad(0)) * angles(Rad(-3.5), Rad(0), Rad(-5)), 0.15)
  312. RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(65), Rad(0), Rad(25 + 4.5 * Sin(sine / 20))), 0.1)
  313. LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(55), Rad(0), Rad(-25 - 4.5 * Sin(sine / 20))), 0.1)
  314. end
  315. elseif(State == 'Idle')then
  316. change = 1
  317. if attack == false then
  318. rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.1 + 0.1* Player_Size * Cos(sine / 20)) * angles(Rad(0 - 5 * Sin(sine / 20)), Rad(0), Rad(0)), 0.1)
  319. neck.C0 = clerp(neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(0 - 5 * Sin(sine / 20)), Rad(0), Rad(0)), 0.1)
  320. rl.Weld.C0 = clerp(rl.Weld.C0, CF(0.5* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0 - 5 * Sin(sine / 20)), Rad(-10), Rad(0)) * angles(Rad(0), Rad(0), Rad(5)), 0.1)
  321. ll.Weld.C0 = clerp(ll.Weld.C0, CF(-0.5* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0 - 5 * Sin(sine / 20)), Rad(10), Rad(0)) * angles(Rad(0), Rad(0), Rad(-5)), 0.1)
  322. RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.1 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0 + 15 * Sin(sine / 20)), Rad(0 + 5 * Sin(sine / 20)), Rad(10 + 5 * Sin(sine / 20))), 0.1)
  323. LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.1 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0 + 15 * Sin(sine / 20)), Rad(0 - 5 * Sin(sine / 20)), Rad(-10 - 5 * Sin(sine / 20))), 0.1)
  324. end
  325. elseif(State == 'Walk')then
  326. change = 0.55
  327. hum.JumpPower = 55
  328. if attack == false then
  329. rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.3 - 0.65 * Cos(sine / ( WALKSPEEDVALUE / 2 ))) * angles(Rad(-25), Rad(0), Rad(0 - 1.75 * Cos(sine / ( WALKSPEEDVALUE / 2))) + root.RotVelocity.Y / 75), 0.1)
  330. neck.C0 = clerp(neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(-20 + 5 * Sin(sine / (WALKSPEEDVALUE / 2))), Rad(0), Rad(0) + root.RotVelocity.Y / 13), 0.1)
  331. rl.Weld.C0 = clerp(rl.Weld.C0, CF(0.5* Player_Size, -0.8 - 0.5 * Cos(sine / WALKSPEEDVALUE) / 2* Player_Size, 0.6 * Cos(sine / WALKSPEEDVALUE) / 2* Player_Size) * angles(Rad(-15 - 95 * Cos(sine / WALKSPEEDVALUE)) - root.RotVelocity.Y / 75 + -Sin(sine / WALKSPEEDVALUE) / 2.5, Rad(0 - 10 * Cos(sine / WALKSPEEDVALUE)), Rad(0)) * angles(Rad(0 + 2 * Cos(sine / WALKSPEEDVALUE)), Rad(0), Rad(0)), 0.3)
  332. ll.Weld.C0 = clerp(ll.Weld.C0, CF(-0.5* Player_Size, -0.8 + 0.5 * Cos(sine / WALKSPEEDVALUE) / 2* Player_Size, -0.6 * Cos(sine / WALKSPEEDVALUE) / 2* Player_Size) * angles(Rad(-15 + 95 * Cos(sine / WALKSPEEDVALUE)) + root.RotVelocity.Y / -75 + Sin(sine / WALKSPEEDVALUE) / 2.5, Rad(0 - 10 * Cos(sine / WALKSPEEDVALUE)), Rad(0)) * angles(Rad(0 - 2 * Cos(sine / WALKSPEEDVALUE)), Rad(0), Rad(0)), 0.3)
  333. RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.1 * Sin(sine / WALKSPEEDVALUE)* Player_Size, 0* Player_Size) * angles(Rad(215), Rad(0), Rad(45)), 0.1)
  334. LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.1 * Sin(sine / WALKSPEEDVALUE)* Player_Size, 0* Player_Size) * angles(Rad(215), Rad(0), Rad(-45)), 0.1)
  335. elseif attack == true and movelegs == true then
  336. rl.Weld.C0 = clerp(rl.Weld.C0, CF(0.5* Player_Size, -0.8 - 0.5 * Cos(sine / WALKSPEEDVALUE) / 2* Player_Size, 0.6 * Cos(sine / WALKSPEEDVALUE) / 2* Player_Size) * angles(Rad(-10 - 25 * Cos(sine / WALKSPEEDVALUE)) - root.RotVelocity.Y / 75 + -Sin(sine / WALKSPEEDVALUE) / 2.5, Rad(0 - 10 * Cos(sine / WALKSPEEDVALUE)), Rad(0)) * angles(Rad(0 + 2 * Cos(sine / WALKSPEEDVALUE)), Rad(0), Rad(0)), 0.3)
  337. ll.Weld.C0 = clerp(ll.Weld.C0, CF(-0.5* Player_Size, -0.8 + 0.5 * Cos(sine / WALKSPEEDVALUE) / 2* Player_Size, -0.6 * Cos(sine / WALKSPEEDVALUE) / 2* Player_Size) * angles(Rad(-10 + 25 * Cos(sine / WALKSPEEDVALUE)) + root.RotVelocity.Y / -75 + Sin(sine / WALKSPEEDVALUE) / 2.5, Rad(0 - 10 * Cos(sine / WALKSPEEDVALUE)), Rad(0)) * angles(Rad(0 - 2 * Cos(sine / WALKSPEEDVALUE)), Rad(0), Rad(0)), 0.3)
  338. end
  339. end
  340. end
  341. hum.Name = "HUM"
  342. hum.WalkSpeed = Speed
  343. Music.SoundId = "rbxassetid://"..SONG
  344. Music.Looped = true
  345. Music.Pitch = 1
  346. Music.Volume = 1.5
  347. Music.Parent = tors
  348. Music.Playing = true
  349. if 0 < #Effects then
  350. for e = 1, #Effects do
  351. if Effects[e] ~= nil then
  352. local Thing = Effects[e]
  353. if Thing ~= nil then
  354. local Part = Thing[1]
  355. local Mode = Thing[2]
  356. local Delay = Thing[3]
  357. local IncX = Thing[4]
  358. local IncY = Thing[5]
  359. local IncZ = Thing[6]
  360. if 1 >= Thing[1].Transparency then
  361. if Thing[2] == "Block1" then
  362. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  363. local Mesh = Thing[1].Mesh
  364. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  365. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  366. elseif Thing[2] == "Block2" then
  367. Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0)
  368. local Mesh = Thing[7]
  369. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  370. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  371. elseif Thing[2] == "Block3" then
  372. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) + Vector3.new(0, 0.15, 0)
  373. local Mesh = Thing[7]
  374. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  375. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  376. elseif Thing[2] == "Cylinder" then
  377. local Mesh = Thing[1].Mesh
  378. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  379. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  380. elseif Thing[2] == "Blood" then
  381. local Mesh = Thing[7]
  382. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
  383. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  384. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  385. elseif Thing[2] == "Elec" then
  386. local Mesh = Thing[1].Mesh
  387. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  388. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  389. elseif Thing[2] == "Disappear" then
  390. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  391. elseif Thing[2] == "Shatter" then
  392. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  393. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  394. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  395. Thing[6] = Thing[6] + Thing[5]
  396. end
  397. else
  398. Part.Parent = nil
  399. table.remove(Effects, e)
  400. end
  401. end
  402. end
  403. end
  404. end
  405. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement