Advertisement
Diegolas97

Untitled

Oct 31st, 2017
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.23 KB | None | 0 0
  1. --scenius
  2. --i will squish ur skrubs irl
  3. wait(0.016666666666667)
  4. local plr = game.Players.LocalPlayer
  5. local basic = {}
  6. function round(num)
  7. local a, b = math.modf(num)
  8. if num % 1 ~= 0 then
  9. return math.floor(num) + math.floor(b * 10) / 10
  10. else
  11. return math.floor(num)
  12. end
  13. end
  14. function guieffect(parent, vhum, damage, colour)
  15. local damagepart = Instance.new("Part", parent)
  16. damagepart.Transparency = 1
  17. damagepart.Anchored = true
  18. damagepart.CanCollide = false
  19. damagepart.Size = Vector3.new(1, 1, 1)
  20. damagepart.Name = "DamagePart"
  21. damagepart.CFrame = vhum.Parent.Head.CFrame * CFrame.new(0, 1, 0)
  22. local g = Instance.new("BillboardGui", damagepart)
  23. g.Enabled = true
  24. g.Adornee = damagepart
  25. g.Size = UDim2.new(5, 0, 5, 0)
  26. g.ExtentsOffset = Vector3.new(0, 0, 0)
  27. g.StudsOffset = Vector3.new(0, 0, 0)
  28. local t = Instance.new("TextLabel", g)
  29. t.BackgroundTransparency = 1
  30. t.Font = "SourceSans"
  31. t.FontSize = "Size32"
  32. t.Text = "" .. round(damage)
  33. if round(damage) % 1 == 0 then
  34. t.Text = "" .. round(damage) .. ""
  35. end
  36. t.Size = UDim2.new(1, 0, 1, 0)
  37. t.TextStrokeTransparency = 1
  38. t.TextTransparency = 0
  39. t.TextScaled = true
  40. t.TextWrapped = true
  41. t.TextXAlignment = "Center"
  42. t.TextYAlignment = "Center"
  43. t.TextColor3 = colour
  44. coroutine.resume(coroutine.create(function()
  45. for i = 1, 50 do
  46. game:GetService("RunService").Heartbeat:wait()
  47. local sinewave = math.sin(i / 500) * 4
  48. damagepart.CFrame = damagepart.CFrame * CFrame.new(Vector3.new(0, 0.3 - sinewave, 0))
  49. t.TextTransparency = t.TextTransparency + 0.02
  50. end
  51. damagepart:Destroy()
  52. end), t)
  53. end
  54. function check(vhum, plrchar, dmg)
  55. if vhum.Parent.Head:FindFirstChild(plrchar.Name) then
  56. local value = vhum.Parent.Head:findFirstChild(plrchar.Name)
  57. value.Value = value.Value + math.ceil(dmg - 0.5)
  58. else
  59. local new = Instance.new("IntValue")
  60. new.Name = plrchar.Name
  61. new.Parent = vhum.Parent.Head
  62. new.Value = dmg
  63. end
  64. end
  65. function Knockback(vtors, plrchar, velocity, duration, name)
  66. local plrhead = plrchar.Head
  67. local enemply = game.Players:GetPlayerFromCharacter(vtors.Parent)
  68. local baseply = game.Players:GetPlayerFromCharacter(plrchar)
  69. if enemply and enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
  70. return
  71. end
  72. local bv = Instance.new("BodyVelocity")
  73. bv.P = 1250
  74. bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  75. bv.Velocity = velocity
  76. if name then
  77. bv.Name = name
  78. for i, v in pairs(vtors:GetChildren()) do
  79. if v.Name == name then
  80. return
  81. end
  82. end
  83. end
  84. spawn(function()
  85. wait(duration)
  86. bv:Destroy()
  87. end)
  88. end
  89. function basic.Burn(parent, vhum, damage, colour, loops)
  90. if not vhum or not vhum.Parent:FindFirstChild("Humanoid") or vhum.Health <= 0 then
  91. return
  92. end
  93. local plrchar = parent.Parent
  94. local plrhead = plrchar.Head
  95. local enemply = game.Players:GetPlayerFromCharacter(vhum.Parent)
  96. local baseply = game.Players:GetPlayerFromCharacter(plrchar)
  97. if enemply and enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
  98. return
  99. end
  100. if vhum.Parent:FindFirstChild("CharStats") then
  101. do
  102. local localdamage = damage * (plrchar.CharStats.Attack.Value / 1) / vhum.Parent.CharStats.Defense.Value
  103. local firedamage = localdamage / (vhum.Parent.CharStats.BurnResist.Value / 100 + 1)
  104. local totalloops = loops / (vhum.Parent.CharStats.BurnTime.Value / 100 + 1)
  105. local burnn = function(b)
  106. coroutine.resume(coroutine.create(b))
  107. end
  108. burnn(function()
  109. for i = 1, totalloops do
  110. if vhum.Health > 0 then
  111. if plrchar:findFirstChild("CharStats") then
  112. vhum.Health = vhum.Health - round(firedamage)
  113. guieffect(parent, vhum, firedamage, colour)
  114. check(vhum, plrchar, round(firedamage))
  115. wait(1)
  116. else
  117. vhum.Health = vhum.Health - round(firedamage)
  118. guieffect(parent, vhum, firedamage, colour)
  119. check(vhum, plrchar, round(firedamage))
  120. wait(1)
  121. end
  122. end
  123. end
  124. end)
  125. end
  126. else
  127. vhum.Health = vhum.Health - damage
  128. check(vhum, plrchar, damage)
  129. guieffect(parent, vhum, damage, colour)
  130. end
  131. end
  132. function basic.Venom(parent, vhum, damage, colour, loops)
  133. if not vhum or not vhum.Parent:FindFirstChild("Humanoid") or vhum.Health <= 0 then
  134. return
  135. end
  136. local plrchar = parent.Parent
  137. local plrhead = plrchar.Head
  138. local enemply = game.Players:GetPlayerFromCharacter(vhum.Parent)
  139. local baseply = game.Players:GetPlayerFromCharacter(plrchar)
  140. if enemply and enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
  141. return
  142. end
  143. if vhum.Parent:FindFirstChild("CharStats") then
  144. do
  145. local localdamage = damage * (plrchar.CharStats.Attack.Value / 1) / vhum.Parent.CharStats.Defense.Value
  146. local venomdamage = localdamage / (plrchar.CharStats.VenomResist.Value / 100 + 1)
  147. local totalloops = loops / (plrchar.CharStats.VenomTime.Value / 100 + 1)
  148. local venomm = function(v)
  149. coroutine.resume(coroutine.create(v))
  150. end
  151. venomm(function()
  152. for i = 1, totalloops do
  153. if vhum.Health > 0 then
  154. if plrchar:findFirstChild("CharStats") then
  155. vhum.Health = vhum.Health - round(venomdamage)
  156. guieffect(parent, vhum, venomdamage, colour)
  157. check(vhum, plrchar, round(venomdamage))
  158. wait(1)
  159. else
  160. vhum.Health = vhum.Health - round(venomdamage)
  161. guieffect(parent, vhum, venomdamage, colour)
  162. check(vhum, plrchar, round(venomdamage))
  163. wait(1)
  164. end
  165. end
  166. end
  167. end)
  168. end
  169. else
  170. vhum.Health = vhum.Health - damage
  171. check(vhum, plrchar, damage)
  172. guieffect(parent, vhum, damage, colour)
  173. end
  174. end
  175. function basic.Ice(parent, vhum, damage, colour, duration, speed)
  176. if not vhum or not vhum.Parent:FindFirstChild("Humanoid") or vhum.Health <= 0 then
  177. return
  178. end
  179. local plrchar = parent.Parent
  180. local plrhead = plrchar.Head
  181. local enemply = game.Players:GetPlayerFromCharacter(vhum.Parent)
  182. local baseply = game.Players:GetPlayerFromCharacter(plrchar)
  183. if enemply and enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
  184. return
  185. end
  186. if vhum.Parent:FindFirstChild("CharStats") then
  187. do
  188. local localdamage = damage * (plrchar.CharStats.Attack.Value / 1) / vhum.Parent.CharStats.Defense.Value
  189. local icedamage = localdamage / (plrchar.CharStats.IceResist.Value / 100 + 1)
  190. local iceduration = duration / (plrchar.CharStats.IceTime.Value / 100 + 1)
  191. if plrchar:findFirstChild("CharStats") then
  192. local icee = function(i)
  193. coroutine.resume(coroutine.create(i))
  194. end
  195. icee(function()
  196. vhum.Health = vhum.Health - round(icedamage)
  197. local speedvalue = plrchar:FindFirstChild("CharStats"):FindFirstChild("Speed")
  198. check(vhum, plrchar, round(icedamage))
  199. guieffect(parent, vhum, icedamage, colour)
  200. if speedvalue and speedvalue.Value > speed then
  201. speedvalue.Value = speedvalue.Value - speed
  202. wait(iceduration)
  203. speedvalue.Value = speedvalue.Value + speed
  204. end
  205. end)
  206. end
  207. end
  208. else
  209. vhum.Health = vhum.Health - damage
  210. check(vhum, plrchar, damage)
  211. guieffect(parent, vhum, damage, colour)
  212. end
  213. end
  214. function basic.Stun(parent, vhum, damage, colour, duration)
  215. if not vhum or not vhum.Parent:FindFirstChild("Humanoid") or vhum.Health <= 0 then
  216. return
  217. end
  218. local plrchar = parent.Parent
  219. local plrhead = plrchar.Head
  220. local enemply = game.Players:GetPlayerFromCharacter(vhum.Parent)
  221. local baseply = game.Players:GetPlayerFromCharacter(plrchar)
  222. if enemply and enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
  223. return
  224. end
  225. if vhum.Parent:FindFirstChild("CharStats") then
  226. do
  227. local localdamage = damage * (plrchar.CharStats.Attack.Value / 1) / vhum.Parent.CharStats.Defense.Value
  228. local stundamage = localdamage / (plrchar.CharStats.StunResist.Value / 100 + 1)
  229. local stunduration = duration / (plrchar.CharStats.StunTime.Value / 100 + 1)
  230. if plrchar:findFirstChild("CharStats") then
  231. local stunn = function(s)
  232. coroutine.resume(coroutine.create(s))
  233. end
  234. stunn(function()
  235. local prevspeed = vhum.Parent.CharStats.Speed.Value
  236. vhum.Parent.CharStats.Speed.Value = -100
  237. vhum.Parent.CharStats.Attacking.Value = true
  238. vhum.Health = vhum.Health - round(stundamage)
  239. check(vhum, plrchar, round(stundamage))
  240. guieffect(parent, vhum, stundamage, colour)
  241. wait(stunduration)
  242. vhum.Parent.CharStats.Attacking.Value = false
  243. vhum.Parent.CharStats.Speed.Value = prevspeed
  244. end)
  245. end
  246. end
  247. else
  248. vhum.Health = vhum.Health - damage
  249. check(vhum, plrchar, damage)
  250. guieffect(parent, vhum, damage, colour)
  251. end
  252. end
  253. function basic.Damage(parent, vhum, damage, colour)
  254. if not vhum or not vhum.Parent:FindFirstChild("Humanoid") or vhum.Health <= 0 then
  255. return
  256. end
  257. local plrchar = parent.Parent
  258. local plrhead = plrchar.Head
  259. local enemply = game.Players:GetPlayerFromCharacter(vhum.Parent)
  260. local baseply = game.Players:GetPlayerFromCharacter(plrchar)
  261. if enemply and enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
  262. return
  263. end
  264. if vhum.Parent:FindFirstChild("CharStats") then
  265. local localdamage = damage * (plrchar.CharStats.Attack.Value / 1) / vhum.Parent.CharStats.Defense.Value
  266. if plrchar:findFirstChild("CharStats") then
  267. vhum.Health = vhum.Health - localdamage
  268. check(vhum, plrchar, localdamage)
  269. guieffect(parent, vhum, localdamage, colour)
  270. end
  271. else
  272. vhum.Health = vhum.Health - damage
  273. check(vhum, plrchar, damage)
  274. guieffect(parent, vhum, damage, colour)
  275. end
  276. end
  277. function basic.Debuff(parent, vhum, colour, type, amount, last)
  278. local stat, statstr
  279. if not vhum or not vhum.Parent:FindFirstChild("Humanoid") or vhum.Health <= 0 then
  280. return
  281. end
  282. local plrchar = parent.Parent
  283. local plrhead = plrchar.Head
  284. local enemply = game.Players:GetPlayerFromCharacter(vhum.Parent)
  285. local baseply = game.Players:GetPlayerFromCharacter(plrchar)
  286. if enemply and enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
  287. return
  288. end
  289. if vhum.Parent:FindFirstChild("CharStats") then
  290. if type == "Attack" or type == "A" then
  291. stat = vhum.Parent.CharStats.Attack
  292. statstr = "Attack"
  293. elseif type == "Defense" or type == "D" or type == nil then
  294. stat = vhum.Parent.CharStats.Defense
  295. statstr = "Defense"
  296. elseif type == "Speed" or type == "S" then
  297. stat = vhum.Parent.CharStats.Speed
  298. statstr = "Speed"
  299. end
  300. spawn(function()
  301. stat.Value = stat.Value - amount
  302. wait(last)
  303. stat.Value = stat.Value + amount
  304. end)
  305. if plrchar:findFirstChild("CharStats") then
  306. guieffect(parent, vhum, 0, colour, "-" .. statstr, true)
  307. end
  308. end
  309. end
  310. function basic.Buff(parent, vhum, colour, type, amount, last)
  311. local stat, statstr
  312. if not vhum or not vhum.Parent:FindFirstChild("Humanoid") or vhum.Health <= 0 then
  313. return
  314. end
  315. local plrchar = parent.Parent
  316. local plrhead = plrchar.Head
  317. local enemply = game.Players:GetPlayerFromCharacter(vhum.Parent)
  318. local baseply = game.Players:GetPlayerFromCharacter(plrchar)
  319. if enemply and enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
  320. return
  321. end
  322. if vhum.Parent:FindFirstChild("CharStats") then
  323. if type == "Attack" or type == "A" then
  324. stat = vhum.Parent.CharStats.Attack
  325. statstr = "Attack"
  326. elseif type == "Defense" or type == "D" or type == nil then
  327. stat = vhum.Parent.CharStats.Defense
  328. statstr = "Defense"
  329. elseif type == "Speed" or type == "S" then
  330. stat = vhum.Parent.CharStats.Speed
  331. statstr = "Speed"
  332. end
  333. spawn(function()
  334. stat.Value = stat.Value + amount
  335. wait(last)
  336. stat.Value = stat.Value - amount
  337. end)
  338. if plrchar:findFirstChild("CharStats") then
  339. guieffect(parent, vhum, 0, colour, "+" .. statstr, true)
  340. end
  341. end
  342. end
  343. function basic.Heal(parent, vhum, heal, colour)
  344. if not vhum or not vhum.Parent:findFirstChild("Humanoid") or vhum.Health <= 0 then
  345. return
  346. end
  347. vhum.Health = vhum.Health + heal
  348. guieffect(parent, vhum, heal, colour)
  349. return basic
  350. end
  351. local uis = game:GetService("UserInputService")
  352. repeat
  353. wait()
  354. until plr.Character and plr.Character:WaitForChild("Torso") and plr.Character:WaitForChild("Humanoid")
  355. local char = plr.Character
  356. local charStats = Instance.new("Folder", char)
  357. charStats.Name = "CharStats"
  358. speed = Instance.new("NumberValue", charStats)
  359. speed.Name = "Speed"
  360. speed.Value = 10
  361. enr = Instance.new("NumberValue", charStats)
  362. enr.Name = "HealthRate"
  363. enr.Value = 5
  364. def = Instance.new("NumberValue", charStats)
  365. def.Name = "Defense"
  366. def.Value = 1
  367. Anim = nil
  368. cf = CFrame.new
  369. function c3(cz, cx, cc)
  370. return Color3.new(cz / 255, cx / 255, cc / 255)
  371. end
  372. angles = CFrame.Angles
  373. Player = game.Players.LocalPlayer
  374. Character = Player.Character
  375. Humanoid = Character.Humanoid
  376. mouse = Player:GetMouse()
  377. local LeftArm = Character["Left Arm"]
  378. RightArm = Character["Right Arm"]
  379. LeftLeg = Character["Left Leg"]
  380. RightLeg = Character["Right Leg"]
  381. Head = Character.Head
  382. Torso = Character.Torso
  383. RootPart = Character.HumanoidRootPart
  384. RootJoint = RootPart.RootJoint
  385. Humanoid.Animator:Destroy()
  386. Character.Animate:Destroy()
  387. NeckCF = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  388. RootCF = angles(-1.57, 0, 3.14)
  389. LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  390. LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  391. RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  392. RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  393. RW = Instance.new("Weld")
  394. LW = Instance.new("Weld")
  395. RH = Torso["Right Hip"]
  396. LH = Torso["Left Hip"]
  397. Neck = Torso.Neck
  398. RSH = Torso["Right Shoulder"]
  399. LSH = Torso["Left Shoulder"]
  400. RSH.Parent = nil
  401. LSH.Parent = nil
  402. RW.Name = "Right Shoulder"
  403. RW.Part0 = Torso
  404. RW.C0 = cf(1.5, 0.5, 0)
  405. RW.C1 = cf(0, 0.5, 0)
  406. RW.Part1 = RightArm
  407. RW.Parent = Torso
  408. LW.Name = "Left Shoulder"
  409. LW.Part0 = Torso
  410. LW.C0 = cf(-1.5, 0.5, 0)
  411. LW.C1 = cf(0, 0.5, 0)
  412. LW.Part1 = LeftArm
  413. LW.Parent = Torso
  414. Effects = Instance.new("Model", Character)
  415. Effects.Name = "Effects"
  416. local attacking = Instance.new("BoolValue", charStats)
  417. attacking.Name = "Attacking"
  418. attacking.Value = false
  419. sine = 0
  420. attackcounter = 1
  421. torvel = nil
  422. hitfloor, posfloor = nil, nil
  423. partEffects = {}
  424. cc = ""
  425. comboiing = false
  426. ccval = Instance.new("StringValue", charStats)
  427. ccval.Name = "KeySequence"
  428. cooldown = 0
  429. cooldown_duration = 0.2
  430. attack1s = "wadq"
  431. attack1n = "Cold Divinity"
  432. attack1e = 50
  433. attack2s = "sadq"
  434. attack2n = "Hailstorm"
  435. attack2e = 50
  436. attack3s = "asdq"
  437. attack3n = "Minus K"
  438. attack3e = 50
  439. attack4s = "dsadq"
  440. attack4n = "Frost King"
  441. attack4e = 75
  442. attack5s = "wwq"
  443. attack5n = "Frost Breeze"
  444. attack5e = 25
  445. attack6s = "ssq"
  446. attack6n = "Reside"
  447. attack6e = 25
  448. function rayCast(Pos, Dir, Max, Ignore)
  449. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  450. end
  451. function thread(f)
  452. coroutine.resume(coroutine.create(f))
  453. end
  454. ArtificialHB = Instance.new("BindableEvent", script)
  455. ArtificialHB.Name = "Heartbeat"
  456. script:WaitForChild("Heartbeat")
  457. frame = 0.025
  458. tf = 0
  459. allowframeloss = true
  460. tossremainder = false
  461. lastframe = tick()
  462. script.Heartbeat:Fire()
  463. game:GetService("RunService").Heartbeat:connect(function(s, p)
  464. tf = tf + s
  465. if tf >= frame then
  466. if allowframeloss then
  467. script.Heartbeat:Fire()
  468. lastframe = tick()
  469. else
  470. for i = 1, math.floor(tf / frame) do
  471. script.Heartbeat:Fire()
  472. end
  473. lastframe = tick()
  474. end
  475. if tossremainder then
  476. tf = 0
  477. else
  478. tf = tf - frame * math.floor(tf / frame)
  479. end
  480. end
  481. end)
  482. function swait(num)
  483. if num == 0 or num == nil then
  484. ArtificialHB.Event:wait()
  485. else
  486. for i = 0, num do
  487. ArtificialHB.Event:wait()
  488. end
  489. end
  490. end
  491. function sound(id, par, vol, dur, pit)
  492. coroutine.resume(coroutine.create(function()
  493. local sou = Instance.new("Sound", par or workspace)
  494. sou.Volume = vol
  495. sou.Pitch = pit or 1
  496. sou.SoundId = "http://www.roblox.com/asset/?id=" .. id
  497. swait()
  498. sou:play()
  499. wait(dur)
  500. sou:Destroy()
  501. end))
  502. end
  503. local function MagicBlock(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type, parent)
  504. local part = function(formfactor, parent, reflectance, transparency, brickcolor, name, size)
  505. local fp = Instance.new("Part")
  506. fp.formFactor = formfactor
  507. fp.Parent = Effects
  508. fp.Reflectance = reflectance
  509. fp.Transparency = transparency
  510. fp.CanCollide = false
  511. fp.Locked = true
  512. fp.BrickColor = brickcolor
  513. fp.Name = name
  514. fp.Size = size
  515. fp.Position = Torso.Position
  516. NoOutline(fp)
  517. fp.Material = "SmoothPlastic"
  518. fp:BreakJoints()
  519. return fp
  520. end
  521. local prt = part(3, char, 0, 0, brickcolor, "Effect", Vector3.new())
  522. prt.Anchored = true
  523. prt.CFrame = cframe
  524. local msh = mesh("BlockMesh", prt, "", nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  525. return prt, msh
  526. end
  527. function clerp(a, b, t)
  528. local qa = {
  529. QuaternionFromCFrame(a)
  530. }
  531. local qb = {
  532. QuaternionFromCFrame(b)
  533. }
  534. local ax, ay, az = a.x, a.y, a.z
  535. local bx, by, bz = b.x, b.y, b.z
  536. local _t = 1 - t
  537. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  538. end
  539. function QuaternionFromCFrame(cf)
  540. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  541. local trace = m00 + m11 + m22
  542. if trace > 0 then
  543. local s = math.sqrt(1 + trace)
  544. local recip = 0.5 / s
  545. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  546. else
  547. local i = 0
  548. if m00 < m11 then
  549. i = 1
  550. end
  551. if m22 > (i == 0 and m00 or m11) then
  552. i = 2
  553. end
  554. if i == 0 then
  555. local s = math.sqrt(m00 - m11 - m22 + 1)
  556. local recip = 0.5 / s
  557. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  558. elseif i == 1 then
  559. local s = math.sqrt(m11 - m22 - m00 + 1)
  560. local recip = 0.5 / s
  561. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  562. elseif i == 2 then
  563. local s = math.sqrt(m22 - m00 - m11 + 1)
  564. local recip = 0.5 / s
  565. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  566. end
  567. end
  568. end
  569. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  570. local xs, ys, zs = x + x, y + y, z + z
  571. local wx, wy, wz = w * xs, w * ys, w * zs
  572. local xx = x * xs
  573. local xy = x * ys
  574. local xz = x * zs
  575. local yy = y * ys
  576. local yz = y * zs
  577. local zz = z * zs
  578. 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))
  579. end
  580. function QuaternionSlerp(a, b, t)
  581. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  582. local startInterp, finishInterp
  583. if cosTheta >= 1.0E-4 then
  584. if 1 - cosTheta > 1.0E-4 then
  585. local theta = math.acos(cosTheta)
  586. local invSinTheta = 1 / math.sin(theta)
  587. startInterp = math.sin((1 - t) * theta) * invSinTheta
  588. finishInterp = math.sin(t * theta) * invSinTheta
  589. else
  590. startInterp = 1 - t
  591. finishInterp = t
  592. end
  593. elseif 1 + cosTheta > 1.0E-4 then
  594. local theta = math.acos(-cosTheta)
  595. local invSinTheta = 1 / math.sin(theta)
  596. startInterp = math.sin((t - 1) * theta) * invSinTheta
  597. finishInterp = math.sin(t * theta) * invSinTheta
  598. else
  599. startInterp = t - 1
  600. finishInterp = t
  601. end
  602. 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
  603. end
  604. function round(num)
  605. local a, b = math.modf(num)
  606. if num % 1 ~= 0 then
  607. return math.floor(num) + math.floor(b * 10 + 0.5) / 10
  608. else
  609. return math.floor(num)
  610. end
  611. end
  612. function NoOutline(Part)
  613. Part.TopSurface, Part.BottomSurface, Part.LeftSurface, Part.RightSurface, Part.FrontSurface, Part.BackSurface = 10, 10, 10, 10, 10, 10
  614. end
  615. function newPart(parent, brickcolor, transparency, anchored, cancollide, size, name)
  616. local fp = Instance.new("Part")
  617. fp.Parent = parent
  618. fp.Transparency = transparency
  619. fp.Anchored = anchored
  620. fp.CanCollide = cancollide
  621. fp.Locked = true
  622. fp.BrickColor = brickcolor
  623. fp.Name = name
  624. fp.Size = size
  625. fp.Position = Torso.Position
  626. NoOutline(fp)
  627. fp.Material = "SmoothPlastic"
  628. fp:BreakJoints()
  629. return fp
  630. end
  631. function randomangles()
  632. local random = math.rad((math.random() - 0.5) * 180)
  633. local randomangles = CFrame.Angles(random, random, random)
  634. return randomangles
  635. end
  636. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  637. local mesh = Instance.new(Mesh)
  638. mesh.Parent = part
  639. if Mesh == "SpecialMesh" then
  640. mesh.MeshType = meshtype
  641. if meshid then
  642. mesh.MeshId = "http://www.roblox.com/asset/?id=" .. meshid
  643. end
  644. end
  645. if offset then
  646. mesh.Offset = offset
  647. end
  648. mesh.Scale = scale
  649. return mesh
  650. end
  651. function weld(parent, part0, part1, c0)
  652. local weld = Instance.new("Weld")
  653. weld.Parent = parent
  654. weld.Part0 = part0
  655. weld.Part1 = part1
  656. weld.C0 = c0
  657. return weld
  658. end
  659. function findCloseHumanoid(centre, distance)
  660. local tab = {}
  661. for _, child in pairs(game.Workspace:GetChildren()) do
  662. if child:findFirstChild("Humanoid") and child:findFirstChild("Humanoid") ~= Humanoid and child:findFirstChild("Torso") then
  663. local vtors = child.Torso
  664. local mag = math.abs((vtors.Position - centre).magnitude)
  665. if distance >= mag then
  666. table.insert(tab, child.Humanoid)
  667. end
  668. end
  669. end
  670. return tab
  671. end
  672. function attackone()
  673. attacking.Value = true
  674. for i = 0, 1, 0.05 do
  675. swait()
  676. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(0.1, 0, math.rad(-80)), 0.15)
  677. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(80)), 0.15)
  678. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(0, 0, math.rad(10)), 0.15)
  679. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.15)
  680. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(0, math.rad(90), 0), 0.15)
  681. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(0, -math.rad(90), 0), 0.15)
  682. end
  683. attacking.Value = false
  684. end
  685. function attacktwo()
  686. attacking.Value = true
  687. for i = 0, 1, 0.1 do
  688. swait()
  689. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(0.1, 0, math.rad(-45)), 0.15)
  690. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(-0.1, 0, math.rad(45)), 0.15)
  691. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(1.57, 0, 0), 0.15)
  692. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(0, 0, -1.57), 0.15)
  693. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(0, math.rad(90), 0), 0.15)
  694. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(0, -math.rad(90), 0), 0.15)
  695. end
  696. local cylinder = newPart(Effects, BrickColor.new("White"), 0.5, false, false, Vector3.new(), "Part")
  697. cylinder.Material = "Ice"
  698. mesh("CylinderMesh", cylinder, nil, nil, Vector3.new(0, -3, 0), Vector3.new(150, 1, 150))
  699. weld(RootPart, cylinder, RootPart, CFrame.new(0, 0, 0))
  700. local guipart = newPart(Effects, BrickColor.White(), 1, true, false, Vector3.new(30, 0.2, 30), "Part")
  701. local csg = Instance.new("SurfaceGui", guipart)
  702. csg.Face = "Top"
  703. local imagelabel = Instance.new("ImageLabel", csg)
  704. imagelabel.ImageColor3 = Color3.new(1, 1, 1)
  705. imagelabel.BackgroundTransparency = 1
  706. imagelabel.Image = "http://www.roblox.com/asset/?id=563690229"
  707. imagelabel.Size = UDim2.new(1, 0, 1, 0)
  708. local p0 = newPart(Effects, BrickColor.new("Institutional white"), 0.1, false, false, Vector3.new(), "Part")
  709. p0.CFrame = RootPart.CFrame * CFrame.new(0, 0, -5)
  710. p0.Material = "Neon"
  711. local m0 = mesh("SpecialMesh", p0, "FileMesh", "1051557", Vector3.new(0, 6, 0), Vector3.new(30, 30, 30))
  712. local w0 = weld(RootPart, p0, RootPart, CFrame.new(0, 0, 0))
  713. local normcount = 0
  714. for i = 0, 3, 0.05 do
  715. swait()
  716. local hums = findCloseHumanoid(RootPart.Position, 30)
  717. if normcount % 10 == 0 then
  718. for i, v in pairs(hums) do
  719. basic.Damage(Effects, v, math.random(2, 3), c3(243, 242, 242))
  720. end
  721. end
  722. for i, v in pairs(hums) do
  723. v.Parent.Torso.Velocity = RootPart.Velocity / 1.5 + Vector3.new(math.random(-10, 10), 0, math.random(-10, 10))
  724. end
  725. w0.C0 = w0.C0 * CFrame.Angles(0, math.rad(i * 6), 0)
  726. local mb = MagicBlock(BrickColor.new("Institutional white"), RootPart.CFrame * CFrame.new(math.random(-25, 25), math.random(-3, -3), math.random(-25, 25)) * CFrame.Angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 4, 4, 4, 4, 4, 4, 0.05, 2, Part)
  727. mb.Material = "Neon"
  728. mb.Size = Vector3.new(5, 5, 5)
  729. local m = mesh("BlockMesh", mb, nil, nil, Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
  730. table.insert(partEffects, {
  731. mb,
  732. "MoveDisappear",
  733. 0.05,
  734. 0,
  735. 0.1,
  736. 0
  737. })
  738. guipart.CFrame = RootPart.CFrame * CFrame.new(0, -3, 0) * CFrame.Angles(0, math.rad(i * -40), 0)
  739. RootPart.Velocity = RootPart.CFrame.lookVector * 45
  740. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(0.1, 0, math.rad(-45)), 0.15)
  741. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0.1, 0, math.rad(45) + 0.1 * -i * 67), 0.15)
  742. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(1.57, 0, 0.785), 0.15)
  743. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-0.785, 0, -1.57), 0.15)
  744. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(0, math.rad(90), 0), 0.15)
  745. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(0, -math.rad(90), 0), 0.15)
  746. normcount = normcount + 1
  747. end
  748. table.insert(partEffects, {
  749. cylinder,
  750. "Disappear",
  751. 0.05,
  752. 0,
  753. 0,
  754. 0
  755. })
  756. table.insert(partEffects, {
  757. p0,
  758. "Disappear",
  759. 0.05,
  760. 0,
  761. 0,
  762. 0
  763. })
  764. table.insert(partEffects, {
  765. guipart,
  766. "Disappear",
  767. 0.05,
  768. 0,
  769. 0,
  770. 0
  771. })
  772. attacking.Value = false
  773. end
  774. function attackthree()
  775. attacking.Value = true
  776. local guipart = newPart(Effects, BrickColor.White(), 1, true, false, Vector3.new(40, 0.2, 40), "Part")
  777. local csg = Instance.new("SurfaceGui", guipart)
  778. csg.Face = "Top"
  779. local imagelabel = Instance.new("ImageLabel", csg)
  780. imagelabel.ImageColor3 = Color3.new(1, 1, 1)
  781. imagelabel.BackgroundTransparency = 1
  782. imagelabel.Image = "http://www.roblox.com/asset/?id=563690229"
  783. imagelabel.Size = UDim2.new(1, 0, 1, 0)
  784. for i = 0, 1, 0.05 do
  785. swait()
  786. guipart.CFrame = RootPart.CFrame * CFrame.new(0, -3, 0) * CFrame.Angles(0, math.rad(i * -40), 0)
  787. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(5), 0, math.rad(0)), 0.15)
  788. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(15), 0, math.rad(0)), 0.15)
  789. RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, 0.2) * CFrame.Angles(math.rad(90), 0, -math.rad(45)), 0.15)
  790. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, 0) * CFrame.Angles(math.rad(90), 0, math.rad(45)), 0.15)
  791. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(15), math.rad(80), 0), 0.15)
  792. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0.2) * CFrame.Angles(math.rad(15), -math.rad(80), 0), 0.15)
  793. end
  794. local p1 = newPart(Effects, BrickColor.new("White"), 0, true, false, Vector3.new(0.2, 0.2, 0.2), "Part")
  795. p1.CFrame = RootPart.CFrame * CFrame.new(0, 0, 0)
  796. p1.Material = "Neon"
  797. local m1 = mesh("SpecialMesh", p1, "Sphere", nil, nil, Vector3.new(100, 100, 100))
  798. local p2 = newPart(Effects, BrickColor.new("Lily white"), 0.1, true, false, Vector3.new(0.2, 0.2, 0.2), "Part")
  799. p2.CFrame = RootPart.CFrame * CFrame.new(0, 0, 0)
  800. p2.Material = "SmoothPlastic"
  801. local m2 = mesh("SpecialMesh", p2, "Sphere", nil, nil, Vector3.new(120, 120, 120))
  802. weld(p1, p2, p1, CFrame.new(0, 0, 0))
  803. local now = RootPart.CFrame * CFrame.new(0, 0, 0)
  804. thread(function()
  805. for i = 1, 40 do
  806. swait()
  807. m1.Scale = m1.Scale + Vector3.new(5, 5, 5)
  808. p1.Transparency = p1.Transparency + 0.025
  809. p1.CFrame = now
  810. m2.Scale = m2.Scale + Vector3.new(1, 1, 1)
  811. p2.Transparency = p2.Transparency + 0.025
  812. p2.CFrame = now
  813. end
  814. p1:Destroy()
  815. p2:Destroy()
  816. end)
  817. for i, v in pairs(findCloseHumanoid(RootPart.Position, 40)) do
  818. do
  819. local enemply = game.Players:GetPlayerFromCharacter(v.Parent)
  820. local baseply = Player
  821. if enemply then
  822. if enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
  823. basic.Buff(Effects, v, Color3.new(0, 0, 0), "Defense", 0.2, 5)
  824. else
  825. basic.Debuff(Effects, v, Color3.new(0, 0, 0), "Defense", 0.2, 5)
  826. spawn(function()
  827. for i = 1, math.random(2, 3) do
  828. basic.Damage(Effects, v, math.random(5, 8), BrickColor.new("White").Color)
  829. wait(1)
  830. end
  831. end)
  832. end
  833. elseif not enemply then
  834. spawn(function()
  835. for i = 1, math.random(2, 3) do
  836. basic.Damage(Effects, v, math.random(5, 8), BrickColor.new("White").Color)
  837. wait(1)
  838. end
  839. end)
  840. end
  841. end
  842. end
  843. for i = 0, 1, 0.05 do
  844. swait()
  845. for i = 1, 2 do
  846. local mb = MagicBlock(BrickColor.new("Institutional white"), RootPart.CFrame * CFrame.new(math.random(-15, 15), math.random(-3, 15), math.random(-15, 15)) * CFrame.Angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 4, 4, 4, 4, 4, 4, 0.05, 2, Part)
  847. mb.Material = "Neon"
  848. local m = mesh("BlockMesh", mb, nil, nil, Vector3.new(0, 0, 0), Vector3.new(10, 10, 10))
  849. table.insert(partEffects, {
  850. mb,
  851. "MoveDisappear",
  852. 0.05,
  853. 0,
  854. 0.1,
  855. 0
  856. })
  857. end
  858. guipart.CFrame = RootPart.CFrame * CFrame.new(0, -3, 0) * CFrame.Angles(0, math.rad(i * -40), 0)
  859. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-15), 0, math.rad(0)), 0.3)
  860. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(-15), 0, math.rad(0)), 0.3)
  861. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(0, 0, math.rad(100)), 0.3)
  862. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2)
  863. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(0, 0, math.rad(-100)), 0.3)
  864. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2)
  865. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-15), math.rad(80), 0), 0.3)
  866. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0.2) * CFrame.Angles(math.rad(-15), -math.rad(80), 0), 0.3)
  867. end
  868. table.insert(partEffects, {
  869. guipart,
  870. "Disappear",
  871. 0.05,
  872. 0,
  873. 0,
  874. 0
  875. })
  876. attacking.Value = false
  877. end
  878. function attackfour()
  879. attacking.Value = true
  880. wait(2)
  881. attacking.Value = false
  882. end
  883. function noenergy()
  884. thread(function()
  885. energylabel.Text = "NO ENERGY!"
  886. wait(0.3)
  887. energylabel.Text = ""
  888. end)
  889. end
  890. function updateAttack(name, energy)
  891. attacklabel.Text = name
  892. if energy <= 0 or energy == nil then
  893. energylabel.Text = ""
  894. return
  895. end
  896. charStats.EnergyAmount.Value = charStats.EnergyAmount.Value - energy
  897. energylabel.Text = "-" .. tostring(energy)
  898. end
  899. function performAttack(sequence)
  900. if attacking.Value == false then
  901. if sequence == attack1s then
  902. if charStats.EnergyAmount.Value < attack1e then
  903. noenergy()
  904. return
  905. end
  906. updateAttack(attack1n, attack1e)
  907. attackone()
  908. updateAttack("-", 0)
  909. end
  910. if sequence == attack2s then
  911. if charStats.EnergyAmount.Value < attack2e then
  912. noenergy()
  913. return
  914. end
  915. updateAttack(attack2n, attack2e)
  916. attacktwo()
  917. updateAttack("-", 0)
  918. end
  919. if sequence == attack3s then
  920. if charStats.EnergyAmount.Value < attack3e then
  921. noenergy()
  922. return
  923. end
  924. updateAttack(attack3n, attack3e)
  925. attackthree()
  926. updateAttack("-", 0)
  927. end
  928. if sequence == attack4s then
  929. if charStats.EnergyAmount.Value < attack4e then
  930. noenergy()
  931. return
  932. end
  933. updateAttack(attack4n, attack4e)
  934. attackfour()
  935. updateAttack("-", 0)
  936. end
  937. end
  938. end
  939. atknum = 0
  940. PlayerMouse = plr:GetMouse()
  941. function ComboAttack()
  942. if attacking.Value == false then
  943. attacking.Value = true
  944. if atknum == 0 then
  945. attacktwo()
  946. elseif atknum == 1 then
  947. attackthree()
  948. end
  949. if atknum < 1 then
  950. atknum = atknum + 1
  951. else
  952. atknum = 0
  953. end
  954. attacking.Value = false
  955. end
  956. end
  957. PlayerMouse.Button1Down:connect(ComboAttack)
  958. thread(function()
  959. while true do
  960. swait()
  961. sine = sine + 1
  962. local torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  963. local hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, char)
  964. if 1 < RootPart.Velocity.y and hitfloor == nil then
  965. if attacking.Value == false then
  966. Anim = "Jump"
  967. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-15), 0, math.rad(0)), 0.1)
  968. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2)
  969. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2)
  970. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2)
  971. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.2)
  972. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.2)
  973. end
  974. elseif RootPart.Velocity.y < -1 and hitfloor == nil then
  975. if attacking.Value == false then
  976. Anim = "Fall"
  977. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(23), 0, 0), 0.2)
  978. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2)
  979. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2)
  980. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2)
  981. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(24), math.rad(90), 0), 0.2)
  982. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(-12), -math.rad(90), 0), 0.2)
  983. end
  984. elseif torvel < 1 and hitfloor ~= nil then
  985. if attacking.Value == false then
  986. Anim = "Idle"
  987. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(5), 0, math.rad(25)), 0.1)
  988. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(-25)) * CFrame.new(0, 0, 0.1 * math.cos(sine / 25)), 0.1)
  989. RW.C0 = clerp(RW.C0, CFrame.new(0.9, 0.4 - 0.1 * math.cos(sine / 15), -0.575) * CFrame.Angles(math.rad(105), 0, math.rad(-95)), 0.2)
  990. LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.3 - 0.1 * math.cos(sine / 15), -0.6) * CFrame.Angles(math.rad(75), 0, math.rad(75)), 0.2)
  991. RH.C0 = clerp(RH.C0, CFrame.new(1, -1 - 0.1 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(5), math.rad(85), 0), 0.2)
  992. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1 - 0.1 * math.cos(sine / 25), 0.1) * CFrame.Angles(math.rad(-5), -math.rad(85), 0), 0.2)
  993. end
  994. elseif torvel > 2 and hitfloor ~= nil and attacking.Value == false then
  995. Anim = "Walk"
  996. Neck.C0 = clerp(Neck.C0, NeckCF, 0.1)
  997. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, 0.1 * math.cos(sine / 25)) * CFrame.Angles(math.rad(5), 0, 0), 0.1)
  998. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * CFrame.Angles(0, 0, math.rad(5)), 0.2)
  999. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * CFrame.Angles(0, 0, math.rad(-5)), 0.2)
  1000. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.cos(sine * 1.2 / 8), math.rad(90), 0), 0.3)
  1001. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(-math.cos(sine * 1.2 / 8), -math.rad(90), 0), 0.3)
  1002. end
  1003. if 0 < #partEffects then
  1004. for e = 1, #partEffects do
  1005. if partEffects[e] ~= nil then
  1006. local Thing = partEffects[e]
  1007. if Thing ~= nil then
  1008. local Part = Thing[1]
  1009. local Mode = Thing[2]
  1010. local Delay = Thing[3]
  1011. local IncX = Thing[4]
  1012. local IncY = Thing[5]
  1013. local IncZ = Thing[6]
  1014. if 1 >= Thing[1].Transparency then
  1015. if Thing[2] == "Block1" then
  1016. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1017. local Mesh = Thing[1].Mesh
  1018. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1019. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1020. elseif Thing[2] == "Block2" then
  1021. Thing[1].CFrame = Thing[1].CFrame
  1022. local Mesh = Thing[7]
  1023. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1024. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1025. elseif Thing[2] == "Cylinder" then
  1026. local Mesh = Thing[1].Mesh
  1027. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1028. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1029. elseif Thing[2] == "Blood" then
  1030. local Mesh = Thing[7]
  1031. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
  1032. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1033. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1034. elseif Thing[2] == "Elec" then
  1035. local Mesh = Thing[1].Mesh
  1036. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1037. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1038. elseif Thing[2] == "Disappear" then
  1039. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1040. elseif Thing[2] == "Shatter" then
  1041. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1042. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1043. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1044. Thing[6] = Thing[6] + Thing[5]
  1045. elseif Thing[2] == "MoveDisappear" then
  1046. Part.Transparency = Part.Transparency + Thing[3]
  1047. Part.CFrame = CFrame.new(Part.CFrame.X + IncX, Part.CFrame.Y + IncY, Part.CFrame.Z + IncZ) * randomangles()
  1048. end
  1049. else
  1050. Part:Destroy()
  1051. table.remove(partEffects, e)
  1052. end
  1053. end
  1054. end
  1055. end
  1056. end
  1057. end
  1058. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement