Hugo1234cool

Untitled

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