SHOW:
|
|
- or go back to the newest paste.
1 | - | plr=game.Players.Imtannerbanner56 |
1 | + | plr=game.Players.Dogeness33 |
2 | char=plr.Character | |
3 | char.Humanoid.WalkSpeed=67 | |
4 | pcall(function() char.MainParts:Remove() end) | |
5 | bin=Instance.new("HopperBin",plr.Backpack) | |
6 | bin.Name="Pheonix Sword" | |
7 | script.Parent=bin | |
8 | attacking=false | |
9 | pcall(function() workspace.MainParts:Destroy() end) | |
10 | function makepart(name,parent,s1,s2,s3,color) | |
11 | p=Instance.new("Part",parent) | |
12 | p.Name=name | |
13 | p.formFactor="Custom" | |
14 | p.Anchored=false | |
15 | p.Locked=true | |
16 | p.CanCollide=false | |
17 | p.Size=Vector3.new(s1,s2,s3) | |
18 | p.BrickColor=BrickColor.new(color) | |
19 | p:BreakJoints() | |
20 | return p | |
21 | end | |
22 | function cylinder(part) | |
23 | bm=Instance.new("CylinderMesh",part) | |
24 | return bm | |
25 | end | |
26 | function blockmesh(part) | |
27 | bm=Instance.new("BlockMesh",part) | |
28 | return bm | |
29 | end | |
30 | function specmesh(part,type,s1,s2,s3) | |
31 | spec=Instance.new("SpecialMesh",part) | |
32 | spec.MeshType=type | |
33 | spec.Scale=Vector3.new(s1,s2,s3) | |
34 | return spec | |
35 | end | |
36 | chosen="Really black" | |
37 | main=Instance.new("Model",char) | |
38 | main.Name="MainParts" | |
39 | handle = makepart("Handle",main,.2,2,.2,"Really black") | |
40 | cylinder(handle) | |
41 | wd1=Instance.new("Weld",handle) | |
42 | wd1.Part1=handle | |
43 | wd1.Part0=nil | |
44 | handlep = makepart("HandlePart",main,.22,0.02,.22,chosen) | |
45 | cyl1 = cylinder(handlep) | |
46 | cyl1.Scale=Vector3.new(1,.5,1) | |
47 | w1=Instance.new("Weld",handlep) | |
48 | w1.Part1=handle | |
49 | w1.Part0=handlep | |
50 | w1.C1=CFrame.new(0,1,0) * CFrame.Angles(0,0,0) | |
51 | handlep2 = makepart("HandlePart2",main,.25,.25,.25,chosen) | |
52 | specmesh(hanelp2,"Sphere",1,1,1) | |
53 | w1=Instance.new("Weld",handlep2) | |
54 | w1.Part1=handlep | |
55 | w1.Part0=handlep2 | |
56 | w1.C1=CFrame.new(0,.05,0) * CFrame.Angles(0,0,0) | |
57 | handlep3 = makepart("HandlePart3",main,.22,0.02,.22,chosen) | |
58 | cyl1 = cylinder(handlep3) | |
59 | cyl1.Scale=Vector3.new(1,.3,1) | |
60 | w1=Instance.new("Weld",handlep3) | |
61 | w1.Part1=handle | |
62 | w1.Part0=handlep3 | |
63 | w1.C1=CFrame.new(0,-.5,0) * CFrame.Angles(0,0,0) | |
64 | handlep4 = makepart("HandlePart4",main,.24,0.02,.24,chosen) | |
65 | cyl1 = cylinder(handlep4) | |
66 | cyl1.Scale=Vector3.new(1,.3,1) | |
67 | w1=Instance.new("Weld",handlep4) | |
68 | w1.Part1=handle | |
69 | w1.Part0=handlep4 | |
70 | w1.C1=CFrame.new(0,-.54,0) * CFrame.Angles(0,0,0) | |
71 | handlep5 = makepart("HandlePart5",main,.26,0.02,.26,chosen) | |
72 | cyl1 = cylinder(handlep5) | |
73 | cyl1.Scale=Vector3.new(1,.3,1) | |
74 | w1=Instance.new("Weld",handlep5) | |
75 | w1.Part1=handle | |
76 | w1.Part0=handlep5 | |
77 | w1.C1=CFrame.new(0,-.57,0) * CFrame.Angles(0,0,0) | |
78 | handlep6 = makepart("HandlePart6",main,.02,0.02,.02,chosen) | |
79 | bm6=blockmesh(handlep6) | |
80 | bm6.Scale=Vector3.new(2,2.6,1.3) | |
81 | w1=Instance.new("Weld",handlep6) | |
82 | w1.Part1=handle | |
83 | w1.Part0=handlep6 | |
84 | w1.C1=CFrame.new(0,-.84,0) * CFrame.Angles(0,0,0) | |
85 | handlep7 = makepart("HandlePart7",main,.02,0.02,.02,chosen) | |
86 | bm7=blockmesh(handlep7) | |
87 | bm7.Scale=Vector3.new(3,1.6,1.3) | |
88 | w1=Instance.new("Weld",handlep7) | |
89 | w1.Part1=handle | |
90 | w1.Part0=handlep7 | |
91 | w1.C1=CFrame.new(.5,-.84,0) * CFrame.Angles(0,0,0) | |
92 | handlep8 = makepart("HandlePart8",main,.02,0.02,.02,chosen) | |
93 | bm8=blockmesh(handlep8) | |
94 | bm8.Scale=Vector3.new(3,1.6,1.3) | |
95 | w1=Instance.new("Weld",handlep8) | |
96 | w1.Part1=handle | |
97 | w1.Part0=handlep8 | |
98 | w1.C1=CFrame.new(-.5,-.84,0) * CFrame.Angles(0,0,0) | |
99 | handlep11 = makepart("HandlePart11",main,.02,0.02,.02,"Really black") | |
100 | bm11=blockmesh(handlep11) | |
101 | bm11.Scale=Vector3.new(1.4,1.4,1.61) | |
102 | w1=Instance.new("Weld",handlep11) | |
103 | w1.Part1=handle | |
104 | w1.Part0=handlep11 | |
105 | w1.C1=CFrame.new(0,-.84,0) * CFrame.Angles(0,0,0) | |
106 | bladep1 = makepart("BladePart1",main,.02,4,.02,"Really black") | |
107 | bp1=blockmesh(bladep1) | |
108 | bp1.Scale=Vector3.new(4,1,.5) | |
109 | w1=Instance.new("Weld",bladep1) | |
110 | w1.Part1=handle | |
111 | w1.Part0=bladep1 | |
112 | w1.C1=CFrame.new(0,-3,0) * CFrame.Angles(0,0,0) | |
113 | bladep2 = makepart("BladePart2",main,.02,.02,.02,chosen) | |
114 | bp2=specmesh(bladep2,"Wedge",.6,1,1) | |
115 | w1=Instance.new("Weld",bladep2) | |
116 | w1.Part1=handle | |
117 | w1.Part0=bladep2 | |
118 | w1.C1=CFrame.new(-0.2,-4.6,0) | |
119 | w1.C0=CFrame.Angles(0,math.rad(90),0) | |
120 | bladep3 = makepart("BladePart3",main,.02,.02,.02,chosen) | |
121 | bp3=specmesh(bladep3,"Wedge",.6,1,1) | |
122 | w1=Instance.new("Weld",bladep3) | |
123 | w1.Part1=handle | |
124 | w1.Part0=bladep3 | |
125 | w1.C1=CFrame.new(0.2,-4.6,0) | |
126 | w1.C0=CFrame.Angles(0,math.rad(270),0) | |
127 | bladep4 = makepart("BladePart4",main,.02,.02,.02,chosen) | |
128 | bp4=specmesh(bladep4,"Wedge",.6,1,1) | |
129 | w1=Instance.new("Weld",bladep4) | |
130 | w1.Part1=handle | |
131 | w1.Part0=bladep4 | |
132 | w1.C1=CFrame.new(0.2,-4.3,0) | |
133 | w1.C0=CFrame.Angles(math.rad(90),math.rad(270),0) | |
134 | bladep5 = makepart("BladePart5",main,.02,.02,.02,chosen) | |
135 | bp5=specmesh(bladep5,"Wedge",.6,1,1) | |
136 | w1=Instance.new("Weld",bladep5) | |
137 | w1.Part1=handle | |
138 | w1.Part0=bladep5 | |
139 | w1.C1=CFrame.new(-0.2,-4.3,0) | |
140 | w1.C0=CFrame.Angles(math.rad(90),math.rad(90),0) | |
141 | bladep6 = makepart("BladePart6",main,.02,.02,.02,chosen) | |
142 | bp6=cylinder(bladep6) | |
143 | bp6.Scale=Vector3.new(1,.6,1) | |
144 | w1=Instance.new("Weld",bladep6) | |
145 | w1.Part1=handle | |
146 | w1.Part0=bladep6 | |
147 | w1.C1=CFrame.new(0,-4.45,0) | |
148 | w1.C0=CFrame.Angles(math.rad(90),0,math.rad(90)) | |
149 | bladep7 = makepart("BladePart7",main,.02,.02,.02,chosen) | |
150 | bp7=blockmesh(bladep7) | |
151 | bp7.Scale=Vector3.new(.6,16.6,.6) | |
152 | w1=Instance.new("Weld",bladep7) | |
153 | w1.Part1=handle | |
154 | w1.Part0=bladep7 | |
155 | w1.C1=CFrame.new(0,-2.72,0) | |
156 | bladep8 = makepart("BladePart8",main,.02,.02,.02,"red") | |
157 | bp8=specmesh(bladep8,"Wedge",.51,2,3) | |
158 | w1=Instance.new("Weld",bladep8) | |
159 | w1.Part1=handle | |
160 | w1.Part0=bladep8 | |
161 | w1.C1=CFrame.new(0.20,-5.3,0) | |
162 | w1.C0=CFrame.Angles(math.rad(90),math.rad(90),0) | |
163 | bladep9 = makepart("BladePart9",main,.02,.02,.02,"red") | |
164 | bp9=specmesh(bladep9,"Wedge",.51,2,3) | |
165 | w1=Instance.new("Weld",bladep9) | |
166 | w1.Part1=handle | |
167 | w1.Part0=bladep9 | |
168 | w1.C1=CFrame.new(-0.20,-5.3,0) | |
169 | w1.C0=CFrame.Angles(math.rad(90),math.rad(270),0) | |
170 | --[[ Ghost Sword ]] | |
171 | function ghost() | |
172 | main2=Instance.new("Model",char) | |
173 | main2.Name="GhostMainParts" | |
174 | handleg = makepart("Handle",main2,.2,2,.2,"Really black") | |
175 | cylinder(handleg) | |
176 | wd12=Instance.new("Weld",handleg) | |
177 | wd12.Part1=handleg | |
178 | wd12.Name="Weldd" | |
179 | wd12.Part0=nil | |
180 | handlep = makepart("HandlePart",main2,.22,0.02,.22,chosen) | |
181 | cyl1 = cylinder(handlep) | |
182 | cyl1.Scale=Vector3.new(1,.5,1) | |
183 | w1=Instance.new("Weld",handlep) | |
184 | w1.Part1=handleg | |
185 | w1.Part0=handlep | |
186 | w1.C1=CFrame.new(0,1,0) * CFrame.Angles(0,0,0) | |
187 | handlep2 = makepart("HandlePart2",main2,.25,.25,.25,chosen) | |
188 | specmesh(hanelp2,"Sphere",1,1,1) | |
189 | w1=Instance.new("Weld",handlep2) | |
190 | w1.Part1=handlep | |
191 | w1.Part0=handlep2 | |
192 | w1.C1=CFrame.new(0,.05,0) * CFrame.Angles(0,0,0) | |
193 | handlep3 = makepart("HandlePart3",main2,.22,0.02,.22,chosen) | |
194 | cyl1 = cylinder(handlep3) | |
195 | cyl1.Scale=Vector3.new(1,.3,1) | |
196 | w1=Instance.new("Weld",handlep3) | |
197 | w1.Part1=handleg | |
198 | w1.Part0=handlep3 | |
199 | w1.C1=CFrame.new(0,-.5,0) * CFrame.Angles(0,0,0) | |
200 | handlep4 = makepart("HandlePart4",main2,.24,0.02,.24,chosen) | |
201 | cyl1 = cylinder(handlep4) | |
202 | cyl1.Scale=Vector3.new(1,.3,1) | |
203 | w1=Instance.new("Weld",handlep4) | |
204 | w1.Part1=handleg | |
205 | w1.Part0=handlep4 | |
206 | w1.C1=CFrame.new(0,-.54,0) * CFrame.Angles(0,0,0) | |
207 | handlep5 = makepart("HandlePart5",main2,.26,0.02,.26,chosen) | |
208 | cyl1 = cylinder(handlep5) | |
209 | cyl1.Scale=Vector3.new(1,.3,1) | |
210 | w1=Instance.new("Weld",handlep5) | |
211 | w1.Part1=handleg | |
212 | w1.Part0=handlep5 | |
213 | w1.C1=CFrame.new(0,-.57,0) * CFrame.Angles(0,0,0) | |
214 | handlep6 = makepart("HandlePart6",main2,.02,0.02,.02,chosen) | |
215 | bm6=blockmesh(handlep6) | |
216 | bm6.Scale=Vector3.new(2,2.6,1.3) | |
217 | w1=Instance.new("Weld",handlep6) | |
218 | w1.Part1=handleg | |
219 | w1.Part0=handlep6 | |
220 | w1.C1=CFrame.new(0,-.84,0) * CFrame.Angles(0,0,0) | |
221 | handlep7 = makepart("HandlePart7",main2,.02,0.02,.02,chosen) | |
222 | bm7=blockmesh(handlep7) | |
223 | bm7.Scale=Vector3.new(3,1.6,1.3) | |
224 | w1=Instance.new("Weld",handlep7) | |
225 | w1.Part1=handleg | |
226 | w1.Part0=handlep7 | |
227 | w1.C1=CFrame.new(.5,-.84,0) * CFrame.Angles(0,0,0) | |
228 | handlep8 = makepart("HandlePart8",main2,.02,0.02,.02,chosen) | |
229 | bm8=blockmesh(handlep8) | |
230 | bm8.Scale=Vector3.new(3,1.6,1.3) | |
231 | w1=Instance.new("Weld",handlep8) | |
232 | w1.Part1=handleg | |
233 | w1.Part0=handlep8 | |
234 | w1.C1=CFrame.new(-.5,-.84,0) * CFrame.Angles(0,0,0) | |
235 | handlep11 = makepart("HandlePart11",main2,.02,0.02,.02,"Really black") | |
236 | bm11=blockmesh(handlep11) | |
237 | bm11.Scale=Vector3.new(1.4,1.4,1.61) | |
238 | w1=Instance.new("Weld",handlep11) | |
239 | w1.Part1=handleg | |
240 | w1.Part0=handlep11 | |
241 | w1.C1=CFrame.new(0,-.84,0) * CFrame.Angles(0,0,0) | |
242 | bladep1 = makepart("BladePart1",main2,.02,4,.02,"red") | |
243 | bp1=blockmesh(bladep1) | |
244 | bp1.Scale=Vector3.new(4,1,.5) | |
245 | w1=Instance.new("Weld",bladep1) | |
246 | w1.Part1=handleg | |
247 | w1.Part0=bladep1 | |
248 | w1.C1=CFrame.new(0,-3,0) * CFrame.Angles(0,0,0) | |
249 | bladep2 = makepart("BladePart2",main2,.02,.02,.02,chosen) | |
250 | bp2=specmesh(bladep2,"Wedge",.6,1,1) | |
251 | w1=Instance.new("Weld",bladep2) | |
252 | w1.Part1=handleg | |
253 | w1.Part0=bladep2 | |
254 | w1.C1=CFrame.new(-0.2,-4.6,0) | |
255 | w1.C0=CFrame.Angles(0,math.rad(90),0) | |
256 | bladep3 = makepart("BladePart3",main2,.02,.02,.02,chosen) | |
257 | bp3=specmesh(bladep3,"Wedge",.6,1,1) | |
258 | w1=Instance.new("Weld",bladep3) | |
259 | w1.Part1=handleg | |
260 | w1.Part0=bladep3 | |
261 | w1.C1=CFrame.new(0.2,-4.6,0) | |
262 | w1.C0=CFrame.Angles(0,math.rad(270),0) | |
263 | bladep4 = makepart("BladePart4",main2,.02,.02,.02,chosen) | |
264 | bp4=specmesh(bladep4,"Wedge",.6,1,1) | |
265 | w1=Instance.new("Weld",bladep4) | |
266 | w1.Part1=handleg | |
267 | w1.Part0=bladep4 | |
268 | w1.C1=CFrame.new(0.2,-4.3,0) | |
269 | w1.C0=CFrame.Angles(math.rad(90),math.rad(270),0) | |
270 | bladep5 = makepart("BladePart5",main2,.02,.02,.02,chosen) | |
271 | bp5=specmesh(bladep5,"Wedge",.6,1,1) | |
272 | w1=Instance.new("Weld",bladep5) | |
273 | w1.Part1=handleg | |
274 | w1.Part0=bladep5 | |
275 | w1.C1=CFrame.new(-0.2,-4.3,0) | |
276 | w1.C0=CFrame.Angles(math.rad(90),math.rad(90),0) | |
277 | bladep6 = makepart("BladePart6",main2,.02,.02,.02,chosen) | |
278 | bp6=cylinder(bladep6) | |
279 | bp6.Scale=Vector3.new(1,.6,1) | |
280 | w1=Instance.new("Weld",bladep6) | |
281 | w1.Part1=handleg | |
282 | w1.Part0=bladep6 | |
283 | w1.C1=CFrame.new(0,-4.45,0) | |
284 | w1.C0=CFrame.Angles(math.rad(90),0,math.rad(90)) | |
285 | bladep7 = makepart("BladePart7",main2,.02,.02,.02,chosen) | |
286 | bp7=blockmesh(bladep7) | |
287 | bp7.Scale=Vector3.new(.6,16.6,.6) | |
288 | w1=Instance.new("Weld",bladep7) | |
289 | w1.Part1=handleg | |
290 | w1.Part0=bladep7 | |
291 | w1.C1=CFrame.new(0,-2.72,0) | |
292 | bladep8 = makepart("BladePart8",main2,.02,.02,.02,"red") | |
293 | bp8=specmesh(bladep8,"Wedge",.51,2,3) | |
294 | w1=Instance.new("Weld",bladep8) | |
295 | w1.Part1=handleg | |
296 | w1.Part0=bladep8 | |
297 | w1.C1=CFrame.new(0.20,-5.3,0) | |
298 | w1.C0=CFrame.Angles(math.rad(90),math.rad(90),0) | |
299 | bladep9 = makepart("BladePart9",main2,.02,.02,.02,"red") | |
300 | bp9=specmesh(bladep9,"Wedge",.51,2,3) | |
301 | w1=Instance.new("Weld",bladep9) | |
302 | w1.Part1=handleg | |
303 | w1.Part0=bladep9 | |
304 | w1.C1=CFrame.new(-0.20,-5.3,0) | |
305 | w1.C0=CFrame.Angles(math.rad(90),math.rad(270),0) | |
306 | return main2 | |
307 | end | |
308 | hold=false | |
309 | --[[Key/Mouse]] | |
310 | mode="normal" | |
311 | function select() | |
312 | mode="normal" | |
313 | equipanim() | |
314 | end | |
315 | function unselect() | |
316 | char.Humanoid.WalkSpeed=20 | |
317 | hideanim() | |
318 | end | |
319 | combo=0 | |
320 | bin.Selected:connect(function(mouse) | |
321 | select() | |
322 | mouse.Button1Down:connect(function() | |
323 | if combo==0 then | |
324 | slashanim() | |
325 | combo = 1 | |
326 | elseif combo==1 then | |
327 | slashanim2() | |
328 | combo = 0 | |
329 | end | |
330 | end) | |
331 | mouse.KeyDown:connect(function(key) | |
332 | hold=true | |
333 | if mode=="normal" then | |
334 | if key == "q" then | |
335 | move3() | |
336 | elseif key=="e" then | |
337 | move4() | |
338 | elseif key=="r" then | |
339 | move5() | |
340 | end | |
341 | end | |
342 | end) | |
343 | mouse.KeyUp:connect(function() | |
344 | hold=false | |
345 | end) | |
346 | end) | |
347 | bin.Deselected:connect(function() | |
348 | unselect() | |
349 | end) | |
350 | --[[DMG]] | |
351 | function damagesplat(dmg,hit) | |
352 | local mo = Instance.new("Model") | |
353 | mo.Name = dmg | |
354 | local pa = Instance.new("Part",mo) | |
355 | pa.formFactor = 3 | |
356 | pa.Size = Vector3.new(0.8,0.3,0.8) | |
357 | pa.BrickColor = BrickColor.new(chosen) | |
358 | pa.CanCollide=false | |
359 | pa.CFrame = CFrame.new(hit.Position) * CFrame.new(0, 3, 0) | |
360 | pa.Name = "Head" | |
361 | cm=Instance.new("CylinderMesh",pa) | |
362 | local hah = Instance.new("Humanoid") | |
363 | hah.Parent = mo | |
364 | hah.MaxHealth = 0 | |
365 | hah.Health = 0 | |
366 | local bp = Instance.new("BodyPosition") | |
367 | bp.P = 14000 | |
368 | bp.maxForce = Vector3.new(math.huge, math.huge, math.huge) | |
369 | bp.position = hit.Position + Vector3.new(0, 5, 0) | |
370 | coroutine.resume(coroutine.create(function() | |
371 | wait() | |
372 | mo.Parent = workspace | |
373 | bp.Parent = pa | |
374 | wait(1.4) | |
375 | mo:remove() | |
376 | end)) | |
377 | end | |
378 | con = nil | |
379 | con2 = nil | |
380 | hitd=0 | |
381 | hitd2=0 | |
382 | function OT(hit) | |
383 | if hit.Parent == nil then return end | |
384 | local hum = hit.Parent:findFirstChild("Humanoid") | |
385 | local head = hit.Parent:findFirstChild("Head") | |
386 | if hum ~= nil then | |
387 | dm=math.random(10000,10000) | |
388 | hum:TakeDamage(dm) | |
389 | if head ~= nil then | |
390 | damagesplat(dm,head) | |
391 | end | |
392 | end | |
393 | hitd=1 | |
394 | end | |
395 | function OT2(hit) | |
396 | if hit.Parent == nil then return end | |
397 | local hum = hit.Parent:findFirstChild("Humanoid") | |
398 | local head = hit.Parent:findFirstChild("Head") | |
399 | if hum ~= nil then | |
400 | dm=math.random(10000,10000) | |
401 | hum:TakeDamage(dm) | |
402 | if head ~= nil then | |
403 | damagesplat(dm,head) | |
404 | end | |
405 | end | |
406 | hitd2=1 | |
407 | end | |
408 | function dmgcnnct(p) | |
409 | con = p.Touched:connect(OT) | |
410 | end | |
411 | function dmgcnnct2(p) | |
412 | con2 = p.Touched:connect(OT2) | |
413 | end | |
414 | function dmgdc2() | |
415 | if con2 ~= nil then | |
416 | con2:disconnect() | |
417 | hitd2=0 | |
418 | end | |
419 | end | |
420 | function dmgdc() | |
421 | if con ~= nil then | |
422 | con:disconnect() | |
423 | hitd=0 | |
424 | end | |
425 | end | |
426 | --[[Anims]]-- | |
427 | RW, LW , RWL, LWL = Instance.new("Weld"), Instance.new("Weld"), Instance.new("Weld"), Instance.new("Weld") | |
428 | ch = char | |
429 | player=plr | |
430 | RSH, LSH , RHL, LHL = ch.Torso["Right Shoulder"], ch.Torso["Left Shoulder"] , ch.Torso["Right Hip"] , ch.Torso["Left Hip"] | |
431 | RW.Part0 = ch.Torso | |
432 | RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) | |
433 | RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) | |
434 | RW.Parent = main | |
435 | -- | |
436 | LW.Part0 = ch.Torso | |
437 | LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
438 | LW.C1 = CFrame.new(0, 0.5, 0) | |
439 | LW.Parent = main | |
440 | -- | |
441 | RWL.Part0 = ch.Torso | |
442 | RWL.C0 = CFrame.new(1, -1, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
443 | RWL.C1 = CFrame.new(0.5, 1, 0) | |
444 | RWL.Parent = main | |
445 | -- | |
446 | LWL.Part0 = ch.Torso | |
447 | LWL.C0 = CFrame.new(-1, -1, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
448 | LWL.C1 = CFrame.new(-0.5, 1, 0) | |
449 | LWL.Parent = main | |
450 | function RWFunc() | |
451 | RW.Part1 = ch["Right Arm"] | |
452 | RSH.Part1 = nil | |
453 | end | |
454 | function LWFunc() | |
455 | LW.Part1 = ch["Left Arm"] | |
456 | LSH.Part1 = nil | |
457 | end | |
458 | function RWLFunc() | |
459 | RWL.Part1 = ch["Right Leg"] | |
460 | RHL.Part1 = nil | |
461 | ch["Right Leg"].Name = "RightLeg" | |
462 | RightLeg.CanCollide = false | |
463 | end | |
464 | function LWLFunc() | |
465 | LWL.Part1 = ch["Left Leg"] | |
466 | LHL.Part1 = nil | |
467 | ch["Left Leg"].Name = "LeftLeg" | |
468 | LeftLeg.CanCollide = true | |
469 | end | |
470 | function RWLRem() | |
471 | RightLeg.Name = "Right Leg" | |
472 | RWL.Part1 = nil | |
473 | RHL.Part1 = ch["Right Leg"] | |
474 | RightLeg.CanCollide = false | |
475 | end | |
476 | function LWLRem() | |
477 | LeftLeg.Name = "Left Leg" | |
478 | LWL.Part1 = nil | |
479 | LHL.Part1 = ch["Left Leg"] | |
480 | LeftLeg.CanCollide = false | |
481 | end | |
482 | function RWRem() | |
483 | RW.Part1 = nil | |
484 | RSH.Part1 = ch["Right Arm"] | |
485 | end | |
486 | function LWRem() | |
487 | LW.Part1 = nil | |
488 | LSH.Part1 = ch["Left Arm"] | |
489 | end | |
490 | local RAP = Instance.new("Part") | |
491 | RAP.formFactor = 0 | |
492 | RAP.CanCollide = false | |
493 | RAP.Name = "RAPart" | |
494 | RAP.Locked = true | |
495 | RAP.Size = Vector3.new(1,1,1) | |
496 | RAP.Parent = main | |
497 | RAP.Transparency = 1 | |
498 | local w = Instance.new("Weld") | |
499 | w.Parent = RAP | |
500 | w.Part0 = RAP | |
501 | w.Part1 = char["Right Arm"] | |
502 | w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0,0) | |
503 | w.C0 = CFrame.fromEulerAnglesXYZ(math.rad(0), 0, 0) * CFrame.new(0, 1, 0) | |
504 | local LAP = Instance.new("Part") | |
505 | LAP.formFactor = 0 | |
506 | LAP.CanCollide = false | |
507 | LAP.Name = "LAPart" | |
508 | LAP.Locked = true | |
509 | LAP.Size = Vector3.new(1,1,1) | |
510 | LAP.Parent = main | |
511 | LAP.Transparency = 1 | |
512 | local ww = Instance.new("Weld") | |
513 | ww.Parent = LAP | |
514 | ww.Part0 = LAP | |
515 | ww.Part1 = char["Left Arm"] | |
516 | ww.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0,0) | |
517 | ww.C0 = CFrame.fromEulerAnglesXYZ(math.rad(0), 0, 0) * CFrame.new(0, 1, 0) | |
518 | function unequipweld() | |
519 | wd1.Part0 = char.Torso | |
520 | wd1.C1=CFrame.new(0,-1.5,-.6) * CFrame.Angles(0,0,.8) | |
521 | wd1.C0=CFrame.new(0,0,0) * CFrame.Angles(0,0,0) | |
522 | end | |
523 | unequipweld() | |
524 | function equipweld() | |
525 | wd1.Part0 = RAP | |
526 | wd1.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0,0) | |
527 | wd1.C0 = CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(90), math.rad(90)) * CFrame.new(0, 0, 0.2) | |
528 | end | |
529 | function hideanim() | |
530 | RWFunc() | |
531 | for i = 0 , 1 , 0.2 do | |
532 | wait() | |
533 | RW.C0 = CFrame.new(1+0.5*i,0.5,-0.5) * CFrame.fromEulerAnglesXYZ(math.rad(80+67*i), math.rad(45), math.rad(-45+90*i)) | |
534 | end | |
535 | for i = 0 , 1 , 0.15 do | |
536 | wait() | |
537 | RW.C0 = CFrame.new(1.5,0.5+0.5*i,-0.5) * CFrame.fromEulerAnglesXYZ(math.rad(147+103*i), math.rad(45), math.rad(45-35*i)) | |
538 | end | |
539 | unequipweld() | |
540 | wait(0.1) | |
541 | for i = 0 , 1 , 0.1 do | |
542 | wait() | |
543 | RW.C0 = CFrame.new(1.5,1-0.5*i,-0.5+0.5*i) * CFrame.fromEulerAnglesXYZ(math.rad(250-250*i), math.rad(45-45*i), math.rad(10-10*i)) | |
544 | end | |
545 | RWRem() | |
546 | LWRem() | |
547 | end | |
548 | function equipanim() | |
549 | RWFunc() | |
550 | for i = 0 , 1 , 0.1 do | |
551 | wait(.05) | |
552 | RW.C0 = CFrame.new(1.5,0.5,-0.5*i) * CFrame.fromEulerAnglesXYZ(math.rad(250*i), math.rad(45*i), math.rad(-10*i)) | |
553 | end | |
554 | equipweld() | |
555 | for i = 0 , 1 , 0.2 do | |
556 | wait(.05) | |
557 | RW.C0 = CFrame.new(1.5,0.5+0.5*i,-0.5) * CFrame.fromEulerAnglesXYZ(math.rad(250-102.5*i), math.rad(45), math.rad(-10+27.5*i)) | |
558 | end | |
559 | for i = 0 , 1 , 0.15 do | |
560 | wait(.05) | |
561 | RW.C0 = CFrame.new(1.5,1-0.5*i,-0.5) * CFrame.fromEulerAnglesXYZ(math.rad(147-67*i), math.rad(45), math.rad(17.5+27.5*i)) | |
562 | end | |
563 | for i = 0 , 1 , 0.1 do | |
564 | wait(.05) | |
565 | RW.C0 = CFrame.new(1.5-0.5*i,0.5,-0.5) * CFrame.fromEulerAnglesXYZ(math.rad(80), math.rad(35), math.rad(45-90*i)) | |
566 | end | |
567 | end | |
568 | function slashanim() | |
569 | RWFunc() | |
570 | if attacking==true then return end | |
571 | attacking=true | |
572 | for i = 0 , 1 , 0.1 do | |
573 | wait() | |
574 | RW.C0 = CFrame.new(1-0.5*i,0.5,-0.5-0.5*i) * CFrame.fromEulerAnglesXYZ(math.rad(80+10*i), math.rad(45+45*i), math.rad(-45+45*i)) | |
575 | RW.C1 = CFrame.new(0,0.5,0) * CFrame.fromEulerAnglesXYZ(math.rad(-45*i), math.rad(10*i), math.rad(0)) | |
576 | end | |
577 | dmgcnnct(bladep1) | |
578 | for i = 0 , 1 , 0.3 do | |
579 | wait() | |
580 | RW.C0 = CFrame.new(0.5+1*i,0.5,-1+1*i) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(90), math.rad(0)) | |
581 | RW.C1 = CFrame.new(0,0.5,0) * CFrame.fromEulerAnglesXYZ(math.rad(-45+135*i), math.rad(10+35*i), math.rad(0)) | |
582 | end | |
583 | for i = 0 , 1 , 0.2 do | |
584 | wait() | |
585 | RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(90), math.rad(0)) | |
586 | RW.C1 = CFrame.new(0,0.5,0) * CFrame.fromEulerAnglesXYZ(math.rad(90+20*i), math.rad(45+5*i), math.rad(0)) | |
587 | end | |
588 | dmgdc() | |
589 | if mode=="normal" then | |
590 | wait(0.15) | |
591 | wait() | |
592 | for i = 0 , 1 , 0.1 do | |
593 | wait() | |
594 | RW.C0 = CFrame.new(1.5-0.5*i,0.5,-0.5*i) * CFrame.fromEulerAnglesXYZ(math.rad(90-10*i), math.rad(90-45*i), math.rad(-45*i)) | |
595 | RW.C1 = CFrame.new(0,0.5,0) * CFrame.fromEulerAnglesXYZ(math.rad(110-110*i), math.rad(50-50*i), math.rad(0)) | |
596 | end | |
597 | end | |
598 | attacking=false | |
599 | end | |
600 | function test(f) | |
601 | local a,b=coroutine.resume(coroutine.create(f)) | |
602 | if not a then | |
603 | local h=Instance.new("Hint",workspace) | |
604 | h.Text="LOCAL: "..b | |
605 | wait(10) | |
606 | h:remove() | |
607 | end | |
608 | end | |
609 | function slashanim2() | |
610 | test(function() | |
611 | RWFunc() | |
612 | LWFunc() | |
613 | if attacking==true then return end | |
614 | attacking=true | |
615 | for i=0,1,0.1 do | |
616 | wait() | |
617 | RW.C0 = CFrame.new(1.5,.5,0) * CFrame.Angles(0,0,math.rad(30*i)) | |
618 | LW.C0 = CFrame.new(-1.5,.5,0) * CFrame.Angles(0,0,math.rad(-30*i)) | |
619 | end | |
620 | fake=ghost() | |
621 | fake.Handle.Weldd.Part0=LAP | |
622 | fake.Handle.Weldd.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) | |
623 | fake.Handle.Weldd.C0 = CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(90), math.rad(90)) * CFrame.new(0, 0, 0.2) | |
624 | for i,d in pairs(fake:GetChildren()) do | |
625 | d.Transparency=0.5 | |
626 | d.BrickColor=BrickColor.new("Really black") | |
627 | end | |
628 | for i=0,1,0.1 do | |
629 | wait() | |
630 | RW.C0 = CFrame.new(1.5,.5,0) * CFrame.Angles(math.rad(0+120*i),0,math.rad(30)) | |
631 | LW.C0 = CFrame.new(-1.5,.5,0) * CFrame.Angles(math.rad(0+120*i),0,math.rad(-30)) | |
632 | end | |
633 | dmgcnnct(bladep1) | |
634 | dmgcnnct2(fake.BladePart1) | |
635 | for i=0,1,0.2 do | |
636 | wait() | |
637 | RW.C0 = CFrame.new(1.5,.5,0) * CFrame.Angles(math.rad(120 - 120*i),0,math.rad(30 - 30*i)) | |
638 | LW.C0 = CFrame.new(-1.5,.5,0) * CFrame.Angles(math.rad(120 - 120*i),0,math.rad(-30 - -30*i)) | |
639 | end | |
640 | dmgdc() | |
641 | dmgdc2() | |
642 | for i=0,1,0.1 do | |
643 | wait() | |
644 | RW.C0 = CFrame.new(1.5,.5,0) * CFrame.Angles(0,0,math.rad(0 + 90*i)) | |
645 | LW.C0 = CFrame.new(-1.5,.5,0) * CFrame.Angles(0,0,math.rad(-0 + -90*i)) | |
646 | end | |
647 | dmgcnnct(bladep1) | |
648 | dmgcnnct2(fake.BladePart1) | |
649 | for i=0,1,0.1 do | |
650 | wait() | |
651 | RW.C0 = CFrame.new(1.5,.5,0) * CFrame.Angles(0,math.rad(0 + 60*i),math.rad(90 + 0)) | |
652 | LW.C0 = CFrame.new(-1.5,.5,0) * CFrame.Angles(0,math.rad(-0 + -60*i),math.rad(-80 + -0)) | |
653 | end | |
654 | dmgdc() | |
655 | dmgdc2() | |
656 | for i=0,1,0.1 do | |
657 | wait() | |
658 | RW.C0 = CFrame.new(1.5,.5,0) * CFrame.Angles(0,math.rad(60 - 60*i),math.rad(90 + 0)) | |
659 | LW.C0 = CFrame.new(-1.5,.5,0) * CFrame.Angles(0,math.rad(-60 - -60*i),math.rad(-80 + -0)) | |
660 | end | |
661 | for i=0,1,0.1 do | |
662 | wait() | |
663 | RW.C0 = CFrame.new(1.5,.5,0) * CFrame.Angles(0,0,math.rad(90 - 90*i)) | |
664 | LW.C0 = CFrame.new(-1.5,.5,0) * CFrame.Angles(0,0,math.rad(-90 - -90*i)) | |
665 | end | |
666 | fake:Remove() | |
667 | LWRem() | |
668 | for i = 0 , 1 , 0.1 do | |
669 | wait() | |
670 | RW.C0 = CFrame.new(1.5-0.5,0.5,-0.5) * CFrame.fromEulerAnglesXYZ(math.rad(80*i), math.rad(35*i), math.rad(-35 + -10*i)) | |
671 | end | |
672 | attacking=false | |
673 | end) | |
674 | end | |
675 | function move3() | |
676 | RWFunc() | |
677 | LWFunc() | |
678 | if attacking==true then return end | |
679 | attacking=true | |
680 | fake2=ghost() | |
681 | fake2.Handle.Weldd.Part0=LAP | |
682 | fake2.Handle.Weldd.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) | |
683 | fake2.Handle.Weldd.C0 = CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(90), math.rad(90)) * CFrame.new(0, 0, 0.2) | |
684 | for i,d in pairs(fake2:GetChildren()) do | |
685 | d.Transparency=0.5 | |
686 | d.BrickColor=BrickColor.new("Really black") | |
687 | end | |
688 | for i=0,1,0.1 do | |
689 | wait() | |
690 | RW.C0 = CFrame.new(1.5,.5,0) * CFrame.Angles(math.rad(50+50*i),0,math.rad(40+43*i)) | |
691 | LW.C0 = CFrame.new(-1.5,.5,0) * CFrame.Angles(math.rad(50+50*i),0,math.rad(-40+-43*i)) | |
692 | wd1.C0 = CFrame.Angles(0,0,math.rad(90*i)) | |
693 | fake2.Handle.Weldd.C0 = CFrame.Angles(0,0,math.rad(90*i)) | |
694 | end | |
695 | dmgcnnct(bladep1) | |
696 | dmgcnnct2(fake2.BladePart1) | |
697 | local TorsCF = char.Torso.CFrame | |
698 | local bg = Instance.new("BodyGyro",char.Torso) | |
699 | bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge) | |
700 | bg.P = bg.p * 25 | |
701 | bg.cframe = TorsCF | |
702 | char.Humanoid.WalkSpeed=30 | |
703 | for i=0,50,0.2 do | |
704 | wait() | |
705 | bg.cframe = TorsCF * CFrame.Angles(0,math.rad(180+180*i),0) | |
706 | end | |
707 | char.Humanoid.WalkSpeed=20 | |
708 | game.Debris:AddItem(bg,0.02) | |
709 | dmgdc() | |
710 | dmgdc2() | |
711 | for i=0,1,0.1 do | |
712 | wait() | |
713 | RW.C0 = CFrame.new(1.5,.5,0) * CFrame.Angles(math.rad(100 - 0*i),0,math.rad(-83 + 83*i)) | |
714 | LW.C0 = CFrame.new(-1.5,.5,0) * CFrame.Angles(math.rad(100 - 0*i),0,math.rad(-83 + 83*i)) | |
715 | end | |
716 | fake2:Remove() | |
717 | LWRem() | |
718 | for i=0,1,0.1 do | |
719 | wait() | |
720 | wd1.C0 = CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(90*i), math.rad(90 + 0*i)) * CFrame.new(0, 0, 0.2) | |
721 | RW.C0 = CFrame.new(1.5-0.5,0.5,-0.5) * CFrame.fromEulerAnglesXYZ(math.rad(100 + -20*i), math.rad(35*i), math.rad(-35 + -10*i)) | |
722 | end | |
723 | attacking=false | |
724 | end | |
725 | function move4() | |
726 | RWFunc() | |
727 | LWFunc() | |
728 | if attacking==true then return end | |
729 | attacking=true | |
730 | for i=0,1,0.1 do | |
731 | wait() | |
732 | RW.C0=CFrame.new(1.5,.5,0) * CFrame.Angles(0,math.rad(10 + 5*i),math.rad(50+50*i)) | |
733 | LW.C0=CFrame.new(-1.5,.5,0) * CFrame.Angles(0,math.rad(80 + 0*i),math.rad(0+-50*i)) | |
734 | end | |
735 | for i=0,1,0.1 do | |
736 | wait() | |
737 | LW.C0=CFrame.new(-1.5,.5,0) * CFrame.Angles(0,math.rad(80 + 0*i),math.rad(-50 + 150*i)) | |
738 | end | |
739 | function Burn(Part) | |
740 | if Part.Anchored == true and Part.Name == "Base" then return end | |
741 | if Part:IsDescendantOf(char) then return end | |
742 | if Part.Name =="Fireball" then return end | |
743 | local Fire = Instance.new("Fire") | |
744 | Fire.Heat = 2 | |
745 | Fire.Size = 5 | |
746 | Fire.Parent = Part | |
747 | Part:BreakJoints() | |
748 | Part.BrickColor = BrickColor.new("Really black") | |
749 | wait(2) | |
750 | game.Debris:AddItem(Part,0.02) | |
751 | end | |
752 | function Ignite(Part) | |
753 | if Part.Anchored == true and Part.Name == "Base" then return end | |
754 | if Part:IsDescendantOf(char) then return end | |
755 | if Part:FindFirstChild("Fire") == nil then | |
756 | Part.Anchored = false | |
757 | local Fire = Instance.new("Fire") | |
758 | Fire.Heat = 2 | |
759 | Fire.Size = 5 | |
760 | Fire.Parent = Part | |
761 | Part:BreakJoints() | |
762 | Part.Touched:connect(function(Hit) Burn(Hit) end) | |
763 | Part.BrickColor = BrickColor.new("Really black") | |
764 | end | |
765 | end | |
766 | for i = 1, 150 do | |
767 | local Source = char.Torso | |
768 | local Fireball = Instance.new("Part", Workspace) | |
769 | Fireball.Name = "Fireball" | |
770 | Fireball.CanCollide = false | |
771 | Fireball.TopSurface = 0 | |
772 | Fireball.BottomSurface = 0 | |
773 | Fireball.FormFactor = "Custom" | |
774 | Fireball.Shape = "Ball" | |
775 | Fireball.Size = Vector3.new(5, 5, 5) | |
776 | Fireball.CFrame = Source.CFrame * CFrame.new(0, 0, -5) | |
777 | local Velocity = Instance.new("BodyVelocity") | |
778 | Velocity.maxForce = Vector3.new(math.huge, math.huge, math.huge) | |
779 | Velocity.velocity = (Source.CFrame.lookVector * 50) + Vector3.new(math.random(-25,25), math.random(-10,10), math.random(-10,10)) | |
780 | Velocity.Parent = Fireball | |
781 | Ignite(Fireball) | |
782 | Fireball.BrickColor = BrickColor.new("Really black") | |
783 | coroutine.wrap(function() wait(math.random(1, 9) / 10) for i = 0, 1, 0.1 do Fireball.Transparency = i wait() end Fireball.Fire.Enabled = false Fireball.Anchored = true wait(1) Fireball:Remove() end)() | |
784 | wait() | |
785 | end | |
786 | for i=0,1,0.1 do | |
787 | wait() | |
788 | RW.C0 = CFrame.new(1.5-0.5,0.5,-0.5) * CFrame.fromEulerAnglesXYZ(math.rad(15+15+50*i), math.rad(35*i), math.rad(100-140*i)) | |
789 | LW.C0=CFrame.new(-1.5,.5,0) * CFrame.Angles(0,math.rad(80 - 80*i),math.rad(100-100*i)) | |
790 | end | |
791 | LWRem() | |
792 | attacking=false | |
793 | end | |
794 | function move5() | |
795 | RWFunc() | |
796 | LWFunc() | |
797 | if attacking==true then return end | |
798 | attacking=true | |
799 | fake3=ghost() | |
800 | fake3.Handle.Weldd.Part0=LAP | |
801 | fake3.Handle.Weldd.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) | |
802 | fake3.Handle.Weldd.C0 = CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(90), math.rad(90)) * CFrame.new(0, 0, -0.2) | |
803 | for i,d in pairs(fake3:GetChildren()) do | |
804 | d.Transparency=0.5 | |
805 | d.BrickColor=BrickColor.new("Really black") | |
806 | end | |
807 | for i=0,1,0.1 do | |
808 | wait() | |
809 | RW.C0=CFrame.new(1.5,.5,0) * CFrame.Angles(0,math.rad(-50+-50*i),math.rad(30+30*i)) | |
810 | LW.C0=CFrame.new(-1.5,.5,0) * CFrame.Angles(0,math.rad(50+50*i),math.rad(-30+-30*i)) | |
811 | end | |
812 | f=0 | |
813 | powermod=Instance.new("Model",char) | |
814 | powermod.Name="PowerMode" | |
815 | for i=0,3,0.1 do | |
816 | f=f+1 | |
817 | wait() | |
818 | ball=Instance.new("Part",powermod) | |
819 | ball.formFactor="Custom" | |
820 | ball.Shape="Ball" | |
821 | ball.TopSurface="Smooth" | |
822 | ball.BottomSurface="Smooth" | |
823 | ball.BrickColor=BrickColor.new(chosen) | |
824 | ball.Transparency=0.5 | |
825 | ball.Anchored=true | |
826 | ball.CanCollide=false | |
827 | ball.Size=Vector3.new(f,f,f) | |
828 | ball.CFrame=char.Torso.CFrame | |
829 | end | |
830 | wait(.1) | |
831 | powermod:Remove() | |
832 | function Burn(Part) | |
833 | if Part.Anchored == true and Part.Name == "Base" then return end | |
834 | if Part:IsDescendantOf(char) then return end | |
835 | if Part.Name =="Fireball" then return end | |
836 | local Fire = Instance.new("Fire") | |
837 | Fire.Heat = 2 | |
838 | Fire.Size = 5 | |
839 | Fire.Parent = Part | |
840 | Part:BreakJoints() | |
841 | Part.BrickColor = BrickColor.new("Really black") | |
842 | wait(2) | |
843 | game.Debris:AddItem(Part,0.02) | |
844 | end | |
845 | function Ignite(Part) | |
846 | if Part.Anchored == true and Part.Name == "Base" then return end | |
847 | if Part:IsDescendantOf(char) then return end | |
848 | if Part:FindFirstChild("Fire") == nil then | |
849 | Part.Anchored = false | |
850 | local Fire = Instance.new("Fire") | |
851 | Fire.Heat = 100 | |
852 | Fire.Size = 100 | |
853 | Fire.Parent = Part | |
854 | Part:BreakJoints() | |
855 | Part.Touched:connect(function(Hit) Burn(Hit) end) | |
856 | Part.BrickColor = BrickColor.new("Really black") | |
857 | end | |
858 | end | |
859 | for i = 1, 250 do | |
860 | local Source = char.Torso | |
861 | local Fireball = Instance.new("Part", Workspace) | |
862 | Fireball.Name = "Fireball" | |
863 | Fireball.CanCollide = false | |
864 | Fireball.TopSurface = 0 | |
865 | Fireball.BottomSurface = 0 | |
866 | Fireball.FormFactor = "Custom" | |
867 | Fireball.Shape = "Ball" | |
868 | Fireball.Size = Vector3.new(50, 50, 50) | |
869 | Fireball.CFrame = Source.CFrame * CFrame.new(0, 0, -30) | |
870 | local Velocity = Instance.new("BodyVelocity") | |
871 | Velocity.maxForce = Vector3.new(math.huge, math.huge, math.huge) | |
872 | Velocity.velocity = (Source.CFrame.lookVector * 250) + Vector3.new(math.random(-2,2), math.random(-2,2), math.random(-2,2)) | |
873 | Velocity.Parent = Fireball | |
874 | Ignite(Fireball) | |
875 | Fireball.BrickColor = BrickColor.new("Really black") | |
876 | coroutine.wrap(function() wait(math.random(1, 9) / 10) for i = 0, 1, 0.1 do Fireball.Transparency = i wait() end Fireball.Fire.Enabled = false Fireball.Anchored = true wait(1) Fireball:Remove() end)() | |
877 | wait(0.02) | |
878 | end | |
879 | fake3:Remove() | |
880 | LWRem() | |
881 | attacking=false | |
882 | end | |
883 | function swordmode() | |
884 | RWFunc() | |
885 | char.Humanoid.WalkSpeed=20 | |
886 | bin.Name="Pheonix Sword" | |
887 | hitdeb=1 | |
888 | hitdeb=0 | |
889 | wd1.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0,0) | |
890 | wd1.C0 = CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(90), math.rad(90)) * CFrame.new(0, 0, 0.2) | |
891 | for i = 0 , 1 , 0.1 do | |
892 | wait() | |
893 | RW.C0 = CFrame.new(1.5-0.5*i,0.5,-0.5) * CFrame.fromEulerAnglesXYZ(math.rad(80), math.rad(35), math.rad(45-90*i)) | |
894 | end | |
895 | mode="normal" | |
896 | end --[[Filterd, May Error]]-- --[[Filterd, May Error]]-- | |
897 | local function WaitForChild(parent, child) | |
898 | while not parent:FindFirstChild(child) do parent.ChildAdded:wait() end | |
899 | return parent[child] | |
900 | end | |
901 | ||
902 | local Tool = script.Parent | |
903 | local Handle = WaitForChild(Tool, "Handle") | |
904 | local SkullFire = WaitForChild(Tool, "SkullFire") | |
905 | local sword = script.Parent.Handle | |
906 | ||
907 | local radius = 1 | |
908 | local angle = math.random()*math.pi*2 | |
909 | ||
910 | local NUM_SKULLS = 100 -- heh heh | |
911 | ||
912 | local StormEye = Instance.new("Part") | |
913 | StormEye.formFactor = "Custom" | |
914 | StormEye.Size = Vector3.new(3, 3, 3) | |
915 | StormEye.Transparency = 1 | |
916 | StormEye.CanCollide = false | |
917 | ||
918 | -- remove gravity from storm | |
919 | local newBF = Instance.new("BodyForce") | |
920 | local stormMass = (NUM_SKULLS+1)*.2*.2*.2 + 27 | |
921 | newBF.force = Vector3.new(0, stormMass*196.2, 0) | |
922 | newBF.Parent = StormEye | |
923 | ||
924 | local skullPart = Instance.new("Part") | |
925 | skullPart.formFactor = "Custom" | |
926 | skullPart.Size = Vector3.new(.2, .2, .2) | |
927 | skullPart.Transparency = 1 | |
928 | skullPart.BrickColor = BrickColor.new("Really black") | |
929 | skullPart.CanCollide = false | |
930 | skullPart.Reflectance = 0 | |
931 | SkullFire:Clone().Parent = skullPart | |
932 | ||
933 | local skullMotor = Instance.new("Motor6D") | |
934 | skullMotor.Part0 = StormEye -- Handle | |
935 | skullMotor.Part1 = skullPart | |
936 | skullMotor.MaxVelocity = .1 | |
937 | skullMotor.C0 = CFrame.Angles(math.pi/2, 0, 0) | |
938 | skullMotor.C1 = CFrame.Angles(math.pi/2, 0, 0) + radius*Vector3.new(math.sin(angle), 0, math.cos(angle)) | |
939 | ||
940 | local skullParts = {skullPart} | |
941 | local skullMotors = {skullMotor} | |
942 | ||
943 | local miniDebounce = false | |
944 | ||
945 | for i = 1, NUM_SKULLS do | |
946 | table.insert(skullParts, skullPart:Clone()) | |
947 | table.insert(skullMotors, skullMotor:Clone()) | |
948 | ||
949 | radius = math.sqrt(i) + 4 | |
950 | angle = math.random()*math.pi*2 | |
951 | skullMotors[i+1].Part1 = skullParts[i+1] | |
952 | skullMotors[i+1].C1 = CFrame.Angles(math.pi/2, 0, 0) + radius*Vector3.new(math.sin(angle), -math.sqrt(i)*2/radius, math.cos(angle)) | |
953 | skullMotors[i+1].Parent = skullParts[i+1] | |
954 | end | |
955 | ||
956 | ||
957 | local SlashSound = Instance.new("Sound") | |
958 | SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav" | |
959 | SlashSound.Parent = sword | |
960 | SlashSound.Volume = .7 | |
961 | ||
962 | local LungeSound = Instance.new("Sound") | |
963 | LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav" | |
964 | LungeSound.Parent = sword | |
965 | LungeSound.Volume = .6 | |
966 | ||
967 | local UnsheathSound = Instance.new("Sound") | |
968 | UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav" | |
969 | UnsheathSound.Parent = sword | |
970 | UnsheathSound.Volume = 1 | |
971 | ||
972 | local StormSound = Instance.new("Sound") | |
973 | StormSound.SoundId = "http://www.roblox.com/asset/?id=101173442" | |
974 | StormSound.Parent = sword | |
975 | StormSound.Volume = 1 | |
976 | ||
977 | function DarkKill(character, humanoid, attacker) | |
978 | ||
979 | if (character:FindFirstChild("ForceField") ~= nil) then return end | |
980 | ||
981 | local childs = character:GetChildren() | |
982 | ||
983 | local colors = {} | |
984 | ||
985 | tagHumanoid(humanoid, attacker) | |
986 | humanoid.Health = 0 | |
987 | ||
988 | for i=1,#childs do | |
989 | if (childs[i].className == "Part") then | |
990 | colors[i] = childs[i].BrickColor | |
991 | childs[i].BrickColor = BrickColor.new(26) | |
992 | childs[i].CanCollide = true | |
993 | childs[i].Anchored = true | |
994 | end | |
995 | end | |
996 | ||
997 | wait(.25) | |
998 | ||
999 | for i=1,#childs do | |
1000 | if (childs[i].className == "Part") then | |
1001 | local b = Instance.new("BodyVelocity") | |
1002 | b.velocity = Vector3.new(math.random() - .5, 0, math.random() - .5).unit * 80 | |
1003 | b.maxForce = Vector3.new(1e5,1e5,1e5) | |
1004 | b.Parent = childs[i] | |
1005 | end | |
1006 | end | |
1007 | ||
1008 | for i=1,#childs do | |
1009 | if (childs[i].className == "Part") then | |
1010 | childs[i].Anchored = false | |
1011 | end | |
1012 | end | |
1013 | ||
1014 | ||
1015 | ||
1016 | ||
1017 | ||
1018 | ||
1019 | ||
1020 | ||
1021 | end | |
1022 | ||
1023 | ||
1024 | ||
1025 | ||
1026 | local staffSpin = WaitForChild(Tool, "staffspin") | |
1027 | local spinSwing = nil | |
1028 | ||
1029 | local newBodyPosition = Instance.new("BodyPosition") | |
1030 | newBodyPosition.P = 100000 | |
1031 | newBodyPosition.maxForce = Vector3.new(1, 1, 1)*newBodyPosition.P | |
1032 | newBodyPosition.Parent = StormEye | |
1033 | ||
1034 | local spinForce = Instance.new("BodyAngularVelocity") | |
1035 | spinForce.P = 1000000 | |
1036 | spinForce.angularvelocity = Vector3.new(0,20,0) | |
1037 | spinForce.maxTorque = Vector3.new(spinForce.P,spinForce.P,spinForce.P) | |
1038 | ||
1039 | local stayUpright = Instance.new("BodyGyro") | |
1040 | stayUpright.P = 1000000 | |
1041 | stayUpright.maxTorque = Vector3.new(1, 0, 1) * stayUpright.P | |
1042 | stayUpright.cframe = CFrame.new() | |
1043 | ||
1044 | local damage = 20 | |
1045 | slash_damage = 18 | |
1046 | lunge_damage = 36 | |
1047 | ||
1048 | function blow(hit, damageToTake) | |
1049 | local hitParent = hit.Parent | |
1050 | if not hitParent then return end | |
1051 | ||
1052 | local humanoid = hitParent:findFirstChild("Humanoid") | |
1053 | local vCharacter = Tool.Parent | |
1054 | local vPlayer = game.Players:playerFromCharacter(vCharacter) | |
1055 | local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character | |
1056 | if humanoid~=nil and humanoid ~= hum and hum ~= nil then | |
1057 | -- final check, make sure sword is in-hand | |
1058 | ||
1059 | local right_arm = vCharacter:FindFirstChild("Right Arm") | |
1060 | if (right_arm ~= nil) then | |
1061 | local joint = right_arm:FindFirstChild("RightGrip") | |
1062 | if (joint ~= nil and (joint.Part0 == Handle or joint.Part1 == Handle)) then | |
1063 | hum.Health = hum.Health + (damage * .4) | |
1064 | if humanoid.Health > damage then | |
1065 | tagHumanoid(humanoid, vPlayer) | |
1066 | humanoid:TakeDamage(damage) | |
1067 | else | |
1068 | DarkKill(humanoid.Parent, humanoid, vPlayer) | |
1069 | end | |
1070 | end | |
1071 | end | |
1072 | ||
1073 | ||
1074 | end | |
1075 | end | |
1076 | ||
1077 | for i = 1, #skullParts do | |
1078 | skullParts[i].Touched:connect(function(hitPart) blow(hitPart, 25) end) | |
1079 | end | |
1080 | ||
1081 | local debounce = false | |
1082 | local spinCount = 0 | |
1083 | ||
1084 | local spinDebounce = false | |
1085 | ||
1086 | function onSpin() | |
1087 | if debounce or spinDebounce then return end | |
1088 | local Torso = Tool.Parent:FindFirstChild("Torso") | |
1089 | if not Torso then return end | |
1090 | spinDebounce = true | |
1091 | spinCount = spinCount + 1 | |
1092 | ||
1093 | if spinCount > 3 then | |
1094 | onWhirlwind() | |
1095 | spinCount = 0 | |
1096 | else | |
1097 | delay(3, function() spinCount = spinCount - 1 end) | |
1098 | ||
1099 | spinForce.Parent = Torso | |
1100 | stayUpright.Parent = Torso | |
1101 | spinSwing:Play() | |
1102 | wait(.5) | |
1103 | spinForce.Parent = nil | |
1104 | stayUpright.Parent = nil | |
1105 | end | |
1106 | spinDebounce = false | |
1107 | end | |
1108 | ||
1109 | function onWhirlwind() | |
1110 | if not Tool.Parent then return end | |
1111 | local Torso = Tool.Parent:FindFirstChild("Torso") | |
1112 | local Humanoid = Tool.Parent:FindFirstChild("Humanoid") | |
1113 | if debounce or not Torso or not Humanoid then return end | |
1114 | debounce = true | |
1115 | ||
1116 | spinForce.Parent = Torso | |
1117 | stayUpright.Parent = Torso | |
1118 | ||
1119 | StormSound:Play() | |
1120 | ||
1121 | for i = 1, #skullParts do | |
1122 | skullParts[i].Parent = StormEye | |
1123 | skullMotors[i].Parent = skullParts[i] | |
1124 | if math.random() > .5 then | |
1125 | skullMotors[i].DesiredAngle = skullMotors[i].CurrentAngle + 5000 | |
1126 | else | |
1127 | skullMotors[i].DesiredAngle = skullMotors[i].CurrentAngle - 5000 | |
1128 | end | |
1129 | skullMotors[i].MaxVelocity = .05+math.random()*.15 | |
1130 | end | |
1131 | ||
1132 | StormEye.CFrame = CFrame.new(Torso.CFrame.p) | |
1133 | --StormEye.Velocity = Torso.CFrame.lookVector * 25 | |
1134 | ||
1135 | newBodyPosition.position = Torso.CFrame.p - Vector3.new(0, 3, 0) | |
1136 | local timeWaited | |
1137 | ||
1138 | Humanoid.WalkSpeed = 8 | |
1139 | ||
1140 | delay(0, function() while skullMotors[1].Parent do timeWaited = wait(.01) Humanoid.WalkSpeed = Humanoid.WalkSpeed + timeWaited * 7 newBodyPosition.position = Torso.CFrame.p - Vector3.new(0, 3, 0) end Humanoid.WalkSpeed = 16 end) | |
1141 | ||
1142 | StormEye.Parent = workspace | |
1143 | for i = 1, 5 do wait(1) spinSwing:Play() end | |
1144 | ||
1145 | spinForce.Parent = nil | |
1146 | stayUpright.Parent = nil | |
1147 | ||
1148 | for i = 1, #skullMotors do | |
1149 | skullMotors[i].Parent = nil | |
1150 | skullParts[i].Velocity = 40*(skullParts[i].CFrame.p - Torso.CFrame.p).unit | |
1151 | end | |
1152 | ||
1153 | for i = 0, 30 do | |
1154 | end | |
1155 | StormEye.Parent = nil | |
1156 | ||
1157 | wait(3) | |
1158 | for i = 1, #skullMotors do | |
1159 | skullMotors[i].Parent = skullParts[i] | |
1160 | end | |
1161 | ||
1162 | debounce = false | |
1163 | end | |
1164 | ||
1165 | local leftSword = Handle:Clone() | |
1166 | leftSword.CanCollide = false | |
1167 | ||
1168 | local leftSwordWeld = Instance.new("ManualWeld") | |
1169 | leftSwordWeld.Part1 = leftSword | |
1170 | leftSwordWeld.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, -0) | |
1171 | leftSwordWeld.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0) | |
1172 | ||
1173 | local NewAnimateScript = WaitForChild(Tool, "NewAnimate") | |
1174 | ||
1175 | local Character = nil | |
1176 | ||
1177 | function swordUp() | |
1178 | Tool.GripForward = Vector3.new(-1,0,0) | |
1179 | Tool.GripRight = Vector3.new(0,1,0) | |
1180 | Tool.GripUp = Vector3.new(0,0,1) | |
1181 | ||
1182 | leftSwordWeld.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, -0) | |
1183 | leftSwordWeld.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0) | |
1184 | end | |
1185 | ||
1186 | function swordOut() | |
1187 | Tool.GripForward = Vector3.new(0,0,1) | |
1188 | Tool.GripRight = Vector3.new(0,-1,0) | |
1189 | Tool.GripUp = Vector3.new(-1,0,0) | |
1190 | ||
1191 | leftSwordWeld.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, -0) | |
1192 | leftSwordWeld.C1 = CFrame.new(0, 0, -1.5, 0, -1, -0, -1, 0, -0, 0, 0, -1) | |
1193 | end | |
1194 | ||
1195 | local Mouse = nil | |
1196 | ||
1197 | function onKeyDown(key) | |
1198 | if key == "z" or key == "Z" then | |
1199 | if miniDebounce then | |
1200 | onSpin() | |
1201 | end | |
1202 | end | |
1203 | end | |
1204 | ||
1205 | function onEquipped(mouse) | |
1206 | if mouse then | |
1207 | Mouse = mouse | |
1208 | Mouse.KeyDown:connect(onKeyDown) | |
1209 | end | |
1210 | ||
1211 | Character = Tool.Parent | |
1212 | if not Character then return end | |
1213 | ||
1214 | local Humanoid = Character:FindFirstChild("Humanoid") | |
1215 | if not Humanoid then return end | |
1216 | ||
1217 | spinSwing = Humanoid:LoadAnimation(staffSpin) | |
1218 | ||
1219 | local oldAnimateScript = Character:FindFirstChild("Animate") | |
1220 | if oldAnimateScript then oldAnimateScript.Disabled = true end | |
1221 | ||
1222 | NewAnimateScript.Parent = Character | |
1223 | NewAnimateScript.Disabled = false | |
1224 | ||
1225 | UnsheathSound:Play() | |
1226 | ||
1227 | local LeftArm = Character:FindFirstChild("Left Arm") | |
1228 | leftSwordWeld.Part0 = LeftArm | |
1229 | leftSword.Parent = Character | |
1230 | leftSwordWeld.Parent = leftSword | |
1231 | end | |
1232 | ||
1233 | function onUnequipped() | |
1234 | leftSwordWeld.Parent = nil | |
1235 | leftSword.Parent = nil | |
1236 | ||
1237 | NewAnimateScript.Disabled = true | |
1238 | NewAnimateScript.Parent = Tool | |
1239 | ||
1240 | local oldAnimateScript = Character:FindFirstChild("Animate") | |
1241 | if oldAnimateScript then oldAnimateScript.Disabled = false end | |
1242 | end | |
1243 | ||
1244 | function tagHumanoid(humanoid, player) | |
1245 | local creator_tag = Instance.new("ObjectValue") | |
1246 | creator_tag.Value = player | |
1247 | creator_tag.Name = "creator" | |
1248 | creator_tag.Parent = humanoid | |
1249 | game.Debris:AddItem(creator_tag, 1) | |
1250 | end | |
1251 | ||
1252 | function attack() | |
1253 | damage = slash_damage | |
1254 | SlashSound:play() | |
1255 | local anim = Instance.new("StringValue") | |
1256 | anim.Name = "toolanim" | |
1257 | anim.Value = "Slash" | |
1258 | anim.Parent = Tool | |
1259 | end | |
1260 | ||
1261 | function lunge() | |
1262 | if miniDebounce then return end | |
1263 | miniDebounce = true | |
1264 | ||
1265 | LungeSound:Play() | |
1266 | ||
1267 | damage = lunge_damage | |
1268 | ||
1269 | local newAttack = Instance.new("StringValue") | |
1270 | newAttack.Name = "toolanim" | |
1271 | newAttack.Value = "Lunge" | |
1272 | newAttack.Parent = Tool | |
1273 | ||
1274 | local force = Instance.new("BodyVelocity") | |
1275 | force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80 | |
1276 | force.Parent = Tool.Parent.Torso | |
1277 | wait(.25) | |
1278 | swordOut() | |
1279 | wait(.25) | |
1280 | force.Parent = nil | |
1281 | wait(.5) | |
1282 | swordUp() | |
1283 | ||
1284 | damage = slash_damage | |
1285 | ||
1286 | miniDebounce = false | |
1287 | end | |
1288 | ||
1289 | local r = game:GetService("RunService") | |
1290 | ||
1291 | Tool.Enabled = true | |
1292 | local last_attack = 0 | |
1293 | function onActivated() | |
1294 | ||
1295 | if not Tool.Enabled then | |
1296 | return | |
1297 | end | |
1298 | ||
1299 | Tool.Enabled = false | |
1300 | ||
1301 | local humanoid = Character:FindFirstChild("Humanoid") | |
1302 | if humanoid == nil then | |
1303 | print("Humanoid not found") | |
1304 | return | |
1305 | end | |
1306 | ||
1307 | local t = r.Stepped:wait() | |
1308 | ||
1309 | if (t - last_attack < .2) then | |
1310 | lunge() | |
1311 | else | |
1312 | attack() | |
1313 | end | |
1314 | ||
1315 | last_attack = t | |
1316 | ||
1317 | Tool.Enabled = true | |
1318 | end | |
1319 | ||
1320 | Handle.Touched:connect(function(hitPart) blow(hitPart, damage) end) | |
1321 | leftSword.Touched:connect(function(hitPart) blow(hitPart, damage) end) | |
1322 | ||
1323 | Tool.Activated:connect(onActivated) | |
1324 | Tool.Equipped:connect(onEquipped) | |
1325 | Tool.Unequipped:connect(onUnequipped) |