Advertisement
idkwhatiam

dancing boi

May 6th, 2019
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 23.90 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
  2. do
  3.     script.Parent = owner.Character
  4.     local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  5.     local function NewFakeEvent()
  6.         local Bind = Instance.new("BindableEvent")
  7.         local Fake;Fake = {Connections = {},
  8.         fakeEvent=true;
  9.         Connect=function(self,Func)
  10.             Bind.Event:connect(Func)
  11.             self.Connections[Bind] = true
  12.             return setmetatable({Connected = true},{
  13.             __index = function (self,Index)
  14.                 if Index:lower() == "disconnect" then
  15.                     return function() Fake.Connections[Bind] = false;self.Connected = false end
  16.                 end
  17.                 return Fake[Index]
  18.             end;
  19.             __tostring = function() return "Connection" end;
  20.         })
  21.         end}
  22.         Fake.connect = Fake.Connect;return Fake;
  23.     end
  24.     local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  25.     local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  26.     local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  27.         self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  28.     end};ContextActionService.UnBindAction = ContextActionService.BindAction
  29.     local function TriggerEvent(self,Event,...)
  30.         local Trigger = Mouse[Event]
  31.         if Trigger and Trigger.fakeEvent and Trigger.Connections then
  32.             for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  33.         end
  34.     end
  35.     Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  36.     Event.OnServerEvent:Connect(function(FiredBy,Input)
  37.         if FiredBy.Name ~= owner.Name then return end
  38.         if Input.MouseEvent then
  39.             Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  40.         else
  41.             local Begin = Input.UserInputState == Enum.UserInputState.Begin
  42.             if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  43.             for _,Action in pairs(ContextActionService.Actions) do
  44.                 for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  45.             end
  46.             Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  47.             UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  48.         end
  49.     end)
  50.     InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  51.     Event.Parent = NLS([[
  52.         local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  53.         local Input = function(Input,gameProcessedEvent)
  54.             if gameProcessedEvent then return end
  55.             Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  56.         end
  57.         UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  58.         local Hit,Target
  59.         while wait(1/30) do
  60.             if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  61.                 Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  62.             end
  63.         end
  64.     ]],owner.Character)
  65. end
  66. RealGame = game;game = setmetatable({},{
  67.     __index = function (self,Index)
  68.         local Sandbox = function (Thing)
  69.             if Thing:IsA("Player") then
  70.                 local RealPlayer = Thing
  71.                 return setmetatable({},{
  72.                     __index = function (self,Index)
  73.                         local Type = type(RealPlayer[Index])
  74.                         if Type == "function" then
  75.                             if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  76.                                 return function (self)return InternalData["Mouse"] end
  77.                             end
  78.                             return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  79.                         end
  80.                         return RealPlayer[Index]
  81.                     end;
  82.                     __tostring = function(self) return RealPlayer.Name end
  83.                 })
  84.             end
  85.         end
  86.         if RealGame[Index] then
  87.             local Type = type(RealGame[Index])
  88.             if Type == "function" then
  89.                 if Index:lower() == "getservice" or Index:lower() == "service" then
  90.                     return function (self,Service)
  91.                         local FakeServices = {
  92.                             ["players"] = function()
  93.                                 return setmetatable({},{
  94.                                     __index = function (self2,Index2)
  95.                                         local RealService = RealGame:GetService(Service)
  96.                                         local Type2 = type(Index2)
  97.                                         if Type2 == "function" then
  98.                                             return function (self,...) return RealService[Index2](RealService,...)end
  99.                                         else
  100.                                             if Index2:lower() == "localplayer" then return Sandbox(owner) end
  101.                                             return RealService[Index2]
  102.                                         end
  103.                                     end;
  104.                                     __tostring = function(self) return RealGame:GetService(Service).Name end
  105.                                 })
  106.                             end;
  107.                             ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  108.                             ["userinputservice"] = function() return InternalData["UserInputService"] end;
  109.                             ["runservice"] = function()
  110.                                 return setmetatable({},{
  111.                                     __index = function(self2,Index2)
  112.                                         local RealService = RealGame:GetService(Service)
  113.                                         local Type2 = type(Index2)
  114.                                         if Type2 == "function" then
  115.                                             return function (self,...) return RealService[Index2](RealService,...) end
  116.                                         else
  117.                                             local RunServices = {
  118.                                                 ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  119.                                                 ["renderstepped"] = function() return RealService["Stepped"] end
  120.                                             }
  121.                                             if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  122.                                             return RealService[Index2]
  123.                                         end
  124.                                     end
  125.                                 })
  126.                             end
  127.                         }
  128.                         if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  129.                         return RealGame:GetService(Service)
  130.                     end
  131.                 end
  132.                 return function (self,...) return RealGame[Index](RealGame,...) end
  133.             else
  134.                 if game:GetService(Index) then return game:GetService(Index) end
  135.                 return RealGame[Index]
  136.             end
  137.         end
  138.         return nil
  139.     end
  140.         });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  141.  
  142.  
  143. --dancing boi--
  144.  
  145. Player=game.Players.LocalPlayer
  146. Character=Player.Character
  147. Character.Humanoid.Name = "noneofurbusiness"
  148. hum = Character.noneofurbusiness
  149. LeftArm=Character["Left Arm"]
  150. LeftLeg=Character["Left Leg"]
  151. RightArm=Character["Right Arm"]
  152. RightLeg=Character["Right Leg"]
  153. Root=Character["HumanoidRootPart"]
  154. Head=Character["Head"]
  155. Torso=Character["Torso"]
  156. Neck=Torso["Neck"]
  157. mouse = Player:GetMouse()
  158. walking = false
  159. jumping = false
  160. attacking = false
  161. firsttime = false
  162. tauntdebounce = false
  163. position = nil
  164. MseGuide = true
  165. running = false
  166. settime = 0
  167. sine = 0
  168. t = 0
  169. ws = 14
  170. change = 1
  171. combo1 = true
  172. dancing = false
  173. equip = false
  174. dgs = 75
  175. combo2 = false
  176. switch1 = true
  177. switch2 = false
  178. firsttime2 = false
  179. combo3 = false
  180. gunallowance = false
  181. shooting = false
  182. RunSrv = game:GetService("RunService")
  183. RenderStepped = game:GetService("RunService").RenderStepped
  184. removeuseless = game:GetService("Debris")
  185.  
  186. screenGui = Instance.new("ScreenGui")
  187. screenGui.Parent = script.Parent
  188.  
  189. local HEADLERP = Instance.new("ManualWeld")
  190. HEADLERP.Parent = Head
  191. HEADLERP.Part0 = Head
  192. HEADLERP.Part1 = Head
  193. HEADLERP.C0 = CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  194.  
  195. local TORSOLERP = Instance.new("ManualWeld")
  196. TORSOLERP.Parent = Root
  197. TORSOLERP.Part0 = Torso
  198. TORSOLERP.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  199.  
  200. local ROOTLERP = Instance.new("ManualWeld")
  201. ROOTLERP.Parent = Root
  202. ROOTLERP.Part0 = Root
  203. ROOTLERP.Part1 = Torso
  204. ROOTLERP.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  205.  
  206. local RIGHTARMLERP = Instance.new("ManualWeld")
  207. RIGHTARMLERP.Parent = RightArm
  208. RIGHTARMLERP.Part0 = RightArm
  209. RIGHTARMLERP.Part1 = Torso
  210. RIGHTARMLERP.C0 = CFrame.new(-1.5, 0, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  211.  
  212. local LEFTARMLERP = Instance.new("ManualWeld")
  213. LEFTARMLERP.Parent = LeftArm
  214. LEFTARMLERP.Part0 = LeftArm
  215. LEFTARMLERP.Part1 = Torso
  216. LEFTARMLERP.C0 = CFrame.new(1.5, 0, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  217.  
  218. local RIGHTLEGLERP = Instance.new("ManualWeld")
  219. RIGHTLEGLERP.Parent = RightLeg
  220. RIGHTLEGLERP.Part0 = RightLeg
  221. RIGHTLEGLERP.Part1 = Torso
  222. RIGHTLEGLERP.C0 = CFrame.new(-0.5, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  223.  
  224. local LEFTLEGLERP = Instance.new("ManualWeld")
  225. LEFTLEGLERP.Parent = LeftLeg
  226. LEFTLEGLERP.Part0 = LeftLeg
  227. LEFTLEGLERP.Part1 = Torso
  228. LEFTLEGLERP.C0 = CFrame.new(0.5, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  229.  
  230. local function weldBetween(a, b)
  231.     local weld = Instance.new("ManualWeld", a)
  232.     weld.Part0 = a
  233.     weld.Part1 = b
  234.     weld.C0 = a.CFrame:inverse() * b.CFrame
  235.     return weld
  236. end
  237.  
  238. function MAKETRAIL(PARENT,POSITION1,POSITION2,LIFETIME,COLOR)
  239. A = Instance.new("Attachment", PARENT)
  240. A.Position = POSITION1
  241. A.Name = "A"
  242. B = Instance.new("Attachment", PARENT)
  243. B.Position = POSITION2
  244. B.Name = "B"
  245. tr1 = Instance.new("Trail", PARENT)
  246. tr1.Attachment0 = A
  247. tr1.Attachment1 = B
  248. tr1.Enabled = true
  249. tr1.Lifetime = LIFETIME
  250. tr1.TextureMode = "Static"
  251. tr1.LightInfluence = 0
  252. tr1.Color = COLOR
  253. tr1.Transparency = NumberSequence.new(0, 1)
  254. end
  255.  
  256. godmode = coroutine.wrap(function()
  257. for i,v in pairs(Character:GetChildren()) do
  258. if v:IsA("BasePart") and v ~= Root then
  259. v.Anchored = false
  260. end
  261. end
  262. while true do
  263. hum.MaxHealth = math.huge
  264. wait(0.0000001)
  265. hum.Health = math.huge
  266. wait()
  267. end
  268. end)
  269. godmode()
  270. ff = Instance.new("ForceField", Character)
  271. ff.Visible = false
  272.  
  273. coroutine.wrap(function()
  274. for i,v in pairs(Character:GetChildren()) do
  275. if v.Name == "Animate" then v:Remove()
  276. end
  277. end
  278. end)()
  279.  
  280. function damagealll(Radius,Position)       
  281.     local Returning = {}       
  282.     for _,v in pairs(workspace:GetChildren()) do       
  283.         if v~=Character and v:FindFirstChildOfClass('Humanoid') and v:FindFirstChild('Torso') or v:FindFirstChild('UpperTorso') then
  284. if v:FindFirstChild("Torso") then      
  285.             local Mag = (v.Torso.Position - Position).magnitude    
  286.             if Mag < Radius then       
  287.                 table.insert(Returning,v)      
  288.             end
  289. elseif v:FindFirstChild("UpperTorso") then 
  290.             local Mag = (v.UpperTorso.Position - Position).magnitude       
  291.             if Mag < Radius then       
  292.                 table.insert(Returning,v)      
  293.             end
  294. end
  295.         end    
  296.     end    
  297.     return Returning       
  298. end
  299.  
  300. ArtificialHB = Instance.new("BindableEvent", script)
  301. ArtificialHB.Name = "Heartbeat"
  302. script:WaitForChild("Heartbeat")
  303.  
  304. frame = 1 / 60
  305. tf = 0
  306. allowframeloss = false
  307. tossremainder = false
  308.  
  309.  
  310. lastframe = tick()
  311. script.Heartbeat:Fire()
  312.  
  313.  
  314. game:GetService("RunService").Heartbeat:connect(function(s, p)
  315.     tf = tf + s
  316.     if tf >= frame then
  317.         if allowframeloss then
  318.             script.Heartbeat:Fire()
  319.             lastframe = tick()
  320.         else
  321.             for i = 1, math.floor(tf / frame) do
  322.                 script.Heartbeat:Fire()
  323.             end
  324.             lastframe = tick()
  325.         end
  326.         if tossremainder then
  327.             tf = 0
  328.         else
  329.             tf = tf - frame * math.floor(tf / frame)
  330.         end
  331.     end
  332. end)
  333.  
  334. function swait(num)
  335.     if num == 0 or num == nil then
  336.         game:service("RunService").Stepped:wait(0)
  337.     else
  338.         for i = 0, num do
  339.             game:service("RunService").Stepped:wait(0)
  340.         end
  341.     end
  342. end
  343.  
  344. ws = 14
  345.  
  346. function SOUND(PARENT,ID,VOL,LOOP,REMOVE)
  347. so = Instance.new("Sound")
  348. so.Parent = PARENT
  349. so.SoundId = "rbxassetid://"..ID
  350. so.Volume = VOL
  351. so.Looped = LOOP
  352.  
  353. so:Play()
  354. removeuseless:AddItem(so,REMOVE)
  355. end
  356.  
  357. mouse.KeyDown:connect(function(Press)
  358. Press=Press:lower()
  359. if Press=='e' then
  360. if dancing then
  361. dancing = false
  362. else
  363. dancing = true
  364. ws = 0
  365. change = .5
  366. attacking = true
  367. deadmau7 = Instance.new("Sound",Torso)
  368. deadmau7.SoundId = "rbxassetid://984792911"
  369. deadmau7.Volume = 8
  370. deadmau7.Looped = true
  371. deadmau7:Play()
  372. light = Instance.new("PointLight")
  373. light.Parent = Torso
  374. light.Enabled = true
  375. coroutine.wrap(function()
  376. coroutine.wrap(function()
  377. while dancing do
  378. ROOTLERP.C0 = ROOTLERP.C0:Lerp(CFrame.new(2 * math.sin(sine/9),-.4 + .1 * math.sin(sine/3),0) * CFrame.Angles(math.rad(0),math.rad(20 * math.sin(sine/9)),0),.25)
  379. swait()
  380. end
  381. end)()
  382. while dancing do
  383. for i = 1, 28 do
  384. if not dancing then break end
  385. light.Color = Color3.new(255, 0, 0)
  386. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-.9,.65 + .4 * math.sin(sine/12),1.2) * CFrame.Angles(math.rad(35 - 70 * math.sin(sine/12)),math.rad(50 + 3 * math.sin(sine/12)),math.rad(3 - 1 * math.sin(sine/12))),.2)
  387. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.2,0,0) * CFrame.Angles(math.rad(35 - 70 * math.sin(sine/3)),math.rad(7 * math.sin(sine/3)),math.rad(7*math.sin(sine/3))), 0.2)
  388. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, .7,1) * CFrame.Angles(math.rad(0 + 0 * math.sin(sine/2)), math.rad(0), math.rad(0)), 0)
  389. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.31, 2.05,-.1) * CFrame.Angles(math.rad(0 + 0), math.rad(0), math.rad(0)), 0)
  390. swait()
  391. end
  392. for i = 1, 28 do
  393. if not dancing then break end
  394. light.Color = Color3.new(0, 255, 0)
  395. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-.9,.65 + .4 * math.sin(sine/12),1.2) * CFrame.Angles(math.rad(-75 - 175 * math.sin(sine/12)),math.rad(50 + 3 * math.sin(sine/12)),math.rad(3 - 100 * math.sin(sine/12))),.2)
  396. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.2,1.5,0) * CFrame.Angles(math.rad(180 - 500 * math.sin(sine/3)),math.rad(7 * math.sin(sine/3)),math.rad(7*math.sin(sine/3))), 0.2)
  397. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.31, 2.05,.1) * CFrame.Angles(math.rad(-10), math.rad(0), math.rad(75 - 175)), 0.25)
  398. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, .7,1.1) * CFrame.Angles(math.rad(75 - 175 * math.sin(sine/2)), math.rad(75 - 175), math.rad(-2)), 0.25)
  399. swait()
  400. end
  401. swait()
  402. end
  403. ws = 14
  404. deadmau7:Remove()
  405. light:Remove()
  406. attacking = false
  407. end)()
  408. end
  409. end
  410. end)
  411.  
  412. function ray(pos, dir, rang, ignoredesc)
  413.     return workspace:FindPartOnRay(Ray.new(pos, dir.unit * rang), ignoredesc)
  414. end
  415.  
  416. function ray2(startpos, endpos, distance, ignore)
  417. local dir = CFrame.new(startpos,endpos).lookVector
  418. return ray(startpos, dir, distance, ignore)
  419. end
  420.  
  421. checks1 = coroutine.wrap(function() -------Checks
  422. while true do
  423. hf = ray(Root.Position,(CFrame.new(Root.Position,Root.Position+Vector3.new(0,-1,0))).lookVector,3*3,Character)
  424. if Root.Velocity.y > 1 then
  425. position = "Jump"
  426. elseif Root.Velocity.y < -1 then
  427. position = "Falling"
  428. elseif Root.Velocity.Magnitude < 2 then
  429. position = "Idle"
  430. elseif Root.Velocity.Magnitude > 2 then
  431. position = "Walking"
  432. elseif Root.Velocity.Magnitude > 20 then
  433. position = "Running"
  434. else
  435. end
  436. wait()
  437. end
  438. end)
  439. checks1()
  440.  
  441. function ray(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  442.     return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  443. end
  444.  
  445. function ray2(StartPos, EndPos, Distance, Ignore)
  446. local DIRECTION = CFrame.new(StartPos,EndPos).lookVector
  447. return ray(StartPos, DIRECTION, Distance, Ignore)
  448. end
  449.  
  450. OrgnC0 = Neck.C0
  451. local movelimbs = coroutine.wrap(function()
  452. while RunSrv.RenderStepped:wait() do
  453. TrsoLV = Torso.CFrame.lookVector
  454. Dist = nil
  455. Diff = nil
  456. if not MseGuide then
  457. print("Failed to recognize")
  458. else
  459. local _, Point = Workspace:FindPartOnRay(Ray.new(Head.CFrame.p, mouse.Hit.lookVector), Workspace, false, true)
  460. Dist = (Head.CFrame.p-Point).magnitude
  461. Diff = Head.CFrame.Y-Point.Y
  462. local _, Point2 = Workspace:FindPartOnRay(Ray.new(LeftArm.CFrame.p, mouse.Hit.lookVector), Workspace, false, true)
  463. Dist2 = (LeftArm.CFrame.p-Point).magnitude
  464. Diff2 = LeftArm.CFrame.Y-Point.Y
  465. HEADLERP.C0 = CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  466. Neck.C0 = Neck.C0:lerp(OrgnC0*CFrame.Angles((math.tan(Diff/Dist)*1), 0, (((Head.CFrame.p-Point).Unit):Cross(Torso.CFrame.lookVector)).Y*1), .1)
  467. end
  468. end
  469. end)
  470. movelimbs()
  471. immortal = {}
  472. for i,v in pairs(Character:GetDescendants()) do
  473.     if v:IsA("BasePart") and v.Name ~= "lmagic" and v.Name ~= "rmagic" then
  474.         if v ~= Root and v ~= Torso and v ~= Head and v ~= RightArm and v ~= LeftArm and v ~= RightLeg and v.Name ~= "lmagic" and v.Name ~= "rmagic" and v ~= LeftLeg then
  475.             v.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  476.         end
  477.         table.insert(immortal,{v,v.Parent,v.Material,v.Color,v.Transparency})
  478.     elseif v:IsA("JointInstance") then
  479.         table.insert(immortal,{v,v.Parent,nil,nil,nil})
  480.     end
  481. end
  482. for e = 1, #immortal do
  483.     if immortal[e] ~= nil then
  484.         local STUFF = immortal[e]
  485.         local PART = STUFF[1]
  486.         local PARENT = STUFF[2]
  487.         local MATERIAL = STUFF[3]
  488.         local COLOR = STUFF[4]
  489.         local TRANSPARENCY = STUFF[5]
  490. if levitate then
  491.         if PART.ClassName == "Part" and PART ~= Root and PART.Name ~= eyo1 and PART.Name ~= eyo2 and PART.Name ~= "lmagic" and PART.Name ~= "rmagic" then
  492.             PART.Material = MATERIAL
  493.             PART.Color = COLOR
  494.             PART.Transparency = TRANSPARENCY
  495.         end
  496.         PART.AncestryChanged:connect(function()
  497.             PART.Parent = PARENT
  498.         end)
  499. else
  500.         if PART.ClassName == "Part" and PART ~= Root and PART.Name ~= "lmagic" and PART.Name ~= "rmagic" then
  501.             PART.Material = MATERIAL
  502.             PART.Color = COLOR
  503.             PART.Transparency = TRANSPARENCY
  504.         end
  505.         PART.AncestryChanged:connect(function()
  506.             PART.Parent = PARENT
  507.         end)
  508. end
  509.     end
  510. end
  511. function immortality()
  512.     for e = 1, #immortal do
  513.         if immortal[e] ~= nil then
  514.             local STUFF = immortal[e]
  515.             local PART = STUFF[1]
  516.             local PARENT = STUFF[2]
  517.             local MATERIAL = STUFF[3]
  518.             local COLOR = STUFF[4]
  519.             local TRANSPARENCY = STUFF[5]
  520.             if PART.ClassName == "Part" and PART == Root then
  521.                 PART.Material = MATERIAL
  522.                 PART.Color = COLOR
  523.                 PART.Transparency = TRANSPARENCY
  524.             end
  525.             if PART.Parent ~= PARENT then
  526.                 hum:Remove()
  527.                 PART.Parent = PARENT
  528.                 hum = Instance.new("Humanoid",Character)
  529.                                 hum.Name = "noneofurbusiness"
  530.             end
  531.         end
  532.     end
  533. end
  534. coroutine.wrap(function()
  535. while true do
  536. if hum.Health < .1 then
  537. deadsound = Instance.new("Sound", Torso)
  538. deadsound.Volume = 6
  539. deadsound.SoundId = "rbxassetid://1411352723"
  540. deadsound:Play()
  541. immortality()
  542. end
  543. wait()
  544. end
  545. end)()
  546.  
  547. local anims = coroutine.wrap(function()
  548. while true do
  549. settime = 0.05
  550. sine = sine + change
  551. if position == "Jump" and attacking == false then
  552. change = 1
  553. spin = false
  554. for i,v in pairs(Torso:GetChildren()) do if v:IsA("Sound") then v:Remove() end end
  555. LEFTLEGLERP.C1 = LEFTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.1)
  556. RIGHTLEGLERP.C1 = RIGHTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),0,0),.1)
  557. LEFTARMLERP.C1 = LEFTARMLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.4)
  558. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  559. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.4,.1,-.2) * CFrame.Angles(math.rad(20),math.rad(-3),math.rad(-4)), 0.2)
  560. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 2, 0) * CFrame.Angles(math.rad(10), math.rad(0), math.rad(0)), 0.2)
  561. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 1.0, .9) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), 0.2)
  562. elseif position == "Falling" and attacking == false then
  563. change = 1
  564. spin = false
  565. for i,v in pairs(Torso:GetChildren()) do if v:IsA("Sound") then v:Remove() end end
  566. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(15), math.rad(0), math.rad(0)), 0.15)
  567. LEFTLEGLERP.C1 = LEFTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.1)
  568. RIGHTLEGLERP.C1 = RIGHTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),0,0),.1)
  569. LEFTARMLERP.C1 = LEFTARMLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.4)
  570. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 2, 0) * CFrame.Angles(math.rad(8), math.rad(4), math.rad(0)), 0.2)
  571. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 2, 0) * CFrame.Angles(math.rad(8), math.rad(-4), math.rad(0)), 0.2)
  572. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.5,.94 + .02 * math.sin(sine/12),-0) * CFrame.Angles(math.rad(28 + 5 * math.sin(sine/12)),math.rad(0),math.rad(45)), 0.2)
  573. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5,.94 + .02 * math.sin(sine/12),-0) * CFrame.Angles(math.rad(28 + 5 * math.sin(sine/12)),math.rad(0),math.rad(-45)), 0.2)
  574. elseif position == "Walking" and attacking == false and running == false then
  575. change = 1.2
  576. walking = true
  577. spin = false
  578. for i,v in pairs(Torso:GetChildren()) do if v:IsA("Sound") then v:Remove() end end
  579. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5 + Root.RotVelocity.Y / 85,.35,-.5*math.sin(sine/11)) * CFrame.Angles(math.rad(35*math.sin(sine/11)),math.rad(0*math.sin(sine/11)),math.rad(-10 + Root.RotVelocity.Y / 10, math.sin(-20 * math.sin(sine/4)))),.3)
  580. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.5 + Root.RotVelocity.Y / 85,.45,.5*math.sin(sine/11)) * CFrame.Angles(math.rad(-55*math.sin(sine/11)),math.rad(-5*math.sin(sine/8)),math.rad(10 + Root.RotVelocity.Y / 10, math.sin(20 * math.sin(sine/4)))),.3)
  581. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, -.15 * 0.6*-math.sin(sine/5.5), 0) * CFrame.Angles(math.rad(10), math.rad(12 * -math.sin(sine/11)), math.rad(0) + Root.RotVelocity.Y / 30, math.cos(25 * math.cos(sine/10))), 0.3)
  582. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 1.92 - 0.35 * math.cos(sine/11)/2.8, -.2  + 0.2 - math.sin(sine/11)/3.4) * CFrame.Angles(math.rad(25 - 25) + -math.sin(sine/11)/2.3, math.rad(0)*math.cos(sine/1), math.rad(0), math.cos(-15 * 25 * math.cos(sine/11))), 0.3)
  583. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 1.92 + 0.35 * math.cos(sine/11)/2.8, -.2 + 0.2 + math.sin(sine/11)/3.4) * CFrame.Angles(math.rad(25 - 25) - -math.sin(sine/11)/2.3, math.rad(0)*math.cos(sine/1), math.rad(0) , math.cos(-15 * 25 * math.cos(sine/11))), 0.3)
  584. elseif position == "Idle" and attacking == false and running == false then
  585. change = .5
  586. spin = true
  587. for i,v in pairs(Torso:GetChildren()) do if v:IsA("Sound") then v:Remove() end end
  588. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, -.2 + -.1 * math.sin(sine/12), 0) * CFrame.Angles(math.rad(6 * -math.sin(sine/12)),math.rad(0),math.rad(0)),.1)
  589. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.5,.27 + .02 * math.sin(sine/12),.20 * -math.sin(sine/12)) * CFrame.Angles(math.rad(20 * math.sin(sine/12)),math.rad(0),math.rad(10)), 0.1)
  590. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5,.27 + .02 * math.sin(sine/12),.20 * -math.sin(sine/12)) * CFrame.Angles(math.rad(20 * math.sin(sine/12)),math.rad(0),math.rad(-10)), 0.1)
  591. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.3, 2 - .1 * math.sin(sine/12), 0) * CFrame.Angles(math.rad(6 * -math.sin(sine/12)), math.rad(0), math.rad(-10)), 0.1)
  592. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.3, 2.0 - .1 * math.sin(sine/12), 0) * CFrame.Angles(math.rad(6 * -math.sin(sine/12)), math.rad(0), math.rad(10)), 0.1)
  593. elseif position == "Running" and attacking == false then
  594. change = 1
  595. for i,v in pairs(Torso:GetChildren()) do if v:IsA("Sound") then v:Remove() end end
  596. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(0, .5, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.3)
  597. LEFTARMLERP.C1 = LEFTARMLERP.C1:lerp(CFrame.new(-1.24+.6*math.sin(sine/4)/1.4, 0.54, 0-0.8*math.sin(sine/4))*CFrame.Angles(math.rad(6+140*math.sin(sine/4)/1.2), math.rad(0), math.rad(20+70*math.sin(sine/4))), 0.3)
  598. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(0,.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  599. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, -.2, 0) * CFrame.Angles(math.rad(-20 - 0 * math.sin(sine/4)), math.rad(0 + 6 * math.sin(sine/4)), math.rad(0) + Root.RotVelocity.Y / 30, math.sin(10 * math.sin(sine/4))), 0.3)
  600. RIGHTLEGLERP.C1 = RIGHTLEGLERP.C1:lerp(CFrame.new(0,0,-.2 + .5*-math.sin(sine/4)),.3)
  601. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 1.6+0.1*math.sin(sine/4),.7*-math.sin(sine/4)) * CFrame.Angles(math.rad(15+ -50 * math.sin(sine/4)),0,0),.3)
  602. LEFTLEGLERP.C1 = LEFTLEGLERP.C1:lerp(CFrame.new(0,0,-.2 + .5*math.sin(sine/4)),.3)
  603. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 1.6-0.1*math.sin(sine/4),.7*math.sin(sine/4)) * CFrame.Angles(math.rad(15 + 50 * math.sin(sine/4)),0,0),.3)
  604. end
  605. swait()
  606. end
  607. end)
  608. anims()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement