Advertisement
Guest User

Untitled

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