Advertisement
UiiN2IPCEO

highhh

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