Advertisement
samuelrichter66

sanic

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