Advertisement
wamandnj

Untitled

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