Advertisement
memberhero

lightingscript.avi

Dec 15th, 2017
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.66 KB | None | 0 0
  1. --[[Edited by Raven_Cale]]--
  2. wait(1 / 60)
  3. Effects = { }
  4. local Player = game.Players.localPlayer
  5. local Character = Player.Character
  6. local Humanoid = Character.Humanoid
  7. local Mouse = Player:GetMouse()
  8. local LeftArm = Character["Left Arm"]
  9. local RightArm = Character["Right Arm"]
  10. local LeftLeg = Character["Left Leg"]
  11. local RightLeg = Character["Right Leg"]
  12. local Head = Character.Head
  13. local Torso = Character.Torso
  14. local Camera = game.Workspace.CurrentCamera
  15. local RootPart = Character.HumanoidRootPart
  16. local RootJoint = RootPart.RootJoint
  17. local attack = false
  18. local Anim = 'Idle'
  19. local attacktype = 1
  20. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  21. local velocity = RootPart.Velocity.y
  22. local sine = 0
  23. local change = 1
  24. local Create = LoadLibrary("RbxUtility").Create
  25.  
  26. local m = Create("Model"){
  27. Parent = Character,
  28. Name = "WeaponModel",
  29. }
  30.  
  31. Humanoid.Animator.Parent = nil
  32. Character.Animate.Parent = nil
  33.  
  34. local newMotor = function(part0, part1, c0, c1)
  35. local w = Create('Motor'){
  36. Parent = part0,
  37. Part0 = part0,
  38. Part1 = part1,
  39. C0 = c0,
  40. C1 = c1,
  41. }
  42. return w
  43. end
  44.  
  45. function clerp(a, b, t)
  46. return a:lerp(b, t)
  47. end
  48.  
  49. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  50. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  51.  
  52. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  53. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  54. local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  55. local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  56. RootJoint.C1 = CFrame.new(0, 0, 0)
  57. RootJoint.C0 = CFrame.new(0, 0, 0)
  58. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  59. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  60.  
  61. local rarmc1 = RW.C1
  62. local larmc1 = LW.C1
  63. local rlegc1 = RH.C1
  64. local llegc1 = LH.C1
  65.  
  66. local resetc1 = false
  67.  
  68. function PlayAnimationFromTable(table, speed, bool)
  69. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  70. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  71. RW.C0 = clerp(RW.C0, table[3], speed)
  72. LW.C0 = clerp(LW.C0, table[4], speed)
  73. RH.C0 = clerp(RH.C0, table[5], speed)
  74. LH.C0 = clerp(LH.C0, table[6], speed)
  75. if bool == true then
  76. if resetc1 == false then
  77. resetc1 = true
  78. RootJoint.C1 = RootJoint.C1
  79. Torso.Neck.C1 = Torso.Neck.C1
  80. RW.C1 = rarmc1
  81. LW.C1 = larmc1
  82. RH.C1 = rlegc1
  83. LH.C1 = llegc1
  84. end
  85. end
  86. end
  87.  
  88. ArtificialHB = Create("BindableEvent", script){
  89. Parent = script,
  90. Name = "Heartbeat",
  91. }
  92.  
  93. script:WaitForChild("Heartbeat")
  94.  
  95. frame = 1 / 30
  96. tf = 0
  97. allowframeloss = false
  98. tossremainder = false
  99. lastframe = tick()
  100. script.Heartbeat:Fire()
  101.  
  102. game:GetService("RunService").Heartbeat:connect(function(s, p)
  103. tf = tf + s
  104. if tf >= frame then
  105. if allowframeloss then
  106. script.Heartbeat:Fire()
  107. lastframe = tick()
  108. else
  109. for i = 1, math.floor(tf / frame) do
  110. script.Heartbeat:Fire()
  111. end
  112. lastframe = tick()
  113. end
  114. if tossremainder then
  115. tf = 0
  116. else
  117. tf = tf - frame * math.floor(tf / frame)
  118. end
  119. end
  120. end)
  121.  
  122. function swait(num)
  123. if num == 0 or num == nil then
  124. ArtificialHB.Event:wait()
  125. else
  126. for i = 0, num do
  127. ArtificialHB.Event:wait()
  128. end
  129. end
  130. end
  131.  
  132. function RemoveOutlines(part)
  133. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  134. end
  135.  
  136. CFuncs = {
  137. Part = {
  138. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  139. local Part = Create("Part"){
  140. Parent = Parent,
  141. Reflectance = Reflectance,
  142. Transparency = Transparency,
  143. CanCollide = false,
  144. Locked = true,
  145. BrickColor = BrickColor.new(tostring(BColor)),
  146. Name = Name,
  147. Size = Size,
  148. Material = Material,
  149. }
  150. RemoveOutlines(Part)
  151. return Part
  152. end;
  153. };
  154.  
  155. Mesh = {
  156. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  157. local Msh = Create(Mesh){
  158. Parent = Part,
  159. Offset = OffSet,
  160. Scale = Scale,
  161. }
  162. if Mesh == "SpecialMesh" then
  163. Msh.MeshType = MeshType
  164. Msh.MeshId = MeshId
  165. end
  166. return Msh
  167. end;
  168. };
  169.  
  170. Weld = {
  171. Create = function(Parent, Part0, Part1, C0, C1)
  172. local Weld = Create("Weld"){
  173. Parent = Parent,
  174. Part0 = Part0,
  175. Part1 = Part1,
  176. C0 = C0,
  177. C1 = C1,
  178. }
  179. return Weld
  180. end;
  181. };
  182.  
  183. Sound = {
  184. Create = function(id, par, vol, pit)
  185. coroutine.resume(coroutine.create(function()
  186. local Sound = Create("Sound"){
  187. Volume = vol,
  188. Pitch = pit or 1,
  189. SoundId = "rbxassetid://" .. id,
  190. Parent = par or workspace,
  191. }
  192. Sound:play()
  193. game:GetService("Debris"):AddItem(Sound, 10)
  194. end))
  195. end;
  196. };
  197.  
  198. Decal = {
  199. Create = function(Color, Texture, Transparency, Name, Parent)
  200. local Decal = Create("Decal"){
  201. Color3 = Color,
  202. Texture = "rbxassetid://" .. Texture,
  203. Transparency = Transparency,
  204. Name = Name,
  205. Parent = Parent,
  206. }
  207. return Decal
  208. end;
  209. };
  210.  
  211. BillboardGui = {
  212. Create = function(Parent, Image, Position, Size)
  213. local BillPar = CFuncs.Part.Create(Parent, "SmoothPlastic", 0, 1, BrickColor.new("Black"), "BillboardGuiPart", Vector3.new(1, 1, 1))
  214. BillPar.CFrame = CFrame.new(Position)
  215. local Bill = Create("BillboardGui"){
  216. Parent = BillPar,
  217. Adornee = BillPar,
  218. Size = UDim2.new(1, 0, 1, 0),
  219. SizeOffset = Vector2.new(Size, Size),
  220. }
  221. local d = Create("ImageLabel", Bill){
  222. Parent = Bill,
  223. BackgroundTransparency = 1,
  224. Size = UDim2.new(1, 0, 1, 0),
  225. Image = "rbxassetid://" .. Image,
  226. }
  227. return BillPar
  228. end
  229. };
  230.  
  231. ParticleEmitter = {
  232. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  233. local Particle = Create("ParticleEmitter"){
  234. Parent = Parent,
  235. Color = ColorSequence.new(Color1, Color2),
  236. LightEmission = LightEmission,
  237. Size = Size,
  238. Texture = Texture,
  239. Transparency = Transparency,
  240. ZOffset = ZOffset,
  241. Acceleration = Accel,
  242. Drag = Drag,
  243. LockedToPart = LockedToPart,
  244. VelocityInheritance = VelocityInheritance,
  245. EmissionDirection = EmissionDirection,
  246. Enabled = Enabled,
  247. Lifetime = LifeTime,
  248. Rate = Rate,
  249. Rotation = Rotation,
  250. RotSpeed = RotSpeed,
  251. Speed = Speed,
  252. VelocitySpread = VelocitySpread,
  253. }
  254. return Particle
  255. end;
  256. };
  257.  
  258. CreateTemplate = {
  259.  
  260. };
  261. }
  262.  
  263. function rayCast(Position, Direction, Range, Ignore)
  264. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  265. end
  266.  
  267. FindNearestTorso = function(pos)
  268. local list = (game.Workspace:children())
  269. local torso = nil
  270. local dist = 1000
  271. local temp, human, temp2 = nil, nil, nil
  272. for x = 1, #list do
  273. temp2 = list[x]
  274. if temp2.className == "Model" and temp2.Name ~= Character.Name then
  275. temp = temp2:findFirstChild("Torso")
  276. human = temp2:findFirstChild("Humanoid")
  277. if temp ~= nil and human ~= nil and human.Health > 0 and (temp.Position - pos).magnitude < dist then
  278. local dohit = true
  279. if dohit == true then
  280. torso = temp
  281. dist = (temp.Position - pos).magnitude
  282. end
  283. end
  284. end
  285. end
  286. return torso, dist
  287. end
  288.  
  289. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  290. if hit.Parent == nil then
  291. return
  292. end
  293. local h = hit.Parent:FindFirstChild("Humanoid")
  294. for _, v in pairs(hit.Parent:children()) do
  295. if v:IsA("Humanoid") then
  296. h = v
  297. end
  298. end
  299. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  300. if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  301. if hit.Parent.DebounceHit.Value == true then
  302. return
  303. end
  304. end
  305. local c = Create("ObjectValue"){
  306. Name = "creator",
  307. Value = game:service("Players").LocalPlayer,
  308. Parent = h,
  309. }
  310. game:GetService("Debris"):AddItem(c, .5)
  311. if HitSound ~= nil and HitPitch ~= nil then
  312. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  313. end
  314. local Damage = math.random(minim, maxim)
  315. local blocked = false
  316. local block = hit.Parent:findFirstChild("Block")
  317. if block ~= nil then
  318. if block.className == "IntValue" then
  319. if block.Value > 0 then
  320. blocked = true
  321. block.Value = block.Value - 1
  322. print(block.Value)
  323. end
  324. end
  325. end
  326. if blocked == false then
  327. h.Health = h.Health - Damage
  328. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Really black").Color)
  329. else
  330. h.Health = h.Health - (Damage / 2)
  331. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Really black").Color)
  332. end
  333. if Type == "Knockdown" then
  334. local hum = hit.Parent.Humanoid
  335. hum.PlatformStand = true
  336. coroutine.resume(coroutine.create(function(HHumanoid)
  337. swait(1)
  338. HHumanoid.PlatformStand = false
  339. end), hum)
  340. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  341. local bodvol = Create("BodyVelocity"){
  342. velocity = angle * knockback,
  343. P = 5000,
  344. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  345. Parent = hit,
  346. }
  347. local rl = Create("BodyAngularVelocity"){
  348. P = 3000,
  349. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  350. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  351. Parent = hit,
  352. }
  353. game:GetService("Debris"):AddItem(bodvol, .5)
  354. game:GetService("Debris"):AddItem(rl, .5)
  355. elseif Type == "Normal" then
  356. local vp = Create("BodyVelocity"){
  357. P = 500,
  358. maxForce = Vector3.new(math.huge, 0, math.huge),
  359. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  360. }
  361. if knockback > 0 then
  362. vp.Parent = hit.Parent.Torso
  363. end
  364. game:GetService("Debris"):AddItem(vp, .5)
  365. elseif Type == "Up" then
  366. local bodyVelocity = Create("BodyVelocity"){
  367. velocity = Vector3.new(0, 20, 0),
  368. P = 5000,
  369. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  370. Parent = hit,
  371. }
  372. game:GetService("Debris"):AddItem(bodyVelocity, .5)
  373. elseif Type == "DarkUp" then
  374. coroutine.resume(coroutine.create(function()
  375. for i = 0, 1, 0.1 do
  376. swait()
  377. Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  378. end
  379. end))
  380. local bodyVelocity = Create("BodyVelocity"){
  381. velocity = Vector3.new(0, 20, 0),
  382. P = 5000,
  383. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  384. Parent = hit,
  385. }
  386. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  387. elseif Type == "Snare" then
  388. local bp = Create("BodyPosition"){
  389. P = 2000,
  390. D = 100,
  391. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  392. position = hit.Parent.Torso.Position,
  393. Parent = hit.Parent.Torso,
  394. }
  395. game:GetService("Debris"):AddItem(bp, 1)
  396. elseif Type == "Freeze" then
  397. local BodPos = Create("BodyPosition"){
  398. P = 50000,
  399. D = 1000,
  400. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  401. position = hit.Parent.Torso.Position,
  402. Parent = hit.Parent.Torso,
  403. }
  404. local BodGy = Create("BodyGyro") {
  405. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  406. P = 20e+003,
  407. Parent = hit.Parent.Torso,
  408. cframe = hit.Parent.Torso.CFrame,
  409. }
  410. hit.Parent.Torso.Anchored = true
  411. coroutine.resume(coroutine.create(function(Part)
  412. swait(1.5)
  413. Part.Anchored = false
  414. end), hit.Parent.Torso)
  415. game:GetService("Debris"):AddItem(BodPos, 3)
  416. game:GetService("Debris"):AddItem(BodGy, 3)
  417. end
  418. local debounce = Create("BoolValue"){
  419. Name = "DebounceHit",
  420. Parent = hit.Parent,
  421. Value = true,
  422. }
  423. game:GetService("Debris"):AddItem(debounce, Delay)
  424. c = Create("ObjectValue"){
  425. Name = "creator",
  426. Value = Player,
  427. Parent = h,
  428. }
  429. game:GetService("Debris"):AddItem(c, .5)
  430. end
  431. end
  432.  
  433. function ShowDamage(Pos, Text, Time, Color)
  434. local Rate = (1 / 30)
  435. local Pos = (Pos or Vector3.new(0, 0, 0))
  436. local Text = (Text or "")
  437. local Time = (Time or 2)
  438. local Color = (Color or Color3.new(1, 0, 1))
  439. local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  440. EffectPart.Anchored = true
  441. local BillboardGui = Create("BillboardGui"){
  442. Size = UDim2.new(3, 0, 3, 0),
  443. Adornee = EffectPart,
  444. Parent = EffectPart,
  445. }
  446. local TextLabel = Create("TextLabel"){
  447. BackgroundTransparency = 1,
  448. Size = UDim2.new(1, 0, 1, 0),
  449. Text = Text,
  450. Font = "SciFi",
  451. TextColor3 = Color,
  452. TextScaled = true,
  453. Parent = BillboardGui,
  454. }
  455. game.Debris:AddItem(EffectPart, (Time))
  456. EffectPart.Parent = game:GetService("Workspace")
  457. delay(0, function()
  458. local Frames = (Time / Rate)
  459. for Frame = 1, Frames do
  460. wait(Rate)
  461. local Percent = (Frame / Frames)
  462. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  463. TextLabel.TextTransparency = Percent
  464. end
  465. if EffectPart and EffectPart.Parent then
  466. EffectPart:Destroy()
  467. end
  468. end)
  469. end
  470.  
  471. function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch)
  472. for _, c in pairs(workspace:children()) do
  473. local hum = c:findFirstChild("Humanoid")
  474. if hum ~= nil then
  475. local head = c:findFirstChild("Torso")
  476. if head ~= nil then
  477. local targ = head.Position - Part.Position
  478. local mag = targ.magnitude
  479. if mag <= Magnitude and c.Name ~= Player.Name then
  480. Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, .1, "rbxassetid://" .. HitSound, HitPitch)
  481. end
  482. end
  483. end
  484. end
  485. end
  486.  
  487. New = function(Object, Parent, Name, Data)
  488. local Object = Instance.new(Object)
  489. for Index, Value in pairs(Data or {}) do
  490. Object[Index] = Value
  491. end
  492. Object.Parent = Parent
  493. Object.Name = Name
  494. return Object
  495. end
  496.  
  497. ---Fur--
  498.  
  499.  
  500.  
  501. --other--
  502.  
  503. local introos = Instance.new("ParticleEmitter",particle1)
  504. introos.Color = ColorSequence.new(Color3.new(.5, 1, 1), Color3.new(.8, 1, 1))
  505. introos.LightEmission = 1
  506. introos.Size = NumberSequence.new(1)
  507. introos.Texture = "http://www.roblox.com/asset/?id=31727915"
  508. --aas = NumberSequence.new({NumberSequenceKeypoint.new(0, 0),NumberSequenceKeypoint.new(1, 1.54)})
  509. asd = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.2, 0),NumberSequenceKeypoint.new(0.8, 0),NumberSequenceKeypoint.new(1, 1)})
  510. introos.Transparency = asd
  511. --introos.Size = aas
  512. introos.ZOffset = 0
  513. introos.Acceleration = Vector3.new(0, 0, 0)
  514. introos.LockedToPart = true
  515. introos.EmissionDirection = "Bottom"
  516. introos.Lifetime = NumberRange.new(1)
  517. introos.Rate = 100000
  518. introos.Rotation = NumberRange.new(-360, 500)
  519. introos.RotSpeed = NumberRange.new(-180, 189)
  520. introos.Speed = NumberRange.new(4)
  521. introos.VelocitySpread = 1
  522. introos.Enabled=true
  523.  
  524. local introoss = Instance.new("ParticleEmitter",particle2)
  525. introoss.Color = ColorSequence.new(Color3.new(.5, 1, 1), Color3.new(.8, 1, 1))
  526. introoss.LightEmission = 1
  527. --introoss.Size = NumberSequence.new(1)
  528. introoss.Texture = "http://www.roblox.com/asset/?id=320043786"
  529. aas = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.5),NumberSequenceKeypoint.new(1, .5)})
  530. asd = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.2, 0),NumberSequenceKeypoint.new(0.8, 0),NumberSequenceKeypoint.new(1, 1)})
  531. introoss.Transparency = asd
  532. introos.Size = aas
  533. introoss.ZOffset = 0
  534. introoss.Acceleration = Vector3.new(0, 0, 0)
  535. introoss.LockedToPart = true
  536. introoss.EmissionDirection = "Bottom"
  537. introoss.Lifetime = NumberRange.new(1)
  538. introoss.Rate = 20
  539. introoss.Rotation = NumberRange.new(-360, 360)
  540. introoss.RotSpeed = NumberRange.new(-180, 180)
  541. introoss.Speed = NumberRange.new(4)
  542. introoss.VelocitySpread = 180
  543. introoss.Enabled=true
  544.  
  545.  
  546. EffectModel = Create("Model"){
  547. Parent = Character,
  548. Name = "Effects",
  549. }
  550.  
  551. Effects = {
  552. Block = {
  553. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  554. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  555. prt.Anchored = true
  556. prt.CFrame = cframe
  557. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  558. game:GetService("Debris"):AddItem(prt, 10)
  559. if Type == 1 or Type == nil then
  560. table.insert(Effects, {
  561. prt,
  562. "Block1",
  563. delay,
  564. x3,
  565. y3,
  566. z3,
  567. msh
  568. })
  569. elseif Type == 2 then
  570. table.insert(Effects, {
  571. prt,
  572. "Block2",
  573. delay,
  574. x3,
  575. y3,
  576. z3,
  577. msh
  578. })
  579. end
  580. end;
  581. };
  582.  
  583. Cylinder = {
  584. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  585. local prt = CFuncs.Part..Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.2, 0.2, 0.2))
  586. prt.Anchored = true
  587. prt.CFrame = cframe
  588. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  589. game:GetService("Debris"):AddItem(prt, 2)
  590. Effects[#Effects + 1] = {
  591. prt,
  592. "Cylinder",
  593. delay,
  594. x3,
  595. y3,
  596. z3
  597. }
  598. end;
  599. };
  600.  
  601. Head = {
  602. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  603. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  604. prt.Anchored = true
  605. prt.CFrame = cframe
  606. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Head", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  607. game:GetService("Debris"):AddItem(prt, 10)
  608. table.insert(Effects, {
  609. prt,
  610. "Cylinder",
  611. delay,
  612. x3,
  613. y3,
  614. z3,
  615. msh
  616. })
  617. end;
  618. };
  619.  
  620. Sphere = {
  621. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  622. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  623. prt.Anchored = true
  624. prt.CFrame = cframe
  625. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  626. game:GetService("Debris"):AddItem(prt, 10)
  627. table.insert(Effects, {
  628. prt,
  629. "Cylinder",
  630. delay,
  631. x3,
  632. y3,
  633. z3,
  634. msh
  635. })
  636. end;
  637. };
  638.  
  639. Elect = {
  640. Create = function(cff, x, y, z)
  641. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, BrickColor.new("Lime green"), "Part", Vector3.new(1, 1, 1))
  642. prt.Anchored = true
  643. prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z))
  644. prt.CFrame = CFrame.new(prt.Position)
  645. game:GetService("Debris"):AddItem(prt, 2)
  646. local xval = math.random() / 2
  647. local yval = math.random() / 2
  648. local zval = math.random() / 2
  649. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval))
  650. table.insert(Effects, {
  651. prt,
  652. "Elec",
  653. 0.1,
  654. x,
  655. y,
  656. z,
  657. xval,
  658. yval,
  659. zval
  660. })
  661. end;
  662.  
  663. };
  664.  
  665. Ring = {
  666. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  667. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  668. prt.Anchored = true
  669. prt.CFrame = cframe
  670. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  671. game:GetService("Debris"):AddItem(prt, 10)
  672. table.insert(Effects, {
  673. prt,
  674. "Cylinder",
  675. delay,
  676. x3,
  677. y3,
  678. z3,
  679. msh
  680. })
  681. end;
  682. };
  683.  
  684.  
  685. Wave = {
  686. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  687. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  688. prt.Anchored = true
  689. prt.CFrame = cframe
  690. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  691. game:GetService("Debris"):AddItem(prt, 10)
  692. table.insert(Effects, {
  693. prt,
  694. "Cylinder",
  695. delay,
  696. x3,
  697. y3,
  698. z3,
  699. msh
  700. })
  701. end;
  702. };
  703.  
  704. Break = {
  705. Create = function(brickcolor, cframe, x1, y1, z1)
  706. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  707. prt.Anchored = true
  708. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  709. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  710. local num = math.random(10, 50) / 1000
  711. game:GetService("Debris"):AddItem(prt, 10)
  712. table.insert(Effects, {
  713. prt,
  714. "Shatter",
  715. num,
  716. prt.CFrame,
  717. math.random() - math.random(),
  718. 0,
  719. math.random(50, 100) / 100
  720. })
  721. end;
  722. };
  723.  
  724. Fire = {
  725. Create = function(brickcolor, cframe, x1, y1, z1, delay)
  726. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  727. prt.Anchored = true
  728. prt.CFrame = cframe
  729. msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  730. game:GetService("Debris"):AddItem(prt, 10)
  731. table.insert(Effects, {
  732. prt,
  733. "Fire",
  734. delay,
  735. 1,
  736. 1,
  737. 1,
  738. msh
  739. })
  740. end;
  741. };
  742.  
  743. FireWave = {
  744. Create = function(brickcolor, cframe, x1, y1, z1)
  745. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 1, brickcolor, "Effect", Vector3.new())
  746. prt.Anchored = true
  747. prt.CFrame = cframe
  748. msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  749. local d = Create("Decal"){
  750. Parent = prt,
  751. Texture = "rbxassetid://26356434",
  752. Face = "Top",
  753. }
  754. local d = Create("Decal"){
  755. Parent = prt,
  756. Texture = "rbxassetid://26356434",
  757. Face = "Bottom",
  758. }
  759. game:GetService("Debris"):AddItem(prt, 10)
  760. table.insert(Effects, {
  761. prt,
  762. "FireWave",
  763. 1,
  764. 30,
  765. math.random(400, 600) / 100,
  766. msh
  767. })
  768. end;
  769. };
  770.  
  771. Lightning = {
  772. Create = function(p0, p1, tym, ofs, col, th, tra, last)
  773. local magz = (p0 - p1).magnitude
  774. local curpos = p0
  775. local trz = {
  776. -ofs,
  777. ofs
  778. }
  779. for i = 1, tym do
  780. local li = CFuncs.Part.Create(EffectModel, "Neon", 0, tra or 0.4, col, "Ref", Vector3.new(th, th, magz / tym))
  781. local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)])
  782. local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz
  783. li.Material = "Neon"
  784. if tym == i then
  785. local magz2 = (curpos - p1).magnitude
  786. li.Size = Vector3.new(th, th, magz2)
  787. li.CFrame = CFrame.new(curpos, p1) * CFrame.new(0, 0, -magz2 / 2)
  788. table.insert(Effects, {
  789. li,
  790. "Disappear",
  791. last
  792. })
  793. else
  794. do
  795. do
  796. li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(0, 0, magz / tym / 2)
  797. curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p
  798. game.Debris:AddItem(li, 10)
  799. table.insert(Effects, {
  800. li,
  801. "Disappear",
  802. last
  803. })
  804. end
  805. end
  806. end
  807. end
  808. end
  809. };
  810.  
  811. EffectTemplate = {
  812.  
  813. };
  814. }
  815.  
  816. function attackone()
  817. attack = true
  818. for i = 0, 1, 0.1 do
  819. swait()
  820. PlayAnimationFromTable({
  821. CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  822. CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  823. CFrame.new(1.5, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  824. CFrame.new(-1.5, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  825. CFrame.new(0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  826. CFrame.new(-0.5, -2, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  827. }, .3, false)
  828. end
  829. attack = false
  830. end
  831.  
  832. function How_to_live_avi()
  833. attack = true
  834. Humanoid.WalkSpeed = 1
  835. for i = 0, 3, 0.1 do
  836. swait()
  837. PlayAnimationFromTable({
  838. CFrame.new(-0, -1.03615987, -0.321301371, 1, 0, 0, 0, 0.766212463, 0.642587364, 0, -0.642587364, 0.766212463) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  839. CFrame.new(0, 1.55075097, -0.201079994, 1, 0, 0, 0, 0.928164721, 0.372169584, 0, -0.372169584, 0.928164721) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  840. CFrame.new(1.60673702, -0.0154295918, 0.104641199, 0.583110213, -0.806256592, -0.0996639654, 0.812393069, 0.578700125, 0.0715808272, -3.69548798e-05, -0.122705847, 0.992443144) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  841. CFrame.new(-1.68533659, -0.036477834, 0.232782185, 0.598335326, 0.784392118, 0.163481146, -0.80124712, 0.585750222, 0.12207219, -6.70552254e-06, -0.204027355, 0.978967488) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  842. CFrame.new(0.424130619, -0.599340916, -0.89095664, 0.996774673, 0.012246226, 0.0793405771, 0.0441683494, 0.741622627, -0.669363678, -0.0670379251, 0.670709252, 0.738686264) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  843. CFrame.new(-0.652507722, -1.94315124, 0.513518453, 0.978214204, 0.200444415, -0.0540676638, -0.154227883, 0.875958264, 0.457072139, 0.138978034, -0.438775092, 0.887786567) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  844. }, .05, false)
  845. end
  846. CFuncs["Sound"].Create("200632211", Torso, 1, .6)
  847. Effects.Wave.Create(BrickColor.new("White"), RootPart.CFrame* CFrame.new(0,-3.5,0)*CFrame.Angles(0,0,0), 2, 1.4, 2, 1.5, 0.6, 1.5, 0.05)
  848. Humanoid.Jump = false
  849. Torso.Velocity = Vector3.new(0, 400, 0)
  850. for i = 0, 5, 0.1 do
  851. swait()
  852. PlayAnimationFromTable({
  853. CFrame.new(0, -0.000592137396, 0.0243320614, 1, 0, -0, 0, 0.998815119, -0.0486660115, 0, 0.0486660078, 0.998815119) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  854. CFrame.new(0, 1.49255788, 0.0580787957, 1, 0, -0, 0, 0.991898537, -0.127052188, -0, 0.127052188, 0.991898537) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  855. CFrame.new(1.77745748, 0.0644446909, 0.6576069, 0.444794923, -0.699619889, -0.559186816, 0.895632386, 0.347450435, 0.277707279, -4.32133675e-07, -0.624347925, 0.781146765) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  856. CFrame.new(-1.74996197, 0.110267356, 0.44159767, 0.353478432, 0.848394156, 0.394056529, -0.93215698, 0.354735166, 0.0724315718, -0.0783351958, -0.392925411, 0.916228056) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  857. CFrame.new(0.564538479, -1.08948302, -0.169450268, 0.999277413, -0.0380095579, 1.31532767e-08, 0.0373679549, 0.982409656, 0.182961941, -0.00695431605, -0.182829753, 0.983120024) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  858. CFrame.new(-0.587307692, -1.9104619, 0.29412967, 0.994682372, 0.102991022, -1.53875547e-07, -0.0993663296, 0.959675372, 0.262962759, 0.0270829555, -0.261564374, 0.96480602) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  859. }, .3, false)
  860. end
  861. RootPart.Anchored = true
  862. ref = New("Part",m,"ref",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Transparency = 1,Transparency = 1,Size = Vector3.new(0.200000003, 0.200000003, 0.200000003),CFrame = CFrame.new(-72.7290878, 28.5900459, 2.38004827, 0.99999994, 0.000383002043, -5.96046448e-08, -0.000383001927, 1, 1.16415322e-09, 4.47034836e-08, -1.39698386e-09, 1),Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  863. mot = New("Motor",ref,"mot",{Part0 = ref,Part1 = RootPart,C0 = CFrame.new(0, 0, 0, 0.99999994, -0.000383001927, 4.47034836e-08, 0.000383002043, 1, -1.39698386e-09, -5.96046448e-08, 1.16415322e-09, 1),C1 = CFrame.new(-0.0108718872, 28.6000443, -2.38418579e-07, -1, 0, 0, 0, 1, 0, 0, 0, -1),})
  864.  
  865. CFuncs["Sound"].Create("214876666", Character, 1.5, .7)
  866. for i = 0, 6, 0.1 do
  867. swait()
  868. PlayAnimationFromTable({
  869. CFrame.new(0, -0.00170694385, 0.0412697122, 1, 0, -0, 0, 0.996587992, -0.0825380012, 0, 0.0825380012, 0.996587992) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  870. CFrame.new(0, 1.35443878, 0.157845795, 1, 0, -0, 0, 0.936196327, -0.351494998, -0, 0.351494998, 0.936196327) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  871. CFrame.new(1.59617484, 1.19478106, -0.175431296, 0.97810787, -0.194577187, 0.0738007948, -0.160195485, -0.930362523, -0.329793394, 0.132831812, 0.310750633, -0.941164196) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  872. CFrame.new(-1.77782011, 0.0086527206, 0.483837992, 0.408382565, 0.838138402, 0.361603439, -0.912810922, 0.374976844, 0.161780298, 3.15159559e-06, -0.396144301, 0.918190956) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  873. CFrame.new(0.57985276, -1.93068719, 0.293669045, 0.995965481, -0.0878097862, -0.0184999984, 0.0897372141, 0.974572957, 0.205324233, 9.35979187e-08, -0.206156105, 0.978520691) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  874. CFrame.new(-0.594926953, -1.87837791, 0.3280527, 0.992015719, 0.119715877, 0.0396601185, -0.126114279, 0.941686928, 0.311963469, -4.36790287e-07, -0.314474404, 0.949266076) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  875. }, .15, false)
  876. Effects.Lightning.Create(RightArm.Position,ref.Position,5,5,BrickColor.new("Cyan"),.7,.5,0.1)
  877. Effects.Block.Create(BrickColor.new("Cyan"), ref.CFrame, 2, 2, 2, 3, 3, 3, 0.06)
  878. end
  879. refs = New("Part",m,"ref",{Anchored = true,BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Transparency = 1,Transparency = 1,Size = Vector3.new(0.200000003, 0.200000003, 0.200000003),CFrame = ref.CFrame,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  880. aa = New("BlockMesh",refs,"aa",{Scale = Vector3.new(1,0,1)})
  881. ok1 = New("Decal",refs,"k",{Face = "Top",Texture = "http://www.roblox.com/asset/?id=823334464"})
  882. ok2 = New("Decal",refs,"k",{Face = "Bottom",Texture = "http://www.roblox.com/asset/?id=823334464"})
  883. Humanoid.WalkSpeed = 16
  884. wait(.1)
  885. ref:Remove()
  886. local val = 100
  887. coroutine.wrap(function()
  888. while wait() and refs and refs.Reflectance <= 1 do
  889. val = val - 1
  890. refs.Reflectance = refs.Reflectance + .01
  891. aa.Scale = aa.Scale + Vector3.new(val,0,val)
  892. end
  893. end)()
  894. for i = 0, 3, 0.1 do
  895. swait()
  896. PlayAnimationFromTable({
  897. CFrame.new(0, -0.00170670624, 0.0412697308, 1, 0, -0, 0, 0.996587992, -0.0825380012, 0, 0.0825380012, 0.996587992) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  898. CFrame.new(0, 1.38451409, -0.272948891, 1, 0, 0, 0, 0.881881952, 0.471470267, -0, -0.471470267, 0.881882012) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  899. CFrame.new(0.332121313, 0.253666043, -0.662508011, -0.195479095, 0.92218256, 0.333717972, 0.920646012, 0.289811462, -0.261574864, -0.33793506, 0.256103426, -0.905655622) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  900. CFrame.new(-0.617085814, 0.39823994, -0.825249493, -0.00209266553, -0.783531249, -0.62135005, -0.934353113, 0.222947314, -0.277993411, 0.356344759, 0.579977095, -0.732561052) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  901. CFrame.new(0.57985276, -1.93068719, 0.293669045, 0.995965481, -0.0878097862, -0.0184999984, 0.0897372141, 0.974572957, 0.205324233, 9.35979187e-08, -0.206156105, 0.978520691) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  902. CFrame.new(-0.594926953, -1.87837791, 0.3280527, 0.992015719, 0.119715877, 0.0396601185, -0.126114279, 0.941686928, 0.311963469, -4.36790287e-07, -0.314474404, 0.949266076) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  903. }, .1, false)
  904. end
  905. refs1 = New("Part",m,"ref",{Anchored = true,BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Transparency = 1,Transparency = 1,Size = Vector3.new(0.200000003, 0.200000003, 0.200000003),CFrame = refs.CFrame,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  906. refs2 = New("Part",m,"ref",{Anchored = true,BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Transparency = 1,Transparency = 1,Size = Vector3.new(0.200000003, 0.200000003, 0.200000003),CFrame = refs.CFrame,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  907.  
  908. Effects.Sphere.Create(BrickColor.new("Cyan"), RootPart.CFrame, 5, 5, 5, 10, 10, 10, 0.04)
  909. CFuncs["Sound"].Create("138079095", Character, 1.5, .4)
  910. coroutine.wrap(function()
  911. for i = 1,100 do
  912. swait(1)
  913. refs1.CFrame = refs.CFrame * CFrame.new(math.random(-200,200),0,math.random(-200,200))
  914. refs2.CFrame = refs.CFrame * CFrame.new(math.random(-200,200),-420,math.random(-200,200))
  915. Effects.Lightning.Create(refs1.Position,refs2.Position,5,5,BrickColor.new("Cyan"),5,.5,0.1)
  916. Effects.Block.Create(BrickColor.new("Cyan"), refs2.CFrame, 2, 2, 2, 15, 15, 15, 0.07)
  917. Effects.Block.Create(BrickColor.new("Cyan"), refs2.CFrame, 2, 2, 2, 15, 15, 15, 0.07)
  918. MagnitudeDamage(refs2, 25, 20, 40, math.random(1, 5), "Snare", "", 1)
  919. CFuncs["Sound"].Create("427582855", refs2, 3, 1.2)
  920.  
  921. end
  922. end)()
  923. for i = 0, 20, 0.1 do
  924. swait()
  925. PlayAnimationFromTable({
  926. CFrame.new(0, -0.00170670624, 0.0412697308, 1, 0, -0, 0, 0.996587992, -0.0825380012, 0, 0.0825380012, 0.996587992) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  927. CFrame.new(0, 1.38187397, 0.24372232, 1, 0, -0, 0, 0.936117887, -0.351686984, -0, 0.351686984, 0.936117887) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  928. CFrame.new(1.94593441, 0.568508446, 0.229167357, 0.0108728549, -0.954202771, -0.29896301, 0.959349692, -0.074366644, 0.272246838, -0.282011509, -0.289770067, 0.914605498) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  929. CFrame.new(-1.96323562, 0.571394145, 0.42302075, -0.00208615814, 0.909483552, 0.415736109, -0.934352875, -0.149918631, 0.323280126, 0.356344342, -0.387769997, 0.850090027) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  930. CFrame.new(0.57985276, -1.93068719, 0.293669045, 0.995965481, -0.0878097862, -0.0184999984, 0.0897372141, 0.974572957, 0.205324233, 9.35979187e-08, -0.206156105, 0.978520691) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  931. CFrame.new(-0.594926953, -1.87837791, 0.3280527, 0.992015719, 0.119715877, 0.0396601185, -0.126114279, 0.941686928, 0.311963469, -4.36790287e-07, -0.314474404, 0.949266076) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  932. }, .3, false)
  933. end
  934. RootPart.Anchored = false
  935. attack = false
  936. for i = 1,100 do
  937. swait()
  938. ok1.Transparency = ok1.Transparency + 0.01
  939. ok2.Transparency = ok2.Transparency + 0.01
  940. aa.Scale = aa.Scale + Vector3.new(10,0,10)
  941. end
  942. refs:Remove()
  943. refs1:Remove()
  944. refs2:Remove()
  945.  
  946. end
  947. Mouse.Button1Down:connect(function()
  948. if attack == false and attacktype == 1 then
  949. attackone()
  950. end
  951. end)
  952.  
  953. Mouse.KeyDown:connect(function(k)
  954. k = k:lower()
  955. if attack == false and k == 'q' then
  956. How_to_live_avi()
  957. end
  958. end)
  959.  
  960. while true do
  961. swait()
  962. for i, v in pairs(Character:GetChildren()) do
  963. if v:IsA("Part") then
  964. v.Material = "SmoothPlastic"
  965. elseif v:IsA("Accessory") then
  966. v:WaitForChild("Handle").Material = "SmoothPlastic"
  967. end
  968. end
  969. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  970. velocity = RootPart.Velocity.y
  971. sine = sine + change
  972. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  973. if RootPart.Velocity.y > 1 and hit == nil then
  974. Anim = "Jump"
  975. if attack == false then
  976. RootJoint.C0 = clerp(RootJoint.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  977. Torso.Neck.C0 = clerp(Torso.Neck.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  978. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  979. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  980. RH.C0 = clerp(RH.C0, CFrame.new(.5, -2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  981. LH.C0 = clerp(LH.C0, CFrame.new(-.5, -2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  982. end
  983. elseif RootPart.Velocity.y < -1 and hit == nil then
  984. Anim = "Fall"
  985. if attack == false then
  986. RootJoint.C0 = clerp(RootJoint.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  987. Torso.Neck.C0 = clerp(Torso.Neck.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  988. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  989. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  990. RH.C0 = clerp(RH.C0, CFrame.new(.5, -2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  991. LH.C0 = clerp(LH.C0, CFrame.new(-.5, -2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  992. end
  993. elseif Torsovelocity < 1 and hit ~= nil then
  994. Anim = "Idle"
  995. if attack == false then
  996. change = 1
  997. PlayAnimationFromTable({
  998. CFrame.new(0, -0, -0, 0.974372447, 0, -0.224940956, 0, 1, 0, 0.224941015, 0, 0.974372387) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  999. CFrame.new(-1.1920929e-07, 1.49999416, -2.08616257e-07, 0.920513809, -0.0204478577, 0.390176117, 1.86964701e-08, 0.998630404, 0.0523349345, -0.390711427, -0.0481749773, 0.919252574) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), -- <-- (+/-) [number] * math.cos([number]/[number]) cough cough
  1000. CFrame.new(1.68044662, 0.0500002615, -0.100577071, 0.985486329, -0.16919525, -0.0138741881, 0.168487713, 0.984809339, -0.0420071632, 0.0207707137, 0.0390598364, 0.999020934) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1001. CFrame.new(-1.58900392, -0.010000065, 0.141046837, 0.967111886, 0.118746817, 0.224941015, -0.121870048, 0.992548466, 0, -0.223264799, -0.0274135657, 0.974372387) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1002. CFrame.new(0.690335035, -2.00001669, 0.0561553538, 0.987111211, -0.0335469171, 0.156496003, 0.0346383005, 0.999395728, -0.00425298186, -0.156258017, 0.00961896125, 0.987671435) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1003. CFrame.new(-0.514178514, -1.99999702, -0.00445482135, 0.933586121, 0, 0.358358383, 0, 1, 0, -0.358358324, 0, 0.93358618) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1004. }, .3, false)
  1005. end
  1006. elseif Torsovelocity > 2 and hit ~= nil then
  1007. Anim = "Walk"
  1008. if attack == false then
  1009. PlayAnimationFromTable({
  1010. CFrame.new(0, -0.0193441566, -0.137761548, 1, 0, 0, 0, 0.961308897, 0.275472969, 0, -0.275472969, 0.961308897) * CFrame.new(0, 0- .1 * math.cos((sine) / 2), 0) * CFrame.Angles(0, 0, 0),
  1011. CFrame.new(0, 1.44159341, 0.0451771915, 1, 0, 0, 0, 0.98646307, -0.163984656, 0, 0.163984656, 0.98646307) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1012. CFrame.new(1.63363111, 0.0754526258, -2.72151652e-007, 0.985570133, -0.16926825, 1.56980732e-007, 0.16926825, 0.985570133, 2.38418579e-007, -1.86264515e-007, -1.49011612e-007, 1.00000024) * CFrame.new(0, 0, 0+ 0.5 * math.cos((sine) / 4)) * CFrame.Angles(math.rad(0- 20 * math.cos((sine) / 4)), 0, 0),
  1013. CFrame.new(-1.61827064, 0.111134544, 1.51569429e-006, 0.978242338, 0.207465827, 7.76345075e-007, -0.207465842, 0.978242397, -2.41398811e-006, -1.25542283e-006, 2.20537186e-006, 1.00000012) * CFrame.new(0, 0, 0- 0.5 * math.cos((sine) / 4)) * CFrame.Angles(math.rad(0+ 20 * math.cos((sine) / 4)), 0, 0),
  1014. CFrame.new(0.5, -2.00000334, 2.67028881e-005, 1, 0, 0, 0, 1.00000024, 0, 0, 0, 1.00000024) * CFrame.new(0, 0+ .4 * math.cos((sine) / 2), 0 + 1 * math.cos((sine) / 4)) * CFrame.Angles(math.rad(0 - 50 * math.cos((sine) / 4)), math.rad(0), math.rad(0)),
  1015. CFrame.new(-0.5, -2.00000334, 2.67028881e-005, 1, 0, 0, 0, 1.00000024, 0, 0, 0, 1.00000024) * CFrame.new(0, 0+ .4 * math.cos((sine) / 2), 0 - 1 * math.cos((sine) / 4)) * CFrame.Angles(math.rad(0 + 50 * math.cos((sine) / 4)), math.rad(0), math.rad(0)),
  1016. }, .3, false)
  1017. end
  1018. end
  1019. if 0 < #Effects then
  1020. for e = 1, #Effects do
  1021. if Effects[e] ~= nil then
  1022. local Thing = Effects[e]
  1023. if Thing ~= nil then
  1024. local Part = Thing[1]
  1025. local Mode = Thing[2]
  1026. local Delay = Thing[3]
  1027. local IncX = Thing[4]
  1028. local IncY = Thing[5]
  1029. local IncZ = Thing[6]
  1030. if Thing[2] == "Shoot" then
  1031. local Look = Thing[1]
  1032. local move = 30
  1033. if Thing[8] == 3 then
  1034. move = 10
  1035. end
  1036. local hit, pos = rayCast(Thing[4], Thing[1], move, m)
  1037. if Thing[10] ~= nil then
  1038. da = pos
  1039. cf2 = CFrame.new(Thing[4], Thing[10].Position)
  1040. cfa = CFrame.new(Thing[4], pos)
  1041. tehCF = cfa:lerp(cf2, 0.2)
  1042. Thing[1] = tehCF.lookVector
  1043. end
  1044. local mag = (Thing[4] - pos).magnitude
  1045. Effects["Head"].Create(Torso.BrickColor, CFrame.new((Thing[4] + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0), 1, mag * 5, 1, 0.5, 0, 0.5, 0.2)
  1046. if Thing[8] == 2 then
  1047. Effects["Ring"].Create(Torso.BrickColor, CFrame.new((Thing[4] + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0) * CFrame.fromEulerAnglesXYZ(1.57, 0, 0), 1, 1, 0.1, 0.5, 0.5, 0.1, 0.1, 1)
  1048. end
  1049. Thing[4] = Thing[4] + Look * move
  1050. Thing[3] = Thing[3] - 1
  1051. if 2 < Thing[5] then
  1052. Thing[5] = Thing[5] - 0.3
  1053. Thing[6] = Thing[6] - 0.3
  1054. end
  1055. if hit ~= nil then
  1056. Thing[3] = 0
  1057. if Thing[8] == 1 or Thing[8] == 3 then
  1058. Damage(hit, hit, Thing[5], Thing[6], Thing[7], "Normal", RootPart, 0, "", 1)
  1059. else
  1060. if Thing[8] == 2 then
  1061. Damage(hit, hit, Thing[5], Thing[6], Thing[7], "Normal", RootPart, 0, "", 1)
  1062. if (hit.Parent:findFirstChild("Humanoid")) ~= nil or (hit.Parent.Parent:findFirstChild("Humanoid")) ~= nil then
  1063. ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
  1064. ref.Anchored = true
  1065. ref.CFrame = CFrame.new(pos)
  1066. CFuncs["Sound"].Create("161006093", ref, 1, 1.2)
  1067. game:GetService("Debris"):AddItem(ref, 0.2)
  1068. Effects["Block"].Create(Torso.BrickColor, CFrame.new(ref.Position) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 1, 10, 10, 10, 0.1, 2)
  1069. Effects["Ring"].Create(BrickColor.new("Bright yellow"), CFrame.new(ref.Position) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 0.1, 4, 4, 0.1, 0.1)
  1070. MagnitudeDamage(ref, 15, Thing[5] / 1.5, Thing[6] / 1.5, 0, "Normal", "", 1)
  1071. end
  1072. end
  1073. end
  1074. ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
  1075. ref.Anchored = true
  1076. ref.CFrame = CFrame.new(pos)
  1077. Effects["Sphere"].Create(Torso.BrickColor, CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.07)
  1078. game:GetService("Debris"):AddItem(ref, 1)
  1079. end
  1080. if Thing[3] <= 0 then
  1081. table.remove(Effects, e)
  1082. end
  1083. end
  1084. do
  1085. do
  1086. if Thing[2] == "FireWave" then
  1087. if Thing[3] <= Thing[4] then
  1088. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(0, 1, 0)
  1089. Thing[3] = Thing[3] + 1
  1090. Thing[6].Scale = Thing[6].Scale + Vector3.new(Thing[5], 0, Thing[5])
  1091. else
  1092. Part.Parent = nil
  1093. table.remove(Effects, e)
  1094. end
  1095. end
  1096. if Thing[2] ~= "Shoot" and Thing[2] ~= "Wave" and Thing[2] ~= "FireWave" then
  1097. if Thing[1].Transparency <= 1 then
  1098. if Thing[2] == "Block1" then
  1099. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1100. Mesh = Thing[7]
  1101. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1102. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1103. else
  1104. if Thing[2] == "Block2" then
  1105. Thing[1].CFrame = Thing[1].CFrame
  1106. Mesh = Thing[7]
  1107. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1108. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1109. else
  1110. if Thing[2] == "Fire" then
  1111. Thing[1].CFrame = CFrame.new(Thing[1].Position) + Vector3.new(0, 0.2, 0)
  1112. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1113. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1114. else
  1115. if Thing[2] == "Cylinder" then
  1116. Mesh = Thing[7]
  1117. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1118. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1119. else
  1120. if Thing[2] == "Blood" then
  1121. Mesh = Thing[7]
  1122. Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 0.5, 0)
  1123. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1124. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1125. else
  1126. if Thing[2] == "Elec" then
  1127. Mesh = Thing[10]
  1128. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1129. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1130. else
  1131. if Thing[2] == "Disappear" then
  1132. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1133. end
  1134. end
  1135. end
  1136. end
  1137. end
  1138. end
  1139. end
  1140. else
  1141. Part.Parent = nil
  1142. table.remove(Effects, e)
  1143. end
  1144. end
  1145. end
  1146. end
  1147. end
  1148. end
  1149. end
  1150. end
  1151. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement