Advertisement
VoidScriptPlayer

Untitled

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