Advertisement
5325325325

Untitled

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