Advertisement
filipaopastebins2134

Sunny Bunnies runner v1.2 made by filipaogamer345

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