Advertisement
Mz_TH_edit

Untitled

Jul 5th, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[KillerDarkness0105's/Codex's Sonic script]]--
  2.  
  3.  
  4.  
  5. wait(0.07)
  6. Player=game:GetService("Players").LocalPlayer
  7. Character=Player.Character
  8. PlayerGui=Player.PlayerGui
  9. Backpack=Player.Backpack
  10. Torso=Character.Torso
  11. Head=Character.Head
  12. Humanoid=Character.Humanoid
  13. LeftArm=Character["Left Arm"]
  14. LeftLeg=Character["Left Leg"]
  15. RightArm=Character["Right Arm"]
  16. RightLeg=Character["Right Leg"]
  17. LS=Torso["Left Shoulder"]
  18. LH=Torso["Left Hip"]
  19. RS=Torso["Right Shoulder"]
  20. RH=Torso["Right Hip"]
  21. Face = Head.face
  22. Neck=Torso.Neck
  23. it=Instance.new
  24. attacktype=1
  25. attacktype2=1
  26. vt=Vector3.new
  27. cf=CFrame.new
  28. cn=CFrame.new
  29. euler=CFrame.fromEulerAnglesXYZ
  30. angles=CFrame.Angles
  31. combo = 0
  32. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  33. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  34. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  35. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  36. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  37. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  38. RootPart=Character.HumanoidRootPart
  39. RootJoint=RootPart.RootJoint
  40. RootCF=euler(-1.57,0,3.14)
  41. attack = false
  42. attackdebounce = false
  43. trispeed=.2
  44. attackmode='none'
  45. local idle=0
  46. local Anim="Idle"
  47. stance = false
  48. local ff = 2
  49. noleg = false
  50. evadecooldown = false
  51. Humanoid.Animator.Parent = nil
  52. equip = false
  53. local Effects = {}
  54. attackspeed = 0.14
  55. df = false
  56. Swing = 1
  57. local sine = 0
  58. local change = 1
  59. local val = 0
  60. local speed = 0
  61. local rs = game:GetService("RunService").RenderStepped
  62. cam = workspace.CurrentCamera
  63. local RbxUtility = LoadLibrary("RbxUtility")
  64. local Create = RbxUtility.Create
  65. deb = game:GetService("Debris")
  66. Face.Transparency = 0
  67. --Face.Texture = "rbxassetid://176217905" --176217905
  68. Humanoid.WalkSpeed = 64
  69. local freefall = 0
  70. Head.Running.SoundId = "rbxassetid://758199523"
  71. Head.Running.Volume = 2
  72. local boost = false
  73. Humanoid.JumpPower = 88
  74. local musicnum = 1
  75.  
  76. local spd = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).magnitude + 10
  77. local dir = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).unit
  78. local GravPoint = RootPart.Velocity.y
  79. local NV = Vector3.new(0,0,0)
  80. print("Move list")
  81. print("---------")
  82. print("Shift = Boost")
  83. print("Ctrl = Mach Speed Boost")
  84. print("Q = Left QuickStep, E = Right QuickStep")
  85. print("C = Slide, in air to stomp")
  86. print("Jump Then Hold B near a wall to wallrun")
  87. print("M to change music, if you're standing still you'll do a special animation!")
  88. print("Space near a wall to walljump, away from a wall homing attack")
  89. music = Instance.new("Sound",PlayerGui)
  90. music.Volume = 1
  91. music.TimePosition = 0
  92. music.Pitch = 1
  93. music.SoundId = "rbxassetid://1251555494"
  94. music.Looped = true
  95. music:Play()
  96.  
  97.  
  98. boostsound = Instance.new("Sound",PlayerGui)
  99. boostsound.Volume = .6
  100. boostsound.TimePosition = 0
  101. boostsound.Pitch = 1
  102. boostsound.SoundId = "rbxassetid://924922553"
  103. boostsound.Looped = false
  104.  
  105.  
  106.  
  107. stompsound = Instance.new("Sound",PlayerGui)
  108. stompsound.Volume = 2
  109. stompsound.TimePosition = 0
  110. stompsound.Pitch = 1
  111. stompsound.SoundId = "rbxassetid://1295424184"
  112. stompsound.Looped = false
  113.  
  114.  
  115.  
  116. so = function(id,par,vol,pit)
  117. coroutine.resume(coroutine.create(function()
  118. local sou = Instance.new("Sound",par or workspace)
  119. sou.Volume=vol
  120. sou.Pitch=pit or 1
  121. sou.SoundId=id
  122. sou:play()
  123. game:GetService("Debris"):AddItem(sou,8)
  124. end))
  125. end
  126.  
  127. --save shoulders
  128. RSH, LSH=nil, nil
  129. --welds
  130. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  131. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  132. LH=Torso["Left Hip"]
  133. RH=Torso["Right Hip"]
  134. TorsoColor=Torso.BrickColor
  135. function NoOutline(Part)
  136. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  137. end
  138. player=Player
  139. ch=Character
  140. RSH=ch.Torso["Right Shoulder"]
  141. LSH=ch.Torso["Left Shoulder"]
  142. --
  143. RSH.Parent=nil
  144. LSH.Parent=nil
  145. --
  146. RW.Name="Right Shoulder"
  147. RW.Part0=ch.Torso
  148. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  149. RW.C1=cf(0, 0.5, 0)
  150. RW.Part1=ch["Right Arm"]
  151. RW.Parent=ch.Torso
  152. --
  153. LW.Name="Left Shoulder"
  154. LW.Part0=ch.Torso
  155. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  156. LW.C1=cf(0, 0.5, 0)
  157. LW.Part1=ch["Left Arm"]
  158. LW.Parent=ch.Torso
  159.  
  160.  
  161. newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
  162. local wld = Instance.new("Weld", wp1)
  163. wld.Part0 = wp0
  164. wld.Part1 = wp1
  165. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  166. end
  167. local rs = game:GetService("RunService").RenderStepped
  168.  
  169. newWeld(RootPart, Torso, 0, -1, 0)
  170. Torso.Weld.C1 = CFrame.new(0, -1, 0)
  171. newWeld(Torso, LeftLeg, -0.5, -1, 0)
  172. LeftLeg.Weld.C1 = CFrame.new(0, 1, 0)
  173. newWeld(Torso, RightLeg, 0.5, -1, 0)
  174. RightLeg.Weld.C1 = CFrame.new(0, 1, 0)
  175.  
  176. Player=game:GetService('Players').LocalPlayer
  177. Character=Player.Character
  178. mouse=Player:GetMouse()
  179. m=Instance.new('Model',Character)
  180.  
  181.  
  182. local function weldBetween(a, b)
  183. local weldd = Instance.new("ManualWeld")
  184. weldd.Part0 = a
  185. weldd.Part1 = b
  186. weldd.C0 = CFrame.new()
  187. weldd.C1 = b.CFrame:inverse() * a.CFrame
  188. weldd.Parent = a
  189. return weldd
  190. end
  191.  
  192. local Player = game:GetService('Players').LocalPlayer
  193. repeat wait() until Player.Character
  194. local Character = Player.Character
  195.  
  196. --All The Settings for Trails in this Script
  197. TrailSettings = {
  198.     Lifetime = 0.7,
  199.     Texture = 'rbxassetid://31270182',
  200.     --Color1 is for UpperBody and Accessories, Color2 is for Lower Body
  201.     Color1 = ColorSequence.new(BrickColor.new('Really blue').Color,BrickColor.new('Really blue').Color),
  202.     Color2 = ColorSequence.new(BrickColor.new('Really blue').Color,BrickColor.new('Really blue').Color),
  203.     AllBody = true,
  204.     UpperBodyOnly = false,
  205.     LowerBodyOnly = false,
  206.     Accessories = false,
  207.     Extras = true,
  208.     R15 = false, --Change to true if you're using R15
  209.     R15Parts = {
  210.         'UpperTorso',
  211.         'LowerTorso',
  212.     }
  213. }
  214.  
  215.  
  216. ArtificialHB = Instance.new("BindableEvent", script)
  217. ArtificialHB.Name = "Heartbeat"
  218.  
  219. script:WaitForChild("Heartbeat")
  220.  
  221. frame = 1 / 80
  222. tf = 0
  223. allowframeloss = false
  224. tossremainder = false
  225. lastframe = tick()
  226. script.Heartbeat:Fire()
  227. game:GetService("RunService").Heartbeat:connect(function(s, p)
  228. tf = tf + s
  229. if tf >= frame then
  230. if allowframeloss then
  231. script.Heartbeat:Fire()
  232. lastframe = tick()
  233. else
  234. for i = 1, math.floor(tf / frame) do
  235. script.Heartbeat:Fire()
  236. end
  237. lastframe = tick()
  238. end
  239. if tossremainder then
  240. tf = 0
  241. else
  242. tf = tf - frame * math.floor(tf / frame)
  243. end
  244. end
  245. end)
  246.  
  247. --[[]
  248. function swait(num)
  249. if num == 0 or num == nil then
  250. ArtificialHB.Event:wait()
  251. else
  252. for i = 0, num do
  253. ArtificialHB.Event:wait()
  254. end
  255. end
  256. end
  257.  
  258. ]]
  259.  
  260.  
  261.  
  262.  
  263. function swait(num)
  264. if num == 0 or num == nil then
  265. game:service("RunService").Stepped:wait()
  266. else
  267. for i = 0, num do
  268. game:service("RunService").Stepped:wait()
  269. end
  270. end
  271. end
  272.  
  273. function RemoveOutlines(part)
  274. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  275. end
  276.  
  277.  
  278. part = function(formfactor, parent, reflectance, transparency, brickcolor, name, size)
  279. local fp = it("Part")
  280. fp.formFactor = formfactor
  281. fp.Parent = parent
  282. fp.Reflectance = reflectance
  283. fp.Transparency = transparency
  284. fp.CanCollide = false
  285. fp.Locked = true
  286. fp.BrickColor = brickcolor
  287. fp.Name = name
  288. fp.Size = size
  289. fp.Position = Torso.Position
  290. NoOutline(fp)
  291. if fp.BrickColor == BrickColor.new("Dark indigo") then
  292. fp.Material = "Neon"
  293. else
  294. if fp.BrickColor == BrickColor.new("Really black") then
  295. fp.BrickColor = BrickColor.new("Really black")
  296. fp.Material = "Metal"
  297. else
  298. fp.Material = "Neon"
  299. end
  300. end
  301. fp:BreakJoints()
  302. return fp
  303. end
  304.  
  305. mesh = function(Mesh, part, meshtype, meshid, offset, scale)
  306. local mesh = it(Mesh)
  307. mesh.Parent = part
  308. if Mesh == "SpecialMesh" then
  309. mesh.MeshType = meshtype
  310. mesh.MeshId = meshid
  311. end
  312. mesh.Offset = offset
  313. mesh.Scale = scale
  314. return mesh
  315. end
  316.  
  317. weld = function(parent, part0, part1, c0)
  318. local weld = it("Weld")
  319. weld.Parent = parent
  320. weld.Part0 = part0
  321. weld.Part1 = part1
  322. weld.C0 = c0
  323. return weld
  324. end
  325.  
  326. F1 = Instance.new("Folder", Character)
  327. F1.Name = "Effects Folder"
  328. F2 = Instance.new("Folder", F1)
  329. F2.Name = "Effects"
  330. Triangle = function(a, b, c)
  331. end
  332.  
  333. MagicBlock = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  334. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
  335. prt.Anchored = true
  336. prt.CanCollide = false
  337. prt.CFrame = cframe
  338. prt.Name = "prt"
  339. msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  340. game:GetService("Debris"):AddItem(prt, 5)
  341. table.insert(Effects, {prt, "Block1", delay, x3, y3, z3})
  342. end
  343.  
  344.  
  345.  
  346. MagicCircle = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  347. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
  348. prt.Anchored = true
  349. prt.CanCollide = false
  350. prt.CFrame = cframe
  351. prt.Name = "prt"
  352. local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
  353. game:GetService("Debris"):AddItem(prt, 5)
  354. table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3})
  355. end
  356.  
  357. MagicWave = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  358. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
  359. prt.Anchored = true
  360. prt.CFrame = cframe
  361. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, 0), vt(x1, y1, z1))
  362. game:GetService("Debris"):AddItem(prt, 5)
  363. table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3})
  364. end
  365.  
  366. MagicCylinder = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  367. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2))
  368. prt.Anchored = true
  369. prt.CFrame = cframe
  370. msh = mesh("SpecialMesh", prt, "Head", "", vt(0, 0, 0), vt(x1, y1, z1))
  371. game:GetService("Debris"):AddItem(prt, 5)
  372. Effects[#Effects + 1] = {prt, "Cylinder", delay, x3, y3, z3}
  373. end
  374.  
  375. MagicCylinder2 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  376. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2))
  377. prt.Anchored = true
  378. prt.CFrame = cframe
  379. msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  380. game:GetService("Debris"):AddItem(prt, 5)
  381. Effects[#Effects + 1] = {prt, "Cylinder", delay, x3, y3, z3}
  382. end
  383.  
  384. MagicBlood = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  385. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
  386. prt.Anchored = true
  387. prt.CFrame = cframe
  388. local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
  389. game:GetService("Debris"):AddItem(prt, 5)
  390. table.insert(Effects, {prt, "Blood", delay, x3, y3, z3})
  391. end
  392.  
  393. ElecEffect = function(cff, x, y, z)
  394. local prt = part(3, F2, 0, 0, BrickColor.new("Dark indigo"), "Part", vt(1, 1, 1))
  395. prt.Anchored = true
  396. prt.CFrame = cff * cf(math.random(-x, x), math.random(-y, y), math.random(-z, z))
  397. prt.CFrame = cf(prt.Position)
  398. game:GetService("Debris"):AddItem(prt, 2)
  399. xval = math.random() / 2
  400. yval = math.random() / 2
  401. zval = math.random() / 2
  402. msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(xval, yval, zval))
  403. Effects[#Effects + 1] = {prt, "Elec", 0.1, x, y, z, xval, yval, zval}
  404. end
  405.  
  406. function FindNearestTorso(Position, Distance, SinglePlayer)
  407. if SinglePlayer then
  408. return (SinglePlayer.Torso.CFrame.p - Position).magnitude < Distance
  409. end
  410. local List = {}
  411. for i, v in pairs(workspace:GetChildren()) do
  412. if v:IsA("Model") then
  413. if v:findFirstChild("Torso") then
  414. if v ~= Character then
  415. if (v.Torso.Position - Position).magnitude <= Distance then
  416. table.insert(List, v)
  417. end
  418. end
  419. end
  420. end
  421. end
  422. return List
  423. end
  424.  
  425.  
  426. function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  427. local Part = Create("Part"){
  428. Parent = Parent,
  429. Reflectance = Reflectance,
  430. Transparency = Transparency,
  431. CanCollide = false,
  432. Locked = true,
  433. BrickColor = BrickColor.new(tostring(BColor)),
  434. Name = Name,
  435. Size = Size,
  436. Material = Material,
  437. }
  438. RemoveOutlines(Part)
  439. return Part
  440. end
  441.  
  442. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  443. local Msh = Create(Mesh){
  444. Parent = Part,
  445. Offset = OffSet,
  446. Scale = Scale,
  447. }
  448. if Mesh == "SpecialMesh" then
  449. Msh.MeshType = MeshType
  450. Msh.MeshId = MeshId
  451. end
  452. return Msh
  453. end
  454.  
  455.  
  456.  
  457. function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  458. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  459. prt.Anchored = true
  460. prt.CFrame = cframe
  461. local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  462. game:GetService("Debris"):AddItem(prt, 10)
  463. if Type == 1 or Type == nil then
  464. table.insert(Effects, {
  465. prt,
  466. "Block1",
  467. delay,
  468. x3,
  469. y3,
  470. z3,
  471. msh
  472. })
  473. elseif Type == 2 then
  474. table.insert(Effects, {
  475. prt,
  476. "Block2",
  477. delay,
  478. x3,
  479. y3,
  480. z3,
  481. msh
  482. })
  483. end
  484. end
  485.  
  486. function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  487. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  488. prt.Anchored = true
  489. prt.CFrame = cframe
  490. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  491. game:GetService("Debris"):AddItem(prt, 10)
  492. table.insert(Effects, {
  493. prt,
  494. "Cylinder",
  495. delay,
  496. x3,
  497. y3,
  498. z3,
  499. msh
  500. })
  501. end
  502.  
  503. function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay,material)
  504. local prt=CreatePart(workspace,material,0,0,brickcolor,"Effect",vt(.5,.5,.5))--part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  505. prt.Anchored=true
  506. prt.CFrame=cframe
  507. msh=CreateMesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  508. game:GetService("Debris"):AddItem(prt,2)
  509. coroutine.resume(coroutine.create(function(Part,Mesh,num)
  510. for i=0,1,delay do
  511. swait()
  512. Part.Transparency=i
  513. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  514. end
  515. Part.Parent=nil
  516. end),prt,msh,(math.random(0,1)+math.random())/5)
  517. end
  518.  
  519. function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  520. local prt = CreatePart(workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  521. prt.Anchored = true
  522. prt.CFrame = cframe
  523. local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  524. game:GetService("Debris"):AddItem(prt, 10)
  525. table.insert(Effects, {
  526. prt,
  527. "Cylinder",
  528. delay,
  529. x3,
  530. y3,
  531. z3,
  532. msh
  533. })
  534. end
  535.  
  536. function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  537. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  538. prt.Anchored = true
  539. prt.CFrame = cframe
  540. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  541. game:GetService("Debris"):AddItem(prt, 10)
  542. table.insert(Effects, {
  543. prt,
  544. "Cylinder",
  545. delay,
  546. x3,
  547. y3,
  548. z3,
  549. msh
  550. })
  551. end
  552.  
  553. function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  554. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  555. prt.Anchored = true
  556. prt.CFrame = cframe
  557. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  558. game:GetService("Debris"):AddItem(prt, 10)
  559. table.insert(Effects, {
  560. prt,
  561. "Cylinder",
  562. delay,
  563. x3,
  564. y3,
  565. z3,
  566. msh
  567. })
  568. end
  569.  
  570.  
  571. function MoonEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  572. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  573. prt.Anchored = true
  574. prt.CFrame = cframe
  575. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://259403370", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  576. game:GetService("Debris"):AddItem(prt, 10)
  577. table.insert(Effects, {
  578. prt,
  579. "Cylinder",
  580. delay,
  581. x3,
  582. y3,
  583. z3,
  584. msh
  585. })
  586. end
  587.  
  588. function HeadEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  589. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  590. prt.Anchored = true
  591. prt.CFrame = cframe
  592. local msh = CreateMesh("SpecialMesh", prt, "Head", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  593. game:GetService("Debris"):AddItem(prt, 10)
  594. table.insert(Effects, {
  595. prt,
  596. "Cylinder",
  597. delay,
  598. x3,
  599. y3,
  600. z3,
  601. msh
  602. })
  603. end
  604.  
  605. function BreakEffect(brickcolor, cframe, x1, y1, z1)
  606. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  607. prt.Anchored = true
  608. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  609. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  610. local num = math.random(10, 50) / 1000
  611. game:GetService("Debris"):AddItem(prt, 10)
  612. table.insert(Effects, {
  613. prt,
  614. "Shatter",
  615. num,
  616. prt.CFrame,
  617. math.random() - math.random(),
  618. 0,
  619. math.random(50, 100) / 100
  620. })
  621. end
  622.  
  623. local lerp = function(a, b, t)
  624. return a * (1 - t) + b * t
  625. end
  626.  
  627. function clerp(a,b,t)
  628. local qa = {QuaternionFromCFrame(a)}
  629. local qb = {QuaternionFromCFrame(b)}
  630. local ax, ay, az = a.x, a.y, a.z
  631. local bx, by, bz = b.x, b.y, b.z
  632. local _t = 1-t
  633. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  634. end
  635.  
  636. function QuaternionFromCFrame(cf)
  637. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  638. local trace = m00 + m11 + m22
  639. if trace > 0 then
  640. local s = math.sqrt(1 + trace)
  641. local recip = 0.5/s
  642. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  643. else
  644. local i = 0
  645. if m11 > m00 then
  646. i = 1
  647. end
  648. if m22 > (i == 0 and m00 or m11) then
  649. i = 2
  650. end
  651. if i == 0 then
  652. local s = math.sqrt(m00-m11-m22+1)
  653. local recip = 0.5/s
  654. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  655. elseif i == 1 then
  656. local s = math.sqrt(m11-m22-m00+1)
  657. local recip = 0.5/s
  658. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  659. elseif i == 2 then
  660. local s = math.sqrt(m22-m00-m11+1)
  661. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  662. end
  663. end
  664. end
  665.  
  666.  
  667. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  668. local xs, ys, zs = x + x, y + y, z + z
  669. local wx, wy, wz = w*xs, w*ys, w*zs
  670. local xx = x*xs
  671. local xy = x*ys
  672. local xz = x*zs
  673. local yy = y*ys
  674. local yz = y*zs
  675. local zz = z*zs
  676. 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))
  677. end
  678. function QuaternionSlerp(a, b, t)
  679. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  680. local startInterp, finishInterp;
  681. if cosTheta >= 0.0001 then
  682. if (1 - cosTheta) > 0.0001 then
  683. local theta = math.acos(cosTheta)
  684. local invSinTheta = 1/math.sin(theta)
  685. startInterp = math.sin((1-t)*theta)*invSinTheta
  686. finishInterp = math.sin(t*theta)*invSinTheta
  687. else
  688. startInterp = 1-t
  689. finishInterp = t
  690. end
  691. else
  692. if (1+cosTheta) > 0.0001 then
  693. local theta = math.acos(-cosTheta)
  694. local invSinTheta = 1/math.sin(theta)
  695. startInterp = math.sin((t-1)*theta)*invSinTheta
  696. finishInterp = math.sin(t*theta)*invSinTheta
  697. else
  698. startInterp = t-1
  699. finishInterp = t
  700. end
  701. end
  702. 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
  703. end
  704.  
  705. function weld5(part0, part1, c0, c1)
  706. weeld=Instance.new("Weld", part0)
  707. weeld.Part0=part0
  708. weeld.Part1=part1
  709. weeld.C0=c0
  710. weeld.C1=c1
  711. return weeld
  712. end
  713.  
  714. --Example: Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.4)
  715.  
  716. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  717. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  718. end
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725. Character.Humanoid.MaxHealth = 120
  726. Character.Humanoid.Health = 120
  727.  
  728. local f = 0
  729. local b = Instance.new("BlurEffect",cam)
  730. local c = Instance.new('PointLight', Torso)
  731. c.Range = 16
  732. c.Color = Color3.new(0, 1,1)
  733. c.Brightness = 1.5
  734. game:GetService("RunService"):BindToRenderStep("W0tT", 0, function()
  735.  
  736. b.Size = b.Size - 4
  737. if boost == true then
  738. c.Enabled = true
  739. cam.FieldOfView = lerp(cam.FieldOfView, 110, 0.5)
  740. -- cam.FieldOfView = 110
  741. freefall = 0
  742. Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,3),0.25)
  743. SphereEffect(BrickColor.new("Cyan"),RightLeg.CFrame*CFrame.new(0,-1,0)*angles(math.random(-180,180),math.random(-180,180),math.random(-180,180)),1.4,12,1.4,2.8,26,2.8,0.07)
  744. SphereEffect(BrickColor.new("Cyan"),LeftLeg.CFrame*CFrame.new(0,-1,0)*angles(math.random(-180,180),math.random(-180,180),math.random(-180,180)),1.4,12,1.4,2.8,26,2.8,0.07)
  745. if hitfloor ~= nil and Anim ~= "runIdle" then
  746. SpecialEffect(BrickColor.new("Cyan"),RootPart.CFrame*CFrame.new(0,-3.4,.78) ,2,2,2, 1.5,1.5,1.5,.09)
  747. end
  748. end
  749. if boost == false then
  750. cam.FieldOfView = lerp(cam.FieldOfView, 70, 0.076)
  751. --cam.FieldOfView = 70
  752. c.Enabled = false
  753. end
  754. end)
  755.  
  756.  
  757.  
  758. mouse.KeyDown:connect(function(key)
  759. if string.byte(key) == 48 then
  760. b.Size = 40
  761. Swing = 2
  762. freefall = 0
  763.  
  764. coroutine.resume(coroutine.create(function()
  765. for i = 0,1,0.1 do
  766. swait()
  767. Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(math.random(-0.35*1.8,0.35*1.8),math.random(-0.35*1.8,0.35*1.8),math.random(-0.35*1.8,0.35*1.8)),0.24)
  768. end
  769. end))
  770. Humanoid.WalkSpeed = 180
  771. RootPart.Velocity = RootPart.CFrame.lookVector*150
  772. RingEffect(BrickColor.new("Cyan"), RootPart.CFrame*CFrame.new(0,0,-9.2) , 1, 1, 1, 8, 8, 8, 0.14,"Neon")
  773. boost = true
  774. boostsound:Play()
  775. end
  776. end)
  777.  
  778. mouse.KeyUp:connect(function(key)
  779. if string.byte(key) == 48 then
  780. Swing = 1
  781. Humanoid.WalkSpeed = 64
  782. boost = false
  783. boostsound:Stop()
  784.  
  785. end
  786. end)
  787.  
  788.  
  789.  
  790.  
  791. mouse.KeyDown:connect(function(key)
  792. if string.byte(key) == 50 then
  793. b.Size = 40
  794. freefall = 0
  795. Swing = 2
  796.  
  797. coroutine.resume(coroutine.create(function()
  798. for i = 0,1,0.1 do
  799. swait()
  800. Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(math.random(-0.35*2.8,0.35*2.8),math.random(-0.35*2.8,0.35*2.8),math.random(-0.35*2.8,0.35*2.8)),0.48)
  801. end
  802. end))
  803.  
  804. Humanoid.WalkSpeed = 320
  805. RootPart.Velocity = RootPart.CFrame.lookVector*550
  806. RingEffect(BrickColor.new("Cyan"), RootPart.CFrame*CFrame.new(0,0,-9.2) , 1, 1, 1, 18, 18, 18, 0.14,"Neon")
  807. RingEffect(BrickColor.new("White"), RootPart.CFrame*CFrame.new(0,0,-11.2) , 1, 1, 1, 18, 18, 18, 0.14,"Neon")
  808. RingEffect(BrickColor.new("Cyan"), RootPart.CFrame*CFrame.new(0,0,-13.2) , 1, 1, 1, 18, 18, 18, 0.14,"Neon")
  809. boost = true
  810. boostsound:Play()
  811. end
  812. end)
  813.  
  814. mouse.KeyUp:connect(function(key)
  815. if string.byte(key) == 50 then
  816. Swing = 1
  817. Humanoid.WalkSpeed = 64
  818. boost = false
  819. boostsound:Stop()
  820.  
  821. end
  822. end)
  823.  
  824.  
  825. local lastwall = nil
  826. local jumped = false
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833. local vwall = false
  834.  
  835. mouse.KeyDown:connect(function(key)
  836. if key == 'b' and hitfloor == nil and attack == false then
  837. vrun()
  838. end
  839. end)
  840.  
  841.  
  842. function vrun()
  843. local ray = Ray.new(
  844. RootPart.CFrame.p, RootPart.CFrame.lookVector *2.5
  845. )
  846. local hit, position, normal = workspace:FindPartOnRay(ray, character)
  847.  
  848. if hit then
  849. if hit.Parent.Parent ~= Character and hit.Parent ~= Character and hit.Name ~= "prt" and hit.CanCollide == true then
  850. vwall = true
  851. local NV = Vector3.new(0,0,0)
  852. local spd = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).magnitude + 10
  853. local dir = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).unit
  854. local GravPoint = RootPart.Velocity.y
  855. local velo = Instance.new("BodyVelocity",Torso)
  856. velo.MaxForce = Vector3.new(400000,400000,400000)
  857.  
  858. attack = true
  859. while vwall == true and ray and hit do
  860. swait()
  861. change = 0.84+ Humanoid.WalkSpeed/132
  862. if Humanoid.WalkSpeed > 40 and Humanoid.WalkSpeed < 70 then
  863. velo.Velocity = Vector3.new(0,40,0)
  864. end
  865. if Humanoid.WalkSpeed > 70 and Humanoid.WalkSpeed < 200 then
  866. velo.Velocity = Vector3.new(0,80,0)
  867. end
  868. if Humanoid.WalkSpeed > 200 then
  869. velo.Velocity = Vector3.new(0,130,0)
  870. end
  871. ray = Ray.new(
  872. RootPart.CFrame.p, RootPart.CFrame.lookVector *2.5
  873. )
  874. hit, position, normal = workspace:FindPartOnRay(ray, character)
  875. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.52*math.cos(sine/2), .6) * angles(math.rad(96), math.rad(0), math.rad(0)+ RootPart.RotVelocity.Y / 26), .1)
  876. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-11+20*math.sin(sine/2)),math.rad(0),math.rad(0+5*math.sin(sine/4)) + RootPart.RotVelocity.Y / 13),.1)
  877. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.1) * angles(math.rad(-90-7*math.sin(sine/4))+ RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(15+2*math.sin(sine/4))- RootPart.RotVelocity.Y / 34),.15)
  878. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0.1)*angles(math.rad(-90-7*math.sin(sine/4))+ RootPart.RotVelocity.Y / 34,math.rad(0),math.rad(-15+2*math.sin(sine/4))+ RootPart.RotVelocity.Y / -34),.15)
  879. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.28*math.cos(sine/4), 0-0.32*math.cos(sine/4)) * CFrame.Angles(math.rad(0+104*math.sin(sine/4)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)+ RootPart.RotVelocity.Y / -54), 0.3+ Humanoid.WalkSpeed/272)
  880. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1-0.28*math.cos(sine/4),0+0.32*math.cos(sine/4)) * CFrame.Angles(math.rad(0-104*math.sin(sine/4)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)- RootPart.RotVelocity.Y / 54), 0.3+ Humanoid.WalkSpeed/272)
  881. end
  882. velo:Destroy()
  883. wait(0.07)
  884.  
  885. if vwall == false then
  886.  
  887. RootPart.Velocity = -RootPart.CFrame.lookVector*68 + Vector3.new(0,86,0)
  888.  
  889. --[[]
  890. for i = 0,5,0.2 do
  891. rs:wait()
  892. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -0.79, 0) * CFrame.Angles(math.rad(0+100*i), math.rad(0), math.rad(0)), 0.2)
  893. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(20),math.rad(0),math.rad(0)),.2)
  894. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(180), math.rad(-60), math.rad(40)),.2)
  895. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(180), math.rad(60), math.rad(-40)),.2)
  896. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  897. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  898. end
  899. ]]
  900.  
  901.  
  902. for i = 0,4,0.1 do
  903. swait()
  904. Humanoid.CameraOffset = Vector3.new(0,0,0)
  905. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0+260*i), math.rad(0), math.rad(0)), 0.6)
  906. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(70),math.rad(0),math.rad(0)),.1)
  907. RW.C0 = clerp(RW.C0, CFrame.new(.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.1)
  908. LW.C0 = clerp(LW.C0, CFrame.new(-.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.1)
  909. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1)
  910. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1)
  911. end
  912.  
  913. attack = false
  914.  
  915.  
  916. end
  917.  
  918.  
  919. if vwall == true then
  920. RootPart.Velocity = RootPart.CFrame.lookVector*38 + Vector3.new(0,86,0)
  921.  
  922. --[[]
  923. for i = 0,5,0.2 do
  924. rs:wait()
  925. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -0.79, 0) * CFrame.Angles(math.rad(0+100*i), math.rad(0), math.rad(0)), 0.2)
  926. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(20),math.rad(0),math.rad(0)),.2)
  927. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(180), math.rad(-60), math.rad(40)),.2)
  928. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(180), math.rad(60), math.rad(-40)),.2)
  929. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  930. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  931. end
  932. ]]
  933.  
  934.  
  935. for i = 0,4,0.15 do
  936. swait()
  937. Humanoid.CameraOffset = Vector3.new(0,0,0)
  938. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0-260*i), math.rad(0), math.rad(0)), 0.6)
  939. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(70),math.rad(0),math.rad(0)),.1)
  940. RW.C0 = clerp(RW.C0, CFrame.new(.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.1)
  941. LW.C0 = clerp(LW.C0, CFrame.new(-.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.1)
  942. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1)
  943. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1)
  944. end
  945.  
  946. attack = false
  947.  
  948. end
  949.  
  950.  
  951. end
  952. end
  953. end
  954.  
  955.  
  956.  
  957.  
  958. mouse.KeyUp:connect(function(key)
  959. if key == 'b' and vwall == true then
  960. vwall = false
  961. end
  962. end)
  963.  
  964.  
  965.  
  966.  
  967.  
  968. function Ldash()
  969.  
  970.  
  971.  
  972. evadecooldown = true
  973. attack = true
  974. k = math.random(1,2)
  975. if k == 1 then
  976. so("http://www.roblox.com/asset/?id=807766310", Head, 2.5, 1)
  977. else
  978. so("http://www.roblox.com/asset/?id=807768137", Head, 2.5, 1)
  979. end
  980.  
  981.  
  982.  
  983.  
  984.  
  985. --+173.8*i
  986. for i = 0,.7,0.1 do
  987. swait()
  988. Head.Velocity = Head.CFrame.rightVector * -135
  989. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(32)), 0.2)
  990. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(-9),math.rad(-14)),.2)
  991. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -0.2) * angles(math.rad(27), math.rad(0), math.rad(30)),.2)
  992. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(30)),.2)
  993. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(12)), 0.2)
  994. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(8)), 0.2)
  995. end
  996.  
  997. attack = false
  998. wait(0.08)
  999. evadecooldown = false
  1000.  
  1001.  
  1002. end
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008. function Rdash()
  1009.  
  1010.  
  1011.  
  1012. evadecooldown = true
  1013. attack = true
  1014. k = math.random(1,2)
  1015. if k == 1 then
  1016. so("http://www.roblox.com/asset/?id=807766310", Head, 2.5, 1)
  1017. else
  1018. so("http://www.roblox.com/asset/?id=807768137", Head, 2.5, 1)
  1019. end
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025. --+173.8*i
  1026. for i = 0,.7,0.1 do
  1027. swait()
  1028. Head.Velocity = Head.CFrame.rightVector * 135
  1029. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-32)), 0.2)
  1030. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(9),math.rad(14)),.2)
  1031. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(-30)),.2)
  1032. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0.2) * angles(math.rad(27), math.rad(0), math.rad(-30)),.2)
  1033. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-8)), 0.2)
  1034. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-12)), 0.2)
  1035. end
  1036.  
  1037. attack = false
  1038. wait(0.08)
  1039. evadecooldown = false
  1040.  
  1041.  
  1042. end
  1043. local sliding = false
  1044.  
  1045.  
  1046. function Slide()
  1047.  
  1048. local spd = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).magnitude + 10
  1049. spd = spd + 30
  1050. local dir = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).unit
  1051. local GravPoint = RootPart.Velocity.y
  1052. if spd > 40 and hitfloor ~= nil then
  1053. noleg = true
  1054.  
  1055. attack = true
  1056. k = math.random(1,2)
  1057. if k == 1 then
  1058. so("http://www.roblox.com/asset/?id=807766310", Head, 2.5, 1)
  1059. else
  1060. so("http://www.roblox.com/asset/?id=807768137", Head, 2.5, 1)
  1061. end
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072. local NV = Vector3.new(0,0,0)
  1073. local bv = Instance.new("BodyVelocity", Torso)
  1074. bv.maxForce = Vector3.new(1/0,1/0,1/0)
  1075. bv.velocity = dir*spd
  1076. local bg = Instance.new("BodyGyro", Torso)
  1077. bg.maxTorque = Vector3.new(1/0,1/0,1/0)
  1078. bg.cframe = CFrame.new(NV, dir) * CFrame.Angles(math.pi/2.2,0.24,0)
  1079. Head.Running.SoundId = "rbxassetid://1295468446"
  1080. Head.Running.TimePosition = 0
  1081.  
  1082. Humanoid.PlatformStand = true
  1083. while spd > 2 and hitfloor ~= nil and sliding == true do
  1084. swait()
  1085. spd = spd - 0.95
  1086. bv.velocity = dir*spd + Vector3.new(0,0,0)
  1087. bg.cframe = CFrame.new(NV, dir) * CFrame.Angles(math.pi/2.2,0.24,0)
  1088. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -2.3, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(12)), 0.2)
  1089. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(34),math.rad(0),math.rad(12)),.2)
  1090. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(110), math.rad(0), math.rad(70)),.2)
  1091. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0.2) * angles(math.rad(0), math.rad(0), math.rad(-60)),.2)
  1092. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  1093. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -0.56, -0.2) * CFrame.Angles(math.rad(-24), math.rad(0), math.rad(0)), 0.2)
  1094. end
  1095. bv:Destroy()
  1096. bg:Destroy()
  1097. Head.Running.SoundId = "rbxassetid://758199523"
  1098. Head.Running.TimePosition = 0
  1099. Humanoid.PlatformStand = false
  1100. attack = false
  1101. sliding = false
  1102. wait(0.05)
  1103. evadecooldown = false
  1104.  
  1105.  
  1106. end
  1107. end
  1108.  
  1109. function land()
  1110. attack = true
  1111. RootPart.Velocity = Vector3.new(0,0,0)
  1112. WaveEffect(BrickColor.new("Cyan"), RootPart.CFrame*CFrame.new(0,-1,0) , 1, 1, 1, 3, 0.8, 3, 0.06)
  1113. so("http://www.roblox.com/asset/?id=1295424585", Torso, 3.5, 1)
  1114.  
  1115. coroutine.resume(coroutine.create(function()
  1116. for i = 0,1,0.1 do
  1117. swait()
  1118. Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(math.random(-0.55*2.8,0.55*2.8),math.random(-0.55*2.8,0.55*2.8),math.random(-0.55*2.8,0.55*2.8)),0.44)
  1119. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -2, 0) * CFrame.Angles(math.rad(-16), math.rad(0), math.rad(0)), 0.5)
  1120. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(7),math.rad(0),math.rad(0)),.5)
  1121. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(87)),.5)
  1122. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0) * angles(math.rad(0), math.rad(0), math.rad(-87)),.5)
  1123. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, 0, -0.5) * CFrame.Angles(math.rad(16), math.rad(0), math.rad(0)), 0.5)
  1124. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1.14, 0.2) * CFrame.Angles(math.rad(-17), math.rad(0), math.rad(0)), 0.5)
  1125.  
  1126. end
  1127. attack = false
  1128.  
  1129.  
  1130. end))
  1131.  
  1132.  
  1133.  
  1134. end
  1135.  
  1136.  
  1137.  
  1138.  
  1139. function stomp()
  1140. attack = true
  1141. stompsound:Play()
  1142.  
  1143. while hitfloor == nil do
  1144. swait()
  1145. b.Size = 12
  1146. WaveEffect(BrickColor.new("Cyan"), LeftLeg.CFrame*CFrame.new(0,-2.4,0) , 1, 1, 1, 0.8, 0.8, 0.8, 0.14)
  1147. RootPart.Velocity = Vector3.new(0,RootPart.Velocity.y/1.6,0) +Vector3.new(0,-150,0)
  1148. Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15)
  1149. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0.2) * CFrame.Angles(math.rad(0+4*math.sin(sine/1.3)), math.rad(0), math.rad(0)),0.07)
  1150. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.65, 0) * angles(math.rad(0), math.rad(0), math.rad(140+12*math.cos(sine/1.3))), 0.07)
  1151. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.65, 0) * angles(math.rad(0), math.rad(0), math.rad(-140+12*math.cos(sine/1.3))), 0.07)
  1152. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(60+7*math.sin(sine/1.3)),math.rad(0),math.rad(0)),0.07)
  1153. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.17*math.cos(sine/1.3), -0.13) * CFrame.Angles(math.rad(0+4*math.cos(sine/1.3)), math.rad(3), math.rad(0)), 0.1)
  1154. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, .27+0.17*math.cos(sine/1.3), -0.56) * CFrame.Angles(math.rad(-12+4*math.cos(sine/1.3)), math.rad(0), math.rad(0)), 0.1)
  1155.  
  1156. end
  1157. stompsound:Stop()
  1158. land()
  1159.  
  1160.  
  1161. end
  1162.  
  1163.  
  1164. function changemusic()
  1165. musicnum = musicnum + 1
  1166. music.TimePosition = 0
  1167. local osix = false
  1168. local spd = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).magnitude
  1169. if musicnum > 14 then
  1170. musicnum = 1
  1171. end
  1172. if musicnum == 1 then
  1173. music.SoundId = "rbxassetid://179029173"
  1174. end
  1175. if musicnum == 2 then
  1176. music.SoundId = "rbxassetid://146443855"
  1177. end
  1178. if musicnum == 3 then
  1179. music.SoundId = "rbxassetid://1342408291"
  1180. end
  1181. if musicnum == 4 then
  1182. music.SoundId = "rbxassetid://201219416"
  1183. end
  1184. if musicnum == 5 then
  1185. music.SoundId = "rbxassetid://1390472571"
  1186. end
  1187. if musicnum == 6 then
  1188. osix = true
  1189. music.SoundId = "rbxassetid://249974783"
  1190. end
  1191. if musicnum == 7 then
  1192. music.SoundId = "rbxassetid://1851880603"
  1193. end
  1194. if musicnum == 8 then
  1195. music.SoundId = "rbxassetid://412034984"
  1196. end
  1197. if musicnum == 9 then
  1198. music.SoundId = "rbxassetid://536915629"
  1199. end
  1200. if musicnum == 10 then
  1201. music.SoundId = "rbxassetid://1200005861"
  1202. end
  1203. if musicnum == 11 then
  1204. music.SoundId = "rbxassetid://1055930631"
  1205. end
  1206. if musicnum == 12 then
  1207. music.SoundId = "rbxassetid://300269553"
  1208. end
  1209. if musicnum == 13 then
  1210. music.SoundId = "rbxassetid://199897052"
  1211. end
  1212. if musicnum == 14 then
  1213. music.SoundId = "rbxassetid://638115895"
  1214. end
  1215.  
  1216. if spd < 14 then
  1217. Humanoid.Jump = true
  1218.  
  1219. if osix == false then
  1220. so("rbxassetid://537371462",PlayerGui,2,1)
  1221. end
  1222.  
  1223.  
  1224. RootPart.Velocity = Vector3.new(0,102,0)
  1225. attack = true
  1226. wait(0.08)
  1227. for i = 0,7,0.1 do
  1228. swait()
  1229. RootPart.Velocity = Vector3.new(0,2,0)
  1230. Humanoid.CameraOffset = Vector3.new(0,0,0)
  1231. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0-260*i), math.rad(0), math.rad(0)), 0.6)
  1232. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(70),math.rad(0),math.rad(0)),.1)
  1233. RW.C0 = clerp(RW.C0, CFrame.new(.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.1)
  1234. LW.C0 = clerp(LW.C0, CFrame.new(-.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.1)
  1235. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1)
  1236. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1)
  1237.  
  1238. end
  1239. b.Size = 40
  1240. MoonEffect(BrickColor.new("Cyan"), RootPart.CFrame*CFrame.new(0,0,0) , 1, 1, 1, 8, 8, 8, 0.06)
  1241.  
  1242. if osix == true then
  1243. osix = false
  1244. so("rbxassetid://156821036",PlayerGui,2,1)
  1245. end
  1246.  
  1247. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -3, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 1)
  1248. for i = 0,5,0.1 do
  1249. swait()
  1250. RootPart.Velocity = Vector3.new(0,3.5,0)
  1251. Humanoid.CameraOffset = Vector3.new(0,0,0)
  1252. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1+0.1*i, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.21)
  1253. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(22-2*i),math.rad(0),math.rad(0)),.21)
  1254. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5+0.09*i, 0) * angles(math.rad(20-6*i), math.rad(0), math.rad(90+13*i)), 0.21)
  1255. LW.C0 = clerp(LW.C0, CFrame.new(-1.0-0.12*i, 0.5, -0.4+0.05*i) * angles(math.rad(20+13*i), math.rad(0), math.rad(20-13*i)), 0.21)
  1256. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(45+6*i), math.rad(0), math.rad(-22-4*i)), 0.21)
  1257. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(45+6*i), math.rad(0), math.rad(22+4*i)), 0.21)
  1258. end
  1259. attack = false
  1260. end
  1261. end
  1262.  
  1263.  
  1264. mouse.KeyDown:connect(function(key)
  1265. if key == 'q' and attack == false and evadecooldown == false then
  1266. Ldash()
  1267. end
  1268. end)
  1269.  
  1270.  
  1271.  
  1272. mouse.KeyDown:connect(function(key)
  1273. if key == 'e' and attack == false and evadecooldown == false then
  1274. Rdash()
  1275. end
  1276. end)
  1277.  
  1278. mouse.KeyDown:connect(function(key)
  1279. if key == 'c' and attack == false and evadecooldown == false and hitfloor ~= nil then
  1280. sliding = true
  1281. Slide()
  1282. end
  1283. end)
  1284.  
  1285. mouse.KeyDown:connect(function(key)
  1286. if key == 'c' and attack == false and hitfloor == nil then
  1287. stomp()
  1288. end
  1289. end)
  1290.  
  1291.  
  1292. local walljump = false
  1293.  
  1294.  
  1295. function walljumpp()
  1296. local ray = Ray.new(
  1297. Torso.CFrame.p, RootPart.CFrame.lookVector *5
  1298. )
  1299. local hit, position, normal = workspace:FindPartOnRay(ray, character)
  1300.  
  1301. if hit then
  1302. if hit.Parent.Parent ~= Character and hit.Parent ~= Character then
  1303. local dir = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).unit
  1304. GravPoint = 0
  1305. freefall = 0
  1306. walljump = true
  1307. Humanoid.AutoRotate = false
  1308. local velo = Instance.new("BodyVelocity",Torso)
  1309. velo.MaxForce = Vector3.new(400000,400000,400000)
  1310. --game.Debris:AddItem(velo,0.1)
  1311. attack = true
  1312. while hitfloor == nil and walljump == true and ray and hit do
  1313. swait()
  1314. freefall = 0
  1315. GravPoint = GravPoint - 0.36
  1316. ray = Ray.new(
  1317. RootPart.CFrame.p, RootPart.CFrame.lookVector *2.5
  1318. )
  1319. hit, position, normal = workspace:FindPartOnRay(ray, character)
  1320. velo.Velocity = vt(0,GravPoint,0)
  1321. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0.9) * CFrame.Angles(math.rad(5), math.rad(90), math.rad(8)), 0.2)
  1322. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(7),math.rad(0),math.rad(86)),.2)
  1323. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(120)),.2)
  1324. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-60)),.2)
  1325. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(-6), math.rad(14), math.rad(-12)), 0.2)
  1326. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(23)), 0.2)
  1327. end
  1328. if walljump == false then
  1329. k = math.random(1,3)
  1330. if k == 1 then
  1331. so("http://www.roblox.com/asset/?id=800121776", Head, 2.5, 1)
  1332. else if k == 2 then
  1333. so("http://www.roblox.com/asset/?id=804889329", Head, 2.5, 1)
  1334. else if k == 3 then
  1335. so("http://www.roblox.com/asset/?id=804907617", Head, 2.5, 1)
  1336. end
  1337. end
  1338. end
  1339.  
  1340. velo:Destroy()
  1341. attack = false
  1342. coroutine.resume(coroutine.create(function()
  1343. for i = 0,1,0.1 do
  1344. swait()
  1345. Humanoid.CameraOffset = Vector3.new(0,0,0)
  1346. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0+260*i), math.rad(0), math.rad(0)), 0.6)
  1347. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(70),math.rad(0),math.rad(0)),.1)
  1348. RW.C0 = clerp(RW.C0, CFrame.new(.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.1)
  1349. LW.C0 = clerp(LW.C0, CFrame.new(-.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.1)
  1350. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1)
  1351. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1)
  1352. end
  1353. end))
  1354.  
  1355. Humanoid.AutoRotate = true
  1356. RootPart.Velocity = RootPart.CFrame.lookVector * -137 + Vector3.new(0,136,0)
  1357. wait(0.07)
  1358. RootPart.CFrame = CFrame.new(RootPart.CFrame.p,-RootPart.CFrame.lookVector)
  1359. end
  1360. if walljump == true then
  1361. attack = false
  1362. walljump = false
  1363. Humanoid.AutoRotate = true
  1364. velo:Destroy()
  1365. end
  1366. end
  1367. end
  1368. end
  1369.  
  1370.  
  1371. local homed = nil
  1372. function home()
  1373. if walljump ~= true then
  1374. for i, v in pairs(FindNearestTorso(Torso.CFrame.p, 80)) do
  1375. if v:FindFirstChild('Head') then
  1376. Grabbed = true
  1377. homed = v
  1378. end
  1379. end
  1380.  
  1381. if homed ~= nil and homed:FindFirstChildOfClass("Humanoid").Health > 1 and walljump == false then
  1382. so("http://www.roblox.com/asset/?id=162460823", Head, 1, .8)
  1383. local SBall = Instance.new("Part",Character)
  1384. SBall.Name = "Homing Ball"
  1385. SBall.CanCollide = false
  1386. SBall.Anchored = false
  1387. SBall.Transparency = 0.64
  1388. SBall.CFrame = CFrame.new(RootPart.CFrame.p)
  1389. SBall.BrickColor = BrickColor.new("Toothpaste")
  1390. SBall.Size = Vector3.new(1,1,1)
  1391. SBall.Material = "Neon"
  1392. SBallweld = Instance.new("Weld")
  1393. SBallweld.Parent = SBall
  1394. SBallweld.Part0 = RootPart
  1395. SBallweld.Part1 = SBall
  1396. SBallweld.C1 = CFrame.new(0, 1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  1397. SBallweld.Part0 = RootPart
  1398. local SBallmesh = Instance.new("SpecialMesh",SBall)
  1399. SBallmesh.MeshType = "Sphere"
  1400. SBallmesh.Scale = Vector3.new(6,6,6)
  1401. trail = Instance.new("Trail", Character)
  1402. a2 = Instance.new("Attachment", Torso) a2.Position = Vector3.new(0,2,0)
  1403. a3 = Instance.new("Attachment", Torso)a3.Position = Vector3.new(0,-2.5,0)
  1404. trail.Texture = "rbxassetid://0"
  1405. trail.Attachment0 = a2
  1406. trail.Attachment1 = a3
  1407. trail.Lifetime = 0.353
  1408. trail.MinLength = 0.03
  1409. trail.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,1,1)})
  1410. trail.Color = ColorSequence.new(Color3.new(0,1,1), Color3.new(0, 0,0))
  1411. trail.LightEmission = 4.8
  1412. trail.TextureLength = 0.034
  1413. trail.Enabled = true
  1414. attack = true
  1415. local position = Instance.new("BodyPosition",Torso)
  1416. position.P = 68350
  1417. position.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  1418.  
  1419. while homed ~= nil and (homed.Torso.Position-RootPart.Position).magnitude > 8 do
  1420. swait()
  1421. SBall.CFrame = CFrame.new(RootPart.CFrame.p)
  1422. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0+420*math.abs(sine/3.2)), math.rad(0), math.rad(0)), 0.6)
  1423. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(70),math.rad(0),math.rad(0)),.1)
  1424. RW.C0 = clerp(RW.C0, CFrame.new(.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.1)
  1425. LW.C0 = clerp(LW.C0, CFrame.new(-.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.1)
  1426. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1)
  1427. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1)
  1428. position.Position = homed.Torso.Position + Vector3.new(0,2,0)
  1429. end
  1430. local bodvol=Instance.new("BodyVelocity")
  1431. bodvol.velocity= RootPart.CFrame.lookVector*240 + Vector3.new(0,30,0)
  1432. bodvol.P= 35200
  1433. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1434. bodvol.Parent=homed.Head
  1435. game:GetService("Debris"):AddItem(bodvol, 0.2)
  1436. homed:FindFirstChildOfClass("Humanoid"):TakeDamage(math.random(10,30))
  1437.  
  1438. position:Destroy()
  1439. trail.Enabled = false
  1440. SBall:Destroy()
  1441. RootPart.Velocity = Vector3.new(0,93.5,0)
  1442. coroutine.resume(coroutine.create(function()
  1443. for i = 0,5,0.26 do
  1444. swait()
  1445. Humanoid.CameraOffset = Vector3.new(0,0,0)
  1446. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1+0.1*i, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.21)
  1447. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(22-2*i),math.rad(0),math.rad(0)),.21)
  1448. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5+0.09*i, 0) * angles(math.rad(20-6*i), math.rad(0), math.rad(90+13*i)), 0.21)
  1449. LW.C0 = clerp(LW.C0, CFrame.new(-1.0-0.12*i, 0.5, -0.4+0.05*i) * angles(math.rad(20+13*i), math.rad(0), math.rad(20-13*i)), 0.21)
  1450. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(45+6*i), math.rad(0), math.rad(-22-4*i)), 0.21)
  1451. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(45+6*i), math.rad(0), math.rad(22+4*i)), 0.21)
  1452. end
  1453. homed = nil
  1454. attack = false
  1455. end))
  1456.  
  1457. end
  1458.  
  1459. end
  1460.  
  1461.  
  1462. end
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486. mouse.KeyDown:connect(function(key)
  1487. wait(0.16)
  1488. if string.byte(key) == 32 and hitfloor == nil and attack == false and walljump == false and Humanoid.Jump == true then
  1489. walljumpp()
  1490. end
  1491. if string.byte(key) == 32 and hitfloor == nil and attack == false and walljump == false and Humanoid.Jump == true then
  1492. home()
  1493. end
  1494.  
  1495. if string.byte(key) == 32 and hitfloor == nil and attack == true and walljump == true then
  1496. walljump = false
  1497. end
  1498. end)
  1499.  
  1500.  
  1501.  
  1502.  
  1503. mouse.KeyDown:connect(function(key)
  1504. if key == 'm' and attack == false then
  1505. changemusic()
  1506. end
  1507. end)
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514. mouse.KeyUp:connect(function(key)
  1515. wait(0.05)
  1516. if key == 'c' and sliding == true then
  1517. sliding = false
  1518. end
  1519. end)
  1520. local look = 0
  1521.  
  1522.  
  1523.  
  1524. while true do
  1525. swait()
  1526. sine = sine + change
  1527. --speed = speed + music.PlaybackLoudness/90
  1528. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  1529. local velderp=RootPart.Velocity.y
  1530. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  1531.  
  1532. local TiltVelocity = CFrame.new(RootPart.CFrame:vectorToObjectSpace(RootPart.Velocity))
  1533.  
  1534. local rlegray = Ray.new(RightLeg.Position+Vector3.new(0,0.54,0),Vector3.new(0, -1.75, 0))
  1535. local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, Character)
  1536.  
  1537. local llegray = Ray.new(LeftLeg.Position+Vector3.new(0,0.54,0),Vector3.new(0, -1.75, 0))
  1538. local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, Character)
  1539.  
  1540. local waterthing = Ray.new(RootPart.CFrame.p,Vector3.new(0,-1,0))
  1541. local start, position = workspace:FindPartOnRay(waterthing, character)
  1542.  
  1543. if start ~= nil and start.Material == "Water" then
  1544.  
  1545. RootPart.Velocity = RootPart.Velocity + Vector3.new(0,6,0)
  1546.  
  1547. end
  1548.  
  1549. Head.Running.Pitch = 0.76 + Humanoid.WalkSpeed/124
  1550. if torvel<1 and Swing == 2 then
  1551. boost = false
  1552. elseif torvel>1 and Swing == 2 then
  1553. boost = true
  1554. freefall = 0
  1555. end
  1556. if hitfloor ~= nil and freefall < 150 then
  1557. freefall = 0
  1558. end
  1559. if freefall > 150 and hitfloor ~= nil then
  1560. land()
  1561. freefall = 0
  1562. end
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570. if RootPart.Velocity.y > 1 and hitfloor==nil then
  1571. Anim="Jump"
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577. if attack==false then
  1578. change = 1
  1579. look = 0
  1580. Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15)
  1581. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(4), math.rad(0), math.rad(0)), 0.07)
  1582. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10+2.05*math.cos(sine/5)),math.rad(0),math.rad(0)),0.07)
  1583. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20+2.05*math.cos(sine/5)), math.rad(-10), math.rad(50-2.05*math.cos(sine/5))), 0.07)
  1584. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20+2.05*math.cos(sine/5)), math.rad(-10), math.rad(-50+2.05*math.cos(sine/5))), 0.07)
  1585. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, -0.6) * CFrame.Angles(math.rad(-25+3.05*math.cos(sine/5)), math.rad(-3), math.rad(0)), 0.1)
  1586. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.47, -0.7) * CFrame.Angles(math.rad(-12+3.05*math.cos(sine/5)), math.rad(0), math.rad(0)), 0.1)
  1587. end
  1588.  
  1589. elseif RootPart.Velocity.y < -1 and freefall <150 and hitfloor==nil then
  1590. Anim="Fall"
  1591. change = 1
  1592. freefall = freefall +0.77
  1593.  
  1594.  
  1595. if attack==false then
  1596. Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15)
  1597. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0.2) * CFrame.Angles(math.rad(7+4*math.sin(sine/1.3)), math.rad(0), math.rad(0)),0.07)
  1598. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.65, 0) * angles(math.rad(0), math.rad(0), math.rad(140+12*math.cos(sine/1.3))), 0.07)
  1599. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.65, 0) * angles(math.rad(0), math.rad(0), math.rad(-140+12*math.cos(sine/1.3))), 0.07)
  1600. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(40+7*math.sin(sine/1.3)),math.rad(0),math.rad(0)),0.07)
  1601. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.17*math.cos(sine/1.3), -0.13) * CFrame.Angles(math.rad(18+7*math.cos(sine/1.3)), math.rad(3), math.rad(0)), 0.1)
  1602. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.37+0.17*math.cos(sine/1.3), -0.2) * CFrame.Angles(math.rad(32+7*math.cos(sine/1.3)), math.rad(0), math.rad(0)), 0.1)
  1603. end
  1604.  
  1605.  
  1606.  
  1607. elseif RootPart.Velocity.y < -1 and freefall > 150 and hitfloor==nil then
  1608. Anim="FreeFall"
  1609. change = 1
  1610.  
  1611.  
  1612. if attack==false then
  1613. Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15)
  1614. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0.2) * CFrame.Angles(math.rad(-90+3*math.sin(sine/1.3)), math.rad(0), math.rad(0)),0.07)
  1615. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(14+12*math.cos(sine/1.3)), math.rad(0), math.rad(110)), 0.07)
  1616. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(14+12*math.cos(sine/1.3)), math.rad(0), math.rad(-110)), 0.07)
  1617. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-12+7*math.sin(sine/1.3)),math.rad(0),math.rad(0)),0.07)
  1618. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.17*math.cos(sine/1.3),0.2) * CFrame.Angles(math.rad(-12+4*math.cos(sine/1.3)), math.rad(3), math.rad(-46)), 0.1)
  1619. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.17*math.cos(sine/1.3), 0.2) * CFrame.Angles(math.rad(-12+4*math.cos(sine/1.3)), math.rad(0), math.rad(46)), 0.1)
  1620. end
  1621.  
  1622. elseif torvel<1 and hitfloor~=nil then
  1623. Anim="Idle"
  1624. change = 1
  1625. if attack==false and equip == false then
  1626.  
  1627. Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15)
  1628. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.04*math.cos(sine/40), -0) * CFrame.Angles(math.rad(0-0.81*math.cos(sine/40)), math.rad(-40), math.rad(0)), 0.1)
  1629. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0+2.6*math.sin(sine/40)),math.rad(0),math.rad(40)),0.1)
  1630. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.55+0.04*math.sin(sine/40), 0-0.04*math.cos(sine/40)) * angles(math.rad(-2+1.3*math.cos(sine/40)), math.rad(0+4*math.sin(sine/40)), math.rad(6.3+2.2*math.cos(sine/40))),0.1)
  1631. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.55+0.04*math.sin(sine/40), 0-0.04*math.cos(sine/40)) * angles(math.rad(2+1.3*math.cos(sine/40)), math.rad(0-4*math.sin(sine/40)), math.rad(-6.3-2.2*math.cos(sine/40))),0.1)
  1632. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, llegendPoint.Y-LeftLeg.Position.Y+0.04*math.cos(sine/40), 0) * CFrame.Angles(math.rad(0+0.81*math.cos(sine/40)), math.rad(18+0.81*math.cos(sine/40)), math.rad(-2-0.81*math.cos(sine/40))),0.1)
  1633. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.57, rlegendPoint.Y-RightLeg.Position.Y+0.04*math.cos(sine/40), 0) * CFrame.Angles(math.rad(0+0.81*math.cos(sine/40)), math.rad(-2+0.81*math.cos(sine/40)), math.rad(3-0.81*math.cos(sine/40))),0.1)
  1634. end
  1635.  
  1636.  
  1637.  
  1638. elseif torvel>1.5 and torvel<70 and hitfloor~=nil then
  1639. Anim="Walk"
  1640. change = 0.84+ Character.Humanoid.WalkSpeed/132
  1641. look = 0
  1642. if attack==false and equip == false then
  1643. Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.02)
  1644. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.52*math.cos(sine/2), -.8) * angles(math.rad(-26), math.rad(0), math.rad(0)+ RootPart.RotVelocity.Y / 26), .1)
  1645. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-11+20*math.sin(sine/2)),math.rad(0),math.rad(0+5*math.sin(sine/4)) + RootPart.RotVelocity.Y / 13),.1)
  1646. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.1) * angles(math.rad(-60-7*math.sin(sine/4))+ RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(15+2*math.sin(sine/4))- RootPart.RotVelocity.Y / 34),.15)
  1647. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0.1)*angles(math.rad(-60-7*math.sin(sine/4))+ RootPart.RotVelocity.Y / 34,math.rad(0),math.rad(-15+2*math.sin(sine/4))+ RootPart.RotVelocity.Y / -34),.15)
  1648. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.28*math.cos(sine/4), 0-0.32*math.cos(sine/4)) * CFrame.Angles(math.rad(0+104*math.sin(sine/4)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)+ RootPart.RotVelocity.Y / -54), 0.3)
  1649. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1-0.28*math.cos(sine/4),0+0.32*math.cos(sine/4)) * CFrame.Angles(math.rad(0-104*math.sin(sine/4)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)- RootPart.RotVelocity.Y / 54), 0.3)
  1650. end
  1651.  
  1652.  
  1653. elseif torvel>=70 and torvel<200 and hitfloor~=nil then
  1654. Anim="Run"
  1655. change = 0.84+ Character.Humanoid.WalkSpeed/142
  1656. if attack==false and equip == false then
  1657. Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.02)
  1658. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.52*math.cos(sine/1.5), -.8) * angles(math.rad(-37), math.rad(0), math.rad(0)+ RootPart.RotVelocity.Y / 26), .1)
  1659. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-11+25*math.sin(sine/1.5)),math.rad(0),math.rad(0+5*math.sin(sine/3)) + RootPart.RotVelocity.Y / 13),.1)
  1660. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.3) * angles(math.rad(-72-8*math.sin(sine/1.5))+ RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(1+0*math.cos(sine/3))- RootPart.RotVelocity.Y / 34),.25)
  1661. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0.3)*angles(math.rad(-72-8*math.sin(sine/1.5))+ RootPart.RotVelocity.Y / 34,math.rad(0),math.rad(-1+0*math.cos(sine/3))+ RootPart.RotVelocity.Y / -34),.25)
  1662. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.32*math.cos(sine/3), 0-0.42*math.cos(sine/3)) * CFrame.Angles(math.rad(0+134*math.sin(sine/3)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)+ RootPart.RotVelocity.Y / -54), 0.44)
  1663. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1-0.32*math.cos(sine/3),0+0.42*math.cos(sine/3)) * CFrame.Angles(math.rad(0-134*math.sin(sine/3)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)- RootPart.RotVelocity.Y / 54), 0.44)
  1664. end
  1665.  
  1666. --[[
  1667. if attack==false then
  1668. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1-0.4*math.cos(sine/5.5)/2, 0 *math.sin(sine/6.6)/2) * CFrame.Angles(math.rad(0) + -math.sin(sine/5.5)/1.2, math.rad(0), 0), .8)
  1669. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.4*math.cos(sine/5.5)/2,0 *-math.sin(sine/6.6)/2) * CFrame.Angles(math.rad(0) + math.sin(sine/5.5)/1.2, math.rad(0), 0), .8)
  1670. end
  1671. ]]
  1672. if attack==true and noleg == false then
  1673. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1-0.24*math.cos(sine/5), 0.+0.24*math.cos(sine/5)) * CFrame.Angles(math.rad(0-74*math.sin(sine/5)), math.rad(0), math.rad(0)), 0.3)
  1674. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.24*math.cos(sine/5),0.-0.24*math.cos(sine/5)) * CFrame.Angles(math.rad(0+74*math.sin(sine/5)), math.rad(0), math.rad(0)), 0.3)
  1675. end
  1676.  
  1677.  
  1678.  
  1679. elseif torvel>=200 and hitfloor~=nil then
  1680. Anim="MachRun"
  1681. change = 0.84+ Character.Humanoid.WalkSpeed/182
  1682. if attack==false and equip == false then
  1683. Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.02)
  1684. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.52*math.cos(sine/1), -3.8) * angles(math.rad(-44), math.rad(0), math.rad(0)+ RootPart.RotVelocity.Y / 26), .2)
  1685. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-11+25*math.sin(sine/1)),math.rad(0),math.rad(0+5*math.sin(sine/2)) + RootPart.RotVelocity.Y / 13),.2)
  1686. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.5) * angles(math.rad(-78-12*math.sin(sine/1))+ RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(-24+0*math.cos(sine/2))- RootPart.RotVelocity.Y / 34),.35)
  1687. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0.5)*angles(math.rad(-78-12*math.sin(sine/1))+ RootPart.RotVelocity.Y / 34,math.rad(0),math.rad(24+0*math.cos(sine/2))+ RootPart.RotVelocity.Y / -34),.35)
  1688. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.42*math.cos(sine/2), 0-0.62*math.cos(sine/2)) * CFrame.Angles(math.rad(0+134*math.sin(sine/2)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)+ RootPart.RotVelocity.Y / -54), 0.52)
  1689. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1-0.42*math.cos(sine/2),0+0.62*math.cos(sine/2)) * CFrame.Angles(math.rad(0-134*math.sin(sine/2)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)- RootPart.RotVelocity.Y / 54), 0.52)
  1690. end
  1691.  
  1692.  
  1693.  
  1694. end
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704. if 0 < #Effects then
  1705. for e = 1, #Effects do
  1706. if Effects[e] ~= nil then
  1707. local Thing = Effects[e]
  1708. if Thing ~= nil then
  1709. local Part = Thing[1]
  1710. local Mode = Thing[2]
  1711. local Delay = Thing[3]
  1712. local IncX = Thing[4]
  1713. local IncY = Thing[5]
  1714. local IncZ = Thing[6]
  1715. if Thing[1].Transparency <= 1 then
  1716. if Thing[2] == "Block1" then
  1717. Thing[1].CFrame = Thing[1].CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1718. Mesh = Thing[1]:FindFirstChild("Mesh")
  1719. if not Mesh then
  1720. Mesh = Instance.new("BlockMesh")
  1721. end
  1722. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  1723. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1724. elseif Thing[2] == "Cylinder" then
  1725. Mesh = Thing[1]:FindFirstChild("Mesh")
  1726. if not Mesh then
  1727. Mesh = Instance.new("BlockMesh")
  1728. end
  1729. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  1730. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1731. elseif Thing[2] == "Blood" then
  1732. Mesh = Thing[1]:FindFirstChild("Mesh")
  1733. if not Mesh then
  1734. Mesh = Instance.new("BlockMesh")
  1735. end
  1736. Thing[1].CFrame = Thing[1].CFrame * cf(0, 0.5, 0)
  1737. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  1738. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1739. elseif Thing[2] == "Elec" then
  1740. Mesh = Thing[1]:FindFirstChild("Mesh")
  1741. if not Mesh then
  1742. Mesh = Instance.new("BlockMesh")
  1743. end
  1744. Mesh.Scale = Mesh.Scale + vt(Thing[7], Thing[8], Thing[9])
  1745. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1746. elseif Thing[2] == "Disappear" then
  1747. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1748. end
  1749. else
  1750. Part.Parent = nil
  1751. game:GetService("Debris"):AddItem(Part, 0)
  1752. table.remove(Effects, e)
  1753. end
  1754. end
  1755. end
  1756. end
  1757. end
  1758.  
  1759. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement