Advertisement
AlitraxMine

Untitled

May 4th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.02 KB | None | 0 0
  1.  
  2.  
  3. warn("You're blacklister, "..game:GetService("Players").LocalPlayer.Name.." :]
  4.  
  5. local p = game:GetService("Players").LocalPlayer
  6. local char = p.Character
  7. local mouse = p:GetMouse()
  8. local larm = char:WaitForChild("Left Arm")
  9. local rarm = char:WaitForChild("Right Arm")
  10. local lleg = char:WaitForChild("Left Leg")
  11. local rleg = char:WaitForChild("Right Leg")
  12. local hed = char:WaitForChild("Head")
  13. local torso = char:WaitForChild("Torso")
  14. local root = char:WaitForChild("HumanoidRootPart")
  15. local hum = char:FindFirstChildOfClass("Humanoid")
  16. local debris = game:GetService("Debris")
  17. local input = game:GetService("UserInputService")
  18. local run = game:GetService("RunService")
  19. local rs = run.RenderStepped
  20. local wingpose = "Idle"
  21. local DebrisModel = Instance.new("Model",char)
  22. DebrisModel.Name = "Debris"
  23. repeat rs:wait() until p.CharacterAppearanceLoaded
  24.  
  25. noidle = false
  26. shift = false
  27. control = false
  28.  
  29. ----------------------------------------------------------------------------
  30.  
  31. function rswait(value)
  32. if value ~= nil and value ~= 0 then
  33. for i=1,value do
  34. rs:wait()
  35. end
  36. else
  37. rs:wait()
  38. end
  39. end
  40.  
  41. ----------------------------------------------------------------------------
  42.  
  43. local timeposition = 0
  44.  
  45. function music(id)
  46. if id == "Stop" then
  47. if not torso:FindFirstChild("MusicRuin") then
  48. soundz = Instance.new("Sound",torso)
  49. end
  50. soundz:Stop()
  51. else
  52. if not torso:FindFirstChild("MusicRuin") then
  53. soundz = Instance.new("Sound",torso)
  54. for i=1,2 do
  55. local equalizer = Instance.new("EqualizerSoundEffect",soundz)
  56. equalizer.HighGain = 6
  57. equalizer.MidGain = 0
  58. equalizer.LowGain = 6
  59. end
  60. end
  61. soundz.Volume = 10
  62. soundz.Name = "MusicRuin"
  63. soundz.Looped = true
  64. soundz.PlaybackSpeed = 1
  65. soundz.SoundId = "rbxassetid://"..id
  66. soundz:Stop()
  67. soundz:Play()
  68. end
  69. end
  70.  
  71. ----------------------------------------------------------------------------
  72.  
  73. function lerp(a, b, t)
  74. return a + (b - a)*t
  75. end
  76.  
  77. ----------------------------------------------------------------------------
  78.  
  79. function Lerp(c1,c2,al)
  80. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  81. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  82. for i,v in pairs(com1) do
  83. com1[i] = v+(com2[i]-v)*al
  84. end
  85. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  86. end
  87.  
  88. ----------------------------------------------------------------------------
  89.  
  90. function slerp(a, b, t)
  91. dot = a:Dot(b)
  92. if dot > 0.99999 or dot < -0.99999 then
  93. return t <= 0.5 and a or b
  94. else
  95. r = math.acos(dot)
  96. return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
  97. end
  98. end
  99.  
  100. ----------------------------------------------------------------------------
  101.  
  102. function clerp(c1,c2,al)
  103.  
  104. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  105.  
  106. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  107.  
  108. for i,v in pairs(com1) do
  109.  
  110. com1[i] = lerp(v,com2[i],al)
  111.  
  112. end
  113.  
  114. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  115.  
  116. end
  117.  
  118. ----------------------------------------------------------------------------
  119.  
  120. function findAllNearestTorso(pos,dist)
  121. local list = workspace:children()
  122. local torso = {}
  123. local temp = nil
  124. local human = nil
  125. local temp2 = nil
  126. for x = 1, #list do
  127. temp2 = list[x]
  128. if (temp2.className == "Model") and (temp2 ~= char) then
  129. temp = temp2:findFirstChild("Torso")
  130. human = temp2:findFirstChildOfClass("Humanoid")
  131. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  132. if (temp.Position - pos).magnitude < dist then
  133. table.insert(torso,temp)
  134. dist = (temp.Position - pos).magnitude
  135. end
  136. end
  137. end
  138. end
  139. return torso
  140. end
  141.  
  142. ----------------------------------------------------------------------------
  143.  
  144. function checkIfNotPlayer(model)
  145. if model.CanCollide == true and model ~= char and model.Parent ~= char and model.Parent.Parent ~= char and model.Parent.Parent ~= char and model.Parent ~= DebrisModel and model.Parent.Parent ~= DebrisModel and model.Parent.Parent.Parent ~= DebrisModel and model ~= wings and model.Parent ~= wings and model.Parent.Parent ~= wings then
  146. return true
  147. else
  148. return false
  149. end
  150. end
  151.  
  152. ----------------------------------------------------------------------------
  153.  
  154. function newWeld(wp0, wp1, wc0x, wc0y, wc0z)
  155.  
  156. local wld = Instance.new("Weld", wp1)
  157.  
  158. wld.Part0 = wp0
  159.  
  160. wld.Part1 = wp1
  161.  
  162. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  163.  
  164. return wld
  165.  
  166. end
  167.  
  168. function weld(model)
  169. local parts,last = {}
  170. local function scan(parent)
  171. for _,v in pairs(parent:GetChildren()) do
  172. if (v:IsA("BasePart")) then
  173. if (last) then
  174. local w = Instance.new("Weld")
  175. w.Name = ("%s_Weld"):format(v.Name)
  176. w.Part0,w.Part1 = last,v
  177. w.C0 = last.CFrame:inverse()
  178. w.C1 = v.CFrame:inverse()
  179. w.Parent = last
  180. end
  181. last = v
  182. table.insert(parts,v)
  183. end
  184. scan(v)
  185. end
  186. end
  187. scan(model)
  188. for _,v in pairs(parts) do
  189. v.Anchored = false
  190. v.Locked = true
  191. v.Anchored = false
  192. v.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  193. v.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  194. v.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  195. v.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  196. v.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  197. v.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  198. v.CustomPhysicalProperties = PhysicalProperties.new(0,0,0)
  199. end
  200. end
  201.  
  202. ----------------------------------------------------------------------------
  203.  
  204. function calculate(part,asd)
  205. local Head = hed
  206. local RightShoulder = asd
  207. local RightArm = part
  208. local MousePosition = mouse.Hit.p
  209. local ToMouse = (MousePosition - Head.Position).unit
  210. local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0)))
  211. local FromRightArmPos = (Head.Position + Head.CFrame:vectorToWorldSpace(Vector3.new(((Head.Size.X / 2) + (RightArm.Size.X / 2)), ((Head.Size.Y / 2) - (RightArm.Size.Z / 2)), 0)))
  212. local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit
  213. local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit
  214. local LateralAngle = math.acos(ToMouseRightArm:Dot(Look))
  215. if tostring(LateralAngle) == "-1.#IND" then
  216. LateralAngle = 0
  217. end
  218. local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm)
  219. if LateralAngle > (math.pi / 2) then
  220. LateralAngle = (math.pi / 2)
  221. local Torso = root
  222. local Point = Torso.CFrame:vectorToObjectSpace(mouse.Hit.p-Torso.CFrame.p)
  223. if Point.Z > 0 then
  224. if Point.X > -0 and RightArm == rarm then
  225. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mouse.Hit.X,Torso.Position.Y,mouse.Hit.Z))*CFrame.Angles(0,math.rad(110),0)
  226. elseif Point.X < 0 and RightArm == rarm then
  227. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mouse.Hit.X,Torso.Position.Y,mouse.Hit.Z))*CFrame.Angles(0,math.rad(-110),0)
  228. end
  229. end
  230. end
  231. if Cross.Y < 0 then
  232. LateralAngle = -LateralAngle
  233. end
  234. return(CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2))
  235. end
  236.  
  237. ----------------------------------------------------------------------------
  238.  
  239. function sound(id,position,vol,pitch,start,finish)
  240. coroutine.resume(coroutine.create(function()
  241.  
  242. local part = Instance.new("Part",workspace)
  243. part.Position = position
  244. part.Size = Vector3.new(0,0,0)
  245. part.CanCollide = false
  246. part.Transparency = 1
  247.  
  248. local sound = Instance.new("Sound",part)
  249.  
  250. sound.SoundId = "rbxassetid://"..id
  251.  
  252. repeat rs:wait() until sound.IsLoaded
  253.  
  254. if vol ~= nil then
  255. sound.Volume = vol
  256. end
  257.  
  258. if pitch ~= nil then
  259. sound.PlaybackSpeed = pitch
  260. end
  261.  
  262. if start ~= nil then
  263. sound.TimePosition = start
  264. end
  265.  
  266. if finish ~= nil then
  267. debris:AddItem(part,finish-start)
  268. else
  269. debris:AddItem(part,sound.TimeLength)
  270. end
  271.  
  272. sound:Play()
  273.  
  274. return sound
  275.  
  276. end))
  277. end
  278.  
  279. ----------------------------------------------------------------------------
  280.  
  281. function computeDirection(vec)
  282. local lenSquared = vec.magnitude * vec.magnitude
  283. local invSqrt = 1 / math.sqrt(lenSquared)
  284. return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
  285. end
  286.  
  287. ----------------------------------------------------------------------------
  288.  
  289. local shaking = 0
  290. function shake(num) if num > shaking then shaking = num end end
  291. game:GetService("RunService").RenderStepped:connect(function()
  292. hum.CameraOffset = Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1))*(shaking/100)
  293. if shaking > 0 then shaking = shaking - 1 else shaking = 0 end
  294. end)
  295.  
  296. plr = game:GetService("Players").LocalPlayer
  297. DebrisModel = Instance.new("Model",plr.Character)
  298. DebrisModel.Name = "DebrisModel"
  299.  
  300. function Effect(mesh,size,transparency,material,color,position,rotation,positionchange,sizechange,rotationchange,transparencychange,acceleration)
  301.  
  302. local part = Instance.new("Part",DebrisModel)
  303. part.Anchored = true
  304. part.CanCollide = false
  305. part.Size = Vector3.new(1,1,1)
  306. part.Transparency = transparency
  307. part.Material = material
  308. part.Color = color
  309. part.CFrame = CFrame.new(position)*CFrame.Angles(math.rad(rotation.X),math.rad(rotation.Y),math.rad(rotation.Z))
  310.  
  311. local partmesh = Instance.new("SpecialMesh",part)
  312. if tonumber(mesh) == nil then partmesh.MeshType = mesh else partmesh.MeshId = "rbxassetid://"..mesh end
  313. partmesh.Scale = size
  314.  
  315. local pvalue = Instance.new("Vector3Value",part)
  316. pvalue.Name = "Position"
  317. pvalue.Value = positionchange
  318.  
  319. local svalue = Instance.new("Vector3Value",part)
  320. svalue.Name = "Size"
  321. svalue.Value = sizechange
  322.  
  323. local rvalue = Instance.new("Vector3Value",part)
  324. rvalue.Name = "Rotation"
  325. rvalue.Value = rotationchange
  326.  
  327. local tvalue = Instance.new("NumberValue",part)
  328. tvalue.Name = "Transparency"
  329. tvalue.Value = transparencychange
  330.  
  331. local avalue = Instance.new("NumberValue",part)
  332. avalue.Name = "Acceleration"
  333. avalue.Value = acceleration
  334.  
  335. part.Name = "EFFECT"
  336.  
  337. return part
  338.  
  339. end
  340.  
  341. game:GetService("RunService").RenderStepped:connect(function()
  342. coroutine.resume(coroutine.create(function()
  343.  
  344. for i, v in pairs(DebrisModel:GetChildren()) do
  345. if v:isA("BasePart") then
  346. v.LocalTransparencyModifier = 0
  347. end
  348. end
  349.  
  350. if not plr.Character:FindFirstChild("DebrisModel") then
  351. DebrisModel = Instance.new("Model",plr.Character)
  352. DebrisModel.Name = "DebrisModel"
  353. end
  354.  
  355. for i,v in pairs(DebrisModel:GetChildren()) do
  356. if v:IsA("BasePart") and v.Name == "EFFECT" then
  357. local pvalue = v:FindFirstChild("Position").Value
  358. local svalue = v:FindFirstChild("Size").Value
  359. local rvalue = v:FindFirstChild("Rotation").Value
  360. local tvalue = v:FindFirstChild("Transparency").Value
  361. local avalue = v:FindFirstChild("Acceleration").Value
  362. local mesh = v:FindFirstChild("Mesh")
  363. mesh.Scale = mesh.Scale + svalue
  364. v:FindFirstChild("Size").Value = v:FindFirstChild("Size").Value + (Vector3.new(1,1,1)*avalue)
  365. v.Transparency = v.Transparency + tvalue
  366. v.CFrame = CFrame.new(pvalue)*v.CFrame*CFrame.Angles(math.rad(rvalue.X),math.rad(rvalue.Y),math.rad(rvalue.Z))
  367. if v.Transparency >= 1 or mesh.Scale.X < 0 or mesh.Scale.Y < 0 or mesh.Scale.Z < 0 then
  368. v:Destroy()
  369. end
  370. end
  371. end
  372.  
  373. end))
  374. end)
  375.  
  376. local wsback = 0
  377. local frozen = false
  378. function freeze()
  379. if frozen == false then
  380. frozen = true
  381. wsback = hum.WalkSpeed
  382. hum.WalkSpeed = 1
  383. else
  384. frozen = false
  385. hum.WalkSpeed = wsback
  386. end
  387. end
  388. hum.WalkSpeed = 25
  389.  
  390. function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans)
  391. local magz = (Part0 - Part1).magnitude
  392. local curpos = Part0
  393. local trz = {-Offset,Offset}
  394. for i=1,Times do
  395. local li = Instance.new("Part", DebrisModel)
  396. li.TopSurface =0
  397. li.Material = Enum.Material.Neon
  398. li.BottomSurface = 0
  399. li.Anchored = true
  400. li.Locked = true
  401. li.Transparency = Trans or 0.4
  402. li.Color = Color
  403. li.formFactor = "Custom"
  404. li.CanCollide = false
  405. li.Size = Vector3.new(Thickness,Thickness,magz/Times)
  406. local lim = Instance.new("BlockMesh",li)
  407. local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  408. local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet
  409. if Times == i then
  410. local magz2 = (curpos - Part1).magnitude
  411. li.Size = Vector3.new(Thickness,Thickness,magz2)
  412. li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2)
  413. else
  414. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  415. end
  416. curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p
  417. li.Name = "LIGHTNING"
  418. end
  419. end
  420.  
  421. ----------------------------------------------------------------------------
  422. skin_color = BrickColor.new("Light orange")
  423. --p:ClearCharacterAppearance()
  424. --hed:WaitForChild("face"):Destroy()
  425. hed:WaitForChild("face").Texture = "rbxassetid://6229797"
  426. ----------------------------------------------------------------------------
  427. local size = 1
  428.  
  429. newWeld(torso, larm, -1.5, 0.5, 0)
  430. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  431. newWeld(torso, rarm, 1.5, 0.5, 0)
  432. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  433. newWeld(torso, hed, 0, 1.5, 0)
  434. newWeld(torso, lleg, -0.5, -1, 0)
  435. lleg.Weld.C1 = CFrame.new(0, 1, 0)
  436. newWeld(torso, rleg, 0.5, -1, 0)
  437. rleg.Weld.C1 = CFrame.new(0, 1, 0)
  438. newWeld(root, torso, 0, -1, 0)
  439. torso.Weld.C1 = CFrame.new(0, -1, 0)
  440.  
  441. emitters={}
  442.  
  443. ----------------------------------------------------------------------------------------
  444. music(288494027)
  445. velocityYFall=0
  446. velocityYFall2=0
  447. velocityYFall3=0
  448. velocityYFall4=0
  449. neckrotY=0
  450. neckrotY2=0
  451. torsorotY=0
  452. torsorotY2=0
  453. torsoY=0
  454. torsoY2=0
  455. colored = 0
  456. sine = 0
  457. change=0.4
  458. movement=10
  459. timeranim=0
  460. running = false
  461. jumped = false
  462. icolor=1
  463. imode=false
  464.  
  465. didjump = false
  466. jumppower = 0
  467. debounceimpact = false
  468.  
  469. function jumpimpact()
  470. if debounceimpact == false then
  471. debounceimpact = true
  472. if jumppower < -150 then jumppower = -150 end
  473. shake(-jumppower/5)
  474. for i=1,-jumppower/20 do rs:wait()
  475. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0), 0.05)
  476. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, (jumppower/20)-hum.HipHeight, 0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.05)
  477. end
  478. debounceimpact = false
  479. end
  480. end
  481.  
  482. max = 0
  483.  
  484. rs:connect(function()
  485.  
  486. for i,v in pairs(DebrisModel:GetChildren()) do
  487. if v.Name == "LIGHTNING" then
  488. local vm = v:FindFirstChildOfClass("BlockMesh")
  489. vm.Scale = vm.Scale - Vector3.new(0.1,0.1,0)
  490. if vm.Scale.X <= 0 then
  491. v:Destroy()
  492. end
  493. end
  494. end
  495.  
  496. if p.Character.Parent == nil then
  497. local model = Instance.new("Model")
  498. model.Name = p.Name
  499. p.Character = model
  500. for i,v in pairs(char:GetChildren()) do
  501. v.Parent = p.Character
  502. end
  503. end
  504.  
  505. char = p.Character
  506. if p.Character.Parent ~= workspace then
  507. p.Character.Parent = workspace
  508. end
  509. for i,v in pairs(char:GetChildren()) do
  510. if v:IsA("Accoutrement") then
  511. if v.Handle:FindFirstChild("Mesh") then
  512. v.Handle:FindFirstChild("Mesh").Offset = Vector3.new()
  513. v.Handle.Transparency = 0
  514. end
  515. elseif v:IsA("BasePart") then
  516. v.Anchored = false
  517. if v:FindFirstChildOfClass("BodyPosition") then
  518. v:FindFirstChildOfClass("BodyPosition"):Destroy()
  519. end
  520. if v:FindFirstChildOfClass("BodyVelocity") then
  521. v:FindFirstChildOfClass("BodyVelocity"):Destroy()
  522. end
  523. if v:FindFirstChildOfClass("BodyGyro") and v:FindFirstChildOfClass("BodyGyro").Name ~= "lolnochara" then
  524. v:FindFirstChildOfClass("BodyGyro"):Destroy()
  525. end
  526. if v:FindFirstChild("Mesh") then
  527. v:FindFirstChild("Mesh").Offset = Vector3.new()
  528. end
  529. if not DebrisModel:FindFirstChild(v.Name.."FORCEFIELD") then
  530. local force = Instance.new("Part",DebrisModel)
  531. force.Name = v.Name.."FORCEFIELD"
  532. if v ~= hed then
  533. force.Size = v.Size+(Vector3.new(1,1,1)*0.2)
  534. else
  535. force.Size = (Vector3.new(1,1,1)*v.Size.Y)+(Vector3.new(1,1,1)*0.2)
  536. end
  537. force.CanCollide = false
  538. force.Transparency = 1
  539. force.Color = Color3.new(0,1,1)
  540. force.Material = Enum.Material.Neon
  541. newWeld(v,force,0,0,0)
  542. else
  543. if not DebrisModel:FindFirstChild(v.Name.."FORCEFIELD"):FindFirstChildOfClass("Weld") then
  544. newWeld(v,DebrisModel:FindFirstChild(v.Name.."FORCEFIELD"),0,0,0)
  545. end
  546. end
  547. if v.Name ~= "HumanoidRootPart" then
  548. v.Transparency = 0
  549. else
  550. v.Transparency = 1
  551. end
  552. end
  553. end
  554.  
  555. if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 150 then
  556. velocityYFall = root.Velocity.Y/1.5
  557. else
  558. if -root.Velocity.Y/1.5 < -5 then
  559. velocityYFall = 5
  560. elseif -root.Velocity.Y/1.5 > 150 then
  561. velocityYFall = -150
  562. end
  563. end
  564.  
  565. if -root.Velocity.Y/180 > 0 and -root.Velocity.Y/180 < 1.2 then
  566. velocityYFall2 = root.Velocity.Y/180
  567. else
  568. if -root.Velocity.Y/180 < 0 then
  569. velocityYFall2 = 0
  570. elseif -root.Velocity.Y/180 > 1.2 then
  571. velocityYFall2 = -1.2
  572. end
  573. end
  574.  
  575. if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 50 then
  576. velocityYFall3 = root.Velocity.Y/1.5
  577. else
  578. if -root.Velocity.Y/1.5 < -5 then
  579. velocityYFall3 = 5
  580. elseif -root.Velocity.Y/1.5 > 50 then
  581. velocityYFall3 = -50
  582. end
  583. end
  584.  
  585. if -root.Velocity.Y/1.5 > -50 and -root.Velocity.Y/1.5 < 20 then
  586. velocityYFall4 = root.Velocity.Y/1.5
  587. else
  588. if -root.Velocity.Y/180 < -5 then
  589. velocityYFall4 = 5
  590. elseif -root.Velocity.Y/180 > 50 then
  591. velocityYFall4 = -50
  592. end
  593. end
  594.  
  595. if root.RotVelocity.Y/6 < 1 and root.RotVelocity.Y/6 > -1 then
  596. neckrotY = root.RotVelocity.Y/6
  597. else
  598. if root.RotVelocity.Y/6 < -1 then
  599. neckrotY = -1
  600. elseif root.RotVelocity.Y/6 > 1 then
  601. neckrotY = 1
  602. end
  603. end
  604.  
  605. if root.RotVelocity.Y/8 < 0.6 and root.RotVelocity.Y/8 > -0.6 then
  606. neckrotY2 = root.RotVelocity.Y/8
  607. else
  608. if root.RotVelocity.Y/8 < -0.6 then
  609. neckrotY2 = -0.6
  610. elseif root.RotVelocity.Y/8 > 0.6 then
  611. neckrotY2 = 0.6
  612. end
  613. end
  614.  
  615. if root.RotVelocity.Y/6 < 0.2 and root.RotVelocity.Y/6 > -0.2 then
  616. torsorotY = root.RotVelocity.Y/6
  617. else
  618. if root.RotVelocity.Y/6 < -0.2 then
  619. torsorotY = -0.2
  620. elseif root.RotVelocity.Y/6 > 0.2 then
  621. torsorotY = 0.2
  622. end
  623. end
  624.  
  625. if root.RotVelocity.Y/8 < 0.2 and root.RotVelocity.Y/8 > -0.2 then
  626. torsorotY2 = root.RotVelocity.Y/8
  627. else
  628. if root.RotVelocity.Y/8 < -0.2 then
  629. torsorotY2 = -0.2
  630. elseif root.RotVelocity.Y/8 > 0.2 then
  631. torsorotY2 = 0.2
  632. end
  633. end
  634.  
  635. torsoY = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/20
  636. torsoY2 = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/36
  637.  
  638. local ray1 = Ray.new(root.Position+Vector3.new(size,0,0),Vector3.new(0, -4, 0))
  639. local part1, endPoint = workspace:FindPartOnRay(ray1, char)
  640.  
  641. local ray2 = Ray.new(root.Position-Vector3.new(size,0,0),Vector3.new(0, -4, 0))
  642. local part2, endPoint = workspace:FindPartOnRay(ray2, char)
  643.  
  644. local ray3 = Ray.new(root.Position+Vector3.new(0,0,size/2),Vector3.new(0, -4, 0))
  645. local part3, endPoint = workspace:FindPartOnRay(ray3, char)
  646.  
  647. local ray4 = Ray.new(root.Position-Vector3.new(0,0,size/2),Vector3.new(0, -4, 0))
  648. local part4, endPoint = workspace:FindPartOnRay(ray4, char)
  649.  
  650. local ray5 = Ray.new(root.Position+Vector3.new(size,0,size/2),Vector3.new(0, -4, 0))
  651. local part5, endPoint = workspace:FindPartOnRay(ray5, char)
  652.  
  653. local ray6 = Ray.new(root.Position-Vector3.new(size,0,size/2),Vector3.new(0, -4, 0))
  654. local part6, endPoint = workspace:FindPartOnRay(ray6, char)
  655.  
  656. local ray7 = Ray.new(root.Position+Vector3.new(size,0,-size/2),Vector3.new(0, -4, 0))
  657. local part7, endPoint = workspace:FindPartOnRay(ray7, char)
  658.  
  659. local ray8 = Ray.new(root.Position-Vector3.new(size,0,-size/2),Vector3.new(0, -4, 0))
  660. local part8, endPoint = workspace:FindPartOnRay(ray8, char)
  661.  
  662. local ray = Ray.new(root.Position,Vector3.new(0, -6, 0))
  663. local part, endPoint = workspace:FindPartOnRay(ray, char)
  664.  
  665. if part1 or part2 or part3 or part4 or part5 or part6 or part7 or part8 then jumped = false else endPoint = 0 jumped = true end
  666.  
  667. local rlegray = Ray.new(rleg.Position+Vector3.new(0,size/2,0),Vector3.new(0, -1.75, 0))
  668. local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char)
  669.  
  670. local llegray = Ray.new(lleg.Position+Vector3.new(0,size/2,0),Vector3.new(0, -1.75, 0))
  671. local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char)
  672.  
  673. if hum.Health > 0 and noidle == false then
  674. if hum.Sit == false then
  675. if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude >= 5 and jumped == false then
  676. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.2) * CFrame.Angles(math.rad((torso.Velocity*Vector3.new(1, 0, 1)).magnitude/35),torsorotY, math.rad(0)+torsorotY), 0.4)
  677. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles((change/10)*math.cos(sine/2)+0.1,-(change/10)*math.cos(sine/4)-(torsorotY/5),(change/5)*math.cos(sine/4)), 0.1)
  678. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.62-(movement/40)*math.cos(sine/4)/3,(movement/150)+(movement/40)*math.cos(sine/4))*CFrame.Angles(math.rad(-5-(movement*2)*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4)*2,math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  679. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.62+(movement/40)*math.cos(sine/4)/3,(movement/150)-(movement/40)*math.cos(sine/4))*CFrame.Angles(math.rad(-5+(movement*2)*math.cos(sine/4))+ (movement/10)*math.sin(sine/4)*2,math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  680. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -0.5+(change*2)*math.sin(sine/2), 0) * CFrame.Angles(math.rad(30+(change*20)-(movement/20)*math.cos(sine/2)), torsorotY2+math.rad(0-20*math.sin(sine/4)), torsorotY2+math.rad(0-1*math.cos(sine/4))), 0.1)
  681. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,(-0.85-(movement/15)*math.cos(sine/4)/2),-0.1+(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-50+(change*5)-movement*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  682. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,(-0.85+(movement/15)*math.cos(sine/4)/2),-0.1-(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-50+(change*5)+movement*math.cos(sine/4))+ (movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  683. elseif jumped == true then
  684. didjump = true
  685. jumppower = root.Velocity.Y
  686. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1) * CFrame.Angles(0,0,0), 0.4)
  687. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0), 0.1)
  688. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55,0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
  689. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55,0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
  690. torso.Weld.C0 = CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(math.random(-90,90)),math.rad(0), math.rad(math.random(-180,180)))
  691. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.925,0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
  692. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,0,-0.8) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
  693. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 5 then
  694. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1), 0.4)
  695. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(0+50*math.sin(sine/4)),0,0), 0.1)
  696. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55,-0.05-0.2*math.cos(sine/4))*CFrame.Angles(math.rad(0+80*math.sin(sine/4)),math.rad(-5-5*math.sin(sine/8)),math.rad(-6+2*math.cos(sine/8))), 0.2)
  697. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55,-0.05-0.2*math.cos(sine/4))*CFrame.Angles(math.rad(0+80*math.sin(sine/4)),math.rad(5+5*math.sin(sine/8)),math.rad(6-2*math.cos(sine/8))), 0.2)
  698. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1.1-hum.HipHeight, 0+2*math.cos(sine/4)) * CFrame.Angles(math.rad(0-80*math.cos(sine/4)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1)
  699. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(0,llegendPoint.Y-lleg.Position.Y,0)*CFrame.new(-0.5,0,0)*CFrame.Angles(math.rad(0+120*math.cos(sine/4)),math.rad(10),math.rad(-5+1*math.cos(sine/16))), 0.1)
  700. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0,rlegendPoint.Y-rleg.Position.Y,0)*CFrame.new(0.5,0,0)*CFrame.Angles(math.rad(0+120*math.cos(sine/4)),math.rad(-10),math.rad(5+1*math.cos(sine/16))), 0.1)
  701. end
  702.  
  703. else
  704. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1), 0.4)
  705. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0.05*math.sin(sine/16)+0.15,0.05*math.cos(sine/32),0.01*math.cos(sine/32)), 0.1)
  706. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55-(0.1)*math.cos(sine/16)/3,-0.05-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(-2+4*math.sin(sine/16)),math.rad(-5-5*math.sin(sine/16)),math.rad(-6+2*math.cos(sine/16))), 0.2)
  707. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55-(0.1)*math.cos(sine/16)/3,-0.05-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(-2+4*math.sin(sine/16)),math.rad(5+5*math.sin(sine/16)),math.rad(6-2*math.cos(sine/16))), 0.2)
  708. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1.4-(0.1)*math.cos(sine/16)-hum.HipHeight, 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1)
  709. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.55+(0.1)*math.cos(sine/16),0)*CFrame.Angles(math.rad(80+2*math.cos(sine/16)),math.rad(4),math.rad(-2+1*math.cos(sine/32))), 0.2)
  710. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,-0.55+(0.1)*math.cos(sine/16),0)*CFrame.Angles(math.rad(80+2*math.cos(sine/16)),math.rad(-4),math.rad(2+1*math.cos(sine/32))), 0.2)
  711. end
  712.  
  713. end
  714. if didjump == true and jumped == false and jumppower < 0 then
  715. didjump = false
  716. jumpimpact()
  717. end
  718.  
  719. sine = sine + change
  720. hum.Health = math.huge
  721. hum.MaxHealth = math.huge
  722. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement