SHOW:
|
|
- or go back to the newest paste.
1 | local r=NS([===[ | |
2 | ||
3 | Players = game:GetService("Players") | |
4 | Player = owner | |
5 | Bp = Player.Backpack | |
6 | Pg = Player.PlayerGui | |
7 | Char = Player.Character | |
8 | Head = Char.Head | |
9 | Torso = Char.Torso | |
10 | Hum = Char.Humanoid | |
11 | Humanoid = Hum | |
12 | Neck = Torso["Neck"] | |
13 | LS = Torso["Left Shoulder"] | |
14 | RS = Torso["Right Shoulder"] | |
15 | Ra = Char["Right Arm"] | |
16 | La = Char["Left Arm"] | |
17 | mouse = nil | |
18 | Mouse = nil | |
19 | ||
20 | bets = | |
21 | {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"," "} | |
22 | inew = Instance.new | |
23 | it = Instance.new | |
24 | bc = BrickColor.new | |
25 | vn = Vector3.new | |
26 | cn = CFrame.new | |
27 | ca = CFrame.Angles | |
28 | mpi = math.pi | |
29 | v3 = vn | |
30 | mr = math.rad | |
31 | br = BrickColor.new | |
32 | cf = CFrame.new | |
33 | ca = CFrame.Angles | |
34 | Colors = {"Really Red"} | |
35 | BladeColor = tostring(BrickColor.Random()) --Colors[math.random(1,#Colors)] | |
36 | TrailColor = BladeColor | |
37 | HopperName = "light saber" | |
38 | Rage = 100000 | |
39 | MaxRage = Rage | |
40 | SwordType = "Single" | |
41 | LeftDebounce = {} | |
42 | RightDebounce = {} | |
43 | OtherDebounce = {} | |
44 | Anim = {key = {}} | |
45 | for i=1,#bets do table.insert(Anim.key,bets) end | |
46 | Anim.Move = "None" | |
47 | Anim.Click = false | |
48 | Anim.Button = false | |
49 | Anim.CanBerserk = 0 | |
50 | Anim.ComboBreak = false | |
51 | Anim.Equipped = false | |
52 | keydown = false | |
53 | Speed = 2 | |
54 | RageIncome = 500 | |
55 | Left = false | |
56 | Right = false | |
57 | Anim.Act = false | |
58 | RealSpeed = 35 | |
59 | DebounceSpeed = 0.85/Speed | |
60 | RageCost = { | |
61 | ["Berserk"] = 200; | |
62 | ["RotorBlade"] = 30; | |
63 | ["Blocking"] = 0.1; | |
64 | ["Boomerang"] = 30; | |
65 | ["RageRegening"] = -0.7; | |
66 | ["BoulderForce"] = 45; | |
67 | ["ForceWave"] = 65; | |
68 | ["ForceWave"] = 32; | |
69 | ["Teleport"] = 25; | |
70 | ["DualSpin"] = 4; | |
71 | } | |
72 | MagnitudeHit = { | |
73 | ["ForceWave"] = 500; | |
74 | } | |
75 | Damage = { | |
76 | ["RotorBlade"] = 8; | |
77 | ["BoulderForce"] = 100; | |
78 | ["Boomerang"] = 100; | |
79 | ["ForceWave"] = 100; | |
80 | ["DualSpin"] = 5; | |
81 | } | |
82 | Props = {} | |
83 | Props.MaxTeleDistance = 500 | |
84 | Props.Buff = 1 | |
85 | BlastMesh = Instance.new("FileMesh") | |
86 | BlastMesh.MeshId = "http://www.roblox.com/asset/?id=20329976" | |
87 | RingMesh = Instance.new("FileMesh") | |
88 | RingMesh.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
89 | RockMesh = Instance.new("FileMesh") | |
90 | RockMesh.MeshId = "http://www.roblox.com/asset/?id=1290033" | |
91 | RockMesh.TextureId = "http://www.roblox.com/asset/?id=1290030" | |
92 | DiamondMesh = Instance.new("FileMesh") | |
93 | DiamondMesh.MeshId = "http://www.roblox.com/Asset/?id=9756362" | |
94 | RingMesh = Instance.new("FileMesh") | |
95 | RingMesh.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
96 | RockMesh = Instance.new("FileMesh") | |
97 | RockMesh.MeshId = "http://www.roblox.com/asset/?id=1290033" | |
98 | RockMesh.TextureId = "http://www.roblox.com/asset/?id=1290030" | |
99 | DiamondMesh = Instance.new("FileMesh") | |
100 | DiamondMesh.MeshId = "http://www.roblox.com/Asset/?id=9756362" | |
101 | RockMesh = Instance.new("FileMesh") | |
102 | RockMesh.MeshId = "http://www.roblox.com/asset/?id=1290033" | |
103 | RockMesh.TextureId = "http://www.roblox.com/asset/?id=1290030" | |
104 | DiamondMesh = Instance.new("FileMesh") | |
105 | DiamondMesh.MeshId = "http://www.roblox.com/Asset/?id=9756362" | |
106 | DiamondMesh = Instance.new("FileMesh") | |
107 | DiamondMesh.MeshId = "http://www.roblox.com/Asset/?id=9756362" | |
108 | ||
109 | function rayCast(Pos, Dir, Max, Ignore) | |
110 | return Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
111 | end | |
112 | function MinusRage(raggge) | |
113 | Rage = Rage - raggge | |
114 | if Rage < 0 then Rage = 0 end | |
115 | end | |
116 | ||
117 | function r(zParent,zName) | |
118 | if zParent:findFirstChild(zName) ~= nil then | |
119 | zParent[zName]:Remove() | |
120 | else | |
121 | end | |
122 | end | |
123 | function rclass(zParent,zClass) | |
124 | local ch = zParent:GetChildren() | |
125 | for i=1,#ch do | |
126 | if (ch.className == zClass) then | |
127 | ch:Remove() | |
128 | else | |
129 | end | |
130 | end | |
131 | end | |
132 | ||
133 | function fWeld(zName,zParent,zPart0,zPart1,zCoco,a,b,c,d,e,f) | |
134 | local funcw = Instance.new("Weld") | |
135 | funcw.Name = zName | |
136 | funcw.Parent = zParent | |
137 | funcw.Part0 = zPart0 | |
138 | funcw.Part1 = zPart1 | |
139 | if (zCoco == true) then | |
140 | funcw.C0 = CFrame.new(a,b,c) *CFrame.fromEulerAnglesXYZ(d,e,f) | |
141 | else | |
142 | funcw.C1 = CFrame.new(a,b,c) *CFrame.fromEulerAnglesXYZ(d,e,f) | |
143 | end | |
144 | return funcw | |
145 | end | |
146 | function Dash(ob,se,mes,of) | |
147 | local off = nil | |
148 | if of == nil then off = 0 else off = of end | |
149 | pcall(function() | |
150 | coroutine.resume(coroutine.create(function() | |
151 | local dashin = true | |
152 | local oldpos = (ob.CFrame *CFrame.new(0,off,0)).p | |
153 | coroutine.resume(coroutine.create(function() | |
154 | wait(se) dashin = false end)) | |
155 | for i=1,9999 do | |
156 | if dashin == false then break end | |
157 | local newpos = (ob.CFrame *CFrame.new(0,off,0)).p --+ Vector3.new(math.random(-2,2),math.random(-2,2),math.random(-2,2)) | |
158 | local np = Instance.new("Part") | |
159 | np.BrickColor = BrickColor.new(TrailColor) np.CanCollide = false | |
160 | np.BottomSurface = 0 np.TopSurface = 0 np.Anchored = true np.Transparency = 0.4 | |
161 | np.formFactor = "Custom" np.Parent = ob local mag = math.abs((newpos - oldpos).magnitude) | |
162 | local mp = nil | |
163 | if mes ~= nil then | |
164 | np.Size = Vector3.new(2,mag,2) mp = Instance.new("FileMesh",np) mp.MeshId = mes else | |
165 | np.Size = Vector3.new(0.4,0.4,mag) mp = Instance.new("BlockMesh",np) end | |
166 | np.CFrame = CFrame.new(newpos,oldpos) | |
167 | np.CFrame = np.CFrame + np.CFrame.lookVector* (mag/2) | |
168 | if mes == BlastMesh.MeshId then np.CFrame = np.CFrame *ca(mr(-90),0,0) else np.CFrame = np.CFrame *ca(0,0,mr(-45)) end | |
169 | oldpos = newpos | |
170 | coroutine.resume(coroutine.create(function() | |
171 | for i=1,0,-0.1 do | |
172 | np.Transparency = np.Transparency + 0.03 | |
173 | --if mes ~= nil then | |
174 | --mp.Scale = Vector3.new(i,mag,i) else | |
175 | mp.Scale = Vector3.new(i,i,1) -- end | |
176 | wait() | |
177 | end | |
178 | np:Remove() | |
179 | end)) | |
180 | wait(0.08) | |
181 | end | |
182 | end)) | |
183 | end) | |
184 | end | |
185 | Sounds = { | |
186 | Boom = "http://www.roblox.com/asset/?id=16976189"; | |
187 | SniperFire = "http://www.roblox.com/asset/?id=1369158"; | |
188 | ShotgunFire2 = "http://www.roblox.com/asset/?id=1868836"; | |
189 | MinigunFire = "http://www.roblox.com/asset/?id=2692806"; | |
190 | MinigunCharge = "http://www.roblox.com/asset/?id=2692844"; | |
191 | MinigunDischarge = "http://www.roblox.com/asset/?id=1753007"; | |
192 | Flashbang = "http://www.roblox.com/asset/?id=16976189"; | |
193 | Beep = "http://www.roblox.com/asset/?id=15666462"; | |
194 | Smash = "http://www.roblox.com/asset/?id=2801263"; | |
195 | Punch = "http://www.roblox.com/asset/?id=31173820"; | |
196 | Slash = "rbxasset://sounds/swordslash.wav"; | |
197 | Falcon = "http://www.roblox.com/asset/?id=1387390"; | |
198 | Cast = "http://www.roblox.com/asset/?id=2101137"; | |
199 | Spin = "http://www.roblox.com/asset/?id=1369159"; | |
200 | Abscond = "http://www.roblox.com/asset/?id=2767090"; | |
201 | ElectricalCharge = "http://www.roblox.com/asset/?id=2800815"; | |
202 | FireExplosion = "http://www.roblox.com/asset/?id=3264793"; | |
203 | SaberLightUp = "http://www.roblox.com/asset/?id=10209303"; | |
204 | SaberSlash = "http://www.roblox.com/asset/?id=10209280"; | |
205 | SaberHit = "http://www.roblox.com/asset/?id=44463749"; | |
206 | EnergyBlast = "http://www.roblox.com/asset/?id=10209268"; | |
207 | } | |
208 | function Sound(sid,pit,vol) | |
209 | local ss = Instance.new("Sound") | |
210 | ss.Name = "Sound" | |
211 | ss.Parent = Head | |
212 | ss.SoundId = sid | |
213 | ss.Pitch = pit | |
214 | ss.Volume = vol | |
215 | ss.PlayOnRemove = true | |
216 | wait() | |
217 | ss:Remove() | |
218 | end | |
219 | ||
220 | ||
221 | r(Char,"SwordPack") | |
222 | r(Char,"Suit") | |
223 | r(Char,"Saber" ..Player.Name) | |
224 | r(Pg,"Sabers") | |
225 | Suit = inew("Model") | |
226 | Suit.Name = "Suit" | |
227 | Suit.Parent = Char | |
228 | function p(pa,sh,x,y,z,c,a,tr,re,bc) | |
229 | local fp = it("Part",pa) | |
230 | fp.formFactor = "Custom" | |
231 | fp.Shape = sh | |
232 | fp.Size = v3(x,y,z) | |
233 | fp.CanCollide = c | |
234 | fp.Anchored = a | |
235 | fp.BrickColor = br(bc) | |
236 | fp.Transparency = tr | |
237 | fp.Reflectance = re | |
238 | fp.BottomSurface = 0 | |
239 | fp.TopSurface = 0 | |
240 | fp.CFrame = Torso.CFrame | |
241 | fp:BreakJoints() | |
242 | return fp | |
243 | end | |
244 | function weld(pa,p0,p1,x,y,z,a,b,c) | |
245 | local fw = it("Weld",pa) | |
246 | fw.Part0 = p0 | |
247 | fw.Part1 = p1 | |
248 | fw.C0 = cf(x,y,z) *ca(a,b,c) | |
249 | return fw | |
250 | end | |
251 | function ft(tab,nam) | |
252 | if tab == nil or nam == nil then print("U: Fail table") return false end | |
253 | for i=1,#tab do | |
254 | if tab == nam then | |
255 | return i | |
256 | else | |
257 | end | |
258 | end | |
259 | return nil | |
260 | end | |
261 | function spm(ty,pa,ssx,ssy,ssz) | |
262 | local sp = it("SpecialMesh",pa) | |
263 | sp.MeshType = ty | |
264 | sp.Scale = Vector3.new(ssx,ssy,ssz) | |
265 | return sp | |
266 | end | |
267 | Torso.Transparency = 1 | |
268 | Torm = Instance.new("Model",Char) | |
269 | Torm.Name = "Saber" ..Player.Name | |
270 | Tor = p(Torm,"Block",1.98,1.98,1,false,false,0,0,"basda") Tor.Name = "Torso" | |
271 | Torw = weld(Tor,Torso,Tor,0,0,0,0,0,0) | |
272 | pcall(function() Char.Shirt:Clone().Parent = Torm end) | |
273 | pcall(function() Char.Pants:Clone().Parent = Torm end) | |
274 | function ShockWave(onb,scale,col) | |
275 | coroutine.resume(coroutine.create(function() | |
276 | local e1 = Instance.new("Part") | |
277 | e1.Anchored = true | |
278 | e1.formFactor = "Custom" | |
279 | e1.CanCollide = false | |
280 | e1.Size = Vector3.new(1,1,1) | |
281 | e1.BrickColor = BrickColor.new(col) | |
282 | e1.Transparency = 0.6 | |
283 | e1.TopSurface = 0 | |
284 | e1.BottomSurface = 0 | |
285 | e1.Parent = Torm | |
286 | e1.CFrame = onb.CFrame | |
287 | e1.CFrame = e1.CFrame *CFrame.Angles(math.rad(-90),0,0) | |
288 | local e1m = Instance.new("SpecialMesh") | |
289 | e1m.MeshType = "FileMesh" | |
290 | e1m.Scale = Vector3.new(3,3,3) | |
291 | e1m.Parent = e1 | |
292 | e1m.MeshId = RingMesh.MeshId | |
293 | local r1 = Instance.new("Part") | |
294 | r1.Anchored = true | |
295 | r1.formFactor = "Custom" | |
296 | r1.CanCollide = false | |
297 | r1.Size = Vector3.new(1,1,1) | |
298 | r1.BrickColor = BrickColor.new(col) | |
299 | r1.Transparency = 0.6 | |
300 | r1.TopSurface = 0 | |
301 | r1.BottomSurface = 0 | |
302 | r1.Parent = Torm | |
303 | r1.CFrame = e1.CFrame *CFrame.Angles(math.rad(90),0,0) | |
304 | local r1m = Instance.new("SpecialMesh") | |
305 | r1m.MeshType = "FileMesh" | |
306 | r1m.Scale = Vector3.new(3,3,3) | |
307 | r1m.Parent = r1 | |
308 | r1m.MeshId = BlastMesh.MeshId | |
309 | for i=1,30 do | |
310 | local pluscal = scale/38 | |
311 | e1m.Scale = e1m.Scale + Vector3.new(pluscal,pluscal,pluscal) | |
312 | r1m.Scale = r1m.Scale + Vector3.new(pluscal/1.5,pluscal/3,pluscal/1.5) | |
313 | r1.CFrame = r1.CFrame * CFrame.Angles(0,math.rad(6),0) | |
314 | wait() | |
315 | end | |
316 | for i=1,30 do | |
317 | local pluscal = scale/38 | |
318 | e1m.Scale = e1m.Scale + Vector3.new(pluscal,pluscal,pluscal) | |
319 | r1m.Scale = r1m.Scale + Vector3.new(pluscal/1.5,pluscal/4,pluscal/1.5) | |
320 | r1.CFrame = r1.CFrame * CFrame.Angles(0,math.rad(6),0) | |
321 | e1.Transparency = e1.Transparency + 0.1 | |
322 | r1.Transparency = r1.Transparency + 0.1 | |
323 | wait() | |
324 | end | |
325 | e1:Remove() | |
326 | r1:Remove() | |
327 | end)) | |
328 | end | |
329 | ||
330 | function Explode(onb,scale,col) | |
331 | coroutine.resume(coroutine.create(function() | |
332 | local e1 = Instance.new("Part") | |
333 | e1.Anchored = true | |
334 | e1.formFactor = "Custom" | |
335 | e1.CanCollide = false | |
336 | e1.Size = Vector3.new(1,1,1) | |
337 | e1.BrickColor = BrickColor.new(col) | |
338 | e1.Transparency = 0.6 | |
339 | e1.TopSurface = 0 | |
340 | e1.BottomSurface = 0 | |
341 | e1.Parent = Torm | |
342 | e1.CFrame = onb.CFrame | |
343 | local e1m = Instance.new("SpecialMesh") | |
344 | e1m.MeshType = "Sphere" | |
345 | e1m.Parent = e1 | |
346 | local r1 = Instance.new("Part") | |
347 | r1.Anchored = true | |
348 | r1.formFactor = "Custom" | |
349 | r1.CanCollide = false | |
350 | r1.Size = Vector3.new(1,1,1) | |
351 | r1.BrickColor = BrickColor.new(col) | |
352 | r1.Transparency = 0.6 | |
353 | r1.TopSurface = 0 | |
354 | r1.BottomSurface = 0 | |
355 | r1.Parent = Torm | |
356 | r1.CFrame = e1.CFrame *CFrame.Angles(math.rad(180),0,0) | |
357 | local r1m = Instance.new("SpecialMesh") | |
358 | r1m.MeshType = "FileMesh" | |
359 | r1m.Scale = Vector3.new(3,3,3) | |
360 | r1m.Parent = r1 | |
361 | r1m.MeshId = RingMesh.MeshId | |
362 | local r2 = Instance.new("Part") | |
363 | r2.Anchored = true | |
364 | r2.formFactor = "Custom" | |
365 | r2.CanCollide = false | |
366 | r2.Size = Vector3.new(1,1,1) | |
367 | r2.BrickColor = BrickColor.new(col) | |
368 | r2.Transparency = 0.6 | |
369 | r2.TopSurface = 0 | |
370 | r2.BottomSurface = 0 | |
371 | r2.Parent = Torm | |
372 | r2.CFrame = e1.CFrame *CFrame.Angles(0,math.rad(180),0) | |
373 | local r2m = Instance.new("SpecialMesh") | |
374 | r2m.MeshType = "FileMesh" | |
375 | r2m.Parent = r2 | |
376 | r2m.Scale = Vector3.new(3,3,3) | |
377 | r2m.MeshId = RingMesh.MeshId | |
378 | local bla = Instance.new("Part") | |
379 | bla.Anchored = true | |
380 | bla.formFactor = "Custom" | |
381 | bla.CanCollide = false | |
382 | bla.Size = Vector3.new(1,1,1) | |
383 | bla.BrickColor = BrickColor.new(col) | |
384 | bla.Transparency = 0.6 | |
385 | bla.TopSurface = 0 | |
386 | bla.BottomSurface = 0 | |
387 | bla.Parent = Torm | |
388 | bla.CFrame = CFrame.new(e1.Position.x,e1.Position.y,e1.Position.z) | |
389 | local blam = Instance.new("SpecialMesh") | |
390 | blam.MeshType = "FileMesh" | |
391 | blam.Parent = bla | |
392 | blam.Scale = Vector3.new(5,5,5) | |
393 | blam.MeshId = BlastMesh.MeshId | |
394 | for i=1,30 do | |
395 | local pluscal = scale/38 | |
396 | e1m.Scale = e1m.Scale + Vector3.new(pluscal,pluscal,pluscal) | |
397 | r1m.Scale = r1m.Scale + Vector3.new(pluscal,pluscal,pluscal) | |
398 | r2m.Scale = r1m.Scale + Vector3.new(pluscal,pluscal,pluscal) | |
399 | blam.Scale = blam.Scale + Vector3.new(pluscal,pluscal/2,pluscal) | |
400 | bla.CFrame = bla.CFrame * CFrame.Angles(0,math.rad(12),0) | |
401 | r1.CFrame = r1.CFrame * CFrame.Angles(math.rad(6),0,0) | |
402 | r2.CFrame = r2.CFrame * CFrame.Angles(0,math.rad(6),0) | |
403 | wait() | |
404 | end | |
405 | for i=1,30 do | |
406 | local pluscal = scale/38 | |
407 | e1m.Scale = e1m.Scale + Vector3.new(pluscal,pluscal,pluscal) | |
408 | r1m.Scale = r1m.Scale + Vector3.new(pluscal,pluscal,pluscal) | |
409 | r2m.Scale = r1m.Scale + Vector3.new(pluscal,pluscal,pluscal) | |
410 | blam.Scale = blam.Scale + Vector3.new(pluscal/1.5,pluscal/3,pluscal/1.5) | |
411 | bla.CFrame = bla.CFrame * CFrame.Angles(0,math.rad(12),0) | |
412 | r1.CFrame = r1.CFrame * CFrame.Angles(math.rad(6),0,0) | |
413 | r2.CFrame = r2.CFrame * CFrame.Angles(0,math.rad(6),0) | |
414 | bla.Transparency = bla.Transparency + 0.1 | |
415 | e1.Transparency = e1.Transparency + 0.1 | |
416 | r1.Transparency = r1.Transparency + 0.1 | |
417 | r2.Transparency = r2.Transparency + 0.1 | |
418 | wait() | |
419 | end | |
420 | e1:Remove() | |
421 | r1:Remove() | |
422 | r2:Remove() | |
423 | end)) | |
424 | end | |
425 | H1 = p(Torm,"Block",0.5,0.9,0.5,false,false,0,0.1,"Medium stone grey") spm("Head",H1,1,1.3,1) | |
426 | H1w = weld(Tor,Torso,H1,0.4,-0.7,0.5,0,0,mr(45)) | |
427 | H2 = p(Torm,"Block",0.5,0.9,0.5,false,false,0,0.1,"Medium stone grey") spm("Head",H2,1,1.3,1) | |
428 | H2w = weld(Tor,H1,H2,0,-0.8,0,mr(180),0,0) | |
429 | Des1 = p(Torm,"Block",0.6,0.1,0.6,false,false,0,0.1,"Black") Instance.new("CylinderMesh",Des1) | |
430 | Des1w = weld(Tor,H1,Des1,0,0.5,0,0,0,0) | |
431 | Des2 = p(Torm,"Block",0.6,0.1,0.6,false,false,0,0.1,"Black") Instance.new("CylinderMesh",Des2) | |
432 | Des2w = weld(Tor,H2,Des2,0,0.5,0,0,0,0) | |
433 | Des21 = p(Torm,"Block",0.6,0.1,0.6,false,false,0,0.1,"Black") Des21m = Instance.new("CylinderMesh",Des21) Des21m.Scale = Vector3.new(1,0.6,1) | |
434 | Des21w = weld(Tor,H1,Des21,0,-0.55,0,0,0,0) | |
435 | Des22 = p(Torm,"Block",0.6,0.1,0.6,false,false,0,0.1,"Black") Des22m = Instance.new("CylinderMesh",Des22) Des22m.Scale = Vector3.new(1,0.6,1) | |
436 | Des22w = weld(Tor,H2,Des22,0,-0.55,0,0,0,0) | |
437 | ||
438 | Blad1 = p(Torm,"Block",0.3,4,0.3,false,false,1,0.25,BladeColor) M1 = spm("Head",Blad1,1,1,1) | |
439 | Blad1w = weld(Tor,H1,Blad1,0,1.9,0,0,0,0) | |
440 | Blad2 = p(Torm,"Block",0.3,4,0.3,false,false,1,0.25,BladeColor) M2 = spm("Head",Blad2,1,1,1) | |
441 | Blad2w = weld(Tor,H2,Blad2,0,1.9,0,0,0,0) | |
442 | Glow1 = p(Torm,"Block",0.47,4.2,0.47,false,false,1,0,BladeColor) GM1 = spm("Head",Glow1,1,1,1) | |
443 | Glow1w = weld(Tor,H1,Glow1,0,1.9,0,0,0,0) | |
444 | Glow2 = p(Torm,"Block",0.47,4.2,0.47,false,false,1,0,BladeColor) GM2 = spm("Head",Glow2,1,1,1) | |
445 | Glow2w = weld(Tor,H2,Glow2,0,1.9,0,0,0,0) | |
446 | ||
447 | ||
448 | ||
449 | Gui = Instance.new("ScreenGui",Pg) | |
450 | Gui.Name = "Sabers" | |
451 | Frame = Instance.new("Frame",Gui) | |
452 | Frame.BackgroundTransparency = 1 Frame.Size = UDim2.new(1,0,1,0) | |
453 | ImageGui = Instance.new("ImageLabel",Frame) | |
454 | ImageGui.Image = "http://www.roblox.com/asset/?id=51262246" | |
455 | ImageGui.BackgroundTransparency = 1 | |
456 | ImageGui.Size = UDim2.new(0.3,0,0.075,0) | |
457 | HealthBar = Instance.new("ImageLabel",Frame) | |
458 | HealthBar.Image = "http://www.roblox.com/asset/?id=48965808" | |
459 | HealthBar.BorderSizePixel = 0 | |
460 | HealthBar.Size = UDim2.new(0.23,0,0.017,0) | |
461 | HealthBar.Position = UDim2.new(0.06,0,0.017,0) | |
462 | RageBar = Instance.new("ImageLabel",Frame) | |
463 | RageBar.Image = "http://www.roblox.com/asset/?id=48965808" | |
464 | RageBar.BorderSizePixel = 0 | |
465 | RageBar.Size = UDim2.new(0.165,0,0.012,0) | |
466 | RageBar.Position = UDim2.new(0.06,0,0.04,0) | |
467 | RageBar.BackgroundColor3 = BrickColor.new("Alder").Color | |
468 | SelectBar = Instance.new("ImageButton",Frame) | |
469 | SelectBar.Image = "http://www.roblox.com/asset/?id=48965808" | |
470 | SelectBar.BorderSizePixel = 0 | |
471 | SelectBar.Size = UDim2.new(0.1,0,0.07,0) | |
472 | SelectBar.Position = UDim2.new(0.8,0,0.6,0) | |
473 | SelectBar.BackgroundColor3 = BrickColor.new(BladeColor).Color | |
474 | SelectrBar = Instance.new("TextLabel",SelectBar) | |
475 | SelectrBar.BackgroundTransparency = 1 | |
476 | SelectrBar.BorderSizePixel = 0 | |
477 | SelectrBar.Size = UDim2.new(0,0,0,0) | |
478 | SelectrBar.Position = UDim2.new(0.5,0,0.5,0) | |
479 | SelectrBar.Font = "ArialBold" | |
480 | SelectrBar.FontSize = "Size18" | |
481 | SelectBar.MouseButton1Up:connect(function() | |
482 | if Anim.Move ~= "None" then return end | |
483 | if Anim.Act == true then return end | |
484 | if Anim.Equipped == false then return end | |
485 | if SwordType == "Single" then | |
486 | Anim.Move = "Changing" | |
487 | Anims.ChangeToDual(0,1,0.065*Speed) SwordType = "Dual" | |
488 | Anim.Move = "None" | |
489 | else | |
490 | Anim.Move = "Changing" | |
491 | Anims.ChangeToSingle(0,1,0.065*Speed) SwordType = "Single" | |
492 | Anim.Move = "None" | |
493 | end | |
494 | end) | |
495 | coroutine.resume(coroutine.create(function() | |
496 | while true do | |
497 | wait(0.05) | |
498 | local hh = Hum.Health local hmh = Hum.MaxHealth | |
499 | HealthBar.Size = UDim2.new((hh/hmh)*0.23,0,0.017,0) | |
500 | if ((hh/hmh)*100) > 75 then | |
501 | HealthBar.BackgroundColor3 = BrickColor.new("Alder").Color | |
502 | elseif ((hh/hmh)*100) > 25 and ((hh/hmh)*100) < 76 then | |
503 | HealthBar.BackgroundColor3 = BrickColor.new("Deep orange").Color | |
504 | elseif ((hh/hmh)*100) < 26 then | |
505 | HealthBar.BackgroundColor3 = BrickColor.new("Bright red").Color | |
506 | end | |
507 | RageBar.Size = UDim2.new((Rage/MaxRage)*0.165,0,0.012,0) | |
508 | SelectrBar.Text = SwordType | |
509 | end | |
510 | end)) | |
511 | ------- | |
512 | function TellXPos(brick1,posd) | |
513 | local lb = p(nil,"Block",1,1,1,true,false,1,0.1,BladeColor) | |
514 | lb.CFrame = CFrame.new((brick1.CFrame *cf(-10,0,0)).p) | |
515 | local rb = p(nil,"Block",1,1,1,true,false,1,0.1,BladeColor) | |
516 | rb.CFrame = CFrame.new((brick1.CFrame *cf(10,0,0)).p) | |
517 | local posml = math.abs((posd - rb.Position).magnitude) | |
518 | local posmr = math.abs((posd - lb.Position).magnitude) | |
519 | if posml > posmr then | |
520 | return "left" | |
521 | else | |
522 | return "right" | |
523 | end | |
524 | end | |
525 | function GetNearPlayer(urpos,maxmag) | |
526 | if maxmag == nil then return nil end | |
527 | for i,v in pairs(game.Players:GetChildren()) do | |
528 | if v.Character ~= Char and v.Character ~= nil and v.Character:findFirstChild("Torso") ~= nil and math.abs((v.Character.Torso.Position-urpos).magnitude) < maxmag then | |
529 | return v.Character.Torso | |
530 | end | |
531 | end | |
532 | return nil | |
533 | end | |
534 | function Dmgz(hum,dmg) | |
535 | dmg = dmg*Props.Buff | |
536 | hum.Health = hum.Health - dmg | |
537 | Rage = Rage + ((dmg/1.25)*RageIncome) | |
538 | if Rage > MaxRage then Rage = MaxRage end | |
539 | end | |
540 | coroutine.resume(coroutine.create(function() | |
541 | while true do | |
542 | wait() | |
543 | if Right == true and Anim.Move == "ForceWave" then | |
544 | for i,v in pairs(workspace:GetChildren()) do | |
545 | coroutine.resume(coroutine.create(function() | |
546 | if v ~= Char and v ~= nil and v:findFirstChild("Torso") ~= nil and math.abs((v.Torso.Position-Blad2.Position).magnitude) < MagnitudeHit[Anim.Move] then | |
547 | local hit = v.Torso | |
548 | if hit ~= nil and hit.Parent:findFirstChild("Humanoid") ~= nil and ft(RightDebounce,hit.Parent.Name) == nil then | |
549 | Dmgz(hit.Parent.Humanoid,Damage[Anim.Move]) | |
550 | table.insert(RightDebounce,hit.Parent.Name) | |
551 | wait(DebounceSpeed) local nf = ft(RightDebounce,hit.Parent.Name) if nf ~= nil then table.remove(RightDebounce,nf) end | |
552 | end | |
553 | else | |
554 | if v:IsA("BasePart") and v.Anchored == false and math.abs((v.Position-Blad2.Position).magnitude) < MagnitudeHit[Anim.Move] then v:BreakJoints() v.Velocity = cf(Blad2.Position,v.Position).lookVector*30 + Vector3.new(0,20,0) end | |
555 | end | |
556 | end)) | |
557 | end -- for | |
558 | end | |
559 | end | |
560 | end)) | |
561 | Blad1.Touched:connect(function(hit) | |
562 | if Left == true then | |
563 | if hit ~= nil and hit.Parent:findFirstChild("Humanoid") ~= nil and ft(LeftDebounce,hit.Parent.Name) == nil then | |
564 | coroutine.resume(coroutine.create(function() | |
565 | table.insert(LeftDebounce,hit.Parent.Name) | |
566 | wait(DebounceSpeed) local nf = ft(LeftDebounce,hit.Parent.Name) if nf ~= nil then table.remove(LeftDebounce,nf) end | |
567 | end)) | |
568 | Sound(Sounds.SaberHit,1,1) | |
569 | Dmgz(hit.Parent.Humanoid,Damage[Anim.Move]) | |
570 | else | |
571 | --if hit.Parent:findFirstChild("Humanoid") == nil and not hit:IsDescendantOf(Char) and hit.Anchored == false then hit:BreakJoints() hit.Velocity = cf(Blad1.Position,hit.Position).lookVector*30 end | |
572 | end | |
573 | end | |
574 | end) | |
575 | ||
576 | Blad2.Touched:connect(function(hit) | |
577 | if Right == true then | |
578 | if hit ~= nil and hit.Parent:findFirstChild("Humanoid") ~= nil and ft(RightDebounce,hit.Parent.Name) == nil then | |
579 | coroutine.resume(coroutine.create(function() | |
580 | table.insert(RightDebounce,hit.Parent.Name) | |
581 | wait(DebounceSpeed) local nf = ft(RightDebounce,hit.Parent.Name) if nf ~= nil then table.remove(RightDebounce,nf) end | |
582 | end)) | |
583 | Sound(Sounds.SaberHit,1,1) | |
584 | Dmgz(hit.Parent.Humanoid,Damage[Anim.Move]) | |
585 | else | |
586 | --if hit.Parent:findFirstChild("Humanoid") == nil and not hit:IsDescendantOf(Char) and hit.Anchored == false then hit:BreakJoints() hit.Velocity = cf(Blad2.Position,hit.Position).lookVector*30 end | |
587 | end | |
588 | end | |
589 | end) | |
590 | LW = inew("Weld") | |
591 | RW = inew("Weld") | |
592 | Fla = p(Torm,"Block",1,2,1,false,false,1,0,BladeColor) | |
593 | Fra = p(Torm,"Block",1,2,1,false,false,1,0,BladeColor) | |
594 | Flaw = fWeld("Weld",Fla,Tor,Fla,true,-1.5,0.5,0,0,0,0) | |
595 | Fraw = fWeld("Weld",Fla,Tor,Fra,true,1.5,0.5,0,0,0,0) | |
596 | Flaw.C1 = CFrame.new(0,0.5,0) | |
597 | Fraw.C1 = CFrame.new(0,0.5,0) | |
598 | ||
599 | Fll = p(Torm,"Block",1,2,1,false,false,1,0,BladeColor) | |
600 | Frl = p(Torm,"Block",1,2,1,false,false,1,0,BladeColor) | |
601 | Fllw = fWeld("Weld",Fll,Torso,Fll,true,0,0,0,0,0,0) | |
602 | Frlw = fWeld("Weld",Fll,Torso,Frl,true,0,0,0,0,0,0) | |
603 | ||
604 | function FeetWeld(yesorno,lhh,rhh) | |
605 | if yesorno == false then | |
606 | lhh.Parent = nil | |
607 | rhh.Parent = nil | |
608 | Lh.Parent = Torso | |
609 | Rh.Parent = Torso | |
610 | Lh.Part0 = Tor | |
611 | Rh.Part0 = Tor | |
612 | Lh.Part1 = Char["Left Leg"] | |
613 | Rh.Part1 = Char["Right Leg"] | |
614 | return Lh,Rh | |
615 | else | |
616 | Rh.Parent = nil | |
617 | Lh.Parent = nil | |
618 | local hl,hr = it("Weld",Torso),it("Weld",Torso) | |
619 | hl.Part0 = Fll | |
620 | hr.Part0 = Frl | |
621 | hl.Part1 = Char["Left Leg"] | |
622 | hr.Part1 = Char["Right Leg"] | |
623 | hr.C1 = cf(-0.5,1.75,0) | |
624 | hl.C1 = cf(0.5,1.75,0) | |
625 | return hl,hr | |
626 | end | |
627 | end | |
628 | Anims = {} | |
629 | Anims.Equip = function(i1,i2,is) | |
630 | Anim.Act = true | |
631 | for i=i1,i2,is do | |
632 | RW.C1 = ca(mr(40*i),mr(20*i),0) | |
633 | RW.C0 = cf(-0.4*i,-0.1*i,0.4*i) | |
634 | wait() | |
635 | end | |
636 | H1w.Part0 = Ra | |
637 | H1w.Part1 = H1 | |
638 | H1w.C0 = cf(0,-1.1,0) *ca(0,mr(180),0) H1w.C1 = ca(mr(-90),0,0) | |
639 | Sound(Sounds.Slash,1,1) | |
640 | for i=i1,i2,is do | |
641 | H1w.C0 = cf(0,-1.1,0) *ca(0,mr(90+(270*i)),0) | |
642 | LW.C1 = ca(mr(-80*i),mr(40*i),0) | |
643 | LW.C0 = cf(0.6*i,0.3*i,-1*i) | |
644 | RW.C1 = ca(mr(40+(-120*i)),mr(20+(-60*i)),0) | |
645 | RW.C0 = cf(-0.4+(-0.2*i),-0.1+(0.4*i),0.4+(-1.4*i)) | |
646 | wait() | |
647 | end | |
648 | Sound(Sounds.SaberLightUp,3,1) | |
649 | for i=i1,i2,is do | |
650 | Blad1w.C0 = cf(0,0.95+(0.95*i),0) | |
651 | Blad2w.C0 = cf(0,0.95+(0.95*i),0) | |
652 | M1.Scale = Vector3.new(1,1*i,1) | |
653 | M2.Scale = Vector3.new(1,1*i,1) | |
654 | Blad1.Transparency = 0.9-(1*i) | |
655 | Blad2.Transparency = 0.9-(1*i) | |
656 | Glow1w.C0 = cf(0,0.95+(0.95*i),0) | |
657 | Glow2w.C0 = cf(0,0.95+(0.95*i),0) | |
658 | GM1.Scale = Vector3.new(1,1*i,1) | |
659 | GM2.Scale = Vector3.new(1,1*i,1) | |
660 | Glow1.Transparency = 1.05-(0.5*i) | |
661 | Glow2.Transparency = 1.05-(0.5*i) | |
662 | wait() | |
663 | end | |
664 | Anim.Act = false | |
665 | end | |
666 | Anims.UnEquip = function(i1,i2,is) | |
667 | Anim.Act = true | |
668 | Sound(Sounds.SaberLightUp,3,1) | |
669 | for i=i1,i2,is do | |
670 | Blad1w.C0 = cf(0,0.95+(0.95*i),0) | |
671 | Blad2w.C0 = cf(0,0.95+(0.95*i),0) | |
672 | M1.Scale = Vector3.new(1,1*i,1) | |
673 | M2.Scale = Vector3.new(1,1*i,1) | |
674 | Blad1.Transparency = 0.9-(1*i) | |
675 | Blad2.Transparency = 0.9-(1*i) | |
676 | Glow1w.C0 = cf(0,0.95+(0.95*i),0) | |
677 | Glow2w.C0 = cf(0,0.95+(0.95*i),0) | |
678 | GM1.Scale = Vector3.new(1,1*i,1) | |
679 | GM2.Scale = Vector3.new(1,1*i,1) | |
680 | Glow1.Transparency = 1.05-(0.5*i) | |
681 | Glow2.Transparency = 1.05-(0.5*i) | |
682 | wait() | |
683 | end | |
684 | Sound(Sounds.Slash,1,1) | |
685 | for i=i1,i2,is do | |
686 | H1w.C0 = cf(0,-1.1,0) *ca(0,mr(90+(270*i)),0) | |
687 | LW.C1 = ca(mr(-80*i),mr(40*i),0) | |
688 | LW.C0 = cf(0.6*i,0.3*i,-1*i) | |
689 | RW.C1 = ca(mr(40+(-120*i)),mr(20+(-60*i)),0) | |
690 | RW.C0 = cf(-0.4+(-0.2*i),-0.1+(0.4*i),0.4+(-1.4*i)) | |
691 | wait() | |
692 | end | |
693 | H1w.Part0 = Torso | |
694 | H1w.Part1 = H1 | |
695 | H1w.C0 = cf(0.4,-0.7,0.5) *ca(0,0,mr(45)) | |
696 | H1w.C1 = cf(0,0,0) *ca(0,0,0) | |
697 | for i=i1,i2,is do | |
698 | RW.C1 = ca(mr(40*i),mr(20*i),0) | |
699 | RW.C0 = cf(-0.4*i,-0.1*i,0.4*i) | |
700 | wait() | |
701 | end | |
702 | Anim.Act = false | |
703 | end | |
704 | Anims.ChangeToDual = function(i1,i2,is) | |
705 | Anim.Act = true | |
706 | for i=i1,i2,is*Speed do | |
707 | H1w.C0 = cf(0,-1.1,0) *ca(mr(-80*i),mr(50*i),0) | |
708 | wait() | |
709 | end | |
710 | Sound(Sounds.SaberHit,1,1) | |
711 | Sound(Sounds.SaberLightUp,2,0.5) | |
712 | H1w.Part0 = La | |
713 | H1w.Part1 = H1 | |
714 | H2w.Part0 = Ra | |
715 | H2w.Part1 = H2 | |
716 | H2w.C1 = ca(mr(-90),0,0) | |
717 | for i=i1,i2,is*Speed do | |
718 | H1w.C0 = cf(0,-1.1,0) *ca(0,mr(-90+(-90*i)),mr(20+(-20*i))) | |
719 | H2w.C0 = cf(0,-1.1,0) *ca(0,mr(90+(90*i)),mr(-35+(-35*i))) | |
720 | LW.C1 = ca(mr(-80+(20*i)),mr(40+(-70*i)),0) | |
721 | LW.C0 = cf(0.6+(-0.6*i),0.3+(-0.3*i),-1+(0.5*i)) | |
722 | RW.C1 = ca(mr(-80+(20*i)),mr(-40+(70*i)),0) | |
723 | RW.C0 = cf(-0.6+(0.6*i),0.3+(-0.3*i),-1+(0.5*i)) | |
724 | wait() | |
725 | end | |
726 | Anim.Act = false | |
727 | end | |
728 | Anims.ChangeToSingle = function(i1,i2,is) | |
729 | Anim.Act = true | |
730 | for i=i2,i1,-is*Speed do | |
731 | H1w.C0 = cf(0,-1.1,0) *ca(0,mr(-90+(-90*i)),mr(20+(-20*i))) | |
732 | H2w.C0 = cf(0,-1.1,0) *ca(0,mr(90+(90*i)),mr(-35+(-35*i))) | |
733 | LW.C1 = ca(mr(-80+(20*i)),mr(40+(-70*i)),0) | |
734 | LW.C0 = cf(0.6+(-0.6*i),0.3+(-0.3*i),-1+(0.5*i)) | |
735 | RW.C1 = ca(mr(-80+(20*i)),mr(-40+(70*i)),0) | |
736 | RW.C0 = cf(-0.6+(0.6*i),0.3+(-0.3*i),-1+(0.5*i)) | |
737 | wait() | |
738 | end | |
739 | H1w.Part0 = Ra | |
740 | H1w.Part1 = H1 | |
741 | H2w.Part0 = H1 | |
742 | H2w.Part1 = H2 | |
743 | H2w.C1 = ca(0,0,0) | |
744 | H2w.C0 = cf(0,-0.8,0) *ca(mr(180),0,0) | |
745 | Sound(Sounds.SaberLightUp,2,0.5) | |
746 | Sound(Sounds.SaberHit,1,1) | |
747 | for i=i2,i1,-is*Speed do | |
748 | H1w.C0 = cf(0,-1.1,0) *ca(mr(-80*i),mr(50*i),0) | |
749 | wait() | |
750 | end | |
751 | Anim.Act = false | |
752 | end | |
753 | Anims.RotorBlade = function(i1,i2,is,RaigCost) | |
754 | local lolpos = (Torso.Position - mouse.hit.p).unit | |
755 | local allx = (lolpos.y*80)-10 | |
756 | local ally = (((mouse.X-(mouse.ViewSizeX/2))/mouse.ViewSizeX)*1.8)*-90 | |
757 | Anim.Act = true | |
758 | for i=i1,i2,is do | |
759 | LW.C1 = cf(0,0.5*i,0) *ca(mr(-80+(allx*i)),mr(40+(-40*i)),0) | |
760 | LW.C0 = cf(0.6+(-0.9*i),0.3,-1+(1*i)) *ca(0,mr(90*i),0) | |
761 | RW.C1 = cf(0,0.5*i,0) *ca(mr(-80+(allx*i)),mr(-40+(40*i)),0) | |
762 | RW.C0 = cf(-0.6+(0.9*i),0.3,-1+(1*i)) *ca(0,mr(((-90)+ally)*i),0) | |
763 | Torw.C1 = ca(0,mr(-90*i),0) | |
764 | wait() | |
765 | end | |
766 | DebounceSpeed = DebounceSpeed - (0.5*Speed) | |
767 | Hum.WalkSpeed = Hum.WalkSpeed + (8*Speed) | |
768 | Left = true | |
769 | Right = true | |
770 | Dash(Blad1,2/Speed,nil,2) | |
771 | Dash(Blad2,2/Speed,nil,2) | |
772 | H1w.C0 = cf(0,-1.1,0) *ca(0,0,0) H1w.C1 = cf(0,-0.4,0) *ca(mr(-90),0,0) | |
773 | local soundtime = 0 | |
774 | for i=i1,i2*4,is do | |
775 | if soundtime == 10 then soundtime = 0 Sound(Sounds.SaberSlash,2.5,0.5) else soundtime = soundtime + 1 end | |
776 | H1w.C0 = cf(0,-1.1,0) *ca(0,mr(360*i),0) | |
777 | wait() | |
778 | end | |
779 | H1w.C0 = cf(0,-1.1,0) *ca(0,0,0) H1w.C1 = cf(0,0,0) *ca(mr(-90),0,0) | |
780 | DebounceSpeed = DebounceSpeed + (0.5*Speed) | |
781 | Hum.WalkSpeed = Hum.WalkSpeed - (8*Speed) | |
782 | Left = false | |
783 | Right = false | |
784 | for i=i2,i1,-is do | |
785 | LW.C1 = cf(0,0.5*i,0) *ca(mr(-80+(allx*i)),mr(40+(-40*i)),0) | |
786 | LW.C0 = cf(0.6+(-0.9*i),0.3,-1+(1*i)) *ca(0,mr(90*i),0) | |
787 | RW.C1 = cf(0,0.5*i,0) *ca(mr(-80+(allx*i)),mr(-40+(40*i)),0) | |
788 | RW.C0 = cf(-0.6+(0.9*i),0.3,-1+(1*i)) *ca(0,mr(((-90)+ally)*i),0) | |
789 | Torw.C1 = ca(0,mr(-90*i),0) | |
790 | wait() | |
791 | end | |
792 | Torw.C1 = ca(0,0,0) | |
793 | Anim.Act = false | |
794 | end | |
795 | ------- | |
796 | Anims.Boomerang = function(i1,i2,is,RaigCost) | |
797 | MinusRage(RaigCost) | |
798 | local lolpos = (Head.Position - mouse.hit.p).unit | |
799 | local allx = (lolpos.y*80)-10 | |
800 | Anim.Act = true | |
801 | for i=i1,i2,is do | |
802 | LW.C1 = cf(0,0.5*i,0) *ca(mr(-80+(allx*i)),mr(40+(-40*i)),0) | |
803 | LW.C0 = cf(0.6+(-0.9*i),0.3,-1+(1*i)) *ca(0,mr(60*i),0) | |
804 | RW.C1 = cf(0,0.5*i,0) *ca(mr(-80+(allx*i)),mr(-40+(40*i)),0) | |
805 | RW.C0 = cf(-0.6+(0.9*i),0.3,-1+(1*i)) *ca(0,mr(-60*i),0) | |
806 | Torw.C1 = ca(0,mr(-60*i),0) | |
807 | H1w.C0 = cf(0,-1.1,0) *ca(mr(80*i),0,0) | |
808 | wait() | |
809 | end | |
810 | DebounceSpeed = DebounceSpeed - (0.5*Speed) | |
811 | Left = true | |
812 | Right = true | |
813 | Dash(Blad1,3.8/Speed,nil,2) | |
814 | Dash(Blad2,3.8/Speed,nil,2) | |
815 | H1w.C0 = cf(0,-1.1,0) *ca(0,0,0) H1w.C1 = cf(0,-0.4,0) *ca(mr(-90),0,0) | |
816 | local soundtime = 0 | |
817 | for i=i1,i2,is/2 do | |
818 | if soundtime == 10 then soundtime = 0 Sound(Sounds.SaberSlash,2.5,0.5) else soundtime = soundtime + 1 end | |
819 | H1w.C0 = cf(10*i,-1.1+(-15*i),0) *ca(mr(90),mr(720*i),0) | |
820 | wait() | |
821 | end | |
822 | for i=i1,i2,is/2 do | |
823 | if soundtime == 10 then soundtime = 0 Sound(Sounds.SaberSlash,2.5,0.5) else soundtime = soundtime + 1 end | |
824 | H1w.C0 = cf(10+(-20*i),-16.1,0) *ca(mr(90),mr(720*i),0) | |
825 | wait() | |
826 | end | |
827 | for i=i1,i2,is/2 do | |
828 | if soundtime == 10 then soundtime = 0 Sound(Sounds.SaberSlash,2.5,0.5) else soundtime = soundtime + 1 end | |
829 | H1w.C0 = cf(-10+(10*i),-16.1+(15*i),0) *ca(mr(90),mr(720*i),0) | |
830 | wait() | |
831 | end | |
832 | H1w.C0 = cf(0,-1.1,0) *ca(0,0,0) H1w.C1 = cf(0,0,0) *ca(mr(-90),0,0) | |
833 | DebounceSpeed = DebounceSpeed + (0.5*Speed) | |
834 | Left = false | |
835 | Right = false | |
836 | for i=i2,i1,-is do | |
837 | LW.C1 = cf(0,0.5*i,0) *ca(mr(-80+(allx*i)),mr(40+(-40*i)),0) | |
838 | LW.C0 = cf(0.6+(-0.9*i),0.3,-1+(1*i)) *ca(0,mr(60*i),0) | |
839 | RW.C1 = cf(0,0.5*i,0) *ca(mr(-80+(allx*i)),mr(-40+(40*i)),0) | |
840 | RW.C0 = cf(-0.6+(0.9*i),0.3,-1+(1*i)) *ca(0,mr(-60*i),0) | |
841 | Torw.C1 = ca(0,mr(-60*i),0) | |
842 | H1w.C0 = cf(0,-1.1,0) *ca(mr(80*i),0,0) | |
843 | wait() | |
844 | end | |
845 | Torw.C1 = ca(0,0,0) | |
846 | Anim.Act = false | |
847 | end | |
848 | Anims.BoulderForce = function(i1,i2,is,RaigCost) | |
849 | MinusRage(RaigCost) | |
850 | Anim.Act = true | |
851 | for i=i1,i2,is do | |
852 | LW.C1 = cf(0,0.5*i,0) *ca(mr(-80+(-25*i)),mr(40+(-40*i)),0) | |
853 | LW.C0 = cf(0.6+(-0.9*i),0.3,-1+(1*i)) *ca(0,mr(50*i),0) | |
854 | RW.C1 = cf(0,0.5*i,0) *ca(mr(-80+(-25*i)),mr(-40+(40*i)),0) | |
855 | RW.C0 = cf(-0.6+(0.9*i),0.3,-1+(1*i)) *ca(0,mr(-50*i),0) | |
856 | Torw.C1 = ca(0,mr(50*i),0) | |
857 | wait() | |
858 | end | |
859 | local bould = p(workspace,"Block",4,4,8,true,true,0,0,"Medium stone grey") bould.Name = "Boulder" bould.Material = "Concrete" | |
860 | local rm = RockMesh:Clone() rm.Scale = Vector3.new(3,3,4.8) rm.Parent = bould | |
861 | bould.Elasticity = 0 bould.Friction = 2 bould.CFrame = cf(Torso.Position.x+(math.random(-14,14)),Torso.Position.y-5,Torso.Position.z+(math.random(-14,14))) *CFrame.Angles(math.random(-33,33)/10,math.random(-33,33)/10,math.random(-33,33)/10) | |
862 | local warpdes = true | |
863 | local bpos = bould.Position | |
864 | Sound(Sounds.Cast,0.95,0.8) | |
865 | coroutine.resume(coroutine.create(function() repeat Functions.BrickWarpDesign(bould,9) wait() until warpdes == false end)) | |
866 | for i=0,1,0.08 do bould.CFrame = CFrame.new(bpos.x,bpos.y,bpos.z) + Vector3.new(0,20*i,0) wait() end wait(1) bould.CFrame = CFrame.new(bpos.x,bpos.y+20,bpos.z) bould.CFrame = cf(bould.Position,mouse.hit.p) | |
867 | bould.Anchored = false wait() bould.Velocity = bould.CFrame.lookVector *(math.random(180,350)) bould.Touched:connect(function(hit) Functions.BoulderTouch(hit,bould) end) | |
868 | wait(0.5) | |
869 | warpdes = false | |
870 | game.Debris:AddItem(bould,10) | |
871 | for i=i2,i1,-is do | |
872 | LW.C1 = cf(0,0.5*i,0) *ca(mr(-80+(-25*i)),mr(40+(-40*i)),0) | |
873 | LW.C0 = cf(0.6+(-0.9*i),0.3,-1+(1*i)) *ca(0,mr(50*i),0) | |
874 | RW.C1 = cf(0,0.5*i,0) *ca(mr(-80+(-25*i)),mr(-40+(40*i)),0) | |
875 | RW.C0 = cf(-0.6+(0.9*i),0.3,-1+(1*i)) *ca(0,mr(-50*i),0) | |
876 | Torw.C1 = ca(0,mr(50*i),0) | |
877 | wait() | |
878 | end | |
879 | Torw.C1 = ca(0,0,0) | |
880 | Anim.Act = false | |
881 | end | |
882 | Anims.ForceWave = function(i1,i2,is,RaigCost) | |
883 | local Hit, hitpos = rayCast(Torso.Position,((Torso.Position - Vector3.new(0,10000,0)) - Torso.Position),999.999,Player.Character) | |
884 | if Hit == nil then Anim.Act = false return end | |
885 | MinusRage(RaigCost) | |
886 | Anim.Act = true | |
887 | lh2,rh2 = FeetWeld(true,Lh,Rh) | |
888 | local bp2 = Instance.new("BodyPosition",Torso) | |
889 | bp2.maxForce = Vector3.new(0,math.huge,0) | |
890 | Humanoid.WalkSpeed = Humanoid.WalkSpeed - (RealSpeed-4) | |
891 | DebounceSpeed = DebounceSpeed + (1.1*Speed) | |
892 | bp2.position = Torso.Position + Vector3.new(0,25,0) | |
893 | Dash(Blad1,2.5/Speed) | |
894 | Dash(Blad2,2.5/Speed) | |
895 | local wav = p(Torm,"Block",0.1,0.1,0.1,true,false,0.3,0,BladeColor) wav.Anchored = true | |
896 | local wavm = BlastMesh:Clone() | |
897 | wavm.Parent = wav | |
898 | wavm.Scale = Vector3.new(15,6,15) | |
899 | local cff = Torso.CFrame - Vector3.new(0,0,0) | |
900 | coroutine.resume(coroutine.create(function() | |
901 | Dash(Blad1,4/Speed) | |
902 | Dash(Blad2,4/Speed) | |
903 | for i=i1,i2,is*Speed do | |
904 | LW.C1 = ca(mr(-80+(-100*i)),mr(40-(40*i)),mr(45*i)) | |
905 | LW.C0 = cf(0.6,0.3+(1.4*i),-1+(1*i)) | |
906 | RW.C1 = ca(mr(-80+(-100*i)),mr(-40+(40*i)),mr(-45*i)) | |
907 | RW.C0 = cf(-0.6,0.3+(1.4*i),-1+(1*i)) | |
908 | lh2.C1 = ca(mr(30*i),0,mr(15*i)) | |
909 | rh2.C1 = ca(mr(30*i),0,mr(-15*i)) | |
910 | lh2.C0 = cf(-0.5+(-0.2*i),-1.9,0.35*i) | |
911 | rh2.C0 = cf(0.5+(0.2*i),-1.9,0.35*i) | |
912 | H1w.C0 = cf(0,-1.1+(-0.9*i),0) *ca(0,mr(360*i),0) | |
913 | H1w.C1 = ca(mr(-90+(40*i)),0,0) | |
914 | wait() | |
915 | end for i=i1,i2*3,is*Speed do H1w.C1 = ca(mr(-50),mr(360*i),0) wait() end end)) Sound(Sounds.Cast,0.45,1) for i=i1,i2*5,is do Functions.BrickWarpDesign(Torso,13) wav.CFrame = cff *ca(0,mr(180*i),0) wait() end | |
916 | for i=1,0.3,-0.14*Speed do wav.Transparency = i wait() end wav:Remove() | |
917 | for i=i2,i1,-is*Speed do | |
918 | LW.C1 = ca(mr(-80+(-100*i)),mr(40-(40*i)),mr(45*i)) | |
919 | LW.C0 = cf(0.6,0.3+(1.4*i),-1+(1*i)) | |
920 | RW.C1 = ca(mr(-80+(-100*i)),mr(-40+(40*i)),mr(-45*i)) | |
921 | RW.C0 = cf(-0.6,0.3+(1.4*i),-1+(1*i)) | |
922 | lh2.C1 = ca(mr(30*i),0,mr(15*i)) | |
923 | rh2.C1 = ca(mr(30*i),0,mr(-15*i)) | |
924 | lh2.C0 = cf(-0.5+(-0.2*i),-1.9,0.35*i) | |
925 | rh2.C0 = cf(0.5+(0.2*i),-1.9,0.35*i) | |
926 | H1w.C0 = cf(0,-1.1+(-0.9*i),0) *ca(0,mr(360*i),0) | |
927 | H1w.C1 = ca(mr(-90+(40*i)),0,0) | |
928 | wait() | |
929 | end | |
930 | bp2:Remove() | |
931 | local bg = Instance.new("BodyGyro",Torso) bg.maxTorque = Vector3.new(math.huge,0,math.huge) | |
932 | local bp = Instance.new("BodyPosition",Torso) bp.position = Torso.Position bp.maxForce = Vector3.new(math.huge,1000000,math.huge) | |
933 | rpos = math.abs(hitpos.y - Torso.Position.y) | |
934 | rpos = rpos - 1.2 | |
935 | local tpos = Torso.Position | |
936 | Hum.WalkSpeed = 0 | |
937 | Hum.PlatformStand = true | |
938 | Dash(Blad2,1.6/Speed,RingMesh.MeshId) | |
939 | for i=i1,i2,is do | |
940 | bp.position = tpos - Vector3.new(0,rpos*i,0) | |
941 | Neck.C0 = cf(0,1-(0.5*i),-0.5*i) *ca(Neck.C1:toEulerAnglesXYZ()) | |
942 | Torw.C1 = ca(mr(20*i),0,0) | |
943 | Torw.C0 = cf(0,-0.2*i,-0.2*i) | |
944 | lh2.C0 = cf(-0.5,-1.9+(1*i),-1.1*i) *ca(mr(10*i),mr(90),0) | |
945 | rh2.C0 = cf(0.5,-1.9+(1*i),0.1*i) *ca(mr(-95*i),mr(-90),0) | |
946 | LW.C1 = ca(mr(-80+(30*i)),mr(40),0) | |
947 | LW.C0 = cf(0.6,0.3-(0.3*i),-1+(0.3*i)) | |
948 | RW.C1 = ca(mr(-80+(30*i)),mr(-40),0) | |
949 | RW.C0 = cf(-0.6,0.3-(0.3*i),-1+(0.3*i)) | |
950 | H1w.C0 = cf(0,-1.1,0) *ca(mr(55*i),0,0) | |
951 | wait() | |
952 | end | |
953 | wait(0.25) | |
954 | Sound(Sounds.Boom,0.5,1) | |
955 | Sound(Sounds.EnergyBlast,0.9,1) | |
956 | Right = true | |
957 | ShockWave(Torso,50,BladeColor) | |
958 | wait(1.5) | |
959 | Right = false | |
960 | local t2pos = Torso.Position | |
961 | for i=i2,i1,-is do | |
962 | bp.position = t2pos - Vector3.new(0,1.5-(1.5*i),0) | |
963 | Neck.C0 = cf(0,1-(0.5*i),-0.5*i) *ca(Neck.C1:toEulerAnglesXYZ()) | |
964 | Torw.C1 = ca(mr(20*i),0,0) | |
965 | Torw.C0 = cf(0,-0.2*i,-0.2*i) | |
966 | lh2.C0 = cf(-0.5,-1.9+(1*i),-1.1*i) *ca(mr(10*i),mr(90),0) | |
967 | rh2.C0 = cf(0.5,-1.9+(1*i),0.1*i) *ca(mr(-95*i),mr(-90),0) | |
968 | LW.C1 = ca(mr(-80+(30*i)),mr(40),0) | |
969 | LW.C0 = cf(0.6,0.3-(0.3*i),-1+(0.3*i)) | |
970 | RW.C1 = ca(mr(-80+(30*i)),mr(-40),0) | |
971 | RW.C0 = cf(-0.6,0.3-(0.3*i),-1+(0.3*i)) | |
972 | H1w.C0 = cf(0,-1.1,0) *ca(mr(55*i),0,0) | |
973 | wait() | |
974 | end | |
975 | DebounceSpeed = DebounceSpeed - (1.1*Speed) | |
976 | bp:Remove() | |
977 | bg:Remove() | |
978 | Hum.PlatformStand = false | |
979 | Hum.WalkSpeed = RealSpeed | |
980 | Torw.C1 = ca(0,0,0) | |
981 | Anim.Act = false | |
982 | Lh,Rh = FeetWeld(false,lh2,rh2) | |
983 | end | |
984 | Anims.DualSpin = function(i1,i2,is,RaigCost) | |
985 | MinusRage(RaigCost) | |
986 | Anim.Act = true | |
987 | for i=i1,i2,is*Speed do | |
988 | H1w.C0 = cf(0,-1.1,0) *ca(0,mr(-180-(-90*i)),mr(0*i)) H1w.C1 = ca(mr(-90-(60*i)),0,mr(0*i)) | |
989 | H2w.C0 = cf(0,-1.1,0) *ca(0,mr(180-(270*i)),mr(0*i)) H2w.C1 = ca(mr(-90+(-30*i)),0,0) | |
990 | LW.C1 = ca(mr(-60+(-40*i)),mr(-30+(-75*i)),mr(0*i)) | |
991 | LW.C0 = cf(0.13*i,0.5*i,-0.5+(0.5*i)) | |
992 | RW.C1 = ca(mr(-60+(-20*i)),mr(30+(45*i)),mr(0*i)) | |
993 | RW.C0 = cf(0.13*i,0.4*i,-0.5+(0.4*i)) | |
994 | wait() | |
995 | end | |
996 | DebounceSpeed = DebounceSpeed - (0.5*Speed) Right = true Left = true Dash(Blad1,2.6/Speed,nil,2) Dash(Blad2,2.6/Speed,nil,2) local x,y,z = Neck.C0:toEulerAnglesXYZ() | |
997 | local soundtime = 0 | |
998 | for i=i1,i2*4,is*Speed do if soundtime == 10 then soundtime = 0 Sound(Sounds.SaberSlash,2.5,0.5) else soundtime = soundtime + 1 end Torw.C1 = ca(0,mr(i*360),0) Neck.C0 = cf(0,1,0) *ca(x,y,z+mr(-360*i)) wait() end Neck.C0 = cf(0,1,0) *ca(x,y,z)Torw.C1 = ca(0,0,0) | |
999 | DebounceSpeed = DebounceSpeed + (0.5*Speed) for i=i2,i1,-is*Speed do | |
1000 | H1w.C0 = cf(0,-1.1,0) *ca(0,mr(-180-(-90*i)),mr(0*i)) H1w.C1 = ca(mr(-90-(60*i)),0,mr(0*i)) | |
1001 | H2w.C0 = cf(0,-1.1,0) *ca(0,mr(180-(270*i)),mr(0*i)) H2w.C1 = ca(mr(-90+(-30*i)),0,0) | |
1002 | LW.C1 = ca(mr(-60+(-40*i)),mr(-30+(-75*i)),mr(0*i)) | |
1003 | LW.C0 = cf(0.13*i,0.5*i,-0.5+(0.5*i)) | |
1004 | RW.C1 = ca(mr(-60+(-20*i)),mr(30+(45*i)),mr(0*i)) | |
1005 | RW.C0 = cf(0.13*i,0.4*i,-0.5+(0.4*i)) | |
1006 | wait() | |
1007 | end Right = false Left = false | |
1008 | Anim.Act = false | |
1009 | end | |
1010 | ||
1011 | ---------------------------- | |
1012 | ---------------------------- | |
1013 | ---------------------------- | |
1014 | ---------------------------- | |
1015 | ||
1016 | Lh = Torso["Left Hip"] | |
1017 | Rh = Torso["Right Hip"] | |
1018 | ||
1019 | Functions = {} | |
1020 | Functions.BoulderTouch = function(hit2,bould) | |
1021 | print(bould.Name) | |
1022 | for i,v in pairs(workspace:GetChildren()) do | |
1023 | if v ~= Char and v ~= nil and v:findFirstChild("Torso") ~= nil and v:findFirstChild("Humanoid") ~= nil then | |
1024 | if math.abs((v.Torso.Position-bould.Position).magnitude) < 11 and ft(RightDebounce,v.Name) == nil then | |
1025 | Sound(Sounds.Smash,1,1) | |
1026 | Dmgz(v.Humanoid,Damage["BoulderForce"]) | |
1027 | table.insert(RightDebounce,v.Name) | |
1028 | print(v.Name) | |
1029 | coroutine.resume(coroutine.create(function()wait(DebounceSpeed) local nf = ft(RightDebounce,v.Name) if nf ~= nil then table.remove(RightDebounce,nf) end end)) | |
1030 | end | |
1031 | else | |
1032 | if v ~= bould and v:IsA("BasePart") and v.Anchored == false and math.abs((v.Position-bould.Position).magnitude) < 11 then v:BreakJoints() v.Velocity = cf(bould.Position,v.Position).lookVector*10 + Vector3.new(0,10,0) end | |
1033 | end | |
1034 | end -- for | |
1035 | end | |
1036 | Functions.Sparkle = function(bb,scal,si) | |
1037 | if si == nil then si = 1 end | |
1038 | local rand = bb.Position + Vector3.new(math.random(-scal,scal),math.random(-scal,scal),math.random(-scal,scal)) | |
1039 | local np = p(Torm,"Block",0.1,0.1,0.1,false,true,0.1,0.2,BladeColor) | |
1040 | np.CFrame = cf(rand.x,rand.y,rand.z) *ca(math.random(-33,33)/10,math.random(-33,33)/10,math.random(-33,33)/10) | |
1041 | local dm = DiamondMesh:Clone() dm.Scale = Vector3.new(0,0,0) dm.Parent = np | |
1042 | coroutine.resume(coroutine.create(function() | |
1043 | for i=0,1*si,0.1*si do | |
1044 | dm.Scale = Vector3.new(1*i,1.25*i,1*i) | |
1045 | wait() | |
1046 | end | |
1047 | end)) | |
1048 | coroutine.resume(coroutine.create(function() | |
1049 | wait(0.1) | |
1050 | for i=0,1,0.1 do | |
1051 | np.Transparency = i | |
1052 | wait() | |
1053 | end | |
1054 | np:Remove() | |
1055 | end)) | |
1056 | end | |
1057 | Functions.BrickWarpDesign = function(bb,scal) | |
1058 | local rand = bb.Position + Vector3.new(math.random(-scal,scal),math.random(-scal,scal),math.random(-scal,scal)) | |
1059 | local mag = (rand - bb.Position).magnitude | |
1060 | local np = p(Torm,"Block",0.1,0.1,mag-3,false,true,0.1,0.2,BladeColor) | |
1061 | np.CFrame = cf(bb.Position,rand) | |
1062 | np.CFrame = np.CFrame + np.CFrame.lookVector*((scal/5)+(mag/2)) | |
1063 | coroutine.resume(coroutine.create(function() | |
1064 | for i=0.1,1,0.05 do | |
1065 | np.Transparency = i | |
1066 | wait() | |
1067 | end | |
1068 | np:Remove() | |
1069 | end)) | |
1070 | end | |
1071 | Functions.RageRegen = function() | |
1072 | local lostcontrol = false | |
1073 | local hpos = Torso.Position.y + 10 | |
1074 | Anim.Move = "RageRegening" | |
1075 | Anim.Act = true | |
1076 | local wav = p(Torm,"Block",0.1,0.1,0.1,true,false,1,0,BladeColor) wav.Anchored = true | |
1077 | local wavm = BlastMesh:Clone() | |
1078 | wavm.Parent = wav | |
1079 | local wavv = 0 | |
1080 | wavm.Scale = Vector3.new(5,3.5,5) | |
1081 | wav.CFrame = cf((Torso.CFrame * CFrame.new(0,-2.5,0)).p) *ca(0,mr(wavv),0) | |
1082 | local bp = Instance.new("BodyPosition",Torso) | |
1083 | bp.maxForce = Vector3.new(0,math.huge,0) | |
1084 | Humanoid.WalkSpeed = Humanoid.WalkSpeed - (RealSpeed-4) | |
1085 | bp.position = Torso.Position + Vector3.new(0,10,0) | |
1086 | local bpos = bp.position | |
1087 | coroutine.resume(coroutine.create(function() | |
1088 | lh2,rh2 = FeetWeld(true,Lh,Rh) | |
1089 | if SwordType == "Single" then | |
1090 | for i=0,1,0.1*Speed do | |
1091 | LW.C1 = ca(mr(-80+(-30*i)),mr(40-(40*i)),0) | |
1092 | LW.C0 = cf(0.6-(0.6*i),0.3+(0.5*i),-1+(1.7*i)) *ca(0,mr(120*i),0) | |
1093 | RW.C1 = ca(mr(-80+(-30*i)),mr(-40+(40*i)),0) | |
1094 | RW.C0 = cf(-0.6+(0.6*i),0.3+(0.5*i),-1+(1.7*i)) *ca(0,mr(-120*i),0) | |
1095 | lh2.C1 = ca(mr(30*i),0,mr(15*i)) | |
1096 | rh2.C1 = ca(mr(30*i),0,mr(-15*i)) | |
1097 | lh2.C0 = cf(-0.5+(-0.2*i),-1.9,0.35*i) | |
1098 | rh2.C0 = cf(0.5+(0.2*i),-1.9,0.35*i) | |
1099 | wait() | |
1100 | end | |
1101 | else | |
1102 | for i=0,1,0.1*Speed do | |
1103 | LW.C1 = ca(mr(-60+(-50*i)),mr(-40-(-40*i)),0) | |
1104 | LW.C0 = cf(-0.1,0.8*i,-0.5+(1.2*i)) *ca(0,mr(120*i),0) | |
1105 | RW.C1 = ca(mr(-60+(-50*i)),mr(40+(-40*i)),0) | |
1106 | RW.C0 = cf(0.1,0.8*i,-0.5+(1.2*i)) *ca(0,mr(-120*i),0) | |
1107 | lh2.C1 = ca(mr(30*i),0,mr(15*i)) | |
1108 | rh2.C1 = ca(mr(30*i),0,mr(-15*i)) | |
1109 | lh2.C0 = cf(-0.5+(-0.2*i),-1.9,0.35*i) | |
1110 | rh2.C0 = cf(0.5+(0.2*i),-1.9,0.35*i) | |
1111 | wait() | |
1112 | end | |
1113 | end | |
1114 | local function movezx(i1,i2,is,bp) | |
1115 | if SwordType == "Single" then | |
1116 | for i=i1,i2,is*Speed do | |
1117 | LW.C1 = ca(mr(-120+(20*i)),0,0) | |
1118 | LW.C0 = cf(0,0.8,0.7) *ca(0,mr(120+(20*i)),0) | |
1119 | RW.C1 = ca(mr(-120+(20*i)),0,0) | |
1120 | RW.C0 = cf(0,0.8,0.7) *ca(0,mr(-120+(-20*i)),0) | |
1121 | lh2.C1 = ca(mr(30+(-15*i)),0,mr(15+(-8*i))) | |
1122 | rh2.C1 = ca(mr(30+(-15*i)),0,mr(-15+(8*i))) | |
1123 | lh2.C0 = cf(-0.7,-1.9,0.35) | |
1124 | rh2.C0 = cf(0.7,-1.9,0.35) | |
1125 | bp.position = Vector3.new(bpos.x,(hpos+10)+(3*i),bpos.z) | |
1126 | wait() | |
1127 | end | |
1128 | else | |
1129 | for i=i1,i2,is*Speed do | |
1130 | LW.C1 = ca(mr(-110),mr(0),0) | |
1131 | LW.C0 = cf(-0.1,0.8,0.7) *ca(0,mr(120+(20*i)),0) | |
1132 | RW.C1 = ca(mr(-110),mr(0),0) | |
1133 | RW.C0 = cf(0.1,0.8,0.7) *ca(0,mr(-120+(-20*i)),0) | |
1134 | lh2.C1 = ca(mr(30+(-15*i)),0,mr(15+(-8*i))) | |
1135 | rh2.C1 = ca(mr(30+(-15*i)),0,mr(-15+(8*i))) | |
1136 | lh2.C0 = cf(-0.7,-1.9,0.35) | |
1137 | rh2.C0 = cf(0.7,-1.9,0.35) | |
1138 | bp.position = Vector3.new(bpos.x,(hpos+10)+(3*i),bpos.z) | |
1139 | wait() | |
1140 | end | |
1141 | end | |
1142 | end | |
1143 | local moved = 2 | |
1144 | repeat | |
1145 | if Rage >= MaxRage or Anim.key.z == false then break end | |
1146 | if moved == 2 then moved = 1 movezx(0,1,0.025,bp) else moved = 2 movezx(1,0,-0.025,bp) end | |
1147 | until Rage >= MaxRage or Anim.key.z == false or lostcontrol == true | |
1148 | if SwordType == "Single" then | |
1149 | for i=1,0,-0.1*Speed do | |
1150 | LW.C1 = ca(mr(-80+(-30*i)),mr(40-(40*i)),0) | |
1151 | LW.C0 = cf(0.6-(0.6*i),0.3+(0.5*i),-1+(1.7*i)) *ca(0,mr(120*i),0) | |
1152 | RW.C1 = ca(mr(-80+(-30*i)),mr(-40+(40*i)),0) | |
1153 | RW.C0 = cf(-0.6+(0.6*i),0.3+(0.5*i),-1+(1.7*i)) *ca(0,mr(-120*i),0) | |
1154 | lh2.C1 = ca(mr(30*i),0,mr(15*i)) | |
1155 | rh2.C1 = ca(mr(30*i),0,mr(-15*i)) | |
1156 | lh2.C0 = cf(-0.5+(-0.2*i),-1.9,0.35*i) | |
1157 | rh2.C0 = cf(0.5+(0.2*i),-1.9,0.35*i) | |
1158 | wait() | |
1159 | end | |
1160 | else | |
1161 | for i=1,0,-0.1*Speed do | |
1162 | LW.C1 = ca(mr(-60+(-50*i)),mr(-40-(-40*i)),0) | |
1163 | LW.C0 = cf(-0.1,0.8*i,-0.5+(1.2*i)) *ca(0,mr(120*i),0) | |
1164 | RW.C1 = ca(mr(-60+(-50*i)),mr(40+(-40*i)),0) | |
1165 | RW.C0 = cf(0.1,0.8*i,-0.5+(1.2*i)) *ca(0,mr(-120*i),0) | |
1166 | lh2.C1 = ca(mr(30*i),0,mr(15*i)) | |
1167 | rh2.C1 = ca(mr(30*i),0,mr(-15*i)) | |
1168 | lh2.C0 = cf(-0.5+(-0.2*i),-1.9,0.35*i) | |
1169 | rh2.C0 = cf(0.5+(0.2*i),-1.9,0.35*i) | |
1170 | wait() | |
1171 | end | |
1172 | end | |
1173 | Lh,Rh = FeetWeld(false,lh2,rh2) | |
1174 | wait(0.6) | |
1175 | Anim.Act = false | |
1176 | Anim.Move = "None" | |
1177 | end)) | |
1178 | for i=1,0.3,-0.14*Speed do wav.Transparency = i wait() end | |
1179 | rpos = 0 | |
1180 | Sound(Sounds.Cast,0.8,1) | |
1181 | repeat wait() | |
1182 | local Hit, hitpos = rayCast(Torso.Position,((Torso.Position - Vector3.new(0,10000,0)) - Torso.Position),999.999,Player.Character) | |
1183 | if Hit == nil then lostcontrol = true break end | |
1184 | hpos = hitpos.y if math.random(1,6) == 4 then Functions.Sparkle(Torso,8) end | |
1185 | if math.random(1,3) == 3 then Functions.BrickWarpDesign(Torso,10) end wavv = wavv + 10 Rage = Rage - (RageCost["RageRegening"]*RageIncome) | |
1186 | wav.CFrame = cf(Torso.Position.x,hpos+1.4,Torso.Position.z) *ca(0,mr(wavv),0) | |
1187 | until Rage >= MaxRage or Anim.key.z == false | |
1188 | for i=0.3,01,0.14*Speed do wav.Transparency = i wait() end wav:Remove() | |
1189 | bp:Remove() | |
1190 | Humanoid.WalkSpeed = Humanoid.WalkSpeed + (RealSpeed-4) | |
1191 | end | |
1192 | Functions.Teleport = function(i1,i2,is,RaigCost) | |
1193 | Anim.Act = true | |
1194 | for i=i1,i2,is*Speed do | |
1195 | LW.C1 = cf(0,0.5*i,0) *ca(mr(-80+(-25*i)),mr(40+(-40*i)),0) | |
1196 | LW.C0 = cf(0.6+(-0.9*i),0.3,-1+(1*i)) *ca(0,mr(50*i),0) | |
1197 | RW.C1 = cf(0,0.5*i,0) *ca(mr(-80+(-25*i)),mr(-40+(40*i)),0) | |
1198 | RW.C0 = cf(-0.6+(0.9*i),0.3,-1+(1*i)) *ca(0,mr(-50*i),0) | |
1199 | Torw.C1 = ca(0,mr(50*i),0) | |
1200 | wait() | |
1201 | end | |
1202 | local tele = false | |
1203 | local tele2 = false -- for mouse | |
1204 | local mouseact = mouse.Button1Up:connect(function() tele2 = true end) | |
1205 | coroutine.resume(coroutine.create(function() Sound(Sounds.Cast,1.2,1) wait(12) tele = true end)) | |
1206 | local telepos = Torso.Position | |
1207 | local telehit = nil | |
1208 | local wav = p(Torm,"Block",0.1,0.1,0.1,true,false,0.3,0.1,BladeColor) wav.Anchored = true | |
1209 | local wavm = BlastMesh:Clone() | |
1210 | wavm.Parent = wav | |
1211 | local wavv = 0 | |
1212 | wavm.Scale = Vector3.new(3.5,2,3.5) | |
1213 | repeat | |
1214 | local mpos = mouse.hit.p + Vector3.new(0,2,0) | |
1215 | telehit,telepos = rayCast(mpos,((mpos - Vector3.new(0,10000,0)) - mpos),999.999,Player.Character) | |
1216 | wavv = wavv + 8 Functions.Sparkle(La,3) Functions.BrickWarpDesign(La,4) | |
1217 | if telehit ~= nil then wav.Transparency = 0 wav.CFrame = cf(telepos.x,telepos.y+1,telepos.z) *ca(0,mr(wavv),0) else wav.Transparency = 1 end | |
1218 | wait() until tele == true or tele2 == true mouseact:disconnect() | |
1219 | if telehit == nil or math.abs((Torso.Position - telepos).magnitude) > Props.MaxTeleDistance then | |
1220 | Sound(Sounds.Punch,1,1) for i=0.3,1,0.14 do wavm.Scale = Vector3.new(3.5+(5*i),2,3.5+(5*i)) wav.Transparency = i wait() end wav:Remove() | |
1221 | wav:Remove() | |
1222 | else | |
1223 | MinusRage(RaigCost) | |
1224 | for i=1,10 do wait() Functions.Sparkle(Torso,5,3) Functions.BrickWarpDesign(Torso,6) end | |
1225 | ShockWave(Torso,7,BladeColor) | |
1226 | Torso.CFrame = wav.CFrame + Vector3.new(0,2.2,0) Sound(Sounds.EnergyBlast,1.2,0.6) | |
1227 | ShockWave(Torso,7,BladeColor) | |
1228 | for i=1,10 do wait() Functions.Sparkle(Torso,5,3) Functions.BrickWarpDesign(Torso,6) end | |
1229 | for i=0.3,1,0.14 do wavm.Scale = Vector3.new(3.5+(5*i),2,3.5+(5*i)) wav.Transparency = i wait() end wav:Remove() | |
1230 | end | |
1231 | for i=i2,i1,-is*Speed do | |
1232 | LW.C1 = cf(0,0.5*i,0) *ca(mr(-80+(-25*i)),mr(40+(-40*i)),0) | |
1233 | LW.C0 = cf(0.6+(-0.9*i),0.3,-1+(1*i)) *ca(0,mr(50*i),0) | |
1234 | RW.C1 = cf(0,0.5*i,0) *ca(mr(-80+(-25*i)),mr(-40+(40*i)),0) | |
1235 | RW.C0 = cf(-0.6+(0.9*i),0.3,-1+(1*i)) *ca(0,mr(-50*i),0) | |
1236 | Torw.C1 = ca(0,mr(50*i),0) | |
1237 | wait() | |
1238 | end | |
1239 | Anim.Act = false | |
1240 | end | |
1241 | function s() | |
1242 | Torso["Left Hip"].Part0 = Tor | |
1243 | Torso["Right Hip"].Part0 = Tor | |
1244 | RS.Parent = nil | |
1245 | LS.Parent = nil | |
1246 | RW.Parent = Torso | |
1247 | RW.Part0 = Fra | |
1248 | RW.Part1 = Ra | |
1249 | LW.Parent = Torso | |
1250 | LW.Part0 = Fla | |
1251 | LW.Part1 = La | |
1252 | RW.C0 = CFrame.new(0,0,0) RW.C1 = CFrame.new(0,0,0) | |
1253 | LW.C0 = CFrame.new(0,0,0) LW.C1 = CFrame.new(0,0,0) | |
1254 | Anims.Equip(0,1,0.07*Speed) | |
1255 | Anim.Equipped = true | |
1256 | end | |
1257 | function ds() | |
1258 | Anim.Equipped = false | |
1259 | if SwordType == "Dual" then Anims.ChangeToSingle(0,1,0.25*Speed) SwordType = "Single" end | |
1260 | Anims.UnEquip(1,0,-0.08*Speed) | |
1261 | RW.Parent = nil | |
1262 | LW.Parent = nil | |
1263 | RS.Parent = Torso | |
1264 | RS.Part0 = Torso | |
1265 | RS.Part1 = Ra | |
1266 | LS.Parent = Torso | |
1267 | LS.Part0 = Torso | |
1268 | LS.Part1 = La | |
1269 | if Rh.Parent == nil then | |
1270 | FeetWeld(false,Lh,Rh) | |
1271 | end | |
1272 | Torso["Left Hip"].Part0 = Torso | |
1273 | Torso["Right Hip"].Part0 = Torso | |
1274 | end | |
1275 | function key(key) | |
1276 | ||
1277 | if key == "e" and Anim.Move == "None" and not Anim.Act and RageCost["RotorBlade"] <= Rage then | |
1278 | Anim.Move = "RotorBlade" | |
1279 | Anims.RotorBlade(0,1,0.08*Speed,RageCost["RotorBlade"]) | |
1280 | Anim.Move = "None" | |
1281 | elseif key == "q" and Anim.Move == "None" and not Anim.Act and RageCost["Boomerang"] <= Rage then | |
1282 | Anim.Move = "Boomerang" | |
1283 | Anims.Boomerang(0,1,0.08*Speed,RageCost["Boomerang"]) | |
1284 | Anim.Move = "None" | |
1285 | elseif key == "f" and Anim.Move == "None" and not Anim.Act and RageCost["BoulderForce"] <= Rage then | |
1286 | Anim.Move = "BoulderForce" | |
1287 | Anims.BoulderForce(0,1,0.08*Speed,RageCost["BoulderForce"]) | |
1288 | Anim.Move = "None" | |
1289 | elseif key == "r" and Anim.Move == "None" and not Anim.Act and RageCost["ForceWave"] <= Rage then | |
1290 | Anim.Move = "ForceWave" | |
1291 | Anims.ForceWave(0,1,0.08*Speed,RageCost["ForceWave"]) | |
1292 | Anim.Move = "None" | |
1293 | elseif key == "t" and Anim.Move == "None" and not Anim.Act and RageCost["Teleport"] <= Rage then | |
1294 | Anim.Move = "Teleport" | |
1295 | Functions.Teleport(0,1,0.08*Speed,RageCost["Teleport"]) | |
1296 | Anim.Move = "None" | |
1297 | elseif key == "t" and Anim.Move == "None" and not Anim.Act and RageCost["Teleport"] <= Rage then | |
1298 | Anim.Move = "Teleport" | |
1299 | Functions.Teleport(0,1,0.08*Speed,RageCost["Teleport"]) | |
1300 | Anim.Move = "None" | |
1301 | elseif key == "z" and Anim.Move == "None" and not Anim.Act then | |
1302 | Functions.RageRegen() | |
1303 | end | |
1304 | end | |
1305 | function keyup(key) | |
1306 | pcall(function() Anim.key[key:lower()] = false end) | |
1307 | keydown = false | |
1308 | end | |
1309 | remote=Instance.new('RemoteFunction',script); | |
1310 | remote.OnServerInvoke=function(p,r,...) | |
1311 | if(p~=owner)then return error('You cannot invoke this remote',0); end; | |
1312 | ||
1313 | if (r == 1) then | |
1314 | key(...); | |
1315 | elseif (r == 2) then | |
1316 | BDown(...); | |
1317 | elseif (r == 3) then | |
1318 | s(); | |
1319 | elseif (r == 4) then | |
1320 | ds(); | |
1321 | elseif (r == 5) then | |
1322 | keyup(...); | |
1323 | end; | |
1324 | end; | |
1325 | - | ]===], owner.Character):WaitForChild 'S'; |
1325 | + | ]===], owner.Character); |
1326 | ||
1327 | b=Instance.new("HopperBin"); | |
1328 | b.Name = "Lightsaber"; | |
1329 | b.Parent = owner.Backpack; | |
1330 | - | print(b.Name); |
1330 | + | |
1331 | b.Selected:Connect(function(m) | |
1332 | ||
1333 | r:InvokeServer(3); | |
1334 | ||
1335 | m.KeyDown:Connect(function(k) | |
1336 | if (k ~= 'e') then return end; | |
1337 | r:InvokeServer(1,k); | |
1338 | if (k ~= 'q') then return end; | |
1339 | r:InvokeServer(1,k); | |
1340 | if (k ~= 'f') then return end; | |
1341 | r:InvokeServer(1,k); | |
1342 | if (k ~= 'r') then return end; | |
1343 | r:InvokeServer(1,k); | |
1344 | if (k ~= 't') then return end; | |
1345 | r:InvokeServer(1,k); | |
1346 | if (k ~= 'z') then return end; | |
1347 | r:InvokeServer(1,k); | |
1348 | end); | |
1349 | m.Button1Down:Connect(function() | |
1350 | r:InvokeServer(2,m.Hit); | |
1351 | end); | |
1352 | m.KeyUp:Connect(function(k) | |
1353 | ||
1354 | r:InvokeServer(5,k); | |
1355 | end); | |
1356 | end); | |
1357 | ||
1358 | b.Deselected:Connect (function() | |
1359 | r:InvokeServer (4); | |
1360 | end); |