MrSlakyx

Untitled

Sep 8th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.38 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer end
  5.  
  6. mouse = game.Players.LocalPlayer:GetMouse()
  7. Player=game.Players.MrSlakyx
  8. Character=Player.Character
  9. Character.Humanoid.Name = "noneofurbusiness"
  10. hum = Character.noneofurbusiness
  11. LeftArm=Character["Left Arm"]
  12. LeftLeg=Character["Left Leg"]
  13. RightArm=Character["Right Arm"]
  14. RightLeg=Character["Right Leg"]
  15. Root=Character["HumanoidRootPart"]
  16. Head=Character["Head"]
  17. Torso=Character["Torso"]
  18. Neck=Torso["Neck"]
  19. walking = false
  20. hitdebounce = false
  21. jumping = false
  22. attacking = false
  23. aiming = false
  24. firsttime = false
  25. tauntdebounce = false
  26. position = nil
  27. MseGuide = true
  28. running = false
  29. settime = 0
  30. sine = 0
  31. t = 0
  32. ws = 32
  33. change = 1
  34. combo1 = true
  35. equip = false
  36. swetch = false
  37. dgs = 75
  38. combo2 = false
  39. tauntdebounce = false
  40. firsttime2 = false
  41. stop = false
  42. combo3 = false
  43. gunallowance = false
  44. shooting = false
  45. RunSrv = game:GetService("RunService")
  46. RenderStepped = game:GetService("RunService").RenderStepped
  47. removeuseless = game:GetService("Debris")
  48. smoothen = game:GetService("TweenService")
  49. local kicks={3224461986,3224460792,3224460186,3224459537}
  50. cam = workspace.CurrentCamera
  51. hum.WalkSpeed = 26
  52.  
  53. screenGui = Instance.new("ScreenGui")
  54. screenGui.Parent = script.Parent
  55.  
  56. local HEADLERP = Instance.new("ManualWeld")
  57. HEADLERP.Parent = Head
  58. HEADLERP.Part0 = Head
  59. HEADLERP.Part1 = Head
  60. HEADLERP.C0 = CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  61.  
  62. local TORSOLERP = Instance.new("ManualWeld")
  63. TORSOLERP.Parent = Root
  64. TORSOLERP.Part0 = Torso
  65. TORSOLERP.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  66.  
  67. local ROOTLERP = Instance.new("ManualWeld")
  68. ROOTLERP.Parent = Root
  69. ROOTLERP.Part0 = Root
  70. ROOTLERP.Part1 = Torso
  71. ROOTLERP.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  72.  
  73. local RIGHTARMLERP = Instance.new("ManualWeld")
  74. RIGHTARMLERP.Parent = RightArm
  75. RIGHTARMLERP.Part0 = RightArm
  76. RIGHTARMLERP.Part1 = Torso
  77. RIGHTARMLERP.C0 = CFrame.new(-1.5, 0, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  78.  
  79. local LEFTARMLERP = Instance.new("ManualWeld")
  80. LEFTARMLERP.Parent = LeftArm
  81. LEFTARMLERP.Part0 = LeftArm
  82. LEFTARMLERP.Part1 = Torso
  83. LEFTARMLERP.C0 = CFrame.new(1.5, 0, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  84.  
  85. local RIGHTLEGLERP = Instance.new("ManualWeld")
  86. RIGHTLEGLERP.Parent = RightLeg
  87. RIGHTLEGLERP.Part0 = RightLeg
  88. RIGHTLEGLERP.Part1 = Torso
  89. RIGHTLEGLERP.C0 = CFrame.new(-0.5, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  90.  
  91. local LEFTLEGLERP = Instance.new("ManualWeld")
  92. LEFTLEGLERP.Parent = LeftLeg
  93. LEFTLEGLERP.Part0 = LeftLeg
  94. LEFTLEGLERP.Part1 = Torso
  95. LEFTLEGLERP.C0 = CFrame.new(0.5, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  96.  
  97. local function weldBetween(a, b)
  98. local weld = Instance.new("ManualWeld", a)
  99. weld.Part0 = a
  100. weld.Part1 = b
  101. weld.C0 = a.CFrame:inverse() * b.CFrame
  102. return weld
  103. end
  104.  
  105. function MAKETRAIL(PARENT,POSITION1,POSITION2,LIFETIME,COLOR)
  106. A = Instance.new("Attachment", PARENT)
  107. A.Position = POSITION1
  108. A.Name = "A"
  109. B = Instance.new("Attachment", PARENT)
  110. B.Position = POSITION2
  111. B.Name = "B"
  112. tr1 = Instance.new("Trail", PARENT)
  113. tr1.Attachment0 = A
  114. tr1.Attachment1 = B
  115. tr1.Enabled = true
  116. tr1.Lifetime = LIFETIME
  117. tr1.TextureMode = "Static"
  118. tr1.LightInfluence = 0
  119. tr1.Color = COLOR
  120. tr1.Transparency = NumberSequence.new(0, 1)
  121. end
  122.  
  123. coroutine.wrap(function()
  124. while wait() do
  125. hum.WalkSpeed = ws
  126. hum.JumpPower = 80
  127. LeftArm.BrickColor = BrickColor.new("Really black")
  128. RightArm.BrickColor = BrickColor.new("Really black")
  129. Head.BrickColor = BrickColor.new("Really black")
  130. end
  131. end)()
  132. godmode = coroutine.wrap(function()
  133. for i,v in pairs(Character:GetChildren()) do
  134. if v:IsA("BasePart") and v ~= Root then
  135. v.Anchored = false
  136. end
  137. end
  138. while true do
  139. hum.MaxHealth = math.huge
  140. wait(0.0000001)
  141. hum.Health = math.huge
  142. wait()
  143. end
  144. end)
  145. godmode()
  146. ff = Instance.new("ForceField", Character)
  147. ff.Visible = false
  148.  
  149. ----defaultpos----
  150. ROOTLERP.C1 = ROOTLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.2)
  151. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.5,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2)
  152. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2)
  153. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),.2)
  154. RIGHTLEGLERP.C1 = RIGHTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),0,0),.2)
  155. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-.5, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  156. LEFTLEGLERP.C1 = LEFTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.1)
  157. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  158. ----defaultpos----
  159.  
  160. coroutine.wrap(function()
  161. for i,v in pairs(Character:GetChildren()) do
  162. if v.Name == "Animate" then v:Remove()
  163. end
  164. end
  165. end)()
  166.  
  167. function damagealll(Radius,Position)
  168. local Returning = {}
  169. for _,v in pairs(workspace:GetChildren()) do
  170. if v~=Character and v:FindFirstChildOfClass('Humanoid') and v:FindFirstChild('Torso') or v:FindFirstChild('UpperTorso') then
  171. if v:FindFirstChild("Torso") then
  172. local Mag = (v.Torso.Position - Position).magnitude
  173. if Mag < Radius then
  174. table.insert(Returning,v)
  175. end
  176. elseif v:FindFirstChild("UpperTorso") then
  177. local Mag = (v.UpperTorso.Position - Position).magnitude
  178. if Mag < Radius then
  179. table.insert(Returning,v)
  180. end
  181. end
  182. end
  183. end
  184. return Returning
  185. end
  186.  
  187. ArtificialHB = Instance.new("BindableEvent", script)
  188. ArtificialHB.Name = "Heartbeat"
  189. script:WaitForChild("Heartbeat")
  190.  
  191. frame = 1 / 60
  192. tf = 0
  193. allowframeloss = false
  194. tossremainder = false
  195.  
  196.  
  197. lastframe = tick()
  198. script.Heartbeat:Fire()
  199.  
  200.  
  201. game:GetService("RunService").Heartbeat:connect(function(s, p)
  202. tf = tf + s
  203. if tf >= frame then
  204. if allowframeloss then
  205. script.Heartbeat:Fire()
  206. lastframe = tick()
  207. else
  208. for i = 1, math.floor(tf / frame) do
  209. script.Heartbeat:Fire()
  210. end
  211. lastframe = tick()
  212. end
  213. if tossremainder then
  214. tf = 0
  215. else
  216. tf = tf - frame * math.floor(tf / frame)
  217. end
  218. end
  219. end)
  220.  
  221. function swait(num)
  222. if num == 0 or num == nil then
  223. game:service("RunService").Stepped:wait(0)
  224. else
  225. for i = 0, num do
  226. game:service("RunService").Stepped:wait(0)
  227. end
  228. end
  229. end
  230.  
  231. for _,x in pairs(Character:GetChildren()) do
  232. if x:IsA("Decal") then x:Remove() end
  233. end
  234.  
  235. function SOUND(PARENT,ID,VOL,LOOP,REMOVE)
  236. so = Instance.new("Sound")
  237. so.Parent = PARENT
  238. so.SoundId = "rbxassetid://"..ID
  239. so.Volume = VOL
  240. so.Looped = LOOP
  241. so:Play()
  242. removeuseless:AddItem(so,REMOVE)
  243. end
  244.  
  245. for _,n in pairs(Character:GetChildren()) do
  246. if n:IsA("Accessory") then n:Remove() end
  247. end
  248. for _,x in pairs(Character:GetChildren()) do
  249. if x:IsA("Decal") then x:Remove() end
  250. end
  251. Head.face:Remove()
  252.  
  253. leftlocation = Instance.new("Part",LeftArm)
  254. leftlocation.Size = Vector3.new(1,1,1)
  255. leftlocation.Transparency = 1
  256. leftlocationweld = weldBetween(leftlocation,LeftArm)
  257. leftlocationweld.C0 = CFrame.new(0,1.2,0)
  258. rightlocation = Instance.new("Part",RightArm)
  259. rightlocation.Size = Vector3.new(1,1,1)
  260. rightlocation.Transparency = 1
  261. rightlocationweld = weldBetween(rightlocation,RightArm)
  262. rightlocationweld.C0 = CFrame.new(0,1.2,0)
  263.  
  264. Head.Transparency = 1
  265. Torso.Transparency = 1
  266. LeftLeg.Transparency = 1
  267. RightLeg.Transparency = 1
  268. RightArm.Transparency = 1
  269. LeftArm.Transparency = 1
  270.  
  271. lefthand = Instance.new("Part",Character)
  272. lefthand.Size = Vector3.new(1,1,1)
  273. lefthand.CFrame = RightArm.CFrame
  274. lefthand.CanCollide = false
  275. lefthandweld = weldBetween(lefthand,LeftArm)
  276. lefthandmesh = Instance.new("SpecialMesh",lefthand)
  277. lefthandmesh.MeshId ="rbxassetid://430270023"
  278. lefthandmesh.TextureId = "rbxassetid://430270036"
  279. lefthandmesh.Scale = Vector3.new(.015,.015,.015)
  280. lefthandweld.C0 = lefthand.CFrame:inverse() * LeftArm.CFrame * CFrame.new(0,.7,0) * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0))
  281.  
  282. righthand = Instance.new("Part",Character)
  283. righthand.Size = Vector3.new(1,1,1)
  284. righthand.CFrame = RightArm.CFrame
  285. righthand.CanCollide = false
  286. righthandweld = weldBetween(righthand,RightArm)
  287. righthandmesh = Instance.new("SpecialMesh",righthand)
  288. righthandmesh.MeshId ="rbxassetid://430269649"
  289. righthandmesh.TextureId = "rbxassetid://430270036"
  290. righthandmesh.Scale = Vector3.new(.015,.015,.015)
  291. righthandweld.C0 = righthand.CFrame:inverse() * RightArm.CFrame * CFrame.new(0,.7,0) * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0))
  292.  
  293. rightfoot = Instance.new("Part",Character)
  294. rightfoot.Size = Vector3.new(1,1,1)
  295. rightfoot.CFrame = RightLeg.CFrame
  296. rightfoot.CanCollide = false
  297. rightfootweld = weldBetween(rightfoot,RightLeg)
  298. rightfootmesh = Instance.new("SpecialMesh",rightfoot)
  299. rightfootmesh.MeshId = "rbxassetid://430263520"
  300. rightfootmesh.TextureId = "rbxassetid://430263527"
  301. rightfootmesh.Scale = Vector3.new(0.015, 0.015, 0.015)
  302. rightfootweld.C0 = rightfoot.CFrame:inverse() * RightLeg.CFrame * CFrame.new(.6,.6,-.6) * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0))
  303.  
  304. leftfoot = Instance.new("Part",Character)
  305. leftfoot.Size = Vector3.new(1,1,1)
  306. leftfoot.CFrame = LeftLeg.CFrame
  307. leftfoot.CanCollide = false
  308. leftfootweld = weldBetween(leftfoot,LeftLeg)
  309. leftfootmesh = Instance.new("SpecialMesh",leftfoot)
  310. leftfootmesh.MeshId = "rbxassetid://430268624"
  311. leftfootmesh.TextureId = "rbxassetid://430268646"
  312. leftfootmesh.Scale = Vector3.new(0.015, 0.015, 0.015)
  313. leftfootweld.C0 = leftfoot.CFrame:inverse() * LeftLeg.CFrame * CFrame.new(-.4,.6,-1) * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0))
  314.  
  315. raytorso = Instance.new("Part",Character)
  316. raytorso.Size = Vector3.new(1,1,1)
  317. raytorso.CFrame = Torso.CFrame
  318. raytorso.CanCollide = false
  319. raytorsoweld = weldBetween(raytorso,Torso)
  320. raytorsomesh = Instance.new("SpecialMesh",raytorso)
  321. raytorsomesh.MeshId = "rbxassetid://430270453"
  322. raytorsomesh.TextureId = "rbxassetid://430270465"
  323. raytorsomesh.Scale = Vector3.new(0.016, 0.015, 0.015)
  324. raytorsoweld.C0 = raytorso.CFrame:inverse() * Torso.CFrame * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0))
  325.  
  326. fedora = Instance.new("Part",Character)
  327. fedora.Size = Vector3.new(2,2,2)
  328. fedora.CFrame = Head.CFrame
  329. fedora.CanCollide = false
  330. fedoraweld = Instance.new("Weld",fedora)
  331. fedoraweld.Part0 = fedora
  332. fedoraweld.Part1 = Head
  333. fedoraweld.C0 = fedora.CFrame:inverse() * Head.CFrame * CFrame.new(-.1,-1.14,0) * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0))
  334. mfedora = Instance.new("SpecialMesh", fedora)
  335. mfedora.MeshType = "FileMesh"
  336. mfedora.Scale = Vector3.new(.015, .015, .015)
  337. mfedora.MeshId,mfedora.TextureId = 'http://www.roblox.com/asset/?id=430271185','http://www.roblox.com/asset/?id=430271200'
  338.  
  339. mouse.KeyDown:connect(function(Press)
  340. Press=Press:lower()
  341. if Press=='m' then
  342. immortality()
  343. for i,v in pairs(Player.Character:GetDescendants()) do
  344. if v:IsA("BodyVelocity") then
  345. v:Remove()
  346. end
  347. end
  348. elseif Press=='q' then
  349. if debounce then return end
  350. if aiming then
  351. aiming = false
  352. debounce = true
  353. for i = 1, 20 do
  354. gun.Transparency = gun.Transparency + .05
  355. swait()
  356. end
  357. lefthandmesh.MeshId ="rbxassetid://430270023"
  358. lefthandmesh.TextureId = "rbxassetid://430270036"
  359. lefthandmesh.Scale = Vector3.new(.015,.015,.015)
  360. gun:Remove()
  361. gunbox:Remove()
  362. debounce = false
  363. attacking = false
  364. else
  365. debounce = true
  366. attacking = true
  367. aiming = true
  368. gun = Instance.new("Part",Torso)
  369. gun.Size = Vector3.new(1,1,1)
  370. gun.Anchored = false
  371. gun.Transparency = 0
  372. gun.CanCollide = false
  373. gunweld = weldBetween(gun,lefthand)
  374. gunmesh = Instance.new("SpecialMesh",gun)
  375. gunmesh.MeshId = "rbxassetid://430586811"
  376. gunmesh.TextureId = "rbxassetid://430586818"
  377. gunmesh.Scale = Vector3.new(.0011,.0011,.0011)
  378. gunweld.C0 = CFrame.new(-1.2,0,-.6) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(90))
  379. gunbox = Instance.new("Part",Torso)
  380. gunbox.Size = Vector3.new(1,1,1)
  381. gunbox.Anchored = false
  382. gunbox.CanCollide = false
  383. gunbox.Transparency = 1
  384. gunboxweld = weldBetween(gunbox,gun)
  385. gunboxweld.C0 = CFrame.new(-2,0,0)
  386. lefthandmesh.MeshId = "rbxassetid://90718752"
  387. lefthandmesh.TextureId = "rbxassetid://6347925"
  388. lefthandmesh.Scale = Vector3.new(4,4,4)
  389. coroutine.wrap(function()
  390. while true do
  391. if not aiming then break end
  392. swait()
  393. end
  394. end)()
  395. attacking = false
  396. debounce = false
  397. end
  398. elseif Press=='r' then
  399. if not aiming then return end
  400. if debounce then return end
  401. debounce = true
  402. attacking = true
  403. ws = 0
  404.  
  405. local g1 = Instance.new("BodyGyro", nil)
  406. g1.CFrame = Root.CFrame
  407. g1.Parent = Root
  408. g1.D = 175
  409. g1.P = 20000
  410. g1.MaxTorque = Vector3.new(0,9000,0)
  411. for i = 1, 15 do
  412. g1.CFrame = g1.CFrame:lerp(CFrame.new(Root.Position,mouse.Hit.p),.11)
  413. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(.3,1.5,-1.6) * CFrame.Angles(math.rad(-70 - 3 * math.sin(sine/12)),math.rad(3 * math.sin(sine/12)),math.rad(95 + 2 * math.sin(sine/12))), 0.2)
  414. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .1 * math.sin(sine/12), 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)),.2)
  415. RIGHTLEGLERP.C1 = RIGHTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),0,0),.2)
  416. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-.5, 2 + .1 * math.sin(sine/12), 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  417. LEFTLEGLERP.C1 = LEFTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.1)
  418. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 2 + .1 * math.sin(sine/12), 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  419. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1,1,0) * CFrame.Angles(math.rad(10 - 1 * math.sin(sine/12)),math.rad(10 + 2 * math.sin(sine/12)),math.rad(-40 + 4 * math.sin(sine/12))), 0.2)
  420. swait()
  421. end
  422. coroutine.wrap(function()
  423. local shoot = Instance.new("Sound",gunbox)
  424. shoot.SoundId = "rbxassetid://131179973"
  425. shoot.Volume = 8
  426. shoot:Play()
  427. local orbhit = false
  428. local orb = Instance.new("Part",Torso)
  429. orb.Size = Vector3.new(1,1,1)
  430. orb.Shape = "Ball"
  431. orb.BrickColor = BrickColor.new("Lime green")
  432. orb.Anchored = false
  433. orb.Transparency = 1
  434. orb.CanCollide = false
  435. orb.Material = "Neon"
  436. orb.CFrame = gunbox.CFrame
  437. local bov = Instance.new("BodyVelocity",orb)
  438. bov.maxForce = Vector3.new(99999,99999,99999)
  439. orb.CFrame = CFrame.new(orb.Position,mouse.Hit.p)
  440. bov.velocity = orb.CFrame.lookVector*325
  441. coroutine.wrap(function()
  442. while true do
  443. if orbhit then break end
  444. local magic = Instance.new("Part",Torso)
  445. magic.BrickColor = BrickColor.new("Lime green")
  446. magic.Anchored = true
  447. magic.CanCollide = false
  448. magic.CFrame = orb.CFrame * CFrame.Angles(math.rad(math.random(-180,180)),math.rad(math.random(-180,180)),math.rad(math.random(-180,180)))
  449. magic.Material = "Neon"
  450. magic.Size = Vector3.new(2,2,2)
  451. coroutine.wrap(function()
  452. for i = 1, 40 do
  453. magic.Transparency = magic.Transparency + .025
  454. magic.Size = magic.Size - Vector3.new(.05,.05,.05)
  455. swait()
  456. end
  457. magic:Remove()
  458. end)()
  459. swait()
  460. end
  461. end)()
  462. coroutine.wrap(function()
  463. while wait(.05) do
  464. if orbhit then break end
  465. local ring = Instance.new("Part",Torso)
  466. ring.Anchored = true
  467. ring.CanCollide = false
  468. ring.Size = Vector3.new(1,1,1)
  469. ring.Material = "Neon"
  470. ring.BrickColor = BrickColor.new("Lime green")
  471. ring.CFrame = orb.CFrame * CFrame.Angles(math.rad(90),0,0)
  472. local ringmesh = Instance.new("SpecialMesh",ring)
  473. ringmesh.MeshId = "rbxassetid://471124075"
  474. ringmesh.Scale = Vector3.new(.001,.001,.001)
  475. coroutine.wrap(function()
  476. for i = 1, 40 do
  477. ringmesh.Scale = ringmesh.Scale + Vector3.new(.005,.002,.005)
  478. ring.Transparency = ring.Transparency + .025
  479. swait()
  480. end
  481. ring:Remove()
  482. end)()
  483. end
  484. end)()
  485. coroutine.wrap(function()
  486. wait(5)
  487. if orbhit then
  488. else
  489. orbhit = true
  490. orb:Remove()
  491. end
  492. end)()
  493. orb.Touched:connect(function(orbh)
  494. if orbh:IsA("Part") and orbh.Parent.Parent ~= Character and orbh.Parent ~= Character then
  495. if orbhit then return end
  496. orbhit = true
  497. Hit = damagealll(28,orb.Position)
  498. for _,v in pairs(Hit) do
  499. if v:FindFirstChildOfClass("Humanoid") and v:FindFirstChildOfClass("Humanoid").Health > 0 then
  500. slachtoffer = v:FindFirstChildOfClass("Humanoid")
  501. slachtoffer:TakeDamage(math.random(69,82))
  502. vel = Instance.new("BodyVelocity",v:FindFirstChild("Torso") or v:FindFirstChild("UpperTorso"))
  503. vel.maxForce = Vector3.new(9999999999999,9999999999999,9999999999999)
  504. torso = v:FindFirstChild("Torso") or v:FindFirstChild("UpperTorso")
  505. vel.velocity = CFrame.new(orb.Position,torso.Position).lookVector*195
  506. removeuseless:AddItem(vel,.1)
  507. end
  508. end
  509. orb.Anchored = true
  510. orb.Transparency = 1
  511. local soundbox = Instance.new("Part",Torso)
  512. soundbox.CFrame = orb.CFrame
  513. soundbox.Size = Vector3.new(.1,.1,.1)
  514. soundbox.Anchored = true
  515. soundbox.CanCollide = false
  516. soundbox.Transparency = 1
  517. removeuseless:AddItem(soundbox,5)
  518. local explosionsound = Instance.new("Sound",soundbox)
  519. explosionsound.SoundId = "rbxassetid://2812343636"
  520. explosionsound.TimePosition = .6
  521. explosionsound.Volume = 10
  522. explosionsound:Play()
  523. local explosion = Instance.new("Part",Torso)
  524. explosion.Size = Vector3.new(1,1,1)
  525. explosion.Anchored = true
  526. explosion.CanCollide = false
  527. explosion.BrickColor = BrickColor.new("Lime green")
  528. explosion.Material = "Neon"
  529. explosion.Shape = "Ball"
  530. explosion.CFrame = orb.CFrame
  531. for i = 1, 40 do
  532. local ps = Instance.new("Part",Torso)
  533. ps.Size = Vector3.new(1,1,1)
  534. ps.Anchored = true
  535. ps.BrickColor = BrickColor.new("Lime green")
  536. ps.Material = "Neon"
  537. ps.Transparency = 0
  538. ps.CFrame = explosion.CFrame * CFrame.Angles(math.rad(math.random(-180,180)),math.rad(math.random(-180,180)),math.rad(math.random(-180,180)))
  539. local psm = Instance.new("SpecialMesh",ps)
  540. psm.MeshType = "Sphere"
  541. psm.Scale = Vector3.new(2,1,2)
  542. coroutine.wrap(function()
  543. for i = 1, 30 do
  544. psm.Scale = psm.Scale + Vector3.new(0,6,0)
  545. swait()
  546. end
  547. for i = 1, 20 do
  548. psm.Scale = psm.Scale + Vector3.new(0,2,0)
  549. ps.Transparency = ps.Transparency + .05
  550. swait()
  551. end
  552. ps:Remove()
  553. end)()
  554. end
  555. coroutine.wrap(function()
  556. for i = 1, 30 do
  557. local bamwave = Instance.new("Part",Torso)
  558. bamwave.CanCollide = false
  559. bamwave.Anchored = true
  560. bamwave.BrickColor = BrickColor.new("Lime green")
  561. bamwave.Name = "bamwave"
  562. bamwave.Transparency = .85
  563. bamwave.CFrame = orb.CFrame * CFrame.Angles(math.rad(math.random(-180,180)),0,math.rad(math.random(-180,180)))
  564. local bamwavemesh = Instance.new("SpecialMesh",bamwave)
  565. bamwavemesh.MeshId = "rbxassetid://662586858"
  566. bamwavemesh.Name = "explodmesh34"
  567. bamwavemesh.Scale = Vector3.new(.04,.01,.04)
  568. local wshockwave2 = Instance.new("Part", Torso)
  569. wshockwave2.Size = Vector3.new(1,1,1)
  570. wshockwave2.CanCollide = false
  571. wshockwave2.Anchored = true
  572. wshockwave2.Transparency = .9
  573. wshockwave2.BrickColor = BrickColor.new("Lime green")
  574. wshockwave2.CFrame = CFrame.new(orb.Position) * CFrame.Angles(math.rad(math.random(-180,180)),math.rad(math.random(-180,180)),math.rad(math.random(-180,180)))
  575. local wshockwavemesh2 = Instance.new("SpecialMesh",wshockwave2)
  576. wshockwavemesh2.Scale = Vector3.new(1,.05,1)
  577. wshockwavemesh2.Name = "explodmesh33"
  578. wshockwavemesh2.MeshId = "rbxassetid://20329976"
  579. coroutine.wrap(function()
  580. for i = 1, 30 do
  581. wshockwave2.CFrame = wshockwave2.CFrame:lerp(CFrame.new(orb.Position) * CFrame.Angles(math.rad(math.random(-180,180)),math.rad(math.random(-180,180)),math.rad(math.random(-180,180))),.02)
  582. bamwave.CFrame = bamwave.CFrame:lerp(orb.CFrame * CFrame.Angles(math.rad(math.random(-180,180)),0,math.rad(math.random(-180,180))),.02)
  583. bamwavemesh.Scale = bamwavemesh.Scale + Vector3.new(.02,0,.02)
  584. wshockwavemesh2.Scale = wshockwavemesh2.Scale + Vector3.new(3,.05,3)
  585. bamwave.Transparency = bamwave.Transparency + .0029
  586. wshockwave2.Transparency = wshockwave2.Transparency + .0029
  587. swait()
  588. end
  589. for i = 1, 40 do
  590. wshockwave2.CFrame = wshockwave2.CFrame:lerp(CFrame.new(orb.Position) * CFrame.Angles(math.rad(math.random(-180,180)),math.rad(math.random(-180,180)),math.rad(math.random(-180,180))),.02)
  591. bamwave.CFrame = bamwave.CFrame:lerp(orb.CFrame * CFrame.Angles(math.rad(math.random(-180,180)),0,math.rad(math.random(-180,180))),.02)
  592. bamwavemesh.Scale = bamwavemesh.Scale + Vector3.new(.01,0,.01)
  593. wshockwavemesh2.Scale = wshockwavemesh2.Scale + Vector3.new(1,.05,1)
  594. bamwave.Transparency = bamwave.Transparency + .0029
  595. wshockwave2.Transparency = wshockwave2.Transparency + .0029
  596. swait()
  597. end
  598. bamwave:Remove()
  599. wshockwave2:Remove()
  600. end)()
  601. end
  602. end)()
  603. coroutine.wrap(function()
  604. for i = 1, 20 do
  605. explosion.Size = explosion.Size + Vector3.new(2,2,2)
  606. swait()
  607. end
  608. for i = 1, 20 do
  609. explosion.Size = explosion.Size + Vector3.new(.75,.75,.75)
  610. explosion.Transparency = explosion.Transparency + .05
  611. swait()
  612. end
  613. explosion:Remove()
  614. orb:Remove()
  615. end)()
  616. end
  617. end)
  618. removeuseless:AddItem(shoot,10)
  619. for i = 1, 1 do
  620. local blast = Instance.new("Part",Torso)
  621. blast.Size = Vector3.new(1,1,1)
  622. blast.Anchored = true
  623. blast.CanCollide = false
  624. blast.Material = "Neon"
  625. blast.Shape = "Ball"
  626. blast.BrickColor = BrickColor.new("Lime green")
  627. blast.CFrame = gunbox.CFrame * CFrame.Angles(math.rad(math.random(-180,180)),math.rad(math.random(-180,180)),math.rad(math.random(-180,180)))
  628. coroutine.wrap(function()
  629. for i = 1, 20 do
  630. blast.Size = blast.Size + Vector3.new(1.1,1.1,1.1)
  631. blast.Transparency = blast.Transparency + .05
  632. swait()
  633. end
  634. blast:Remove()
  635. end)()
  636. end
  637. end)()
  638. for i = 1, 7 do
  639. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(.3,.8,-1.6) * CFrame.Angles(math.rad(-70 - 3 * math.sin(sine/12)),math.rad(3 * math.sin(sine/12)),math.rad(110 + 2 * math.sin(sine/12))), 0.2)
  640. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .1 * math.sin(sine/12), .3) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)),.2)
  641. RIGHTLEGLERP.C1 = RIGHTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),0,0),.2)
  642. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-.5, 2 + .1 * math.sin(sine/12), 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  643. LEFTLEGLERP.C1 = LEFTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.1)
  644. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 2 + .1 * math.sin(sine/12), 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  645. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1,1,0) * CFrame.Angles(math.rad(12 - 1 * math.sin(sine/12)),math.rad(15 + 2 * math.sin(sine/12)),math.rad(-45 + 4 * math.sin(sine/12))), 0.2)
  646. swait()
  647. end
  648. removeuseless:AddItem(g1,.001)
  649. debounce = false
  650. attacking = false
  651. ws = 26
  652. elseif Press=='e' then
  653. if mouse.Target ~= nil and mouse.Target.Parent ~= Character and mouse.Target.Parent.Parent ~= Character and mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
  654. local enemyhum = mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
  655. if enemyhum.Health < 1 then return end
  656. local ETorso = enemyhum.Parent:FindFirstChild("Torso") or enemyhum.Parent:FindFirstChild("LowerTorso")
  657. if debounce then return end
  658. debounce = true
  659. attacking = true
  660. local posb = Instance.new("Part",Torso)
  661. posb.Anchored = true
  662. posb.Transparency = 1
  663. posb.CanCollide = false
  664. posb.Size = Vector3.new(1,1,1)
  665. ws = 3
  666. local g1 = Instance.new("BodyGyro", Root)
  667. g1.D = 175
  668. g1.P = 20000
  669. g1.MaxTorque = Vector3.new(0,9000,0)
  670. g1.CFrame = CFrame.new(Root.Position,ETorso.Position)
  671. for i = 1, 20 do
  672. posb.CFrame = Root.CFrame * CFrame.new(0,35,-80)
  673. g1.CFrame = g1.CFrame:lerp(CFrame.new(Root.Position,ETorso.Position),.2)
  674. ROOTLERP.C1 = ROOTLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.2)
  675. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.5,.5,0) * CFrame.Angles(math.rad(-140),math.rad(10),math.rad(25)), 0.2)
  676. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5,.5,0) * CFrame.Angles(math.rad(-140),math.rad(-10),math.rad(-25)), 0.2)
  677. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-10), math.rad(0), math.rad(0)),.2)
  678. RIGHTLEGLERP.C1 = RIGHTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),0,0),.2)
  679. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-.4, 2, .1) * CFrame.Angles(math.rad(-10), math.rad(5), math.rad(-3)), 0.2)
  680. LEFTLEGLERP.C1 = LEFTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.1)
  681. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.51, .7, .7) * CFrame.Angles(math.rad(42), math.rad(0), math.rad(0)), 0.4)
  682. swait()
  683. end
  684. local b = kicks[math.random(1,#kicks)]
  685. local liltaunt = Instance.new("Sound",Torso)
  686. liltaunt.SoundId = "rbxassetid://"..b
  687. liltaunt.Volume = 4
  688. liltaunt:Play()
  689. removeuseless:AddItem(liltaunt,4)
  690. local hitbox = Instance.new("Part",Torso)
  691. hitbox.Anchored = false
  692. hitbox.CanCollide = false
  693. hitbox.Transparency = 1
  694. hitbox.Size = Vector3.new(2.5,3,3)
  695. hitboxweld = weldBetween(hitbox,LeftLeg)
  696. hitboxweld.C0 = CFrame.new(0,2.6,0)
  697. ws = 0
  698. for i = 1, 4 do
  699. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.5,.4,-.2) * CFrame.Angles(math.rad(36),math.rad(0),math.rad(12)), 0.4)
  700. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5,.4,-.2) * CFrame.Angles(math.rad(36),math.rad(0),math.rad(-12)), 0.4)
  701. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .2, 0) * CFrame.Angles(math.rad(22), math.rad(0), math.rad(0)),.4)
  702. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-.39, 2, .6) * CFrame.Angles(math.rad(37), math.rad(0), math.rad(0)), 0.4)
  703. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 1.1, -1.1) * CFrame.Angles(math.rad(-87), math.rad(3), math.rad(5)), 0.4)
  704. swait()
  705. end
  706. Hit = damagealll(2,hitbox.Position)
  707. for _,v in pairs(Hit) do
  708. if v:FindFirstChildOfClass("Humanoid") and v:FindFirstChildOfClass("Humanoid").Health > 0 and v:FindFirstChildOfClass("Humanoid") == enemyhum then
  709. slachtoffer = v:FindFirstChildOfClass("Humanoid")
  710. slachtoffer:TakeDamage(math.random(12,21))
  711. vel = Instance.new("BodyVelocity",v:FindFirstChild("Torso") or v:FindFirstChild("UpperTorso"))
  712. vel.maxForce = Vector3.new(9999999999999,9999999999999,9999999999999)
  713. torso = v:FindFirstChild("Torso") or v:FindFirstChild("UpperTorso")
  714. vel.velocity = CFrame.new(hitbox.Position,torso.Position).lookVector*25
  715. removeuseless:AddItem(vel,.1)
  716. local p = math.random(1,1.2)
  717. local p2 = Instance.new("Sound",ETorso)
  718. p2.SoundId = "rbxassetid://507150998"
  719. p2.Volume = 10
  720. p2.Pitch = p
  721. p2:Play()
  722. removeuseless:AddItem(p2,4)
  723. end
  724. end
  725. for i = 1, 4 do
  726. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.5,.4,-.2) * CFrame.Angles(math.rad(36),math.rad(0),math.rad(12)), 0.4)
  727. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5,.4,-.2) * CFrame.Angles(math.rad(36),math.rad(0),math.rad(-12)), 0.4)
  728. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .2, 0) * CFrame.Angles(math.rad(22), math.rad(0), math.rad(0)),.4)
  729. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-.39, 2, .6) * CFrame.Angles(math.rad(37), math.rad(0), math.rad(0)), 0.4)
  730. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 1.1, -1.1) * CFrame.Angles(math.rad(-87), math.rad(3), math.rad(5)), 0.4)
  731. swait()
  732. end
  733. hitbox:Remove()
  734. ws = 32
  735. removeuseless:AddItem(g1,.001)
  736. debounce = false
  737. attacking = false
  738. end
  739. end
  740. end)
  741.  
  742. function ray(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  743. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  744. end
  745.  
  746. function ray2(StartPos, EndPos, Distance, Ignore)
  747. local DIRECTION = CFrame.new(StartPos,EndPos).lookVector
  748. return ray(StartPos, DIRECTION, Distance, Ignore)
  749. end
  750.  
  751. checks1 = coroutine.wrap(function() -------Checks
  752. while true do
  753. hf = ray(Root.Position,(CFrame.new(Root.Position,Root.Position+Vector3.new(0,-1,0))).lookVector,4 * 1,Character)
  754. if Root.Velocity.y > 1 and hf == nil then
  755. position = "Jump"
  756. elseif Root.Velocity.y < -1 and hf == nil then
  757. position = "Falling"
  758. elseif Root.Velocity.Magnitude < 5 and hf ~= nil then
  759. position = "Idle"
  760. elseif Root.Velocity.Magnitude > 5 and hf ~= nil then
  761. position = "Walking"
  762. else
  763. end
  764. wait()
  765. end
  766. end)
  767. checks1()
  768.  
  769. OrgnC0 = Neck.C0
  770. local movelimbs = coroutine.wrap(function()
  771. while wait() do
  772. TrsoLV = Torso.CFrame.lookVector
  773. Dist = nil
  774. Diff = nil
  775. if not MseGuide then
  776. print("Failed to recognize")
  777. else
  778. local _, Point = Workspace:FindPartOnRay(Ray.new(Head.CFrame.p, mouse.Hit.lookVector), Workspace, false, true)
  779. Dist = (Head.CFrame.p-Point).magnitude
  780. Diff = Head.CFrame.Y-Point.Y
  781. local _, Point2 = Workspace:FindPartOnRay(Ray.new(LeftArm.CFrame.p, mouse.Hit.lookVector), Workspace, false, true)
  782. Dist2 = (LeftArm.CFrame.p-Point).magnitude
  783. Diff2 = LeftArm.CFrame.Y-Point.Y
  784. HEADLERP.C0 = CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  785. 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)
  786. end
  787. end
  788. end)
  789. movelimbs()
  790. immortal = {}
  791. for i,v in pairs(Character:GetDescendants()) do
  792. if v:IsA("BasePart") and v.Name ~= "lmagic" and v.Name ~= "rmagic" then
  793. 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
  794. v.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  795. end
  796. table.insert(immortal,{v,v.Parent,v.Material,v.Color,v.Transparency})
  797. elseif v:IsA("JointInstance") then
  798. table.insert(immortal,{v,v.Parent,nil,nil,nil})
  799. end
  800. end
  801. for e = 1, #immortal do
  802. if immortal[e] ~= nil then
  803. local STUFF = immortal[e]
  804. local PART = STUFF[1]
  805. local PARENT = STUFF[2]
  806. local MATERIAL = STUFF[3]
  807. local COLOR = STUFF[4]
  808. local TRANSPARENCY = STUFF[5]
  809. if levitate then
  810. if PART.ClassName == "Part" and PART ~= Root and PART.Name ~= eyo1 and PART.Name ~= eyo2 and PART.Name ~= "lmagic" and PART.Name ~= "rmagic" then
  811. PART.Material = MATERIAL
  812. PART.Color = COLOR
  813. PART.Transparency = TRANSPARENCY
  814. end
  815. PART.AncestryChanged:connect(function()
  816. PART.Parent = PARENT
  817. end)
  818. else
  819. if PART.ClassName == "Part" and PART ~= Root and PART.Name ~= "lmagic" and PART.Name ~= "rmagic" then
  820. PART.Material = MATERIAL
  821. PART.Color = COLOR
  822. PART.Transparency = TRANSPARENCY
  823. end
  824. PART.AncestryChanged:connect(function()
  825. PART.Parent = PARENT
  826. end)
  827. end
  828. end
  829. end
  830. function immortality()
  831. for e = 1, #immortal do
  832. if immortal[e] ~= nil then
  833. local STUFF = immortal[e]
  834. local PART = STUFF[1]
  835. local PARENT = STUFF[2]
  836. local MATERIAL = STUFF[3]
  837. local COLOR = STUFF[4]
  838. local TRANSPARENCY = STUFF[5]
  839. if PART.ClassName == "Part" and PART == Root then
  840. PART.Material = MATERIAL
  841. PART.Color = COLOR
  842. PART.Transparency = TRANSPARENCY
  843. end
  844. if PART.Parent ~= PARENT then
  845. hum:Remove()
  846. PART.Parent = PARENT
  847. hum = Instance.new("Humanoid",Character)
  848. if levitate then
  849. eyo1:Remove()
  850. eyo2:Remove()
  851. end
  852. hum.Name = "noneofurbusiness"
  853. end
  854. end
  855. end
  856. end
  857. coroutine.wrap(function()
  858. while true do
  859. hum:SetStateEnabled("Dead",false) hum:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
  860. if hum.Health < .1 then
  861. immortality()
  862. end
  863. wait()
  864. end
  865. end)()
  866.  
  867. local anims = coroutine.wrap(function()
  868. while true do
  869. settime = 0.05
  870. sine = sine + change
  871. if position == "Jump" and not attacking then
  872. change = 1
  873. ROOTLERP.C1 = ROOTLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.2)
  874. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.5, .15, 0) * CFrame.Angles(math.rad(10), math.rad(2), math.rad(10)), 0.2)
  875. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5, .15, 0) * CFrame.Angles(math.rad(-10), math.rad(-2), math.rad(-10)), 0.2)
  876. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-20), math.rad(0), math.rad(0)), 0.09)
  877. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 2, 0) * CFrame.Angles(math.rad(10), math.rad(0), math.rad(0)), 0.2)
  878. 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)
  879. elseif position == "Falling" and not attacking then
  880. change = 1
  881. ROOTLERP.C1 = ROOTLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.2)
  882. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), 0.09)
  883. 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)
  884. 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)
  885. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.54, 1.4 + .1 * math.sin(sine/12), .4) * CFrame.Angles(math.rad(9 + 2 * math.cos(sine/12)), math.rad(0), math.rad(0)), 0.25)
  886. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.54, 2 + .02 * math.sin(sine/12), 0.2 + .1 * math.sin(sine/12)) * CFrame.Angles(math.rad(25 + 5 * math.sin(sine/12)), math.rad(20), math.rad(0)), 0.25)
  887. elseif position == "Walking" and not attacking then
  888. change = 1.4
  889. walking = true
  890. ws = 32
  891. if aiming then
  892. ROOTLERP.C1 = ROOTLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.2)
  893. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.3 + .1 * math.sin(sine/8),.45 +.45 * math.sin(sine/8),-.3 - .26*math.sin(sine/8)) * CFrame.Angles(math.rad(75*math.sin(sine/8)),math.rad(-30 + 40*math.sin(sine/8)),math.rad(-10, math.sin(-20 * math.sin(sine/4)))),.3)
  894. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(.3,1.5,-1.6) * CFrame.Angles(math.rad(-70 - 3 * math.sin(sine/12)),math.rad(3 * math.sin(sine/12)),math.rad(95 + 2 * math.sin(sine/12))), 0.2)
  895. LEFTLEGLERP.C1 = LEFTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.1)
  896. RIGHTLEGLERP.C1 = RIGHTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),0,0),.1)
  897. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .15 + 0.29*math.sin(sine/4), 0) * CFrame.Angles(math.rad(-23), math.rad(12 * -math.cos(sine/8)), math.rad(0) + Root.RotVelocity.Y / 30, math.cos(25 * math.cos(sine/8))), 0.1)
  898. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.52 - .62*math.sin(sine/8), 1.42 - .94 * math.cos(sine/8)/2.8,.2 - .5 * math.sin(sine/8)) * CFrame.Angles(math.rad(20 - 60* math.sin(sine/8)), math.rad(-30), math.rad(0), math.cos(65 * math.cos(sine/8))), 0.3)
  899. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.52 - .62 * math.sin(sine/8), 1.42 + .94 * math.cos(sine/8)/2.8,.2 + .5 * math.sin(sine/8)) * CFrame.Angles(math.rad(20 + 60* math.sin(sine/8)), math.rad(30), math.rad(0), math.cos(65 * math.cos(sine/8))), 0.3)
  900. else
  901. ROOTLERP.C1 = ROOTLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.2)
  902. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.3 + .1 * math.sin(sine/8),.45 +.45 * math.sin(sine/8),-.3 - .26*math.sin(sine/8)) * CFrame.Angles(math.rad(75*math.sin(sine/8)),math.rad(-30 + 40*math.sin(sine/8)),math.rad(-10, math.sin(-20 * math.sin(sine/4)))),.3)
  903. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.3 + .1 * math.sin(sine/8),.45 -.45 * math.sin(sine/8),-.3 + .26*math.sin(sine/8)) * CFrame.Angles(math.rad(75*-math.sin(sine/8)),math.rad(30 + 40*math.sin(sine/8)),math.rad(10, math.sin(-20 * math.sin(sine/4)))),.3)
  904. LEFTLEGLERP.C1 = LEFTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.1)
  905. RIGHTLEGLERP.C1 = RIGHTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),0,0),.1)
  906. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .15 + 0.29*math.sin(sine/4), 0) * CFrame.Angles(math.rad(-23), math.rad(12 * -math.cos(sine/8)), math.rad(0) + Root.RotVelocity.Y / 30, math.cos(25 * math.cos(sine/8))), 0.1)
  907. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.52 - .62*math.sin(sine/8), 1.42 - .94 * math.cos(sine/8)/2.8,.2 - .5 * math.sin(sine/8)) * CFrame.Angles(math.rad(20 - 60* math.sin(sine/8)), math.rad(-30), math.rad(0), math.cos(65 * math.cos(sine/8))), 0.3)
  908. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.52 - .62 * math.sin(sine/8), 1.42 + .94 * math.cos(sine/8)/2.8,.2 + .5 * math.sin(sine/8)) * CFrame.Angles(math.rad(20 + 60* math.sin(sine/8)), math.rad(30), math.rad(0), math.cos(65 * math.cos(sine/8))), 0.3)
  909. end
  910. elseif position == "Idle" and not attacking then
  911. change = .5
  912. spin = true
  913. if aiming then
  914. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .1 * math.sin(sine/12), 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)),.2)
  915. RIGHTLEGLERP.C1 = RIGHTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),0,0),.2)
  916. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-.5, 2 + .1 * math.sin(sine/12), 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  917. LEFTLEGLERP.C1 = LEFTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.1)
  918. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 2 + .1 * math.sin(sine/12), 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  919. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1,1,0) * CFrame.Angles(math.rad(10 - 1 * math.sin(sine/12)),math.rad(10 + 2 * math.sin(sine/12)),math.rad(-40 + 4 * math.sin(sine/12))), 0.2)
  920. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(.3,1.5,-1.6) * CFrame.Angles(math.rad(-70 - 3 * math.sin(sine/12)),math.rad(3 * math.sin(sine/12)),math.rad(95 + 2 * math.sin(sine/12))), 0.2)
  921. else
  922. ROOTLERP.C1 = ROOTLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.2)
  923. LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.5,.1 * math.sin(sine/12),0) * CFrame.Angles(math.rad(2 * math.sin(sine/17)),math.rad(4 - 4 * math.sin(sine/12)),math.rad(2 * math.sin(sine/14))), 0.2)
  924. RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5,.1 * math.sin(sine/12),0) * CFrame.Angles(math.rad(2 * math.sin(sine/17)),math.rad(-4 + 4 * math.sin(sine/12)),math.rad(2 * math.sin(sine/14))), 0.2)
  925. ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .1 * math.sin(sine/12), 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),.2)
  926. RIGHTLEGLERP.C1 = RIGHTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),0,0),.2)
  927. RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-.5, 2 + .1 * math.sin(sine/12), 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  928. LEFTLEGLERP.C1 = LEFTLEGLERP.C1:lerp(CFrame.new(0,0,0) * CFrame.Angles(0,0,0),.1)
  929. LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 2 + .1 * math.sin(sine/12), 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  930. end
  931. end
  932. swait()
  933. end
  934. end)
  935. anims()
  936. warn("Rayman! Made by Supr14")
Add Comment
Please, Sign In to add comment