Advertisement
Guest User

Untitled

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