aikjako

Sonic Script

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