SHARE
TWEET

Test

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