Advertisement
coughdrops

Untitled

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