Advertisement
CupNoodle3706

idek

May 1st, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.04 KB | None | 0 0
  1. pcall(function() char.Animate:Destroy() end)
  2.  
  3. SetWeld(RS,1,1,NV,NV,Vector3.new(1.5,0.5,0),NV)
  4. RS.C1 = CFrame.new(0,0.5,0)
  5.  
  6. SetWeld(LS,1,1,NV,NV,Vector3.new(-1.5,0.5,0),NV)
  7. LS.C1 = CFrame.new(0,0.5,0)
  8.  
  9. SetWeld(RH,1,1,NV,NV,Vector3.new(0.5,-1,0),NV)
  10. RH.C1 = CFrame.new(0,1,0)
  11.  
  12. SetWeld(LH,1,1,NV,NV,Vector3.new(-0.5,-1,0),NV)
  13. LH.C1 = CFrame.new(0,1,0)
  14.  
  15. SetWeld(N,1,1,NV,NV,Vector3.new(0,1,0),NV)
  16. N.C1 = CFrame.new(0,-0.5,0)
  17.  
  18. SetWeld(HRJ,1,1,NV,NV,NV,NV)
  19. HRJ.C1 = CFrame.new(0,0,0)
  20.  
  21. wait(1)
  22. RS.MaxVelocity = 0
  23. RS.CurrentAngle = 0
  24. RS.DesiredAngle = 0
  25. LS.MaxVelocity = 0
  26. LS.CurrentAngle = 0
  27. LS.DesiredAngle = 0
  28. RH.MaxVelocity = 0
  29. RH.CurrentAngle = 0
  30. RH.DesiredAngle = 0
  31. LH.MaxVelocity = 0
  32. LH.CurrentAngle = 0
  33. LH.DesiredAngle = 0
  34. N.MaxVelocity = 0
  35. N.CurrentAngle = 0
  36. N.DesiredAngle = 0
  37. HRJ.MaxVelocity = 0
  38. HRJ.CurrentAngle = 0
  39. HRJ.DesiredAngle = 0
  40.  
  41. -----------------
  42.  
  43. ----- value changed connections ----
  44. Main.Changed:connect(function()
  45. if Main.Value ~= nil then
  46. main,maina = GetWeld(Main.Value)
  47. else
  48. main,maina = nil,nil
  49. end
  50. end)
  51.  
  52. Hu.Changed:connect(function()
  53. if disableJump or DisableMovement then
  54. Hu.Jump = false
  55. end
  56. end)
  57.  
  58. ------- Keys & Mouse ---------------
  59. function B1D()
  60. MouseDown = true
  61. if not Animating then
  62. script.invoke.Value = 1
  63. else
  64. while Animating do
  65. wait()
  66. end
  67. if MouseDown then
  68. script.invoke.Value = 1
  69. end
  70. end
  71. end
  72. function B1U()
  73. MouseDown = false
  74. end
  75. mouse.Button1Down:connect(B1D)
  76. mouse.Button1Up:connect(B1U)
  77.  
  78. function KD(key)
  79. if key == "0" then
  80. Shift = true
  81. if pose.Value == 1 then
  82. pose.Value = 0
  83. disableJump = false
  84. end
  85. elseif key == "4" then
  86. Alt = true
  87. if not Animating and SlideCooldown == 0 then
  88. invoke.Value = 3
  89. else
  90. while Animating or SlideCooldown > 0 do
  91. wait()
  92. end
  93. if Alt then
  94. invoke.Value = 3
  95. end
  96. end
  97. elseif key == "2" then
  98. if not ThrowingSequence then
  99. if pose.Value == 0 then
  100. pose.Value = 1
  101. disableJump = true
  102. elseif pose.Value == 1 then
  103. pose.Value = 0
  104. disableJump = false
  105. end
  106. end
  107. elseif key == string.char(32) then
  108. Space = true
  109. if pose.Value == 1 then
  110. if not Animating then
  111. invoke.Value = 2
  112. else
  113. while Animating do
  114. wait()
  115. end
  116. if Space and pose.Value == 1 then
  117. invoke.Value = 2
  118. end
  119. end
  120. end
  121. end
  122. end
  123.  
  124. function KU(key)
  125. if key == "0" then
  126. Shift = false
  127. elseif key == "4" then
  128. Alt = false
  129. elseif key == string.char(32) then
  130. Space = false
  131. end
  132. end
  133.  
  134. mouse.KeyDown:connect(KD)
  135. mouse.KeyUp:connect(KU)
  136.  
  137. local count1 = 0
  138. local angle = 0
  139. local slidecount = 1
  140. local slidecountmax = 1
  141. local countspeed = 0.5
  142. local cancella = false
  143. local cancelra = false
  144. local cancelrl = false
  145. local cancelll = false
  146. local canceln = false
  147. local cancelhrp = false
  148. local cancelmain = false
  149. local anim = 0
  150. local lastanim = -1
  151. local lastpose = 0
  152. local rs,rsa, ls,lsa, rh,rha, lh,lha, n,na, hrj,hrja, main,maina
  153. local ghitz,genz
  154. local prevvelocity = HRP.Velocity
  155.  
  156. function UpdateWP(max,sped)
  157. max = max or 5
  158. sped = sped or AnimSpeeds[anim+1]
  159. rs,rsa = GetWeld(RS)
  160. ls,lsa = GetWeld(LS)
  161. rh,rha = GetWeld(RH)
  162. lh,lha = GetWeld(LH)
  163. n,na = GetWeld(N)
  164. hrj,hrja = GetWeld(HRJ)
  165. if Main.Value ~= nil then
  166. main,maina = GetWeld(Main.Value)
  167. end
  168. slidecount = 0
  169. slidecountmax = max
  170. countspeed = sped
  171. end
  172.  
  173. UpdateWP()
  174. -------------- Invoke Animations -------------------------
  175. function Throw()
  176. if not Animating and snowballs.Value > 0 then
  177. Animating = true
  178. ThrowingSequence = true
  179. pose.Value = 0
  180. disableJump = false
  181. ----- sword slash ------
  182. cancelra = true
  183. cancella = true
  184. cancelhrp = true
  185. canceln = true
  186. cancelmain = true
  187. local prevslidecount = slidecount
  188. UpdateWP(slidecountmax,countspeed)
  189. slidecount = prevslidecount
  190.  
  191. local phase = 0
  192. local smdl = Instance.new("Model",char)
  193. smdl.Name = "SnowBall"
  194. local ball,weld
  195. for i = 1, 17 do
  196. if MouseDown then
  197. if i <= 7 then
  198. SetWeld(N,i,7,n,na,Vector3.new(0,1,0),Vector3.new(-0.3,-math.pi/8,0))
  199. SetWeld(HRJ,i,7,hrj,hrja,Vector3.new(0,0,0.1),Vector3.new(0,-math.pi/20,0))
  200. SetWeld(RS,i,7,rs,rsa,Vector3.new(1.5,0.26,0),Vector3.new(-0.2,0,-0.1))
  201. SetWeld(LS,i,7,ls,lsa,Vector3.new(-1.5,0.525,-0.01),Vector3.new(-0.25,0,-0.12))
  202. phase = 1
  203. if i == 7 then
  204. UpdateWP(slidecountmax,countspeed)
  205. ChangeValue(snowballs,"Increment",-1)
  206. ball = P:Clone()
  207. ball.Parent = smdl
  208. ball.BrickColor = BrickColor.new("White")
  209. ball.Material = "Sand"
  210. local mesh = Instance.new("SpecialMesh",ball)
  211. mesh.MeshType = "Sphere"
  212. mesh.Scale = Vector3.new(0.8,0.8,0.8) *5
  213. weld = Instance.new("Weld",ball)
  214. weld.Part0 = RA
  215. weld.Part1 = ball
  216. weld.C0 = CFrame.new(0,-1.3,0)
  217. end
  218. else
  219. SetWeld(N,i-7,10,n,na,Vector3.new(0,1,0),Vector3.new(0.03,math.pi/9,0))
  220. SetWeld(HRJ,i-7,10,hrj,hrja,Vector3.new(0,0,0.1),Vector3.new(0,-math.pi/8,0))
  221. SetWeld(RS,i-7,10,rs,rsa,Vector3.new(1.4,0.5,0),Vector3.new(math.pi*1.05,0,0.2))
  222. SetWeld(LS,i-7,10,ls,lsa,Vector3.new(-1.3,0.42,-0.1),Vector3.new(math.pi/4,0,-math.pi/8))
  223. if i == 9 then
  224. SPC.Archivable = true
  225. SPB.BackgroundColor3 = Color3.new(0.45,0.1,0.01)
  226. SPF.BackgroundColor3 = Color3.new(0.65,0.1,0.01)
  227. SPF.Size = UDim2.new(1,0,0,0)
  228. SPF.Position = UDim2.new(0,0,1,0)
  229. end
  230. phase = 2
  231. end
  232. wait(0.02)
  233. end
  234. end
  235. local rs2,rsa2 = GetWeld(RS)
  236. local ls2,lsa2 = GetWeld(LS)
  237. local n2,na2 = GetWeld(N)
  238. local hrj2,hrja2 = GetWeld(HRJ)
  239.  
  240. local powercounter = 20
  241. local power = 0
  242. while MouseDown do
  243. powercounter = (powercounter%40) + 1
  244. power = 1 - math.sin(math.pi/40*powercounter)
  245. SPB.BackgroundColor3 = Color3.new((1-power)*0.35 +0.1,power*0.35 +0.1,0.01)
  246. SPF.BackgroundColor3 = Color3.new((1-power)*0.55 +0.1,power*0.55 +0.1,0.01)
  247. SPF.Size = UDim2.new(1,0,power,0)
  248. SPF.Position = UDim2.new(0,0,1-power,0)
  249. SetWeld(RS,power,1,rs2,rsa2,Vector3.new(1.4,0.6,0.05),Vector3.new(math.pi*1.17,0,0.3))
  250. SetWeld(LS,power,1,ls2,lsa2,Vector3.new(-1.3,0.42,-0.16),Vector3.new(math.pi/2.45,0,-math.pi/5))
  251. SetWeld(N,power,1,n2,na2,Vector3.new(0,1,0),Vector3.new(0.07,math.pi/8,-0.04))
  252. SetWeld(HRJ,power,1,hrj2,hrja2,Vector3.new(0,0,0.1),Vector3.new(0,-math.pi/7,0))
  253. phase = 3
  254. wait(0.02)
  255. end
  256. SPC.Archivable = false
  257. print("Phase:",phase)
  258. rs2,rsa2 = GetWeld(RS)
  259. ls2,lsa2 = GetWeld(LS)
  260. n2,na2 = GetWeld(N)
  261. hrj2,hrja2 = GetWeld(HRJ)
  262.  
  263. if phase == 1 or phase == 2 then
  264. smdl:Destroy()
  265. ChangeValue(snowballs,"Increment",1)
  266. elseif phase == 3 then
  267. print("Throwing with "..string.sub(tostring(power*100),1,5).."% power!")
  268. local mousepos = mouse.Hit.p
  269. for i = 1, 8 do
  270. SetWeld(RS,i,8,rs2,rsa2,Vector3.new(1.4,0.6,0.05),Vector3.new((math.pi*0.6) -(1.8*power),0.18 - (0.65*power),0.3))
  271. SetWeld(LS,i,8,ls2,lsa2,Vector3.new(-1.36,0.5,-0.06),Vector3.new((-math.pi/4) - (0.4*power),0.2,-math.pi/5))
  272. SetWeld(N,i,8,n2,na2,Vector3.new(0,1,0),Vector3.new(-0.07,-math.pi/11 - (0.3*power),-0.04))
  273. SetWeld(HRJ,i,8,hrj2,hrja2,Vector3.new(0,0,0.1),Vector3.new(0,(math.pi/10)+(0.3*power),0))
  274. if i == 2 then
  275. weld:Destroy()
  276. ball.Anchored = true
  277. --- {part,gravity,currentgravity,direction,speed,power,counter,{parts},life}
  278. local snowball = {ball,0.1 + 0.8*(0.96-power),1 - (0.95*power),(mousepos-ball.Position).unit,1.8 + (3*power),power,1,{},0}
  279. if power > 0.99 then
  280. for i = 1, 20 do
  281. local p = P:Clone()
  282. p.Anchored = true
  283. p.BrickColor = BrickColor.new("Bright yellow")
  284. local mesh = Instance.new("SpecialMesh",p)
  285. mesh.MeshId = "rbxassetid://9756362"
  286. mesh.Scale = Vector3.new(0.32,0.32,0.32)
  287. table.insert(snowball[8],p)
  288. end
  289. end
  290. table.insert(SnowballProjectiles,snowball)
  291. end
  292. wait(0.02)
  293. end
  294. wait(0.02)
  295. else
  296. smdl:Destroy()
  297. end
  298.  
  299. UpdateWP(slidecountmax,countspeed)
  300. cancelra = false
  301. cancella = false
  302. cancelhrp = false
  303. canceln = false
  304. cancelmain = false
  305.  
  306. ThrowingSequence = false
  307. Animating = false
  308. elseif snowballs.Value <= 0 then
  309. print("No snow left!")
  310. -- alert saying you have no snow left in pouch
  311. end
  312. end
  313.  
  314. function DiveRoll()
  315. if not Animating then
  316. Animating = true
  317. DisableMovement = true
  318. cancelra = true
  319. cancella = true
  320. cancelhrp = true
  321. canceln = true
  322. cancelmain = true
  323. cancelll = true
  324. cancelrl = true
  325. local prevslidecount = slidecount
  326. UpdateWP(slidecountmax,countspeed)
  327. slidecount = prevslidecount
  328.  
  329. local bv = Instance.new("BodyVelocity", HRP)
  330. bv.maxForce = Vector3.new(1/0,0,1/0)
  331. bv.velocity = CFrame.new(NV,Vector3.new(HRP.CFrame.lookVector.x,0,HRP.CFrame.lookVector.z)).lookVector * 28
  332. local bg = Instance.new("BodyGyro", HRP)
  333. bg.maxTorque = Vector3.new(1/0,1/0,1/0)
  334. bg.cframe = CFrame.new(NV,Vector3.new(HRP.CFrame.lookVector.x,0,HRP.CFrame.lookVector.z))
  335. bg.D = 100
  336. game:GetService("Debris"):AddItem(bv,2.5)
  337. game:GetService("Debris"):AddItem(bg,2.5)
  338.  
  339. local connex = game:GetService("RunService").RenderStepped:connect(function()
  340. if HRP.Velocity.y > 0 then
  341. HRP.Velocity = NV
  342. end
  343. HRP.CanCollide = false
  344. end)
  345. local connex2 = game:GetService("RunService").Stepped:connect(function()
  346. local Ghitz,Genz = RAY(HRP.Position,Vector3.new(0,-3.1,0))
  347. if Ghitz then
  348. HRP.CFrame = (HRP.CFrame - HRP.Position) + Genz + Vector3.new(0,3,0)
  349. end
  350. end)
  351.  
  352. local animspd = 4
  353. for i = 1, animspd do
  354. SetWeld(N,i,animspd,n,na,Vector3.new(0,1,0),Vector3.new(math.pi/5,0,0),0)
  355. SetWeld(HRJ,i,animspd,hrj,hrja,Vector3.new(0,0.4,0),Vector3.new(-math.pi/2.6,0,0),0)
  356. SetWeld(RS,i,animspd,rs,rsa,Vector3.new(1.4,0.5,-0.06),Vector3.new(math.pi/1.2,0,0.2),0)
  357. SetWeld(LS,i,animspd,ls,lsa,Vector3.new(-1.4,0.5,-0.06),Vector3.new(math.pi/1.2,0,-0.2),0)
  358. SetWeld(RH,i,animspd,rh,rha,Vector3.new(0.5,-0.6,-0.1),Vector3.new(0.1,0,0.05),0)
  359. SetWeld(LH,i,animspd,lh,lha,Vector3.new(-0.5,-0.6,-0.1),Vector3.new(0.1,0,-0.05),0)
  360. wait(0.02)
  361. end
  362. UpdateWP(slidecountmax,countspeed)
  363. for i = 1, animspd do
  364. SetWeld(N,i,animspd,n,na,Vector3.new(0,1,0),Vector3.new(math.pi/12,0,0),0)
  365. SetWeld(HRJ,i,animspd,hrj,hrja,Vector3.new(0,-0.7,0),Vector3.new(-math.pi/1.5,0,0),0)
  366. SetWeld(RS,i,animspd,rs,rsa,Vector3.new(1.4,0.6,-0.06),Vector3.new(math.pi/1.3,0,0.2),0)
  367. SetWeld(LS,i,animspd,ls,lsa,Vector3.new(-1.4,0.6,-0.06),Vector3.new(math.pi/1.3,0,-0.2),0)
  368. SetWeld(RH,i,animspd,rh,rha,Vector3.new(0.5,-1,0),Vector3.new(-0.1,0,0.05),0)
  369. SetWeld(LH,i,animspd,lh,lha,Vector3.new(-0.5,-1,0),Vector3.new(-0.1,0,-0.05),0)
  370. wait(0.02)
  371. end
  372. UpdateWP(slidecountmax,countspeed)
  373. for i = 1, animspd do
  374. SetWeld(N,i,animspd,n,na,Vector3.new(0,0.85,0),Vector3.new(-math.pi/4,0,0),0)
  375. SetWeld(HRJ,i,animspd,hrj,hrja,Vector3.new(0,-1,0),Vector3.new(-math.pi*0.9,0,0),0)
  376. SetWeld(RS,i,animspd,rs,rsa,Vector3.new(1.4,0.5,-0.06),Vector3.new(math.pi/1.4,0,0.08),0)
  377. SetWeld(LS,i,animspd,ls,lsa,Vector3.new(-1.4,0.5,-0.06),Vector3.new(math.pi/1.4,0,-0.08),0)
  378. SetWeld(RH,i,animspd,rh,rha,Vector3.new(0.5,-0.3,-0.4),Vector3.new(-0.12,0,0.05),0)
  379. SetWeld(LH,i,animspd,lh,lha,Vector3.new(-0.5,-0.3,-0.4),Vector3.new(-0.12,0,-0.05),0)
  380. wait(0.02)
  381. end
  382. UpdateWP(slidecountmax,countspeed)
  383. bv.velocity = bv.velocity * 0.9
  384. for i = 1, animspd do
  385. SetWeld(N,i,animspd,n,na,Vector3.new(0,0.85,0),Vector3.new(-math.pi/3.5,0,0),0)
  386. SetWeld(HRJ,i,animspd,hrj,hrja,Vector3.new(0,-1.25,0),Vector3.new(-math.pi*1.1,0,0),0)
  387. SetWeld(RS,i,animspd,rs,rsa,Vector3.new(1.4,0.5,-0.06),Vector3.new(math.pi/1.8,0,-0.1),0)
  388. SetWeld(LS,i,animspd,ls,lsa,Vector3.new(-1.4,0.5,-0.06),Vector3.new(math.pi/1.8,0,0.1),0)
  389. SetWeld(RH,i,animspd,rh,rha,Vector3.new(0.5,0.2,-0.7),Vector3.new(-0.12,0,0.05),0)
  390. SetWeld(LH,i,animspd,lh,lha,Vector3.new(-0.5,0.2,-0.7),Vector3.new(-0.12,0,-0.05),0)
  391. wait(0.02)
  392. end
  393. UpdateWP(slidecountmax,countspeed)
  394. for i = 1, animspd do
  395. SetWeld(N,i,animspd,n,na,Vector3.new(0,0.85,0),Vector3.new(-math.pi/3.7,0,0),0)
  396. SetWeld(HRJ,i,animspd,hrj,hrja,Vector3.new(0,-2.3,0),Vector3.new(-math.pi*1.55,0,0),0)
  397. SetWeld(RS,i,animspd,rs,rsa,Vector3.new(1.4,0.5,-0.06),Vector3.new(math.pi/2.4,0,-0.23),0)
  398. SetWeld(LS,i,animspd,ls,lsa,Vector3.new(-1.4,0.5,-0.06),Vector3.new(math.pi/2.4,0,0.23),0)
  399. SetWeld(RH,i,animspd,rh,rha,Vector3.new(0.5,0.1,-0.7),Vector3.new(-0.1,0,0.04),0)
  400. SetWeld(LH,i,animspd,lh,lha,Vector3.new(-0.5,0.1,-0.7),Vector3.new(-0.1,0,-0.04),0)
  401. wait(0.02)
  402. end
  403. UpdateWP(slidecountmax,countspeed)
  404. bv.velocity = bv.velocity * 0.7
  405. for i = 1, animspd do
  406. SetWeld(N,i,animspd,n,na,Vector3.new(0,1.05,0),Vector3.new(-0.4,0,0),0)
  407. SetWeld(HRJ,i,animspd,hrj,hrja,Vector3.new(0,-1.6,0),Vector3.new(-math.pi*1.85,0,0),0)
  408. SetWeld(RS,i,animspd,rs,rsa,Vector3.new(1.4,0.5,-0.06),Vector3.new(math.pi/3.2,0,-0.24),0)
  409. SetWeld(LS,i,animspd,ls,lsa,Vector3.new(-1.4,0.5,-0.06),Vector3.new(math.pi/3.2,0,0.24),0)
  410. SetWeld(RH,i,animspd,rh,rha,Vector3.new(0.5,-0.08,-0.6),Vector3.new(-0.22,0,0.04),0)
  411. SetWeld(LH,i,animspd,lh,lha,Vector3.new(-0.5,-0.08,-0.6),Vector3.new(-0.22,0,-0.04),0)
  412. wait(0.02)
  413. end
  414. UpdateWP(slidecountmax,countspeed)
  415. bv.velocity = bv.velocity * 0.4
  416. for i = 1, animspd do
  417. SetWeld(RS,i,animspd,rs,rsa,Vector3.new(1.35,0.66 + (angle*0.012),0.12),Vector3.new(0.2 + (angle*0.02),-0.22,0.446 + (angle*0.016)),0)
  418. SetWeld(LS,i,animspd,ls,lsa,Vector3.new(-1.35,0.66 + (angle*0.012),0.12),Vector3.new(0.2 + (angle*0.02),0.22,-0.446 - (angle*0.016)),0)
  419. SetWeld(RH,i,animspd,rh,rha,Vector3.new(0.7,-0.18 - (cangle*0.04),-0.2 - (angle*0.01)),Vector3.new(0.2 - (angle*0.12),-math.pi/5,0.12 - (angle*0.06)),0)
  420. SetWeld(LH,i,animspd,lh,lha,Vector3.new(-0.38,-0.32 + (cangle*0.04),-0.45 + (angle*0.01)),Vector3.new(-0.1 + (angle*0.15),-math.pi/5,-0.07 + (angle*0.07)),0)
  421. SetWeld(N,i,animspd,n,na,Vector3.new(0,1,0),Vector3.new(0.12 + (angle*0.004),-math.pi/5 - (angle*0.01),0.1),0)
  422. SetWeld(HRJ,i,animspd,hrj,hrja,Vector3.new(0,-0.7,0),Vector3.new((-math.pi*2) -0.24 + (-angle*0.008),math.pi/5 + (angle*0.01),angle*0.01),0)
  423. wait(0.02)
  424. end
  425.  
  426. SetWeld(HRJ,1,1,hrj,hrja,Vector3.new(0,-0.7,0),Vector3.new(-0.24 + (-angle*0.008),math.pi/5 + (angle*0.01),angle*0.01))
  427. bv:Destroy()
  428. bg:Destroy()
  429. connex:disconnect()
  430. connex2:disconnect()
  431.  
  432. UpdateWP()
  433. cancelra = false
  434. cancella = false
  435. cancelhrp = false
  436. canceln = false
  437. cancelmain = false
  438. cancelll = false
  439. cancelrl = false
  440. Animating = false
  441. DisableMovement = false
  442. end
  443. end
  444.  
  445. function Slide()
  446. if not Animating and Shift and pose.Value == 0 and SlideCooldown == 0 and Vector3.new(Torsoz.Velocity.x,0,Torsoz.Velocity.z).magnitude >= 18 then
  447. Animating = true
  448. DisableMovement = true
  449. cancelra = true
  450. cancella = true
  451. cancelhrp = true
  452. canceln = true
  453. cancelmain = true
  454. cancelll = true
  455. cancelrl = true
  456. local prevslidecount = slidecount
  457. UpdateWP(slidecountmax,countspeed)
  458. slidecount = prevslidecount
  459.  
  460. local bv = Instance.new("BodyVelocity", HRP)
  461. bv.maxForce = Vector3.new(1/0,0,1/0)
  462. bv.velocity = CFrame.new(NV,Vector3.new(HRP.CFrame.lookVector.x,0,HRP.CFrame.lookVector.z)).lookVector * 30
  463. local bg = Instance.new("BodyGyro", HRP)
  464. bg.maxTorque = Vector3.new(1/0,1/0,1/0)
  465. bg.cframe = CFrame.new(NV,Vector3.new(HRP.CFrame.lookVector.x,0,HRP.CFrame.lookVector.z))
  466. bg.D = 100
  467. game:GetService("Debris"):AddItem(bv,5.5)
  468. game:GetService("Debris"):AddItem(bg,5.5)
  469.  
  470. local connex = game:GetService("RunService").RenderStepped:connect(function()
  471. if HRP.Velocity.y > 0 then
  472. HRP.Velocity = NV
  473. end
  474. HRP.CanCollide = false
  475. end)
  476.  
  477. local animspd = 8
  478. local animcount = 1
  479. local bvaccel = 1
  480. local bvvelo = bv.velocity
  481. local lasttorpos = HRP.Position
  482. local tickcount = 0
  483. local cancelslide = false
  484. local torsoangle = 0
  485. while not cancelslide and bvaccel > 0.16 do
  486. tickcount = tickcount+1
  487. lasttorpos = HRP.Position
  488. animcount = (animcount < animspd and animcount+1) or animspd
  489. local n2,na2 = GetWeld(N)
  490. local hrj2,hrja2 = GetWeld(HRJ)
  491. local rs2,rsa2 = GetWeld(RS)
  492. local ls2,lsa2 = GetWeld(LS)
  493. local rh2,rha2 = GetWeld(RH)
  494. local lh2,lha2 = GetWeld(LH)
  495. SetWeld(N,1,4,n2,na2,Vector3.new(0,1.08,-0.1),Vector3.new(-math.pi/4.3,-0.12,-0.08))
  496. SetWeld(HRJ,1,4,hrj2,hrja2,Vector3.new(0,-2.1,0),Vector3.new((math.pi/2.6)+torsoangle,0.12 + (angle*0.008),0))
  497. SetWeld(RS,1,4,rs2,rsa2,Vector3.new(1.4,0.6,-0.02),Vector3.new(-math.pi/1.8,-(angle*0.01),0.2 - (angle*0.009)))
  498. SetWeld(LS,1,4,ls2,lsa2,Vector3.new(-1.3,0.6,-0.16),Vector3.new(-math.pi/1.8,-(angle*0.01),-0.6 - (angle*0.009)))
  499. SetWeld(RH,1,4,rh2,rha2,Vector3.new(0.5,-0.8,0),Vector3.new(0.22,-0.06 - (angle*0.01),0.05))
  500. SetWeld(LH,1,4,lh2,lha2,Vector3.new(-0.5,-0.35,-0.45),Vector3.new(-0.25,-0.12 - (angle*0.01),-0.03))
  501. bv.velocity = bvvelo * bvaccel
  502. wait(0.02)
  503. local torsoatan = (CFrame.new(lasttorpos) * (HRP.CFrame-HRP.Position)):pointToObjectSpace(HRP.Position)
  504. torsoangle = math.atan2(torsoatan.y,-torsoatan.z)
  505. local Ghitz,Genz = RAY(HRP.Position,Vector3.new(0,-3.1,0))
  506. if Ghitz then
  507. HRP.CFrame = (HRP.CFrame - HRP.Position) + Genz + Vector3.new(0,3,0)
  508. end
  509. if (lasttorpos.y - HRP.Position.y) < -0.1 then
  510. bvaccel = bvaccel - 0.045
  511. elseif (lasttorpos.y - HRP.Position.y) > 0.08 then
  512. bvaccel = bvaccel - 0.006
  513. if Ghitz then
  514. bvaccel = bvaccel + ((lasttorpos.y - HRP.Position.y) /2.5)
  515. end
  516. else
  517. bvaccel = bvaccel - 0.017
  518. end
  519. bvaccel = bvaccel > 1.02 and 1.02 or bvaccel
  520. local chitz,cenz = RAY(Torsoz.Position,Vector3.new(0,2.5,0))
  521. local stationary = false
  522. if tickcount > 5 then
  523. stationary = (Vector3.new(lasttorpos.x,0,lasttorpos.z) - Vector3.new(HRP.Position.x,0,HRP.Position.z)).magnitude < 0.15
  524. end
  525. if bvaccel < 0.16 or (chitz == nil and not Alt) or stationary then
  526. cancelslide = true
  527. end
  528. end
  529.  
  530. SlideCooldown = 14
  531. bv:Destroy()
  532. bg:Destroy()
  533. connex:disconnect()
  534.  
  535. UpdateWP(slidecountmax,countspeed)
  536. cancelra = false
  537. cancella = false
  538. cancelhrp = false
  539. canceln = false
  540. cancelmain = false
  541. cancelll = false
  542. cancelrl = false
  543. Animating = false
  544. DisableMovement = false
  545. end
  546. end
  547.  
  548. invokelist = {}
  549. invokelist[1] = Throw
  550. invokelist[2] = DiveRoll
  551. invokelist[3] = Slide
  552. invoke.Changed:connect(function()
  553. if invoke.Value ~= 0 then
  554. local valu = invoke.Value
  555. invoke.Value = 0
  556. if invokelist[valu] ~= nil then
  557. invokelist[valu]()
  558. end
  559. end
  560. end)
  561.  
  562. -------------- Animation Tween Funcs ----------------------
  563. function Idle()
  564. if script.pose.Value == 0 then
  565. ----- regular --------
  566. if not cancelra then
  567. SetWeld(RS,slidecount,slidecountmax,rs,rsa,Vector3.new(1.5,0.5,0),Vector3.new(-0.1 + (angle*0.027),0,0.046 - (angle*0.021)))
  568. end
  569. if not cancella then
  570. SetWeld(LS,slidecount,slidecountmax,ls,lsa,Vector3.new(-1.5,0.5,0),Vector3.new(-0.1 + (angle*0.027),0,-0.046 + (angle*0.021)))
  571. end
  572. if not cancelrl then
  573. SetWeld(RH,slidecount,slidecountmax,rh,rha,Vector3.new(0.5,-1,0),Vector3.new(-0.05 + (angle*0.018),0,0.01 - (angle*0.005)))
  574. end
  575. if not cancelll then
  576. SetWeld(LH,slidecount,slidecountmax,lh,lha,Vector3.new(-0.5,-1,0),Vector3.new(-0.05 + (angle*0.018),0,-0.01 + (angle*0.005)))
  577. end
  578. if not canceln then
  579. SetWeld(N,slidecount,slidecountmax,n,na,Vector3.new(0,1,0),Vector3.new(0.04 + (-angle*0.02),0,0))
  580. end
  581. if not cancelhrp then
  582. SetWeld(HRJ,slidecount,slidecountmax,hrj,hrja,Vector3.new(0,0,0),Vector3.new(0.016 + (-angle*0.009),0,0))
  583. end
  584.  
  585. elseif script.pose.Value == 1 then
  586. ----- crouch --------
  587. if not cancelra then
  588. SetWeld(RS,slidecount,slidecountmax,rs,rsa,Vector3.new(1.35,0.66 - (angle*0.012),0.12),Vector3.new(-0.1 + (angle*0.015),-0.22,0.446 - (angle*0.016)))
  589. end
  590. if not cancella then
  591. SetWeld(LS,slidecount,slidecountmax,ls,lsa,Vector3.new(-1.35,0.66 - (angle*0.012),0.12),Vector3.new(-0.1 + (angle*0.015),0.22,-0.446 + (angle*0.016)))
  592. end
  593. if not cancelrl then
  594. SetWeld(RH,slidecount,slidecountmax,rh,rha,Vector3.new(0.55,-1.05,-0.47 - (angle*0.006)),Vector3.new(-math.pi/2.2 + (angle*0.005),-math.pi/15,0.01 + (angle*0.005)))
  595. end
  596. if not cancelll then
  597. SetWeld(LH,slidecount,slidecountmax,lh,lha,Vector3.new(-0.5,0.3,-0.55),Vector3.new(0.3 + (angle*0.01),-math.pi/12,0.08 + (angle*0.005)))
  598. end
  599. if not canceln then
  600. SetWeld(N,slidecount,slidecountmax,n,na,Vector3.new(0,1,0),Vector3.new(0.12 + (angle*0.004),-math.pi/5,0.1))
  601. end
  602. if not cancelhrp then
  603. SetWeld(HRJ,slidecount,slidecountmax,hrj,hrja,Vector3.new(0,-1.4,0),Vector3.new(-0.16 + (-angle*0.007),math.pi/5,0))
  604. end
  605.  
  606. elseif script.pose.Value == 2 then
  607.  
  608. end
  609. end
  610.  
  611. function Walking()
  612. if script.pose.Value == 0 then
  613. ----- regular --------
  614. if not cancelra then
  615. SetWeld(RS,slidecount,slidecountmax,rs,rsa,Vector3.new(1.5,0.5,0),Vector3.new(angle*0.2,0,-math.abs(angle*0.02)))
  616. end
  617. if not cancella then
  618. SetWeld(LS,slidecount,slidecountmax,ls,lsa,Vector3.new(-1.5,0.5,0),Vector3.new(-angle*0.2,0,math.abs(angle*0.02)))
  619. end
  620. if not cancelrl then
  621. SetWeld(RH,slidecount,slidecountmax,rh,rha,Vector3.new(0.5,-1,0),Vector3.new(-angle*0.17,0,math.abs(angle*0.005)))
  622. end
  623. if not cancelll then
  624. SetWeld(LH,slidecount,slidecountmax,lh,lha,Vector3.new(-0.5,-1,0),Vector3.new(angle*0.17,0,-math.abs(angle*0.005)))
  625. end
  626. if not canceln then
  627. SetWeld(N,slidecount,slidecountmax,n,na,Vector3.new(0,1,0),Vector3.new(0.015 ,-angle*0.01,0))
  628. end
  629. if not cancelhrp then
  630. SetWeld(HRJ,slidecount,slidecountmax,hrj,hrja,Vector3.new(0,0,0),Vector3.new(-0.015 - math.abs((angle*0.02)),angle*0.01,0))
  631. end
  632. if not cancelmain and Main.Value ~= nil and main ~= nil and maina ~= nil then
  633. SetWeld(Main.Value,slidecount,slidecountmax,main,maina,Vector3.new(0,-1,0),NV)
  634. end
  635.  
  636. elseif script.pose.Value == 1 then
  637. ----- crouch --------
  638. if not cancelra then
  639. SetWeld(RS,slidecount,slidecountmax,rs,rsa,Vector3.new(1.35,0.66 + (angle*0.012),0.12),Vector3.new(0.2 + (angle*0.02),-0.22,0.446 + (angle*0.016)))
  640. end
  641. if not cancella then
  642. SetWeld(LS,slidecount,slidecountmax,ls,lsa,Vector3.new(-1.35,0.66 + (angle*0.012),0.12),Vector3.new(0.2 + (angle*0.02),0.22,-0.446 - (angle*0.016)))
  643. end
  644. if not cancelrl then
  645. SetWeld(RH,slidecount,slidecountmax,rh,rha,Vector3.new(0.7,-0.18 - (cangle*0.04),-0.2 - (angle*0.01)),Vector3.new(0.2 - (angle*0.12),-math.pi/5,0.12 - (angle*0.06)))
  646. end
  647. if not cancelll then
  648. SetWeld(LH,slidecount,slidecountmax,lh,lha,Vector3.new(-0.38,-0.32 + (cangle*0.04),-0.45 + (angle*0.01)),Vector3.new(-0.1 + (angle*0.15),-math.pi/5,-0.07 + (angle*0.07)))
  649. end
  650. if not canceln then
  651. SetWeld(N,slidecount,slidecountmax,n,na,Vector3.new(0,1,0),Vector3.new(0.12 + (angle*0.004),-math.pi/5 - (angle*0.01),0.1))
  652. end
  653. if not cancelhrp then
  654. SetWeld(HRJ,slidecount,slidecountmax,hrj,hrja,Vector3.new(0,-0.7,0),Vector3.new(-0.24 + (-angle*0.008),math.pi/5 + (angle*0.01),angle*0.01))
  655. end
  656.  
  657. elseif script.pose.Value == 2 then
  658.  
  659. end
  660. end
  661.  
  662. function Running()
  663. if script.pose.Value == 0 then
  664. ----- regular --------
  665. if not cancelra then
  666. SetWeld(RS,slidecount,slidecountmax,rs,rsa,Vector3.new(1.5 - math.abs(angle*0.035),0.5 - math.abs(angle*0.02),0),Vector3.new(0.16 + (angle*0.42),0,-math.abs(angle*0.07)))
  667. end
  668. if not cancella then
  669. SetWeld(LS,slidecount,slidecountmax,ls,lsa,Vector3.new(-1.5 + math.abs(angle*0.035),0.5 - math.abs(angle*0.02),0),Vector3.new(0.16 + (-angle*0.42),0,math.abs(angle*0.07)))
  670. end
  671. if not cancelrl then
  672. SetWeld(RH,slidecount,slidecountmax,rh,rha,Vector3.new(0.5,-1 + math.abs(angle*0.05),0),Vector3.new(-angle*0.3,0,math.abs(angle*0.005)))
  673. end
  674. if not cancelll then
  675. SetWeld(LH,slidecount,slidecountmax,lh,lha,Vector3.new(-0.5,-1 + math.abs(angle*0.05),0),Vector3.new(angle*0.3,0,-math.abs(angle*0.005)))
  676. end
  677. if not canceln then
  678. SetWeld(N,slidecount,slidecountmax,n,na,Vector3.new(0,1,0),Vector3.new(0.07 + math.abs(-angle*0.02),-angle*0.03,0))
  679. end
  680. if not cancelhrp then
  681. SetWeld(HRJ,slidecount,slidecountmax,hrj,hrja,Vector3.new(0,0,0),Vector3.new(-0.14 - math.abs(-angle*0.04),angle*0.035,NV))
  682. end
  683. if not cancelmain and Main.Value ~= nil and main ~= nil and maina ~= nil then
  684. SetWeld(Main.Value,slidecount,slidecountmax,main,maina,Vector3.new(0,-1,0),NV)
  685. end
  686.  
  687. elseif script.pose.Value == 1 then
  688.  
  689. elseif script.pose.Value == 2 then
  690.  
  691. end
  692. end
  693.  
  694.  
  695. function Jumping()
  696. if script.pose.Value == 0 then
  697. ----- regular --------
  698. if not cancelra then
  699. SetWeld(RS,slidecount,slidecountmax,rs,rsa,Vector3.new(1.5,0.5,0),Vector3.new(-0.16,0,0.3 + (angle*0.012)))
  700. end
  701. if not cancella then
  702. SetWeld(LS,slidecount,slidecountmax,ls,lsa,Vector3.new(-1.5,0.5,0),Vector3.new(-0.16,0,-0.3 - (angle*0.012)))
  703. end
  704. if not cancelrl then
  705. SetWeld(RH,slidecount,slidecountmax,rh,rha,Vector3.new(0.5,-0.8,-0.05),Vector3.new(-0.28 + (angle*0.02),0,0))
  706. end
  707. if not cancelll then
  708. SetWeld(LH,slidecount,slidecountmax,lh,lha,Vector3.new(-0.5,-0.45,-0.55),Vector3.new(-0.4 - (angle*0.02),0,0))
  709. end
  710. if not canceln then
  711. SetWeld(N,slidecount,slidecountmax,n,na,Vector3.new(0,1,0),Vector3.new(0.1,-angle*0.01,0))
  712. end
  713. if not cancelhrp then
  714. SetWeld(HRJ,slidecount,slidecountmax,hrj,hrja,Vector3.new(0,0,0),Vector3.new(0.2 + (angle*0.002),angle*0.02,0))
  715. end
  716. if not cancelmain and Main.Value ~= nil and main ~= nil and maina ~= nil then
  717. SetWeld(Main.Value,slidecount,slidecountmax,main,maina,Vector3.new(0,-1,0),NV)
  718. end
  719.  
  720. elseif script.pose.Value == 1 then
  721. ----- crouch --------
  722. if not cancelra then
  723. SetWeld(RS,slidecount,slidecountmax,rs,rsa,Vector3.new(1.5,0.5,0),Vector3.new(-0.16,0,0.3 + (angle*0.012)))
  724. end
  725. if not cancella then
  726. SetWeld(LS,slidecount,slidecountmax,ls,lsa,Vector3.new(-1.5,0.5,0),Vector3.new(-0.16,0,-0.3 - (angle*0.012)))
  727. end
  728. if not cancelrl then
  729. SetWeld(RH,slidecount,slidecountmax,rh,rha,Vector3.new(0.7,-0.8,-0.05),Vector3.new(-0.28 + (angle*0.001),-math.pi/6,-0.2))
  730. end
  731. if not cancelll then
  732. SetWeld(LH,slidecount,slidecountmax,lh,lha,Vector3.new(-0.3,-0.45,-0.55),Vector3.new(-0.4 - (angle*0.001),-math.pi/6,-0.2))
  733. end
  734. if not canceln then
  735. SetWeld(N,slidecount,slidecountmax,n,na,Vector3.new(0,1,0),Vector3.new(0.1,-math.pi/5 - (angle*0.01),0))
  736. end
  737. if not cancelhrp then
  738. SetWeld(HRJ,slidecount,slidecountmax,hrj,hrja,Vector3.new(0,0,0),Vector3.new(-0.07 + (angle*0.002),math.pi/5 + (angle*0.02),0))
  739. end
  740. if not cancelmain and Main.Value ~= nil and main ~= nil and maina ~= nil then
  741. SetWeld(Main.Value,slidecount,slidecountmax,main,maina,Vector3.new(0,-1,0),NV)
  742. end
  743.  
  744. elseif script.pose.Value == 2 then
  745.  
  746. end
  747. end
  748.  
  749. function Falling()
  750. if script.pose.Value == 0 then
  751. ----- regular --------
  752. if not cancelra then
  753. SetWeld(RS,slidecount,slidecountmax,rs,rsa,Vector3.new(1.5,0.5,0),Vector3.new(math.pi*1.1,0,-0.08 + (angle*0.012)))
  754. end
  755. if not cancella then
  756. SetWeld(LS,slidecount,slidecountmax,ls,lsa,Vector3.new(-1.5,0.5,0),Vector3.new(math.pi*1.1,0,0.08 - (angle*0.012)))
  757. end
  758. if not cancelrl then
  759. SetWeld(RH,slidecount,slidecountmax,rh,rha,Vector3.new(0.5,-0.45,-0.55),Vector3.new(-0.4 + (angle*0.02),0,0))
  760. end
  761. if not cancelll then
  762. SetWeld(LH,slidecount,slidecountmax,lh,lha,Vector3.new(-0.5,-0.8,-0.05),Vector3.new(-0.28 - (angle*0.02),0,0))
  763. end
  764. if not canceln then
  765. SetWeld(N,slidecount,slidecountmax,n,na,Vector3.new(0,1,0),Vector3.new(0.1,-angle*0.01,0))
  766. end
  767. if not cancelhrp then
  768. SetWeld(HRJ,slidecount,slidecountmax,hrj,hrja,Vector3.new(0,0,0),Vector3.new(-0.2 + (angle*0.002),angle*0.02,0))
  769. end
  770. if not cancelmain and Main.Value ~= nil and main ~= nil and maina ~= nil then
  771. SetWeld(Main.Value,slidecount,slidecountmax,main,maina,Vector3.new(0,-1,0),NV)
  772. end
  773.  
  774. elseif script.pose.Value == 1 then
  775. ----- crouch --------
  776. if not cancelra then
  777. SetWeld(RS,slidecount,slidecountmax,rs,rsa,Vector3.new(1.5,0.65,0),Vector3.new(-0.1,0,0.3 + (angle*0.012)))
  778. end
  779. if not cancella then
  780. SetWeld(LS,slidecount,slidecountmax,ls,lsa,Vector3.new(-1.5,0.65,0),Vector3.new(-0.1,0,-0.3 - (angle*0.012)))
  781. end
  782. if not cancelrl then
  783. SetWeld(RH,slidecount,slidecountmax,rh,rha,Vector3.new(0.8,-0.1,-0.25),Vector3.new(-0.28 + (angle*0.001),-math.pi/6,-0.2))
  784. end
  785. if not cancelll then
  786. SetWeld(LH,slidecount,slidecountmax,lh,lha,Vector3.new(-0.3,-0.8,-0.55),Vector3.new(-0.4 - (angle*0.001),-math.pi/6,-0.2))
  787. end
  788. if not canceln then
  789. SetWeld(N,slidecount,slidecountmax,n,na,Vector3.new(0,1,0),Vector3.new(0.1,-math.pi/5 - (angle*0.01),0))
  790. end
  791. if not cancelhrp then
  792. SetWeld(HRJ,slidecount,slidecountmax,hrj,hrja,Vector3.new(0,0,0),Vector3.new(-0.07 + (angle*0.002),math.pi/5 + (angle*0.02),0))
  793. end
  794. if not cancelmain and Main.Value ~= nil and main ~= nil and maina ~= nil then
  795. SetWeld(Main.Value,slidecount,slidecountmax,main,maina,Vector3.new(0,-1,0),NV)
  796. end
  797.  
  798. elseif script.pose.Value == 2 then
  799.  
  800. end
  801. end
  802.  
  803. game:GetService("RunService").Stepped:connect(function()
  804. count1 = (count1%100) + countspeed
  805. angle = math.pi * math.sin(math.pi*2/100*count1)
  806. cangle = math.pi * math.cos(math.pi*2/100*count1)
  807.  
  808. ------------- snowball power gui movement ------------------
  809. if SPC.Archivable == true then
  810. SPCP = SPCP ~= 14 and SPCP+1 or 14
  811. else
  812. SPCP = SPCP ~= 0 and SPCP-1 or 0
  813. end
  814. if SPC ~= nil then
  815. local perc = math.sin((math.pi/2/14)*SPCP)
  816. SPC.Position = UDim2.new(1,10 - (50*perc),0.5,-55)
  817. if SPCP > 0 then
  818. SPC.Visible = true
  819. else
  820. SPC.Visible = false
  821. end
  822. end
  823.  
  824. ------------- walkspeed changes -------------------------
  825. if DisableMovement then
  826. Walkspeed = 0
  827. Hu.WalkSpeed = Walkspeed
  828. else
  829. if Shift and pose.Value ~= 1 then
  830. Walkspeed = 25
  831. Hu.WalkSpeed = Walkspeed
  832. else
  833. Walkspeed = 16
  834. if pose.Value == 1 then
  835. Hu.WalkSpeed = Walkspeed/2
  836. else
  837. Hu.WalkSpeed = Walkspeed
  838. end
  839. end
  840. end
  841.  
  842. -------- animation slide count and pose smoothener --------------------
  843. slidecount = (slidecount < slidecountmax and slidecount+1) or slidecountmax
  844. SlideCooldown = (SlideCooldown > 0 and SlideCooldown-1) or 0
  845.  
  846. if script.pose.Value ~= lastpose then
  847. UpdateWP()
  848. end
  849.  
  850. --------- animation conditions -------------------
  851.  
  852. local ghitz, genz = RAY(Torsoz.Position,Vector3.new(0,-5.2,0))
  853.  
  854. if ghitz == nil and Torsoz.Velocity.y > 1 then
  855. ----- jumping -----
  856. anim = 3
  857. if anim ~= lastanim then
  858. UpdateWP(7)
  859. end
  860. Jumping()
  861. elseif ghitz == nil and Torsoz.Velocity.y < -1 then
  862. ----- falling ------
  863. anim = 4
  864. if anim ~= lastanim then
  865. UpdateWP(7)
  866. end
  867. Falling()
  868. elseif Vector3.new(Torsoz.Velocity.x,0,Torsoz.Velocity.z).magnitude < 2 then
  869. ---- idle ---------
  870. anim = 0
  871. if anim ~= lastanim then
  872. UpdateWP(6)
  873. end
  874. Idle()
  875.  
  876. elseif Vector3.new(Torsoz.Velocity.x,0,Torsoz.Velocity.z).magnitude < 17 then
  877. ---- walking -------
  878. anim = 1
  879. if anim ~= lastanim then
  880. UpdateWP(7)
  881. end
  882. Walking()
  883.  
  884. elseif Vector3.new(Torsoz.Velocity.x,0,Torsoz.Velocity.z).magnitude >= 17 then
  885. ----- running -----
  886. anim = 2
  887. if anim ~= lastanim then
  888. UpdateWP(5)
  889. end
  890. Running()
  891.  
  892. ------------
  893. end
  894.  
  895. --------- breakfall roll --------
  896. if ghitz ~= nil and prevvelocity.y < -110 then
  897. invoke.Value = 2
  898. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement