SHOW:
|
|
- or go back to the newest paste.
1 | warn'any options for magic' | |
2 | plr = game.Players.LocalPlayer | |
3 | char = plr.Character | |
4 | hum = char.Humanoid | |
5 | local cam = game.Workspace.CurrentCamera | |
6 | t = char.Torso | |
7 | h = char.Head | |
8 | ra = char["Right Arm"] | |
9 | la = char["Left Arm"] | |
10 | rl = char["Right Leg"] | |
11 | ll = char["Left Leg"] | |
12 | tors = char.Torso | |
13 | lleg = char["Left Leg"] | |
14 | root = char.HumanoidRootPart | |
15 | hed = char.Head | |
16 | rleg = char["Right Leg"] | |
17 | rarm = char["Right Arm"] | |
18 | larm = char["Left Arm"] | |
19 | vt = Vector3.new | |
20 | bc = BrickColor.new | |
21 | br = BrickColor.random | |
22 | it = Instance.new | |
23 | cf = CFrame.new | |
24 | ||
25 | hum.MaxHealth = 500000000 | |
26 | hum.Health = hum.MaxHealth | |
27 | ||
28 | ||
29 | local NoobGui = Instance.new("BillboardGui", Head) | |
30 | NoobGui.ExtentsOffset = Vector3.new(0,5,0) | |
31 | NoobGui.Parent = char.Head | |
32 | NoobGui.AlwaysOnTop = true | |
33 | NoobGui.Enabled = true | |
34 | NoobGui.Size = UDim2.new(0, 200,0, 50) | |
35 | ||
36 | local NoobText = Instance.new("TextLabel", NoobGui) | |
37 | NoobText.BackgroundTransparency = 1 | |
38 | NoobText.Font = "Garamond" | |
39 | NoobText.Size = UDim2.new(0, 200,0, 50) | |
40 | NoobText.TextStrokeColor3 = BrickColor.Yellow().Color | |
41 | NoobText.TextStrokeTransparency = 0 | |
42 | NoobText.TextColor3 = BrickColor.Black().Color | |
43 | NoobText.TextScaled = true | |
44 | NoobText.Text = "Noob King" | |
45 | ||
46 | ||
47 | gui = function(GuiType, parent, text, backtrans, backcol, pos, size) | |
48 | local gui = it(GuiType) | |
49 | gui.Parent = parent | |
50 | gui.Text = text | |
51 | gui.BackgroundTransparency = backtrans | |
52 | gui.BackgroundColor3 = backcol | |
53 | gui.SizeConstraint = "RelativeXY" | |
54 | gui.TextXAlignment = "Center" | |
55 | gui.TextYAlignment = "Center" | |
56 | gui.Position = pos | |
57 | gui.Size = size | |
58 | gui.Font = "SourceSans" | |
59 | gui.FontSize = "Size14" | |
60 | gui.TextWrapped = false | |
61 | gui.TextStrokeTransparency = 0 | |
62 | gui.TextColor = BrickColor.new("White") | |
63 | return gui | |
64 | end | |
65 | ||
66 | if 1 then | |
67 | function chatfunc(text) | |
68 | local chat = coroutine.wrap(function() | |
69 | if PC:FindFirstChild("TalkingBillBoard")~= nil then | |
70 | PC:FindFirstChild("TalkingBillBoard"):destroy() | |
71 | end | |
72 | local naeeym2 = Instance.new("BillboardGui",PC) | |
73 | naeeym2.Size = UDim2.new(0,100,0,40) | |
74 | naeeym2.StudsOffset = Vector3.new(0,3,0) | |
75 | naeeym2.Adornee = PC.Head | |
76 | naeeym2.Name = "TalkingBillBoard" | |
77 | local tecks2 = Instance.new("TextLabel",naeeym2) | |
78 | tecks2.BackgroundTransparency = 1 | |
79 | tecks2.BorderSizePixel = 0 | |
80 | tecks2.Text = "" | |
81 | tecks2.Font = "Fantasy" | |
82 | tecks2.FontSize = "Size24" | |
83 | tecks2.TextStrokeTransparency = 0 | |
84 | tecks2.TextColor3 = Color3.new(5,0,5) | |
85 | tecks2.TextStrokeColor3 = Color3.new(0,0,0) | |
86 | tecks2.Size = UDim2.new(1,0,0.5,0) | |
87 | local shk = coroutine.wrap(function() | |
88 | while tecks2 ~= nil do | |
89 | wait(.05) | |
90 | tecks2.Position = UDim2.new(0,math.random(-3,3),0,math.random(-3,3)) | |
91 | end | |
92 | end) | |
93 | shk() | |
94 | for i = 1,string.len(text),1 do | |
95 | tecks2.Text = string.sub(text,1,i) | |
96 | wait(0.01) | |
97 | end | |
98 | wait(2) | |
99 | for i = 1, 5 do | |
100 | wait(.01) | |
101 | tecks2.Position = tecks2.Position - UDim2.new(0,0,.05,0) | |
102 | tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.2 | |
103 | tecks2.TextTransparency = tecks2.TextTransparency + .2 | |
104 | end | |
105 | naeeym2:Destroy() | |
106 | end) | |
107 | chat() | |
108 | end | |
109 | function onChatted(msg) | |
110 | chatfunc(msg) | |
111 | end | |
112 | PL.Chatted:connect(onChatted) | |
113 | end | |
114 | ---- Music | |
115 | local s = Instance.new("Sound",char) | |
116 | s.SoundId = "http://www.roblox.com/asset/?id=613361202" | |
117 | s.Parent = char.Torso | |
118 | s.Pitch = 1 | |
119 | s.Volume = 1 | |
120 | s.Looped = true | |
121 | wait(0.1) | |
122 | s:play() | |
123 | ---- GUI set | |
124 | local basgui = it("GuiMain") | |
125 | basgui.Parent = plr.PlayerGui | |
126 | basgui.Name = "CooldownsGUI" | |
127 | local basframe = it("Frame") | |
128 | basframe.Parent = basgui | |
129 | basframe.BackgroundColor3 = Color3.new(255, 255, 255) | |
130 | basframe.BackgroundTransparency = 1 | |
131 | basframe.BorderColor3 = Color3.new(17, 17, 17) | |
132 | basframe.Size = UDim2.new(0.2, 0, 0.2, 0) | |
133 | basframe.Position = UDim2.new(0.8, 0, 0.8, 0) | |
134 | local x = gui("TextLabel", basframe, "Basic", 0, BrickColor.new("Really black").Color, UDim2.new(-0.15, 0, 0.5, 0), UDim2.new(0.95, 0, 0.5, 0)) | |
135 | x.ZIndex = 2 | |
136 | x.Font = "Highway" | |
137 | x.BackgroundTransparency = 0.5 | |
138 | x.BorderSizePixel = 0.65 | |
139 | x.TextScaled = true | |
140 | x.Text = "Element: Greenlight" | |
141 | x.TextSize = 24 | |
142 | ||
143 | local Create = LoadLibrary("RbxUtility").Create | |
144 | ||
145 | CFuncs = { | |
146 | ["Part"] = { | |
147 | Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
148 | local Part = Create("Part"){ | |
149 | Parent = Parent, | |
150 | Reflectance = Reflectance, | |
151 | Transparency = Transparency, | |
152 | CanCollide = false, | |
153 | Locked = true, | |
154 | BrickColor = BrickColor.new(tostring(BColor)), | |
155 | Name = Name, | |
156 | Size = Size, | |
157 | Material = Material, | |
158 | } | |
159 | RemoveOutlines(Part) | |
160 | return Part | |
161 | end; | |
162 | }; | |
163 | ||
164 | ["Mesh"] = { | |
165 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
166 | local Msh = Create(Mesh){ | |
167 | Parent = Part, | |
168 | Offset = OffSet, | |
169 | Scale = Scale, | |
170 | } | |
171 | if Mesh == "SpecialMesh" then | |
172 | Msh.MeshType = MeshType | |
173 | Msh.MeshId = MeshId | |
174 | end | |
175 | return Msh | |
176 | end; | |
177 | }; | |
178 | ||
179 | ["Mesh"] = { | |
180 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
181 | local Msh = Create(Mesh){ | |
182 | Parent = Part, | |
183 | Offset = OffSet, | |
184 | Scale = Scale, | |
185 | } | |
186 | if Mesh == "SpecialMesh" then | |
187 | Msh.MeshType = MeshType | |
188 | Msh.MeshId = MeshId | |
189 | end | |
190 | return Msh | |
191 | end; | |
192 | }; | |
193 | ||
194 | ["Weld"] = { | |
195 | Create = function(Parent, Part0, Part1, C0, C1) | |
196 | local Weld = Create("Weld"){ | |
197 | Parent = Parent, | |
198 | Part0 = Part0, | |
199 | Part1 = Part1, | |
200 | C0 = C0, | |
201 | C1 = C1, | |
202 | } | |
203 | return Weld | |
204 | end; | |
205 | }; | |
206 | ||
207 | ["Sound"] = { | |
208 | Create = function(id, par, vol, pit) | |
209 | coroutine.resume(coroutine.create(function() | |
210 | local S = Create("Sound"){ | |
211 | Volume = vol, | |
212 | Pitch = pit or 1, | |
213 | SoundId = id, | |
214 | Parent = par or workspace, | |
215 | } | |
216 | wait() | |
217 | S:play() | |
218 | game:GetService("Debris"):AddItem(S, 10) | |
219 | end)) | |
220 | end; | |
221 | }; | |
222 | ||
223 | ["ParticleEmitter"] = { | |
224 | Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
225 | local fp = Create("ParticleEmitter"){ | |
226 | Parent = Parent, | |
227 | Color = ColorSequence.new(Color1, Color2), | |
228 | LightEmission = LightEmission, | |
229 | Size = Size, | |
230 | Texture = Texture, | |
231 | Transparency = Transparency, | |
232 | ZOffset = ZOffset, | |
233 | Acceleration = Accel, | |
234 | Drag = Drag, | |
235 | LockedToPart = LockedToPart, | |
236 | VelocityInheritance = VelocityInheritance, | |
237 | EmissionDirection = EmissionDirection, | |
238 | Enabled = Enabled, | |
239 | Lifetime = LifeTime, | |
240 | Rate = Rate, | |
241 | Rotation = Rotation, | |
242 | RotSpeed = RotSpeed, | |
243 | Speed = Speed, | |
244 | VelocitySpread = VelocitySpread, | |
245 | } | |
246 | return fp | |
247 | end; | |
248 | }; | |
249 | ||
250 | CreateTemplate = { | |
251 | ||
252 | }; | |
253 | } | |
254 | ||
255 | ||
256 | ||
257 | New = function(Object, Parent, Name, Data) | |
258 | local Object = Instance.new(Object) | |
259 | for Index, Value in pairs(Data or {}) do | |
260 | Object[Index] = Value | |
261 | end | |
262 | Object.Parent = Parent | |
263 | Object.Name = Name | |
264 | return Object | |
265 | end | |
266 | ||
267 | function Explode(rad,par,pitch,vol) | |
268 | local expart = Instance.new("Part",char) | |
269 | local expart2 = Instance.new("Part",char) | |
270 | local rin = Instance.new("Part",char) | |
271 | local rin2 = Instance.new("Part",char) | |
272 | local partMesh = Instance.new("SpecialMesh",expart) | |
273 | partMesh.MeshType = "Sphere" | |
274 | local partMesh2 = Instance.new("SpecialMesh",expart2) | |
275 | partMesh2.MeshType = "Sphere" | |
276 | local partMesh3 = Instance.new("SpecialMesh",rin) | |
277 | partMesh3.MeshType = "Sphere" | |
278 | local partMesh4 = Instance.new("SpecialMesh",rin2) | |
279 | partMesh4.MeshType = "Sphere" | |
280 | CFuncs["Sound"].Create("rbxassetid://165970126", expart,vol, pitch) | |
281 | partMesh.Scale = vt(rad,rad,rad) | |
282 | expart.Size = vt(1,1,1) | |
283 | expart.Transparency = 0 | |
284 | expart.Anchored = true | |
285 | expart.Material = "Neon" | |
286 | expart.BrickColor = bc("White") | |
287 | expart.CFrame = par.CFrame | |
288 | partMesh2.Scale = vt(rad,rad,rad) | |
289 | expart2.Size = vt(1.15,1.15,1.15) | |
290 | expart2.Transparency = 0.5 | |
291 | expart2.Anchored = true | |
292 | expart2.Material = "Neon" | |
293 | expart2.BrickColor = par.BrickColor | |
294 | expart2.CFrame = par.CFrame | |
295 | rin.Size = vt(1.15,1.15,1.15) | |
296 | rin.Transparency = 0.75 | |
297 | rin.Anchored = true | |
298 | rin.Material = "Neon" | |
299 | rin.BrickColor = par.BrickColor | |
300 | rin.CFrame = par.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))) | |
301 | rin2.Size = vt(1.15,1.15,1.15) | |
302 | rin2.Transparency = 0.75 | |
303 | rin2.Anchored = true | |
304 | rin2.Material = "Neon" | |
305 | rin2.BrickColor = par.BrickColor | |
306 | rin2.CFrame = par.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))) | |
307 | local hitbox = Instance.new("Part",char) | |
308 | hitbox.Size = Vector3.new(1,1,1) | |
309 | hitbox.CFrame = par.CFrame | |
310 | hitbox.Anchored = true | |
311 | hitbox.Transparency = 1 | |
312 | hitbox.CanCollide = false | |
313 | partMesh3.Scale = vt(0,1,0) | |
314 | partMesh4.Scale = vt(0,1,0) | |
315 | expart.CanCollide = false | |
316 | expart2.CanCollide = false | |
317 | rin.CanCollide = false | |
318 | rin2.CanCollide = false | |
319 | hitbox.Touched:connect(function(hit) | |
320 | Damagefunc(hit,5,10,math.random(50,100),"Normal",root,.2,1) | |
321 | end) | |
322 | game:GetService("Debris"):AddItem(hitbox, 3) | |
323 | local value = 1*rad/6.5 | |
324 | for i = 0, 199 do | |
325 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
326 | expart.CFrame = expart.CFrame | |
327 | hitbox.Size = hitbox.Size + Vector3.new(value*1.5,value*1.5,value*1.5) | |
328 | hitbox.CFrame = expart.CFrame | |
329 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
330 | expart2.CFrame = expart.CFrame | |
331 | value = value - 0.035*rad/30 | |
332 | if value < 7.5 then | |
333 | partMesh3.Scale = partMesh3.Scale + vt(rad/5,0,rad/5) | |
334 | rin.CFrame = rin.CFrame | |
335 | partMesh4.Scale = partMesh4.Scale + vt(rad/7.5,0,rad/7.5) | |
336 | rin2.CFrame = rin2.CFrame | |
337 | end | |
338 | if value < 0 then | |
339 | expart.Transparency = expart.Transparency + 0.025 | |
340 | expart2.Transparency = expart2.Transparency + 0.025 | |
341 | rin.Transparency = rin.Transparency + 0.025 | |
342 | rin2.Transparency = rin2.Transparency + 0.025 | |
343 | end | |
344 | swait() | |
345 | end | |
346 | game:GetService("Debris"):AddItem(expart, 1) | |
347 | game:GetService("Debris"):AddItem(expart2, 1) | |
348 | game:GetService("Debris"):AddItem(rin, 1) | |
349 | game:GetService("Debris"):AddItem(rin2, 1) | |
350 | end | |
351 | ||
352 | function ExplodeShort(rad,par,pitch,vol) | |
353 | local expart = Instance.new("Part",char) | |
354 | local expart2 = Instance.new("Part",char) | |
355 | local partMesh = Instance.new("SpecialMesh",expart) | |
356 | partMesh.MeshType = "Sphere" | |
357 | local partMesh2 = Instance.new("SpecialMesh",expart2) | |
358 | partMesh2.MeshType = "Sphere" | |
359 | CFuncs["Sound"].Create("http://www.roblox.com/asset/?id=142070127", expart,vol, pitch) | |
360 | partMesh.Scale = vt(rad,rad,rad) | |
361 | expart.Size = vt(1,1,1) | |
362 | expart.Transparency = 0 | |
363 | expart.Anchored = true | |
364 | expart.Material = "Neon" | |
365 | expart.BrickColor = bc("White") | |
366 | expart.CFrame = par.CFrame | |
367 | partMesh2.Scale = vt(rad,rad,rad) | |
368 | expart2.Size = vt(1.15,1.15,1.15) | |
369 | expart2.Transparency = 0.5 | |
370 | expart2.Anchored = true | |
371 | expart2.Material = "Neon" | |
372 | expart2.BrickColor = par.BrickColor | |
373 | expart2.CFrame = par.CFrame | |
374 | expart.CanCollide = false | |
375 | expart2.CanCollide = false | |
376 | local hitbox = Instance.new("Part",char) | |
377 | hitbox.Size = Vector3.new(1,1,1) | |
378 | hitbox.CFrame = par.CFrame | |
379 | hitbox.Anchored = true | |
380 | hitbox.Transparency = 1 | |
381 | hitbox.CanCollide = false | |
382 | ||
383 | hitbox.Touched:connect(function(hit) | |
384 | Damagefunc(hit,5,10,math.random(10,20),"Normal",root,.2,1) | |
385 | end) | |
386 | game:GetService("Debris"):AddItem(hitbox, 1) | |
387 | local value = 1*rad/6.5 | |
388 | for i = 0, 75 do | |
389 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
390 | expart.CFrame = expart.CFrame | |
391 | hitbox.Size = hitbox.Size + Vector3.new(value*1.5,value*1.5,value*1.5) | |
392 | hitbox.CFrame = expart.CFrame | |
393 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
394 | expart2.CFrame = expart.CFrame | |
395 | value = value - 0.035*rad/5 | |
396 | if value < 0 then | |
397 | value = 0 | |
398 | expart.Transparency = expart.Transparency + 0.05 | |
399 | expart2.Transparency = expart2.Transparency + 0.05 | |
400 | end | |
401 | swait() | |
402 | end | |
403 | game:GetService("Debris"):AddItem(expart, 1) | |
404 | game:GetService("Debris"):AddItem(expart2, 1) | |
405 | end | |
406 | ||
407 | function PulseDam(rad,par,col) | |
408 | local expart = Instance.new("Part",char) | |
409 | local expart2 = Instance.new("Part",char) | |
410 | local partMesh = Instance.new("SpecialMesh",expart) | |
411 | partMesh.MeshType = "Sphere" | |
412 | local partMesh2 = Instance.new("SpecialMesh",expart2) | |
413 | partMesh2.MeshType = "Sphere" | |
414 | partMesh.Scale = vt(rad,rad,rad) | |
415 | expart.Size = vt(1,1,1) | |
416 | expart.Transparency = 0 | |
417 | expart.Anchored = true | |
418 | expart.Material = "Neon" | |
419 | expart.BrickColor = bc("White") | |
420 | expart.CFrame = par.CFrame | |
421 | partMesh2.Scale = vt(rad,rad,rad) | |
422 | expart2.Size = vt(1.15,1.15,1.15) | |
423 | expart2.Transparency = 0.5 | |
424 | expart2.Anchored = true | |
425 | expart2.Material = "Neon" | |
426 | expart2.BrickColor = col | |
427 | expart2.CFrame = par.CFrame | |
428 | expart.CanCollide = false | |
429 | expart2.CanCollide = false | |
430 | local hitbox = Instance.new("Part",char) | |
431 | hitbox.Size = Vector3.new(1,1,1) | |
432 | hitbox.CFrame = par.CFrame | |
433 | hitbox.Anchored = true | |
434 | hitbox.Transparency = 1 | |
435 | hitbox.CanCollide = false | |
436 | ||
437 | hitbox.Touched:connect(function(hit) | |
438 | Damagefunc(hit,10,15,1,"Normal",root,.2,1) | |
439 | end) | |
440 | local value = 1*rad/10 | |
441 | for i = 0, 34 do | |
442 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
443 | expart.CFrame = expart.CFrame | |
444 | hitbox.Size = hitbox.Size + Vector3.new(value*1.5,value*1.5,value*1.5) | |
445 | hitbox.CFrame = expart.CFrame | |
446 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
447 | expart2.CFrame = expart.CFrame | |
448 | value = value - 0.035*rad/10 | |
449 | if value < 0 then | |
450 | value = 0 | |
451 | end | |
452 | swait() | |
453 | end | |
454 | for z = 0, 4 do | |
455 | CFuncs["Sound"].Create("rbxassetid://203691467", expart, 1, 0.25) | |
456 | for i = 0, 24 do | |
457 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
458 | expart.CFrame = expart.CFrame | |
459 | hitbox.Size = hitbox.Size + Vector3.new(value*1.5,value*1.5,value*1.5) | |
460 | hitbox.CFrame = expart.CFrame | |
461 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
462 | expart2.CFrame = expart.CFrame | |
463 | value = value - 0.035*rad/10 | |
464 | swait() | |
465 | end | |
466 | for i = 0, 49 do | |
467 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
468 | expart.CFrame = expart.CFrame | |
469 | hitbox.Size = hitbox.Size + Vector3.new(value*1.5,value*1.5,value*1.5) | |
470 | hitbox.CFrame = expart.CFrame | |
471 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
472 | expart2.CFrame = expart.CFrame | |
473 | value = value + 0.035*rad/10 | |
474 | swait() | |
475 | end | |
476 | CFuncs["Sound"].Create("rbxassetid://203691467", expart, 1, 0.25) | |
477 | for i = 0, 24 do | |
478 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
479 | expart.CFrame = expart.CFrame | |
480 | hitbox.Size = hitbox.Size + Vector3.new(value*1.5,value*1.5,value*1.5) | |
481 | hitbox.CFrame = expart.CFrame | |
482 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
483 | expart2.CFrame = expart.CFrame | |
484 | value = value - 0.035*rad/10 | |
485 | swait() | |
486 | end | |
487 | end | |
488 | for i = 0, 75 do | |
489 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
490 | expart.CFrame = expart.CFrame | |
491 | hitbox.Size = hitbox.Size + Vector3.new(value*1.5,value*1.5,value*1.5) | |
492 | hitbox.CFrame = expart.CFrame | |
493 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
494 | expart2.CFrame = expart.CFrame | |
495 | value = value - 0.035*rad/10 | |
496 | if value < 0 then | |
497 | expart.Transparency = expart.Transparency + 0.025 | |
498 | expart2.Transparency = expart2.Transparency + 0.025 | |
499 | end | |
500 | swait() | |
501 | end | |
502 | game:GetService("Debris"):AddItem(hitbox, 0.1) | |
503 | game:GetService("Debris"):AddItem(expart, 1) | |
504 | game:GetService("Debris"):AddItem(expart2, 1) | |
505 | end | |
506 | ||
507 | ||
508 | function PulseShort(rad,par,col,times) | |
509 | local expart = Instance.new("Part",char) | |
510 | local expart2 = Instance.new("Part",char) | |
511 | local partMesh = Instance.new("SpecialMesh",expart) | |
512 | partMesh.MeshType = "Sphere" | |
513 | local partMesh2 = Instance.new("SpecialMesh",expart2) | |
514 | partMesh2.MeshType = "Sphere" | |
515 | partMesh.Scale = vt(rad,rad,rad) | |
516 | expart.Size = vt(1,1,1) | |
517 | expart.Transparency = 0 | |
518 | expart.Anchored = true | |
519 | expart.Material = "Neon" | |
520 | expart.BrickColor = bc("White") | |
521 | expart.CFrame = par.CFrame | |
522 | partMesh2.Scale = vt(rad,rad,rad) | |
523 | expart2.Size = vt(1.15,1.15,1.15) | |
524 | expart2.Transparency = 0.5 | |
525 | expart2.Anchored = true | |
526 | expart2.Material = "Neon" | |
527 | expart2.BrickColor = col | |
528 | expart2.CFrame = par.CFrame | |
529 | expart.CanCollide = false | |
530 | expart2.CanCollide = false | |
531 | local value = 1*rad/10 | |
532 | for i = 0, 34 do | |
533 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
534 | expart.CFrame = expart.CFrame | |
535 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
536 | expart2.CFrame = expart.CFrame | |
537 | value = value - 0.035*rad/10 | |
538 | if value < 0 then | |
539 | value = 0 | |
540 | end | |
541 | swait() | |
542 | end | |
543 | for z = 0, times do | |
544 | for i = 0, 24 do | |
545 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
546 | expart.CFrame = expart.CFrame | |
547 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
548 | expart2.CFrame = expart.CFrame | |
549 | value = value - 0.035*rad/10 | |
550 | swait() | |
551 | end | |
552 | for i = 0, 49 do | |
553 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
554 | expart.CFrame = expart.CFrame | |
555 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
556 | expart2.CFrame = expart.CFrame | |
557 | value = value + 0.035*rad/10 | |
558 | swait() | |
559 | end | |
560 | for i = 0, 24 do | |
561 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
562 | expart.CFrame = expart.CFrame | |
563 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
564 | expart2.CFrame = expart.CFrame | |
565 | value = value - 0.035*rad/10 | |
566 | swait() | |
567 | end | |
568 | end | |
569 | for i = 0, 75 do | |
570 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
571 | expart.CFrame = expart.CFrame | |
572 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
573 | expart2.CFrame = expart.CFrame | |
574 | value = value - 0.035*rad/10 | |
575 | if value < 0 then | |
576 | expart.Transparency = expart.Transparency + 0.025 | |
577 | expart2.Transparency = expart2.Transparency + 0.025 | |
578 | end | |
579 | swait() | |
580 | end | |
581 | game:GetService("Debris"):AddItem(expart, 1) | |
582 | game:GetService("Debris"):AddItem(expart2, 1) | |
583 | end | |
584 | ||
585 | ||
586 | ||
587 | function ExplodeLong(rad,par,pitch,vol) | |
588 | local expart = Instance.new("Part",char) | |
589 | local expart2 = Instance.new("Part",char) | |
590 | local partMesh = Instance.new("SpecialMesh",expart) | |
591 | partMesh.MeshType = "Sphere" | |
592 | local partMesh2 = Instance.new("SpecialMesh",expart2) | |
593 | partMesh2.MeshType = "Sphere" | |
594 | CFuncs["Sound"].Create("rbxassetid://165970126", char, vol, pitch) | |
595 | expart.Size = vt(1,1,1) | |
596 | expart.Transparency = 0 | |
597 | expart.Anchored = true | |
598 | expart.Material = "Neon" | |
599 | expart.BrickColor = bc("White") | |
600 | expart.CFrame = par.CFrame | |
601 | expart2.Size = vt(1.15,1.15,1.15) | |
602 | expart2.Transparency = 0.5 | |
603 | expart2.Anchored = true | |
604 | expart2.Material = "Neon" | |
605 | expart2.BrickColor = par.BrickColor | |
606 | expart2.CFrame = par.CFrame | |
607 | expart.CanCollide = false | |
608 | expart2.CanCollide = false | |
609 | local hitbox = Instance.new("Part",char) | |
610 | hitbox.Size = Vector3.new(1,1,1) | |
611 | hitbox.CFrame = par.CFrame | |
612 | hitbox.Anchored = true | |
613 | hitbox.Transparency = 1 | |
614 | hitbox.CanCollide = false | |
615 | hitbox.Touched:connect(function(hit) | |
616 | Damagefunc(hit,50,75,math.random(50,100),"Normal",root,.2,1) | |
617 | end) | |
618 | game:GetService("Debris"):AddItem(hitbox, 3) | |
619 | local value = 1*rad/6.5 | |
620 | for i = 0, 175 do | |
621 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
622 | expart.CFrame = expart.CFrame | |
623 | hitbox.Size = hitbox.Size + Vector3.new(value*1.5,value*1.5,value*1.5) | |
624 | hitbox.CFrame = expart.CFrame | |
625 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
626 | expart2.CFrame = expart.CFrame | |
627 | value = value - 0.035*rad/30 | |
628 | if value < 0 then | |
629 | expart.Transparency = expart.Transparency + 0.025 | |
630 | expart2.Transparency = expart2.Transparency + 0.025 | |
631 | end | |
632 | swait() | |
633 | end | |
634 | game:GetService("Debris"):AddItem(expart, 1) | |
635 | game:GetService("Debris"):AddItem(expart2, 1) | |
636 | end | |
637 | ||
638 | local m = Instance.new("Model",char) | |
639 | ||
640 | function CreatePart(parent,transparency,reflectance,material,brickcolor) | |
641 | local p = Instance.new("Part") | |
642 | p.Parent = parent | |
643 | p.Size = Vector3.new(1,1,1) | |
644 | p.Transparency = transparency | |
645 | p.Reflectance = reflectance | |
646 | p.CanCollide = false | |
647 | p.Locked = true | |
648 | p.BrickColor = brickcolor | |
649 | p.Material = material | |
650 | return p | |
651 | end | |
652 | ||
653 | function CreateMesh(parent,meshtype,x1,y1,z1) | |
654 | local mesh = Instance.new("SpecialMesh",parent) | |
655 | mesh.MeshType = meshtype | |
656 | mesh.Scale = Vector3.new(x1,y1,z1) | |
657 | return mesh | |
658 | end | |
659 | ||
660 | function CreateSpecialGlowMesh(parent,meshid,x1,y1,z1) | |
661 | local mesh = Instance.new("SpecialMesh",parent) | |
662 | mesh.MeshType = "FileMesh" | |
663 | mesh.MeshId = meshid | |
664 | mesh.TextureId = "http://www.roblox.com/asset/?id=269748808" | |
665 | mesh.Scale = Vector3.new(x1,y1,z1) | |
666 | mesh.VertexColor = Vector3.new(parent.BrickColor.r, parent.BrickColor.g, parent.BrickColor.b) | |
667 | return mesh | |
668 | end | |
669 | ||
670 | function CreateWeld(parent,part0,part1,C1X,C1Y,C1Z,C1Xa,C1Ya,C1Za,C0X,C0Y,C0Z,C0Xa,C0Ya,C0Za) | |
671 | local weld = Instance.new("Weld") | |
672 | weld.Parent = parent | |
673 | weld.Part0 = part0 | |
674 | weld.Part1 = part1 | |
675 | weld.C1 = CFrame.new(C1X,C1Y,C1Z)*CFrame.Angles(C1Xa,C1Ya,C1Za) | |
676 | weld.C0 = CFrame.new(C0X,C0Y,C0Z)*CFrame.Angles(C0Xa,C0Ya,C0Za) | |
677 | return weld | |
678 | end | |
679 | ||
680 | ||
681 | local sorb = CreatePart(m,1,1,"SmoothPlastic",BrickColor.random()) | |
682 | CreateWeld(sorb,rarm,sorb,0,2,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
683 | local sorb2 = CreatePart(m,1,1,"SmoothPlastic",BrickColor.random()) | |
684 | CreateWeld(sorb2,larm,sorb2,0,2,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
685 | ||
686 | Player=game:GetService("Players").LocalPlayer | |
687 | Character=Player.Character | |
688 | PlayerGui=Player.PlayerGui | |
689 | Backpack=Player.Backpack | |
690 | Torso=Character.Torso | |
691 | Head=Character.Head | |
692 | Humanoid=Character.Humanoid | |
693 | m=Instance.new('Model',Character) | |
694 | LeftArm=Character["Left Arm"] | |
695 | LeftLeg=Character["Left Leg"] | |
696 | RightArm=Character["Right Arm"] | |
697 | RightLeg=Character["Right Leg"] | |
698 | LS=Torso["Left Shoulder"] | |
699 | LH=Torso["Left Hip"] | |
700 | RS=Torso["Right Shoulder"] | |
701 | RH=Torso["Right Hip"] | |
702 | Face = Head.face | |
703 | Neck=Torso.Neck | |
704 | it=Instance.new | |
705 | attacktype=1 | |
706 | vt=Vector3.new | |
707 | cf=CFrame.new | |
708 | euler=CFrame.fromEulerAnglesXYZ | |
709 | angles=CFrame.Angles | |
710 | cloaked=false | |
711 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
712 | necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
713 | LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) | |
714 | LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0) | |
715 | RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0) | |
716 | RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0) | |
717 | RootPart=Character.HumanoidRootPart | |
718 | RootJoint=RootPart.RootJoint | |
719 | RootCF=euler(-1.57,0,3.14) | |
720 | attack = false | |
721 | attackdebounce = false | |
722 | deb=false | |
723 | equipped=true | |
724 | hand=false | |
725 | MMouse=nil | |
726 | combo=0 | |
727 | mana=0 | |
728 | trispeed=.2 | |
729 | attackmode='none' | |
730 | local idle=0 | |
731 | local Anim="Idle" | |
732 | local Effects={} | |
733 | local gun=false | |
734 | local shoot=false | |
735 | local sine = 0 | |
736 | local change = 1 | |
737 | player=nil | |
738 | ||
739 | mouse=Player:GetMouse() | |
740 | --save shoulders | |
741 | RSH, LSH=nil, nil | |
742 | --welds | |
743 | RW, LW=Instance.new("Weld"), Instance.new("Weld") | |
744 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
745 | LH=Torso["Left Hip"] | |
746 | RH=Torso["Right Hip"] | |
747 | TorsoColor=Torso.BrickColor | |
748 | function NoOutline(Part) | |
749 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
750 | end | |
751 | player=Player | |
752 | ch=Character | |
753 | RSH=ch.Torso["Right Shoulder"] | |
754 | LSH=ch.Torso["Left Shoulder"] | |
755 | -- | |
756 | RSH.Parent=nil | |
757 | LSH.Parent=nil | |
758 | -- | |
759 | RW.Name="Right Shoulder" | |
760 | RW.Part0=ch.Torso | |
761 | RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
762 | RW.C1=cf(0, 0.5, 0) | |
763 | RW.Part1=ch["Right Arm"] | |
764 | RW.Parent=ch.Torso | |
765 | -- | |
766 | LW.Name="Left Shoulder" | |
767 | LW.Part0=ch.Torso | |
768 | LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
769 | LW.C1=cf(0, 0.5, 0) | |
770 | LW.Part1=ch["Left Arm"] | |
771 | LW.Parent=ch.Torso | |
772 | ||
773 | local Stats=Instance.new("BoolValue") | |
774 | Stats.Name="Stats" | |
775 | Stats.Parent=Character | |
776 | local Atk=Instance.new("NumberValue") | |
777 | Atk.Name="Damage" | |
778 | Atk.Parent=Stats | |
779 | Atk.Value=1 | |
780 | local Def=Instance.new("NumberValue") | |
781 | Def.Name="Defense" | |
782 | Def.Parent=Stats | |
783 | Def.Value=1 | |
784 | local Speed=Instance.new("NumberValue") | |
785 | Speed.Name="Speed" | |
786 | Speed.Parent=Stats | |
787 | Speed.Value=1 | |
788 | local Mvmt=Instance.new("NumberValue") | |
789 | Mvmt.Name="Movement" | |
790 | Mvmt.Parent=Stats | |
791 | Mvmt.Value=1 | |
792 | ||
793 | local donum=0 | |
794 | ||
795 | ||
796 | function part(formfactor,parent,reflectance,transparency,brickcolor,name,size) | |
797 | local fp=it("Part") | |
798 | fp.formFactor=formfactor | |
799 | fp.Parent=parent | |
800 | fp.Reflectance=reflectance | |
801 | fp.Transparency=transparency | |
802 | fp.CanCollide=false | |
803 | fp.Locked=true | |
804 | fp.BrickColor=brickcolor | |
805 | fp.Name=name | |
806 | fp.Size=size | |
807 | fp.Position=Torso.Position | |
808 | NoOutline(fp) | |
809 | fp.Material="SmoothPlastic" | |
810 | fp:BreakJoints() | |
811 | return fp | |
812 | end | |
813 | ||
814 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
815 | local mesh=it(Mesh) | |
816 | mesh.Parent=part | |
817 | if Mesh=="SpecialMesh" then | |
818 | mesh.MeshType=meshtype | |
819 | if meshid~="nil" then | |
820 | mesh.MeshId="http://www.roblox.com/asset/?id="..meshid | |
821 | end | |
822 | end | |
823 | mesh.Offset=offset | |
824 | mesh.Scale=scale | |
825 | return mesh | |
826 | end | |
827 | ||
828 | function weld(parent,part0,part1,c0) | |
829 | local weld=it("Weld") | |
830 | weld.Parent=parent | |
831 | weld.Part0=part0 | |
832 | weld.Part1=part1 | |
833 | weld.C0=c0 | |
834 | return weld | |
835 | end | |
836 | ||
837 | local Color1=Torso.BrickColor | |
838 | ||
839 | local bodvel=Instance.new("BodyVelocity") | |
840 | local bg=Instance.new("BodyGyro") | |
841 | ||
842 | function swait(num) | |
843 | if num==0 or num==nil then | |
844 | game:service'RunService'.Stepped:wait(0) | |
845 | else | |
846 | for i=0,num do | |
847 | game:service'RunService'.Stepped:wait(0) | |
848 | end | |
849 | end | |
850 | end | |
851 | ||
852 | ||
853 | so = function(id,par,vol,pit) | |
854 | coroutine.resume(coroutine.create(function() | |
855 | local sou = Instance.new("Sound",par or workspace) | |
856 | sou.Volume=vol | |
857 | sou.Pitch=pit or 1 | |
858 | sou.SoundId=id | |
859 | swait() | |
860 | sou:play() | |
861 | game:GetService("Debris"):AddItem(sou,6) | |
862 | end)) | |
863 | end | |
864 | ||
865 | function clerp(a,b,t) | |
866 | local qa = {QuaternionFromCFrame(a)} | |
867 | local qb = {QuaternionFromCFrame(b)} | |
868 | local ax, ay, az = a.x, a.y, a.z | |
869 | local bx, by, bz = b.x, b.y, b.z | |
870 | local _t = 1-t | |
871 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
872 | end | |
873 | ||
874 | function QuaternionFromCFrame(cf) | |
875 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
876 | local trace = m00 + m11 + m22 | |
877 | if trace > 0 then | |
878 | local s = math.sqrt(1 + trace) | |
879 | local recip = 0.5/s | |
880 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
881 | else | |
882 | local i = 0 | |
883 | if m11 > m00 then | |
884 | i = 1 | |
885 | end | |
886 | if m22 > (i == 0 and m00 or m11) then | |
887 | i = 2 | |
888 | end | |
889 | if i == 0 then | |
890 | local s = math.sqrt(m00-m11-m22+1) | |
891 | local recip = 0.5/s | |
892 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
893 | elseif i == 1 then | |
894 | local s = math.sqrt(m11-m22-m00+1) | |
895 | local recip = 0.5/s | |
896 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
897 | elseif i == 2 then | |
898 | local s = math.sqrt(m22-m00-m11+1) | |
899 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
900 | end | |
901 | end | |
902 | end | |
903 | ||
904 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
905 | local xs, ys, zs = x + x, y + y, z + z | |
906 | local wx, wy, wz = w*xs, w*ys, w*zs | |
907 | local xx = x*xs | |
908 | local xy = x*ys | |
909 | local xz = x*zs | |
910 | local yy = y*ys | |
911 | local yz = y*zs | |
912 | local zz = z*zs | |
913 | return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) | |
914 | end | |
915 | ||
916 | function QuaternionSlerp(a, b, t) | |
917 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
918 | local startInterp, finishInterp; | |
919 | if cosTheta >= 0.0001 then | |
920 | if (1 - cosTheta) > 0.0001 then | |
921 | local theta = math.acos(cosTheta) | |
922 | local invSinTheta = 1/math.sin(theta) | |
923 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
924 | finishInterp = math.sin(t*theta)*invSinTheta | |
925 | else | |
926 | startInterp = 1-t | |
927 | finishInterp = t | |
928 | end | |
929 | else | |
930 | if (1+cosTheta) > 0.0001 then | |
931 | local theta = math.acos(-cosTheta) | |
932 | local invSinTheta = 1/math.sin(theta) | |
933 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
934 | finishInterp = math.sin(t*theta)*invSinTheta | |
935 | else | |
936 | startInterp = t-1 | |
937 | finishInterp = t | |
938 | end | |
939 | end | |
940 | return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp | |
941 | end | |
942 | ||
943 | local function CFrameFromTopBack(at, top, back) | |
944 | local right = top:Cross(back) | |
945 | return CFrame.new(at.x, at.y, at.z, | |
946 | right.x, top.x, back.x, | |
947 | right.y, top.y, back.y, | |
948 | right.z, top.z, back.z) | |
949 | end | |
950 | ||
951 | function Triangle(a, b, c) | |
952 | local edg1 = (c-a):Dot((b-a).unit) | |
953 | local edg2 = (a-b):Dot((c-b).unit) | |
954 | local edg3 = (b-c):Dot((a-c).unit) | |
955 | if edg1 <= (b-a).magnitude and edg1 >= 0 then | |
956 | a, b, c = a, b, c | |
957 | elseif edg2 <= (c-b).magnitude and edg2 >= 0 then | |
958 | a, b, c = b, c, a | |
959 | elseif edg3 <= (a-c).magnitude and edg3 >= 0 then | |
960 | a, b, c = c, a, b | |
961 | else | |
962 | assert(false, "unreachable") | |
963 | end | |
964 | ||
965 | local len1 = (c-a):Dot((b-a).unit) | |
966 | local len2 = (b-a).magnitude - len1 | |
967 | local width = (a + (b-a).unit*len1 - c).magnitude | |
968 | ||
969 | local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit) | |
970 | ||
971 | local list = {} | |
972 | ||
973 | if len1 > 0.01 then | |
974 | local w1 = Instance.new('WedgePart', m) | |
975 | game:GetService("Debris"):AddItem(w1,5) | |
976 | w1.Material = "SmoothPlastic" | |
977 | w1.FormFactor = 'Custom' | |
978 | w1.BrickColor = BrickColor.new("Really red") | |
979 | w1.Transparency = 0 | |
980 | w1.Reflectance = 0 | |
981 | w1.Material = "SmoothPlastic" | |
982 | w1.CanCollide = false | |
983 | local l1 = Instance.new("PointLight",w1) | |
984 | l1.Color = Color3.new(170,0,0) | |
985 | NoOutline(w1) | |
986 | local sz = Vector3.new(0.2, width, len1) | |
987 | w1.Size = sz | |
988 | local sp = Instance.new("SpecialMesh",w1) | |
989 | sp.MeshType = "Wedge" | |
990 | sp.Scale = Vector3.new(0,1,1) * sz/w1.Size | |
991 | w1:BreakJoints() | |
992 | w1.Anchored = true | |
993 | w1.Parent = workspace | |
994 | w1.Transparency = 0.7 | |
995 | table.insert(Effects,{w1,"Disappear",.01}) | |
996 | w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2) | |
997 | table.insert(list,w1) | |
998 | end | |
999 | ||
1000 | if len2 > 0.01 then | |
1001 | local w2 = Instance.new('WedgePart', m) | |
1002 | game:GetService("Debris"):AddItem(w2,5) | |
1003 | w2.Material = "SmoothPlastic" | |
1004 | w2.FormFactor = 'Custom' | |
1005 | w2.BrickColor = BrickColor.new("Really red") | |
1006 | w2.Transparency = 0 | |
1007 | w2.Reflectance = 0 | |
1008 | w2.Material = "SmoothPlastic" | |
1009 | w2.CanCollide = false | |
1010 | local l2 = Instance.new("PointLight",w2) | |
1011 | l2.Color = Color3.new(170,0,0) | |
1012 | NoOutline(w2) | |
1013 | local sz = Vector3.new(0.2, width, len2) | |
1014 | w2.Size = sz | |
1015 | local sp = Instance.new("SpecialMesh",w2) | |
1016 | sp.MeshType = "Wedge" | |
1017 | sp.Scale = Vector3.new(0,1,1) * sz/w2.Size | |
1018 | w2:BreakJoints() | |
1019 | w2.Anchored = true | |
1020 | w2.Parent = workspace | |
1021 | w2.Transparency = 0.7 | |
1022 | table.insert(Effects,{w2,"Disappear",.01}) | |
1023 | w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2) | |
1024 | table.insert(list,w2) | |
1025 | end | |
1026 | return unpack(list) | |
1027 | end | |
1028 | ||
1029 | ||
1030 | Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock) | |
1031 | if hit.Parent==nil then | |
1032 | return | |
1033 | end | |
1034 | h=hit.Parent:FindFirstChild("Humanoid") | |
1035 | for _,v in pairs(hit.Parent:children()) do | |
1036 | if v:IsA("Humanoid") then | |
1037 | h=v | |
1038 | end | |
1039 | end | |
1040 | if hit.Parent.Parent:FindFirstChild("Torso")~=nil then | |
1041 | h=hit.Parent.Parent:FindFirstChild("Humanoid") | |
1042 | end | |
1043 | if hit.Parent.className=="Hat" then | |
1044 | hit=hit.Parent.Parent:findFirstChild("Head") | |
1045 | end | |
1046 | if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then | |
1047 | if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end | |
1048 | --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then | |
1049 | return | |
1050 | end]] | |
1051 | -- hs(hit,1.2) | |
1052 | c=Instance.new("ObjectValue") | |
1053 | c.Name="creator" | |
1054 | c.Value=game:service("Players").LocalPlayer | |
1055 | c.Parent=h | |
1056 | game:GetService("Debris"):AddItem(c,.5) | |
1057 | Damage=math.random(minim,maxim) | |
1058 | -- h:TakeDamage(Damage) | |
1059 | blocked=false | |
1060 | block=hit.Parent:findFirstChild("Block") | |
1061 | if block~=nil then | |
1062 | print(block.className) | |
1063 | if block.className=="NumberValue" then | |
1064 | if block.Value>0 then | |
1065 | blocked=true | |
1066 | if decreaseblock==nil then | |
1067 | block.Value=block.Value-1 | |
1068 | end | |
1069 | end | |
1070 | end | |
1071 | if block.className=="IntValue" then | |
1072 | if block.Value>0 then | |
1073 | blocked=true | |
1074 | if decreaseblock~=nil then | |
1075 | block.Value=block.Value-1 | |
1076 | end | |
1077 | end | |
1078 | end | |
1079 | end | |
1080 | if blocked==false then | |
1081 | -- h:TakeDamage(Damage) | |
1082 | h.Health=h.Health-Damage | |
1083 | showDamage(hit.Parent,Damage,.5,BrickColor.new("Really red")) | |
1084 | else | |
1085 | h.Health=h.Health-(Damage/2) | |
1086 | showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue")) | |
1087 | end | |
1088 | if Type=="Knockdown" then | |
1089 | hum=hit.Parent.Humanoid | |
1090 | hum.PlatformStand=true | |
1091 | coroutine.resume(coroutine.create(function(HHumanoid) | |
1092 | swait(1) | |
1093 | HHumanoid.PlatformStand=false | |
1094 | end),hum) | |
1095 | local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit | |
1096 | --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0) | |
1097 | local bodvol=Instance.new("BodyVelocity") | |
1098 | bodvol.velocity=angle*knockback | |
1099 | bodvol.P=5000 | |
1100 | bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
1101 | bodvol.Parent=hit | |
1102 | rl=Instance.new("BodyAngularVelocity") | |
1103 | rl.P=3000 | |
1104 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
1105 | rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)) | |
1106 | rl.Parent=hit | |
1107 | game:GetService("Debris"):AddItem(bodvol,.5) | |
1108 | game:GetService("Debris"):AddItem(rl,.5) | |
1109 | elseif Type=="Normal" then | |
1110 | vp=Instance.new("BodyVelocity") | |
1111 | vp.P=500 | |
1112 | vp.maxForce=Vector3.new(math.huge,0,math.huge) | |
1113 | -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback | |
1114 | if KnockbackType==1 then | |
1115 | vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05 | |
1116 | elseif KnockbackType==2 then | |
1117 | vp.velocity=Property.CFrame.lookVector*knockback | |
1118 | end | |
1119 | if knockback>0 then | |
1120 | vp.Parent=hit.Parent.Torso | |
1121 | end | |
1122 | game:GetService("Debris"):AddItem(vp,.5) | |
1123 | elseif Type=="Up" then | |
1124 | local bodyVelocity=Instance.new("BodyVelocity") | |
1125 | bodyVelocity.velocity=vt(0,60,0) | |
1126 | bodyVelocity.P=5000 | |
1127 | bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
1128 | bodyVelocity.Parent=hit | |
1129 | game:GetService("Debris"):AddItem(bodyVelocity,1) | |
1130 | rl=Instance.new("BodyAngularVelocity") | |
1131 | rl.P=3000 | |
1132 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
1133 | rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30)) | |
1134 | rl.Parent=hit | |
1135 | game:GetService("Debris"):AddItem(rl,.5) | |
1136 | elseif Type=="Snare" then | |
1137 | bp=Instance.new("BodyPosition") | |
1138 | bp.P=2000 | |
1139 | bp.D=100 | |
1140 | bp.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
1141 | bp.position=hit.Parent.Torso.Position | |
1142 | bp.Parent=hit.Parent.Torso | |
1143 | game:GetService("Debris"):AddItem(bp,1) | |
1144 | elseif Type=="Target" then | |
1145 | if Targetting==false then | |
1146 | ZTarget=hit.Parent.Torso | |
1147 | coroutine.resume(coroutine.create(function(Part) | |
1148 | so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5) | |
1149 | swait(5) | |
1150 | so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5) | |
1151 | end),ZTarget) | |
1152 | TargHum=ZTarget.Parent:findFirstChild("Humanoid") | |
1153 | targetgui=Instance.new("BillboardGui") | |
1154 | targetgui.Parent=ZTarget | |
1155 | targetgui.Size=UDim2.new(10,100,10,100) | |
1156 | targ=Instance.new("ImageLabel") | |
1157 | targ.Parent=targetgui | |
1158 | targ.BackgroundTransparency=1 | |
1159 | targ.Image="rbxassetid://4834067" | |
1160 | targ.Size=UDim2.new(1,0,1,0) | |
1161 | cam.CameraType="Scriptable" | |
1162 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
1163 | dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) | |
1164 | workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
1165 | Targetting=true | |
1166 | RocketTarget=ZTarget | |
1167 | for i=1,Property do | |
1168 | --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do | |
1169 | if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then | |
1170 | swait() | |
1171 | end | |
1172 | --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100) | |
1173 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
1174 | dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) | |
1175 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0) | |
1176 | end | |
1177 | Targetting=false | |
1178 | RocketTarget=nil | |
1179 | targetgui.Parent=nil | |
1180 | cam.CameraType="Custom" | |
1181 | end | |
1182 | end | |
1183 | debounce=Instance.new("BoolValue") | |
1184 | debounce.Name="DebounceHit" | |
1185 | debounce.Parent=hit.Parent | |
1186 | debounce.Value=true | |
1187 | game:GetService("Debris"):AddItem(debounce,Delay) | |
1188 | c=Instance.new("ObjectValue") | |
1189 | c.Name="creator" | |
1190 | c.Value=Player | |
1191 | c.Parent=h | |
1192 | game:GetService("Debris"):AddItem(c,.5) | |
1193 | CRIT=false | |
1194 | hitDeb=true | |
1195 | AttackPos=6 | |
1196 | end | |
1197 | end | |
1198 | ||
1199 | showDamage=function(Char,Dealt,du,Color) | |
1200 | m=Instance.new("Model") | |
1201 | m.Name=tostring(Dealt) | |
1202 | h=Instance.new("Humanoid") | |
1203 | h.Health=0 | |
1204 | h.MaxHealth=0 | |
1205 | h.Parent=m | |
1206 | c=Instance.new("Part") | |
1207 | c.Transparency=0 | |
1208 | c.BrickColor=Color | |
1209 | c.Transparency = 1 | |
1210 | c.Name="Head" | |
1211 | c.TopSurface=0 | |
1212 | c.BottomSurface=0 | |
1213 | c.formFactor="Plate" | |
1214 | c.Size=Vector3.new(1,.4,1) | |
1215 | ||
1216 | local txt = Instance.new("BillboardGui", c) | |
1217 | txt.Adornee = c | |
1218 | txt.Name = "_status" | |
1219 | txt.Size = UDim2.new(2, 0, 1.2, 0) | |
1220 | txt.StudsOffset = Vector3.new(-9, 8, 0) | |
1221 | local text = Instance.new("TextLabel", txt) | |
1222 | text.Size = UDim2.new(10, 0, 7, 0) | |
1223 | text.FontSize = "Size12" | |
1224 | text.TextScaled = true | |
1225 | text.TextTransparency = 0.5 | |
1226 | text.BackgroundTransparency = 1 | |
1227 | text.TextTransparency = 0.5 | |
1228 | text.TextStrokeTransparency = 0.5 | |
1229 | text.Font = "SciFi" | |
1230 | text.TextStrokeColor3 = Color3.new(0,0,0) | |
1231 | v=Instance.new("Part") | |
1232 | v.Name = "ColorBrick" | |
1233 | v.Parent=c | |
1234 | v.FormFactor="Symmetric" | |
1235 | v.Anchored=true | |
1236 | v.CanCollide=false | |
1237 | v.BottomSurface="Smooth" | |
1238 | v.TopSurface="Smooth" | |
1239 | v.Size=Vector3.new(10,5,3) | |
1240 | v.Transparency=1 | |
1241 | v.CFrame=c.CFrame | |
1242 | v.BrickColor=BrickColor.random() | |
1243 | v.Transparency=1 | |
1244 | text.TextColor3 = t.BrickColor.Color | |
1245 | v.Shape="Block" | |
1246 | text.Text = tostring(Dealt) | |
1247 | ms=Instance.new("CylinderMesh") | |
1248 | ms.Scale=Vector3.new(.8,.8,.8) | |
1249 | --[[local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"} | |
1250 | local rndm=math.random(1,#hitsounds) | |
1251 | local r=rndm | |
1252 | CFuncs["Sound"].Create("http://www.roblox.com/asset/?id="..hitsounds[r],c,1.25,1)]]-- | |
1253 | if CRIT==true then | |
1254 | ms.Scale=Vector3.new(1,1.25,1) | |
1255 | end | |
1256 | ms.Parent=c | |
1257 | c.Reflectance=0 | |
1258 | Instance.new("BodyGyro").Parent=c | |
1259 | c.Parent=m | |
1260 | if Char:findFirstChild("Head")~=nil then | |
1261 | c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0)) | |
1262 | elseif Char.Parent:findFirstChild("Head")~=nil then | |
1263 | c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0)) | |
1264 | end | |
1265 | f=Instance.new("BodyPosition") | |
1266 | f.P=2000 | |
1267 | f.D=100 | |
1268 | f.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
1269 | f.position=c.Position+Vector3.new(0,3,0) | |
1270 | f.Parent=c | |
1271 | game:GetService("Debris"):AddItem(m,.5+du) | |
1272 | c.CanCollide=false | |
1273 | m.Parent=workspace | |
1274 | c.CanCollide=false | |
1275 | end | |
1276 | ||
1277 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
1278 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
1279 | end | |
1280 | ||
1281 | function SkullEffect(brickcolor,cframe,x1,y1,z1,delay) | |
1282 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1283 | prt.Anchored=true | |
1284 | prt.CFrame=cframe | |
1285 | local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=4770583",vt(0,0,0),vt(x1,y1,z1)) | |
1286 | --http://www.roblox.com/asset/?id=4770560 | |
1287 | game:GetService("Debris"):AddItem(prt,2) | |
1288 | CF=prt.CFrame | |
1289 | coroutine.resume(coroutine.create(function(Part,Mesh,TehCF) | |
1290 | for i=0,1,0.2 do | |
1291 | wait() | |
1292 | Part.CFrame=CF*cf(0,0,-0.4) | |
1293 | end | |
1294 | for i=0,1,delay do | |
1295 | wait() | |
1296 | --Part.CFrame=CF*cf((math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5) | |
1297 | Mesh.Scale=Mesh.Scale | |
1298 | end | |
1299 | for i=0,1,0.1 do | |
1300 | wait() | |
1301 | Part.Transparency=i | |
1302 | end | |
1303 | Part.Parent=nil | |
1304 | end),prt,msh,CF) | |
1305 | end | |
1306 | ||
1307 | function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1308 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1309 | prt.Anchored=true | |
1310 | prt.Material = "Neon" | |
1311 | prt.CFrame=cframe | |
1312 | prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1313 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1314 | game:GetService("Debris"):AddItem(prt,5) | |
1315 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1316 | for i=0,1,delay do | |
1317 | swait() | |
1318 | Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1319 | Part.Transparency=i | |
1320 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1321 | end | |
1322 | Part.Parent=nil | |
1323 | end),prt,msh) | |
1324 | end | |
1325 | ||
1326 | function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype) | |
1327 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1328 | prt.Anchored=true | |
1329 | prt.Material = "Neon" | |
1330 | prt.CFrame=cframe | |
1331 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1332 | game:GetService("Debris"):AddItem(prt,5) | |
1333 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1334 | local rtype = rottype | |
1335 | for i=0,1,delay do | |
1336 | swait() | |
1337 | if rtype == 1 then | |
1338 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
1339 | elseif rtype == 2 then | |
1340 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
1341 | end | |
1342 | Part.Transparency=i | |
1343 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1344 | end | |
1345 | Part.Parent=nil | |
1346 | end),prt,msh) | |
1347 | end | |
1348 | ||
1349 | function MagicSphere(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1350 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1351 | prt.Anchored=true | |
1352 | prt.CFrame=cframe | |
1353 | prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1354 | msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
1355 | game:GetService("Debris"):AddItem(prt,5) | |
1356 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1357 | for i=0,1,delay do | |
1358 | wait() | |
1359 | Part.Transparency=i | |
1360 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1361 | end | |
1362 | Part.Parent=nil | |
1363 | end),prt,msh) | |
1364 | end | |
1365 | ||
1366 | function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype) | |
1367 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1368 | prt.Anchored=true | |
1369 | prt.Material = "Neon" | |
1370 | prt.CFrame=cframe | |
1371 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1372 | game:GetService("Debris"):AddItem(prt,5) | |
1373 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1374 | local rtype = rottype | |
1375 | for i=0,1,delay do | |
1376 | swait() | |
1377 | if rtype == 1 then | |
1378 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
1379 | elseif rtype == 2 then | |
1380 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
1381 | end | |
1382 | Part.Transparency=i | |
1383 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1384 | end | |
1385 | Part.Parent=nil | |
1386 | end),prt,msh) | |
1387 | end | |
1388 | ||
1389 | function MagicShock(brickcolor,cframe,x1,y1,x3,y3,delay,rottype) | |
1390 | local prt=part(3,char,1,1,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1391 | prt.Anchored=true | |
1392 | prt.Material = "Neon" | |
1393 | prt.CFrame=cframe | |
1394 | local dec = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt) | |
1395 | local dec2 = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt) | |
1396 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01)) | |
1397 | game:GetService("Debris"):AddItem(prt,5) | |
1398 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1399 | local rtype = rottype | |
1400 | for i=0,1,delay do | |
1401 | swait() | |
1402 | if rtype == 1 then | |
1403 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
1404 | elseif rtype == 2 then | |
1405 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
1406 | end | |
1407 | dec.Transparency=i | |
1408 | dec2.Transparency=i | |
1409 | Mesh.Scale=Mesh.Scale+vt(x3,y3,0) | |
1410 | end | |
1411 | Part.Parent=nil | |
1412 | end),prt,msh) | |
1413 | end | |
1414 | ||
1415 | function MagicShockAlt(brickcolor,cframe,x1,y1,x3,y3,delay,rottype) | |
1416 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1417 | prt.Anchored=true | |
1418 | prt.Material = "Neon" | |
1419 | prt.CFrame=cframe | |
1420 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01)) | |
1421 | game:GetService("Debris"):AddItem(prt,5) | |
1422 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1423 | local rtype = rottype | |
1424 | for i=0,1,delay do | |
1425 | swait() | |
1426 | if rtype == 1 then | |
1427 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
1428 | elseif rtype == 2 then | |
1429 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
1430 | end | |
1431 | prt.Transparency=i | |
1432 | Mesh.Scale=Mesh.Scale+vt(x3,y3,0) | |
1433 | end | |
1434 | Part.Parent=nil | |
1435 | end),prt,msh) | |
1436 | end | |
1437 | ||
1438 | function MagicShockAltCircle(brickcolor,cframe,x1,z1,x3,z3,delay,rottype) | |
1439 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1440 | prt.Anchored=true | |
1441 | prt.Material = "Neon" | |
1442 | prt.CFrame=cframe | |
1443 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,1,z1)) | |
1444 | game:GetService("Debris"):AddItem(prt,5) | |
1445 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1446 | local rtype = rottype | |
1447 | for i=0,1,delay do | |
1448 | swait() | |
1449 | if rtype == 1 then | |
1450 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0.1,0) | |
1451 | elseif rtype == 2 then | |
1452 | prt.CFrame = prt.CFrame*CFrame.Angles(0,-0.1,0) | |
1453 | end | |
1454 | prt.Transparency=i | |
1455 | Mesh.Scale=Mesh.Scale+vt(x3,0,z3) | |
1456 | end | |
1457 | Part.Parent=nil | |
1458 | end),prt,msh) | |
1459 | end | |
1460 | ||
1461 | function MagicShockTrailAlt(brickcolor,cframe,x1,y1,z1,x3,y3,delay,rottype) | |
1462 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1463 | prt.Anchored=true | |
1464 | prt.Material = "Neon" | |
1465 | prt.CFrame=cframe | |
1466 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1467 | game:GetService("Debris"):AddItem(prt,5) | |
1468 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1469 | local rtype = rottype | |
1470 | for i=0,1,delay do | |
1471 | swait() | |
1472 | if rtype == 1 then | |
1473 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
1474 | elseif rtype == 2 then | |
1475 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
1476 | end | |
1477 | prt.Transparency=i | |
1478 | Mesh.Scale=Mesh.Scale+vt(x3,y3,0) | |
1479 | end | |
1480 | Part.Parent=nil | |
1481 | end),prt,msh) | |
1482 | end | |
1483 | ||
1484 | function MagicBlock2(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay) | |
1485 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1486 | prt.Anchored=false | |
1487 | prt.CFrame=cframe | |
1488 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1489 | local wld=weld(prt,prt,Parent,cframe) | |
1490 | game:GetService("Debris"):AddItem(prt,5) | |
1491 | coroutine.resume(coroutine.create(function(Part,Mesh,Weld) | |
1492 | for i=0,1,delay do | |
1493 | wait() | |
1494 | Weld.C0=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cframe | |
1495 | --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1496 | Part.Transparency=i | |
1497 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1498 | end | |
1499 | Part.Parent=nil | |
1500 | end),prt,msh,wld) | |
1501 | end | |
1502 | ||
1503 | function MagicBlock3(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay) | |
1504 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1505 | prt.Anchored=false | |
1506 | prt.CFrame=cframe | |
1507 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1508 | local wld=weld(prt,prt,Parent,euler(0,0,0)*cf(0,0,0)) | |
1509 | game:GetService("Debris"):AddItem(prt,5) | |
1510 | coroutine.resume(coroutine.create(function(Part,Mesh,Weld) | |
1511 | for i=0,1,delay do | |
1512 | wait() | |
1513 | Weld.C0=euler(i*20,0,0) | |
1514 | --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1515 | Part.Transparency=i | |
1516 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1517 | end | |
1518 | Part.Parent=nil | |
1519 | end),prt,msh,wld) | |
1520 | end | |
1521 | ||
1522 | function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1523 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1524 | prt.Anchored=true | |
1525 | prt.CFrame=cframe | |
1526 | local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1527 | game:GetService("Debris"):AddItem(prt,2) | |
1528 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1529 | for i=0,1,delay do | |
1530 | wait() | |
1531 | Part.CFrame=Part.CFrame | |
1532 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1533 | local prt2=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1534 | prt2.Anchored=true | |
1535 | prt2.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1536 | local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5)) | |
1537 | game:GetService("Debris"):AddItem(prt2,2) | |
1538 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1539 | for i=0,1,0.1 do | |
1540 | wait() | |
1541 | Part.CFrame=Part.CFrame*cf(0,0.5,0) | |
1542 | end | |
1543 | Part.Parent=nil | |
1544 | end),prt2,msh2) | |
1545 | end | |
1546 | for i=0,1,delay*2 do | |
1547 | wait() | |
1548 | Part.CFrame=Part.CFrame | |
1549 | Mesh.Scale=vt((x1+x3)-(x1+x3)*i,(y1+y3)-(y1+y3)*i,(z1+z3)-(z1+z3)*i) | |
1550 | end | |
1551 | Part.Parent=nil | |
1552 | end),prt,msh) | |
1553 | end | |
1554 | ||
1555 | function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1556 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1557 | prt.Anchored=true | |
1558 | prt.CFrame=cframe | |
1559 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
1560 | game:GetService("Debris"):AddItem(prt,2) | |
1561 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1562 | for i=0,1,delay do | |
1563 | wait() | |
1564 | Part.CFrame=Part.CFrame | |
1565 | Part.Transparency=i | |
1566 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1567 | end | |
1568 | Part.Parent=nil | |
1569 | end),prt,msh) | |
1570 | end | |
1571 | ||
1572 | function BreakEffect(brickcolor,cframe,x1,y1,z1) | |
1573 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1574 | prt.Anchored=true | |
1575 | prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1576 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
1577 | game:GetService("Debris"):AddItem(prt,2) | |
1578 | coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb) | |
1579 | CF=Part.CFrame | |
1580 | Numbb=0 | |
1581 | randnumb=math.random()/10 | |
1582 | rand1=math.random()/10 | |
1583 | for i=0,1,rand1 do | |
1584 | wait() | |
1585 | CF=CF*cf(0,math.random()/2,0) | |
1586 | --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0) | |
1587 | Part.CFrame=CF*euler(Numbb,0,0) | |
1588 | Part.Transparency=i | |
1589 | Numbb=Numbb+randnumb | |
1590 | end | |
1591 | Part.Parent=nil | |
1592 | end),prt,CF,Numbb,randnumb) | |
1593 | end | |
1594 | ||
1595 | function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1596 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1597 | prt.Anchored=true | |
1598 | prt.CFrame=cframe | |
1599 | msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1)) | |
1600 | game:GetService("Debris"):AddItem(prt,5) | |
1601 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1602 | for i=0,1,delay do | |
1603 | wait() | |
1604 | Part.CFrame=Part.CFrame*euler(0,0.7,0) | |
1605 | Part.Transparency=i | |
1606 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1607 | end | |
1608 | Part.Parent=nil | |
1609 | end),prt,msh) | |
1610 | end | |
1611 | ||
1612 | function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1613 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1614 | prt.Anchored=true | |
1615 | prt.CFrame=cframe | |
1616 | msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1)) | |
1617 | game:GetService("Debris"):AddItem(prt,2) | |
1618 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1619 | for i=0,1,delay do | |
1620 | wait() | |
1621 | Part.CFrame=Part.CFrame*cf(0,y3/2,0) | |
1622 | Part.Transparency=i | |
1623 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1624 | end | |
1625 | Part.Parent=nil | |
1626 | end),prt,msh) | |
1627 | end | |
1628 | ||
1629 | function StravEffect(brickcolor,cframe,x,y,z,x1,y1,z1,delay) | |
1630 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1631 | prt.Anchored=true | |
1632 | prt.CFrame=cframe*cf(x,y,z) | |
1633 | msh=mesh("SpecialMesh",prt,"FileMesh","rbxassetid://168892363",vt(0,0,0),vt(x1,y1,z1)) | |
1634 | game:GetService("Debris"):AddItem(prt,5) | |
1635 | coroutine.resume(coroutine.create(function(Part,Mesh,ex,why,zee) | |
1636 | local num=math.random() | |
1637 | local num2=math.random(-3,2)+math.random() | |
1638 | local numm=0 | |
1639 | for i=0,1,delay*2 do | |
1640 | swait() | |
1641 | Part.CFrame=cframe*euler(0,numm*num*10,0)*cf(ex,why,zee)*cf(-i*10,num2,0) | |
1642 | Part.Transparency=i | |
1643 | numm=numm+0.01 | |
1644 | end | |
1645 | Part.Parent=nil | |
1646 | Mesh.Parent=nil | |
1647 | end),prt,msh,x,y,z) | |
1648 | end | |
1649 | ||
1650 | function dmgstart(dmg,what) | |
1651 | hitcon = what.Touched:connect(function(hit) | |
1652 | local hum = hit.Parent:FindFirstChild("Humanoid") | |
1653 | if hum and not hum:IsDescendantOf(Character) then | |
1654 | hum:TakeDamage(dmg) | |
1655 | end | |
1656 | end) | |
1657 | end | |
1658 | ||
1659 | function dmgstop() | |
1660 | hitcon:disconnect() | |
1661 | end | |
1662 | ||
1663 | function Cloak() | |
1664 | Face.Parent=nil | |
1665 | cloaked=true | |
1666 | for _,v in pairs(Torso.Parent:children()) do | |
1667 | if v.className=="Part" and v.Name~="HumanoidRootPart" then | |
1668 | coroutine.resume(coroutine.create(function() | |
1669 | for i=0,1,0.2 do | |
1670 | wait() | |
1671 | v.Transparency=i | |
1672 | end | |
1673 | v.Transparency=1 | |
1674 | end)) | |
1675 | end | |
1676 | if v.className=="Hat" then | |
1677 | hatp=v.Handle | |
1678 | coroutine.resume(coroutine.create(function(derp) | |
1679 | for i=0,1,0.2 do | |
1680 | wait() | |
1681 | derp.Transparency=i | |
1682 | end | |
1683 | derp.Transparency=1 | |
1684 | end),hatp) | |
1685 | end | |
1686 | end | |
1687 | for _,v in pairs(m:children()) do | |
1688 | if v.className=="Part" then | |
1689 | coroutine.resume(coroutine.create(function() | |
1690 | for i=0,1,0.2 do | |
1691 | wait() | |
1692 | v.Transparency=i | |
1693 | end | |
1694 | v.Transparency=1 | |
1695 | end)) | |
1696 | end | |
1697 | end | |
1698 | end | |
1699 | ||
1700 | function UnCloak() | |
1701 | so("http://roblox.com/asset/?id=2767090",Torso,1,1.1) | |
1702 | Face.Parent=Head | |
1703 | cloaked=false | |
1704 | for _,v in pairs(Torso.Parent:children()) do | |
1705 | if v.className=="Part" and v.Name~="HumanoidRootPart" then | |
1706 | coroutine.resume(coroutine.create(function() | |
1707 | for i=0,1,0.1 do | |
1708 | wait() | |
1709 | v.Transparency=v.Transparency-0.1 | |
1710 | end | |
1711 | v.Transparency=0 | |
1712 | end)) | |
1713 | end | |
1714 | if v.className=="Hat" then | |
1715 | hatp=v.Handle | |
1716 | coroutine.resume(coroutine.create(function(derp) | |
1717 | for i=0,1,0.1 do | |
1718 | wait() | |
1719 | derp.Transparency=derp.Transparency-0.1 | |
1720 | end | |
1721 | derp.Transparency=0 | |
1722 | end),hatp) | |
1723 | end | |
1724 | end | |
1725 | for _,v in pairs(m:children()) do | |
1726 | if v.className=="Part" and v.Name~="hitbox" and v.Name~='tip' then | |
1727 | coroutine.resume(coroutine.create(function() | |
1728 | for i=0,1,0.1 do | |
1729 | wait() | |
1730 | v.Transparency=v.Transparency-0.1 | |
1731 | end | |
1732 | v.Transparency=0 | |
1733 | end)) | |
1734 | v.Transparency=0 | |
1735 | end | |
1736 | end | |
1737 | end | |
1738 | ||
1739 | function MakeMagic(Type,Color,Bullets,Size,Speed,Position,MagCircleScale,Delay,ExplosionScale,ExplosionVol,Explosionpit) | |
1740 | if Type == "PulsingBullet" then | |
1741 | for i = 0,1,0.1 do | |
1742 | swait() | |
1743 | MagicBlock(Color,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05) | |
1744 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(0)),.4) | |
1745 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.4) | |
1746 | RW.C0 = clerp(RW.C0, CFrame.new(1.25, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(-30)), 0.4) | |
1747 | LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(30)), 0.4) | |
1748 | end | |
1749 | local a = Instance.new("Part",Character) | |
1750 | a.Name = "Direction" | |
1751 | a.Anchored = true | |
1752 | a.BrickColor = Color | |
1753 | a.Material = "Neon" | |
1754 | a.Transparency = 0.5 | |
1755 | a.CanCollide = false | |
1756 | local ray = Ray.new( | |
1757 | sorb.CFrame.p, -- origin | |
1758 | (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction | |
1759 | ) | |
1760 | local ignore = Character | |
1761 | local hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
1762 | a.BottomSurface = 10 | |
1763 | a.TopSurface = 10 | |
1764 | local distance = (sorb.CFrame.p - position).magnitude | |
1765 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
1766 | a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0) | |
1767 | game:GetService("Debris"):AddItem(a, 3) | |
1768 | local thing = Instance.new("SpecialMesh",a) | |
1769 | thing.MeshType = "Sphere" | |
1770 | thing.Scale = vt(0,0,1) | |
1771 | for i = 0, 9 do | |
1772 | ray = Ray.new( | |
1773 | sorb.CFrame.p, -- origin | |
1774 | (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction | |
1775 | ) | |
1776 | ignore = Character | |
1777 | hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
1778 | local distance = (sorb.CFrame.p - position).magnitude | |
1779 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
1780 | a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0) | |
1781 | thing.Scale = thing.Scale + vt(MagCircleScale,MagCircleScale,0) | |
1782 | wait() | |
1783 | end | |
1784 | if Bullets == 1 then | |
1785 | local lb = Instance.new("Part") | |
1786 | CFuncs["Sound"].Create("rbxassetid://260433768", lb, 2.5, 1) | |
1787 | lb.Parent = char | |
1788 | lb.BrickColor = Color | |
1789 | lb.CanCollide = false | |
1790 | lb.Material = "Neon" | |
1791 | lb.Shape = "Ball" | |
1792 | lb.Anchored = true | |
1793 | lb.Transparency = 0 | |
1794 | lb.Size = vt(1,1,1) | |
1795 | lb.CFrame = a.CFrame | |
1796 | local thingery = Instance.new("SpecialMesh",lb) | |
1797 | thingery.MeshType = "Sphere" | |
1798 | thingery.Scale = Size | |
1799 | lb.Anchored = false | |
1800 | local bv = Instance.new("BodyVelocity") | |
1801 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1802 | bv.velocity = a.CFrame.lookVector*Speed | |
1803 | bv.Parent = lb | |
1804 | wait(0.1) | |
1805 | local touched = false | |
1806 | lb.Touched:connect(function(hit) | |
1807 | if touched == false then | |
1808 | touched = true | |
1809 | lb.Transparency = 1 | |
1810 | PulseDam(ExplosionScale,lb,lb.BrickColor) | |
1811 | lb.Anchored = true | |
1812 | end | |
1813 | end) | |
1814 | game:GetService("Debris"):AddItem(lb, Delay) | |
1815 | end | |
1816 | for i = 0, 9 do | |
1817 | ray = Ray.new( | |
1818 | sorb.CFrame.p, -- origin | |
1819 | (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction | |
1820 | ) | |
1821 | ignore = Character | |
1822 | hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
1823 | local distance = (sorb.CFrame.p - position).magnitude | |
1824 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
1825 | a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0) | |
1826 | thing.Scale = thing.Scale - vt(MagCircleScale,MagCircleScale,0) | |
1827 | wait() | |
1828 | end | |
1829 | end | |
1830 | if Type == "ExplodingBullet" then | |
1831 | if Bullets == 1 then | |
1832 | for i = 0,1,0.1 do | |
1833 | swait() | |
1834 | MagicBlock(Color,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05) | |
1835 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(0)),.4) | |
1836 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.4) | |
1837 | RW.C0 = clerp(RW.C0, CFrame.new(1.25, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(-30)), 0.4) | |
1838 | LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(30)), 0.4) | |
1839 | end | |
1840 | end | |
1841 | if Bullets > 1 then | |
1842 | for i = 0,1,0.1 do | |
1843 | swait() | |
1844 | MagicBlock(Color,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05) | |
1845 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(90)),.4) | |
1846 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-90)),.4) | |
1847 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.4) | |
1848 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-10)), 0.4) | |
1849 | end | |
1850 | end | |
1851 | local a = Instance.new("Part",Character) | |
1852 | a.Name = "Direction" | |
1853 | a.Anchored = true | |
1854 | a.BrickColor = Color | |
1855 | a.Material = "Neon" | |
1856 | a.Transparency = 0.5 | |
1857 | a.CanCollide = false | |
1858 | local ray = Ray.new( | |
1859 | sorb.CFrame.p, -- origin | |
1860 | (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction | |
1861 | ) | |
1862 | local ignore = Character | |
1863 | local hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
1864 | a.BottomSurface = 10 | |
1865 | a.TopSurface = 10 | |
1866 | local distance = (sorb.CFrame.p - position).magnitude | |
1867 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
1868 | a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0) | |
1869 | game:GetService("Debris"):AddItem(a, 3) | |
1870 | local thing = Instance.new("SpecialMesh",a) | |
1871 | thing.MeshType = "Sphere" | |
1872 | thing.Scale = vt(0,0,1) | |
1873 | for i = 0, 9 do | |
1874 | ray = Ray.new( | |
1875 | sorb.CFrame.p, -- origin | |
1876 | (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction | |
1877 | ) | |
1878 | ignore = Character | |
1879 | hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
1880 | local distance = (sorb.CFrame.p - position).magnitude | |
1881 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
1882 | a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0) | |
1883 | thing.Scale = thing.Scale + vt(MagCircleScale,MagCircleScale,0) | |
1884 | wait() | |
1885 | end | |
1886 | if Bullets == 1 then | |
1887 | local lb = Instance.new("Part") | |
1888 | CFuncs["Sound"].Create("rbxassetid://260433721", lb, 2.5, 1) | |
1889 | lb.Parent = char | |
1890 | lb.BrickColor = Color | |
1891 | lb.CanCollide = false | |
1892 | lb.Material = "Neon" | |
1893 | lb.Shape = "Ball" | |
1894 | lb.Anchored = true | |
1895 | lb.Transparency = 0 | |
1896 | lb.Size = vt(1,1,1) | |
1897 | lb.CFrame = a.CFrame | |
1898 | local thingery = Instance.new("SpecialMesh",lb) | |
1899 | thingery.MeshType = "Sphere" | |
1900 | thingery.Scale = Size | |
1901 | lb.Anchored = false | |
1902 | local bv = Instance.new("BodyVelocity") | |
1903 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1904 | bv.velocity = a.CFrame.lookVector*Speed | |
1905 | bv.Parent = lb | |
1906 | wait(0.1) | |
1907 | local touched = false | |
1908 | lb.Touched:connect(function(hit) | |
1909 | if touched == false then | |
1910 | touched = true | |
1911 | lb.Transparency = 1 | |
1912 | Explode(ExplosionScale,lb,Explosionpit,ExplosionVol) | |
1913 | lb.Anchored = true | |
1914 | end | |
1915 | end) | |
1916 | game:GetService("Debris"):AddItem(lb, Delay) | |
1917 | end | |
1918 | if Bullets > 1 then | |
1919 | for i = 0, Bullets do | |
1920 | ray = Ray.new( | |
1921 | sorb.CFrame.p, -- origin | |
1922 | (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction | |
1923 | ) | |
1924 | ignore = Character | |
1925 | hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
1926 | local distance = (sorb.CFrame.p - position).magnitude | |
1927 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
1928 | a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0) | |
1929 | local lb = Instance.new("Part") | |
1930 | CFuncs["Sound"].Create("rbxassetid://203691467", lb, 1, 5.5) | |
1931 | lb.Parent = char | |
1932 | lb.BrickColor = Color | |
1933 | lb.CanCollide = false | |
1934 | lb.Material = "Neon" | |
1935 | lb.Shape = "Ball" | |
1936 | lb.Anchored = true | |
1937 | lb.Transparency = 0 | |
1938 | lb.Size = vt(1,1,1) | |
1939 | lb.CFrame = a.CFrame | |
1940 | local thingery = Instance.new("SpecialMesh",lb) | |
1941 | thingery.MeshType = "Sphere" | |
1942 | thingery.Scale = Size | |
1943 | lb.Anchored = false | |
1944 | local bv = Instance.new("BodyVelocity") | |
1945 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1946 | bv.velocity = a.CFrame.lookVector*Speed | |
1947 | bv.Parent = lb | |
1948 | wait(0.035) | |
1949 | local touched = false | |
1950 | lb.Touched:connect(function(hit) | |
1951 | if touched == false then | |
1952 | touched = true | |
1953 | lb.Transparency = 1 | |
1954 | ExplodeShort(ExplosionScale,lb,Explosionpit,ExplosionVol) | |
1955 | lb.Anchored = true | |
1956 | end | |
1957 | end) | |
1958 | game:GetService("Debris"):AddItem(lb, Delay) | |
1959 | end | |
1960 | end | |
1961 | for i = 0, 9 do | |
1962 | ray = Ray.new( | |
1963 | sorb.CFrame.p, -- origin | |
1964 | (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction | |
1965 | ) | |
1966 | ignore = Character | |
1967 | hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
1968 | local distance = (sorb.CFrame.p - position).magnitude | |
1969 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
1970 | a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0) | |
1971 | thing.Scale = thing.Scale - vt(MagCircleScale,MagCircleScale,0) | |
1972 | wait() | |
1973 | end | |
1974 | end | |
1975 | if Type == "FireUltExplosion" then | |
1976 | hum.WalkSpeed = 16 | |
1977 | local a = Instance.new("Part",Character) | |
1978 | a.Name = "Direction" | |
1979 | a.Anchored = true | |
1980 | a.BrickColor = Color | |
1981 | a.Material = "Neon" | |
1982 | a.Transparency = 0.5 | |
1983 | a.Size = vt(1,1,1) | |
1984 | a.CanCollide = false | |
1985 | a.CFrame = root.CFrame + vt(0,5,0) | |
1986 | game:GetService("Debris"):AddItem(a, Delay) | |
1987 | local thing = Instance.new("SpecialMesh",a) | |
1988 | thing.MeshType = "Sphere" | |
1989 | thing.Scale = vt(0,1,0) | |
1990 | for i = 0,5,0.1 do | |
1991 | swait() | |
1992 | MagicBlock(Color,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05) | |
1993 | MagicBlock(Color,sorb2.CFrame,1,1,1,0.05,0.05,0.05,0.05) | |
1994 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
1995 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.1) | |
1996 | RW.C0 = clerp(RW.C0, CFrame.new(1.25, 0.5, -0.15) * angles(math.rad(150), math.rad(0), math.rad(30)), 0.1) | |
1997 | LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, -0.15) * angles(math.rad(150), math.rad(0), math.rad(-30)), 0.1) | |
1998 | end | |
1999 | for i = 0, 9 do | |
2000 | thing.Scale = thing.Scale + vt(MagCircleScale,0,MagCircleScale) | |
2001 | wait() | |
2002 | end | |
2003 | for i = 0,5,0.1 do | |
2004 | swait() | |
2005 | MagicBlock(Color,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05) | |
2006 | MagicBlock(Color,sorb2.CFrame,1,1,1,0.05,0.05,0.05,0.05) | |
2007 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2008 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.1) | |
2009 | RW.C0 = clerp(RW.C0, CFrame.new(1.25, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(30)), 0.1) | |
2010 | LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(-30)), 0.1) | |
2011 | end | |
2012 | for i = 0,1,0.1 do | |
2013 | swait() | |
2014 | MagicBlock(Color,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05) | |
2015 | MagicBlock(Color,sorb2.CFrame,1,1,1,0.05,0.05,0.05,0.05) | |
2016 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(0)),.4) | |
2017 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.4) | |
2018 | RW.C0 = clerp(RW.C0, CFrame.new(1.25, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(-30)), 0.4) | |
2019 | LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(30)), 0.4) | |
2020 | end | |
2021 | hum.WalkSpeed = 16 | |
2022 | attack = false | |
2023 | for i = 0, 9 do | |
2024 | thing.Scale = thing.Scale - vt(MagCircleScale,0,MagCircleScale) | |
2025 | wait() | |
2026 | end | |
2027 | ExplodeLong(65,a,0.4,1) | |
2028 | end | |
2029 | if Type == "Bullet" then | |
2030 | for i = 0,1,0.1 do | |
2031 | swait() | |
2032 | MagicBlock(Color,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05) | |
2033 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(80)),.4) | |
2034 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.4) | |
2035 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(10), math.rad(90)), 0.4) | |
2036 | LW.C0 = clerp(LW.C0, CFrame.new(-0.15, 0.5, -0.35) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.4) | |
2037 | end | |
2038 | local a = Instance.new("Part",Character) | |
2039 | a.Name = "Direction" | |
2040 | a.Anchored = true | |
2041 | a.BrickColor = Color | |
2042 | a.Material = "Neon" | |
2043 | a.Transparency = 0.5 | |
2044 | a.CanCollide = false | |
2045 | local ray = Ray.new( | |
2046 | sorb.CFrame.p, -- origin | |
2047 | (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction | |
2048 | ) | |
2049 | local ignore = Character | |
2050 | local hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
2051 | a.BottomSurface = 10 | |
2052 | a.TopSurface = 10 | |
2053 | local distance = (sorb.CFrame.p - position).magnitude | |
2054 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
2055 | a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0) | |
2056 | game:GetService("Debris"):AddItem(a, 3) | |
2057 | local thing = Instance.new("SpecialMesh",a) | |
2058 | thing.MeshType = "Sphere" | |
2059 | thing.Scale = vt(0,0,1) | |
2060 | for i = 0, 9 do | |
2061 | thing.Scale = thing.Scale + vt(MagCircleScale,MagCircleScale,0) | |
2062 | wait() | |
2063 | end | |
2064 | if Bullets == 1 then | |
2065 | local lb = Instance.new("Part") | |
2066 | CFuncs["Sound"].Create("rbxassetid://260433721", lb, 2.5, 1) | |
2067 | lb.Parent = char | |
2068 | lb.BrickColor = Color | |
2069 | lb.CanCollide = false | |
2070 | lb.Material = "Neon" | |
2071 | lb.Shape = "Ball" | |
2072 | lb.Anchored = true | |
2073 | lb.Transparency = 0.5 | |
2074 | lb.Size = Size | |
2075 | lb.CFrame = a.CFrame | |
2076 | local thing = Instance.new("SpecialMesh",lb) | |
2077 | thing.MeshType = "Sphere" | |
2078 | lb.Anchored = false | |
2079 | local bv = Instance.new("BodyVelocity") | |
2080 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
2081 | bv.velocity = a.CFrame.lookVector*Speed | |
2082 | bv.Parent = lb | |
2083 | lb.Touched:connect(function(hit) | |
2084 | Damagefunc(hit,9,15,math.random(10,20),"Normal",root,.2,1) | |
2085 | end) | |
2086 | game:GetService("Debris"):AddItem(lb, Delay) | |
2087 | end | |
2088 | if Bullets > 1 then | |
2089 | for i = 0, Bullets do | |
2090 | wait(0.075) | |
2091 | ray = Ray.new( | |
2092 | sorb.CFrame.p, -- origin | |
2093 | (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction | |
2094 | ) | |
2095 | ignore = Character | |
2096 | hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
2097 | local distance = (sorb.CFrame.p - position).magnitude | |
2098 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
2099 | a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0) | |
2100 | local lb = Instance.new("Part") | |
2101 | CFuncs["Sound"].Create("rbxassetid://260433721", lb, 2.5, 1) | |
2102 | lb.Parent = char | |
2103 | lb.BrickColor = Color | |
2104 | lb.CanCollide = false | |
2105 | lb.Material = "Neon" | |
2106 | lb.Shape = "Ball" | |
2107 | lb.Anchored = true | |
2108 | lb.Transparency = 0.5 | |
2109 | lb.Size = Size | |
2110 | lb.CFrame = a.CFrame | |
2111 | local thing = Instance.new("SpecialMesh",lb) | |
2112 | thing.MeshType = "Sphere" | |
2113 | lb.Anchored = false | |
2114 | local bv = Instance.new("BodyVelocity") | |
2115 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
2116 | bv.velocity = a.CFrame.lookVector*Speed | |
2117 | bv.Parent = lb | |
2118 | lb.Touched:connect(function(hit) | |
2119 | Damagefunc(hit,3,5,math.random(10,20),"Normal",root,.2,1) | |
2120 | end) | |
2121 | game:GetService("Debris"):AddItem(lb, Delay) | |
2122 | end | |
2123 | end | |
2124 | for i = 0, 9 do | |
2125 | thing.Scale = thing.Scale - vt(MagCircleScale,MagCircleScale,0) | |
2126 | wait() | |
2127 | end | |
2128 | end | |
2129 | if Type == "Beam" then | |
2130 | for i = 0,1,0.1 do | |
2131 | swait() | |
2132 | MagicBlock(Color,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05) | |
2133 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(80)),.4) | |
2134 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.4) | |
2135 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(10), math.rad(90)), 0.4) | |
2136 | LW.C0 = clerp(LW.C0, CFrame.new(-0.15, 0.5, -0.35) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.4) | |
2137 | end | |
2138 | local a = Instance.new("Part",Character) | |
2139 | a.Name = "Direction" | |
2140 | a.Anchored = true | |
2141 | a.BrickColor = Color | |
2142 | a.Material = "Neon" | |
2143 | a.Transparency = 0.5 | |
2144 | a.CanCollide = false | |
2145 | local ray = Ray.new( | |
2146 | sorb.CFrame.p, -- origin | |
2147 | (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction | |
2148 | ) | |
2149 | local ignore = Character | |
2150 | local hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
2151 | a.BottomSurface = 10 | |
2152 | a.TopSurface = 10 | |
2153 | local distance = (sorb.CFrame.p - position).magnitude | |
2154 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
2155 | a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0) | |
2156 | game:GetService("Debris"):AddItem(a, 3) | |
2157 | local thing = Instance.new("SpecialMesh",a) | |
2158 | thing.MeshType = "Sphere" | |
2159 | thing.Scale = vt(0,0,1) | |
2160 | for i = 0, 9 do | |
2161 | thing.Scale = thing.Scale + vt(MagCircleScale,MagCircleScale,0) | |
2162 | wait() | |
2163 | end | |
2164 | if Bullets == 1 then | |
2165 | local a = Instance.new("Part",Character) | |
2166 | a.Name = "Direction" | |
2167 | a.Anchored = true | |
2168 | a.BrickColor = Color | |
2169 | a.Material = "Neon" | |
2170 | a.Transparency = 0.5 | |
2171 | a.CanCollide = false | |
2172 | local ray = Ray.new( | |
2173 | sorb.CFrame.p, -- origin | |
2174 | (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction | |
2175 | ) | |
2176 | local ignore = Character | |
2177 | local hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
2178 | if hit then | |
2179 | local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid") | |
2180 | ||
2181 | if not humanoid then | |
2182 | humanoid = hit.Parent.Parent:FindFirstChildOfClass("Humanoid") | |
2183 | end | |
2184 | if humanoid then | |
2185 | if humanoid.Parent:IsA"Model" then | |
2186 | Damagefunc(hit,5,10,math.random(10,20),"Normal",RootPart,.2,1) | |
2187 | end | |
2188 | end | |
2189 | end | |
2190 | a.BottomSurface = 10 | |
2191 | a.TopSurface = 10 | |
2192 | CFuncs["Sound"].Create("rbxassetid://151414336", a, 2.5, 1) | |
2193 | local distance = (sorb.CFrame.p - position).magnitude | |
2194 | a.Size = Vector3.new(0.5, 0.5, distance) | |
2195 | a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, -distance/2) | |
2196 | game:GetService("Debris"):AddItem(a, 0.1) | |
2197 | end | |
2198 | if Bullets > 1 then | |
2199 | for i = 0, Bullets do | |
2200 | wait(0.05) | |
2201 | ray = Ray.new( | |
2202 | sorb.CFrame.p, -- origin | |
2203 | (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction | |
2204 | ) | |
2205 | ignore = Character | |
2206 | hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
2207 | local distance = (sorb.CFrame.p - position).magnitude | |
2208 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
2209 | a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0) | |
2210 | local a = Instance.new("Part",Character) | |
2211 | a.Name = "Direction" | |
2212 | a.Anchored = true | |
2213 | a.BrickColor = Color | |
2214 | a.Material = "Neon" | |
2215 | a.Transparency = 0.5 | |
2216 | a.CanCollide = false | |
2217 | local ray = Ray.new( | |
2218 | sorb.CFrame.p, -- origin | |
2219 | (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction | |
2220 | ) | |
2221 | local ignore = Character | |
2222 | local hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
2223 | if hit then | |
2224 | local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid") | |
2225 | ||
2226 | if not humanoid then | |
2227 | humanoid = hit.Parent.Parent:FindFirstChildOfClass("Humanoid") | |
2228 | end | |
2229 | if humanoid then | |
2230 | if humanoid.Parent:IsA"Model" then | |
2231 | Damagefunc(hit,5,10,math.random(10,20),"Normal",RootPart,.2,1) | |
2232 | end | |
2233 | end | |
2234 | end | |
2235 | a.BottomSurface = 10 | |
2236 | a.TopSurface = 10 | |
2237 | CFuncs["Sound"].Create("rbxassetid://151414336", a, 2.5, 1) | |
2238 | local distance = (sorb.CFrame.p - position).magnitude | |
2239 | a.Size = Vector3.new(0.5, 0.5, distance) | |
2240 | a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, -distance/2) | |
2241 | game:GetService("Debris"):AddItem(a, 0.1) | |
2242 | end | |
2243 | end | |
2244 | for i = 0, 9 do | |
2245 | thing.Scale = thing.Scale - vt(MagCircleScale,MagCircleScale,0) | |
2246 | wait() | |
2247 | end | |
2248 | end | |
2249 | hum.WalkSpeed = 16 | |
2250 | end | |
2251 | function Teleport(col,rad,par) | |
2252 | attack = true | |
2253 | for i = 0,1,0.1 do | |
2254 | swait() | |
2255 | MagicBlock(col,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05) | |
2256 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(90)),.4) | |
2257 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-90)),.4) | |
2258 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.4) | |
2259 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-10)), 0.4) | |
2260 | end | |
2261 | local a = Instance.new("Part",Character) | |
2262 | a.Name = "Direction" | |
2263 | a.Anchored = true | |
2264 | a.BrickColor = col | |
2265 | a.Material = "Neon" | |
2266 | a.Transparency = 1 | |
2267 | a.CanCollide = false | |
2268 | local ab = Instance.new("Part",Character) | |
2269 | ab.Name = "Direction" | |
2270 | ab.Anchored = true | |
2271 | ab.BrickColor = col | |
2272 | ab.Material = "Neon" | |
2273 | ab.Transparency = 1 | |
2274 | ab.CanCollide = false | |
2275 | local ray = Ray.new( | |
2276 | sorb.CFrame.p, -- origin | |
2277 | (mouse.Hit.p - sorb.CFrame.p).unit * 75 -- direction | |
2278 | ) | |
2279 | local ignore = Character | |
2280 | local hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
2281 | a.BottomSurface = 10 | |
2282 | a.TopSurface = 10 | |
2283 | CFuncs["Sound"].Create("rbxassetid://201858045", a, 2.5, 1.25) | |
2284 | local distance = (sorb.CFrame.p - position).magnitude | |
2285 | a.Size = Vector3.new(0.5, 0.5, distance) | |
2286 | ab.Size = Vector3.new(1,1,1) | |
2287 | a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, -distance/2) | |
2288 | ab.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, -distance) | |
2289 | local expart = Instance.new("Part",char) | |
2290 | local expart2 = Instance.new("Part",char) | |
2291 | local partMesh = Instance.new("SpecialMesh",expart) | |
2292 | partMesh.MeshType = "Sphere" | |
2293 | local partMesh2 = Instance.new("SpecialMesh",expart2) | |
2294 | partMesh2.MeshType = "Sphere" | |
2295 | partMesh.Scale = vt(rad,rad,rad) | |
2296 | expart.Size = vt(1,1,1) | |
2297 | expart.Transparency = 0 | |
2298 | expart.Anchored = true | |
2299 | expart.Material = "Neon" | |
2300 | expart.BrickColor = bc("White") | |
2301 | expart.CFrame = par.CFrame | |
2302 | partMesh2.Scale = vt(rad,rad,rad) | |
2303 | expart2.Size = vt(1.15,1.15,1.15) | |
2304 | expart2.Transparency = 0.5 | |
2305 | expart2.Anchored = true | |
2306 | expart2.Material = "Neon" | |
2307 | expart2.BrickColor = col | |
2308 | expart2.CFrame = par.CFrame | |
2309 | expart.CanCollide = false | |
2310 | expart2.CanCollide = false | |
2311 | ||
2312 | local expartb = Instance.new("Part",char) | |
2313 | local expart2b = Instance.new("Part",char) | |
2314 | expartb.CanCollide = false | |
2315 | expart2b.CanCollide = false | |
2316 | local partMeshb = Instance.new("SpecialMesh",expartb) | |
2317 | partMeshb.MeshType = "Sphere" | |
2318 | local partMesh2b = Instance.new("SpecialMesh",expart2b) | |
2319 | partMesh2b.MeshType = "Sphere" | |
2320 | partMeshb.Scale = vt(rad,rad,rad) | |
2321 | expartb.Size = vt(1,1,1) | |
2322 | expartb.Transparency = 0 | |
2323 | expartb.Anchored = true | |
2324 | expartb.Material = "Neon" | |
2325 | expartb.BrickColor = bc("White") | |
2326 | expartb.CFrame = ab.CFrame | |
2327 | partMesh2b.Scale = vt(rad,rad,rad) | |
2328 | expart2b.Size = vt(1.15,1.15,1.15) | |
2329 | expart2b.Transparency = 0.5 | |
2330 | expart2b.Anchored = true | |
2331 | expart2b.Material = "Neon" | |
2332 | expart2b.BrickColor = col | |
2333 | expart2b.CFrame = ab.CFrame | |
2334 | local value = 1*rad/10 | |
2335 | for i = 0, 34 do | |
2336 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
2337 | expart.CFrame = expart.CFrame | |
2338 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
2339 | expart2.CFrame = expart.CFrame | |
2340 | partMeshb.Scale = partMeshb.Scale + vt(value,value,value) | |
2341 | expartb.CFrame = expartb.CFrame | |
2342 | partMesh2b.Scale = partMesh2b.Scale + vt(value,value,value) | |
2343 | expart2b.CFrame = expartb.CFrame | |
2344 | value = value - 0.035*rad/10 | |
2345 | if value < 0 then | |
2346 | value = 0 | |
2347 | end | |
2348 | swait() | |
2349 | end | |
2350 | value = 1.5*rad/10 | |
2351 | CFuncs["Sound"].Create("http://www.roblox.com/asset/?id=142070127",tors,2.5, 1) | |
2352 | attack = false | |
2353 | tors.CFrame = ab.CFrame | |
2354 | for i = 0, 99 do | |
2355 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
2356 | expart.CFrame = expart.CFrame | |
2357 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
2358 | expart2.CFrame = expart.CFrame | |
2359 | partMeshb.Scale = partMeshb.Scale + vt(value,value,value) | |
2360 | expartb.CFrame = expartb.CFrame | |
2361 | partMesh2b.Scale = partMesh2b.Scale + vt(value,value,value) | |
2362 | expart2b.CFrame = expartb.CFrame | |
2363 | value = value - 0.035*rad/10 | |
2364 | if value < 0 then | |
2365 | value = 0 | |
2366 | expart.Transparency = expart.Transparency + 0.025 | |
2367 | expart2.Transparency = expart2.Transparency + 0.025 | |
2368 | expartb.Transparency = expartb.Transparency + 0.025 | |
2369 | expart2b.Transparency = expart2b.Transparency + 0.025 | |
2370 | end | |
2371 | swait() | |
2372 | end | |
2373 | game:GetService("Debris"):AddItem(a, 4) | |
2374 | game:GetService("Debris"):AddItem(ab, 4) | |
2375 | game:GetService("Debris"):AddItem(expart, 1) | |
2376 | game:GetService("Debris"):AddItem(expart2, 1) | |
2377 | game:GetService("Debris"):AddItem(expart2b, 1) | |
2378 | game:GetService("Debris"):AddItem(expartb, 1) | |
2379 | end | |
2380 | function Ultimate(rad,par,col) --- was doing this because idk | |
2381 | hum.WalkSpeed = 0 | |
2382 | for i = 0,5,0.1 do | |
2383 | swait() | |
2384 | MagicBlock(col,sorb.CFrame,2,2,2,0.05,0.05,0.05,0.05) | |
2385 | MagicBlock(col,sorb2.CFrame,2,2,2,0.05,0.05,0.05,0.05) | |
2386 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(0)),.05) | |
2387 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(15),math.rad(0),math.rad(0)),.05) | |
2388 | RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, -0.15) * angles(math.rad(80), math.rad(10), math.rad(-30)), 0.05) | |
2389 | LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(30)), 0.05) | |
2390 | end | |
2391 | for i = 0,10,0.1 do | |
2392 | swait() | |
2393 | MagicBlock(col,tors.CFrame,10,10,10,0.05,0.05,0.05,0.05) | |
2394 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,100 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(0)),.05) | |
2395 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(15),math.rad(0),math.rad(0)),.05) | |
2396 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(20), math.rad(10), math.rad(80)), 0.05) | |
2397 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-80)), 0.05) | |
2398 | end | |
2399 | local expart = Instance.new("Part",char) | |
2400 | local expart2 = Instance.new("Part",char) | |
2401 | local partMesh = Instance.new("SpecialMesh",expart) | |
2402 | partMesh.MeshType = "Sphere" | |
2403 | local partMesh2 = Instance.new("SpecialMesh",expart2) | |
2404 | partMesh2.MeshType = "Sphere" | |
2405 | expart.Size = vt(1,1,1) | |
2406 | expart.Transparency = 0 | |
2407 | expart.Anchored = true | |
2408 | expart.Material = "Neon" | |
2409 | expart.BrickColor = bc("White") | |
2410 | expart.CFrame = par.CFrame | |
2411 | expart2.Size = vt(1.15,1.15,1.15) | |
2412 | expart2.Transparency = 0.5 | |
2413 | expart2.Anchored = true | |
2414 | expart2.Material = "Neon" | |
2415 | expart2.BrickColor = col | |
2416 | expart2.CFrame = par.CFrame | |
2417 | ||
2418 | local a = Instance.new("Part",Character) | |
2419 | a.Name = "Direction" | |
2420 | a.Anchored = true | |
2421 | a.BrickColor = col | |
2422 | a.Material = "Neon" | |
2423 | a.Transparency = 0.5 | |
2424 | a.CanCollide = false | |
2425 | local ray = Ray.new( | |
2426 | tors.CFrame.p, -- origin | |
2427 | (mouse.Hit.p - tors.CFrame.p).unit * 500 -- direction | |
2428 | ) | |
2429 | local ignore = Character | |
2430 | local hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
2431 | a.BottomSurface = 10 | |
2432 | a.TopSurface = 10 | |
2433 | local distance = (tors.CFrame.p - position).magnitude | |
2434 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
2435 | a.CFrame = CFrame.new(tors.CFrame.p, position) * CFrame.new(0, 0, 0) | |
2436 | local value = 1*rad/10 | |
2437 | for i = 0, 99 do | |
2438 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
2439 | expart.CFrame = expart.CFrame | |
2440 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
2441 | expart2.CFrame = expart.CFrame | |
2442 | value = value - 0.035*rad/10 | |
2443 | if value < 0 then | |
2444 | value = 0 | |
2445 | end | |
2446 | swait() | |
2447 | end | |
2448 | for z = 0, 4 do | |
2449 | ray = Ray.new( | |
2450 | tors.CFrame.p, -- origin | |
2451 | (mouse.Hit.p - tors.CFrame.p).unit * 500 -- direction | |
2452 | ) | |
2453 | local ignore = Character | |
2454 | local hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
2455 | local distance = (tors.CFrame.p - position).magnitude | |
2456 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
2457 | a.CFrame = CFrame.new(tors.CFrame.p, position) * CFrame.new(0, 0, 0) | |
2458 | local lb = Instance.new("Part") | |
2459 | lb.Parent = char | |
2460 | lb.BrickColor = col | |
2461 | lb.CanCollide = false | |
2462 | lb.Material = "Neon" | |
2463 | lb.Shape = "Ball" | |
2464 | lb.Anchored = true | |
2465 | lb.Transparency = 0 | |
2466 | lb.Size = vt(1,1,1) | |
2467 | lb.CFrame = a.CFrame + a.CFrame.lookVector*45 | |
2468 | local thingery = Instance.new("SpecialMesh",lb) | |
2469 | thingery.MeshType = "Sphere" | |
2470 | thingery.Scale = vt(25,25,25) | |
2471 | lb.Anchored = false | |
2472 | local bv = Instance.new("BodyVelocity") | |
2473 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
2474 | bv.velocity = a.CFrame.lookVector*350 | |
2475 | bv.Parent = lb | |
2476 | local touched = false | |
2477 | lb.Touched:connect(function(hit) | |
2478 | if touched == false then | |
2479 | touched = true | |
2480 | lb.Transparency = 1 | |
2481 | Explode(10,lb,0.65,1.5) | |
2482 | lb.Anchored = true | |
2483 | end | |
2484 | end) | |
2485 | game:GetService("Debris"):AddItem(lb, 10) | |
2486 | for i = 0, 24 do | |
2487 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
2488 | expart.CFrame = expart.CFrame | |
2489 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
2490 | expart2.CFrame = expart.CFrame | |
2491 | value = value - 0.035*rad/25 | |
2492 | swait() | |
2493 | end | |
2494 | for i = 0, 49 do | |
2495 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
2496 | expart.CFrame = expart.CFrame | |
2497 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
2498 | expart2.CFrame = expart.CFrame | |
2499 | value = value + 0.035*rad/25 | |
2500 | swait() | |
2501 | end | |
2502 | for i = 0, 24 do | |
2503 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
2504 | expart.CFrame = expart.CFrame | |
2505 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
2506 | expart2.CFrame = expart.CFrame | |
2507 | value = value - 0.035*rad/25 | |
2508 | swait() | |
2509 | end | |
2510 | end | |
2511 | for i = 0, 75 do | |
2512 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
2513 | expart.CFrame = expart.CFrame | |
2514 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
2515 | expart2.CFrame = expart.CFrame | |
2516 | value = value - 0.035*rad/25 | |
2517 | if value < 0 then | |
2518 | expart.Transparency = expart.Transparency + 0.025 | |
2519 | expart2.Transparency = expart2.Transparency + 0.025 | |
2520 | end | |
2521 | swait() | |
2522 | end | |
2523 | hum.WalkSpeed = 16 | |
2524 | game:GetService("Debris"):AddItem(expart, 1) | |
2525 | game:GetService("Debris"):AddItem(expart2, 1) | |
2526 | game:GetService("Debris"):AddItem(a, 1) | |
2527 | end | |
2528 | local amount = 1 | |
2529 | local size = 1 | |
2530 | local speed = 50 | |
2531 | local custocolor = BrickColor.new("Lime green") | |
2532 | function Move1() | |
2533 | attack = true | |
2534 | MakeMagic("ExplodingBullet",custocolor,9,vt(1,1,1),250,sorb.CFrame,5,10,5,1,1) | |
2535 | attack = false | |
2536 | end | |
2537 | function Move2() | |
2538 | attack = true | |
2539 | MakeMagic("ExplodingBullet",custocolor,1,vt(5,5,5),100,sorb.CFrame,10,25,7.5,1,1) | |
2540 | attack = false | |
2541 | end | |
2542 | function Ult() | |
2543 | attack = true | |
2544 | Ultimate(75,tors,custocolor) | |
2545 | attack = false | |
2546 | end | |
2547 | ||
2548 | local coold = false | |
2549 | function PulsingShield(col) | |
2550 | attack = true | |
2551 | coold = true | |
2552 | hum.WalkSpeed = 0 | |
2553 | for i = 0,3,0.1 do | |
2554 | swait() | |
2555 | MagicBlock(col,sorb.CFrame,2,2,2,0.05,0.05,0.05,0.05) | |
2556 | MagicBlock(col,sorb2.CFrame,2,2,2,0.05,0.05,0.05,0.05) | |
2557 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
2558 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.3) | |
2559 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(20), math.rad(10), math.rad(80)), 0.3) | |
2560 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-80)), 0.3) | |
2561 | end | |
2562 | attack = false | |
2563 | hum.WalkSpeed = 16 | |
2564 | PulseDam(25,tors,col) | |
2565 | coold = false | |
2566 | end | |
2567 | ||
2568 | mouse.KeyDown:connect(function(k) | |
2569 | if k == "z" and attack == false then | |
2570 | Move1() | |
2571 | end | |
2572 | if k == "x" and attack == false then | |
2573 | Move2() | |
2574 | end | |
2575 | if k == "c" and attack == false then | |
2576 | Teleport(custocolor,5,tors) | |
2577 | end | |
2578 | if k == "v" and attack == false and coold == false then | |
2579 | PulsingShield(custocolor) | |
2580 | end | |
2581 | if k == "b" and attack == false then | |
2582 | Ult() | |
2583 | end | |
2584 | end) | |
2585 | ||
2586 | Humanoid.Animator.Parent = nil | |
2587 | idleanim=.4 | |
2588 | while true do | |
2589 | swait() | |
2590 | sine = sine + change | |
2591 | local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
2592 | local velderp=RootPart.Velocity.y | |
2593 | hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
2594 | if equipped==true or equipped==false then | |
2595 | if attack==false then | |
2596 | idle=idle+1 | |
2597 | else | |
2598 | idle=0 | |
2599 | end | |
2600 | if idle>=500 then | |
2601 | if attack==false then | |
2602 | --Sheath() | |
2603 | end | |
2604 | end | |
2605 | if RootPart.Velocity.y > 1 and hitfloor==nil then | |
2606 | Anim="Jump" | |
2607 | if attack==false then | |
2608 | Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.3) | |
2609 | Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3) | |
2610 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0.25)*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
2611 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,0.5)*angles(math.rad(-25),math.rad(0),math.rad(0)),.3) | |
2612 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
2613 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-0.5),.3) | |
2614 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
2615 | RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2) | |
2616 | LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2) | |
2617 | end | |
2618 | elseif RootPart.Velocity.y < -1 and hitfloor==nil then | |
2619 | Anim="Fall" | |
2620 | if attack==false then | |
2621 | Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.3) | |
2622 | Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3) | |
2623 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0.25)*angles(math.rad(5),math.rad(0),math.rad(0)),.3) | |
2624 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0.3,0,-0.2),.3) | |
2625 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
2626 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0.3,0,0.2)*angles(math.rad(-25),math.rad(0),math.rad(0)),.3) | |
2627 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
2628 | RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2) | |
2629 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2) | |
2630 | end | |
2631 | elseif torvel<1 and hitfloor~=nil then | |
2632 | Anim="Idle" | |
2633 | RH.C0=clerp(RH.C0,cf(1,-1 - 0.15 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5 - 2.5 * math.cos(sine / 32)),math.rad(0),math.rad(0 + 7.5 * math.cos(sine / 32))),.3) | |
2634 | LH.C0=clerp(LH.C0,cf(-1,-1 - 0.15 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5 - 2.5 * math.cos(sine / 32)),math.rad(0),math.rad(0 + 7.5 * math.cos(sine / 32))),.3) | |
2635 | if attack==false then | |
2636 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))*angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
2637 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0 - 5 * math.cos(sine / 25)),math.rad(0),math.rad(0)),.3) | |
2638 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(5 + 2.5 * math.cos(sine / 25))),.3) | |
2639 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(-5 - 2.5 * math.cos(sine / 25))),.3) | |
2640 | end | |
2641 | elseif torvel>2 and torvel<22 and hitfloor~=nil then | |
2642 | Anim="Walk" | |
2643 | RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 4),-0.25 - 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 25 * math.cos(sine / 8))),.3) | |
2644 | LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 4),-0.25 - 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 25 * math.cos(sine / 8))),.3) | |
2645 | if attack==false then | |
2646 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 - 0.05 * math.cos(sine / 4))*angles(math.rad(15),math.rad(0),math.rad(0)),.3) | |
2647 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
2648 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0 - 25 * math.cos(sine / 8)),math.rad(0),math.rad(10 + 1.25 * math.cos(sine / 16))),.3) | |
2649 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0 + 25 * math.cos(sine / 8)),math.rad(0),math.rad(-10 - 1.25 * math.cos(sine / 16))),.3) | |
2650 | end | |
2651 | elseif torvel>=22 and hitfloor~=nil then | |
2652 | Anim="Run" | |
2653 | RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 32),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 75 * math.cos(sine / 3))),.3) | |
2654 | LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 32),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 75 * math.cos(sine / 3))),.3) | |
2655 | if attack==false then | |
2656 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-0.25 + 0.05 * math.cos(sine / 32))* angles(math.rad(35),math.rad(0),math.rad(0)),.3) | |
2657 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
2658 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-50),math.rad(-60),math.rad(25)),.3) | |
2659 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(-50),math.rad(0),math.rad(-25)),.3) | |
2660 | end | |
2661 | end | |
2662 | end | |
2663 | end |