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