Sc4pterR0bl0x

sonic

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