Advertisement
wamandnj

Untitled

Oct 22nd, 2018
215
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, "..game:GetService("Players").LocalPlayer.Name.." :)")
  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.  
  213. function findAllNearestTorso(pos,dist)
  214. local list = workspace:children()
  215. local torso = {}
  216. local temp = nil
  217. local human = nil
  218. local temp2 = nil
  219. for x = 1, #list do
  220. temp2 = list[x]
  221. if (temp2.className == "Model") and (temp2 ~= char) then
  222. temp = temp2:findFirstChild("Torso")
  223. human = temp2:findFirstChildOfClass("Humanoid")
  224. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  225. if (temp.Position - pos).magnitude < dist then
  226. table.insert(torso,temp)
  227. dist = (temp.Position - pos).magnitude
  228. end
  229. end
  230. end
  231. end
  232. return torso
  233. end
  234.  
  235. ----------------------------------------------------------------------------
  236.  
  237. function checkIfNotPlayer(model)
  238. 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
  239. return true
  240. else
  241. return false
  242. end
  243. end
  244.  
  245. ----------------------------------------------------------------------------
  246.  
  247. function newWeld(wp0, wp1, wc0x, wc0y, wc0z)
  248.  
  249. local wld = Instance.new("Weld", wp1)
  250.  
  251. wld.Part0 = wp0
  252.  
  253. wld.Part1 = wp1
  254.  
  255. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  256.  
  257. return wld
  258.  
  259. end
  260.  
  261. function weld(model)
  262. local parts,last = {}
  263. local function scan(parent)
  264. for _,v in pairs(parent:GetChildren()) do
  265. if (v:IsA("BasePart")) then
  266. if (last) then
  267. local w = Instance.new("Weld")
  268. w.Name = ("%s_Weld"):format(v.Name)
  269. w.Part0,w.Part1 = last,v
  270. w.C0 = last.CFrame:inverse()
  271. w.C1 = v.CFrame:inverse()
  272. w.Parent = last
  273. end
  274. last = v
  275. table.insert(parts,v)
  276. end
  277. scan(v)
  278. end
  279. end
  280. scan(model)
  281. for _,v in pairs(parts) do
  282. v.Anchored = false
  283. v.Locked = true
  284. v.Anchored = false
  285. v.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  286. v.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  287. v.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  288. v.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  289. v.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  290. v.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  291. v.CustomPhysicalProperties = PhysicalProperties.new(0,0,0)
  292. end
  293. end
  294.  
  295. ----------------------------------------------------------------------------
  296.  
  297. function calculate(part,asd)
  298. local Head = hed
  299. local RightShoulder = asd
  300. local RightArm = part
  301. local MousePosition = mouse.Hit.p
  302. local ToMouse = (MousePosition - Head.Position).unit
  303. local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0)))
  304. 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)))
  305. local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit
  306. local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit
  307. local LateralAngle = math.acos(ToMouseRightArm:Dot(Look))
  308. if tostring(LateralAngle) == "-1.#IND" then
  309. LateralAngle = 0
  310. end
  311. local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm)
  312. if LateralAngle > (math.pi / 2) then
  313. LateralAngle = (math.pi / 2)
  314. local Torso = root
  315. local Point = Torso.CFrame:vectorToObjectSpace(mouse.Hit.p-Torso.CFrame.p)
  316. if Point.Z > 0 then
  317. if Point.X > -0 and RightArm == rarm then
  318. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mouse.Hit.X,Torso.Position.Y,mouse.Hit.Z))*CFrame.Angles(0,math.rad(110),0)
  319. elseif Point.X < 0 and RightArm == rarm then
  320. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mouse.Hit.X,Torso.Position.Y,mouse.Hit.Z))*CFrame.Angles(0,math.rad(-110),0)
  321. end
  322. end
  323. end
  324. if Cross.Y < 0 then
  325. LateralAngle = -LateralAngle
  326. end
  327. return(CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2))
  328. end
  329.  
  330. ----------------------------------------------------------------------------
  331.  
  332. function sound(id,position,vol,pitch,start,finish)
  333. coroutine.resume(coroutine.create(function()
  334.  
  335. local part = Instance.new("Part",workspace)
  336. part.Position = position
  337. part.Size = Vector3.new(0,0,0)
  338. part.CanCollide = false
  339. part.Transparency = 1
  340.  
  341. local sound = Instance.new("Sound",part)
  342.  
  343. sound.SoundId = "rbxassetid://"..id
  344.  
  345. repeat rs:wait() until sound.IsLoaded
  346.  
  347. if vol ~= nil then
  348. sound.Volume = vol
  349. end
  350.  
  351. if pitch ~= nil then
  352. sound.PlaybackSpeed = pitch
  353. end
  354.  
  355. if start ~= nil then
  356. sound.TimePosition = start
  357. end
  358.  
  359. if finish ~= nil then
  360. debris:AddItem(part,finish-start)
  361. else
  362. debris:AddItem(part,sound.TimeLength)
  363. end
  364.  
  365. sound:Play()
  366.  
  367. return sound
  368.  
  369. end))
  370. end
  371.  
  372. ----------------------------------------------------------------------------
  373.  
  374. function computeDirection(vec)
  375. local lenSquared = vec.magnitude * vec.magnitude
  376. local invSqrt = 1 / math.sqrt(lenSquared)
  377. return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
  378. end
  379.  
  380. ----------------------------------------------------------------------------
  381.  
  382. local shaking = 0
  383. function shake(num) if num > shaking then shaking = num end end
  384. game:GetService("RunService").RenderStepped:connect(function()
  385. hum.CameraOffset = Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1))*(shaking/100)
  386. if shaking > 0 then shaking = shaking - 1 else shaking = 0 end
  387. end)
  388.  
  389. plr = game:GetService("Players").LocalPlayer
  390. DebrisModel = Instance.new("Model",plr.Character)
  391. DebrisModel.Name = "DebrisModel"
  392.  
  393. function Effect(mesh,size,transparency,material,color,position,rotation,positionchange,sizechange,rotationchange,transparencychange,acceleration)
  394.  
  395. local part = Instance.new("Part",DebrisModel)
  396. part.Anchored = true
  397. part.CanCollide = false
  398. part.Size = Vector3.new(1,1,1)
  399. part.Transparency = transparency
  400. part.Material = material
  401. part.Color = color
  402. part.CFrame = CFrame.new(position)*CFrame.Angles(math.rad(rotation.X),math.rad(rotation.Y),math.rad(rotation.Z))
  403.  
  404. local partmesh = Instance.new("SpecialMesh",part)
  405. if tonumber(mesh) == nil then partmesh.MeshType = mesh else partmesh.MeshId = "rbxassetid://"..mesh end
  406. partmesh.Scale = size
  407.  
  408. local pvalue = Instance.new("Vector3Value",part)
  409. pvalue.Name = "Position"
  410. pvalue.Value = positionchange
  411.  
  412. local svalue = Instance.new("Vector3Value",part)
  413. svalue.Name = "Size"
  414. svalue.Value = sizechange
  415.  
  416. local rvalue = Instance.new("Vector3Value",part)
  417. rvalue.Name = "Rotation"
  418. rvalue.Value = rotationchange
  419.  
  420. local tvalue = Instance.new("NumberValue",part)
  421. tvalue.Name = "Transparency"
  422. tvalue.Value = transparencychange
  423.  
  424. local avalue = Instance.new("NumberValue",part)
  425. avalue.Name = "Acceleration"
  426. avalue.Value = acceleration
  427.  
  428. part.Name = "EFFECT"
  429.  
  430. return part
  431.  
  432. end
  433.  
  434. game:GetService("RunService").RenderStepped:connect(function()
  435. coroutine.resume(coroutine.create(function()
  436.  
  437. for i, v in pairs(DebrisModel:GetChildren()) do
  438. if v:isA("BasePart") then
  439. v.LocalTransparencyModifier = 0
  440. end
  441. end
  442.  
  443. if not plr.Character:FindFirstChild("DebrisModel") then
  444. DebrisModel = Instance.new("Model",plr.Character)
  445. DebrisModel.Name = "DebrisModel"
  446. end
  447.  
  448. for i,v in pairs(DebrisModel:GetChildren()) do
  449. if v:IsA("BasePart") and v.Name == "EFFECT" then
  450. local pvalue = v:FindFirstChild("Position").Value
  451. local svalue = v:FindFirstChild("Size").Value
  452. local rvalue = v:FindFirstChild("Rotation").Value
  453. local tvalue = v:FindFirstChild("Transparency").Value
  454. local avalue = v:FindFirstChild("Acceleration").Value
  455. local mesh = v:FindFirstChild("Mesh")
  456. mesh.Scale = mesh.Scale + svalue
  457. v:FindFirstChild("Size").Value = v:FindFirstChild("Size").Value + (Vector3.new(1,1,1)*avalue)
  458. v.Transparency = v.Transparency + tvalue
  459. v.CFrame = CFrame.new(pvalue)*v.CFrame*CFrame.Angles(math.rad(rvalue.X),math.rad(rvalue.Y),math.rad(rvalue.Z))
  460. if v.Transparency >= 1 or mesh.Scale.X < 0 or mesh.Scale.Y < 0 or mesh.Scale.Z < 0 then
  461. v:Destroy()
  462. end
  463. end
  464. end
  465.  
  466. end))
  467. end)
  468.  
  469. local wsback = 0
  470. local frozen = false
  471. function freeze()
  472. if frozen == false then
  473. frozen = true
  474. wsback = hum.WalkSpeed
  475. hum.WalkSpeed = 1
  476. else
  477. frozen = false
  478. hum.WalkSpeed = wsback
  479. end
  480. end
  481. hum.WalkSpeed = 25
  482.  
  483. function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans)
  484. local magz = (Part0 - Part1).magnitude
  485. local curpos = Part0
  486. local trz = {-Offset,Offset}
  487. for i=1,Times do
  488. local li = Instance.new("Part", DebrisModel)
  489. li.TopSurface =0
  490. li.Material = Enum.Material.Neon
  491. li.BottomSurface = 0
  492. li.Anchored = true
  493. li.Locked = true
  494. li.Transparency = Trans or 0.4
  495. li.Color = Color
  496. li.formFactor = "Custom"
  497. li.CanCollide = false
  498. li.Size = Vector3.new(Thickness,Thickness,magz/Times)
  499. local lim = Instance.new("BlockMesh",li)
  500. local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  501. local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet
  502. if Times == i then
  503. local magz2 = (curpos - Part1).magnitude
  504. li.Size = Vector3.new(Thickness,Thickness,magz2)
  505. li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2)
  506. else
  507. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  508. end
  509. curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p
  510. li.Name = "LIGHTNING"
  511. end
  512. end
  513.  
  514. ----------------------------------------------------------------------------
  515. skin_color = BrickColor.new("Light orange")
  516. --p:ClearCharacterAppearance()
  517. --hed:WaitForChild("face"):Destroy()
  518. hed:WaitForChild("face").Texture = "rbxassetid://407320095"
  519. ----------------------------------------------------------------------------
  520. local size = 1
  521.  
  522. newWeld(torso, larm, -1.5, 0.5, 0)
  523. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  524. newWeld(torso, rarm, 1.5, 0.5, 0)
  525. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  526. newWeld(torso, hed, 0, 1.5, 0)
  527. newWeld(torso, lleg, -0.5, -1, 0)
  528. lleg.Weld.C1 = CFrame.new(0, 1, 0)
  529. newWeld(torso, rleg, 0.5, -1, 0)
  530. rleg.Weld.C1 = CFrame.new(0, 1, 0)
  531. newWeld(root, torso, 0, -1, 0)
  532. torso.Weld.C1 = CFrame.new(0, -1, 0)
  533.  
  534. emitters={}
  535.  
  536. ----------------------------------------------------------------------------------------
  537. music(171625182)
  538. velocityYFall=0
  539. velocityYFall2=0
  540. velocityYFall3=0
  541. velocityYFall4=0
  542. neckrotY=0
  543. neckrotY2=0
  544. torsorotY=0
  545. torsorotY2=0
  546. torsoY=0
  547. torsoY2=0
  548. colored = 0
  549. sine = 0
  550. change=0.4
  551. movement=10
  552. timeranim=0
  553. running = false
  554. jumped = false
  555. icolor=1
  556. imode=false
  557.  
  558. didjump = false
  559. jumppower = 0
  560. debounceimpact = false
  561.  
  562. function jumpimpact()
  563. if debounceimpact == false then
  564. debounceimpact = true
  565. if jumppower < -150 then jumppower = -150 end
  566. shake(-jumppower/5)
  567. for i=1,-jumppower/20 do rs:wait()
  568. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0), 0.05)
  569. 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)
  570. end
  571. debounceimpact = false
  572. end
  573. end
  574.  
  575. max = 0
  576.  
  577. rs:connect(function()
  578.  
  579. for i,v in pairs(DebrisModel:GetChildren()) do
  580. if v.Name == "LIGHTNING" then
  581. local vm = v:FindFirstChildOfClass("BlockMesh")
  582. vm.Scale = vm.Scale - Vector3.new(0.1,0.1,0)
  583. if vm.Scale.X <= 0 then
  584. v:Destroy()
  585. end
  586. end
  587. end
  588.  
  589. if p.Character.Parent == nil then
  590. local model = Instance.new("Model")
  591. model.Name = p.Name
  592. p.Character = model
  593. for i,v in pairs(char:GetChildren()) do
  594. v.Parent = p.Character
  595. end
  596. end
  597.  
  598. char = p.Character
  599. if p.Character.Parent ~= workspace then
  600. p.Character.Parent = workspace
  601. end
  602. for i,v in pairs(char:GetChildren()) do
  603. if v:IsA("Accoutrement") then
  604. if v.Handle:FindFirstChild("Mesh") then
  605. v.Handle:FindFirstChild("Mesh").Offset = Vector3.new()
  606. v.Handle.Transparency = 0
  607. end
  608. elseif v:IsA("BasePart") then
  609. v.Anchored = false
  610. if v:FindFirstChildOfClass("BodyPosition") then
  611. v:FindFirstChildOfClass("BodyPosition"):Destroy()
  612. end
  613. if v:FindFirstChildOfClass("BodyVelocity") then
  614. v:FindFirstChildOfClass("BodyVelocity"):Destroy()
  615. end
  616. if v:FindFirstChildOfClass("BodyGyro") and v:FindFirstChildOfClass("BodyGyro").Name ~= "lolnochara" then
  617. v:FindFirstChildOfClass("BodyGyro"):Destroy()
  618. end
  619. if v:FindFirstChild("Mesh") then
  620. v:FindFirstChild("Mesh").Offset = Vector3.new()
  621. end
  622. if not DebrisModel:FindFirstChild(v.Name.."FORCEFIELD") then
  623. local force = Instance.new("Part",DebrisModel)
  624. force.Name = v.Name.."FORCEFIELD"
  625. if v ~= hed then
  626. force.Size = v.Size+(Vector3.new(1,1,1)*0.2)
  627. else
  628. force.Size = (Vector3.new(1,1,1)*v.Size.Y)+(Vector3.new(1,1,1)*0.2)
  629. end
  630. force.CanCollide = false
  631. force.Transparency = 1
  632. force.Color = Color3.new(0,1,1)
  633. force.Material = Enum.Material.Neon
  634. newWeld(v,force,0,0,0)
  635. else
  636. if not DebrisModel:FindFirstChild(v.Name.."FORCEFIELD"):FindFirstChildOfClass("Weld") then
  637. newWeld(v,DebrisModel:FindFirstChild(v.Name.."FORCEFIELD"),0,0,0)
  638. end
  639. end
  640. if v.Name ~= "HumanoidRootPart" then
  641. v.Transparency = 0
  642. else
  643. v.Transparency = 1
  644. end
  645. end
  646. end
  647.  
  648. if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 150 then
  649. velocityYFall = root.Velocity.Y/1.5
  650. else
  651. if -root.Velocity.Y/1.5 < -5 then
  652. velocityYFall = 5
  653. elseif -root.Velocity.Y/1.5 > 150 then
  654. velocityYFall = -150
  655. end
  656. end
  657.  
  658. if -root.Velocity.Y/180 > 0 and -root.Velocity.Y/180 < 1.2 then
  659. velocityYFall2 = root.Velocity.Y/180
  660. else
  661. if -root.Velocity.Y/180 < 0 then
  662. velocityYFall2 = 0
  663. elseif -root.Velocity.Y/180 > 1.2 then
  664. velocityYFall2 = -1.2
  665. end
  666. end
  667.  
  668. if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 50 then
  669. velocityYFall3 = root.Velocity.Y/1.5
  670. else
  671. if -root.Velocity.Y/1.5 < -5 then
  672. velocityYFall3 = 5
  673. elseif -root.Velocity.Y/1.5 > 50 then
  674. velocityYFall3 = -50
  675. end
  676. end
  677.  
  678. if -root.Velocity.Y/1.5 > -50 and -root.Velocity.Y/1.5 < 20 then
  679. velocityYFall4 = root.Velocity.Y/1.5
  680. else
  681. if -root.Velocity.Y/180 < -5 then
  682. velocityYFall4 = 5
  683. elseif -root.Velocity.Y/180 > 50 then
  684. velocityYFall4 = -50
  685. end
  686. end
  687.  
  688. if root.RotVelocity.Y/6 < 1 and root.RotVelocity.Y/6 > -1 then
  689. neckrotY = root.RotVelocity.Y/6
  690. else
  691. if root.RotVelocity.Y/6 < -1 then
  692. neckrotY = -1
  693. elseif root.RotVelocity.Y/6 > 1 then
  694. neckrotY = 1
  695. end
  696. end
  697.  
  698. if root.RotVelocity.Y/8 < 0.6 and root.RotVelocity.Y/8 > -0.6 then
  699. neckrotY2 = root.RotVelocity.Y/8
  700. else
  701. if root.RotVelocity.Y/8 < -0.6 then
  702. neckrotY2 = -0.6
  703. elseif root.RotVelocity.Y/8 > 0.6 then
  704. neckrotY2 = 0.6
  705. end
  706. end
  707.  
  708. if root.RotVelocity.Y/6 < 0.2 and root.RotVelocity.Y/6 > -0.2 then
  709. torsorotY = root.RotVelocity.Y/6
  710. else
  711. if root.RotVelocity.Y/6 < -0.2 then
  712. torsorotY = -0.2
  713. elseif root.RotVelocity.Y/6 > 0.2 then
  714. torsorotY = 0.2
  715. end
  716. end
  717.  
  718. if root.RotVelocity.Y/8 < 0.2 and root.RotVelocity.Y/8 > -0.2 then
  719. torsorotY2 = root.RotVelocity.Y/8
  720. else
  721. if root.RotVelocity.Y/8 < -0.2 then
  722. torsorotY2 = -0.2
  723. elseif root.RotVelocity.Y/8 > 0.2 then
  724. torsorotY2 = 0.2
  725. end
  726. end
  727.  
  728. torsoY = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/20
  729. torsoY2 = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/36
  730.  
  731. local ray1 = Ray.new(root.Position+Vector3.new(size,0,0),Vector3.new(0, -4, 0))
  732. local part1, endPoint = workspace:FindPartOnRay(ray1, char)
  733.  
  734. local ray2 = Ray.new(root.Position-Vector3.new(size,0,0),Vector3.new(0, -4, 0))
  735. local part2, endPoint = workspace:FindPartOnRay(ray2, char)
  736.  
  737. local ray3 = Ray.new(root.Position+Vector3.new(0,0,size/2),Vector3.new(0, -4, 0))
  738. local part3, endPoint = workspace:FindPartOnRay(ray3, char)
  739.  
  740. local ray4 = Ray.new(root.Position-Vector3.new(0,0,size/2),Vector3.new(0, -4, 0))
  741. local part4, endPoint = workspace:FindPartOnRay(ray4, char)
  742.  
  743. local ray5 = Ray.new(root.Position+Vector3.new(size,0,size/2),Vector3.new(0, -4, 0))
  744. local part5, endPoint = workspace:FindPartOnRay(ray5, char)
  745.  
  746. local ray6 = Ray.new(root.Position-Vector3.new(size,0,size/2),Vector3.new(0, -4, 0))
  747. local part6, endPoint = workspace:FindPartOnRay(ray6, char)
  748.  
  749. local ray7 = Ray.new(root.Position+Vector3.new(size,0,-size/2),Vector3.new(0, -4, 0))
  750. local part7, endPoint = workspace:FindPartOnRay(ray7, char)
  751.  
  752. local ray8 = Ray.new(root.Position-Vector3.new(size,0,-size/2),Vector3.new(0, -4, 0))
  753. local part8, endPoint = workspace:FindPartOnRay(ray8, char)
  754.  
  755. local ray = Ray.new(root.Position,Vector3.new(0, -6, 0))
  756. local part, endPoint = workspace:FindPartOnRay(ray, char)
  757.  
  758. 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
  759.  
  760. local rlegray = Ray.new(rleg.Position+Vector3.new(0,size/2,0),Vector3.new(0, -1.75, 0))
  761. local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char)
  762.  
  763. local llegray = Ray.new(lleg.Position+Vector3.new(0,size/2,0),Vector3.new(0, -1.75, 0))
  764. local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char)
  765.  
  766. if hum.Health > 0 and noidle == false then
  767. if hum.Sit == false then
  768. if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude >= 5 and jumped == false then
  769. 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)
  770. 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)
  771. 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)
  772. 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)
  773. 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)
  774. 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)
  775. 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)
  776. elseif jumped == true then
  777. didjump = true
  778. jumppower = root.Velocity.Y
  779. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1) * CFrame.Angles(0,0,0), 0.4)
  780. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0), 0.1)
  781. 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)
  782. 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)
  783. 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)))
  784. 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)
  785. 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)
  786. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 5 then
  787. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1), 0.4)
  788. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(0+50*math.sin(sine/4)),0,0), 0.1)
  789. 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)
  790. 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)
  791. 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)
  792. 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)
  793. 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)
  794. end
  795.  
  796. else
  797. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1), 0.4)
  798. 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)
  799. 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)
  800. 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)
  801. 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)
  802. 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)
  803. 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)
  804. end
  805.  
  806. end
  807. if didjump == true and jumped == false and jumppower < 0 then
  808. didjump = false
  809. jumpimpact()
  810. end
  811.  
  812. sine = sine + change
  813. hum.Health = math.huge
  814. hum.MaxHealth = math.huge
  815. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement