SHOW:
|
|
- or go back to the newest paste.
1 | --[[ | |
2 | Zorex God Of Exploding script made by Magermash @ V3rm aka Sosa @ Roblox | |
3 | --]] | |
4 | ||
5 | local Player = game.Players.LocalPlayer | |
6 | local Mouse = Player:GetMouse() | |
7 | repeat wait() until Player.Character | |
8 | local Character = Player.Character | |
9 | local Humanoid = Character.Humanoid | |
10 | local Torso = Character.Torso | |
11 | local Head = Character.Head | |
12 | local RightArm = Character["Right Arm"] | |
13 | local LeftArm = Character["Left Arm"] | |
14 | local RightLeg = Character["Right Leg"] | |
15 | local LeftLeg = Character["Left Leg"] | |
16 | local Head = Character.Head | |
17 | local RightShoulder = Torso["Right Shoulder"] | |
18 | local LeftShoulder = Torso["Left Shoulder"] | |
19 | local Neck = Torso["Neck"] | |
20 | local RightHip = Torso["Right Hip"] | |
21 | local LeftHip = Torso["Left Hip"] | |
22 | wait(1) | |
23 | Instance.new("ForceField", Character) | |
24 | ||
25 | local NeckC0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) | |
26 | local NeckC1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) | |
27 | local LeftShoulderC0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
28 | local LeftShoulderC1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
29 | local RightShoulderC0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
30 | local RightShoulderC1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
31 | local LeftHipC0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
32 | local LeftHipC1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
33 | local RightHipC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
34 | local RightHipC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
35 | ||
36 | ||
37 | ||
38 | ||
39 | ||
40 | ||
41 | ||
42 | ||
43 | ||
44 | ||
45 | ||
46 | ||
47 | local Player = game.Players.LocalPlayer | |
48 | local Character = Player.Character | |
49 | local Humanoid = Character.Humanoid | |
50 | local Torso = Character.Torso | |
51 | local Head = Character.Head | |
52 | local mouse = Player:GetMouse() | |
53 | local Root = Character.HumanoidRootPart | |
54 | local RunService = game:GetService("RunService").RenderStepped | |
55 | local Lighting = game:GetService("Lighting") | |
56 | ||
57 | ||
58 | Player:ClearCharacterAppearance() | |
59 | wait(0.1) | |
60 | Player.Character.Head.BrickColor = BrickColor.new("Really black") | |
61 | Player.Character.Torso.BrickColor = BrickColor.new("Really black") | |
62 | Player.Character["Right Arm"].BrickColor = BrickColor.new("Really black") | |
63 | Player.Character["Right Leg"].BrickColor = BrickColor.new("Really black") | |
64 | Player.Character["Left Leg"].BrickColor = BrickColor.new("Really black") | |
65 | Player.Character["Left Arm"].BrickColor = BrickColor.new("Really black") | |
66 | pcall(function() Player.Character.Torso.roblox:Destroy() end) | |
67 | ||
68 | z = Instance.new("Sound", Character) | |
69 | z.SoundId = "rbxassetid://"--301463006 | |
70 | z.Looped = true | |
71 | z.Pitch = 1 | |
72 | z.Volume = math.huge | |
73 | wait(.1) | |
74 | z:Play() | |
75 | ||
76 | ||
77 | ||
78 | ||
79 | ||
80 | ||
81 | ||
82 | ||
83 | ||
84 | CV="Pastel blue" | |
85 | ||
86 | local txt = Instance.new("BillboardGui", Character) | |
87 | txt.Adornee = Character .Head | |
88 | txt.Name = "_status" | |
89 | txt.Size = UDim2.new(2, 0, 1.2, 0) | |
90 | txt.StudsOffset = Vector3.new(-9, 8, 0) | |
91 | local text = Instance.new("TextLabel", txt) | |
92 | text.Size = UDim2.new(10, 0, 7, 0) | |
93 | text.FontSize = "Size24" | |
94 | text.TextScaled = true | |
95 | text.TextTransparency = 0 | |
96 | text.BackgroundTransparency = 1 | |
97 | text.TextTransparency = 0 | |
98 | text.TextStrokeTransparency = 0 | |
99 | text.Font = "Antique" | |
100 | text.TextStrokeColor3 = Color3.new(255,85,0) | |
101 | ||
102 | v=Instance.new("Part") | |
103 | v.Name = "ColorBrick" | |
104 | v.Parent=Player.Character | |
105 | v.FormFactor="Symmetric" | |
106 | v.Anchored=true | |
107 | v.CanCollide=false | |
108 | v.BottomSurface="Smooth" | |
109 | v.TopSurface="Smooth" | |
110 | v.Size=Vector3.new(10,5,3) | |
111 | v.Transparency=1 | |
112 | v.CFrame=Character.Torso.CFrame | |
113 | v.BrickColor=BrickColor.new(CV) | |
114 | v.Transparency=1 | |
115 | text.TextColor3 = Color3.new(0,0,0) | |
116 | v.Shape="Block" | |
117 | text.Text = "Zorex God Of Exploding" | |
118 | ||
119 | ||
120 | ||
121 | ||
122 | ||
123 | ||
124 | ||
125 | local selectionBoxOfTorso = Instance.new("SelectionBox",Torso) | |
126 | selectionBoxOfTorso.Adornee = Torso | |
127 | selectionBoxOfTorso.Color = BrickColor.new("1020") | |
128 | selectionBoxOfTorso.LineThickness = 0.01 | |
129 | selectionBoxOfTorso.Transparency = 0 | |
130 | ||
131 | local selectionBoxOfRightArm = Instance.new("SelectionBox",Character["Right Arm"]) | |
132 | selectionBoxOfRightArm.Adornee = Character["Right Arm"] | |
133 | selectionBoxOfRightArm.Color = BrickColor.new("1020") | |
134 | selectionBoxOfRightArm.LineThickness = 0.01 | |
135 | selectionBoxOfRightArm.Transparency = 0 | |
136 | ||
137 | local selectionBoxOfRightLeg = Instance.new("SelectionBox",Character["Right Leg"]) | |
138 | selectionBoxOfRightLeg.Adornee = Character["Right Leg"] | |
139 | selectionBoxOfRightLeg.Color = BrickColor.new("1020") | |
140 | selectionBoxOfRightLeg.LineThickness = 0.01 | |
141 | selectionBoxOfRightLeg.Transparency = 0 | |
142 | ||
143 | local selectionBoxOfLeftArm = Instance.new("SelectionBox",Character["Left Arm"]) | |
144 | selectionBoxOfLeftArm.Adornee = Character["Left Arm"] | |
145 | selectionBoxOfLeftArm.Color = BrickColor.new("1020") | |
146 | selectionBoxOfLeftArm.LineThickness = 0.01 | |
147 | selectionBoxOfLeftArm.Transparency = 0 | |
148 | ||
149 | local selectionBoxOfLeftLeg = Instance.new("SelectionBox",Character["Left Leg"]) | |
150 | selectionBoxOfLeftLeg.Adornee = Character["Left Leg"] | |
151 | selectionBoxOfLeftLeg.Color = BrickColor.new("1020") | |
152 | selectionBoxOfLeftLeg.LineThickness = 0.01 | |
153 | selectionBoxOfLeftLeg.Transparency = 0 | |
154 | ||
155 | ||
156 | LightOnBody = Instance.new("PointLight", Head) | |
157 | LightOnBody.Brightness = 3000 | |
158 | LightOnBody.Range = 20 | |
159 | LightOnBody.Color = Color3.new(255, 85, 0) | |
160 | ||
161 | local HandCF = CFrame.new(Root.Position - Vector3.new(0,3,0)) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) | |
162 | local wave = Instance.new("Part", Torso) | |
163 | wave.BrickColor = BrickColor.new("Maroon") | |
164 | wave.Anchored = true | |
165 | wave.CanCollide = false | |
166 | wave.Locked = true | |
167 | wave.Size = Vector3.new(1, 1, 1) | |
168 | wave.TopSurface = "Smooth" | |
169 | wave.BottomSurface = "Smooth" | |
170 | wave.Transparency = 0.35 | |
171 | wave.CFrame = HandCF | |
172 | wm = Instance.new("SpecialMesh", wave) | |
173 | wm.MeshId = "rbxassetid://3270017" | |
174 | coroutine.wrap(function() | |
175 | for i = 1, 14, 1 do | |
176 | wm.Scale = Vector3.new(1 + i*1.1, 1 + i*1.1, 1) | |
177 | wave.Size = wm.Scale | |
178 | wave.CFrame = HandCF | |
179 | wave.Transparency = i/14 | |
180 | wait() | |
181 | end | |
182 | wait() | |
183 | wave:Destroy() | |
184 | end)() | |
185 | ||
186 | ||
187 | local function RefreshWelds() | |
188 | Neck.C0 = NeckC0 | |
189 | Neck.C1 = NeckC1 | |
190 | RightShoulder.C0 = RightShoulderC0 | |
191 | RightShoulder.C1 = RightShoulderC1 | |
192 | LeftShoulder.C0 = LeftShoulderC0 | |
193 | LeftShoulder.C1 = LeftShoulderC1 | |
194 | RightHip.C0 = RightHipC0 | |
195 | RightHip.C1 = RightHipC1 | |
196 | LeftHip.C0 = LeftHipC0 | |
197 | LeftHip.C1 = LeftHipC1 | |
198 | end | |
199 | ||
200 | local LastArm = "Left" | |
201 | local Active = false | |
202 | game:GetService("UserInputService").InputBegan:connect(function(Key, Gpe) | |
203 | if not Gpe then | |
204 | if Key.KeyCode == Enum.KeyCode.F and not Active then | |
205 | Active=true | |
206 | RefreshWelds() | |
207 | Torso.CFrame = CFrame.new(Torso.Position, Vector3.new(Mouse.hit.p.x, Torso.Position.Y, Mouse.hit.p.z)) | |
208 | Torso.Anchored=true | |
209 | Humanoid.PlatformStand = true | |
210 | for i = 1,3 do | |
211 | RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,-0.2,0.55) | |
212 | LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0, 0.2, -0.55) | |
213 | end | |
214 | local last1 | |
215 | local last2 | |
216 | local explosion = Instance.new("Sound", Character) | |
217 | explosion.Name="explosion" | |
218 | explosion.SoundId = "rbxassetid://2248511" | |
219 | explosion:Play() | |
220 | game.Debris:AddItem(explosion,10) | |
221 | spawn(function() | |
222 | for i = 1,15 do | |
223 | local p = Instance.new("Part", Character) | |
224 | p.Anchored=true | |
225 | p.CanCollide=false | |
226 | p.Transparency=1 | |
227 | p.Size=Vector3.new(.1,.1,.1) | |
228 | p.Shape = "Ball" | |
229 | p.BrickColor = BrickColor.new("Really black") | |
230 | game.Debris:AddItem(p,1) | |
231 | if not last1 then | |
232 | p.CFrame = Torso.CFrame * CFrame.Angles(0, math.rad(45), 0) * CFrame.new(0,0,-10) | |
233 | last1=p | |
234 | else | |
235 | p.CFrame = last1.CFrame * CFrame.new(0, 0,-i*5) | |
236 | last1=p | |
237 | end | |
238 | local explo = Instance.new("Explosion", workspace) | |
239 | explo.Position=p.Position | |
240 | explo.BlastPressure = math.huge | |
241 | explo.BlastRadius= math.huge | |
242 | wait() | |
243 | end | |
244 | end) | |
245 | spawn(function() | |
246 | for i = 1,15 do | |
247 | local p = Instance.new("Part", Character) | |
248 | p.Anchored=true | |
249 | p.CanCollide=false | |
250 | p.Transparency=1 | |
251 | p.Size=Vector3.new(.1,.1,.1) | |
252 | p.Shape = "Ball" | |
253 | p.BrickColor = BrickColor.new("Really black") | |
254 | game.Debris:AddItem(p,1) | |
255 | if not last2 then | |
256 | p.CFrame = Torso.CFrame * CFrame.Angles(0, math.rad(-45), 0) * CFrame.new(0,0,-10) | |
257 | last2=p | |
258 | else | |
259 | p.CFrame = last2.CFrame * CFrame.new(0,0 ,-i*5) | |
260 | last2=p | |
261 | end | |
262 | local explo = Instance.new("Explosion", workspace) | |
263 | explo.Position=p.Position | |
264 | explo.BlastPressure = math.huge | |
265 | explo.BlastRadius= math.huge | |
266 | wait() | |
267 | end | |
268 | end) | |
269 | wait(1) | |
270 | Torso.Anchored=false | |
271 | Humanoid.PlatformStand = false | |
272 | RefreshWelds() | |
273 | Active=false | |
274 | elseif Key.KeyCode == Enum.KeyCode.C and not Active then | |
275 | Active = true | |
276 | RefreshWelds() | |
277 | Torso.CFrame = CFrame.new(Torso.Position, Vector3.new(Mouse.hit.p.x, Torso.Position.Y, Mouse.hit.p.z)) | |
278 | Torso.Anchored=true | |
279 | Humanoid.PlatformStand = true | |
280 | for i = 1,3 do | |
281 | RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,0,0.5) | |
282 | LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0, 0, -0.5) | |
283 | wait() | |
284 | end | |
285 | local last1 | |
286 | local last2 | |
287 | local explosion = Instance.new("Sound", Character) | |
288 | explosion.Name="explosion" | |
289 | explosion.SoundId = "rbxassetid://2248511" | |
290 | explosion:Play() | |
291 | game.Debris:AddItem(explosion,10) | |
292 | spawn(function() | |
293 | for i = 1,15 do | |
294 | local p = Instance.new("Part", Character) | |
295 | p.Anchored=true | |
296 | p.CanCollide=false | |
297 | p.Transparency=1 | |
298 | p.Size=Vector3.new(.1,.1,.1) | |
299 | p.Shape = "Ball" | |
300 | p.BrickColor = BrickColor.new("Really black") | |
301 | game.Debris:AddItem(p,1) | |
302 | if not last1 then | |
303 | p.CFrame = Torso.CFrame * CFrame.new(0,0 ,-i*10) | |
304 | last1=p | |
305 | else | |
306 | p.CFrame = last1.CFrame * CFrame.new(0,0 ,-i*5) | |
307 | last1=p | |
308 | end | |
309 | local explo = Instance.new("Explosion", workspace) | |
310 | explo.Position=p.Position | |
311 | explo.BlastPressure = math.huge | |
312 | explo.BlastRadius= math.huge | |
313 | wait() | |
314 | end | |
315 | end) | |
316 | spawn(function() | |
317 | for i = 1,15 do | |
318 | local p = Instance.new("Part", Character) | |
319 | p.Anchored=true | |
320 | p.CanCollide=false | |
321 | p.Transparency=1 | |
322 | p.Size=Vector3.new(.1,.1,.1) | |
323 | p.Shape = "Ball" | |
324 | p.BrickColor = BrickColor.new("Really black") | |
325 | game.Debris:AddItem(p,1) | |
326 | if not last2 then | |
327 | p.CFrame = Torso.CFrame * CFrame.new(0,0 ,-i*10) | |
328 | last2=p | |
329 | else | |
330 | p.CFrame = last2.CFrame * CFrame.new(0,0 ,-i*5) | |
331 | last2=p | |
332 | end | |
333 | local explo = Instance.new("Explosion", workspace) | |
334 | explo.Position=p.Position | |
335 | explo.BlastPressure = math.huge | |
336 | explo.BlastRadius= math.huge | |
337 | wait() | |
338 | end | |
339 | end) | |
340 | wait(1) | |
341 | for i = 1,3 do | |
342 | RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,0,-0.5) | |
343 | LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0, 0, 0.5) | |
344 | wait() | |
345 | end | |
346 | Torso.Anchored=false | |
347 | Humanoid.PlatformStand = false | |
348 | RefreshWelds() | |
349 | Active=false | |
350 | elseif Key.KeyCode == Enum.KeyCode.E and not Active | |
351 | then Active = true | |
352 | RefreshWelds() | |
353 | Torso.Anchored=true | |
354 | Humanoid.PlatformStand=true | |
355 | if LastArm == "Left" then | |
356 | LastArm="Right" | |
357 | Torso.CFrame = Torso.CFrame * CFrame.Angles(0, math.rad(-45), 0) | |
358 | for i = 1,3 do | |
359 | RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,0,-0.5) | |
360 | wait() | |
361 | end | |
362 | wait(0.5) | |
363 | RefreshWelds() | |
364 | for i = 1,3 do | |
365 | RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,0,0.5) | |
366 | end | |
367 | Torso.CFrame = Torso.CFrame * CFrame.Angles(0, math.rad(45), 0) | |
368 | local p = Instance.new("Part", Character) | |
369 | p.Anchored=true | |
370 | p.CanCollide=false | |
371 | p.Transparency=1 | |
372 | p.Size=Vector3.new(.1,.1,.1) | |
373 | p.Shape = "Ball" | |
374 | p.BrickColor = BrickColor.new("Really black") | |
375 | p.CFrame = Torso.CFrame * CFrame.new(1.5, 0, -2) | |
376 | game.Debris:AddItem(p,3) | |
377 | local explosion = Instance.new("Sound", Character) | |
378 | explosion.Name="explosion" | |
379 | explosion.SoundId = "rbxassetid://2248511" | |
380 | explosion:Play() | |
381 | game.Debris:AddItem(explosion, 10) | |
382 | local explo = Instance.new("Explosion", workspace) | |
383 | explo.BlastPressure = math.huge | |
384 | explo.BlastRadius= math.huge | |
385 | explo.Position=p.Position | |
386 | elseif LastArm == "Right" then | |
387 | LastArm = "Left" | |
388 | Torso.CFrame = Torso.CFrame * CFrame.Angles(0, math.rad(45), 0) | |
389 | for i = 1,3 do | |
390 | LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0,0,0.5) | |
391 | wait() | |
392 | end | |
393 | wait(0.5) | |
394 | RefreshWelds() | |
395 | for i = 1,3 do | |
396 | LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0,0,-0.5) | |
397 | end | |
398 | Torso.CFrame = Torso.CFrame * CFrame.Angles(0, math.rad(-45), 0) | |
399 | local p = Instance.new("Part", Character) | |
400 | p.Anchored=true | |
401 | p.CanCollide=false | |
402 | p.Transparency=1 | |
403 | p.Size=Vector3.new(.1,.1,.1) | |
404 | p.Shape = "Ball" | |
405 | p.BrickColor = BrickColor.new("Really black") | |
406 | p.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, -2) | |
407 | game.Debris:AddItem(p,3) | |
408 | local explosion = Instance.new("Sound", Character) | |
409 | explosion.Name="explosion" | |
410 | explosion.SoundId = "rbxassetid://2248511" | |
411 | explosion:Play() | |
412 | game.Debris:AddItem(explosion, 10) | |
413 | local explo = Instance.new("Explosion", workspace) | |
414 | explo.BlastPressure = math.huge | |
415 | explo.BlastRadius= math.huge | |
416 | explo.Position=p.Position | |
417 | end | |
418 | wait(0.5) | |
419 | Active = false | |
420 | RefreshWelds() | |
421 | Torso.Anchored=false | |
422 | Humanoid.PlatformStand=false | |
423 | end | |
424 | end | |
425 | end) | |
426 | ||
427 | ||
428 | local time = tick() | |
429 | ||
430 | local plr = game:GetService("Players").LocalPlayer | |
431 | local mouse,char = plr:GetMouse(),plr.Character | |
432 | ||
433 | local amountGhosts = 5 | |
434 | ||
435 | for i,v in pairs(game:GetService("Workspace").CurrentCamera:GetChildren()) do v:Destroy() end | |
436 | ||
437 | local toggle,cd,mcd = false,false,false | |
438 | local ghosts = {} | |
439 | local temptab = {} | |
440 | ||
441 | char:WaitForChild("Animate"):Destroy() | |
442 | char.Humanoid:WaitForChild("Animator"):Destroy() | |
443 | ||
444 | local state = "idle" | |
445 | ||
446 | local gt = false | |
447 | ||
448 | local gyro = Instance.new("BodyGyro",char:WaitForChild("HumanoidRootPart")) --Stops the character from glitching out on enter/exit | |
449 | gyro.MaxTorque = Vector3.new(0,0,0) | |
450 | gyro.D = 0 | |
451 | gyro.P = 100000000 | |
452 | ||
453 | ||
454 | local wCol = BrickColor.new("Really red") | |
455 | local wCol2 = BrickColor.new("Really black") | |
456 | local gCol = BrickColor.new("Toothpaste") | |
457 | local gCol2 = BrickColor.new("Institutional white") | |
458 | ||
459 | function searchAll(m,clear) | |
460 | if clear then | |
461 | if clear == true then | |
462 | for i,v in pairs(temptab) do | |
463 | table.remove(temptab,1) | |
464 | end | |
465 | end | |
466 | end | |
467 | for i,v in pairs(m:GetChildren()) do | |
468 | if v then | |
469 | local s = v:Clone() | |
470 | for _,b in pairs(s:GetChildren()) do | |
471 | b:Destroy() | |
472 | end | |
473 | if s:IsA("Part") or s:IsA("WedgePart") or s:IsA("TrussPart") or s:IsA("UnionOperation") then | |
474 | if s.Name ~= "HumanoidRootPart" then | |
475 | s.Anchored = true | |
476 | s.CanCollide = false | |
477 | s.Transparency = 0.95 | |
478 | s.TopSurface = "Smooth" | |
479 | s.BottomSurface = "Smooth" | |
480 | s.FrontSurface = "Smooth" | |
481 | s.RightSurface = "Smooth" | |
482 | s.BackSurface = "Smooth" | |
483 | s.LeftSurface = "Smooth" | |
484 | if s.Material ~= Enum.Material.Neon then | |
485 | if gt == true then | |
486 | s.BrickColor = wCol2 | |
487 | else | |
488 | s.BrickColor = gCol2 | |
489 | end | |
490 | else | |
491 | if gt == true then | |
492 | s.BrickColor = wCol | |
493 | else | |
494 | s.BrickColor = gCol | |
495 | end | |
496 | end | |
497 | for _,c in pairs(v:GetChildren()) do | |
498 | if c:IsA("SpecialMesh") or c:IsA("CylinderMesh") then | |
499 | c:Clone().Parent = s | |
500 | end | |
501 | end | |
502 | local objValue = Instance.new("ObjectValue",s) | |
503 | objValue.Name = "Target" | |
504 | objValue.Value = v | |
505 | table.insert(temptab,s) | |
506 | end | |
507 | --elseif s:IsA("CharacterMesh") then | |
508 | --table.insert(temptab,s) | |
509 | end | |
510 | --searchAll(v) | |
511 | end | |
512 | end | |
513 | return temptab | |
514 | end | |
515 | ||
516 | function CreateGhost() | |
517 | local ghost = Instance.new("Model",game.Workspace) | |
518 | searchAll(char,true) | |
519 | ghost.Name = char.Name.."'s Ghost "..#ghosts..#plr.Name | |
520 | --Instance.new("Humanoid",ghost) | |
521 | for i,v in pairs(temptab) do | |
522 | v:Clone().Parent = ghost | |
523 | end | |
524 | table.insert(ghosts,ghost) | |
525 | end | |
526 | ||
527 | function ClearGhosts() | |
528 | for i,v in pairs(ghosts) do | |
529 | v:Destroy() | |
530 | end | |
531 | for i,v in pairs(ghosts) do | |
532 | table.remove(ghosts,1) | |
533 | end | |
534 | for i,v in pairs(game:GetService("Workspace"):GetChildren()) do | |
535 | if string.sub(v.Name,1,#plr.Name+9) == plr.Name.."'s Ghost " then | |
536 | v:Destroy() | |
537 | end | |
538 | end | |
539 | end | |
540 | ||
541 | Instance.new("ForceField",char).Visible = false | |
542 | ||
543 | local e1 = Instance.new("Part",char) | |
544 | e1.Size = Vector3.new(0.2,0.2,0.2) | |
545 | e1.TopSurface = "Smooth" | |
546 | e1.BottomSurface = "Smooth" | |
547 | e1.Material = "Neon" | |
548 | e1.Transparency = 1 | |
549 | e1.Anchored = true | |
550 | e1.CanCollide = false | |
551 | e1.BrickColor = gCol | |
552 | e1.CFrame = char.Head.CFrame * CFrame.new(0.15,0.1,-0.6) | |
553 | local em1 = Instance.new("SpecialMesh",e1) | |
554 | em1.MeshType = "Sphere" | |
555 | local e2 = Instance.new("Part",char) | |
556 | e2.Size = Vector3.new(0.2,0.2,0.2) | |
557 | e2.TopSurface = "Smooth" | |
558 | e2.BottomSurface = "Smooth" | |
559 | e2.Transparency = 1 | |
560 | e2.Material = "Neon" | |
561 | e2.Anchored = true | |
562 | e2.CanCollide = false | |
563 | e2.BrickColor = gCol | |
564 | e2.CFrame = char.Head.CFrame * CFrame.new(-0.15,0.1,-0.6) | |
565 | local em2 = Instance.new("SpecialMesh",e2) | |
566 | em2.MeshType = "Sphere" | |
567 | ||
568 | toggle = true | |
569 | for i=1,amountGhosts do | |
570 | CreateGhost() | |
571 | end | |
572 | char.Parent = game:GetService("Workspace").CurrentCamera | |
573 | char:FindFirstChild("Head").Transparency = 1 | |
574 | char:FindFirstChild("Torso").Transparency = 1 | |
575 | char:FindFirstChild("Right Arm").Transparency = 1 | |
576 | char:FindFirstChild("Left Arm").Transparency = 1 | |
577 | char:FindFirstChild("Right Leg").Transparency = 1 | |
578 | char:FindFirstChild("Left Leg").Transparency = 1 | |
579 | for i,v in pairs(char:GetChildren()) do | |
580 | if v:IsA("Accessory") then | |
581 | v:FindFirstChild("Handle").Transparency = 1 | |
582 | end | |
583 | end | |
584 | char:FindFirstChild("Head"):FindFirstChild("face"):Destroy() | |
585 | ||
586 | local p1 = Instance.new("Part",workspace) | |
587 | local m1 = Instance.new("SpecialMesh",p1) | |
588 | m1.MeshType = "Sphere" | |
589 | m1.Scale = Vector3.new(5,5,5) | |
590 | p1.Size = Vector3.new(1,1,1) | |
591 | p1.Anchored = true | |
592 | p1.CanCollide = false | |
593 | p1.TopSurface = "Smooth" | |
594 | p1.BottomSurface = "Smooth" | |
595 | p1.BrickColor = gCol | |
596 | p1.Material = "Neon" | |
597 | local p2 = Instance.new("Part",workspace) | |
598 | local m2 = Instance.new("SpecialMesh",p2) | |
599 | m2.MeshType = "Sphere" | |
600 | m2.Scale = Vector3.new(8,8,8) | |
601 | p2.Size = Vector3.new(1,1,1) | |
602 | p2.Anchored = true | |
603 | p2.CanCollide = false | |
604 | p2.TopSurface = "Smooth" | |
605 | p2.BottomSurface = "Smooth" | |
606 | p2.BrickColor = gCol2 | |
607 | p2.Material = "Neon" | |
608 | local p3 = Instance.new("Part",workspace) | |
609 | local m3 = Instance.new("BlockMesh",p3) | |
610 | m3.Scale = Vector3.new(7,7,7) | |
611 | p3.Size = Vector3.new(1,1,1) | |
612 | p3.Transparency = 0.4 | |
613 | p3.Anchored = true | |
614 | p3.CanCollide = false | |
615 | p3.TopSurface = "Smooth" | |
616 | p3.BottomSurface = "Smooth" | |
617 | p3.BrickColor = gCol | |
618 | p3.Material = "Neon" | |
619 | local p4 = Instance.new("Part",workspace) | |
620 | local m4 = Instance.new("BlockMesh",p4) | |
621 | m4.Scale = Vector3.new(10,10,10) | |
622 | p4.Size = Vector3.new(1,1,1) | |
623 | p4.Transparency = 0.4 | |
624 | p4.Anchored = true | |
625 | p4.CanCollide = false | |
626 | p4.TopSurface = "Smooth" | |
627 | p4.BottomSurface = "Smooth" | |
628 | p4.BrickColor = gCol2 | |
629 | p4.Material = "Neon" | |
630 | local currentframe = 0 | |
631 | local frmR | |
632 | ||
633 | frmR = game:GetService("RunService").RenderStepped:connect(function() | |
634 | currentframe = currentframe + 1 | |
635 | if currentframe < 1*60 then | |
636 | p1.CFrame = char:WaitForChild("Torso").CFrame | |
637 | p2.CFrame = char:WaitForChild("Torso").CFrame | |
638 | p3.CFrame = char:WaitForChild("Torso").CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360))) | |
639 | p4.CFrame = char:WaitForChild("Torso").CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360))) | |
640 | m1.Scale = m1.Scale + Vector3.new(0.25,0.25,0.25) | |
641 | m2.Scale = m2.Scale + Vector3.new(0.25,0.25,0.25) | |
642 | m3.Scale = m3.Scale + Vector3.new(0.25,0.25,0.25) | |
643 | m4.Scale = m4.Scale + Vector3.new(0.25,0.25,0.25) | |
644 | p1.Transparency = p1.Transparency + (1/(1*60)) | |
645 | p2.Transparency = p2.Transparency + (1/(1*60)) | |
646 | p3.Transparency = p3.Transparency + (1/(1*60)) | |
647 | p4.Transparency = p4.Transparency + (1/(1*60)) | |
648 | else | |
649 | p1:Destroy() | |
650 | p2:Destroy() | |
651 | p3:Destroy() | |
652 | p4:Destroy() | |
653 | frmR:disconnect() | |
654 | end | |
655 | end) | |
656 | ||
657 | char.Humanoid.MaxHealth = math.huge | |
658 | wait() | |
659 | char.Humanoid.Health = math.huge | |
660 | ||
661 | --[[mouse.KeyDown:connect(function(key) | |
662 | if key == "r" then | |
663 | print("R!") | |
664 | if cd == false then | |
665 | print("No cooldown!") | |
666 | cd = true | |
667 | if toggle == false then | |
668 | print("Entering godmode") | |
669 | toggle = true | |
670 | Instance.new("ForceField",char) | |
671 | for i=1,amountGhosts do | |
672 | CreateGhost() | |
673 | end | |
674 | char.Parent = game:GetService("Workspace").CurrentCamera | |
675 | char:FindFirstChild("Head").Transparency = 1 | |
676 | char:FindFirstChild("Torso").Transparency = 1 | |
677 | char:FindFirstChild("Right Arm").Transparency = 1 | |
678 | char:FindFirstChild("Left Arm").Transparency = 1 | |
679 | char:FindFirstChild("Right Leg").Transparency = 1 | |
680 | char:FindFirstChild("Left Leg").Transparency = 1 | |
681 | for i,v in pairs(char:GetChildren()) do | |
682 | if v:IsA("Accessory") then | |
683 | v:FindFirstChild("Handle").Transparency = 1 | |
684 | end | |
685 | end | |
686 | else | |
687 | print("Exiting godmode") | |
688 | toggle = false | |
689 | for i,v in pairs(ghosts) do | |
690 | v:Destroy() | |
691 | end | |
692 | char.Parent = game:GetService("Workspace") | |
693 | char:FindFirstChild("ForceField"):Destroy() | |
694 | char:FindFirstChild("Head").Transparency = 0 | |
695 | char:FindFirstChild("Torso").Transparency = 0 | |
696 | char:FindFirstChild("Right Arm").Transparency = 0 | |
697 | char:FindFirstChild("Left Arm").Transparency = 0 | |
698 | char:FindFirstChild("Right Leg").Transparency = 0 | |
699 | char:FindFirstChild("Left Leg").Transparency = 0 | |
700 | for i,v in pairs(char:GetChildren()) do | |
701 | if v:IsA("Accessory") then | |
702 | v:FindFirstChild("Handle").Transparency = 0 | |
703 | end | |
704 | end | |
705 | end | |
706 | cd = false | |
707 | end | |
708 | end | |
709 | end)]] | |
710 | ||
711 | mouse.KeyDown:connect(function(key) | |
712 | spawn(function() | |
713 | if key == "f" and toggle == true and mcd == false then | |
714 | if #ghosts < amountGhosts then | |
715 | print(#ghosts.."<") | |
716 | mcd = true | |
717 | ||
718 | ClearGhosts() | |
719 | ||
720 | for i=1,amountGhosts do | |
721 | CreateGhost() | |
722 | end | |
723 | local p1 = Instance.new("Part",workspace) | |
724 | local m1 = Instance.new("SpecialMesh",p1) | |
725 | m1.MeshType = "Sphere" | |
726 | m1.Scale = Vector3.new(7,7,7) | |
727 | p1.Size = Vector3.new(1,1,1) | |
728 | p1.Anchored = true | |
729 | p1.CanCollide = false | |
730 | p1.TopSurface = "Smooth" | |
731 | p1.BottomSurface = "Smooth" | |
732 | if gt == false then | |
733 | p1.BrickColor = gCol | |
734 | else | |
735 | p1.BrickColor = wCol | |
736 | end | |
737 | p1.Material = "Neon" | |
738 | local p2 = Instance.new("Part",workspace) | |
739 | local m2 = Instance.new("SpecialMesh",p2) | |
740 | m2.MeshType = "Sphere" | |
741 | m2.Scale = Vector3.new(9,9,9) | |
742 | p2.Size = Vector3.new(1,1,1) | |
743 | p2.Anchored = true | |
744 | p2.CanCollide = false | |
745 | p2.TopSurface = "Smooth" | |
746 | p2.BottomSurface = "Smooth" | |
747 | if gt == false then | |
748 | p2.BrickColor = gCol2 | |
749 | else | |
750 | p2.BrickColor = wCol2 | |
751 | end | |
752 | p2.Material = "Neon" | |
753 | local currentframe = 0 | |
754 | local frmR | |
755 | ||
756 | frmR = game:GetService("RunService").RenderStepped:connect(function() | |
757 | currentframe = currentframe + 1 | |
758 | if currentframe < 0.25*60 then | |
759 | p1.CFrame = char:WaitForChild("Torso").CFrame | |
760 | p2.CFrame = char:WaitForChild("Torso").CFrame | |
761 | p1.Transparency = p1.Transparency + (1/(0.25*60)) | |
762 | p2.Transparency = p2.Transparency + (1/(0.25*60)) | |
763 | else | |
764 | p1:Destroy() | |
765 | p2:Destroy() | |
766 | mcd = false | |
767 | frmR:disconnect() | |
768 | end | |
769 | end) | |
770 | else | |
771 | mcd = true | |
772 | ||
773 | ClearGhosts() | |
774 | ||
775 | local p1 = Instance.new("Part",workspace) | |
776 | local m1 = Instance.new("SpecialMesh",p1) | |
777 | m1.MeshType = "Sphere" | |
778 | m1.Scale = Vector3.new(7,7,7) | |
779 | p1.Size = Vector3.new(1,1,1) | |
780 | p1.Anchored = true | |
781 | p1.CanCollide = false | |
782 | p1.TopSurface = "Smooth" | |
783 | p1.BottomSurface = "Smooth" | |
784 | if gt == false then | |
785 | p1.BrickColor = gCol | |
786 | else | |
787 | p1.BrickColor = wCol | |
788 | end | |
789 | p1.Material = "Neon" | |
790 | local p2 = Instance.new("Part",workspace) | |
791 | local m2 = Instance.new("SpecialMesh",p2) | |
792 | m2.MeshType = "Sphere" | |
793 | m2.Scale = Vector3.new(9,9,9) | |
794 | p2.Size = Vector3.new(1,1,1) | |
795 | p2.Anchored = true | |
796 | p2.CanCollide = false | |
797 | p2.TopSurface = "Smooth" | |
798 | p2.BottomSurface = "Smooth" | |
799 | if gt == false then | |
800 | p2.BrickColor = gCol2 | |
801 | else | |
802 | p2.BrickColor = wCol2 | |
803 | end | |
804 | p2.Material = "Neon" | |
805 | local currentframe = 0 | |
806 | local frmR | |
807 | ||
808 | frmR = game:GetService("RunService").RenderStepped:connect(function() | |
809 | currentframe = currentframe + 1 | |
810 | if currentframe < 0.25*60 then | |
811 | p1.CFrame = char:WaitForChild("Torso").CFrame | |
812 | p2.CFrame = char:WaitForChild("Torso").CFrame | |
813 | p1.Transparency = p1.Transparency + (1/(0.25*60)) | |
814 | p2.Transparency = p2.Transparency + (1/(0.25*60)) | |
815 | else | |
816 | p1:Destroy() | |
817 | p2:Destroy() | |
818 | mcd = false | |
819 | frmR:disconnect() | |
820 | end | |
821 | end) | |
822 | end | |
823 | elseif key == "g" and toggle == true and mcd == false then | |
824 | if gt == true then | |
825 | gt = false | |
826 | local p1 = Instance.new("Part",workspace) | |
827 | local m1 = Instance.new("SpecialMesh",p1) | |
828 | m1.MeshType = "Sphere" | |
829 | m1.Scale = Vector3.new(5,5,5) | |
830 | p1.Size = Vector3.new(1,1,1) | |
831 | p1.Anchored = true | |
832 | p1.CanCollide = false | |
833 | p1.TopSurface = "Smooth" | |
834 | p1.BottomSurface = "Smooth" | |
835 | p1.BrickColor = gCol | |
836 | p1.Material = "Neon" | |
837 | local p2 = Instance.new("Part",workspace) | |
838 | local m2 = Instance.new("SpecialMesh",p2) | |
839 | m2.MeshType = "Sphere" | |
840 | m2.Scale = Vector3.new(8,8,8) | |
841 | p2.Size = Vector3.new(1,1,1) | |
842 | p2.Anchored = true | |
843 | p2.CanCollide = false | |
844 | p2.TopSurface = "Smooth" | |
845 | p2.BottomSurface = "Smooth" | |
846 | p2.BrickColor = gCol2 | |
847 | p2.Material = "Neon" | |
848 | local p3 = Instance.new("Part",workspace) | |
849 | local m3 = Instance.new("BlockMesh",p3) | |
850 | m3.Scale = Vector3.new(7,7,7) | |
851 | p3.Size = Vector3.new(1,1,1) | |
852 | p3.Transparency = 0.4 | |
853 | p3.Anchored = true | |
854 | p3.CanCollide = false | |
855 | p3.TopSurface = "Smooth" | |
856 | p3.BottomSurface = "Smooth" | |
857 | p3.BrickColor = gCol | |
858 | p3.Material = "Neon" | |
859 | local p4 = Instance.new("Part",workspace) | |
860 | local m4 = Instance.new("BlockMesh",p4) | |
861 | m4.Scale = Vector3.new(10,10,10) | |
862 | p4.Size = Vector3.new(1,1,1) | |
863 | p4.Transparency = 0.4 | |
864 | p4.Anchored = true | |
865 | p4.CanCollide = false | |
866 | p4.TopSurface = "Smooth" | |
867 | p4.BottomSurface = "Smooth" | |
868 | p4.BrickColor = gCol2 | |
869 | p4.Material = "Neon" | |
870 | ||
871 | ClearGhosts() | |
872 | ||
873 | for i=1,amountGhosts do | |
874 | CreateGhost() | |
875 | end | |
876 | ||
877 | local currentframe = 0 | |
878 | local frmR | |
879 | ||
880 | frmR = game:GetService("RunService").RenderStepped:connect(function() | |
881 | currentframe = currentframe + 1 | |
882 | if currentframe < 1*60 then | |
883 | p1.CFrame = char:WaitForChild("Torso").CFrame | |
884 | p2.CFrame = char:WaitForChild("Torso").CFrame | |
885 | p3.CFrame = char:WaitForChild("Torso").CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360))) | |
886 | p4.CFrame = char:WaitForChild("Torso").CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360))) | |
887 | m1.Scale = m1.Scale + Vector3.new(0.25,0.25,0.25) | |
888 | m2.Scale = m2.Scale + Vector3.new(0.25,0.25,0.25) | |
889 | m3.Scale = m3.Scale + Vector3.new(0.25,0.25,0.25) | |
890 | m4.Scale = m4.Scale + Vector3.new(0.25,0.25,0.25) | |
891 | p1.Transparency = p1.Transparency + (1/(1*60)) | |
892 | p2.Transparency = p2.Transparency + (1/(1*60)) | |
893 | p3.Transparency = p3.Transparency + (1/(1*60)) | |
894 | p4.Transparency = p4.Transparency + (1/(1*60)) | |
895 | else | |
896 | p1:Destroy() | |
897 | p2:Destroy() | |
898 | p3:Destroy() | |
899 | p4:Destroy() | |
900 | frmR:disconnect() | |
901 | end | |
902 | end) | |
903 | else | |
904 | gt = true | |
905 | local p1 = Instance.new("Part",workspace) | |
906 | local m1 = Instance.new("SpecialMesh",p1) | |
907 | m1.MeshType = "Sphere" | |
908 | m1.Scale = Vector3.new(5,5,5) | |
909 | p1.Size = Vector3.new(1,1,1) | |
910 | p1.Anchored = true | |
911 | p1.CanCollide = false | |
912 | p1.TopSurface = "Smooth" | |
913 | p1.BottomSurface = "Smooth" | |
914 | p1.BrickColor = wCol | |
915 | p1.Material = "Neon" | |
916 | local p2 = Instance.new("Part",workspace) | |
917 | local m2 = Instance.new("SpecialMesh",p2) | |
918 | m2.MeshType = "Sphere" | |
919 | m2.Scale = Vector3.new(8,8,8) | |
920 | p2.Size = Vector3.new(1,1,1) | |
921 | p2.Anchored = true | |
922 | p2.CanCollide = false | |
923 | p2.TopSurface = "Smooth" | |
924 | p2.BottomSurface = "Smooth" | |
925 | p2.BrickColor = wCol2 | |
926 | p2.Material = "Neon" | |
927 | local p3 = Instance.new("Part",workspace) | |
928 | local m3 = Instance.new("BlockMesh",p3) | |
929 | m3.Scale = Vector3.new(7,7,7) | |
930 | p3.Size = Vector3.new(1,1,1) | |
931 | p3.Transparency = 0.4 | |
932 | p3.Anchored = true | |
933 | p3.CanCollide = false | |
934 | p3.TopSurface = "Smooth" | |
935 | p3.BottomSurface = "Smooth" | |
936 | p3.BrickColor = wCol | |
937 | p3.Material = "Neon" | |
938 | local p4 = Instance.new("Part",workspace) | |
939 | local m4 = Instance.new("BlockMesh",p4) | |
940 | m4.Scale = Vector3.new(10,10,10) | |
941 | p4.Size = Vector3.new(1,1,1) | |
942 | p4.Transparency = 0.4 | |
943 | p4.Anchored = true | |
944 | p4.CanCollide = false | |
945 | p4.TopSurface = "Smooth" | |
946 | p4.BottomSurface = "Smooth" | |
947 | p4.BrickColor = wCol2 | |
948 | p4.Material = "Neon" | |
949 | ||
950 | ClearGhosts() | |
951 | ||
952 | for i=1,amountGhosts do | |
953 | CreateGhost() | |
954 | end | |
955 | ||
956 | local currentframe = 0 | |
957 | local frmR | |
958 | ||
959 | frmR = game:GetService("RunService").RenderStepped:connect(function() | |
960 | currentframe = currentframe + 1 | |
961 | if currentframe < 1*60 then | |
962 | p1.CFrame = char:WaitForChild("Torso").CFrame | |
963 | p2.CFrame = char:WaitForChild("Torso").CFrame | |
964 | p3.CFrame = char:WaitForChild("Torso").CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360))) | |
965 | p4.CFrame = char:WaitForChild("Torso").CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360))) | |
966 | m1.Scale = m1.Scale + Vector3.new(0.25,0.25,0.25) | |
967 | m2.Scale = m2.Scale + Vector3.new(0.25,0.25,0.25) | |
968 | m3.Scale = m3.Scale + Vector3.new(0.25,0.25,0.25) | |
969 | m4.Scale = m4.Scale + Vector3.new(0.25,0.25,0.25) | |
970 | p1.Transparency = p1.Transparency + (1/(1*60)) | |
971 | p2.Transparency = p2.Transparency + (1/(1*60)) | |
972 | p3.Transparency = p3.Transparency + (1/(1*60)) | |
973 | p4.Transparency = p4.Transparency + (1/(1*60)) | |
974 | else | |
975 | p1:Destroy() | |
976 | p2:Destroy() | |
977 | p3:Destroy() | |
978 | p4:Destroy() | |
979 | frmR:disconnect() | |
980 | end | |
981 | end) | |
982 | end | |
983 | end | |
984 | end) | |
985 | end) | |
986 | ||
987 | local frm = 0 | |
988 | ||
989 | local toRemove = {} | |
990 | ||
991 | game:GetService("RunService").RenderStepped:connect(function() | |
992 | frm = frm + 1 | |
993 | if char.Parent == game:GetService("Workspace").CurrentCamera then | |
994 | ||
995 | e1.CFrame = char.Head.CFrame * CFrame.new(0.15,0.1,-0.55) | |
996 | e2.CFrame = char.Head.CFrame * CFrame.new(-0.15,0.1,-0.55) | |
997 | ||
998 | local delay = 0.9 | |
999 | ||
1000 | for i,v in pairs(ghosts) do | |
1001 | for _,b in pairs(v:GetChildren()) do | |
1002 | if b:IsA("Part") or b:IsA("WedgePart") or b:IsA("TrussPart") or b:IsA("UnionOperation") then | |
1003 | b.CFrame = b.CFrame:lerp(b:FindFirstChild("Target").Value.CFrame,delay) | |
1004 | end | |
1005 | end | |
1006 | delay = delay - (0.5/(#ghosts+1)) | |
1007 | end | |
1008 | ||
1009 | --[[if math.floor(frm/8) == frm/8 then | |
1010 | local isub = 0 | |
1011 | for i,v in pairs(ghosts) do | |
1012 | if #v:GetChildren() < 6 then | |
1013 | v:Destroy() | |
1014 | table.remove(ghosts,i - isub) | |
1015 | isub = isub + 1 | |
1016 | CreateGhost() | |
1017 | end | |
1018 | end | |
1019 | end]] | |
1020 | end | |
1021 | ||
1022 | --Animation states | |
1023 | ||
1024 | local ray = Ray.new(char.HumanoidRootPart.CFrame.p, Vector3.new(0,-3,0).unit*4) | |
1025 | local part,pos,normal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(ray,ghosts,false,true) | |
1026 | ||
1027 | if state ~= "busy" then | |
1028 | if char.HumanoidRootPart.Velocity.Magnitude <= 0.5 then | |
1029 | state = "idle" | |
1030 | elseif char.HumanoidRootPart.Velocity.Magnitude > 0.5 then | |
1031 | state = "running" | |
1032 | --[[elseif char.HumanoidRootPart.Velocity.Y < 0.1 and not part then | |
1033 | state = "falling" | |
1034 | elseif char.HumanoidRootPart.Velocity.Y >= 0.1 and not part then | |
1035 | state = "jumping"]] | |
1036 | end | |
1037 | char.Humanoid.WalkSpeed = 32 | |
1038 | char.Humanoid.JumpPower = 70 | |
1039 | end | |
1040 | ||
1041 | --Actual animations | |
1042 | ||
1043 | if state == "idle" then | |
1044 | char.HumanoidRootPart.RootJoint.C0 = char.HumanoidRootPart.RootJoint.C0:lerp(CFrame.new(0,1 + (math.cos(tick())/5),0) * CFrame.Angles(math.rad(80 + math.cos(tick())*4),math.rad(180),math.rad(0)),0.06) | |
1045 | char.Torso["Right Hip"].C0 = char.Torso["Right Hip"].C0:lerp(CFrame.new(0.5,-0.1 + (math.cos((tick())*2)/10),-0.2) * CFrame.Angles(math.rad(-20),math.rad(0),math.rad(0)),0.06) | |
1046 | char.Torso["Left Hip"].C0 = char.Torso["Left Hip"].C0:lerp(CFrame.new(-0.5,-0.5 + (math.cos((tick()-0.5)*2)/6),0.3) * CFrame.Angles(math.rad(-10),math.rad(0),math.rad(0)),0.06) | |
1047 | char.Torso["Right Shoulder"].C0 = char.Torso["Right Shoulder"].C0:lerp(CFrame.new(1.5,0.43 + (math.cos((tick()-0.5)*1.5)/30),-0.6) * CFrame.Angles(math.rad(math.cos((tick())*2)*10),math.rad(0),math.rad(math.cos(tick()/3)*3)),0.06) | |
1048 | char.Torso["Left Shoulder"].C0 = char.Torso["Left Shoulder"].C0:lerp(CFrame.new(-1.5,0.3 + (math.cos((tick()-0.5)*1.5)/30),-0.6) * CFrame.Angles(math.rad(-15 + math.cos((tick()))*7),math.rad(0),math.rad(math.cos(tick()/2)*4)),0.06) | |
1049 | char.Torso.Neck.C0 = char.Torso.Neck.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(math.rad(90 + math.cos(tick()*1.5)*6),math.rad(180),math.rad(0)),0.06) | |
1050 | elseif state == "running" then | |
1051 | char.HumanoidRootPart.RootJoint.C0 = char.HumanoidRootPart.RootJoint.C0:lerp(CFrame.new(0,1 + (math.cos(tick())/5),0) * CFrame.Angles(math.rad(65 + math.cos(tick())*4),math.rad(180),math.rad(-char.HumanoidRootPart.RotVelocity.Y*10)),0.06) | |
1052 | char.Torso["Right Hip"].C0 = char.Torso["Right Hip"].C0:lerp(CFrame.new(0.5,-0.1 + (math.cos((tick())*2)/10),-0.2) * CFrame.Angles(math.rad(-20),math.rad(0),math.rad(0)),0.06) | |
1053 | char.Torso["Left Hip"].C0 = char.Torso["Left Hip"].C0:lerp(CFrame.new(-0.5,-0.5 + (math.cos((tick()-0.5)*2)/6),0.3) * CFrame.Angles(math.rad(-10),math.rad(0),math.rad(0)),0.06) | |
1054 | char.Torso["Right Shoulder"].C0 = char.Torso["Right Shoulder"].C0:lerp(CFrame.new(1.5,0.70 + (math.cos((tick()-0.5)*1.5)/30),-0.4) * CFrame.Angles(math.rad(50 + math.cos((tick())*2)*10),math.rad(0),math.rad(math.cos(tick()/3)*3)),0.06) | |
1055 | char.Torso["Left Shoulder"].C0 = char.Torso["Left Shoulder"].C0:lerp(CFrame.new(-1.5,0.3 + (math.cos((tick()-0.5)*1.5)/30),-0.4) * CFrame.Angles(math.rad(-35 + math.cos((tick()))*7),math.rad(0),math.rad(math.cos(tick()/2)*4)),0.06) | |
1056 | char.Torso.Neck.C0 = char.Torso.Neck.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(math.rad(90 + math.cos(tick()*1.5)*6),math.rad(180),math.rad(0)),0.06) | |
1057 | end | |
1058 | end) | |
1059 | ||
1060 | char.Humanoid.Died:connect(function() | |
1061 | toggle = false | |
1062 | ||
1063 | ClearGhosts() | |
1064 | ||
1065 | char.Parent = game.Workspace | |
1066 | char.Parent = game:GetService("Workspace") | |
1067 | char:FindFirstChild("ForceField"):Destroy() | |
1068 | char:FindFirstChild("Head").Transparency = 0 | |
1069 | char:FindFirstChild("Torso").Transparency = 0 | |
1070 | char:FindFirstChild("Right Arm").Transparency = 0 | |
1071 | char:FindFirstChild("Left Arm").Transparency = 0 | |
1072 | char:FindFirstChild("Right Leg").Transparency = 0 | |
1073 | char:FindFirstChild("Left Leg").Transparency = 0 | |
1074 | for i,v in pairs(char:GetChildren()) do | |
1075 | if v:IsA("Accessory") then | |
1076 | v:FindFirstChild("Handle").Transparency = 0 | |
1077 | end | |
1078 | end | |
1079 | for i,v in pairs(game:GetService("Workspace").CurrentCamera:GetChildren()) do v:Destroy() end | |
1080 | plr:LoadCharacter() | |
1081 | end) | |
1082 | ||
1083 | local msgidGlob = 0 | |
1084 | local state = true | |
1085 | local font = "Arcade" | |
1086 | local tcol = Color3.fromRGB(255,217,0) | |
1087 | local tscol = Color3.fromRGB(0,0,0) | |
1088 | local fsiz = 28 | |
1089 | local tr = true | |
1090 | local tsr = false | |
1091 | local fade = 2 | |
1092 | ||
1093 | local p = Instance.new("Part",game.Workspace) | |
1094 | p.Size = Vector3.new(0.2,0.2,0.2) | |
1095 | p.Transparency = 1 | |
1096 | p.Anchored = true | |
1097 | p.CanCollide = false | |
1098 | p.Name = "Msg" | |
1099 | p.CFrame = plr.Character:WaitForChild("Head").CFrame + Vector3.new(0,2.25,0) | |
1100 | ||
1101 | local r = 255 | |
1102 | local b = 0 | |
1103 | local g = 0 | |
1104 | ||
1105 | plr.Chatted:connect(function(c) | |
1106 | msgidGlob = msgidGlob + 1 | |
1107 | local curMsgId = msgidGlob | |
1108 | if string.lower(c) == "!disable" then | |
1109 | state = false | |
1110 | elseif string.lower(c) == "!enable" then | |
1111 | state = true | |
1112 | elseif string.lower(string.sub(c,1,6)) == "!font " then | |
1113 | local old = font | |
1114 | font = string.sub(c,7,#c) or old | |
1115 | elseif string.lower(string.sub(c,1,8)) == "!tcolor " then | |
1116 | if string.lower(string.sub(c,9,#c)) == "rainbow" then | |
1117 | tr = true | |
1118 | else | |
1119 | tr = false | |
1120 | local old = tcol | |
1121 | tcol = Color3.fromRGB(string.sub(c,9,11),string.sub(c,13,15),string.sub(c,17,19)) or old | |
1122 | end | |
1123 | elseif string.lower(string.sub(c,1,9)) == "!tscolor " then | |
1124 | if string.sub(c,10,#c) == "rainbow" then | |
1125 | tsr = true | |
1126 | else | |
1127 | tsr = false | |
1128 | local old = tscol | |
1129 | tscol = Color3.fromRGB(string.sub(c,10,12),string.sub(c,14,16),string.sub(c,18,20)) or old | |
1130 | end | |
1131 | elseif string.lower(string.sub(c,1,6)) == "!size " then | |
1132 | local old = fsiz | |
1133 | fsiz = string.sub(c,7,#c) or old | |
1134 | elseif string.lower(string.sub(c,1,6)) == "!fade " then | |
1135 | local old = fade | |
1136 | fade = string.sub(c,7,#c) or old | |
1137 | end | |
1138 | if plr.Character and state == true then | |
1139 | if plr.Character:FindFirstChild("Head") then | |
1140 | for i,v in pairs(p:GetChildren()) do | |
1141 | if v:IsA("BillboardGui") and v.Name == "J2CMSG" then | |
1142 | v:Destroy() | |
1143 | end | |
1144 | end | |
1145 | local bbgui = Instance.new("BillboardGui",p) | |
1146 | bbgui.Name = "J2CMSG" | |
1147 | bbgui.AlwaysOnTop = true | |
1148 | bbgui.ExtentsOffsetWorldSpace = Vector3.new(0,4.5,0) | |
1149 | bbgui.Size = UDim2.new(0.2,0,0.14,0) | |
1150 | local tl = Instance.new("TextLabel",bbgui) | |
1151 | tl.BackgroundTransparency = 1 | |
1152 | tl.BorderSizePixel = 0 | |
1153 | tl.Size = UDim2.new(1,0,10,0) | |
1154 | tl.Position = UDim2.new(0,0,-5,0) | |
1155 | tl.Font = font or "SciFi" | |
1156 | tl.FontSize = "Size"..fsiz or "Size36" | |
1157 | tl.TextColor3 = tcol | |
1158 | tl.TextScaled = false | |
1159 | tl.TextWrapped = false | |
1160 | tl.TextStrokeColor3 = tscol | |
1161 | tl.TextStrokeTransparency = 0 | |
1162 | ||
1163 | game:GetService("RunService").RenderStepped:connect(function() | |
1164 | if tr then | |
1165 | if tl.Parent ~= nil then | |
1166 | tl.TextColor3 = Color3.fromRGB(r,g,b) | |
1167 | end | |
1168 | end | |
1169 | end) | |
1170 | ||
1171 | for i=1,#c do | |
1172 | if msgidGlob == curMsgId then | |
1173 | tl.Text = string.sub(c,1,i) | |
1174 | if string.sub(c,i,i) ~= " " then | |
1175 | local s = Instance.new("Sound",p) | |
1176 | s.SoundId = "rbxassetid://418252437" | |
1177 | s.Volume = 1 | |
1178 | s.Pitch = 1 | |
1179 | s:Play() | |
1180 | game.Debris:AddItem(s,2) | |
1181 | end | |
1182 | wait() | |
1183 | end | |
1184 | end | |
1185 | wait(fade) | |
1186 | if msgidGlob == curMsgId then | |
1187 | for i=1,10 do | |
1188 | if msgidGlob == curMsgId then | |
1189 | tl.TextTransparency = tl.TextTransparency + 0.1 | |
1190 | tl.TextStrokeTransparency = tl.TextStrokeTransparency + 0.1 | |
1191 | tl.Position = tl.Position + UDim2.new(0,0,0,-3) | |
1192 | wait() | |
1193 | end | |
1194 | end | |
1195 | if msgidGlob == curMsgId then | |
1196 | bbgui:Destroy() | |
1197 | end | |
1198 | end | |
1199 | end | |
1200 | end | |
1201 | end) | |
1202 | ||
1203 | coroutine.resume(coroutine.create(function() | |
1204 | while wait() do | |
1205 | for i=0,255,10 do g = i wait() end | |
1206 | for i=255,0,-10 do r = i wait() end | |
1207 | for i=0,255,10 do b = i wait() end | |
1208 | for i=255,0,-10 do g = i wait() end | |
1209 | for i=0,255,10 do r = i wait() end | |
1210 | for i=255,0,-10 do b = i wait() end | |
1211 | end | |
1212 | - | end)) |
1212 | + | end))plr = game.Players.LocalPlayer |
1213 | mouse = plr:GetMouse() | |
1214 | --This has to be a local script. | |
1215 | function onClicked() | |
1216 | local x = Instance.new("Explosion", Workspace)--This means create new explosion in the workspace. | |
1217 | x.Position = mouse.Hit.p | |
1218 | x.BlastRadius = 5 | |
1219 | x.BlastPressure = 99999999999 | |
1220 | end | |
1221 | mouse.Button1Down:connect(onClicked) | |
1222 | -- how to use? Just Left Click it gonna explode on u click XD | |
1223 | ||
1224 | game:GetService("RunService").RenderStepped:connect(function() | |
1225 | if p.Parent ~= nil then | |
1226 | p.CFrame = p.CFrame:lerp(plr.Character:WaitForChild("Head").CFrame + Vector3.new(0,2.25,0),0.16) | |
1227 | else | |
1228 | p = Instance.new("Part",game.Workspace) | |
1229 | p.Size = Vector3.new(0.2,0.2,0.2) | |
1230 | p.Transparency = 1 | |
1231 | p.Anchored = true | |
1232 | p.CanCollide = false | |
1233 | p.Name = "Msg" | |
1234 | p.CFrame = plr.Character:WaitForChild("Head").CFrame + Vector3.new(0,2.25,0) | |
1235 | end | |
1236 | end) | |
1237 | ||
1238 | print("Zorex loaded! Time elapsed: "..tick() - time) |