SHOW:
|
|
- or go back to the newest paste.
1 | ---DuelBlade--- | |
2 | Players = game:GetService("Players") | |
3 | ||
4 | - | me = Players['lifeepic'] |
4 | + | me = Players['drew11pogi'] |
5 | char = me.Character | |
6 | ||
7 | Toolname = "Tanto" | |
8 | Modelname = "Tanto" | |
9 | ||
10 | selected = false | |
11 | effect = false | |
12 | hurt = false | |
13 | debounce = true | |
14 | able = true | |
15 | charge = false | |
16 | soundable = true | |
17 | cancharge = true | |
18 | cam = game.Workspace.CurrentCamera | |
19 | ||
20 | surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"} | |
21 | ||
22 | New = { | |
23 | Gyro = function(P) | |
24 | local bg = Instance.new("BodyGyro", P) | |
25 | bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge) | |
26 | bg.P = 14000 | |
27 | return bg | |
28 | end, | |
29 | Position = function(P) | |
30 | local bp = Instance.new("BodyPosition", P) | |
31 | bp.maxForce = Vector3.new(math.huge, 0, math.huge) | |
32 | bp.P = 14000 | |
33 | return bp | |
34 | end, | |
35 | Force = function(P) | |
36 | local bf = Instance.new("BodyForce", P) | |
37 | bf.force = Vector3.new(0, P:GetMass()*187, 0) | |
38 | return bf | |
39 | end, | |
40 | Sound = function(P, ID, vol, pitch) | |
41 | local s = Instance.new("Sound") | |
42 | s.SoundId = ID | |
43 | s.Volume = vol | |
44 | s.Pitch = pitch | |
45 | s.Parent = P | |
46 | return s | |
47 | end | |
48 | } | |
49 | ||
50 | torso = char.Torso | |
51 | neck = torso.Neck | |
52 | human = char.Humanoid | |
53 | Rarm = char["Right Arm"] | |
54 | Larm = char["Left Arm"] | |
55 | Rleg = char["Right Leg"] | |
56 | Lleg = char["Left Leg"] | |
57 | ||
58 | Sounds = { | |
59 | slash = "rbxasset://sounds//swordslash.wav", | |
60 | unsheath = "rbxasset://sounds//unsheath.wav", | |
61 | hitsound = "http://www.roblox.com/asset/?id=2801263", --0.5 | |
62 | charge = "http://www.roblox.com/asset/?id=2101137", --0.5 | |
63 | boom = "http://www.roblox.com/asset/?id=2691586", --0.3 | |
64 | bewm = "http://www.roblox.com/asset/?id=2760979", --0.3 | |
65 | splat = "http://roblox.com/asset/?id=10209590" | |
66 | } | |
67 | ||
68 | function EnableSound(time) | |
69 | coroutine.resume(coroutine.create(function() | |
70 | wait(time) | |
71 | soundable = true | |
72 | end)) | |
73 | end | |
74 | ||
75 | function PlaySound(soundname, pitch) | |
76 | if soundable then | |
77 | soundable = false | |
78 | local s = New.Sound(torso, Sounds[soundname], 0.5, pitch) | |
79 | s.PlayOnRemove = true | |
80 | if pitch < 0 then | |
81 | coroutine.resume(coroutine.create(function() | |
82 | s.Looped = true | |
83 | s.PlayOnRemove = false | |
84 | wait() | |
85 | s:Play() | |
86 | wait(.2) | |
87 | s.Looped = false | |
88 | wait() | |
89 | s:remove() | |
90 | end)) | |
91 | else | |
92 | coroutine.resume(coroutine.create(function() | |
93 | wait() | |
94 | s:remove() | |
95 | s.Looped=false | |
96 | end)) | |
97 | end | |
98 | EnableSound(0.12) | |
99 | return s | |
100 | end | |
101 | end | |
102 | ||
103 | function Weld(p0, p1, x, y, z, a, b, c) | |
104 | local w = Instance.new("Weld") | |
105 | w.Parent = p0 | |
106 | w.Part0 = p0 | |
107 | w.Part1 = p1 | |
108 | w.C1 = CFrame.new(x, y, z) * CFrame.Angles(a, b, c) | |
109 | return w | |
110 | end | |
111 | ||
112 | function Part(parent, anchor, collide, tran, ref, color, x, y, z, Break, lifetime) | |
113 | local p = Instance.new("Part") | |
114 | p.formFactor = "Custom" | |
115 | p.Anchored = anchor | |
116 | p.CanCollide = collide | |
117 | p.Transparency = tran | |
118 | p.Reflectance = ref | |
119 | p.BrickColor = BrickColor.new(color) | |
120 | for _, Surf in pairs(surfaces) do | |
121 | p[Surf] = "Smooth" | |
122 | end | |
123 | p.Size = Vector3.new(x, y, z) | |
124 | if Break then | |
125 | p:BreakJoints() | |
126 | else | |
127 | p:MakeJoints() | |
128 | end | |
129 | p.Parent = parent | |
130 | p.Locked = true | |
131 | if lifetime then | |
132 | game:GetService("Debris"):AddItem(p, lifetime) | |
133 | end | |
134 | return p | |
135 | end | |
136 | ||
137 | function getHum(c) | |
138 | local h = nil | |
139 | for i,v in pairs(c:GetChildren()) do | |
140 | if v:IsA("Humanoid") and c ~= char then | |
141 | if v.Health > 0 then | |
142 | h = v | |
143 | end | |
144 | end | |
145 | end | |
146 | return h | |
147 | end | |
148 | ||
149 | for i, v in pairs(char:children()) do | |
150 | if v.Name == Modelname then | |
151 | v:remove() | |
152 | end | |
153 | end | |
154 | ||
155 | for i, v in pairs(me.Backpack:GetChildren()) do | |
156 | if v.Name == Toolname then | |
157 | v:remove() | |
158 | end | |
159 | end | |
160 | ||
161 | Mo = Instance.new("Model") | |
162 | Mo.Name = Modelname | |
163 | ||
164 | RABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
165 | LABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
166 | RLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
167 | LLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
168 | gripBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
169 | Weld(Rarm, gripBrick, 0, 1, 0, 0, 0, 0) | |
170 | ||
171 | RABrick2 = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
172 | LABrick2 = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
173 | RLBrick2 = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
174 | LLBrick2 = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
175 | gripBrick2 = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
176 | Weld(Larm, gripBrick2, 0, 1, 0, 0, 0, 0) | |
177 | ||
178 | RABW = Weld(torso, RABrick, -1.5, -0.5, 0, 0, 0, 0) | |
179 | LABW = Weld(torso, LABrick, 1.5, -0.5, 0, 0, 0, 0) | |
180 | RLBW = Weld(torso, RLBrick, -0.5, 1.2, 0, 0, 0, 0) | |
181 | LLBW = Weld(torso, LLBrick, 0.5, 1.2, 0, 0, 0, 0) | |
182 | ||
183 | RABWD = Weld(torso, RABrick2, -1.5, -0.5, 0, 0, 0, 0) | |
184 | LABWD = Weld(torso, LABrick2, 1.5, -0.5, 0, 0, 0, 0) | |
185 | RLBWD = Weld(torso, RLBrick2, -0.5, 1.2, 0, 0, 0, 0) | |
186 | LLBWD = Weld(torso, LLBrick2, 0.5, 1.2, 0, 0, 0, 0) | |
187 | ||
188 | TH = Weld(Rleg, nil, -0.6, 0, 0, math.pi/6, 0, 0) | |
189 | TH2 = Weld(Lleg, nil, 0.6, 0, 0, math.pi/6, 0, 0) | |
190 | ||
191 | RABW2 = Weld(RABrick, nil, 0, 0.5, 0, 0, 0, 0) | |
192 | LABW2 = Weld(LABrick, nil, 0, 0.5, 0, 0, 0, 0) | |
193 | RLBW2 = Weld(RLBrick, nil, 0, 0.77, 0, 0, 0, 0) | |
194 | LLBW2 = Weld(LLBrick, nil, 0, 0.77, 0, 0, 0, 0) | |
195 | ||
196 | RABWD2 = Weld(RABrick2, nil, 0, 0.5, 0, 0, 0, 0) | |
197 | LABWD2 = Weld(LABrick2, nil, 0, 0.5, 0, 0, 0, 0) | |
198 | RLBWD2 = Weld(RLBrick2, nil, 0, 0.77, 0, 0, 0, 0) | |
199 | LLBWD2 = Weld(LLBrick2, nil, 0, 0.77, 0, 0, 0, 0) | |
200 | ||
201 | handle = Part(Mo, false, false, 0, 0, "Really black", 0.2, 0.6, 0.3, true) | |
202 | handle.Name = "Handle" | |
203 | Instance.new("BlockMesh", handle).Scale = Vector3.new(0.8, 1, 0.8) | |
204 | ||
205 | handle2 = Part(Mo, false, false, 0, 0, "Really black", 0.2, 0.6, 0.3, true) | |
206 | handle2.Name = "Handle2" | |
207 | Instance.new("BlockMesh", handle2).Scale = Vector3.new(0.8, 1, 0.8) | |
208 | ||
209 | guard = Part(Mo, false, false, 0, 0, "Really black", 0.35, 0.2, 0.45, true) | |
210 | guard.Name = "Guard" | |
211 | Instance.new("BlockMesh", guard).Scale = Vector3.new(0.8, 0.5, 0.8) | |
212 | ||
213 | guard2 = Part(Mo, false, false, 0, 0, "Really black", 0.35, 0.2, 0.45, true) | |
214 | guard2.Name = "Guard2" | |
215 | Instance.new("BlockMesh", guard2).Scale = Vector3.new(0.8, 0.5, 0.8) | |
216 | ||
217 | blade = Part(Mo, false, false, 0, 0.1, "Royal purple", 0.2, 4.15, 0.3, true) | |
218 | blade.Name = "Blade" | |
219 | Instance.new("BlockMesh", blade).Scale = Vector3.new(0.1, 1, 0.8) | |
220 | ||
221 | blade2 = Part(Mo, false, false, 0, 0.1, "Royal purple", 0.2, 4.15, 0.3, true) | |
222 | blade2.Name = "Blade2" | |
223 | Instance.new("BlockMesh", blade2).Scale = Vector3.new(0.1, 1, 0.8) | |
224 | ||
225 | bladetip = Part(Mo, false, false, 0, 0.1, "Royal purple", 0.2, 0.3, 0.3, true) | |
226 | bladetip.Name = "Tip" | |
227 | bladetipmesh = Instance.new("SpecialMesh", bladetip) | |
228 | bladetipmesh.MeshType = "Wedge" | |
229 | bladetipmesh.Scale = Vector3.new(0.1, 1, 0.8) | |
230 | ||
231 | bladetip2 = Part(Mo, false, false, 0, 0.1, "Royal purple", 0.2, 0.3, 0.3, true) | |
232 | bladetip2.Name = "Tip2" | |
233 | bladetipmesh2 = Instance.new("SpecialMesh", bladetip2) | |
234 | bladetipmesh2.MeshType = "Wedge" | |
235 | bladetipmesh2.Scale = Vector3.new(0.1, 1, 0.8) | |
236 | ||
237 | sheath = Part(Mo, false, false, 0, 0, "Really black", 0.3, 4, 0.4, true) | |
238 | sheath.Name = "Sheath" | |
239 | Instance.new("BlockMesh", sheath) | |
240 | ||
241 | sheath2 = Part(Mo, false, false, 0, 0, "Really black", 0.3, 4, 0.4, true) | |
242 | sheath2.Name = "Sheath2" | |
243 | Instance.new("BlockMesh", sheath2) | |
244 | ||
245 | sheathweld = Weld(sheath, blade, 0, 0.23, 0, math.pi, 0, 0) | |
246 | grip = Weld(gripBrick, nil, 0, 0, 0, -math.pi/2, 0, 0) | |
247 | Weld(handle, guard, 0, -0.4, 0, 0, 0, 0) | |
248 | Weld(guard, blade, 0, -1.8, 0, 0, 0, 0) | |
249 | Weld(blade, bladetip, 0, -2.2, 0, 0, 0, 0) | |
250 | ||
251 | ||
252 | sheathweld2 = Weld(sheath2, blade2, 0, 0.23, 0, math.pi, 0, 0) | |
253 | grip2 = Weld(gripBrick2, nil, 0, 0, 0, -math.pi/2, 0, 0) | |
254 | Weld(handle2, guard2, 0, -0.4, 0, 0, 0, 0) | |
255 | Weld(guard2, blade2, 0, -1.8, 0, 0, 0, 0) | |
256 | Weld(blade2, bladetip2, 0, -2.2, 0, 0, 0, 0) | |
257 | ||
258 | Mo.Parent = char | |
259 | TH.Part1 = sheath | |
260 | TH2.Part1 = sheath2 | |
261 | ||
262 | if not script.Parent:IsA("HopperBin") then | |
263 | bin = Instance.new("HopperBin", me.Backpack) | |
264 | bin.Name = Toolname | |
265 | script.Parent = bin | |
266 | end | |
267 | ||
268 | function dmg(hum, dm1, dm2) | |
269 | local dmg = math.random(dm1, dm2) | |
270 | local ko = Instance.new("ObjectValue", hum) | |
271 | ko.Name = "creator" | |
272 | ko.Value = me | |
273 | hum.Health = hum.Health - dmg | |
274 | coroutine.resume(coroutine.create(function() | |
275 | wait() | |
276 | ko:remove() | |
277 | end)) | |
278 | for i = 0, dmg/5 do | |
279 | local blood = Part(workspace, false, false, 0, 0, "Really red", 0.2, 0.2, 0.2, true) | |
280 | blood.CFrame = hum.Parent.Torso.CFrame | |
281 | blood.RotVelocity = Vector3.new(math.random(-10,10), math.random(-10,10), math.random(-10,10)) | |
282 | blood.Velocity = Vector3.new(math.random(-20,20), math.random(5,20), math.random(-20,20)) | |
283 | --Instance.new("SpecialMesh", blood).MeshType = "Sphere" | |
284 | coroutine.resume(coroutine.create(function() | |
285 | for i = 0, 3, 0.1 do | |
286 | --blood.SpecialMesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i) | |
287 | blood.Transparency = i / 3 | |
288 | wait() | |
289 | end | |
290 | end)) | |
291 | end | |
292 | return dmg | |
293 | end | |
294 | ||
295 | function infect(hit) | |
296 | for i,v in pairs(hit.Parent:GetChildren()) do | |
297 | if v:IsA("Humanoid") then | |
298 | if v:FindFirstChild("poison") == nil then | |
299 | Instance.new("BoolValue",v).Name = "poison" | |
300 | ||
301 | coroutine.resume(coroutine.create(function() | |
302 | for i = 1,30 do | |
303 | wait() | |
304 | v.Health = v.Health - 1 | |
305 | ||
306 | local c = p1:Clone() | |
307 | c.Parent = m | |
308 | c.Size = Vector3.new(0.5,0.5,0.5) | |
309 | c.CFrame = v.Torso.CFrame + Vector3.new(math.random(-3,3),math.random(-3,3),math.random(-3,3)) | |
310 | c.Anchored = true | |
311 | c.Transparency = 0.5 | |
312 | c.Color = Color3.new(0,0.3,0) | |
313 | ||
314 | delay(0.1,function() | |
315 | for i = 0.5,1,0.05 do | |
316 | wait() | |
317 | c.Transparency = i | |
318 | end | |
319 | c:Remove() | |
320 | end) | |
321 | ||
322 | end | |
323 | v:FindFirstChild("poison"):Remove() | |
324 | end)) | |
325 | ||
326 | end | |
327 | end | |
328 | end | |
329 | end | |
330 | ||
331 | function unsheath() | |
332 | PlaySound("unsheath", 2) | |
333 | coroutine.resume(coroutine.create(function() | |
334 | for i = 0, 0, 0 do | |
335 | RABW2.C1 = CFrame.new(0, 0.5, math.sin(i/29)/6) * CFrame.Angles(-math.rad(i), 0, 0) | |
336 | RABWD2.C1 = CFrame.new(3, 0.5, math.sin(i/29)/6) * CFrame.Angles(-math.rad(i), 0, 0) | |
337 | wait() | |
338 | end | |
339 | wait() | |
340 | RABW2.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(-math.rad(90), 0, 0) | |
341 | RABWD2.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(-math.rad(90), 0, 0) | |
342 | end)) | |
343 | coroutine.resume(coroutine.create(function() | |
344 | wait() | |
345 | wait() | |
346 | for i = 0, 180, 30 do | |
347 | for _, v in pairs(game.Workspace:GetChildren()) do | |
348 | if getHum(v)~=nil then | |
349 | if v:findFirstChild("Torso")~=nil then | |
350 | if (v.Torso.Position - blade.Position).magnitude < 2 and | |
351 | (v.Torso.Position - blade2.Position).magnitude < 2 then | |
352 | local hum = getHum(v) | |
353 | dmg(hum, 4, 6) | |
354 | infect(hum) | |
355 | PlaySound("splat", 1.2) | |
356 | end | |
357 | end | |
358 | end | |
359 | end | |
360 | wait() | |
361 | end | |
362 | end)) | |
363 | wait() | |
364 | wait() | |
365 | sheathweld.Part1 = nil | |
366 | sheathweld2.Part1 = nil | |
367 | grip.Part1 = handle | |
368 | grip2.Part1 = handle2 | |
369 | for i = 0, -10, -35 do | |
370 | wait() | |
371 | grip.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), 0, 0) --(math.sin(i/59)/6) | |
372 | grip2.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), 0, 0) --(math.sin(i/59)/6) | |
373 | end | |
374 | end | |
375 | ||
376 | function sheath() | |
377 | PlaySound("unsheath", -2) | |
378 | coroutine.resume(coroutine.create(function() | |
379 | for i = 90, 0, -15 do | |
380 | RABW2.C1 = CFrame.new(0, 0.5, math.sin(i/29)/6) * CFrame.Angles(-math.rad(i), 0, 0) | |
381 | RABWD2.C1 = CFrame.new(0, 0.5, math.sin(i/29)/6) * CFrame.Angles(-math.rad(i), 0, 0) | |
382 | wait() | |
383 | end | |
384 | end)) | |
385 | coroutine.resume(coroutine.create(function() | |
386 | for i = -180, 0, 30 do | |
387 | grip.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), 0, 0) --(math.sin(i/59)/6) | |
388 | grip2.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), 0, 0) --(math.sin(i/59)/6) | |
389 | wait() | |
390 | end | |
391 | end)) | |
392 | coroutine.resume(coroutine.create(function() | |
393 | wait() | |
394 | wait() | |
395 | for i = 0, 180, 30 do | |
396 | for _, v in pairs(game.Workspace:GetChildren()) do | |
397 | if getHum(v)~=nil then | |
398 | if v:findFirstChild("Torso")~=nil then | |
399 | if (v.Torso.Position - blade.Position).magnitude < 2 and | |
400 | (v.Torso.Position - blade2.Position).magnitude < 2 then | |
401 | local hum = getHum(v) | |
402 | dmg(hum, 3, 5) | |
403 | infect(hum) | |
404 | PlaySound("splat", 1.2) | |
405 | end | |
406 | end | |
407 | end | |
408 | end | |
409 | wait() | |
410 | end | |
411 | end)) | |
412 | for i = 90, 30, -15 do | |
413 | wait() | |
414 | end | |
415 | grip.Part1 = nil | |
416 | sheathweld.Part1 = blade | |
417 | grip2.Part1 = nil | |
418 | sheathweld2.Part1 = blade2 | |
419 | end | |
420 | ||
421 | function freeze(m) | |
422 | local trg = m.Target | |
423 | if (trg==nil) then return end | |
424 | local phit = game.Players:findFirstChild(trg.Parent.Name) | |
425 | if (phit~=nil) then | |
426 | if (phit==p) then return end | |
427 | local char = trg.Parent | |
428 | if (char:findFirstChild("Torso")==nil) then return end | |
429 | if (char:findFirstChild("fr_block")==nil) then | |
430 | local pa = Instance.new("Part") | |
431 | local bl = Instance.new("BlockMesh") | |
432 | bl.Parent = pa | |
433 | pa.Anchored = true | |
434 | pa.Name = "fr_block" | |
435 | pa.Transparency = 1 | |
436 | pa.BrickColor = BrickColor.New("Cyan") | |
437 | pa.FormFactor = "Custom" | |
438 | pa.Size = Vector3.new(6,7,6) | |
439 | pa.CFrame = char["Torso"].CFrame | |
440 | pa.Parent = char | |
441 | char.Humanoid.WalkSpeed = 0 | |
442 | if (char.Humanoid.Health<char.Humanoid.MaxHealth/4) then | |
443 | char.Humanoid.Health = 0 | |
444 | else | |
445 | char.Humanoid.Health = char.Humanoid.Health - char.Humanoid.MaxHealth/4 | |
446 | end | |
447 | local g = char:GetChildren() | |
448 | for i = 1,#g do | |
449 | if (g[i]:IsA("Part")) then | |
450 | g[i].Anchored = true | |
451 | g[i].Reflectance = .3 | |
452 | end | |
453 | end | |
454 | for i = 1,10 do | |
455 | pa.Transparency = pa.Transparency - .06 | |
456 | pa.Reflectance = pa.Reflectance + .01 | |
457 | wait(.01) | |
458 | end | |
459 | else | |
460 | if (phit~=nil) then | |
461 | local fr = char["fr_block"] | |
462 | local char = trg.Parent | |
463 | for i = 1,10 do | |
464 | fr.Transparency = fr.Transparency + .06 | |
465 | fr.Reflectance = fr.Reflectance - .01 | |
466 | wait(.01) | |
467 | end | |
468 | local g = char:GetChildren() | |
469 | for i = 1,#g do | |
470 | if (g[i]:IsA("Part")) then | |
471 | g[i].Anchored = false | |
472 | g[i].Reflectance = 0 | |
473 | end | |
474 | end | |
475 | char.Humanoid.WalkSpeed = 16 | |
476 | fr:remove() | |
477 | end | |
478 | end | |
479 | end | |
480 | end | |
481 | ||
482 | function explode(m) | |
483 | local t = m.Hit.p | |
484 | local trg = m.Target | |
485 | if (trg==nil) then return end | |
486 | local e = Instance.new("Explosion") | |
487 | e.BlastRadius = 20 | |
488 | e.BlastPressure = 20 | |
489 | e.Position = t | |
490 | e.Parent = game.Workspace | |
491 | end | |
492 | ||
493 | function fire(m) | |
494 | local trg = m.Target | |
495 | if (trg==nil) then return end | |
496 | local phit = game.Players:findFirstChild(trg.Parent.Name) | |
497 | if (phit~=nil) then | |
498 | local char = trg.Parent | |
499 | if (char:findFirstChild("Torso")==nil) then return end | |
500 | local f = Instance.new("Fire") | |
501 | f.Color = Color3.new(0,0,0) | |
502 | f.SecondaryColor = Color3.new(0,0,0) | |
503 | f.Parent = char.Torso | |
504 | f.Name = "BurnFire" | |
505 | coroutine.resume(coroutine.create(function() | |
506 | while (char.Humanoid.Health>0) do | |
507 | if (char.Humanoid.Health<2) then | |
508 | char.Humanoid.Health = 0 | |
509 | char:BreakJoints() | |
510 | else | |
511 | char.Humanoid.Health = char.Humanoid.Health - 2 | |
512 | end | |
513 | wait(.05) | |
514 | end | |
515 | end)) | |
516 | end | |
517 | end | |
518 | ||
519 | function ghost() | |
520 | local player = game.Players.LocalPlayer | |
521 | if player == nil then return end | |
522 | player.Character:findFirstChild("Head").Transparency = 1 | |
523 | player.Character:findFirstChild("Torso").Transparency = 1 | |
524 | player.Character:findFirstChild("Left Arm").Transparency = 1 | |
525 | player.Character:findFirstChild("Right Arm").Transparency = 1 | |
526 | player.Character:findFirstChild("Left Leg").Transparency = 1 | |
527 | player.Character:findFirstChild("Right Leg").Transparency = 1 | |
528 | player.Character:findFirstChild("Head").face.Transparency = 1 | |
529 | player.Character:findFirstChild("Tanto").Blade.Transparency = 1 | |
530 | player.Character:findFirstChild("Tanto").Guard.Transparency = 1 | |
531 | player.Character:findFirstChild("Tanto").Handle.Transparency = 1 | |
532 | player.Character:findFirstChild("Tanto").Sheath.Transparency = 1 | |
533 | player.Character:findFirstChild("Tanto").Tip.Transparency = 1 | |
534 | player.Character:findFirstChild("Tanto").Blade2.Transparency = 1 | |
535 | player.Character:findFirstChild("Tanto").Guard2.Transparency = 1 | |
536 | player.Character:findFirstChild("Tanto").Handle2.Transparency = 1 | |
537 | player.Character:findFirstChild("Tanto").Sheath2.Transparency = 1 | |
538 | player.Character:findFirstChild("Tanto").Tip2.Transparency = 1 | |
539 | player.Character:findFirstChild("BoneHelmet").Handle.Transparency = 1 | |
540 | player.Character:findFirstChild("MessySpikes").Handle.Transparency = 1 | |
541 | player.Character:findFirstChild("Snake Eyes").Handle.Transparency = 1 | |
542 | end | |
543 | ||
544 | function unghost() | |
545 | local player = game.Players.LocalPlayer | |
546 | if player == nil then return end | |
547 | player.Character:findFirstChild("Head").Transparency = 0 | |
548 | player.Character:findFirstChild("Torso").Transparency = 0 | |
549 | player.Character:findFirstChild("Left Arm").Transparency = 0 | |
550 | player.Character:findFirstChild("Right Arm").Transparency = 0 | |
551 | player.Character:findFirstChild("Left Leg").Transparency = 0 | |
552 | player.Character:findFirstChild("Right Leg").Transparency = 0 | |
553 | player.Character:findFirstChild("Head").face.Transparency = 0 | |
554 | player.Character:findFirstChild("Tanto").Blade.Transparency = 0 | |
555 | player.Character:findFirstChild("Tanto").Guard.Transparency = 0 | |
556 | player.Character:findFirstChild("Tanto").Handle.Transparency = 0 | |
557 | player.Character:findFirstChild("Tanto").Handle.Transparency = 0 | |
558 | player.Character:findFirstChild("Tanto").Sheath.Transparency = 0 | |
559 | player.Character:findFirstChild("Tanto").Tip.Transparency = 0 | |
560 | player.Character:findFirstChild("Tanto").Blade2.Transparency = 0 | |
561 | player.Character:findFirstChild("Tanto").Guard2.Transparency = 0 | |
562 | player.Character:findFirstChild("Tanto").Handle2.Transparency = 0 | |
563 | player.Character:findFirstChild("Tanto").Sheath2.Transparency = 0 | |
564 | player.Character:findFirstChild("Tanto").Tip2.Transparency = 0 | |
565 | player.Character:findFirstChild("BoneHelmet").Handle.Transparency = 0 | |
566 | player.Character:findFirstChild("MessySpikes").Handle.Transparency = 0 | |
567 | player.Character:findFirstChild("Snake Eyes").Handle.Transparency = 0 | |
568 | end | |
569 | ||
570 | function TeleportZ(pos) | |
571 | ||
572 | char:MoveTo(pos) | |
573 | ||
574 | end | |
575 | ||
576 | function slash() | |
577 | PlaySound("slash", math.random(1750,2000)/1000) | |
578 | coroutine.resume(coroutine.create(function() | |
579 | for i = 90, 0, -30 do | |
580 | RABW2.C1 = CFrame.new(0, 0.5, math.sin(i/29)/6) * CFrame.Angles(-math.rad(i), 0, 0) | |
581 | RABWD2.C1 = CFrame.new(0, 0.5, math.sin(i/29)/6) * CFrame.Angles(-math.rad(i), 0, 0) | |
582 | wait() | |
583 | end | |
584 | for i = 0, 90, 30 do | |
585 | RABW2.C1 = CFrame.new(0, 0.5, math.sin(i/29)/6) * CFrame.Angles(-math.rad(i), 0, 0) | |
586 | RABWD2.C1 = CFrame.new(0, 0.5, math.sin(i/29)/6) * CFrame.Angles(-math.rad(i), 0, 0) | |
587 | wait() | |
588 | end | |
589 | end)) | |
590 | ||
591 | for i = 0, 180, 30 do | |
592 | for _, v in pairs(game.Workspace:GetChildren()) do | |
593 | if getHum(v)~=nil then | |
594 | if v:findFirstChild("Torso")~=nil then | |
595 | if (v.Torso.Position - blade.Position).magnitude < 2 and | |
596 | (v.Torso.Position - blade2.Position).magnitude < 2 then | |
597 | local hum = getHum(v) | |
598 | dmg(hum, 110, 112) | |
599 | PlaySound("splat", 1) | |
600 | end | |
601 | end | |
602 | end | |
603 | end | |
604 | wait() | |
605 | end | |
606 | end | |
607 | ||
608 | function stab() | |
609 | coroutine.resume(coroutine.create(function() | |
610 | for i = 0.5, -0.3, -0.1 do | |
611 | RABW2.C1 = CFrame.new(0, i, 0) * CFrame.Angles(-math.rad(90), 0, 0) | |
612 | RABWD2.C1 = CFrame.new(0, i, 0) * CFrame.Angles(-math.rad(90), 0, 0) | |
613 | wait() | |
614 | end | |
615 | for i = 180, 270, 30 do | |
616 | grip.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), 0, 0) --(math.sin(i/59)/6) | |
617 | grip2.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), 0, 0) --(math.sin(i/59)/6) | |
618 | wait() | |
619 | end | |
620 | wait(0.1) | |
621 | PlaySound("slash", math.random(1700,1900)/1000) | |
622 | for i = -0.25, 0.5, 0.25 do | |
623 | RABW2.C1 = CFrame.new(0, i, 0) * CFrame.Angles(-math.rad(90), 0, 0) | |
624 | RABWD2.C1 = CFrame.new(0, i, 0) * CFrame.Angles(-math.rad(90), 0, 0) | |
625 | wait() | |
626 | end | |
627 | for i = 270, 180, -10 do | |
628 | grip.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), 0, 0) --(math.sin(i/59)/6) | |
629 | grip2.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), 0, 0) --(math.sin(i/59)/6) | |
630 | wait() | |
631 | end | |
632 | end)) | |
633 | for i = -0.3, 0.5, 0.1 do | |
634 | wait() | |
635 | end | |
636 | for i = 180, 270, 30 do | |
637 | wait() | |
638 | end | |
639 | for i = 0, 0.5, 0.25 do | |
640 | for _, v in pairs(game.Workspace:GetChildren()) do | |
641 | if getHum(v)~=nil then | |
642 | if v:findFirstChild("Torso")~=nil then | |
643 | if (v.Torso.Position - blade.Position).magnitude < 2 and | |
644 | (v.Torso.Position - blade2.Position).magnitude < 2 then | |
645 | local hum = getHum(v) | |
646 | dmg(hum, 10, 15) | |
647 | --PlaySound("hitsound", 1.2) | |
648 | PlaySound("splat", 0.6) | |
649 | end | |
650 | end | |
651 | end | |
652 | end | |
653 | wait() | |
654 | end | |
655 | for i = 180, 270, 30 do | |
656 | for _, v in pairs(game.Workspace:GetChildren()) do | |
657 | if getHum(v)~=nil then | |
658 | if v:findFirstChild("Torso")~=nil then | |
659 | if (v.Torso.Position - blade.Position).magnitude < 2 and | |
660 | (v.Torso.Position - blade2.Position).magnitude < 2 then | |
661 | local hum = getHum(v) | |
662 | dmg(hum, 1, 1) | |
663 | end | |
664 | end | |
665 | end | |
666 | end | |
667 | wait() | |
668 | end | |
669 | end | |
670 | ||
671 | function slice() | |
672 | coroutine.resume(coroutine.create(function() | |
673 | for i = 0, 60, 15 do | |
674 | RABW2.C1 = CFrame.new(.3, math.sin(i/29)/6 + .1, 0) * CFrame.Angles(-math.rad(90), math.rad(i), 0) | |
675 | RABWD2.C1 = CFrame.new(.3, math.sin(i/29)/6 + .1, 0) * CFrame.Angles(-math.rad(90), math.rad(i), 0) | |
676 | wait() | |
677 | end | |
678 | wait(.1) | |
679 | PlaySound("slash", math.random(1700,1900)/1000) | |
680 | wait(.1) | |
681 | for i = 60, -60, -30 do | |
682 | RABW2.C1 = CFrame.new(.25, math.sin(i/29)/6 + 1, 0) * CFrame.Angles(-math.rad(90), math.rad(i), 0) | |
683 | RABWD2.C1 = CFrame.new(.25, math.sin(i/29)/6 + 1, 0) * CFrame.Angles(-math.rad(90), math.rad(i), 0) | |
684 | wait() | |
685 | end | |
686 | end)) | |
687 | coroutine.resume(coroutine.create(function() | |
688 | for i = 180, 270, 30 do | |
689 | grip.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), -math.rad(i), 0) --(math.sin(i/59)/6) | |
690 | grip2.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), -math.rad(i), 0) --(math.sin(i/59)/6) | |
691 | wait() | |
692 | end | |
693 | end)) | |
694 | for i = 0, 150, 15 do | |
695 | wait() | |
696 | end | |
697 | for i = 0, 180, 30 do | |
698 | for _, v in pairs(game.Workspace:GetChildren()) do | |
699 | if getHum(v)~=nil then | |
700 | if v:findFirstChild("Torso")~=nil then | |
701 | if (v.Torso.Position - blade.Position).magnitude < 2 and | |
702 | (v.Torso.Position - blade2.Position).magnitude < 2 then | |
703 | local hum = getHum(v) | |
704 | dmg(hum, 45, 60 - (v.Torso.Position - blade.Position).magnitude * 5) | |
705 | PlaySound("hitsound", 1.5) | |
706 | end | |
707 | end | |
708 | end | |
709 | end | |
710 | wait() | |
711 | end | |
712 | wait(.3) | |
713 | for i = -60, 0, 30 do | |
714 | RABW2.C1 = CFrame.new(0, math.sin(i/29)/6 + 0.5, 0) * CFrame.Angles(-math.rad(90), math.rad(i), 0) | |
715 | RABWD2.C1 = CFrame.new(0, math.sin(i/29)/6 + 0.5, 0) * CFrame.Angles(-math.rad(90), math.rad(i), 0) | |
716 | wait() | |
717 | end | |
718 | for i = 270, 180, -30 do | |
719 | grip.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), 0, 0) --(math.sin(i/59)/6) | |
720 | grip2.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), 0, 0) --(math.sin(i/59)/6) | |
721 | wait() | |
722 | end | |
723 | end | |
724 | ||
725 | function select(mouse) | |
726 | RABW2.Part1 = Rarm | |
727 | LABW2.Part1 = nil | |
728 | RLBW2.Part1 = nil | |
729 | LLBW2.Part1 = nil | |
730 | RABWD2.Part1 = Larm | |
731 | LABWD2.Part1 = nil | |
732 | RLBWD2.Part1 = nil | |
733 | LLBWD2.Part1 = nil | |
734 | unsheath() | |
735 | mouse.Button1Down:connect(function() | |
736 | if able then | |
737 | able = false | |
738 | slash(mouse.Hit.p) | |
739 | able = true | |
740 | end | |
741 | end) | |
742 | mouse.KeyDown:connect(function(key) | |
743 | if able then | |
744 | key = key:lower() | |
745 | if key == "z" then | |
746 | able = false | |
747 | slash(mouse.Hit.p) | |
748 | able = true | |
749 | elseif key == "x" then | |
750 | able = false | |
751 | stab(mouse.Hit.p) | |
752 | able = true | |
753 | elseif key == "c" then | |
754 | able = false | |
755 | slice(mouse.Hit.p) | |
756 | able = true | |
757 | elseif key=="t" then | |
758 | if mouse.Target ~= nil then | |
759 | able = false | |
760 | TeleportZ(mouse.Hit.p) | |
761 | able = true | |
762 | end | |
763 | elseif key == "v" then | |
764 | freeze(mouse) | |
765 | elseif key == ";" then | |
766 | explode(mouse) | |
767 | elseif key == "b" then | |
768 | fire(mouse) | |
769 | elseif key == "m" then | |
770 | ghost() | |
771 | elseif key == "n" then | |
772 | unghost() | |
773 | end | |
774 | end | |
775 | end) | |
776 | end | |
777 | ||
778 | function deselect() | |
779 | sheath() | |
780 | RABW2.Part1 = nil | |
781 | LABW2.Part1 = nil | |
782 | RLBW2.Part1 = nil | |
783 | LLBW2.Part1 = nil | |
784 | RABWD2.Part1 = nil | |
785 | LABWD2.Part1 = nil | |
786 | RLBWD2.Part1 = nil | |
787 | LLBWD2.Part1 = nil | |
788 | end | |
789 | ||
790 | bin.Selected:connect(select) | |
791 | bin.Deselected:connect(deselect) | |
792 | ||
793 | - | workspace.masterepico.Humanoid.WalkSpeed = 50 |
793 | + | workspace.drew11pogi.Humanoid.WalkSpeed = 50 |
794 | - | game.Workspace.masterepico.Humanoid.MaxHealth = math.huge |
794 | + | game.Workspace.drew11pogi.Humanoid.MaxHealth = math.huge |