Advertisement
Guest User

Parkour script edit by o000o

a guest
Jul 17th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 65.52 KB | None | 0 0
  1.  
  2. ---Parkour script edit by o000o---
  3. local plr = game.Players.LocalPlayer
  4. local char = plr.Character
  5. local hum = char:WaitForChild("Humanoid")
  6. local rootpart,head = char:WaitForChild("HumanoidRootPart"),char:WaitForChild("Torso")
  7. game:GetService("RunService"):BindToRenderStep("CameraOffset",Enum.RenderPriority.Character.Value+1,function()
  8. hum.CameraOffset = (rootpart.CFrame+Vector3.new(0,0,0)):pointToObjectSpace(head.CFrame.p)
  9. end)
  10.  
  11.  
  12.  
  13.  
  14.  
  15. self = script.Parent
  16. c = workspace.CurrentCamera
  17.  
  18. player = game.Players.LocalPlayer
  19. char = player.Character or player.CharacterAdded:wait()
  20. humanoid = char:WaitForChild("Humanoid")
  21. local Animate
  22.  
  23. -- Apply some properties
  24.  
  25. player.CameraMaxZoomDistance = 50
  26.  
  27. function lock(part)
  28. if part and part:IsA("BasePart") then
  29. part.LocalTransparencyModifier = part.Transparency
  30. part.Changed:connect(function (property)
  31. part.LocalTransparencyModifier = part.Transparency
  32. end)
  33. end
  34. end
  35.  
  36. for _,v in pairs(char:GetChildren()) do
  37. lock(v)
  38. end
  39.  
  40. char.ChildAdded:connect(lock)
  41.  
  42. c.Changed:connect(function (property)
  43. if property == "CameraSubject" then
  44. if c.CameraSubject and c.CameraSubject:IsA("VehicleSeat") and humanoid then
  45. -- Vehicle seats try to change the camera subject to the seat itself. This isn't what we wan't really.
  46. c.CameraSubject = humanoid;
  47. end
  48. end
  49. end)
  50. local Services = setmetatable({}, {
  51. __index = function(self, k)
  52. local Service = game:GetService(k)
  53. rawset(self, k, Service)
  54. return Service
  55. end
  56. })
  57.  
  58.  
  59.  
  60.  
  61. local player = game:service("Players").LocalPlayer
  62. local mouse = player:GetMouse()
  63. local cam = workspace.CurrentCamera
  64. local char = player.Character
  65. local Torsoz = char:findFirstChild("Torso")
  66. local RA = char:findFirstChild("Right Arm")
  67. local LA = char:findFirstChild("Left Arm")
  68. local RL = char:findFirstChild("Right Leg")
  69. local LL = char:findFirstChild("Left Leg")
  70. local H = char:findFirstChild("Head")
  71. local Hu = char:findFirstChild("Humanoid")
  72. local RS = Torsoz:findFirstChild("Right Shoulder")
  73. local LS = Torsoz:findFirstChild("Left Shoulder")
  74. local RH = Torsoz:findFirstChild("Right Hip")
  75. local LH = Torsoz:findFirstChild("Left Hip")
  76. local N = Torsoz:findFirstChild("Neck")
  77. local NV = Vector3.new(0,0,0)
  78. local FOV = 70
  79. local Shift, Space, Sitting = false,false,false
  80. local GravPoint = 0
  81. local Diving = false
  82. local DivingCooldown = 0
  83. local DivingDir = NV
  84. local DivingCF = CFrame.new(0,0,0)
  85. local DivingBG, DivingBV
  86. local HWallRunning = false
  87. local HWRGravDrop = false
  88. local HWRLastPart
  89. local HWRCooldown = 0
  90. local HWRDir
  91. local VWallRunning = false
  92. local VWRLastPart
  93. local VWRCooldown = 0
  94. local VWRLeft,VWRRight = false,false
  95. local Sliding = false
  96. local SlideCooldown = 0
  97. local Standing = true
  98. local Action = "Standing"
  99. local animplus = true
  100. local animspeed = 0
  101. local animangle = 0.01
  102. local Joint1, Joint2, Joint3, Joint4, Joint5
  103. local sounb = Instance.new("Sound", player)
  104. local boom = Instance.new("Sound", player)
  105. local step = Instance.new("Sound", player)
  106. Animation = Instance.new("Animation", char)
  107. for i, v in pairs(char:children()) do
  108. if (v.className == "LocalScript" and v.Name == "ParkourSkrip") or v.className == "NumberValue" or v.className == "BoolValue" or v.className == "Model" then
  109. v:remove()
  110. end
  111. end
  112.  
  113. local loadids = {112474909, 112474911, 112474909}
  114.  
  115. local stamina = 900
  116. local maxstamina = 900
  117. local defsprint = 34
  118. local sprint = defsprint
  119.  
  120. local pause = Instance.new("BoolValue", char)
  121. pause.Name = "Pause"
  122. pause.Value = false
  123. local flow = Instance.new("NumberValue", char)
  124. flow.Name = "Flow"
  125. flow.Value = 0
  126. local flowcooldown = 0
  127.  
  128. local m = Instance.new("Model", char)
  129. m.Name = "FlowChainPartz"
  130.  
  131. local P = Instance.new("Part")
  132. P.Name = "TrailPart"
  133. P.formFactor = "Custom"
  134. P.Size = Vector3.new(2,2,2)
  135. P.Locked = true
  136. P.Anchored = true
  137. P.CanCollide = false
  138. P.TopSurface = 0
  139. P.BottomSurface = 0
  140.  
  141. script.Name = "ParkourSkrip"
  142.  
  143. local hue = 0
  144.  
  145. function HSV(H,S,V)
  146. H = H % 360
  147. local C = V * S
  148. local H2 = H/60
  149. local X = C * (1 - math.abs((H2 %2) -1))
  150. local color = Color3.new(0,0,0)
  151. if H2 <= 0 then
  152. color = Color3.new(C,0,0)
  153. elseif 0 <= H2 and H2 <= 1 then
  154. color = Color3.new(C,X,0)
  155. elseif 1 <= H2 and H2 <= 2 then
  156. color = Color3.new(X,C,0)
  157. elseif 2 <= H2 and H2 <= 3 then
  158. color = Color3.new(0,C,X)
  159. elseif 3 <= H2 and H2 <= 4 then
  160. color = Color3.new(0,X,C)
  161. elseif 4 <= H2 and H2 <= 5 then
  162. color = Color3.new(X,0,C)
  163. elseif 5 <= H2 and H2 <= 6 then
  164. color = Color3.new(C,0,X)
  165. end
  166. local m = V - C
  167. return Color3.new(color.r + m, color.g + m, color.b + m)
  168. end
  169.  
  170. function GetWeld(weld)
  171. if weld:findFirstChild("XAngle") == nil then
  172. local a = Instance.new("NumberValue", weld)
  173. a.Name = "XAngle"
  174. end
  175. if weld:findFirstChild("YAngle") == nil then
  176. local a = Instance.new("NumberValue", weld)
  177. a.Name = "YAngle"
  178. end
  179. if weld:findFirstChild("ZAngle") == nil then
  180. local a = Instance.new("NumberValue", weld)
  181. a.Name = "ZAngle"
  182. end
  183. return weld.C0.p, Vector3.new(weld.XAngle.Value, weld.YAngle.Value, weld.ZAngle.Value)
  184. end
  185.  
  186. function SetWeld(weld, i, loops, origpos,origangle, nextpos,nextangle)
  187. if weld:findFirstChild("XAngle") == nil then
  188. local a = Instance.new("NumberValue", weld)
  189. a.Name = "XAngle"
  190. end
  191. if weld:findFirstChild("YAngle") == nil then
  192. local a = Instance.new("NumberValue", weld)
  193. a.Name = "YAngle"
  194. end
  195. if weld:findFirstChild("ZAngle") == nil then
  196. local a = Instance.new("NumberValue", weld)
  197. a.Name = "ZAngle"
  198. end
  199.  
  200. local tox,toy,toz = 0,0,0
  201. if origangle.x > nextangle.x then
  202. tox = -math.abs(origangle.x - nextangle.x) /loops*i
  203. else
  204. tox = math.abs(origangle.x - nextangle.x) /loops*i
  205. end
  206. if origangle.y > nextangle.y then
  207. toy = -math.abs(origangle.y - nextangle.y) /loops*i
  208. else
  209. toy = math.abs(origangle.y - nextangle.y) /loops*i
  210. end
  211. if origangle.z > nextangle.z then
  212. toz = -math.abs(origangle.z - nextangle.z) /loops*i
  213. else
  214. toz = math.abs(origangle.z - nextangle.z) /loops*i
  215. end
  216.  
  217. local tox2,toy2,toz2 = 0,0,0
  218. if origpos.x > nextpos.x then
  219. tox2 = -math.abs(origpos.x - nextpos.x) /loops*i
  220. else
  221. tox2 = math.abs(origpos.x - nextpos.x) /loops*i
  222. end
  223. if origpos.y > nextpos.y then
  224. toy2 = -math.abs(origpos.y - nextpos.y) /loops*i
  225. else
  226. toy2 = math.abs(origpos.y - nextpos.y) /loops*i
  227. end
  228. if origpos.z > nextpos.z then
  229. toz2 = -math.abs(origpos.z - nextpos.z) /loops*i
  230. else
  231. toz2 = math.abs(origpos.z - nextpos.z) /loops*i
  232. end
  233.  
  234. weld.XAngle.Value = origangle.x + tox
  235. weld.YAngle.Value = origangle.y + toy
  236. weld.ZAngle.Value = origangle.z + toz
  237. weld.C0 = CFrame.new(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2) * CFrame.Angles(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  238. end
  239.  
  240. function LoadTextures()
  241. local pls = game:service("ContentProvider")
  242. for i, v in pairs(loadids) do
  243. pls:Preload("http://www.roblox.com/asset/?id="..v)
  244. wait(0.04)
  245. end
  246. end
  247. LoadTextures()
  248.  
  249. function CreateGui()
  250. for i, v in pairs(player.PlayerGui:children()) do
  251. if v.className == "ScreenGui" and v.Name == "staminaGui" then
  252. v:remove()
  253. end
  254. end
  255. local g = Instance.new("ScreenGui", player.PlayerGui)
  256. g.Name = "staminaGui"
  257.  
  258. local c = Instance.new("Frame", g)
  259. c.Visible = false
  260. c.Size = UDim2.new(0,86,0,320)
  261. c.BackgroundTransparency = 1
  262. c.Position = UDim2.new(1,-96,0.5,-160)
  263. c.Name = "Container"
  264.  
  265. local t = Instance.new("TextLabel", c)
  266. t.Size = UDim2.new(0,0,-0.1,0)
  267. t.Position = UDim2.new(0.3,0,0.5,0)
  268. t.TextXAlignment = "Right"
  269. t.Font = "ArialBold"
  270. t.TextTransparency = 0.1
  271. t.TextColor3 = Color3.new(0,0.6,0.8)
  272. t.TextStrokeColor3 = Color3.new(0,0.2,0.8)
  273. t.TextStrokeTransparency = 0.3
  274. t.FontSize = 6
  275. t.BackgroundTransparency = 1
  276. local t2 = t:Clone()
  277. t2.Parent = c
  278. t2.Size = UDim2.new(0,0,0.1,0)
  279. local l = t:Clone()
  280. l.Parent = c
  281. l.Size = UDim2.new(0,0,0,0)
  282. l.Text = "-----"
  283.  
  284. local f1 = Instance.new("Frame", c)
  285. f1.Name = "Backing"
  286. f1.ClipsDescendants = true
  287. f1.Size = UDim2.new(1,0,0,0)
  288. f1.BackgroundColor3 = Color3.new(0.8,0,0)
  289. f1.BackgroundTransparency = 1
  290. local f1img = Instance.new("ImageLabel", f1)
  291. f1img.BackgroundTransparency = 1
  292. f1img.Image = "http://www.roblox.com/asset/?id=112474909"
  293. f1img.Size = UDim2.new(1,0,0,c.Size.Y.Offset)
  294.  
  295. local f2 = Instance.new("Frame", c)
  296. f2.Name = "Overlay"
  297. f2.ClipsDescendants = true
  298. f2.Size = UDim2.new(1,0,1,0)
  299. f2.BackgroundColor3 = Color3.new(0,0,0.8)
  300. f2.BackgroundTransparency = 1
  301. local f2img = Instance.new("ImageLabel", f2)
  302. f2img.BackgroundTransparency = 1
  303. f2img.Image = "http://www.roblox.com/asset/?id=112474911"
  304. f2img.Size = UDim2.new(1,0,0,c.Size.Y.Offset)
  305.  
  306. function Calculate()
  307. local ysize = c.Size.Y.Offset
  308. local per = (stamina/maxstamina) * c.Size.Y.Offset
  309. local rem = (-(stamina/maxstamina-1)) * c.Size.Y.Offset
  310. f1.Size = UDim2.new(1,0,0,rem)
  311. f2.Size = UDim2.new(1,0,0,per)
  312. f2.Position = UDim2.new(0,0,0,rem)
  313. f2img.Position = UDim2.new(0,0,0,-rem)
  314. t.Text = math.floor(stamina)
  315. t2.Text = maxstamina
  316. end
  317. Calculate()
  318.  
  319. wait(0.01)
  320. c.Visible = true
  321. end
  322. CreateGui()
  323.  
  324. player.CharacterAdded:connect(function()
  325. char = player.Character
  326. Torsoz = char:findFirstChild("Torso")
  327. RA = char:findFirstChild("Right Arm")
  328. LA = char:findFirstChild("Left Arm")
  329. RL = char:findFirstChild("Right Leg")
  330. LL = char:findFirstChild("Left Leg")
  331. H = char:findFirstChild("Head")
  332. Hu = char:findFirstChild("Humanoid")
  333. RS = Torsoz:findFirstChild("Right Shoulder")
  334. LS = Torsoz:findFirstChild("Left Shoulder")
  335. RH = Torsoz:findFirstChild("Right Hip")
  336. LH = Torsoz:findFirstChild("Left Hip")
  337. N = Torsoz:findFirstChild("Neck")
  338. stamina = maxstamina
  339. CreateGui()
  340. end)
  341.  
  342. function RAY(pos, dir, startpos, endpos, distleft, collidedlist)
  343. collidedlist = collidedlist or {char}
  344. startpos = startpos or pos
  345. distleft = distleft or dir.unit * dir.magnitude
  346. endpos = endpos or pos + distleft
  347. local ray = Ray.new(pos, distleft)
  348. local hitz,enz = workspace:FindPartOnRayWithIgnoreList(ray, collidedlist)
  349. --[[
  350. local p = P:Clone()
  351. p.Parent = char
  352. p.Size = Vector3.new(0.4,0.4,0.4)
  353. p.BrickColor = BrickColor.new("Lime green")
  354. p.CanCollide = false
  355. p.CFrame = CFrame.new(enz)
  356. p.Transparency = 0.3
  357. ]]
  358. if hitz ~= nil then
  359. if hitz.CanCollide == false then
  360. table.insert(collidedlist, hitz)
  361. local newpos = enz
  362. local newdistleft = distleft - (dir.unit * (pos - newpos).magnitude)
  363. if newdistleft ~= NV then
  364. return RAY(newpos-(dir*0.01), dir, startpos, endpos, newdistleft+(dir*0.01), collidedlist)
  365. end
  366. end
  367. end
  368.  
  369. return hitz, enz, ray
  370. end
  371.  
  372. function Sit()
  373. Standing = false
  374. local hitz,enz = RAY(Torsoz.Position, Vector3.new(0,-4.1,0))
  375. local tordir = Vector3.new(Torsoz.CFrame.lookVector.x,0,Torsoz.CFrame.lookVector.z)
  376. if (hitz ~= nil and hitz.CanCollide == true) then
  377. local cf = CFrame.new(enz+Vector3.new(0,1.28,0), enz+Vector3.new(0,1.28,0)+tordir) * CFrame.Angles(math.pi/6,0,0)
  378. local hitz2,enz2 = RAY(enz+Vector3.new(0,2.25,0), tordir*-2.2)
  379. Hu.PlatformStand = true
  380. Torsoz.CFrame = cf
  381. local bp = Instance.new("BodyPosition", Torsoz)
  382. bp.Name = "StaminaBodyObject"
  383. bp.maxForce = Vector3.new(1/0,1/0,1/0)
  384. bp.D = 100
  385. bp.position = cf.p
  386. local bg = Instance.new("BodyGyro", Torsoz)
  387. bg.Name = "StaminaBodyObject"
  388. bg.maxTorque = Vector3.new(1/0,1/0,1/0)
  389. bg.cframe = cf
  390. bg.D = 100
  391. SetWeld(Joint1,1,1, NV,NV, Vector3.new(0.34,-1,0.2), Vector3.new((math.pi/2)-(math.pi/6),0,math.pi/8))
  392. SetWeld(Joint2,1,1, NV,NV, Vector3.new(-0.34,-1,0.2), Vector3.new((math.pi/2)-(math.pi/6),0,-math.pi/8))
  393.  
  394. if hitz2 ~= nil and hitz2.CanCollide == true then
  395. Joint3.C0 = CFrame.new(0.9,0.4,-0.45) * CFrame.Angles(0,math.pi/2.13,0) * CFrame.Angles(math.pi/2.3,0,0)
  396. Joint4.C0 = CFrame.new(-0.9,0.4,-0.4) * CFrame.Angles(0,-math.pi/2.05,0) * CFrame.Angles(math.pi/2.3,0,0)
  397. Joint5.C0 = CFrame.new(0,1,0) * CFrame.Angles(-math.pi/8.8,0,0)
  398. else
  399. SetWeld(Joint3,1,1, NV,NV, Vector3.new(1.4,0.4,0.1), Vector3.new(-(math.pi/6)-(math.pi/10),0,math.pi/9))
  400. SetWeld(Joint4,1,1, NV,NV, Vector3.new(-1.4,0.4,0.1), Vector3.new(-(math.pi/6)-(math.pi/10),0,-math.pi/9))
  401. SetWeld(Joint5,1,1, NV,NV, Vector3.new(0,1,0), Vector3.new(-math.pi/12,0,0))
  402. end
  403.  
  404. Sitting = true
  405. Action = "Sitting"
  406. end
  407. end
  408.  
  409.  
  410. function Stand()
  411. Hu.PlatformStand = false
  412. if Sitting == true then
  413. local tordir = Torsoz.Position + (Torsoz.CFrame.lookVector*10000)
  414. local cf = CFrame.new(Torsoz.Position + Vector3.new(0,1.8,0), Vector3.new(tordir.x,Torsoz.Position.y,tordir.z))
  415. Torsoz.CFrame = cf
  416. end
  417. for i, v in pairs(Torsoz:children()) do
  418. if v.Name == "StaminaBodyObject" then
  419. v:remove()
  420. end
  421. end
  422. RH.Part0 = nil
  423. LH.Part0 = nil
  424. RS.Part0 = nil
  425. LS.Part0 = nil
  426. Joint1.Part0 = Torsoz
  427. Joint1.Part1 = RL
  428. Joint1.C0 = CFrame.new(0.5,-1,0)
  429. Joint1.C1 = CFrame.new(0,1,0)
  430. Joint2.Part0 = Torsoz
  431. Joint2.Part1 = LL
  432. Joint2.C0 = CFrame.new(-0.5,-1,0)
  433. Joint2.C1 = CFrame.new(0,1,0)
  434. Joint3.Part0 = Torsoz
  435. Joint3.Part1 = RA
  436. Joint3.C0 = CFrame.new(1.5,0.5,0)
  437. Joint3.C1 = CFrame.new(0,0.5,0)
  438. Joint4.Part0 = Torsoz
  439. Joint4.Part1 = LA
  440. Joint4.C0 = CFrame.new(-1.5,0.5,0)
  441. Joint4.C1 = CFrame.new(0,0.5,0)
  442. Joint5.Part0 = Torsoz
  443. Joint5.Part1 = H
  444. Joint5.C0 = CFrame.new(0,1,0)
  445. Joint5.C1 = CFrame.new(0,-0.5,0)
  446. Sitting = false
  447. Diving = false
  448. Standing = true
  449. Action = "Standing"
  450. end
  451.  
  452. --------------------------------------- Dive ----------------------------------
  453.  
  454. function Dive()
  455. stamina = stamina - 10
  456. flow.Value = flow.Value + 10
  457. if flow.Value > 100 then
  458. flow.Value = 100
  459. end
  460. Standing = false
  461. local dir = Vector3.new(Torsoz.CFrame.lookVector.x,0,Torsoz.CFrame.lookVector.z)
  462. GravPoint = 18
  463. DivingDir = dir
  464. local cf = CFrame.new(Torsoz.Position, dir+Vector3.new(0,Torsoz.Position.y,0))
  465. DivingCF = cf
  466. DivingDir = dir
  467. Hu.PlatformStand = true
  468. local bv = Instance.new("BodyVelocity", Torsoz)
  469. bv.Name = "StaminaBodyObject"
  470. bv.maxForce = Vector3.new(1/0,1/0,1/0)
  471. bv.velocity = Vector3.new(DivingDir.x*24,GravPoint,DivingDir.z*24)
  472. DivingBV = bv
  473. local bg = Instance.new("BodyGyro", Torsoz)
  474. bg.Name = "StaminaBodyObject"
  475. bg.maxTorque = Vector3.new(1/0,1/0,1/0)
  476. bg.cframe = CFrame.new(Torsoz.Position, Torsoz.Position+bv.velocity) * CFrame.Angles(-math.pi/2,0,0)
  477. bg.D = 100
  478. DivingBG = bg
  479.  
  480. local joint = Joint3
  481. joint.C1 = CFrame.new(0,0.5,0)
  482. local joint2 = Joint4
  483. joint2.C1 = CFrame.new(0,0.5,0)
  484. local joint3 = Joint1
  485. joint3.C1 = CFrame.new(0,1,0)
  486. local joint4 = Joint2
  487. joint4.C1 = CFrame.new(0,1,0)
  488.  
  489. local joint5 = Joint5
  490.  
  491. Diving = true
  492. Action = "Diving"
  493. sounb.SoundId = "rbxassetid://541909763"
  494. sounb.Volume = .9 --Change this to suit your tastes 8)
  495. sounb.PlayOnRemove = false
  496. sounb.Looped = false
  497. sounb:Play()
  498.  
  499. for i = 1, 8 do
  500. SetWeld(joint,i,8, Vector3.new(1.5,0.5,0), NV, Vector3.new(1.45,0.5,0.1), Vector3.new(-0.2,-math.pi/9,math.pi/13))
  501. SetWeld(joint2,i,8, Vector3.new(-1.5,0.5,0), NV, Vector3.new(-1.45,0.5,0.1), Vector3.new(-0.2,math.pi/9,-math.pi/13))
  502. SetWeld(joint3,i,8, Vector3.new(0.5,-1,0), NV, Vector3.new(0.5,-1,0.03), Vector3.new(-0.2,-math.pi/10,math.pi/14))
  503. SetWeld(joint4,i,8, Vector3.new(-0.5,-1,0), NV, Vector3.new(-0.5,-1,0.03), Vector3.new(-0.2,math.pi/10,-math.pi/14))
  504. SetWeld(joint5,i,8, Vector3.new(0,1,0), NV, Vector3.new(0,1,0), Vector3.new(0.45,0,0))
  505. wait(0.025)
  506. end
  507.  
  508. local counter = 0
  509. while Diving == true do
  510. counter = counter + 1
  511. bg.Parent = Torsoz
  512. local hitz, enz = RAY(Torsoz.Position, bv.velocity.unit*4.6)
  513. if hitz ~= nil and hitz.CanCollide == true then
  514. local hitz2, enz2 = RAY(Torsoz.Position, Vector3.new(0,-4,0))
  515. if hitz2 ~= nil then
  516. Diving = "Rolling"
  517. Action = "DiveRolling"
  518. Animation.AnimationId = "rbxassetid://180612465" -- ???? ???????? ?????????? ????? rbxassetid://
  519. Animate = humanoid:LoadAnimation(Animation)
  520. Animate:Play()
  521. player.Character.HumanoidRootPart.CanCollide = false
  522. sounb.SoundId = "rbxassetid://2985734522"
  523. sounb.Volume = 1.3 --Change this to suit your tastes 8)
  524. sounb.PlayOnRemove = false
  525. sounb.Looped = false
  526. sounb:Play()
  527. else
  528. Torsoz.CFrame = Torsoz.CFrame * CFrame.new(0,-0.3,0)
  529. Torsoz.Velocity = NV
  530. flow.Value = 0
  531. Animate:Stop()
  532. player.Character.HumanoidRootPart.CanCollide = true
  533. break
  534. end
  535. end
  536. if counter > 190 then
  537. Animate:Stop()
  538. player.Character.HumanoidRootPart.CanCollide = true
  539. break
  540. end
  541. wait(0.02)
  542. end
  543.  
  544. bv.velocity = (dir*20) + Vector3.new(0,-0.5,0)
  545.  
  546. local bgcf = bg.cframe
  547. local haslanded = false
  548. local count = 0
  549.  
  550. while haslanded == false do
  551. bg.cframe = bgcf * CFrame.Angles(-0.3*count,0,0)
  552. local hitz, enz = RAY(Torsoz.Position, ((Torsoz.CFrame*CFrame.new(0,-1,0)).p - Torsoz.CFrame.p).unit*1.6)
  553. if hitz ~= nil and hitz.CanCollide == true then
  554. haslanded = true
  555. Animate:Stop()
  556. player.Character.HumanoidRootPart.CanCollide = true
  557. end
  558. local hitz2, enz2 = RAY(Torsoz.Position, Vector3.new(0,-3.8,0))
  559. if hitz2 == nil then
  560. Torsoz.Velocity = NV
  561. break
  562. elseif haslanded == true then
  563. local sound = Instance.new("Sound")
  564. local bp = Instance.new("BodyPosition", Torsoz)
  565. bp.Name = "StaminaJumpFix"
  566. bp.maxForce = Vector3.new(0,1/0,0)
  567. bp.P = 7000
  568. bp.position = enz2 + Vector3.new(0,2.8,0)
  569. game:service("Debris"):AddItem(bp, 0.3)
  570. else
  571. player.Character.HumanoidRootPart.CanCollide = true
  572. bv.velocity = (dir*20) + Vector3.new(0,-(Torsoz.Position - enz2).magnitude*3,0)
  573.  
  574. end
  575. count = count + 1
  576. if count <= 6 then
  577. local i = count
  578. local j1,j1a = GetWeld(joint)
  579. local j2,j2a = GetWeld(joint2)
  580. local j3,j3a = GetWeld(joint3)
  581. local j4,j4a = GetWeld(joint4)
  582. local j5,j5a = GetWeld(joint5)
  583. SetWeld(joint,i,6, j1,j1a, Vector3.new(1.35,0.5,-0.2), Vector3.new(math.pi/2.6,0,-math.pi/5.8))
  584. SetWeld(joint2,i,6, j2,j2a, Vector3.new(-1.35,0.5,-0.2), Vector3.new(math.pi/2.6,0,math.pi/5.8))
  585. SetWeld(joint3,i,6, j3,j3a, Vector3.new(0.51,0.4,-0.6), Vector3.new(-0.1,0,0.05))
  586. SetWeld(joint4,i,6, j4,j4a, Vector3.new(-0.51,0.4,-0.6), Vector3.new(-0.1,0,-0.05))
  587. SetWeld(joint5,i,6, j5,j5a, Vector3.new(0,1,0), Vector3.new(-0.4,0,0))
  588. elseif count >= 50 then
  589. break
  590. end
  591. wait(0.02)
  592. end
  593.  
  594. Torsoz.Velocity = NV
  595.  
  596. Stand()
  597. DivingCooldown = 9
  598. end
  599.  
  600. function FindSurface(part, position)
  601. local obj = part.CFrame:pointToObjectSpace(position)
  602. local siz = part.Size/2
  603. for i,v in pairs(Enum.NormalId:GetEnumItems()) do
  604. local vec = Vector3.FromNormalId(v)
  605. local wvec = part.CFrame:vectorToWorldSpace(vec)
  606. local vz = (obj)/(siz*vec)
  607. if (math.abs(vz.X-1) < 0.01 or math.abs(vz.Y-1) < 0.01 or math.abs(vz.Z-1) < 0.01) then
  608. return wvec,vec
  609. end
  610. end
  611. if part.className == "WedgePart" then
  612. return part.CFrame:vectorToWorldSpace(Vector3.new(0,0.707,-0.707)), Vector3.new(0,0.707,-0.707)
  613. end
  614. end
  615.  
  616. function HWallRun(part, pos, side)
  617. if (part.className == "Part" and part.Shape == Enum.PartType.Block) or part.className ~= "Part" then
  618. flow.Value = flow.Value + 9
  619. Standing = false
  620. HWallRunning = true
  621. Action = "HWallRunning"
  622. GravPoint = 10
  623. HWRLastPart = part
  624. local dir, dirc = FindSurface(part, pos)
  625. towall = -dir
  626. dir = (CFrame.new(NV, dir) * CFrame.Angles(0,side,0)).lookVector
  627.  
  628. local bv = Instance.new("BodyVelocity", Torsoz)
  629. bv.Name = "StaminaBodyObject"
  630. bv.maxForce = Vector3.new(1/0,1/0,1/0)
  631. bv.P = 9000
  632. bv.velocity = (dir*(sprint-0.5)) + Vector3.new(0,GravPoint,0)
  633. local bg = Instance.new("BodyGyro", Torsoz)
  634. bg.Name = "StaminaBodyObject"
  635. bg.maxTorque = Vector3.new(1/0,1/0,1/0)
  636. bg.cframe = CFrame.new(Torsoz.Position+(towall*-2), Torsoz.Position) * CFrame.Angles(0,-side,-side/4.2)
  637. bg.D = 100
  638.  
  639. local sid = Instance.new("Snap")
  640.  
  641. local joint1 = Joint3
  642. if side == -math.pi/2 then
  643. SetWeld(joint1,1,1, NV,NV, Vector3.new(1.5,0.5,0), Vector3.new(math.pi/1.3,0.1,math.pi/2.5))
  644. else
  645. sid = joint1
  646. SetWeld(joint1,1,1, NV,NV, Vector3.new(1.4,0.6,0), Vector3.new(-math.pi/12,0,math.pi/7))
  647. end
  648. local j1c0 = joint1.C0
  649.  
  650. local joint2 = Joint4
  651. if side == math.pi/2 then
  652. SetWeld(joint2,1,1, NV,NV, Vector3.new(-1.5,0.5,0), Vector3.new(math.pi/1.3,-0.1,-math.pi/2.5))
  653. else
  654. sid = joint2
  655. SetWeld(joint2,1,1, NV,NV, Vector3.new(-1.4,0.6,0), Vector3.new(-math.pi/12,0,-math.pi/7))
  656. end
  657. local j2c0 = joint2.C0
  658.  
  659. local joint3 = Joint1
  660. joint3.C1 = CFrame.new(0,1,0)
  661. if side == -math.pi/2 then
  662. SetWeld(joint3,1,1, NV,NV, Vector3.new(0.5,-0.38,-0.3), Vector3.new(0,math.pi/2,0.14))
  663. else
  664. SetWeld(joint3,1,1, NV,NV, Vector3.new(0.5,-0.8,-0.2), Vector3.new(0,math.pi/2,0.2))
  665. end
  666.  
  667.  
  668. local joint4 = Joint2
  669. joint4.C1 = CFrame.new(0,1,0)
  670. if side == -math.pi/2 then
  671. SetWeld(joint4,1,1, NV,NV, Vector3.new(-0.5,-0.8,-0.2), Vector3.new(0,0,0.2))
  672. else
  673. SetWeld(joint4,1,1, NV,NV, Vector3.new(-0.5,-0.38,-0.3), Vector3.new(0,0,0.14))
  674. end
  675.  
  676. local joint5 = Joint5
  677. SetWeld(joint5,1,1,NV,NV,Vector3.new(0,0.9,0),Vector3.new(0,0,side/7))
  678.  
  679. Animation.AnimationId = "rbxassetid://125749145" -- ???? ???????? ?????????? ????? rbxassetid://
  680. Animate = humanoid:LoadAnimation(Animation)
  681. Animate:Play()
  682. player.Character.HumanoidRootPart.CanCollide = false
  683. Torsoz.CFrame = CFrame.new(pos+(towall*-2), pos) * CFrame.Angles(0,-side,-side/2.2)
  684. bg.cframe = CFrame.new(pos+(towall*-2), pos) * CFrame.Angles(0,-side,-side/2.2)
  685.  
  686. local aniangle = 0
  687. local aniplus = true
  688. local aniangle2 = 0
  689. local aniplus2 = true
  690.  
  691. local prevpart = part
  692. HWRLastPart = part
  693. while HWallRunning == true do
  694.  
  695.  
  696.  
  697. Animation.AnimationId = "rbxassetid://125749145" -- ???? ???????? ?????????? ????? rbxassetid://
  698. Animate = humanoid:LoadAnimation(Animation)
  699. Animate:Play()
  700. player.Character.HumanoidRootPart.CanCollide = false
  701. if aniangle > math.pi then
  702. aniplus = false
  703. elseif aniangle < -math.pi then
  704. aniplus = true
  705. end
  706. if aniplus == true then
  707. aniangle = aniangle + 0.95
  708. elseif aniplus == false then
  709. aniangle = aniangle - 0.95
  710. end
  711.  
  712. if aniangle2 > math.pi then
  713. aniplus2 = false
  714. elseif aniangle2 < -math.pi then
  715. aniplus2 = true
  716. end
  717. if aniplus2 == true then
  718. aniangle2 = aniangle2 + 0.23
  719. elseif aniplus2 == false then
  720. aniangle2 = aniangle2 - 0.23
  721. end
  722.  
  723. Hu.PlatformStand = true
  724. local hitz, enz = RAY(Torsoz.Position, Vector3.new(0,-3,0))
  725. local hitz2, enz2 = RAY(Torsoz.Position, towall*3.4)
  726.  
  727. --- if player ends wall run on ground
  728. if hitz ~= nil and hitz.CanCollide == true then
  729. bg.cframe = CFrame.new(enz2+(towall*-2), enz2) * CFrame.Angles(0,-side,0)
  730. local offset = (bg.cframe.p.y+enz2.y) - bg.cframe.p.y
  731. Torsoz.CFrame = CFrame.new(Vector3.new(bg.cframe.p.x,offset,bg.cframe.p.z), enz2) * CFrame.Angles(0,-side,0)
  732. Torsoz.Velocity = NV
  733. break
  734. end
  735.  
  736. ---- if new wall found --------
  737.  
  738. if hitz2 ~= nil and hitz2.CanCollide == true then
  739. if hitz2 ~= prevpart then
  740. local direct = CFrame.new(Torsoz.Position, Torsoz.Position+dir) * CFrame.Angles(0,side,0)
  741. local hitz3, enz3 = RAY(Torsoz.Position, (direct * CFrame.Angles(0,-side/2.3,0)).lookVector*4)
  742. if hitz3 ~= nil then
  743. Torsoz.CFrame = CFrame.new(enz2+(towall*-2), enz2) * CFrame.Angles(0,-side*1.1,-side/2.2)
  744. bg.cframe = CFrame.new(enz2+(towall*-2), enz2) * CFrame.Angles(0,-side*1.1,-side/2.2)
  745. dir, dirc = FindSurface(hitz2, enz2)
  746. towall = -dir
  747. dir = (CFrame.new(NV, dir) * CFrame.Angles(0,side,0)).lookVector
  748. prevpart = hitz2
  749. HWRLastPart = hitz2
  750. else
  751. ---- if player fails to find new wall to run on
  752.  
  753. Torsoz.CFrame = CFrame.new(Torsoz.Position, Torsoz.Position+dir)
  754. bg.cframe = CFrame.new(Torsoz.Position, Torsoz.Position+dir)
  755. Torsoz.Velocity = NV
  756. HWRCooldown = 8
  757. break
  758. end
  759. end
  760. --- continue to wall run
  761. step.SoundId = "rbxassetid://131436155"
  762. step.Volume = 1.1 --Change this to suit your tastes 8)
  763. step.PlayOnRemove = false
  764. step.Looped = false --Change this to false if you don't want this to loop
  765. step.Playing = true
  766. player.Character.HumanoidRootPart.CanCollide = false
  767. Torsoz.CFrame = CFrame.new(enz2+(towall*-2), enz2) * CFrame.Angles(0,-side,-side/2.2)
  768. bg.cframe = CFrame.new(enz2+(towall*-2), enz2) * CFrame.Angles(0,-side,-side/2.2)
  769. else
  770. ---- if player ends wall run at end of wall
  771. sounb.SoundId = "rbxassetid://1941274854"
  772. sounb.Volume = 1.2 --Change this to suit your tastes 8)
  773. sounb.PlayOnRemove = false
  774. sounb.Looped = false
  775. sounb:Play()
  776. Torsoz.CFrame = CFrame.new(Torsoz.Position, Torsoz.Position+dir)
  777. bg.cframe = CFrame.new(Torsoz.Position, Torsoz.Position+dir)
  778. Torsoz.Velocity = NV
  779. HWRCooldown = 8
  780. break
  781. end
  782.  
  783. local hitz3, enz3 = RAY(Torsoz.Position, Torsoz.CFrame.lookVector*2)
  784. if hitz3 ~= nil and hitz3.CanCollide == true then
  785. Torsoz.CFrame = CFrame.new(Torsoz.Position, Torsoz.Position+dir)
  786. bg.cframe = CFrame.new(Torsoz.Position, Torsoz.Position+dir)
  787. Torsoz.Velocity = NV
  788. HWRCooldown = 8
  789. break
  790. end
  791.  
  792. bv.Parent = Torsoz
  793. bv.velocity = (dir*(sprint-0.5)) + Vector3.new(0,GravPoint,0)
  794. bg.cframe = bg.cframe * CFrame.Angles(aniangle/80,aniangle/80,0)
  795. Torsoz.CFrame = Torsoz.CFrame * CFrame.Angles(aniangle/80,aniangle/80,0)
  796. local j3,j3a = GetWeld(joint3)
  797. local j4,j4a = GetWeld(joint4)
  798. SetWeld(joint3,1,1, j3,j3a, j3,Vector3.new(-0.2+(aniangle/4),0,0))
  799. SetWeld(joint4,1,1, j4,j4a, j4,Vector3.new(-0.2+(-aniangle/4),0,0))
  800. if side == math.pi/2 then
  801. local j1,j1a = GetWeld(joint1)
  802. SetWeld(joint1,1,1, j1,j1a, j1, Vector3.new(0,0,0.8+(aniangle2/14)))
  803. else
  804. local j2,j2a = GetWeld(joint2)
  805. SetWeld(joint2,1,1, j2,j2a, j2, Vector3.new(0,0,-0.8-(aniangle2/14)))
  806. end
  807.  
  808. wait(0.025)
  809. if GravPoint < -100 then
  810. bg.cframe = CFrame.new(enz2+(towall*-2), enz2) * CFrame.Angles(0,-side,0)
  811. local offset = math.abs((bg.cframe.p.y+enz2.y) - bg.cframe.p.y)
  812. Torsoz.CFrame = CFrame.new(Vector3.new(bg.cframe.p.x,offset,bg.cframe.p.z), enz2) * CFrame.Angles(0,-side,0)
  813. break
  814. end
  815.  
  816. end
  817.  
  818. if HWallRunning == "Jumping" then
  819. sounb.SoundId = "rbxassetid://541909867" --Replace [SoundID] with the ID of the sound
  820. sounb.Volume = 0.95 --Change this to suit your tastes 8)
  821. sounb.PlayOnRemove = false
  822. sounb.Looped = false--Change this to false if you don't want this to loop
  823. sounb:Play()
  824. Animation.AnimationId = "rbxassetid://125750702" -- ???? ???????? ?????????? ????? rbxassetid://
  825. Animate = humanoid:LoadAnimation(Animation)
  826. Animate:Play()
  827. player.Character.HumanoidRootPart.CanCollide = false
  828. HWRCooldown = 6
  829. joint1.C1 = CFrame.new(0,0.5,0)
  830.  
  831. joint2.C1 = CFrame.new(0,0.5,0)
  832. if side == -math.pi/2 then
  833. joint2.C0 = CFrame.new(-1.35,0.5,0) * CFrame.Angles(0,side/2.4,-math.pi/3)
  834. else
  835. joint2.C0 = CFrame.new(-1.35,0.5,0) * CFrame.Angles(0,side/2.4,-math.pi/4)
  836. end
  837.  
  838. joint3.C1 = CFrame.new(0,1,0)
  839. if side == -math.pi/2 then
  840. joint3.C0 = CFrame.new(0.5,-0.8,0) * CFrame.Angles(0,math.pi+(side/2.4),-math.pi/4)
  841. else
  842. joint3.C0 = CFrame.new(0.5,-0.8,0) * CFrame.Angles(0,(side/2.4),math.pi/4)
  843. end
  844. joint4.C1 = CFrame.new(0,1,0)
  845. if side == -math.pi/2 then
  846. joint4.C0 = CFrame.new(-0.5,-0.8,0) * CFrame.Angles(0,math.pi+(side/2.4),math.pi/4)
  847. else
  848. joint4.C0 = CFrame.new(-0.5,-0.8,0) * CFrame.Angles(0,(side/2.4),-math.pi/4)
  849. end
  850.  
  851. local joint5 = Joint5
  852. joint5.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(0,side/2.4,0)
  853. joint5.C0 = CFrame.new(0,1,0)
  854. player.Character.HumanoidRootPart.CanCollide = true
  855. local j1,j1a = GetWeld(joint1)
  856. local j2,j2a = GetWeld(joint2)
  857. local j3,j3a = GetWeld(joint3)
  858. local j4,j4a = GetWeld(joint4)
  859. local j5,j5a = GetWeld(joint5)
  860.  
  861. GravPoint = 26
  862. local collidecount = 0
  863. local bgangle = side/2
  864. local count = 1
  865. local dir2 = (CFrame.new(NV, dir) * CFrame.Angles(0,-side/2.4,0)).lookVector
  866. HWRDir = dir2
  867. bv.velocity = (dir2*(sprint+5)) + Vector3.new(0,GravPoint,0)
  868. while HWallRunning == "Jumping" do
  869. local hitz, enz = RAY(Torsoz.Position, Vector3.new(0,-4,0))
  870. local hitz2, enz2 = RAY(Torsoz.Position, dir2*1.4)
  871. if hitz ~= nil and hitz.CanCollide == true then
  872. local offset = math.abs(enz.y - Torsoz.CFrame.p.y)
  873. Torsoz.CFrame = CFrame.new(enz+Vector3.new(0,2.9,0), enz+Vector3.new(0,2.9,0)+dir2)
  874. Torsoz.Velocity = NV
  875. Animate:Stop()
  876. player.Character.HumanoidRootPart.CanCollide = true
  877. break
  878. end
  879.  
  880. if hitz2 ~= nil and hitz2.CanCollide == true then
  881. collidecount = collidecount + 1
  882. if collidecount == 4 then
  883. Torsoz.CFrame = CFrame.new(Torsoz.Position, Torsoz.Position+dir2) * CFrame.new(0,0,0.4)
  884. Torsoz.Velocity = Vector3.new(0,Torsoz.Velocity.y,0)
  885. HWRCooldown = 5
  886. VWRCooldown = 5
  887. Animate:Stop()
  888. player.Character.HumanoidRootPart.CanCollide = true
  889. wait(0.02)
  890. break
  891. end
  892. end
  893.  
  894. if side/2 > 0 then
  895. if bgangle > 0.2 then
  896. bgangle = bgangle - 0.055
  897. end
  898. else
  899. if bgangle < -0.2 then
  900. bgangle = bgangle + 0.055
  901. end
  902. end
  903.  
  904. if count <= 5 then
  905. if side == -math.pi/2 then
  906. SetWeld(joint1,count,5, j1,j1a, Vector3.new(1.35,0.5,0), Vector3.new(0,side/2.4,math.pi/4))
  907. SetWeld(joint2,count,5, j2,j2a, Vector3.new(-1.35,0.5,0), Vector3.new(0,side/2.4,-math.pi/3))
  908. SetWeld(joint3,count,5, j3,j3a, Vector3.new(0.5,-0.8,0), Vector3.new(0,-side/1.7,0))
  909. joint3.C0 = joint3.C0 * CFrame.Angles((-math.pi/4)/5*count,0,0)
  910. SetWeld(joint4,count,5, j4,j4a, Vector3.new(-0.5,-0.8,0), Vector3.new(0,-side/1.7,0))
  911. joint4.C0 = joint4.C0 * CFrame.Angles((math.pi/4)/5*count,0,0)
  912. else
  913. SetWeld(joint1,count,5, j1,j1a, Vector3.new(1.35,0.5,0), Vector3.new(0,side/2.4,math.pi/3))
  914. SetWeld(joint2,count,5, j2,j2a, Vector3.new(-1.35,0.5,0), Vector3.new(0,side/2.4,-math.pi/4))
  915. SetWeld(joint3,count,5, j3,j3a, Vector3.new(0.5,-0.8,0), Vector3.new(0,-side/1.7,0))
  916. joint3.C0 = joint3.C0 * CFrame.Angles((math.pi/4)/5*count,0,0)
  917. SetWeld(joint4,count,5, j4,j4a, Vector3.new(-0.5,-0.8,0), Vector3.new(0,-side/1.7,0))
  918. joint4.C0 = joint4.C0 * CFrame.Angles((-math.pi/4)/5*count,0,0)
  919. end
  920.  
  921. count = count + 1
  922. end
  923.  
  924. bg.Parent = Torsoz
  925. bg.cframe = CFrame.new(NV, dir) * CFrame.Angles(0,side/15,-bgangle)
  926. bv.velocity = (dir2*(sprint+5)) + Vector3.new(0,GravPoint,0)
  927. if collidecount ~= 0 then
  928. bv.velocity = Vector3.new(0,bv.velocity.y,0)
  929. Animate:Stop()
  930. player.Character.HumanoidRootPart.CanCollide = true
  931. end
  932. if GravPoint < -120 then
  933. break
  934. end
  935. wait(0.025)
  936. end
  937. end
  938.  
  939. Hu.PlatformStand = false
  940. bv:remove()
  941.  
  942. HWRGravDrop = false
  943. Stand()
  944. HWallRunning = false
  945. end
  946. end
  947.  
  948. function VWR(part, pos)
  949. if (part.className == "Part" and part.Shape == Enum.PartType.Block) or part.className ~= "Part" then
  950. print("VWR Activated")
  951. flow.Value = flow.Value + 9
  952. Standing = false
  953. VWallRunning = true
  954. Action = "VWallRunning"
  955. GravPoint = 40
  956. local percent = 1
  957. VWRLastPart = part
  958. local dir, dirc = FindSurface(part, pos)
  959. towall = -dir
  960. dir = (CFrame.new(NV, -dir) * CFrame.Angles(math.pi/2,0,0)).lookVector
  961. --[[
  962. local p = P:Clone()
  963. p.Parent = char
  964. p.Size = Vector3.new(2,2,2)
  965. p.BrickColor = BrickColor.new("Lime green")
  966. p.CanCollide = false
  967. p.CFrame = part.CFrame * CFrame.new(dirc*5)
  968. p.Transparency = 0.3
  969. ]]
  970. local bv = Instance.new("BodyVelocity", Torsoz)
  971. bv.Name = "StaminaBodyObject"
  972. bv.maxForce = Vector3.new(1/0,1/0,1/0)
  973. bv.P = 9000
  974. bv.velocity = (dir*(sprint-1))*percent
  975.  
  976. local bg = Instance.new("BodyGyro", Torsoz)
  977. bg.Name = "StaminaBodyObject"
  978. bg.maxTorque = Vector3.new(1/0,1/0,1/0)
  979. bg.D = 100
  980. local posi = pos + (-towall*1.8)
  981. bg.cframe = CFrame.new(posi, posi+towall) * CFrame.Angles((math.pi/5),0,0)
  982. Torsoz.CFrame = CFrame.new(posi, posi+towall) * CFrame.Angles((math.pi/5),0,0)
  983.  
  984. Animation.AnimationId = "rbxassetid://125749145" -- ???? ???????? ?????????? ????? rbxassetid://
  985. Animate = humanoid:LoadAnimation(Animation)
  986. Animate:Play()
  987. player.Character.HumanoidRootPart.CanCollide = false
  988. local joint1 = Joint3
  989. SetWeld(joint1,1,1, NV,NV, Vector3.new(1.4,0.45,-0.1), Vector3.new(-math.pi/3.2,0,math.pi/8))
  990.  
  991.  
  992.  
  993. local joint2 = Joint4
  994. Animation.AnimationId = "rbxassetid://125749145" -- ???? ???????? ?????????? ????? rbxassetid://
  995. Animate = humanoid:LoadAnimation(Animation)
  996. Animate:Play()
  997. player.Character.HumanoidRootPart.CanCollide = false
  998. SetWeld(joint2,1,1, NV,NV, Vector3.new(-1.4,0.45,-0.1), Vector3.new(-math.pi/3.2,0,-math.pi/8))
  999.  
  1000. local joint3 = Joint1
  1001. SetWeld(joint3,1,1, NV,NV, Vector3.new(0.48,-0.6,-0.1), Vector3.new(0,math.pi/2,0))
  1002. joint3.C1 = CFrame.new(0,0.7,0.2) * CFrame.Angles(0,math.pi/2,0)
  1003.  
  1004.  
  1005. local joint4 = Joint2
  1006. SetWeld(joint4,1,1, NV,NV, Vector3.new(-0.48,-0.6,-0.1), Vector3.new(0,math.pi/2,0))
  1007. joint4.C1 = CFrame.new(0,0.7,0.2) * CFrame.Angles(0,math.pi/2,0)
  1008.  
  1009. local joint5 = Joint5
  1010. Animation.AnimationId = "rbxassetid://125749145" -- ???? ???????? ?????????? ????? rbxassetid://
  1011. Animate = humanoid:LoadAnimation(Animation)
  1012. Animate:Play()
  1013. player.Character.HumanoidRootPart.CanCollide = false
  1014. SetWeld(joint5,1,1, NV,NV, Vector3.new(0,1,0), Vector3.new(math.pi/20,0,0))
  1015.  
  1016. local aniangle = 0
  1017. local aniplus = true
  1018.  
  1019. while VWallRunning == true do
  1020. local hitz, enz = RAY(Torsoz.Position, towall*2.1)
  1021. local hitz2, enz2 = RAY(Torsoz.Position, (CFrame.new(NV,towall)*CFrame.Angles(math.pi/2,0,0)).lookVector*2.4)
  1022.  
  1023. if aniangle > math.pi then
  1024. aniplus = false
  1025. elseif aniangle < -math.pi then
  1026. aniplus = true
  1027. end
  1028. if aniplus == true then
  1029. aniangle = aniangle + (1.3*(percent+0.2))
  1030. elseif aniplus == false then
  1031. aniangle = aniangle - (1.3*(percent+0.2))
  1032. end
  1033.  
  1034. bv.velocity = (dir*(sprint-1))*percent
  1035. if VWRLeft == true then
  1036. bv.velocity = bv.velocity + ((CFrame.new(NV, towall) * CFrame.Angles(0,math.pi/2,0)).lookVector * (11*percent+5))
  1037. end
  1038. if VWRRight == true then
  1039. bv.velocity = bv.velocity - ((CFrame.new(NV, towall) * CFrame.Angles(0,math.pi/2,0)).lookVector * (11*percent+5))
  1040. end
  1041.  
  1042. bg.cframe = CFrame.new(posi, posi+towall) * CFrame.Angles((math.pi/5),0,0) * CFrame.Angles(0,aniangle/60,0)
  1043. step.SoundId = "rbxassetid://131436155" --Replace [SoundID] with the ID of the sound
  1044. step.Volume = 1.1 --Change this to suit your tastes 8)
  1045. step.PlayOnRemove = false
  1046. step.Looped = false--Change this to false if you don't want this to loop
  1047. step.Playing = true
  1048.  
  1049. SetWeld(joint1,1,1, NV,NV, Vector3.new(1.4,0.45,-0.1), Vector3.new(-math.pi/3.2,aniangle/52,(math.pi/8)+(aniangle/30)))
  1050. SetWeld(joint2,1,1, NV,NV, Vector3.new(-1.4,0.45,-0.1), Vector3.new(-math.pi/3.2,aniangle/52,(-math.pi/8)+(-aniangle/30)))
  1051. SetWeld(joint3,1,1, NV,NV, Vector3.new(0.51,-0.75,-(aniangle/30)), Vector3.new(0,math.pi/2,(aniangle/8)-0.3))
  1052. SetWeld(joint4,1,1, NV,NV, Vector3.new(-0.51,-0.75,(aniangle/30)), Vector3.new(0,math.pi/2,(-aniangle/8)-0.3))
  1053.  
  1054. if hitz == nil then
  1055. local lv = Torsoz.Position + (Torsoz.CFrame.lookVector*100)
  1056. Torsoz.CFrame = CFrame.new(Torsoz.Position, Vector3.new(lv.x,Torsoz.Position.y,lv.z))
  1057. break
  1058. end
  1059.  
  1060.  
  1061. if hitz2 ~= nil then
  1062. sounb.SoundId = "rbxassetid://177172187" --Replace [SoundID] with the ID of the sound
  1063. sounb.Volume = 2 --Change this to suit your tastes 8)
  1064. sounb.PlayOnRemove = false
  1065. sounb.Looped = false--Change this to false if you don't want this to loop
  1066. sounb:Play()
  1067. percent = 0
  1068. VWallRunning = "Falling"
  1069. Action = "VWRFalling"
  1070. GravPoint = -7
  1071. break
  1072. end
  1073.  
  1074. wait(0.02)
  1075. percent = percent - 0.028
  1076. if percent <= 0.15 then
  1077. VWallRunning = "Falling"
  1078. Action = "VWRFalling"
  1079. sounb.SoundId = "rbxassetid://541909763" --Replace [SoundID] with the ID of the sound
  1080. sounb.Volume = 1.3 --Change this to suit your tastes 8)
  1081. sounb.PlayOnRemove = false
  1082. sounb.Looped = false
  1083. sounb:Play()
  1084. end
  1085. end
  1086.  
  1087. ---Parkour script edit by o000o---
  1088. -------------------------- Falling from VWR ------------------------------
  1089. if VWallRunning == "Falling" then
  1090. GravPoint = GravPoint - 1
  1091. local dirpos = (-towall *5) + Vector3.new(0,GravPoint,0)
  1092. bv.velocity = CFrame.new(NV, dirpos).lookVector * dirpos.magnitude
  1093.  
  1094. local j1,j1a = GetWeld(joint1)
  1095. local j2,j2a = GetWeld(joint2)
  1096. local j3,j3a = GetWeld(joint3)
  1097. local j4,j4a = GetWeld(joint4)
  1098. local j5,j5a = GetWeld(joint5)
  1099.  
  1100. local counter = 0
  1101. while VWallRunning == "Falling" do
  1102. counter = counter + 1
  1103. local hitz, enz = RAY(H.Position, Vector3.new(0,-2.4,0))
  1104.  
  1105. dirpos = (-towall *5) + Vector3.new(0,GravPoint,0)
  1106. bv.velocity = CFrame.new(NV, dirpos).lookVector * dirpos.magnitude
  1107. if VWRLeft == true then
  1108. bv.velocity = bv.velocity + ((CFrame.new(NV, towall) * CFrame.Angles(0,math.pi/2,0)).lookVector * 9)
  1109. end
  1110. if VWRRight == true then
  1111. bv.velocity = bv.velocity - ((CFrame.new(NV, towall) * CFrame.Angles(0,math.pi/2,0)).lookVector * 9)
  1112. end
  1113. bg.cframe = CFrame.new(NV, (-towall*30) + Vector3.new(0,GravPoint,0)) * CFrame.Angles(-math.pi/2.55,math.pi,0)
  1114.  
  1115. if counter <= 35 then
  1116. SetWeld(joint1,counter,35, j1,j1a, Vector3.new(1.4,0.45,-0.1), Vector3.new(math.pi/9,0,math.pi/9))
  1117. SetWeld(joint2,counter,35, j2,j2a, Vector3.new(-1.4,0.45,-0.1), Vector3.new(math.pi/9,0,-math.pi/9))
  1118. SetWeld(joint3,counter,35, j3,j3a, Vector3.new(0.5,-0.75,0), Vector3.new(0,math.pi/2,math.pi/9))
  1119. joint3.C1 = CFrame.new(0,0.7 + (0.3/35*counter),0.2 - (0.2/35*counter)) * CFrame.Angles(0,math.pi/2,0)
  1120. SetWeld(joint4,counter,35, j4,j4a, Vector3.new(-0.5,-0.75,0), Vector3.new(0,math.pi/2,math.pi/9))
  1121. joint4.C1 = CFrame.new(0,0.7 + (0.3/35*counter),0.2 - (0.2/35*counter)) * CFrame.Angles(0,math.pi/2,0)
  1122. SetWeld(joint5,counter,35, j5,j5a, Vector3.new(0,1,0), Vector3.new(-math.pi/6,0,0))
  1123. end
  1124.  
  1125. if hitz ~= nil then
  1126. bv:remove()
  1127. Torsoz.CFrame = CFrame.new(enz+Vector3.new(0,2,0), (enz+Vector3.new(0,2,0)) + ((-towall*25) + Vector3.new(0,GravPoint,0))) * CFrame.Angles(-math.pi/2.55,math.pi,0)
  1128. Torsoz.Velocity = NV
  1129. Torsoz.RotVelocity = NV
  1130. local bp = Instance.new("BodyPosition", Torsoz)
  1131. bp.maxForce = Vector3.new(1/0,1/0,1/0)
  1132. bp.position = Torsoz.CFrame.p
  1133. game:service("Debris"):AddItem(bp, 0.16)
  1134. flow.Value = 0
  1135. break
  1136. end
  1137.  
  1138. if GravPoint > - 180 then
  1139. GravPoint = GravPoint - 1.9
  1140. end
  1141. if counter > 200 then
  1142. break
  1143. end
  1144. wait(0.02)
  1145. end
  1146.  
  1147. local bp = Instance.new("BodyPosition")
  1148.  
  1149. local counter2 = counter
  1150. local bgangleplus = 0
  1151.  
  1152. local j1,j1a = GetWeld(joint1)
  1153. local j2,j2a = GetWeld(joint2)
  1154. local j3,j3a = GetWeld(joint3)
  1155. local j4,j4a = GetWeld(joint4)
  1156. local j5,j5a = GetWeld(joint5)
  1157.  
  1158. local landingpos
  1159.  
  1160. while VWallRunning == "BackflipFromFall" do
  1161. counter2 = counter2 + 1
  1162. local hitz, enz = RAY(H.Position+Vector3.new(0,2,0), Vector3.new(0,-4.4,0))
  1163.  
  1164. if counter2 - counter < 13 then
  1165. bgangleplus = bgangleplus - ((math.pi*1.1)/13)
  1166. end
  1167. if counter2 - counter <= 13 then
  1168. SetWeld(joint1,counter2-counter,13, j1,j1a, Vector3.new(1.4,0.5,0.1), Vector3.new(math.pi/2,0.1,math.pi/2))
  1169. SetWeld(joint2,counter2-counter,13, j2,j2a, Vector3.new(-1.4,0.5,0.1), Vector3.new(math.pi/2,-0.1,-math.pi/2))
  1170. SetWeld(joint3,counter2-counter,13, j3,j3a, Vector3.new(0.52,-0.3,-0.65), Vector3.new(0,math.pi/2,0))
  1171. SetWeld(joint4,counter2-counter,13, j4,j4a, Vector3.new(-0.51,-0.9,-0.05), Vector3.new(0,math.pi/2,0))
  1172. SetWeld(joint5,counter2-counter,13, j5,j5a, Vector3.new(0,0.9,0), Vector3.new(-math.pi/7,0,0))
  1173. end
  1174.  
  1175. dirpos = (-towall *5) + Vector3.new(0,GravPoint,0)
  1176. --bv.velocity = Vector3.new(0,-2,0)
  1177. bv.velocity = CFrame.new(NV, dirpos).lookVector * dirpos.magnitude
  1178. if VWRLeft == true then
  1179. bv.velocity = bv.velocity + ((CFrame.new(NV, towall) * CFrame.Angles(0,math.pi/2,0)).lookVector * 9)
  1180. end
  1181. if VWRRight == true then
  1182. bv.velocity = bv.velocity - ((CFrame.new(NV, towall) * CFrame.Angles(0,math.pi/2,0)).lookVector * 9)
  1183. end
  1184. bg.cframe = CFrame.new(NV, (-towall*30) + Vector3.new(0,GravPoint,0)) * CFrame.Angles((-math.pi/2.4) + bgangleplus,math.pi,0)
  1185.  
  1186. if hitz ~= nil then
  1187. bv:remove()
  1188. landingpos = enz - (towall*1.3)
  1189. if counter2 - counter > 8 then
  1190. bp = Instance.new("BodyPosition", Torsoz)
  1191. bp.maxForce = Vector3.new(1/0,1/0,1/0)
  1192. bp.position = enz+Vector3.new(0,2.4,0) + (-towall*1)
  1193. VWallRunning = "LandingFall"
  1194. else
  1195. Torsoz.CFrame = bg.cframe + (enz+Vector3.new(0,2.3,0))
  1196. Torsoz.Velocity = NV
  1197. Torsoz.RotVelocity = NV
  1198. local bp = Instance.new("BodyPosition", Torsoz)
  1199. bp.maxForce = Vector3.new(1/0,1/0,1/0)
  1200. bp.position = Torsoz.CFrame.p
  1201. game:service("Debris"):AddItem(bp, 0.14)
  1202. flow.Value = 0
  1203. end
  1204. break
  1205. end
  1206.  
  1207. if GravPoint > - 180 then
  1208. GravPoint = GravPoint - 1.9
  1209. end
  1210. if counter2 > 200 then
  1211. break
  1212. end
  1213. wait(0.02)
  1214. end
  1215.  
  1216. if VWallRunning == "LandingFall" then
  1217. print("Landing")
  1218. sounb.SoundId = "rbxassetid://248493371" --Replace [SoundID] with the ID of the sound
  1219. sounb.Volume = 1.7 --Change this to suit your tastes 8)
  1220. sounb.PlayOnRemove = false
  1221. sounb.Looped = false
  1222. sounb:Play()
  1223. Animation.AnimationId = "rbxassetid://287325678" -- ???? ???????? ?????????? ????? rbxassetid://
  1224. Animate = humanoid:LoadAnimation(Animation)
  1225. Animate:Play()
  1226. player.Character.HumanoidRootPart.CanCollide = false
  1227.  
  1228.  
  1229. joint3.C1 = CFrame.new(0,1,0) * CFrame.Angles(0,math.pi/2,0)
  1230. joint4.C1 = CFrame.new(0,1,0) * CFrame.Angles(0,math.pi/2,0)
  1231. local j1,j1a = GetWeld(joint1)
  1232. local j2,j2a = GetWeld(joint2)
  1233. local j3,j3a = GetWeld(joint3)
  1234. local j4,j4a = GetWeld(joint4)
  1235. local j5,j5a = GetWeld(joint5)
  1236.  
  1237. local a
  1238. local mesh
  1239. if GravPoint < -70 then
  1240. a = P:Clone()
  1241. a.Parent = Torsoz
  1242. a.Name = "AirLandingEffect"
  1243. boom.SoundId = "rbxassetid://144699494" --Replace [SoundID] with the ID of the sound
  1244. boom.Volume = 2 --Change this to suit your tastes 8)
  1245. boom.PlayOnRemove = false
  1246. boom.Looped = false--Change this to false if you don't want this to loop
  1247. boom:Play()
  1248. a.BrickColor = BrickColor.new("Medium stone grey")
  1249. sounb.SoundId = "rbxassetid://2006700168" --Replace [SoundID] with the ID of the sound
  1250. sounb.Volume = 1.2 --Change this to suit your tastes 8)
  1251. sounb.PlayOnRemove = false
  1252. sounb.Looped = false
  1253. sounb:Play()
  1254. Animate:Stop()
  1255. player.Character.HumanoidRootPart.CanCollide = true
  1256. a.Transparency = 0.3
  1257. a.CFrame = CFrame.new(landingpos+Vector3.new(0,0.4,0))
  1258. mesh = Instance.new("SpecialMesh", a)
  1259. mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
  1260. mesh.Scale = Vector3.new(0,0,0)
  1261. Animate:Stop()
  1262. player.Character.HumanoidRootPart.CanCollide = true
  1263. end
  1264.  
  1265. local bgcf = CFrame.new(NV, Vector3.new(towall.x,0,towall.z))
  1266. bg.cframe = bgcf * CFrame.Angles(-math.pi/7,0,0)
  1267. local bgval = math.pi/7/2
  1268.  
  1269. for i = 1, 6 do
  1270. Hu.PlatformStand = true
  1271. SetWeld(joint1,i,6, j1,j1a, Vector3.new(1.2,0.5,0.2), Vector3.new(math.pi/2,0.5,math.pi/1.2))
  1272. SetWeld(joint2,i,6, j2,j2a, Vector3.new(-1.2,0.5,0.2), Vector3.new(math.pi/2,-0.5,-math.pi/1.2))
  1273. SetWeld(joint3,i,6, j3,j3a, Vector3.new(0.51,-0.3,-0.8), Vector3.new(0,math.pi/2,-math.pi/7))
  1274. SetWeld(joint4,i,6, j4,j4a, Vector3.new(-0.51,-0.8,-0.7), Vector3.new(0,math.pi/2,-math.pi/3))
  1275. SetWeld(joint5,i,6, j5,j5a, Vector3.new(0,0.85,0), Vector3.new(-math.pi/8,0,0))
  1276. bp.position = bp.position + Vector3.new(0,-0.07,0)
  1277. bg.cframe = bgcf * CFrame.Angles((-bgval*2) + (bgval/6*i),0,0)
  1278. Torsoz.CFrame = bg.cframe + bp.position
  1279. if a ~= nil then
  1280. mesh.Scale = mesh.Scale + Vector3.new(1.3,0.35,1.3)
  1281. a.Transparency = 0.3 + (0.7/6*i)
  1282. Animate:Stop()
  1283. player.Character.HumanoidRootPart.CanCollide = true
  1284. end
  1285. wait(0.02)
  1286. end
  1287. if a ~= nil then
  1288. a:remove()
  1289. end
  1290. local j1,j1a = GetWeld(joint1)
  1291. local j2,j2a = GetWeld(joint2)
  1292. local j3,j3a = GetWeld(joint3)
  1293. local j4,j4a = GetWeld(joint4)
  1294. local j5,j5a = GetWeld(joint5)
  1295. for i = 1, 6 do
  1296. Hu.PlatformStand = true
  1297. SetWeld(joint1,i,6, j1,j1a, Vector3.new(1.5,0.5,0), Vector3.new(0,0,0))
  1298. SetWeld(joint2,i,6, j2,j2a, Vector3.new(-1.5,0.5,0), Vector3.new(0,0,0))
  1299. SetWeld(joint3,i,6, j3,j3a, Vector3.new(0.5,-1,0), Vector3.new(0,math.pi/2,0))
  1300. SetWeld(joint4,i,6, j4,j4a, Vector3.new(-0.5,-1,0), Vector3.new(0,math.pi/2,0))
  1301. SetWeld(joint5,i,6, j5,j5a, Vector3.new(0,1,0), Vector3.new(0,0,0))
  1302. bp.position = bp.position + Vector3.new(0,0.1,0)
  1303. bg.cframe = bgcf * CFrame.Angles(-bgval + (bgval/6*i),0,0)
  1304. Torsoz.CFrame = bg.cframe + bp.position
  1305. Animate:Stop()
  1306. player.Character.HumanoidRootPart.CanCollide = true
  1307. wait(0.02)
  1308. end
  1309.  
  1310. bp:remove()
  1311. end
  1312.  
  1313. end
  1314.  
  1315. bv:remove()
  1316. bg:remove()
  1317. VWallRunning = false
  1318. Stand()
  1319. end
  1320. end
  1321.  
  1322. function Slide(pos)
  1323. flow.Value = flow.Value + 6
  1324. Action = "Sliding"
  1325. Sliding = true
  1326. sounb.SoundId = "rbxassetid://2985771666"
  1327. sounb.Volume = 1.3 --Change this to suit your tastes 8)
  1328. sounb.PlayOnRemove = false
  1329. sounb.Looped = false
  1330. sounb:Play()
  1331. Animation.AnimationId = "rbxassetid://132546884" -- ???? ???????? ?????????? ????? rbxassetid://
  1332. Animate = humanoid:LoadAnimation(Animation)
  1333. Animate:Play()
  1334. player.Character.HumanoidRootPart.CanCollide = false
  1335. GravPoint = Torsoz.Velocity.y
  1336. local spd = Vector3.new(Torsoz.Velocity.x,0,Torsoz.Velocity.z).magnitude + 10
  1337. local dir = Vector3.new(Torsoz.Velocity.x,0,Torsoz.Velocity.z).unit
  1338.  
  1339. local bv = Instance.new("BodyVelocity", Torsoz)
  1340. bv.maxForce = Vector3.new(1/0,1/0,1/0)
  1341. bv.velocity = dir*spd
  1342. local bg = Instance.new("BodyGyro", Torsoz)
  1343. bg.maxTorque = Vector3.new(1/0,1/0,1/0)
  1344. bg.cframe = CFrame.new(NV, dir) * CFrame.Angles(math.pi/2.2,0.24,0)
  1345.  
  1346. local joint1 = Joint1
  1347. local joint2 = Joint2
  1348. local joint3 = Joint3
  1349. local joint4 = Joint4
  1350. local joint5 = Joint5
  1351. local j1,j1a = GetWeld(joint1)
  1352. local j2,j2a = GetWeld(joint2)
  1353.  
  1354. SetWeld(joint1,1,1, NV,NV, Vector3.new(j1.x,j1.y,j1.z), Vector3.new(j1a.x,math.pi/2,j1a.z))
  1355. joint1.C1 = CFrame.new(0,1,0) * CFrame.Angles(0,math.pi/2,0)
  1356. SetWeld(joint2,1,1, NV,NV, Vector3.new(j2.x,j2.y,j2.z), Vector3.new(j2a.x,math.pi/2,j2a.z))
  1357. joint2.C1 = CFrame.new(0,1,0) * CFrame.Angles(0,math.pi/2,0)
  1358.  
  1359. local j1,j1a = GetWeld(joint1)
  1360. local j2,j2a = GetWeld(joint2)
  1361. local j3,j3a = GetWeld(joint3)
  1362. local j4,j4a = GetWeld(joint4)
  1363. local j5,j5a = GetWeld(joint5)
  1364.  
  1365. local count = 0
  1366. local lastpos
  1367.  
  1368. while Sliding == true do
  1369. count = count + 1
  1370. Hu.PlatformStand = true
  1371. local hitz1, enz1 = RAY(Torsoz.Position+Vector3.new(0,0.03,0), dir *2.5)
  1372. local hitz2, enz2 = RAY(Torsoz.Position-Vector3.new(0,0.2,0), dir *2.5)
  1373. local ghitz, genz = RAY(Torsoz.Position, Vector3.new(0,-2.6,0))
  1374. bv.velocity = dir*spd + Vector3.new(0,GravPoint,0)
  1375.  
  1376. if count <= 5 then
  1377. SetWeld(joint1,count,5, j1,j1a, Vector3.new(0.5,-0.8,-0.15), Vector3.new(0,(math.pi/2)+0.1,-0.4))
  1378. SetWeld(joint2,count,5, j2,j2a, Vector3.new(-0.5,-1,0), Vector3.new(0,(math.pi/2)-0.4,0))
  1379. SetWeld(joint3,count,5, j3,j3a, Vector3.new(1.5,0.5,0), Vector3.new(-0.7,-0.24,math.pi/5))
  1380. SetWeld(joint4,count,5, j4,j4a, Vector3.new(-1.5,0.5,0), Vector3.new(-0.1,0,-math.pi/1.5))
  1381. SetWeld(joint5,count,5, j5,j5a, Vector3.new(0,1,0), Vector3.new(-0.5,-0.2,0))
  1382. end
  1383.  
  1384. if (hitz1 ~= nil and hitz1.CanCollide == true) or (hitz2 ~= nil and hitz2.CanCollide == true) then
  1385. bv:remove()
  1386. bg:remove()
  1387. Sliding = "HitObject"
  1388. Animate:Stop()
  1389. player.Character.HumanoidRootPart.CanCollide = true
  1390. end
  1391. if ghitz ~= nil then
  1392. GravPoint = 0
  1393. Torsoz.CFrame = CFrame.new(genz, genz+dir) * CFrame.Angles(math.pi/2.2,0.24,0) + Vector3.new(0,0.7,0)
  1394. spd = spd - 0.95
  1395. else
  1396. if GravPoint > -180 then
  1397. GravPoint = GravPoint - 5.6
  1398. end
  1399. spd = spd - 0.36
  1400. end
  1401. if spd < 7 then
  1402. Sliding = false
  1403. end
  1404. wait(0.02)
  1405. end
  1406.  
  1407. if Sliding == false then
  1408. Animate:Stop()
  1409. player.Character.HumanoidRootPart.CanCollide = true
  1410. local j1,j1a = GetWeld(joint1)
  1411. local j2,j2a = GetWeld(joint2)
  1412. local j3,j3a = GetWeld(joint3)
  1413. local j4,j4a = GetWeld(joint4)
  1414. local j5,j5a = GetWeld(joint5)
  1415. for i = 1, 4 do
  1416. SetWeld(joint1,i,4, j1,j1a, Vector3.new(0.5,-1,0), Vector3.new(0,math.pi/2,0))
  1417. SetWeld(joint2,i,4, j2,j2a, Vector3.new(-0.5,-1,0), Vector3.new(0,math.pi/2,0))
  1418. SetWeld(joint3,i,4, j3,j3a, Vector3.new(1.5,0.5,0), NV)
  1419. SetWeld(joint4,i,4, j4,j4a, Vector3.new(-1.5,0.5,0), NV)
  1420. SetWeld(joint5,i,4, j5,j5a, Vector3.new(0,1,0), NV)
  1421. local hitz, enz = RAY(Torsoz.Position, Vector3.new(0,-2.6,0))
  1422. bg.cframe = CFrame.new(NV, dir) * CFrame.Angles((math.pi/2.2) - ((math.pi/2.2)/4*i),0.24 - (0.24/4*i),0)
  1423. bv.velocity = dir*spd + Vector3.new(0,GravPoint,0)
  1424.  
  1425. if hitz ~= nil then
  1426. GravPoint = 0
  1427. Torsoz.CFrame = CFrame.new(enz, enz+dir) * CFrame.Angles((math.pi/2.2) - ((math.pi/2.2)/4*i),0.24 - (0.24/4*i),0) + Vector3.new(0,0.7+(1.8/4*i),0)
  1428. spd = spd - 0.95
  1429. else
  1430. if GravPoint > -180 then
  1431. GravPoint = GravPoint - 5.6
  1432. end
  1433. spd = spd - 0.36
  1434. end
  1435. wait(0.02)
  1436. end
  1437. local hitz, enz = RAY(Torsoz.Position, Vector3.new(0,-2.6,0))
  1438. Torsoz.CFrame = CFrame.new(enz, enz+dir) + Vector3.new(0,3,0)
  1439. end
  1440. bv:remove()
  1441. bg:remove()
  1442. SlideCooldown = 10
  1443. Stand()
  1444. end
  1445.  
  1446. function KD(key)
  1447. if pause.Value == false then
  1448. if key == string.char(32) then
  1449. Space = true
  1450.  
  1451. local ghitz, genz = RAY(Torsoz.Position, Vector3.new(0,-3.7,0))
  1452. local hitz, enz = RAY(Torsoz.Position+Vector3.new(0,1.1,0), Torsoz.CFrame.lookVector*2.3)
  1453. local righthitz, rightenz
  1454. local lefthitz, leftenz
  1455.  
  1456. if HWallRunning == false then
  1457. righthitz, rightenz = RAY(Torsoz.Position, ((Torsoz.CFrame * CFrame.new(1.5,0,-0.2)).p - Torsoz.CFrame.p).unit*3.9)
  1458. lefthitz, leftenz = RAY(Torsoz.Position, ((Torsoz.CFrame * CFrame.new(-1.5,0,-0.2)).p - Torsoz.CFrame.p).unit*3.9)
  1459.  
  1460. elseif HWallRunning == "Jumping" then
  1461. righthitz, rightenz = RAY(Torsoz.Position, ((CFrame.new(Torsoz.Position, Torsoz.Position + HWRDir) * CFrame.new(1.5,0,-0.2)).p - Torsoz.Position).unit*3.9)
  1462. lefthitz, leftenz = RAY(Torsoz.Position, ((CFrame.new(Torsoz.Position, Torsoz.Position + HWRDir) * CFrame.new(-1.5,0,-0.2)).p - Torsoz.Position).unit*3.9)
  1463.  
  1464. end
  1465.  
  1466. if Action == "Standing" and Shift == true and (hitz == nil or hitz.CanCollide == false) and (righthitz == nil or righthitz.CanCollide == false) and (lefthitz == nil or lefthitz.CanCollide == false) and (ghitz == nil or ghitz.CanCollide == false) and (Torsoz.Velocity.y > 6 and Torsoz.Velocity.y < 50) and DivingCooldown <= 0 then
  1467. if stamina >= 10 then
  1468. --if Vector3.new(Torsoz.Velocity.x,0,Torsoz.Velocity.z).magnitude > 12 then
  1469. Dive()
  1470. --end
  1471. end
  1472. end
  1473.  
  1474. if hitz == nil and VWallRunning == "Falling" then
  1475. VWallRunning = "BackflipFromFall"
  1476. end
  1477.  
  1478. if Shift == true and Torsoz.Velocity.y > -50 and Diving == false and DivingCooldown <= 0 then
  1479. local hitz2, enz2 = RAY(Torsoz.Position, Vector3.new(0,-3.5,0))
  1480.  
  1481. if hitz ~= nil then
  1482. if Action == "Standing" and VWRCooldown == 0 then
  1483. if hitz2 == nil or hitz2.CanCollide == false then
  1484. VWR(hitz, enz)
  1485. end
  1486. end
  1487. end
  1488.  
  1489. if (HWallRunning == false or (HWallRunning == "Jumping" and (HWRLastPart ~= righthitz or HWRLastPart ~= lefthitz))) and HWRCooldown == 0 and VWallRunning == false then
  1490.  
  1491. if (hitz == nil or HWallRunning == "Jumping") and ((righthitz ~= nil and righthitz.Parent:findFirstChild("Humanoid") == nil and righthitz.Parent.className ~= "Hat") or (lefthitz ~= nil and lefthitz.Parent:findFirstChild("Humanoid") == nil and lefthitz.Parent.className ~= "Hat")) then
  1492. if hitz2 == nil or hitz2.CanCollide == false then
  1493. local right = (rightenz - Torsoz.Position).magnitude
  1494. local left = (leftenz - Torsoz.Position).magnitude
  1495. if right < left then
  1496. if HWallRunning == "Jumping" and HWRLastPart ~= righthitz then
  1497. HWallRunning = false
  1498. while Standing == false do
  1499. wait(0.01)
  1500. end
  1501. print("2nd Right Activated!")
  1502. HWallRun(righthitz, rightenz, -math.pi/2)
  1503. else
  1504. if hitz == nil then
  1505. print("Right Activated")
  1506. HWallRun(righthitz, rightenz, -math.pi/2)
  1507. end
  1508. end
  1509. elseif left < right then
  1510. if HWallRunning == "Jumping" and HWRLastPart ~= lefthitz then
  1511. HWallRunning = false
  1512. while Standing == false do
  1513. wait(0.01)
  1514. end
  1515. print("2nd Left Activated!")
  1516. HWallRun(lefthitz, leftenz, math.pi/2)
  1517. else
  1518. if hitz == nil then
  1519. print("Left Activated")
  1520. HWallRun(lefthitz, leftenz, math.pi/2)
  1521. end
  1522. end
  1523. end
  1524. end
  1525. end
  1526. end
  1527.  
  1528. end
  1529.  
  1530. if HWallRunning == true then
  1531. HWallRunning = "Jumping"
  1532. Action = "HWRJumping"
  1533. end
  1534.  
  1535. elseif key == string.char(48) then
  1536. Shift = true
  1537. elseif key == string.char(50) then
  1538. if Action == "Standing" then
  1539. Sit()
  1540. elseif HWallRunning == true then
  1541. HWRGravDrop = true
  1542. end
  1543. elseif key == string.char(52) then
  1544. if Shift == true and Action == "Standing" and SlideCooldown == 0 and Vector3.new(Torsoz.Velocity.x,0,Torsoz.Velocity.z).magnitude > 15 and Torsoz.Velocity.y > -40 then
  1545. print("Sliding")
  1546. Slide()
  1547. end
  1548. elseif key == "a" then
  1549. VWRLeft = true
  1550. elseif key == "d" then
  1551. VWRRight = true
  1552. end
  1553. end
  1554. end
  1555.  
  1556. function KU(key)
  1557. if key == string.char(32) then
  1558. Space = false
  1559. elseif key == string.char(48) then
  1560. Shift = false
  1561. elseif key == string.char(50) then
  1562. if Action == "Sitting" then
  1563. Stand()
  1564. end
  1565. elseif key == string.char(52) then
  1566. Sliding = false
  1567. elseif key == "a" then
  1568. VWRLeft = false
  1569. elseif key == "d" then
  1570. VWRRight = false
  1571. end
  1572. end
  1573.  
  1574. mouse.KeyDown:connect(function(key) KD(key) end)
  1575. mouse.KeyUp:connect(function(key) KU(key) end)
  1576.  
  1577. Joint1 = Instance.new("Snap", Torsoz)
  1578. GetWeld(Joint1)
  1579. Joint2 = Instance.new("Snap", Torsoz)
  1580. GetWeld(Joint2)
  1581. Joint3 = Instance.new("Snap", Torsoz)
  1582. GetWeld(Joint3)
  1583. Joint4 = Instance.new("Snap", Torsoz)
  1584. GetWeld(Joint4)
  1585. Joint5 = Instance.new("Snap", Torsoz)
  1586. GetWeld(Joint5)
  1587. Stand()
  1588.  
  1589. local animatebg = Instance.new("BodyGyro")
  1590. animatebg.D = 100
  1591. local GravAction = "Idle"
  1592. local PrevGravAction = GravAction
  1593.  
  1594. local prevrapos = (RA.CFrame * CFrame.new(0,-1,0)).p
  1595. local prevlapos = (LA.CFrame * CFrame.new(0,-1,0)).p
  1596. local hue = 0
  1597. local recyclecount = 0
  1598. local tickoffset = tick()
  1599. local fadetab = {}
  1600. local fadetab2 = {}
  1601. local animatebgcount = 0
  1602.  
  1603. for i = 1, 13 do
  1604. local p = P:Clone()
  1605. p.Name = "Part"..i
  1606. local mesh = Instance.new("SpecialMesh", p)
  1607. mesh.MeshId = "http://www.roblox.com/Asset/?id=1033714"
  1608. mesh.TextureId = "http://www.roblox.com/Asset/?id=48358980"
  1609. table.insert(fadetab, {p, mesh})
  1610. end
  1611. for i = 1, 13 do
  1612. local p = P:Clone()
  1613. p.Name = "Part"..i
  1614. local mesh = Instance.new("SpecialMesh", p)
  1615. mesh.MeshId = "http://www.roblox.com/Asset/?id=1033714"
  1616. mesh.TextureId = "http://www.roblox.com/Asset/?id=48358980"
  1617. table.insert(fadetab2, {p, mesh})
  1618. end
  1619.  
  1620. game:service("RunService").Stepped:connect(function()
  1621. GravAction = "Idle"
  1622. hue = hue + 3
  1623. hue = hue % 360
  1624.  
  1625. ------------- anim angle changing --------
  1626. if animangle > math.pi then
  1627. animplus = false
  1628. elseif animangle < -math.pi then
  1629. animplus = true
  1630. end
  1631. if animplus == true then
  1632. animangle = animangle + animspeed
  1633. elseif animplus == false then
  1634. animangle = animangle - animspeed
  1635. end
  1636.  
  1637. local hitz, enz = RAY(Torsoz.Position, Vector3.new(0,-3.9,0))
  1638. if Shift == true then
  1639. Hu.WalkSpeed = sprint
  1640. else
  1641. Hu.WalkSpeed = 16
  1642. end
  1643. if (FOV >= 70 and FOV < 74) and Vector3.new(Torsoz.Velocity.x,0,Torsoz.Velocity.z).magnitude > 25 then
  1644. FOV = FOV + 1
  1645. elseif (FOV <= 74 and FOV > 70) and Vector3.new(Torsoz.Velocity.x,0,Torsoz.Velocity.z).magnitude < 20 then
  1646. FOV = FOV - 1
  1647. end
  1648. if pause.Value == true then
  1649. Hu.WalkSpeed = 0
  1650. end
  1651. if Sitting == true then
  1652. local hitz2, enz2 = RAY(Torsoz.Position, Vector3.new(0,-2.2,0))
  1653. Hu.PlatformStand = true
  1654. if hitz2 == nil then
  1655. Stand()
  1656. end
  1657. end
  1658. if Diving == true then
  1659. Hu.PlatformStand = true
  1660. DivingBV.velocity = Vector3.new(DivingDir.x*(sprint+2),GravPoint,DivingDir.z*(sprint+2))
  1661. DivingBG.cframe = CFrame.new(Torsoz.Position, Torsoz.Position+DivingBV.velocity) * CFrame.Angles(-math.pi/2,0,0)
  1662.  
  1663. if GravPoint > -180 then
  1664. GravPoint = GravPoint - 2
  1665. end
  1666. end
  1667. if DivingCooldown > 0 then
  1668. DivingCooldown = DivingCooldown - 1
  1669. end
  1670. if HWallRunning == true then
  1671. if HWRGravDrop == false then
  1672. GravPoint = GravPoint - 0.4
  1673. else
  1674. GravPoint = GravPoint - 2
  1675. end
  1676. elseif HWallRunning == "Jumping" then
  1677. GravPoint = GravPoint - 1.7
  1678. end
  1679. ----------------------------- stamina ----------------------------------------
  1680. if Vector3.new(Torsoz.Velocity.x, 0, Torsoz.Velocity.z).magnitude > 18 and Action == "Standing" and Shift == true then
  1681. if stamina > 0 then
  1682. stamina = stamina - 0.5
  1683. if stamina < 0 then
  1684. Shift = false
  1685. stamina = 0
  1686. end
  1687. else
  1688. Shift = false
  1689. stamina = 0
  1690. end
  1691. if Action == "Standing" then
  1692. animspeed = 0.85
  1693. SetWeld(Joint1,1,1, NV,NV, Vector3.new(0.5,-1,0), Vector3.new(-animangle/4.85,0,0))
  1694. SetWeld(Joint2,1,1, NV,NV, Vector3.new(-0.5,-1,0), Vector3.new(animangle/4.85,0,0))
  1695. SetWeld(Joint3,1,1, NV,NV, Vector3.new(1.5,0.5,0), Vector3.new(animangle/3.5,0,0))
  1696. SetWeld(Joint4,1,1, NV,NV, Vector3.new(-1.5,0.5,0), Vector3.new(-animangle/3.5,0,0))
  1697. end
  1698. elseif Vector3.new(Torsoz.Velocity.x, 0, Torsoz.Velocity.z).magnitude > 12 and Action ~= "Sliding" then
  1699. if stamina < maxstamina then
  1700. stamina = stamina + 0.5
  1701. if stamina > maxstamina then
  1702. stamina = maxstamina
  1703. end
  1704. else
  1705. stamina = maxstamina
  1706. end
  1707. if Action == "Standing" then
  1708. animspeed = 0.65
  1709. SetWeld(Joint1,1,1, NV,NV, Vector3.new(0.5,-1,0), Vector3.new(-animangle/7,0,0))
  1710. SetWeld(Joint2,1,1, NV,NV, Vector3.new(-0.5,-1,0), Vector3.new(animangle/7,0,0))
  1711. SetWeld(Joint3,1,1, NV,NV, Vector3.new(1.5,0.5,0), Vector3.new(animangle/5,0,0))
  1712. SetWeld(Joint4,1,1, NV,NV, Vector3.new(-1.5,0.5,0), Vector3.new(-animangle/5,0,0))
  1713. end
  1714. elseif Vector3.new(Torsoz.Velocity.x, 0, Torsoz.Velocity.z).magnitude < 2 then
  1715. animspeed = 0.1
  1716. if Action == "Standing" then
  1717. SetWeld(Joint1,1,1, NV,NV, Vector3.new(0.5,-1,0), Vector3.new(-animangle/38,0,0))
  1718. SetWeld(Joint2,1,1, NV,NV, Vector3.new(-0.5,-1,0), Vector3.new(animangle/38,0,0))
  1719. SetWeld(Joint3,1,1, NV,NV, Vector3.new(1.5,0.5,0), Vector3.new(animangle/30,0,0))
  1720. SetWeld(Joint4,1,1, NV,NV, Vector3.new(-1.5,0.5,0), Vector3.new(-animangle/30,0,0))
  1721. end
  1722. if stamina < maxstamina then
  1723. if Sitting == false then
  1724. stamina = stamina + 0.65
  1725. else
  1726. stamina = stamina + 1.02
  1727. end
  1728. if stamina > maxstamina then
  1729. stamina = maxstamina
  1730. end
  1731. else
  1732. stamina = maxstamina
  1733. end
  1734. end
  1735.  
  1736. if hitz == nil then
  1737. if Torsoz.Velocity.y > 1 or (Torsoz.Velocity.y < -1 and Torsoz.Velocity.y > -90) then
  1738. if Action == "Standing" then
  1739. GravAction = "Rising"
  1740. animspeed = 0.1
  1741. SetWeld(Joint1,1,1, NV,NV, Vector3.new(0.5,-1,0), Vector3.new(-animangle/38,0,0))
  1742. SetWeld(Joint2,1,1, NV,NV, Vector3.new(-0.5,-1,0), Vector3.new(animangle/38,0,0))
  1743. SetWeld(Joint3,1,1, NV,NV, Vector3.new(1.5,0.5,0), Vector3.new((math.pi-0.2)+(animangle/30),0,0))
  1744. SetWeld(Joint4,1,1, NV,NV, Vector3.new(-1.5,0.5,0), Vector3.new((math.pi-0.2)+(-animangle/30),0,0))
  1745. if animatebg.Parent ~= nil then
  1746. animatebg.Parent = Torsoz
  1747. animatebg.maxTorque = Vector3.new(1/0,10000,1/0)
  1748. local lokvec = Torsoz.CFrame.lookVector*100
  1749. animatebg.cframe = CFrame.new(NV, Vector3.new(lokvec.x,0,lokvec.z))
  1750. animatebg.Parent = nil
  1751. end
  1752. end
  1753. end
  1754. end
  1755.  
  1756. if hitz == nil then
  1757. local hitz2, enz2 = RAY(Torsoz.Position, Vector3.new(0,-6,0))
  1758. if hitz2 == nil then
  1759. if Torsoz.Velocity.y < -90 then
  1760. if Action == "Standing" then
  1761. GravAction = "Falling"
  1762. animspeed = 1.1
  1763. animatebg.Parent = Torsoz
  1764. animatebg.maxTorque = Vector3.new(1/0,10000,1/0)
  1765. local lokvec = Torsoz.CFrame.lookVector*100
  1766. animatebg.cframe = CFrame.new(NV, Vector3.new(lokvec.x,0,lokvec.z)) * CFrame.Angles(-math.pi/11,animangle/70,0)
  1767. SetWeld(Joint1,1,1, NV,NV, Vector3.new(0.45,-0.8,0), Vector3.new((animangle/27)-0.3,0,0.18))
  1768. SetWeld(Joint2,1,1, NV,NV, Vector3.new(-0.45,-0.8,0), Vector3.new((-animangle/27)-0.3,0,-0.18))
  1769. SetWeld(Joint3,1,1, NV,NV, Vector3.new(1.4,0.5,0), Vector3.new((math.pi+0.2)+(animangle/26),0,0.18))
  1770. SetWeld(Joint4,1,1, NV,NV, Vector3.new(-1.4,0.5,0), Vector3.new((math.pi+0.2)+(-animangle/26),0,-0.18))
  1771. end
  1772. end
  1773. elseif hitz2.CanCollide == true then
  1774. if animatebg.Parent ~= nil then
  1775. animatebg.Parent = Torsoz
  1776. animatebg.maxTorque = Vector3.new(1/0,10000,1/0)
  1777. local lokvec = Torsoz.CFrame.lookVector*100
  1778. animatebg.cframe = CFrame.new(NV, Vector3.new(lokvec.x,0,lokvec.z))
  1779. animatebg.Parent = nil
  1780. end
  1781. end
  1782. end
  1783.  
  1784. if GravAction == "Idle" and animatebg.Parent ~= nil then
  1785. animatebg.Parent = nil
  1786. end
  1787.  
  1788. if math.abs(tickoffset - tick()) > 0.05 then
  1789. tickoffset = tick()
  1790. local flowcolor = HSV(hue, 0.7,1)
  1791. recyclecount = (recyclecount % #fadetab) + 1
  1792. if flow.Value > 25 then
  1793. local lapos = (LA.CFrame * CFrame.new(0,-1,0)).p
  1794. local rapos = (RA.CFrame * CFrame.new(0,-1,0)).p
  1795. local p = fadetab[recyclecount]
  1796. p[1].Parent = m
  1797. p[1].CFrame = CFrame.new((lapos+prevlapos)/2, lapos)
  1798. p[2].Scale = Vector3.new(0.5,0.5,(lapos-prevlapos).magnitude*2)
  1799. p[2].VertexColor = Vector3.new(255,255,255)
  1800. p[1].Transparency = math.abs((flow.Value/120) - 0.8)
  1801. p[1].Transparency = p[1].Transparency + (1/#fadetab)
  1802. local p = fadetab2[recyclecount]
  1803. p[1].Parent = m
  1804. p[1].CFrame = CFrame.new((rapos+prevrapos)/2, rapos)
  1805. p[2].Scale = Vector3.new(0.5,0.5,(rapos-prevrapos).magnitude*2)
  1806. p[2].VertexColor = Vector3.new(255,255,255)
  1807. p[1].Transparency = math.abs((flow.Value/120) - 0.8)
  1808. p[1].Transparency = p[1].Transparency + (1/#fadetab)
  1809. end
  1810.  
  1811. for i, v in pairs(fadetab) do
  1812. if v[1].Transparency < 0.9 then
  1813. v[1].Transparency = v[1].Transparency + (1/#fadetab)
  1814. fadetab2[i][1].Transparency = fadetab2[i][1].Transparency + (1/#fadetab)
  1815. elseif v[1].Transparency ~= 1 then
  1816. v[1].Transparency = 1
  1817. v[1].Position = Vector3.new(50000,0,0)
  1818. fadetab2[i][1].Transparency = 1
  1819. fadetab2[i][1].Position = Vector3.new(50000,0,0)
  1820. end
  1821. end
  1822.  
  1823. prevrapos = (RA.CFrame * CFrame.new(0,-1,0)).p
  1824. prevlapos = (LA.CFrame * CFrame.new(0,-1,0)).p
  1825. end
  1826.  
  1827. if flow.Value > 140 then
  1828. if char.Parent ~= nil then
  1829. char:remove()
  1830. end
  1831. end
  1832.  
  1833. if flowcooldown > 0 then
  1834. flowcooldown = flowcooldown - 1
  1835. end
  1836. if HWRCooldown > 0 then
  1837. HWRCooldown = HWRCooldown - 1
  1838. end
  1839. if VWRCooldown > 0 then
  1840. if hitz ~= nil and VWRCooldown > 0 then
  1841. VWRCooldown = VWRCooldown - 1
  1842. end
  1843. end
  1844. if SlideCooldown > 0 then
  1845. SlideCooldown = SlideCooldown - 1
  1846. end
  1847.  
  1848. if Action == "HWallRunning" or Action == "VWallRunning" then
  1849. flow.Value = flow.Value + 0.24
  1850. if flow.Value > 100 then
  1851. flow.Value = 100
  1852. end
  1853. flowcooldown = 40
  1854. elseif Action == "Diving" then
  1855. flowcooldown = 30
  1856. elseif Action == "Sliding" then
  1857. flowcooldown = 15
  1858. elseif Action == "Standing" or Action == "Sitting" then
  1859. if flow.Value > 0 and flowcooldown <= 0 then
  1860. flow.Value = flow.Value - 0.37
  1861. if flow.Value < 0 then
  1862. flow.Value = 0
  1863. end
  1864. end
  1865. end
  1866.  
  1867. cam.FieldOfView = FOV
  1868. prevanimbgcount = animatebgcount
  1869. sprint = defsprint + ((flow.Value/100)*2.4)
  1870. PrevGravAction = GravAction
  1871. Calculate()
  1872. end)
  1873.  
  1874. --[[
  1875.  
  1876. Put in game.StarterGui
  1877.  
  1878.  
  1879. Made by m0rgoth to check under torso and play footsteps
  1880.  
  1881. Edited by maelstronomer for new materials, pitch randomness,
  1882. jump sounds, and pitch changes for high/lower walkspeeds.
  1883.  
  1884. Note: didn't bother with Terrain because I only use terrain water anyway.
  1885.  
  1886. Last updated August 14, 2014
  1887.  
  1888. --]]
  1889. ---Parkour script edit by o000o---
  1890.  
  1891. local player = game.Players.LocalPlayer
  1892. repeat wait() until player.Character
  1893.  
  1894. --Remove ROBLOX Sounds:
  1895. if player.Character:FindFirstChild('Sound') then
  1896. player.Character.Sound:Destroy()
  1897. end
  1898. for i,object in pairs(player.Character.Head:getChildren()) do
  1899. if object:IsA("Sound") then
  1900. object:Destroy()
  1901. end
  1902. end
  1903.  
  1904. --Sound Data:
  1905. local sound = {
  1906. current = nil
  1907. }
  1908.  
  1909. --Each table in this list contains the following data (in this order): string SoundId, number Pitch, number Volume, boolean Looped
  1910. sound.list = {
  1911. fsConcrete = {"rbxasset://sounds/grassstone2.ogg",1.2,.6,true},
  1912. fsCorrodedMetal = {"rbxasset://sounds/metalgrass.ogg",1.2,.6,true},
  1913. fsDiamondPlate = {"rbxasset://sounds/metalgrass3.ogg",1.2,.6,true},
  1914. fsMetal = {"rbxasset://sounds/metalgrass3.ogg",1.2,.5,true},
  1915. fsFoil = {"rbxasset://sounds/metal3.ogg",1.2,.5,true},
  1916. fsGrass = {"http://www.roblox.com/asset/?id=16720281",1.3,.6,true}, --pitch was 1.4, now 2 so it sounds better. ~maelstronomer
  1917. fsIce = {"rbxasset://sounds/icestone.ogg",1.2,.7,true},
  1918. fsPlastic = {"http://www.roblox.com/asset/?id=121293429",1.5,.5,true}, --131436155,.82,.65 --15174250 old --121293429 roblox
  1919. fsSlate = {"rbxasset://sounds/grassstone3.ogg",1.15,.6,true},
  1920. fsWood = {"rbxasset://sounds/woodgrass3.ogg",1.2,.7,true},
  1921. fsWoodPlanks = {"rbxassetid://507863457",1,.7,true},
  1922. fsSmoothPlastic = {"http://www.roblox.com/asset/?id=121293429",1.5,.5,true}, --131436155,.82,.65 --15174250 old --121293429 roblox
  1923. fsGlass = {"rbxassetid://145180170",1,1.2,true},
  1924. fsWater = {"http://www.roblox.com/asset/?id=130778103",1.5,.6,true}, --{"http://www.roblox.com/asset/?id=133772590",1,.5,true},--{"http://www.roblox.com/asset/?id=28604165",2.6,.1,true}, --133761592
  1925. fsSnow = {"http://www.roblox.com/asset/?id=19326880",1,.6,true},
  1926. fsGlass = {"rbxassetid://145180170",0.8,.7,true},
  1927. fsNeon = {"rbxassetid://131436155",.2,.7,true},
  1928. jump = {"rbxassetid://379482972",1,.6,false},
  1929.  
  1930.  
  1931.  
  1932.  
  1933. fsAir = {'',1,0,false},
  1934.  
  1935. fsBrick = {"rbxasset://sounds/grassstone3.ogg",1.2,.6,true}, --{"rbxasset://sounds/grassstone2.ogg",1.4,.4,true},
  1936. fsCobblestone = {"rbxasset://sounds/grassstone3.ogg",1.2,.6,true}, --{"rbxasset://sounds/grassstone2.ogg",1.4,.4,true},
  1937. fsSand = {"http://www.roblox.com/asset/?id=131245944",1.2,.45,true},
  1938. fsFabric = {"http://www.roblox.com/asset/?id=133705377",1.15,.7,true}, --133705377 --rbxasset://sounds/woodgrass3.ogg
  1939. fsGranite = {"rbxasset://sounds/grassstone3.ogg",1.15,.55,true},
  1940. fsMarble = {"rbxasset://sounds/grassstone2.ogg",1.25,.58,true}, --{"rbxasset://sounds/grassstone3.ogg",1.43,.43,true},
  1941. fsPebble = {"http://www.roblox.com/asset/?id=133761546",1.2,.5,true},--{"rbxasset://sounds/icestone.ogg",1.2,.5,true}, --131620285? --133761546
  1942. }
  1943.  
  1944. math.randomseed(tick()) --for the random function later ~maelstronomer
  1945. --Create Sounds:
  1946. for name,data in pairs(sound.list) do
  1947. local s = Instance.new("Sound",player.Character.Head)
  1948. s.Name = name
  1949. s.SoundId = data[1]
  1950. s.Pitch = data[2]
  1951. s.Volume = data[3]*.2 --quiter footsteps because I found them too loud
  1952. s.Looped = data[4]
  1953. --Replaces the ID with the actual sound Object in the above table:
  1954. sound.list[name] = {s,data[2]}
  1955. end
  1956.  
  1957. --Floor Data:
  1958. local ground = {
  1959. part = nil,
  1960. position = nil
  1961. }
  1962.  
  1963. --Detect Floor:
  1964. ground.detect = function()
  1965. --Ignores the player and their camera which allows you to add local parts onto the character without messing this up.
  1966. if player.Character:FindFirstChild('Torso') then
  1967. local ignore = {player.Character,workspace.CurrentCamera}
  1968. local ray = Ray.new(player.Character.Torso.Position,Vector3.new(0,-3.01,0))
  1969. local hit,pos = workspace:FindPartOnRayWithIgnoreList(ray,ignore)
  1970. ground.part = hit
  1971. ground.position = pos
  1972. end
  1973. end
  1974.  
  1975. local isWalking = false
  1976.  
  1977. --Tell the below loop that the player is walking:
  1978. player.Character.Humanoid.Running:connect(function(speed)
  1979. if speed > 7 then
  1980. isWalking = true
  1981. else
  1982. isWalking = false
  1983. end
  1984. end)
  1985.  
  1986. --Play Jump Sound:
  1987. player.Character.Humanoid.Jumping:connect(function(state)
  1988. if not script:FindFirstChild('last_jumped') then
  1989.  
  1990. local last_jumped = Instance.new('BoolValue',script)
  1991. last_jumped.Name = 'last_jumped'
  1992. game.Debris:AddItem(last_jumped,.1)
  1993.  
  1994. ground.detect()
  1995. if ground.part then
  1996. if player.Character.Head:FindFirstChild('jump') then
  1997. player.Character.Head.jump.Pitch= math.random((sound.list.jump[2]-.075)*100,(sound.list.jump[2]+.075)*100)/100
  1998. sound.list.jump[1]:Play()
  1999. end
  2000. end
  2001. end
  2002. end)
  2003.  
  2004.  
  2005. ---Parkour edit by o000o---
  2006. --Loop that Does things:
  2007. while wait() do
  2008. --Get the ground:
  2009. ground.detect()
  2010.  
  2011. --Play and stop sounds:
  2012. if isWalking and ground.part then
  2013.  
  2014. --Gets the name of the material without spaces or detects whether the part is called 'Water' or 'Snow':
  2015. local mat
  2016. if ground.part.Name == "Water" or ground.part.Name == "Snow" or ground.part.Name == 'Air' then
  2017. mat = ground.part.Name
  2018. --elseif ground.part.BrickColor == BrickColor.new('Light stone grey') and ground.part.Material=='Sand' then
  2019. -- mat = 'Snow'
  2020. else
  2021. mat = string.sub(tostring(ground.part.Material),15)
  2022. mat = string.gsub(mat, "%s+", "")
  2023. end
  2024. --Plays the sound:
  2025. if sound.current ~= sound.list["fs"..mat][1] then
  2026. if sound.current then sound.current:Stop() end
  2027. sound.current = sound.list["fs"..mat][1]
  2028. sound.current:Play()
  2029. end
  2030. --Determines the pitch of the sound based on the original pitch and the character's walkspeed (where 16 is no change).
  2031. sound.current.Pitch= math.random((sound.list["fs"..mat][2]-.4)*100,(sound.list["fs"..mat][2]+.4)*100)/100
  2032. sound.current.Pitch = sound.current.Pitch/(20/player.Character.Humanoid.WalkSpeed)
  2033. elseif sound.current then
  2034. sound.current:Stop()
  2035. sound.current = nil
  2036. end
  2037. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement