Advertisement
Guest User

Sonic Script FE

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