SHOW:
|
|
- or go back to the newest paste.
1 | - | -- This script can be used in script builder |
1 | + | Modelname = "The kings power" |
2 | - | -- Put you name were it says YOURNAMEHERE |
2 | + | Toolname = "The kings power" |
3 | Surfaces = {"FrontSurface", "BackSurface", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface"} | |
4 | - | game.Workspace.YOURNAMEHERE.Humanoid.WalkSpeed = 100 -- Change the number to the speed you want |
4 | + | local Selected = false |
5 | local inuse = false | |
6 | local mousedown = false | |
7 | local Character = nil | |
8 | ||
9 | function Execute(f) | |
10 | return coroutine.resume(coroutine.create(function()f()end)) | |
11 | end | |
12 | ||
13 | function Part(Parent, Anchor, Collide, Tran, Ref, Color, X, Y, Z, Break) | |
14 | local p = Instance.new("Part") | |
15 | p.formFactor = "Custom" | |
16 | p.Anchored = Anchor | |
17 | p.CanCollide = Collide | |
18 | p.Transparency = Tran | |
19 | p.Reflectance = Ref | |
20 | p.BrickColor = BrickColor.new(Color) | |
21 | p.Material = 272 | |
22 | ||
23 | for _, Surf in pairs(Surfaces) do | |
24 | p[Surf] = "Smooth" | |
25 | end | |
26 | ||
27 | p.Size = Vector3.new(X, Y, Z) | |
28 | ||
29 | if Break then | |
30 | p:BreakJoints() | |
31 | else | |
32 | p:MakeJoints() | |
33 | end | |
34 | ||
35 | p.Parent = Parent | |
36 | p.Locked = true | |
37 | ||
38 | return p | |
39 | end | |
40 | ||
41 | function Weld(p0, p1, x, y, z, a, b, c) | |
42 | local w = Instance.new("Weld") | |
43 | w.Parent = p0 | |
44 | w.Part0 = p0 | |
45 | w.Part1 = p1 | |
46 | w.C1 = CFrame.new(x,y,z) * CFrame.Angles(a,b,c) | |
47 | return w | |
48 | end | |
49 | ||
50 | Add = { | |
51 | Sphere = function(P) | |
52 | local m = Instance.new("SpecialMesh",P) | |
53 | m.MeshType = "Sphere" | |
54 | return m | |
55 | end, | |
56 | Mesh = function(P, ID, x, y, z) | |
57 | local m = Instance.new("SpecialMesh") | |
58 | m.MeshId = ID | |
59 | m.Scale = Vector3.new(x, y, z) | |
60 | m.Parent = P | |
61 | return m | |
62 | end, | |
63 | Sound = function(P, ID, vol, pitch) | |
64 | local s = Instance.new("Sound") | |
65 | s.SoundId = ID | |
66 | s.Volume = vol | |
67 | s.Pitch = pitch | |
68 | s.Parent = P | |
69 | return s | |
70 | end | |
71 | } | |
72 | ||
73 | ||
74 | local Model,handle,toptip,bottip,HB,HW,TH,HBW,Crystal | |
75 | local player = game.Players.LocalPlayer | |
76 | local StaffModel = nil | |
77 | local Rarm = nil | |
78 | local RABrick, RABW, RAW | |
79 | ||
80 | function GenerateModel(Parent,Torso,Rarm) | |
81 | Model = Instance.new("Model") | |
82 | Model.Name = Modelname | |
83 | handle = Part(Model, false, false, 0, 0, "Brown", 0.3, 4.4, 0.3, true) | |
84 | handle.Name = "Handle" | |
85 | Instance.new("CylinderMesh",handle) | |
86 | toptip = Part(Model, false, false, 0, 0, "Brown", 0.6, 0.2, 0.6, true) | |
87 | Weld(handle, toptip, 0, -2, 0, 0, 0, 0) | |
88 | Instance.new("CylinderMesh",toptip) | |
89 | Crystal = Part(Model, false, false, 0, 0.2, "Bright blue", 0.5, 0.75, 0.5, true) | |
90 | local w1 = Weld(handle, Crystal, 0, -2.2, 0, 0, 0, 0) | |
91 | Add.Mesh(Crystal, "rbxassetid://494629925", 0.5, 0.75, 0.5) | |
92 | Crystal.Reflectance = 0.25 | |
93 | Crystal.Transparency = 0.25 | |
94 | local BotTip = Part(Model, false, false, 0, 0, "Brown", 0.2, 1.5, 0.2, true) | |
95 | local w1 = Weld(handle, BotTip, 0, 2.15, 0, 0, 0, 0) | |
96 | Add.Mesh(BotTip, "http://www.roblox.com/asset/?id=9756362", 0.4, 0.7, 0.4) | |
97 | Model.Parent = Parent | |
98 | StaffModel = Model | |
99 | ||
100 | RABrick = Part(Model, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
101 | RABW = Weld(Torso, RABrick, -1.5, -0.5, 0, 0, 0, 0) | |
102 | RAW = Weld(RABrick, nil, 0, 0.5, 0, 0, 0, 0) | |
103 | ||
104 | HB = Part(Model, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
105 | HBW = Weld(Rarm, HB, 0, 1, -1.5, 0, 0, 0) | |
106 | HW = Weld(HB, nil, 0, -1.3, 0, math.pi/2, 0, 0) | |
107 | TH = Weld(Torso, nil, -0.6, 0.1, 0, 0, math.pi/2, math.rad(-140)) | |
108 | TH.Part1 = handle | |
109 | ||
110 | end | |
111 | ||
112 | local tool = nil | |
113 | function GenerateTool() | |
114 | if player:IsA("Player") then | |
115 | if player.Character ~= nil then | |
116 | if player.Character:FindFirstChild("Torso") ~= nil then | |
117 | if player.Character:FindFirstChild(Modelname) == nil then | |
118 | if player.Character:FindFirstChild("Right Arm") then | |
119 | GenerateModel(player.Character,player.Character:FindFirstChild("Torso"),player.Character:FindFirstChild("Right Arm")) | |
120 | Rarm = player.Character:FindFirstChild("Right Arm") | |
121 | Character = player.Character | |
122 | end | |
123 | else | |
124 | StaffModel = player.Character:FindFirstChild(Modelname) | |
125 | end | |
126 | if player.Character:FindFirstChild(Modelname) ~= nil then | |
127 | if player.Backpack:FindFirstChild(Toolname) == nil then | |
128 | tool = Instance.new("HopperBin",player.Backpack) | |
129 | tool.Name = Toolname | |
130 | wait() | |
131 | script.Parent = tool | |
132 | end | |
133 | end | |
134 | end | |
135 | end | |
136 | end | |
137 | end | |
138 | ||
139 | function ToolAnimSelect() | |
140 | RAW.Part1 = Rarm | |
141 | local ah = CFrame.Angles(0, 0, math.rad(90)) | |
142 | RAW.Part1 = Rarm | |
143 | for i = 0, 270, 270/5 do | |
144 | RAW.C0 = CFrame.new(0, 0, -i/500) * CFrame.Angles(math.rad(i), math.rad(i/4), 0) | |
145 | wait() | |
146 | end | |
147 | HW.C0 = ah | |
148 | TH.Part1 = nil | |
149 | HW.Part1 = handle | |
150 | for i = 270, 70, -200/5 do | |
151 | RAW.C0 = CFrame.new(0, 0, -i/500) * CFrame.Angles(math.rad(i), math.rad(i/4), 0) | |
152 | wait() | |
153 | end | |
154 | RAW.C0 = CFrame.new(0, 0, -70/500) * CFrame.Angles(70,0,0) | |
155 | inuse = false | |
156 | end | |
157 | ||
158 | function ToolAnimUnSelect() | |
159 | RAW.Part1 = Rarm | |
160 | local ah = CFrame.Angles(0, 0, math.rad(90)) | |
161 | for i = 70, 270, 200/5 do | |
162 | RAW.C0 = CFrame.new(0, 0, -i/500) * CFrame.Angles(math.rad(i), math.rad(i/4), 0) | |
163 | wait() | |
164 | end | |
165 | HW.C0 = ah | |
166 | HW.Part1 = nil | |
167 | TH.Part1 = handle | |
168 | for i = 270, 0, -270/5 do | |
169 | RAW.C0 = CFrame.new(0, 0, -i/500) * CFrame.Angles(math.rad(i), math.rad(i/4), 0) | |
170 | wait() | |
171 | end | |
172 | RAW.Part1 = nil | |
173 | inuse = false | |
174 | end | |
175 | ||
176 | function prop(part, parent, collide, tran, ref, x, y, z, color) | |
177 | part.Parent = parent | |
178 | part.formFactor = 3 | |
179 | part.Anchored = true | |
180 | part.CanCollide = collide | |
181 | part.Transparency = tran | |
182 | part.Reflectance = ref | |
183 | part.Material = 288 | |
184 | part.Size = Vector3.new(x,y,z) | |
185 | part.BrickColor = BrickColor.new(color) | |
186 | part.TopSurface = 0 | |
187 | part.BottomSurface = 0 | |
188 | part:BreakJoints() | |
189 | end | |
190 | ||
191 | local a,b,c -- explosion | |
192 | function Selected(mouse) | |
193 | if inuse == false then | |
194 | inuse = true | |
195 | ToolAnimSelect() | |
196 | Selected = true | |
197 | end | |
198 | if Selected == true then | |
199 | mouse.Button1Down:connect(function() | |
200 | mousedown = true | |
201 | while mousedown do | |
202 | if Character:FindFirstChild("Humanoid") ~= nil then | |
203 | if Character:FindFirstChild("Humanoid").Health > 0 then | |
204 | if Character:FindFirstChild("ForceField") == nil then | |
205 | c = Instance.new("ForceField",Character) | |
206 | end | |
207 | b = Instance.new("Part") | |
208 | prop(b, Character, false, 0.4, 0.25, 0.05, 0.05, (Crystal.Position - mouse.hit.p).magnitude, "Cyan") | |
209 | b.CFrame = CFrame.new(Crystal.Position, mouse.hit.p) * CFrame.new(0,0,-b.Size.Z/2) | |
210 | local ex = Instance.new("Explosion") | |
211 | ex.Parent = Character | |
212 | ex.DestroyJointRadiusPercent = 1 | |
213 | ex.ExplosionType = 2 | |
214 | ex.Position = mouse.hit.p | |
215 | ex.BlastRadius = 99999 | |
216 | ex.BlastPressure = 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 | |
217 | game:GetService("Debris"):AddItem(b,.25) | |
218 | end | |
219 | end | |
220 | wait(0.1) | |
221 | ||
222 | end | |
223 | end) | |
224 | mouse.Button1Up:connect(function() | |
225 | if Character:FindFirstChild("ForceField") ~= nil then | |
226 | game:GetService("Debris"):AddItem(Character:FindFirstChild("ForceField"),.5) | |
227 | end | |
228 | mousedown = false | |
229 | end) | |
230 | end | |
231 | end | |
232 | ||
233 | ||
234 | ||
235 | ||
236 | function UnSelected() | |
237 | if inuse == false then | |
238 | if Character:FindFirstChild("ForceField") ~= nil then | |
239 | game:GetService("Debris"):AddItem(Character:FindFirstChild("ForceField"),.5) | |
240 | end | |
241 | mousedown = false | |
242 | inuse = true | |
243 | ToolAnimUnSelect() | |
244 | HW.Part1 = nil | |
245 | TH.Part1 = handle | |
246 | Selected = false | |
247 | end | |
248 | end | |
249 | ||
250 | GenerateTool() | |
251 | ||
252 | if tool ~= nil then | |
253 | tool.Selected:connect(Selected) | |
254 | tool.Deselected:connect(UnSelected) | |
255 | end | |
256 | p = game.Players.LocalPlayer | |
257 | char = p.Character | |
258 | local char = p.Character | |
259 | torso = char.Torso | |
260 | neck = char.Torso.Neck | |
261 | hum = char.Humanoid | |
262 | Player = game:GetService("Players").LocalPlayer | |
263 | Character = Player.Character | |
264 | tors = Character.Torso | |
265 | root = Character.HumanoidRootPart | |
266 | lleg = Character["Left Leg"] | |
267 | hed = Character.Head | |
268 | rleg = Character["Right Leg"] | |
269 | rarm = Character["Right Arm"] | |
270 | larm = Character["Left Arm"] | |
271 | ||
272 | ypcall(function() | |
273 | for i,v in pairs(Character:children()) do | |
274 | if v:IsA("Hat") then | |
275 | v:Destroy() | |
276 | end | |
277 | end | |
278 | for i,v in pairs(Character:children()) do | |
279 | if v:IsA("Accessory") then | |
280 | v:Destroy() | |
281 | end | |
282 | end | |
283 | for i,v in pairs(Character:children()) do | |
284 | if v:IsA("Hair") then | |
285 | v:Destroy() | |
286 | end | |
287 | end | |
288 | end) | |
289 | ||
290 | CV="Hot pink" | |
291 | ||
292 | local txt = Instance.new("BillboardGui", char) | |
293 | txt.Adornee = char .Head | |
294 | txt.Name = "_status" | |
295 | txt.Size = UDim2.new(2, 0, 1.2, 0) | |
296 | txt.StudsOffset = Vector3.new(-9, 8, 0) | |
297 | local text = Instance.new("TextLabel", txt) | |
298 | text.Size = UDim2.new(10, 0, 7, 0) | |
299 | text.FontSize = "Size24" | |
300 | text.TextScaled = true | |
301 | text.TextTransparency = 0 | |
302 | text.BackgroundTransparency = 1 | |
303 | text.TextTransparency = 0 | |
304 | text.TextStrokeTransparency = 0 | |
305 | text.Font = "Highway" | |
306 | text.TextStrokeColor3 = BrickColor.new("Really black").Color | |
307 | ||
308 | v=Instance.new("Part") | |
309 | v.Name = "ColorBrick" | |
310 | v.Parent=p.Character | |
311 | v.FormFactor="Symmetric" | |
312 | v.Anchored=true | |
313 | v.CanCollide=false | |
314 | v.BottomSurface="Smooth" | |
315 | v.TopSurface="Smooth" | |
316 | v.Size=Vector3.new(10,5,3) | |
317 | v.Transparency=1 | |
318 | v.CFrame=char.Torso.CFrame | |
319 | v.BrickColor=BrickColor.new(CV) | |
320 | v.Transparency=1 | |
321 | text.TextColor3 = BrickColor.new("white").Color | |
322 | v.Shape="Block" | |
323 | text.Text = "The KING" | |
324 | ||
325 | hed.face.Texture = "http://www.roblox.com/asset/?id=0" | |
326 | hed.Transparency = 1 | |
327 | rleg.Transparency = 1 | |
328 | rarm.Transparency = 1 | |
329 | larm.Transparency = 1 | |
330 | lleg.Transparency = 1 | |
331 | tors.Transparency = 1 | |
332 | ||
333 | Player = game:GetService("Players").LocalPlayer | |
334 | Character = Player.Character | |
335 | rarm = Character["Right Arm"] | |
336 | larm = Character["Left Arm"] | |
337 | vt = Vector3.new | |
338 | bc = BrickColor.new | |
339 | wit = bc("Deep orange").Color | |
340 | ||
341 | local prth = Instance.new("Part",Character) | |
342 | prth.Size = vt(1.25,1.25,1.25) | |
343 | prth.CanCollide = false | |
344 | prth.Material = "Neon" | |
345 | prth.Transparency = 0.2 | |
346 | prth.BrickColor = bc("black") | |
347 | local wldh = Instance.new("Weld",Character) | |
348 | wldh.Part0 = hed | |
349 | wldh.Part1 = prth | |
350 | ||
351 | local prtrm = Instance.new("Part",Character) | |
352 | prtrm.Size = vt(2.1,2.1,1.1) | |
353 | prtrm.CanCollide = false | |
354 | prtrm.Transparency = 0.2 | |
355 | prtrm.Material = "Neon" | |
356 | prtrm.BrickColor = bc("black") | |
357 | local wldm = Instance.new("Weld",Character) | |
358 | wldm.Part0 = root | |
359 | wldm.Part1 = prtrm | |
360 | ||
361 | local prtr = Instance.new("Part",Character) | |
362 | prtr.Size = vt(1.1,2.1,1.1) | |
363 | prtr.CanCollide = false | |
364 | prtr.Transparency = 0.5 | |
365 | prtr.Material = "Neon" | |
366 | prtr.BrickColor = bc("black") | |
367 | local prtrl = Instance.new("Part",Character) | |
368 | prtrl.Size = vt(1.1,2.1,1.1) | |
369 | prtrl.CanCollide = false | |
370 | prtrl.Transparency = 0.2 | |
371 | prtrl.Material = "Neon" | |
372 | prtrl.BrickColor = bc("black") | |
373 | local eff = Instance.new("ParticleEmitter",prtr) | |
374 | eff.LightEmission = 1 | |
375 | eff.Texture = "rbxassetid://284205403" | |
376 | eff.Color = ColorSequence.new(wit) | |
377 | eff.Size = NumberSequence.new(0.5,1) | |
378 | eff.Acceleration = vt(0,25,0) | |
379 | eff.Speed = NumberRange.new(-5) | |
380 | eff.LockedToPart = false | |
381 | eff.Transparency = NumberSequence.new(0.95) | |
382 | eff.Lifetime = NumberRange.new(0.5) | |
383 | eff.Rate = 100000 | |
384 | eff.VelocitySpread = 25 | |
385 | local wld = Instance.new("Weld",Character) | |
386 | wld.Part0 = rarm | |
387 | wld.Part1 = prtr | |
388 | local wldl = Instance.new("Weld",Character) | |
389 | wldl.Part0 = rleg | |
390 | wldl.Part1 = prtrl | |
391 | ||
392 | local prtr2 = Instance.new("Part",Character) | |
393 | prtr2.Size = vt(1.1,2.1,1.1) | |
394 | prtr2.CanCollide = false | |
395 | prtr2.Transparency = 0.1 | |
396 | prtr2.Material = "Neon" | |
397 | prtr2.BrickColor = bc("black") | |
398 | local prtrl2 = Instance.new("Part",Character) | |
399 | prtrl2.Size = vt(1.1,2.1,1.1) | |
400 | prtrl2.CanCollide = false | |
401 | prtrl2.Transparency = 0.1 | |
402 | prtrl2.Material = "Neon" | |
403 | prtrl2.BrickColor = bc("black") | |
404 | local eff2 = Instance.new("ParticleEmitter",prtr2) | |
405 | eff2.LightEmission = 1 | |
406 | eff2.Texture = "rbxassetid://284205403" | |
407 | eff2.Color = ColorSequence.new(wit) | |
408 | eff2.Size = NumberSequence.new(0.5,1) | |
409 | eff2.Acceleration = vt(0,25,0) | |
410 | eff2.Speed = NumberRange.new(-5) | |
411 | eff2.LockedToPart = false | |
412 | eff2.Transparency = NumberSequence.new(0.95) | |
413 | eff2.Lifetime = NumberRange.new(0.5) | |
414 | eff2.Rate = 100000 | |
415 | eff2.VelocitySpread = 25 | |
416 | local wld2 = Instance.new("Weld",Character) | |
417 | wld2.Part0 = larm | |
418 | wld2.Part1 = prtr2 | |
419 | local wldl2 = Instance.new("Weld",Character) | |
420 | wldl2.Part0 = lleg | |
421 | wldl2.Part1 = prtrl2 | |
422 | ||
423 | local mouse = game.Players.LocalPlayer:GetMouse() | |
424 | tors = game.Players.LocalPlayer.Character.Torso | |
425 | vt = Vector3.new | |
426 | bc = BrickColor.new | |
427 | ||
428 | local Effect = Instance.new("Part",game.Lighting) | |
429 | Effect.BrickColor = bc("Deep orange") | |
430 | Effect.Transparency = 1 | |
431 | Effect.Anchored = true | |
432 | Effect.CanCollide = false | |
433 | Effect.Material = "Neon" | |
434 | Effect.Shape = "Ball" | |
435 | Effect.Size = vt(5,5,5) | |
436 | local fire1 = Instance.new("Fire",Effect) | |
437 | fire1.Name = "Fire" | |
438 | fire1.Heat = 0 | |
439 | fire1.Size = 30 | |
440 | fire1.SecondaryColor = bc("Really black").Color | |
441 | fire1.Color = bc("Deep orange").Color | |
442 | local fire2 = Instance.new("Fire",Effect) | |
443 | fire2.Name = "Fire2" | |
444 | fire2.Heat = 0 | |
445 | fire2.Size = 25 | |
446 | fire2.SecondaryColor = bc("Really black").Color | |
447 | fire2.Color = bc("Neon orange").Color | |
448 | ||
449 | function Explode(rad,par) | |
450 | local expart = Instance.new("Part",script.Parent) | |
451 | local expart2 = Instance.new("Part",script.Parent) | |
452 | local snd = Instance.new("Sound",expart) | |
453 | snd.SoundId = "rbxassetid://258057783" | |
454 | snd.Volume = 2.5 | |
455 | local partMesh = Instance.new("SpecialMesh",expart) | |
456 | partMesh.MeshType = "Sphere" | |
457 | local partMesh2 = Instance.new("SpecialMesh",expart2) | |
458 | partMesh2.MeshType = "Sphere" | |
459 | local expld = Instance.new("Explosion", script.Parent) | |
460 | expld.BlastRadius = rad | |
461 | expld.Position = par.Position | |
462 | partMesh.Scale = vt(rad,rad,rad) | |
463 | expart.Size = vt(1,1,1)*1.5 | |
464 | expart.Transparency = 0.5 | |
465 | expart.Anchored = true | |
466 | expart.Material = "Neon" | |
467 | expart.BrickColor = bc("Deep orange") | |
468 | expart.CFrame = par.CFrame | |
469 | partMesh2.Scale = vt(rad,rad,rad) | |
470 | expart2.Size = vt(1.15,1.15,1.15)*1.5 | |
471 | expart2.Transparency = 0.5 | |
472 | expart2.Anchored = true | |
473 | expart2.Material = "Neon" | |
474 | expart2.BrickColor = bc("Bright orange") | |
475 | expart2.CFrame = par.CFrame | |
476 | snd:Play() | |
477 | for i = 0, 100 do | |
478 | expart.Transparency = expart.Transparency + 0.005 | |
479 | partMesh.Scale = partMesh.Scale + vt(0.25,0.25,0.25) | |
480 | expart.CFrame = expart.CFrame | |
481 | expart2.Transparency = expart.Transparency + 0.005 | |
482 | partMesh2.Scale = partMesh2.Scale + vt(0.25,0.25,0.25) | |
483 | expart2.CFrame = expart.CFrame | |
484 | wait(0) | |
485 | end | |
486 | snd.Parent = nil | |
487 | expart.Parent = nil | |
488 | expart2.Parent = nil | |
489 | expld.Parent = nil | |
490 | end | |
491 | ||
492 | function Explode2(rad,par) | |
493 | local expart = Instance.new("Part",script.Parent) | |
494 | local expart2 = Instance.new("Part",script.Parent) | |
495 | local snd = Instance.new("Sound",expart) | |
496 | snd.SoundId = "rbxassetid://165969964" | |
497 | snd.Volume = 3 | |
498 | local partMesh = Instance.new("SpecialMesh",expart) | |
499 | partMesh.MeshType = "Sphere" | |
500 | local partMesh2 = Instance.new("SpecialMesh",expart2) | |
501 | partMesh2.MeshType = "Sphere" | |
502 | local expld = Instance.new("Explosion", script.Parent) | |
503 | expld.BlastRadius = rad | |
504 | expld.Position = par.Position | |
505 | partMesh.Scale = vt(rad,rad,rad) | |
506 | expart.Size = vt(1,1,1)*1.5 | |
507 | expart.Transparency = 0.5 | |
508 | expart.Anchored = true | |
509 | expart.Material = "Neon" | |
510 | expart.BrickColor = bc("Deep orange") | |
511 | expart.CFrame = par.CFrame | |
512 | partMesh2.Scale = vt(rad,rad,rad) | |
513 | expart2.Size = vt(1.15,1.15,1.15)*1.5 | |
514 | expart2.Transparency = 0.5 | |
515 | expart2.Anchored = true | |
516 | expart2.Material = "Neon" | |
517 | expart2.BrickColor = bc("Bright orange") | |
518 | expart2.CFrame = par.CFrame | |
519 | snd:Play() | |
520 | for i = 0, 100 do | |
521 | expart.Transparency = expart.Transparency + 0.005 | |
522 | partMesh.Scale = partMesh.Scale + vt(0.25,0.25,0.25) | |
523 | expart.CFrame = expart.CFrame | |
524 | expart2.Transparency = expart.Transparency + 0.005 | |
525 | partMesh2.Scale = partMesh2.Scale + vt(0.25,0.25,0.25) | |
526 | expart2.CFrame = expart.CFrame | |
527 | wait(0) | |
528 | end | |
529 | snd.Parent = nil | |
530 | expart.Parent = nil | |
531 | expart2.Parent = nil | |
532 | expld.Parent = nil | |
533 | end | |
534 | ||
535 | mouse.KeyDown:connect(function(k) | |
536 | ||
537 | k = k:lower() | |
538 | if k == "q" then | |
539 | local spart = Effect:Clone() | |
540 | spart.Parent = game.Players.LocalPlayer.Character | |
541 | spart.Transparency = 0 | |
542 | spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*5 | |
543 | wait() | |
544 | spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*15 | |
545 | wait() | |
546 | spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*25 | |
547 | wait() | |
548 | spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*35 | |
549 | wait() | |
550 | spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*45 | |
551 | wait() | |
552 | spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*55 | |
553 | wait() | |
554 | spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*65 | |
555 | wait() | |
556 | spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*75 | |
557 | wait() | |
558 | spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*85 | |
559 | wait() | |
560 | spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*95 | |
561 | wait() | |
562 | spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*105 | |
563 | spart.Transparency = 1 | |
564 | spart.Fire2:Destroy() | |
565 | spart.Fire:Destroy() | |
566 | Explode(25,spart) | |
567 | spart:Destroy() | |
568 | end | |
569 | if k == "e" then | |
570 | local spart = Effect:Clone() | |
571 | spart.Parent = game.Players.LocalPlayer.Character | |
572 | spart.Transparency = 0 | |
573 | spart.Anchored = false | |
574 | spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*0 | |
575 | spart.Position = spart.Position + vt(0,100,0) | |
576 | spart.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*150 | |
577 | wait(1) | |
578 | spart.Transparency = 1 | |
579 | spart.Fire2:Destroy() | |
580 | spart.Fire:Destroy() | |
581 | Explode2(75,spart) | |
582 | spart:Destroy() | |
583 | end | |
584 | if k == "r" then | |
585 | local ff = Instance.new("ForceField",game.Players.LocalPlayer.Character) | |
586 | game.Players.LocalPlayer.Character.Torso.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*275 | |
587 | wait(0.75) | |
588 | game.Players.LocalPlayer.Character.Torso.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*-165 | |
589 | Explode(30,game.Players.LocalPlayer.Character.Torso) | |
590 | wait(0.5) | |
591 | ff:Destroy() | |
592 | end | |
593 | if k == "f" then | |
594 | local ff = Instance.new("ForceField",game.Players.LocalPlayer.Character) | |
595 | for i = 0, 10 do | |
596 | game.Players.LocalPlayer.Character.Torso.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame + Vector3.new(0,10,0) | |
597 | wait(0) | |
598 | end | |
599 | for i = 0, 5 do | |
600 | game.Players.LocalPlayer.Character.Torso.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame + Vector3.new(0,1,0) | |
601 | wait(0) | |
602 | end | |
603 | game.Players.LocalPlayer.Character.Torso.Anchored = true | |
604 | wait(1.5) | |
605 | game.Players.LocalPlayer.Character.Torso.Anchored = false | |
606 | for i = 0, 10 do | |
607 | game.Players.LocalPlayer.Character.Torso.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame + Vector3.new(0,-1,0) | |
608 | wait(0) | |
609 | end | |
610 | wait(0.25) | |
611 | Explode2(62.5,game.Players.LocalPlayer.Character.Torso) | |
612 | wait(0.5) | |
613 | ff:Destroy() | |
614 | end | |
615 | end) | |
616 | -- x10Shield -- | |
617 | local me = game:GetService("Players").LocalPlayer | |
618 | local ShieldSize = 5 | |
619 | local canCollide = false | |
620 | local isLocked = false | |
621 | local defaultTransparency = 1 | |
622 | local whitelist = {"", "", "", ""} | |
623 | ||
624 | local scriptBreak = false | |
625 | local followPart = me.Character.HumanoidRootPart | |
626 | local actualList = {} | |
627 | local playerList = {} | |
628 | table.insert(playerList, me) | |
629 | for i,v in pairs(game:GetService("Players"):GetPlayers()) do | |
630 | for _,wplay in pairs(whitelist) do | |
631 | if v.Name:lower() == wplay:lower() then | |
632 | table.insert(playerList, v) | |
633 | end | |
634 | end | |
635 | end | |
636 | ||
637 | local MainLocation = me.Character.Torso | |
638 | ||
639 | function createShield() | |
640 | pcall(function() | |
641 | pcall(function() | |
642 | for i,v in pairs(MainLocation:GetChildren()) do | |
643 | if v.Name == "weinershield" then | |
644 | v:Destroy() | |
645 | end | |
646 | end | |
647 | end) | |
648 | local mod = Instance.new("Model", MainLocation) | |
649 | mod.Name = "weinershield" | |
650 | local p1 = Instance.new("Part", mod) | |
651 | p1.Name = "front" | |
652 | p1.Size = Vector3.new(ShieldSize,ShieldSize,1) | |
653 | p1.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y, followPart.Position.Z+(ShieldSize/2)) | |
654 | local b = Instance.new("BlockMesh", p1) | |
655 | b.Scale = Vector3.new(1, 1, 0) | |
656 | local p2 = Instance.new("Part", mod) | |
657 | p2.Name = "back" | |
658 | p2.Size = Vector3.new(ShieldSize,ShieldSize,1) | |
659 | p2.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y, followPart.Position.Z-(ShieldSize/2)) | |
660 | local b = Instance.new("BlockMesh", p2) | |
661 | b.Scale = Vector3.new(1, 1, 0) | |
662 | local p3 = Instance.new("Part", mod) | |
663 | p3.Name = "left" | |
664 | p3.Size = Vector3.new(1,ShieldSize,ShieldSize) | |
665 | p3.CFrame = CFrame.new(followPart.Position.X+(ShieldSize/2), followPart.Position.Y, followPart.Position.Z) | |
666 | local b = Instance.new("BlockMesh", p3) | |
667 | b.Scale = Vector3.new(0, 1, 1) | |
668 | local p4 = Instance.new("Part", mod) | |
669 | p4.Name = "right" | |
670 | p4.Size = Vector3.new(1,ShieldSize,ShieldSize) | |
671 | p4.CFrame = CFrame.new(followPart.Position.X-(ShieldSize/2), followPart.Position.Y, followPart.Position.Z) | |
672 | local b = Instance.new("BlockMesh", p4) | |
673 | b.Scale = Vector3.new(0, 1, 1) | |
674 | local p5 = Instance.new("Part", mod) | |
675 | p5.Name = "top" | |
676 | p5.Size = Vector3.new(ShieldSize,1,ShieldSize) | |
677 | p5.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y+(ShieldSize/2), followPart.Position.Z) | |
678 | local b = Instance.new("BlockMesh", p5) | |
679 | b.Scale = Vector3.new(1, 0, 1) | |
680 | local p6 = Instance.new("Part", mod) | |
681 | p6.Name = "bottom" | |
682 | p6.Size = Vector3.new(ShieldSize,1,ShieldSize) | |
683 | p6.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y-(ShieldSize/2), followPart.Position.Z) | |
684 | local b = Instance.new("BlockMesh", p6) | |
685 | b.Scale = Vector3.new(1, 0, 1) | |
686 | for i,v in pairs(mod:GetChildren()) do | |
687 | v.Anchored = true | |
688 | v.Transparency = defaultTransparency | |
689 | v.Material = "Neon" | |
690 | v.TopSurface = "Smooth" | |
691 | v.BottomSurface = "Smooth" | |
692 | v.CanCollide = canCollide | |
693 | end | |
694 | mod.ChildRemoved:connect(function(a) | |
695 | game:GetService("RunService").Stepped:wait() | |
696 | if a.ClassName == "Part" then | |
697 | createShield() | |
698 | end | |
699 | end) | |
700 | end) | |
701 | end | |
702 | ||
703 | function updateShield() | |
704 | pcall(function() | |
705 | char = me.Character | |
706 | for i,v in pairs(MainLocation:findFirstChild("weinershield"):GetChildren()) do | |
707 | v.Anchored = true | |
708 | v.Transparency = defaultTransparency | |
709 | v.Material = "Neon" | |
710 | v.TopSurface = "Smooth" | |
711 | v.BottomSurface = "Smooth" | |
712 | v.CanCollide = canCollide | |
713 | end | |
714 | MainLocation:findFirstChild("weinershield").front.Size = Vector3.new(ShieldSize,ShieldSize,1) | |
715 | MainLocation:findFirstChild("weinershield").front.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y, followPart.Position.Z+(ShieldSize/2)) | |
716 | MainLocation:findFirstChild("weinershield").back.Size = Vector3.new(ShieldSize,ShieldSize,1) | |
717 | MainLocation:findFirstChild("weinershield").back.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y, followPart.Position.Z-(ShieldSize/2)) | |
718 | MainLocation:findFirstChild("weinershield").left.Size = Vector3.new(1,ShieldSize,ShieldSize) | |
719 | MainLocation:findFirstChild("weinershield").left.CFrame = CFrame.new(followPart.Position.X+(ShieldSize/2), followPart.Position.Y, followPart.Position.Z) | |
720 | MainLocation:findFirstChild("weinershield").right.Size = Vector3.new(1,ShieldSize,ShieldSize) | |
721 | MainLocation:findFirstChild("weinershield").right.CFrame = CFrame.new(followPart.Position.X-(ShieldSize/2), followPart.Position.Y, followPart.Position.Z) | |
722 | MainLocation:findFirstChild("weinershield").top.Size = Vector3.new(ShieldSize,1,ShieldSize) | |
723 | MainLocation:findFirstChild("weinershield").top.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y+(ShieldSize/2), followPart.Position.Z) | |
724 | MainLocation:findFirstChild("weinershield").bottom.Size = Vector3.new(ShieldSize,1,ShieldSize) | |
725 | MainLocation:findFirstChild("weinershield").bottom.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y-(ShieldSize/2), followPart.Position.Z) | |
726 | end) | |
727 | end | |
728 | ||
729 | ||
730 | local function CreateRegion3FromLocAndSize(Position, Size) | |
731 | local SizeOffset = Size/2 | |
732 | local Point1 = Position - SizeOffset | |
733 | local Point2 = Position + SizeOffset | |
734 | return Region3.new(Point1, Point2) | |
735 | end | |
736 | ||
737 | createShield() | |
738 | game:GetService("RunService").Heartbeat:connect(function() | |
739 | if not scriptBreak then | |
740 | local me = game:GetService("Players").LocalPlayer | |
741 | local char = workspace:findFirstChild(me.Name) | |
742 | actualList = {} | |
743 | for i,v in pairs(playerList) do | |
744 | pcall(function() | |
745 | table.insert(actualList, workspace:findFirstChild(v.Name)) | |
746 | end) | |
747 | end | |
748 | if MainLocation:findFirstChild("weinershield") ~= nil then | |
749 | updateShield() | |
750 | else | |
751 | createShield() | |
752 | end | |
753 | pcall(function() | |
754 | local Region = CreateRegion3FromLocAndSize(followPart.Position, Vector3.new(ShieldSize+1,ShieldSize+1,ShieldSize+1)) | |
755 | for _,Part in pairs(workspace:FindPartsInRegion3WithIgnoreList(Region,actualList,math.huge)) do | |
756 | if Part.Name ~= "Base" and not Part:isDescendantOf(MainLocation:findFirstChild("weinershield")) then | |
757 | Part:Destroy() | |
758 | end | |
759 | end | |
760 | end) | |
761 | pcall(function() | |
762 | for i,v in pairs(actualList) do | |
763 | if v:findFirstChild("Humanoid") ~= nil then | |
764 | v.Humanoid.MaxHealth = math.huge | |
765 | v.Humanoid.Health = math.huge | |
766 | else | |
767 | Instance.new("Humanoid", v) | |
768 | end | |
769 | end | |
770 | end) | |
771 | end | |
772 | end) |