Hugo1234cool

Untitled

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