NASA960

The Glitch FE

Dec 23rd, 2018
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.59 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = 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. -- [ GlitchMaster ] --
  88. -- [ Cucumber Quest ] --
  89. wait()
  90. LoudVolume = false
  91. Music = true
  92. script.Name = "GlitchMaster"
  93. Player = owner
  94. c = owner
  95. Head = c.Head
  96. anim = c.Humanoid.Animator
  97. rage = false
  98. Battle = false
  99. p = owner
  100. Music = false
  101. PhaseEnabled = true
  102. TeleportEnabled = true
  103. c.Archivable = true
  104. WholeBody = c:clone()
  105. local Effects = {}
  106. attack = false
  107. local attacking = false
  108. vt = Vector3.new
  109. bc = BrickColor.new
  110. br = BrickColor.random
  111. it = Instance.new
  112. cf = CFrame.new
  113. euler = CFrame.fromEulerAnglesXYZ
  114. angles = CFrame.Angles
  115. matr = math.random
  116.  
  117.  
  118. local S10 = Instance.new("Sound") local S11 = Instance.new("ParticleEmitter")
  119.  
  120. c.Humanoid.WalkSpeed = 24 c.Humanoid.JumpPower = 50
  121.  
  122. RSC0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  123. RSC1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  124. LSC0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  125. LSC1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  126. RHC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  127. RHC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  128. LHC0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  129. LHC1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  130. NC0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  131. NC1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  132. RJC0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  133. RJC1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  134. RS = c.Torso:FindFirstChild("Right Shoulder")
  135. LS = c.Torso:FindFirstChild("Left Shoulder")
  136. RH = c.Torso:FindFirstChild("Right Hip")
  137. LH = c.Torso:FindFirstChild("Left Hip")
  138. RJ = c.HumanoidRootPart:FindFirstChild("RootJoint")
  139. N = c.Torso:FindFirstChild("Neck")
  140. cf = CFrame.new
  141. ang = CFrame.Angles
  142. rd = math.rad
  143. rd2 = math.random
  144.  
  145. function swait(num)
  146. if num==0 or num==nil then
  147. game:service'RunService'.Heartbeat:wait(0)
  148. else
  149. for i=0,num do
  150. game:service'RunService'.Heartbeat:wait(0)
  151. end
  152. end
  153. end
  154.  
  155. function AnimDis()
  156. if c.Animate.Disabled == false then
  157. c.Animate.Disabled = true
  158. anim.Parent = nil
  159. else
  160. anim.Parent = c.Humanoid
  161. c.Animate.Disabled = false
  162. end
  163. end
  164. function lerpz(joint, prop, cfrmz, alp)
  165. joint[prop] = joint[prop]:lerp(cfrmz, alp)
  166. end
  167. function resetlerp()
  168. RJ.C0 = RJC0
  169. RJ.C1 = RJC1
  170. N.C0 = NC0
  171. N.C1 = NC1
  172. RS.C0 = RSC0
  173. RS.C1 = RSC1
  174. LS.C0 = LSC0
  175. LS.C1 = LSC1
  176. RH.C0 = RHC0
  177. RH.C1 = RHC1
  178. LH.C0 = LHC0
  179. LH.C1 = LHC1
  180. end
  181.  
  182. game:GetService('UserInputService').InputBegan:connect(function(InputObj)
  183. if InputObj.KeyCode == Enum.KeyCode.Slash then
  184. local finishEvent = nil
  185. isTyping = true
  186. finishEvent = game:GetService('UserInputService').InputBegan:connect(function(InputObj)
  187. if InputObj.KeyCode == Enum.KeyCode.Return or InputObj.UserInputType == Enum.UserInputType.MouseButton1 then
  188. isTyping = false
  189. finishEvent:disconnect()
  190. end
  191. end)
  192. end
  193. end)
  194.  
  195. function VirusDestroy(H)
  196. spawn(function()
  197. for i = 1,1000 do
  198. H.Transparency = H.Transparency + 1/1000
  199. swait()
  200. end
  201. game.Debris:AddItem(H,3)H.Anchored = true
  202. end)
  203. end
  204.  
  205. function HitInfect(Part)
  206. Part.Touched:connect(function(Hit)
  207. if Hit.Size.Y <= 30 and Hit.Size.X <= 30 and Hit.Size.Z <= 30 and Hit.Transparency < 1 and Hit:findFirstChild("Glitch")== nil and Hit.Parent ~= c then
  208. local S = S10:clone() S.Parent = Hit S.Volume = 0.1 S.SoundId = "rbxassetid://606774093" S.Looped = true S:Play()
  209. Hit.Material = "Sand" Hit.BrickColor = BrickColor.new("Really black") HitInfect(Hit) VirusDestroy(Hit)
  210. for i = 1,2 do
  211. local tra = S11:clone() tra.Parent = Hit
  212. tra.Texture = "rbxassetid://744949545"
  213. tra.LightEmission = 0
  214. if i == 1 then
  215. tra.Color = ColorSequence.new(Color3.new(0/255,255/255,0/255))
  216. tra.ZOffset = 2.5
  217. else
  218. tra.Color = ColorSequence.new(Color3.new(0/255,0/255,0/255))
  219. tra.ZOffset = 3
  220. end
  221. local PSize = (Hit.Size.Y+Hit.Size.X+Hit.Size.Z)/20
  222. tra.Lifetime = NumberRange.new(1,3)
  223. tra.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(0.1,PSize,0),NumberSequenceKeypoint.new(1,0,0)})
  224. tra.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(0.8,0,0),NumberSequenceKeypoint.new(1,1,0)})
  225. tra.Speed = NumberRange.new(0.5) tra.VelocitySpread = 360 tra.Name = "Glitch"
  226. tra.LockedToPart = true
  227. tra.Rate = 15
  228. tra.VelocityInheritance = 0.2
  229. if Hit:findFirstChild("Mesh") and Hit.Name ~= "Head" then
  230. if Hit:findFirstChild("Mesh"):IsA("SpecialMesh") then
  231. Hit.Mesh.TextureId = "rbxassetid://64619306"
  232. end
  233. elseif Hit.Name ~= "Head" then
  234. local M = Instance.new("SpecialMesh",Hit)M.MeshId = "rbxassetid://9856898" M.TextureId = "rbxassetid://64619306"
  235. M.Scale = Vector3.new(Hit.Size.X*2,Hit.Size.Y*2,Hit.Size.Z*2)
  236. end
  237. end
  238. end
  239. end)
  240. end
  241. function Virusify(Hit)
  242. local S = S10:clone() S.Parent = Hit S.Volume = 0.1 S.SoundId = "rbxassetid://606774093" S.Looped = true S:Play()
  243. Hit.Material = "Sand" Hit.BrickColor = BrickColor.new("Really black")
  244. for i = 1,2 do
  245. local tra = S11:clone() tra.Parent = Hit
  246. tra.Texture = "rbxassetid://744949545"
  247. tra.LightEmission = 0
  248. if i == 1 then
  249. tra.Name = "Glitch"
  250. tra.Color = ColorSequence.new(Color3.new(0/255,255/255,0/255))
  251. tra.ZOffset = 2.5
  252. else
  253. tra.Name = "Glitch2"
  254. tra.Color = ColorSequence.new(Color3.new(0/255,0/255,0/255))
  255. tra.ZOffset = 3
  256. end
  257. local PSize = (Hit.Size.Y+Hit.Size.X+Hit.Size.Z)/20
  258. tra.Lifetime = NumberRange.new(1,3)
  259. tra.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(0.1,PSize*0.75,0),NumberSequenceKeypoint.new(1,0,0)})
  260. tra.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(0.8,0,0),NumberSequenceKeypoint.new(1,1,0)})
  261. tra.Speed = NumberRange.new(0.5) tra.VelocitySpread = 360
  262. tra.LockedToPart = true
  263. tra.Rate = 15+(Hit.Size.Y+Hit.Size.X+Hit.Size.Z)*5
  264. tra.VelocityInheritance = 0.2
  265. if Hit:findFirstChild("Mesh") and Hit.Name ~= "Head" then
  266. if Hit:findFirstChild("Mesh"):IsA("SpecialMesh") then
  267. Hit.Mesh.TextureId = "rbxassetid://64619306"
  268. end
  269. elseif Hit.Name ~= "Head" then
  270. local M = Instance.new("SpecialMesh",Hit)M.MeshId = "rbxassetid://9856898" M.TextureId = "rbxassetid://64619306"
  271. M.Scale = Vector3.new(Hit.Size.X*2,Hit.Size.Y*2,Hit.Size.Z*2)
  272. end
  273. end
  274. end
  275.  
  276. function Virusify2(Hit)
  277. Hit.Material = "Sand" Hit.BrickColor = BrickColor.new("Really black")
  278. for i = 1,2 do
  279. local tra = S11:clone() tra.Parent = Hit
  280. tra.Texture = "rbxassetid://744949545"
  281. tra.LightEmission = 0
  282. if i == 1 then
  283. tra.Name = "Glitch"
  284. tra.Color = ColorSequence.new(Color3.new(0/255,255/255,0/255))
  285. tra.ZOffset = 2.5
  286. else
  287. tra.Name = "Glitch2"
  288. tra.Color = ColorSequence.new(Color3.new(0/255,0/255,0/255))
  289. tra.ZOffset = 3
  290. end
  291. local PSize = (Hit.Size.Y)/4
  292. tra.Lifetime = NumberRange.new(0.5)
  293. tra.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(0.1,1,0),NumberSequenceKeypoint.new(1,0,0)})
  294. tra.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(0.8,0,0),NumberSequenceKeypoint.new(1,1,0)})
  295. tra.Speed = NumberRange.new(0.5) tra.VelocitySpread = 360
  296. tra.LockedToPart = true
  297. tra.Rate = 50
  298. tra.VelocityInheritance = 0.2
  299. if Hit:findFirstChild("Mesh") and Hit.Name ~= "Head" then
  300. if Hit:findFirstChild("Mesh"):IsA("SpecialMesh") then
  301. Hit.Mesh.TextureId = "rbxassetid://64619306"
  302. end
  303. elseif Hit.Name ~= "Head" then
  304. local M = Instance.new("SpecialMesh",Hit)M.MeshId = "rbxassetid://9856898" M.TextureId = "rbxassetid://64619306"
  305. M.Scale = Vector3.new(Hit.Size.X*2,Hit.Size.Y*2,Hit.Size.Z*2)
  306. end
  307. end
  308. end
  309.  
  310. function Virusify3(Hit)
  311. local S = S10:clone() S.Parent = Hit S.Volume = 0.1 S.SoundId = "rbxassetid://606774093" S.Looped = true S:Play()
  312. Hit.Material = "Sand" Hit.BrickColor = BrickColor.new("Really black")
  313. for i2 = 1,2 do
  314. for i = 1,2 do
  315. local tra = S11:clone() tra.Parent = Hit
  316. tra.Texture = "rbxassetid://744949545"
  317. tra.LightEmission = 0
  318. if i == 1 then
  319. tra.Name = "Glitch"
  320. tra.Color = ColorSequence.new(Color3.new(0/255,255/255,0/255))
  321. tra.ZOffset = 2.5
  322. else
  323. tra.Name = "Glitch2"
  324. tra.Color = ColorSequence.new(Color3.new(0/255,0/255,0/255))
  325. tra.ZOffset = 3
  326. end
  327. if i2 == 1 then
  328. tra.LockedToPart = true
  329. else
  330. tra.LockedToPart = false
  331. end
  332. local PSize = (Hit.Size.Y+Hit.Size.X+Hit.Size.Z)/20
  333. tra.Lifetime = NumberRange.new(1,3)
  334. tra.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(0.1,PSize*0.75,0),NumberSequenceKeypoint.new(1,0,0)})
  335. tra.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(0.8,0,0),NumberSequenceKeypoint.new(1,1,0)})
  336. tra.Speed = NumberRange.new(0.5) tra.VelocitySpread = 360
  337. tra.Rate = 35+(Hit.Size.Y+Hit.Size.X+Hit.Size.Z)*5
  338. tra.VelocityInheritance = 0.2
  339. if Hit:findFirstChild("Mesh") and Hit.Name ~= "Head" then
  340. if Hit:findFirstChild("Mesh"):IsA("SpecialMesh") then
  341. Hit.Mesh.TextureId = "rbxassetid://64619306"
  342. end
  343. elseif Hit.Name ~= "Head" then
  344. local M = Instance.new("SpecialMesh",Hit)M.MeshId = "rbxassetid://9856898" M.TextureId = "rbxassetid://64619306"
  345. M.Scale = Vector3.new(Hit.Size.X*2,Hit.Size.Y*2,Hit.Size.Z*2)
  346. end
  347. end
  348. end
  349. end
  350.  
  351. local S = Instance.new("Sound",c.HumanoidRootPart)S.Volume = 0.4 S.SoundId = "rbxassetid://606774093" S.Looped = true S:Play()
  352.  
  353. for i,v in pairs(c:children()) do
  354. if v.ClassName == "Accessory" then
  355. v:remove()
  356. end
  357. end
  358.  
  359. if c:findFirstChild("Body Colors") then
  360. c:findFirstChild("Body Colors"):remove()
  361. end
  362. for i,v in pairs (c:children()) do
  363. if v.ClassName == "Part" then
  364. if v.Name ~= "HumanoidRootPart" then
  365. HitInfect(v)
  366. v.Material = "Sand" v.BrickColor = BrickColor.new("Really black")
  367. for i2 = 1,2 do
  368. for i = 1,2 do
  369. local tra = S11:clone() tra.Parent = v
  370. tra.Texture = "rbxassetid://744949545"
  371. tra.LightEmission = 0
  372. if i == 1 then
  373. tra.Color = ColorSequence.new(Color3.new(0/255,255/255,0/255))
  374. tra.ZOffset = 2.5
  375. else
  376. tra.Color = ColorSequence.new(Color3.new(0/255,0/255,0/255))
  377. tra.ZOffset = 3
  378. end
  379. tra.Rate = 15
  380. tra.Lifetime = NumberRange.new(1,3)
  381. tra.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(0.1,0.15,0),NumberSequenceKeypoint.new(1,0,0)})
  382. tra.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(0.8,0,0),NumberSequenceKeypoint.new(1,1,0)})
  383. tra.Speed = NumberRange.new(0.5) tra.VelocitySpread = 360 tra.Name = "Glitch"
  384. if i2 == 1 then
  385. tra.LockedToPart = true
  386. tra.Rate = 10
  387. else
  388. tra.LockedToPart = false
  389. tra.ZOffset = tra.ZOffset - 2.25
  390. end
  391. tra.VelocityInheritance = 0.2
  392. end
  393. if v.Name ~= "Head" then
  394. local M = Instance.new("SpecialMesh",v)M.MeshId = "rbxassetid://9856898" M.TextureId = "rbxassetid://64619306"
  395. M.Scale = Vector3.new(v.Size.X*2,v.Size.Y*2,v.Size.Z*2)
  396. end
  397. end
  398. end
  399. end
  400. end
  401. c.Head.Transparency = 1
  402. local P = Instance.new("Part",c)P.Size = Vector3.new(1,1,1)P.Anchored = false P.CanCollide = false P.Name = "HeadPart"
  403. local W = Instance.new("Weld",P)W.Part0 = P W.Part1 = c.Head
  404. local HM = Instance.new("SpecialMesh",P)HM.MeshId = "rbxassetid://539723444" HM.TextureId = "rbxassetid://64619306" HM.Scale = Vector3.new(0.97,0.97,0.97)
  405. wait()
  406. c.Head:FindFirstChild("face").Texture = ""
  407. if c:findFirstChild("Shirt")~=nil then
  408. c:findFirstChild("Shirt"):remove()
  409. end
  410. if c:findFirstChild("Pants")~=nil then
  411. c:findFirstChild("Pants"):remove()
  412. end
  413.  
  414. local flying = false
  415. local deb = true
  416. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  417. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  418. local maxspeed = 25
  419. local speed = 0
  420.  
  421. function Fly()
  422. local bg = Instance.new("BodyGyro", c.HumanoidRootPart)
  423. bg.P = 100000 bg.D = 100
  424. bg.maxTorque = Vector3.new(math.huge, 0, math.huge)
  425. bg.cframe = c.HumanoidRootPart.CFrame
  426. local bv = Instance.new("BodyVelocity", c.HumanoidRootPart)
  427. bv.velocity = Vector3.new(0,0.1,0)
  428. bv.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  429. repeat wait()
  430. c.Humanoid.PlatformStand = true
  431. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  432. speed = speed+1+(speed/maxspeed)
  433. if speed > maxspeed then
  434. speed = maxspeed
  435. end
  436. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  437. speed = speed-1
  438. if speed < 0 then
  439. speed = 0
  440. end
  441. end
  442. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  443. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  444. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  445. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  446. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  447. else
  448. bv.velocity = Vector3.new(0,0.1,0)
  449. end
  450. until not flying
  451. ctrl = {f = 0, b = 0, l = 0, r = 0}
  452. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  453. speed = 0
  454. bv:Destroy()
  455. c.Humanoid.PlatformStand = false
  456. end
  457.  
  458. Cloud = false
  459. function CloudForm()
  460. if Cloud == false then
  461. S.Volume = 1
  462. attack = true Cloud = true
  463. for i = 1,10 do
  464. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.1)
  465. lerpz(N, "C0", NC0 * cf(0, 0, -1) * ang(rd(0), rd(0), rd(0)), 0.1)
  466. lerpz(RS, "C0", RSC0 * cf(0, 0, -2) * ang(rd(0), rd(0), rd(0)), 0.1)
  467. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.1)
  468. lerpz(LS, "C0", LSC0 * cf(0, 0, -2) * ang(rd(0), rd(0), rd(0)), 0.1)
  469. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.1)
  470. lerpz(RH, "C0", RHC0 * cf(0, 2.2, 0) * ang(rd(0), rd(0), rd(0)), 0.1)
  471. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.1)
  472. lerpz(LH, "C0", LHC0 * cf(0, 2.2, 0) * ang(rd(0), rd(0), rd(0)), 0.1)
  473. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.1)
  474. swait()
  475. end
  476. lerpz(RJ, "C0", RJC0 * cf(0, 0, 2500) * ang(rd(0), rd(0), rd(0)), 1)
  477. local Cl = Instance.new("Part",c)Cl.Size = Vector3.new(10,10,10) Cl.CanCollide = false Cl.Anchored = false Cl.CFrame = c.HumanoidRootPart.CFrame
  478. Cl.CustomPhysicalProperties = PhysicalProperties.new(0,0.3,0.5)
  479. Cl.Material = "Sand" Cl.BrickColor = BrickColor.new("Really black") Cl.Name = "Cloud"
  480. HitInfect(Cl)
  481. for i2 = 1,2 do
  482. for i = 1,2 do
  483. local tra = S11:clone() tra.Parent = CL
  484. tra.Texture = "rbxassetid://744949545"
  485. tra.LightEmission = 0
  486. if i == 1 then
  487. tra.Color = ColorSequence.new(Color3.new(0/255,255/255,0/255))
  488. tra.ZOffset = 2.5
  489. else
  490. tra.Color = ColorSequence.new(Color3.new(0/255,0/255,0/255))
  491. tra.ZOffset = 3
  492. end
  493. tra.Lifetime = NumberRange.new(1,3)
  494. tra.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(0.1,1,0),NumberSequenceKeypoint.new(1,0,0)})
  495. tra.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(0.8,0,0),NumberSequenceKeypoint.new(1,1,0)})
  496. tra.Speed = NumberRange.new(0.5) tra.VelocitySpread = 360 tra.Name = "Glitch"
  497. if i2 == 1 then
  498. tra.LockedToPart = true
  499. tra.Speed = NumberRange.new(0.5)
  500. else
  501. tra.LockedToPart = false
  502. tra.Speed = NumberRange.new(4)
  503. end
  504. tra.Rate = 250
  505. tra.VelocityInheritance = 0.2
  506. end
  507. end
  508. local W = Instance.new("Weld",c.HumanoidRootPart)W.Part0 = c.HumanoidRootPart W.Part1 = Cl
  509. local M = Instance.new("SpecialMesh",Cl)M.MeshId = "rbxassetid://9856898" M.TextureId = "rbxassetid://64619306"
  510. for i = 1,80 do
  511. M.Scale = Vector3.new(i/4,i/4,i/4)
  512. c.HumanoidRootPart.CFrame = c.HumanoidRootPart.CFrame*CFrame.new(0,3,0)
  513. swait()
  514. end
  515. flying = true attack = false
  516. Fly()
  517. else
  518. attack = true S.Volume = 0.4
  519. if c:findFirstChild("Cloud") ~= nil then
  520. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  521. if c.HumanoidRootPart:findFirstChild("Smile")~= nil then
  522. for i = 1,20 do
  523. c.HumanoidRootPart.Smile.ImageLabel.ImageTransparency = c.HumanoidRootPart.Smile.ImageLabel.ImageTransparency + 0.05
  524. swait()
  525. end
  526. c.HumanoidRootPart.Smile:remove()
  527. end
  528. for i,v in pairs(c:findFirstChild("Cloud"):children()) do
  529. if v.Name == "Glitch" then
  530. v.Enabled = false
  531. end
  532. end
  533. for i = 1,80 do
  534. c:findFirstChild("Cloud").Mesh.Scale = c:findFirstChild("Cloud").Mesh.Scale - Vector3.new(0.25,0.25,0.25)
  535. swait()
  536. end
  537. game.Debris:AddItem(c:findFirstChild("Cloud"),2)
  538. Cloud = false end flying = false
  539. wait(2)
  540. attack = false
  541. end
  542. end
  543.  
  544. function CloudFace()
  545. if c.HumanoidRootPart:findFirstChild("Smile")~= nil then
  546. for i = 1,20 do
  547. c.HumanoidRootPart.Smile.ImageLabel.ImageTransparency = c.HumanoidRootPart.Smile.ImageLabel.ImageTransparency + 0.05
  548. swait()
  549. end
  550. c.HumanoidRootPart.Smile:remove()
  551. else
  552. local BillBoard = Instance.new("BillboardGui",c.HumanoidRootPart)BillBoard.Name = "Smile" BillBoard.AlwaysOnTop = true BillBoard.Size = UDim2.new(10,0,10,0)
  553. local Im = Instance.new("ImageLabel",BillBoard) Im.BackgroundTransparency = 1 Im.Size = UDim2.new(1,0,1,0)Im.Image = "rbxassetid://915081021"
  554. end
  555. end
  556.  
  557.  
  558. function VirusExplosion(Pos)
  559. for i = 1,10 do
  560. for i2 = 1,8 do
  561. local V = Instance.new("Part")V.Size = Vector3.new(1+i*20,0.5,10)V.Anchored = true V.CanCollide = false
  562. V.CFrame = Pos*CFrame.Angles(0,math.rad(45*i2),0) Virusify2(V) VirusFade(V)
  563. V.CFrame = V.CFrame*CFrame.new(0,3,2*i)HitInfect(V) V.Parent = game.Workspace
  564. end
  565. swait()
  566. end
  567. end
  568.  
  569. function VirusFade(H)
  570. spawn(function()
  571. for i = 1,10 do
  572. H.Transparency = H.Transparency + 1/10
  573. swait()
  574. end
  575. H:findFirstChild("Glitch").Enabled = false H:findFirstChild("Glitch2").Enabled = false
  576. game.Debris:AddItem(H,0.2)
  577. end)
  578. end
  579.  
  580. function VirusFade2(H)
  581. spawn(function()
  582. for i = 1,25 do
  583. H.Transparency = H.Transparency + 1/25
  584. swait()
  585. end
  586. H:findFirstChild("Glitch").Enabled = false H:findFirstChild("Glitch2").Enabled = false
  587. game.Debris:AddItem(H,4)
  588. end)
  589. end
  590.  
  591. function HammerSlam()
  592. c.HumanoidRootPart.Anchored = true
  593. attack = true
  594. AnimDis()
  595. for i = 1,15 do
  596. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(20), rd(0), rd(0)), 0.2)-- Y, X, Z
  597. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(20), rd(0), rd(0)), 0.2) -- Y, X, Z
  598. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(45), rd(65)), 0.2) -- Z, X, Y
  599. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(-45), rd(-65)), 0.2) -- Z, X, Y
  600. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(45)), 0.2)
  601. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-45)), 0.2)
  602. swait()
  603. end
  604. local H = Instance.new("Part",c)H.Size = Vector3.new(1,1,15)H.CanCollide = false
  605. local H2 = Instance.new("Part",c)H2.Size = Vector3.new(5,10,5)H2.CanCollide = false
  606. local W = Instance.new("Weld",c["Torso"])W.Part0 = c["Torso"] W.Part1 = H W.C0 = CFrame.new(0,-2,0)
  607. local W2 = Instance.new("Weld",H2)W2.Part0 = H2 W2.Part1 = H W2.C0 = CFrame.new(0,0,-4)
  608. Virusify(H) Virusify(H2)HitInfect(H)HitInfect(H2)
  609. for i = 1,45 do
  610. W.C0 = CFrame.new(0,2,4)*CFrame.Angles(math.rad(5),0,0)
  611. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(-20), rd(0), rd(0)), 0.2)-- Y, X, Z
  612. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(-20), rd(0), rd(0)), 0.2) -- Y, X, Z
  613. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(-45), rd(220)), 0.2) -- Z, X, Y
  614. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(45), rd(-220)), 0.2) -- Z, X, Y
  615. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-45)), 0.2)
  616. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(45)), 0.2)
  617. swait()
  618. end
  619. W.C0 = CFrame.new(0,3,-8)*CFrame.Angles(math.rad(200),0,0)
  620. for i = 1,15 do
  621. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(20), rd(0), rd(0)), 0.5)-- Y, X, Z
  622. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(20), rd(0), rd(0)), 0.5) -- Y, X, Z
  623. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(45), rd(65)), 0.5) -- Z, X, Y
  624. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(-45), rd(-65)), 0.5) -- Z, X, Y
  625. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(45)), 0.5)
  626. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-45)), 0.5)
  627. swait()
  628. end
  629. local S = Instance.new("Sound",H2)S.Volume = 2 S.SoundId = "rbxassetid://211062246" S:Play()
  630. for i = 1,45 do
  631. for i2 = 1,8 do
  632. local V = Instance.new("Part")V.Size = Vector3.new(10+i*4,1,10)V.Anchored = true V.CanCollide = false
  633. V.CFrame = H2.CFrame*CFrame.Angles(0,math.rad(45*i2),0) Virusify2(V) VirusFade(V)
  634. V.CFrame = V.CFrame*CFrame.new(0,3,5*i)HitInfect(V) V.Parent = game.Workspace
  635. end
  636. swait()
  637. end
  638. H.Anchored = true H2.Anchored = true
  639. W:remove() W2:remove()
  640. c.HumanoidRootPart.Anchored = false
  641. AnimDis()
  642. attack = false
  643. spawn(function()
  644. wait(3) H.Transparency = 1 H2.Transparency = 1
  645. H:findFirstChild("Glitch").Enabled = false H2:findFirstChild("Glitch").Enabled = false
  646. H:findFirstChild("Glitch2").Enabled = false H2:findFirstChild("Glitch2").Enabled = false
  647. game.Debris:AddItem(H,4) game.Debris:AddItem(H2,4)
  648. end)
  649. end
  650.  
  651. function Missiles()
  652. attack = true
  653. local Mis = Instance.new("Part",game.Workspace)Mis.Name = "GlitchMissle" Mis.Size = Vector3.new(2,2,12) Mis.CFrame = c.HumanoidRootPart.CFrame Virusify3(Mis)
  654. Mis.CFrame = CFrame.new(Mis.CFrame:toWorldSpace(CFrame.new(0,0,0)).p,mouse.hit.p+Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20)))
  655. Mis.CanCollide = false local BV = Instance.new("BodyVelocity",Mis)BV.Velocity = Mis.CFrame.lookVector*150 BV.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  656. local hit = false
  657. Mis.Touched:connect(function(Hit)
  658. if Hit.Parent ~= c then
  659. if hit == false then hit = true
  660. Mis.Anchored = true VirusFade2(Mis)
  661. VirusExplosion(CFrame.new(Mis.Position))
  662. end
  663. end
  664. end)
  665. wait(0.1)
  666. attack = false
  667. end
  668.  
  669. mouse.KeyDown:connect(function(key)
  670. if c.Humanoid.Health <= 0 then return end
  671. if attack == true then return end
  672. if Cloud == true then
  673. if key == "f" then
  674. CloudFace()
  675. end
  676. if key == "z" then
  677. Missiles()
  678. end
  679. elseif Cloud == false then
  680. if key == "z" then
  681. HammerSlam()
  682. end
  683. end
  684. if key == "m" then
  685. CloudForm()
  686. end
  687. end)
  688.  
  689. local LastPos = c.HumanoidRootPart.CFrame
  690. local Resetting = false
  691. function Reset()
  692. if Resetting == false then Resetting = true
  693. c.Parent = nil
  694. c.Humanoid.Health = math.huge c.Humanoid.MaxHealth = math.huge
  695. for i,v in pairs(c:children()) do if v.ClassName == "Part" then v:remove() end end
  696. local Tors = Instance.new("Part",c)Tors.Name = "Torso" Tors.Size = Vector3.new(2,2,1) Virusify(Tors)
  697. local Hed = Instance.new("Part",c)Hed.Name = "Head" Hed.Size = Vector3.new(2,1,1) Virusify(Hed) Hed.Transparency = 1
  698. makejoint(c.Torso, NC0, NC1, c.Torso, c.Head, "Neck")
  699. local Hum = Instance.new("Part",c)Hum.Name = "HumanoidRootPart" Hum.Size = Vector3.new(2,2,1) Hum.Transparency = 1
  700. makejoint(c.HumanoidRootPart, RJC0, RJC1, c.HumanoidRootPart, c.Torso, "RootJoint")
  701. local P = Instance.new("Part",c)P.Size = Vector3.new(1,1,1)P.Anchored = false P.CanCollide = false P.Name = "HeadPart"
  702. local W = Instance.new("Weld",P)W.Part0 = P W.Part1 = c.Head
  703. local HM = Instance.new("SpecialMesh",P)HM.MeshId = "rbxassetid://539723444" HM.TextureId = "rbxassetid://64619306" HM.Scale = Vector3.new(0.97,0.97,0.97)
  704. local RiArm = Instance.new("Part",c)RiArm.Name = "Right Arm" RiArm.Size = Vector3.new(1,2,1) Virusify(RiArm)
  705. makejoint(c.Torso, RSC0, RSC1, c.Torso, RiArm, "Right Shoulder")
  706. local LeArm = Instance.new("Part",c)LeArm.Name = "Left Arm" LeArm.Size = Vector3.new(1,2,1) Virusify(LeArm)
  707. makejoint(c.Torso, LSC0, LSC1, c.Torso, LeArm, "Left Shoulder")
  708. local RiLeg = Instance.new("Part",c)RiLeg.Name = "Right Leg" RiLeg.Size = Vector3.new(1,2,1) Virusify(RiLeg)
  709. makejoint(c.Torso, RHC0, RHC1, c.Torso, RiLeg, "Right Hip")
  710. local LeLeg = Instance.new("Part",c)LeLeg.Name = "Left Leg" LeLeg.Size = Vector3.new(1,2,1) Virusify(LeLeg)
  711. makejoint(c.Torso, LHC0, LHC1, c.Torso, LeLeg, "Left Hip")
  712. c.HumanoidRootPart.CFrame = LastPos*CFrame.new(math.random(-5,5),0,math.random(-5,5))
  713. Resetting = false c.Humanoid.Died:connect(Reset) c.Parent = game.Workspace
  714. end
  715. end
  716. c.Humanoid.Died:connect(Reset)
  717.  
  718. function onKeyPress(inputObject, gameProcessedEvent)
  719. if isTyping == true then return end
  720. if inputObject.KeyCode == Enum.KeyCode.W then ctrl.f = 1 end
  721. if inputObject.KeyCode == Enum.KeyCode.S then ctrl.b = -1 end
  722. if inputObject.KeyCode == Enum.KeyCode.A then ctrl.l = -1 end
  723. if inputObject.KeyCode == Enum.KeyCode.D then ctrl.r = 1 end
  724. end
  725. game:GetService("UserInputService").InputBegan:connect(onKeyPress)
  726.  
  727. function onKeyLift(inputObject, gameProcessedEvent)
  728. if isTyping == true then return end
  729. if inputObject.KeyCode == Enum.KeyCode.W then ctrl.f = 0 end
  730. if inputObject.KeyCode == Enum.KeyCode.S then ctrl.b = 0 end
  731. if inputObject.KeyCode == Enum.KeyCode.A then ctrl.l = 0 end
  732. if inputObject.KeyCode == Enum.KeyCode.D then ctrl.r = 0 end
  733. end
  734. game:GetService("UserInputService").InputEnded:connect(onKeyLift)
  735.  
  736. WholeBody = c:clone()
  737.  
  738. function makejoint(paren, co, ci, parto, parti, nam)local gloo = Instance.new("Motor6D")gloo.Name = nam gloo.C0 = co gloo.C1 = ci gloo.Part0 = parto gloo.Part1 = parti gloo.Parent = paren end
  739. idletime = 0
  740. sine = 0
  741. c.Humanoid.MaxHealth = c.Humanoid.MaxHealth + math.huge c.Humanoid.Health = c.Humanoid.Health + math.huge
  742. if Resetting == false then
  743. if c:findFirstChild("Head")== nil or c:findFirstChild("Torso")== nil or c:findFirstChild("HumanoidRootPart")== nil or c.HumanoidRootPart:findFirstChild("RootJoint")== nil then
  744. Reset()
  745. else
  746. LastPos = c.HumanoidRootPart.CFrame
  747. end
  748. if c.Torso:findFirstChild("Right Shoulder") == nil or c:findFirstChild("Right Arm")== nil then print("RA")
  749. local BodyPart = Instance.new("Part",c)BodyPart.Name = "Right Arm" BodyPart.Size = Vector3.new(1,2,1) Virusify(BodyPart)
  750. makejoint(c.Torso, RSC0, RSC1, c.Torso, BodyPart, "Right Shoulder")
  751. end
  752. if c.Torso:findFirstChild("Left Shoulder") == nil or c:findFirstChild("Left Arm")== nil then print("LA")
  753. local BodyPart = Instance.new("Part",c)BodyPart.Name = "Left Arm" BodyPart.Size = Vector3.new(1,2,1) Virusify(BodyPart)
  754. makejoint(c.Torso, LSC0, LSC1, c.Torso, BodyPart, "Left Shoulder")
  755. end
  756. if c.Torso:findFirstChild("Right Hip") == nil or c:findFirstChild("Right Leg")== nil then print("RL")
  757. local BodyPart = Instance.new("Part",c)BodyPart.Name = "Right Leg" BodyPart.Size = Vector3.new(1,2,1) Virusify(BodyPart)
  758. makejoint(c.Torso, RHC0, RHC1, c.Torso, BodyPart, "Right Hip")
  759. end
  760. if c.Torso:findFirstChild("Left Hip") == nil or c:findFirstChild("Left Leg")== nil then print("LL")
  761. local BodyPart = Instance.new("Part",c)BodyPart.Name = "Left Leg" BodyPart.Size = Vector3.new(1,2,1) Virusify(BodyPart)
  762. makejoint(c.Torso, LHC0, LHC1, c.Torso, BodyPart, "Left Hip")
  763. end
  764. local r = math.random(1,15)
  765. if r == 1 then S.PlaybackSpeed = math.random(1,50)/10 end
  766. if attack == false and Cloud == false then
  767. local r2 = math.random(1,50)
  768. if r2 == 1 then
  769. lerpz(RJ, "C0", RJC0 * cf(math.random(-5,5)/10, math.random(-5,5)/10, math.random(-5,5)/10) * ang(rd(0), rd(0), rd(0)), 1)-- Y, X, Z
  770. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1) -- Y, X, Z
  771. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1) -- Z, X, Y
  772. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1) -- Z, X, Y
  773. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1) -- Z, X, Y
  774. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1) -- Z, X, Y
  775. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  776. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  777. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  778. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  779. end
  780. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)-- Y, X, Z
  781. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5) -- Y, X, Z
  782. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5) -- Z, X, Y
  783. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5) -- Z, X, Y
  784. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5) -- Z, X, Y
  785. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5) -- Z, X, Y
  786. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  787. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  788. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  789. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  790. end
  791. end
  792. end)
Advertisement
Add Comment
Please, Sign In to add comment