Advertisement
wamandnj

Untitled

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