SHOW:
|
|
- or go back to the newest paste.
1 | -- thx korblax | |
2 | local asin = math.asin | |
3 | ||
4 | local atan2 = math.atan2 | |
5 | ||
6 | local rad = math.rad | |
7 | ||
8 | local sin = math.sin | |
9 | ||
10 | local abs = math.abs | |
11 | ||
12 | local ceil = math.ceil | |
13 | ||
14 | local pi = math.pi | |
15 | ||
16 | local swing=1 | |
17 | ||
18 | local hitdeb=false | |
19 | ||
20 | local deb=false | |
21 | ||
22 | local player = game.Players.LocalPlayer | |
23 | ||
24 | local pchar = player.Character | |
25 | ||
26 | local mouse = player:GetMouse() | |
27 | ||
28 | local torso=pchar.Torso | |
29 | ||
30 | local skate=false | |
31 | ||
32 | local legs=true | |
33 | ||
34 | local anim=true | |
35 | ||
36 | local tsp=0 | |
37 | ||
38 | local csp=0 | |
39 | ||
40 | local hover=false | |
41 | ||
42 | local dmgs={} | |
43 | ||
44 | local sworddmg={} | |
45 | ||
46 | local anim2=false | |
47 | ||
48 | local SAmmo=7 | |
49 | ||
50 | local anglespeed = 1 | |
51 | ||
52 | local mode='' | |
53 | ||
54 | local angle = 0 | |
55 | ||
56 | local animationprts={} | |
57 | ||
58 | local spawn={} | |
59 | ||
60 | local cf,ca,v3=CFrame.new,CFrame.Angles,Vector3.new | |
61 | ||
62 | local tol=Instance.new("HopperBin",player.Backpack) | |
63 | ||
64 | local spkparts = {} | |
65 | ||
66 | local rov=true | |
67 | ||
68 | local sides=true | |
69 | ||
70 | local spinn=0 | |
71 | ||
72 | local tov=false | |
73 | ||
74 | local tops=true | |
75 | ||
76 | local pov=false | |
77 | ||
78 | local bl=false | |
79 | ||
80 | local spinn=0 | |
81 | ||
82 | tol.Name="1069" | |
83 | ||
84 | local function QuaternionFromCFrame(cf) local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() local trace = m00 + m11 + m22 if trace > 0 then local s = math.sqrt(1 + trace) local recip = 0.5/s return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 else local i = 0 if m11 > m00 then i = 1 end if m22 > (i == 0 and m00 or m11) then i = 2 end if i == 0 then local s = math.sqrt(m00-m11-m22+1) local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip elseif i == 1 then local s = math.sqrt(m11-m22-m00+1) local recip = 0.5/s return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip elseif i == 2 then local s = math.sqrt(m22-m00-m11+1) local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip end end end | |
85 | local function QuaternionToCFrame(px, py, pz, x, y, z, w) local xs, ys, zs = x + x, y + y, z + z local wx, wy, wz = w*xs, w*ys, w*zs local xx = x*xs local xy = x*ys local xz = x*zs local yy = y*ys local yz = y*zs local zz = z*zs return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) end | |
86 | local function QuaternionSlerp(a, b, t) local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] local startInterp, finishInterp; if cosTheta >= 0.0001 then if (1 - cosTheta) > 0.0001 then local theta = math.acos(cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((1-t)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = 1-t finishInterp = t end else if (1+cosTheta) > 0.0001 then local theta = math.acos(-cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((t-1)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = t-1 finishInterp = t end end return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp end | |
87 | function clerp(a,b,t) | |
88 | local qa = {QuaternionFromCFrame(a)} | |
89 | local qb = {QuaternionFromCFrame(b)} | |
90 | local ax, ay, az = a.x, a.y, a.z | |
91 | local bx, by, bz = b.x, b.y, b.z | |
92 | local _t = 1-t | |
93 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
94 | end | |
95 | ||
96 | Part = function(x,y,z,color,tr,cc,an,parent) | |
97 | local p = Instance.new('Part',parent or Weapon) | |
98 | p.formFactor = 'Custom' | |
99 | p.Size = Vector3.new(x,y,z) | |
100 | p.BrickColor = BrickColor.new(color) | |
101 | p.CanCollide = cc | |
102 | p.Transparency = tr | |
103 | p.Anchored = an | |
104 | p.TopSurface,p.BottomSurface = 0,0 | |
105 | p:BreakJoints() | |
106 | return p | |
107 | end | |
108 | ||
109 | wPart = function(x,y,z,color,tr,cc,an,parent) | |
110 | local wp = Instance.new('WedgePart',parent or Weapon) | |
111 | wp.formFactor = 'Custom' | |
112 | wp.Size = Vector3.new(x,y,z) | |
113 | wp.BrickColor = BrickColor.new(color) | |
114 | wp.CanCollide = cc | |
115 | wp.Transparency = tr | |
116 | wp.Anchored = an | |
117 | wp.TopSurface,wp.BottomSurface = 0,0 | |
118 | return wp | |
119 | end | |
120 | ||
121 | TrailOn = false | |
122 | ||
123 | local function CFrameFromTopBack(at, top, back) | |
124 | local right = top:Cross(back) | |
125 | return CFrame.new(at.x, at.y, at.z, | |
126 | right.x, top.x, back.x, | |
127 | right.y, top.y, back.y, | |
128 | right.z, top.z, back.z) | |
129 | end | |
130 | ||
131 | function Triangle(a, b, c) | |
132 | local edg1 = (c-a):Dot((b-a).unit) | |
133 | local edg2 = (a-b):Dot((c-b).unit) | |
134 | local edg3 = (b-c):Dot((a-c).unit) | |
135 | if edg1 <= (b-a).magnitude and edg1 >= 0 then | |
136 | a, b, c = a, b, c | |
137 | elseif edg2 <= (c-b).magnitude and edg2 >= 0 then | |
138 | a, b, c = b, c, a | |
139 | elseif edg3 <= (a-c).magnitude and edg3 >= 0 then | |
140 | a, b, c = c, a, b | |
141 | else | |
142 | print("unreachable") | |
143 | end | |
144 | local len1 = (c-a):Dot((b-a).unit) | |
145 | local len2 = (b-a).magnitude - len1 | |
146 | local width = (a + (b-a).unit*len1 - c).magnitude | |
147 | local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit) | |
148 | local list = {} | |
149 | if len1 > 0.01 then | |
150 | local w1 = wPart(0,0,0,'White',0.5,false,true,pchar) | |
151 | local sz = v3(0.2, width, len1) | |
152 | w1.Size = sz | |
153 | local sp = Mesh(w1,2,0,0,0) | |
154 | sp.MeshType='Wedge' | |
155 | sp.Scale=v3(0,1,1)*sz/w1.Size | |
156 | w1:BreakJoints() | |
157 | w1.Anchored = true | |
158 | w1.Transparency = 0.7 | |
159 | Spawn(function() | |
160 | for i=0,1,0.1 do | |
161 | wait() | |
162 | w1.Transparency=w1.Transparency+0.03 | |
163 | end | |
164 | end) | |
165 | w1.CFrame = maincf*ca(math.pi,0,math.pi/2)*cf(0,width/2,len1/2) | |
166 | table.insert(list,w1) | |
167 | end | |
168 | if len2 > 0.01 then | |
169 | local w2 = wPart(0,0,0,'White',0.5,false,true,pchar) | |
170 | local sz = v3(0.2, width, len2) | |
171 | w2.Size = sz | |
172 | local sp = Mesh(w2,2,0,0,0) | |
173 | sp.MeshType='Wedge' | |
174 | sp.Scale=v3(0,1,1)*sz/w2.Size | |
175 | w2:BreakJoints() | |
176 | w2.Anchored = true | |
177 | w2.Transparency = 0.7 | |
178 | Spawn(function() | |
179 | for i=0,1,0.1 do | |
180 | wait() | |
181 | w2.Transparency=w2.Transparency+0.03 | |
182 | end | |
183 | end) | |
184 | w2.CFrame = maincf*ca(math.pi,math.pi,-math.pi/2)*cf(0,width/2,-len1 - len2/2) | |
185 | table.insert(list,w2) | |
186 | end | |
187 | return unpack(list) | |
188 | end | |
189 | ||
190 | Weld = function(p0,p1,x,y,z,rx,ry,rz,par) | |
191 | local w = Instance.new('Motor',par or p0) | |
192 | w.Part0 = p0 | |
193 | w.Part1 = p1 | |
194 | w.C1 = CFrame.new(x,y,z)*CFrame.Angles(rx,ry,rz) | |
195 | return w | |
196 | end | |
197 | ||
198 | TWeld = function(p0,p1,x,y,z,rx,ry,rz,par) | |
199 | local w = Weld(p0,p1,0,0,0,0,0,0,par) | |
200 | table.insert(spawn,w) | |
201 | Tween(w,cf(x,y,z)*ca(rx,ry,rz),.05) | |
202 | return w | |
203 | end | |
204 | ||
205 | Mesh = function(par,num,x,y,z) | |
206 | local msh = nil | |
207 | if num == 1 then | |
208 | msh = Instance.new("CylinderMesh",par) | |
209 | elseif num == 2 then | |
210 | msh = Instance.new("SpecialMesh",par) | |
211 | msh.MeshType = 3 | |
212 | elseif num == 3 then | |
213 | msh = Instance.new("BlockMesh",par) | |
214 | elseif type(num) == 'string' then | |
215 | msh = Instance.new("SpecialMesh",par) | |
216 | msh.MeshId = num | |
217 | end | |
218 | msh.Scale = Vector3.new(x,y,z) | |
219 | return msh | |
220 | end | |
221 | ||
222 | function explosion(col1,col2,cfr,sz,rng,dmg) | |
223 | local a= Part(1,1,1,col1,.5,false,true,pchar) | |
224 | local a2= Part(1,1,1,col2,.5,false,true,pchar) | |
225 | local a3= Part(1,1,1,col2,.5,false,true,pchar) | |
226 | local v1,v2,v3=sz.x,sz.y,sz.z | |
227 | local m= Mesh(a,'http://www.roblox.com/asset/?id=1185246',v1,v2,v3) | |
228 | local m2= Mesh(a2,3,v1/3,v2/3,v3/3) | |
229 | local m3= Mesh(a3,3,v1/3,v2/3,v3/3) | |
230 | a.CFrame=cfr | |
231 | a2.CFrame=cfr*ca(math.random(),math.random(),math.random()) | |
232 | a3.CFrame=cfr*ca(math.random(),math.random(),math.random()) | |
233 | for i,v in pairs(workspace:children()) do | |
234 | if v:IsA("Model") and v:findFirstChild("Humanoid") then | |
235 | if v:findFirstChild("Head") and v:findFirstChild("Torso") then | |
236 | if (v:findFirstChild("Torso").Position - a.Position).magnitude < rng and v.Name ~= pchar.Name then | |
237 | v.Humanoid.Health=v.Humanoid.Health-dmg | |
238 | end | |
239 | end | |
240 | end | |
241 | end | |
242 | Spawn(function() | |
243 | while wait() do | |
244 | if a.Transparency >= 1 then a:Destroy() a2:Destroy() a3:Destroy() break end | |
245 | m.Scale=m.Scale+Vector3.new(0.1,0.1,0.1) | |
246 | m2.Scale=m2.Scale+Vector3.new(0.1,0.1,0.1) | |
247 | m3.Scale=m3.Scale+Vector3.new(0.1,0.1,0.1) | |
248 | a.Transparency=a.Transparency+0.05 | |
249 | a2.Transparency=a2.Transparency+0.05 | |
250 | a3.Transparency=a3.Transparency+0.05 | |
251 | end | |
252 | end) | |
253 | end | |
254 | ||
255 | so = function(id,par,lo,pi) | |
256 | s = Instance.new("Sound",par) s.Looped=lo s.Pitch=pi | |
257 | s.SoundId = "http://roblox.com/asset/?id="..id s:play() | |
258 | return s | |
259 | end | |
260 | ||
261 | Lightning = function(Start,End,Times,Offset,Color,Thickness,Transparency) | |
262 | local magz = (Start - End).magnitude local curpos = Start local trz = {-Offset,Offset} | |
263 | for i=1,Times do | |
264 | local li = Instance.new("Part",workspace) | |
265 | li.TopSurface =0 | |
266 | li.BottomSurface = 0 | |
267 | li.Anchored = true | |
268 | li.Transparency = Transparency or 0.4 | |
269 | li.BrickColor = BrickColor.new(Color) | |
270 | li.formFactor = "Custom" | |
271 | li.CanCollide = false | |
272 | li.Size = Vector3.new(Thickness,Thickness,magz/Times) | |
273 | local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)]) | |
274 | local trolpos = CFrame.new(curpos,End)*CFrame.new(0,0,magz/Times).p+ofz | |
275 | if Times == i then | |
276 | local magz2 = (curpos - End).magnitude li.Size = Vector3.new(Thickness,Thickness,magz2) | |
277 | li.CFrame = CFrame.new(curpos,End)*CFrame.new(0,0,-magz2/2) | |
278 | else | |
279 | li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2) | |
280 | end | |
281 | curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p game.Debris:AddItem(li,0.01) | |
282 | end | |
283 | end | |
284 | ||
285 | Lightning = function(Start,End,Times,Offset,Color,Thickness) | |
286 | local magz = (Start - End).magnitude local curpos = Start local trz = {-Offset,Offset} | |
287 | for i=1,Times do | |
288 | local li = Instance.new("Part",workspace) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true li.Transparency = 0 li.BrickColor = Color li.Material="Neon" | |
289 | li.formFactor = "Custom" li.CanCollide = false li.Size = Vector3.new(Thickness,Thickness,magz/Times) local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)]) | |
290 | local trolpos = CFrame.new(curpos,End)*CFrame.new(0,0,magz/Times).p+ofz | |
291 | if Times == i then | |
292 | local magz2 = (curpos - End).magnitude li.Size = Vector3.new(Thickness,Thickness,magz2) | |
293 | li.CFrame = CFrame.new(curpos,End)*CFrame.new(0,0,-magz2/2) | |
294 | else | |
295 | li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2) | |
296 | end | |
297 | curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p Spawn(function() for i=1,10 do wait() li.Transparency = li.Transparency+.1 end li:Destroy() end) | |
298 | end | |
299 | end | |
300 | ||
301 | function skul(v) | |
302 | if v:findFirstChild("Torso") ~= nil then | |
303 | for i=1,30 do | |
304 | local prt= Part(1,.2,1,'Black',0,true,false,workspace) | |
305 | prt.Material='Concrete' | |
306 | prt.CFrame=v.Torso.CFrame*CFrame.new(math.random(-30,30)/10,math.random(-20,30)/10,math.random(-20,20)/10) | |
307 | game.Debris:AddItem(prt,math.random(50,70)/10) | |
308 | end | |
309 | ypcall(function()v.Head.face:Destroy()end) | |
310 | local ms= Mesh(v.Head,'http://www.roblox.com/asset/?id=4770583',3.2,3.2,3.2) | |
311 | ms.TextureId='http://www.roblox.com/asset/?id=4770560' | |
312 | local ded=so('16433289',v.Head,false,1,1) | |
313 | for _,a in pairs(v:GetChildren()) do if a.Name ~= 'Head' and a.Name ~= 'Humanoid' then a:remove() end end | |
314 | end | |
315 | end | |
316 | ||
317 | function connectsworddmg() | |
318 | for i=1,#sworddmg do | |
319 | dodmg=sworddmg[i].Touched:connect(function(hit) | |
320 | if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent.Name ~= pchar.Name and hitdeb==false then | |
321 | hitdeb=true | |
322 | hit.Parent.Humanoid.Health=hit.Parent.Humanoid.Health-10 | |
323 | wait(.1) | |
324 | hitdeb=false | |
325 | end | |
326 | end) | |
327 | table.insert(dmgs,dodmg) | |
328 | end | |
329 | end | |
330 | ||
331 | function disconnectsworddmg() | |
332 | for i=1,#dmgs do | |
333 | dmgs[i]:disconnect() | |
334 | end | |
335 | dmgs={} | |
336 | end | |
337 | ||
338 | function mgblock(pa,cfr,tm,col1,col2,sz,wa) | |
339 | local cols={col1,col2} | |
340 | Spawn(function() | |
341 | for i=1,tm do | |
342 | local a= Part(1,1,1,cols[math.random(1,2)],0,false,true,pchar) | |
343 | curre=a | |
344 | local v1,v2,v3=sz.x,sz.y,sz.z | |
345 | local m= Mesh(a,3,v1,v2,v3) | |
346 | a.CFrame=pa.CFrame*cfr*CFrame.Angles(math.random(),math.random(),math.random()) | |
347 | Spawn(function() | |
348 | while wait() do | |
349 | if a.Transparency >= 1 then a:Destroy() break end | |
350 | m.Scale=m.Scale-Vector3.new(.1,0.1,0.1) | |
351 | a.CFrame=a.CFrame*CFrame.Angles(math.rad(2),math.rad(2),math.rad(2))+Vector3.new(0,0.1,0) | |
352 | a.Transparency=a.Transparency+0.05 | |
353 | end | |
354 | end) | |
355 | wait(wa) | |
356 | end | |
357 | end) | |
358 | return curre | |
359 | end | |
360 | ||
361 | Tween = function(Weld, Stop, Step,a) | |
362 | ypcall(function() | |
363 | local func = function() | |
364 | local Start = Weld.C1 | |
365 | local X1, Y1, Z1 = Start:toEulerAnglesXYZ() | |
366 | local Stop = Stop | |
367 | local X2, Y2, Z2 = Stop:toEulerAnglesXYZ() | |
368 | Spawn(function() | |
369 | for i = 0, 1, Step or .1 do | |
370 | wait() | |
371 | Weld.C1 = cf( (Start.p.X * (1 - i)) + (Stop.p.X * i),(Start.p.Y * (1 - i)) + (Stop.p.Y * i),(Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * ca((X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),(Z1 * (1 - i)) + (Z2 * i) ) | |
372 | end | |
373 | Weld.C1 = Stop | |
374 | end) | |
375 | end | |
376 | if a then | |
377 | coroutine.wrap(func)() | |
378 | else | |
379 | func() | |
380 | end | |
381 | end) | |
382 | end | |
383 | ||
384 | local function getAngles(cf) | |
385 | local sx,sy,sz,m00,m01,m02,m10,m11,m12,m20,m21,m22 = cf:components() | |
386 | return atan2(-m12,m22),asin(m02),atan2(-m01,m00) | |
387 | end | |
388 | ||
389 | Lerp = { | |
390 | Number = function(C1,C2,inc) | |
391 | return C1 + (C2 - C1) * inc | |
392 | end; | |
393 | CFrame = function(a,b,m) | |
394 | local c,d={a:components()},{b:components()} | |
395 | table.foreach(c,function(a,b)c[a]=c[a]+(d[a]-c[a])*m end) | |
396 | return CFrame.new(unpack(c)) | |
397 | end; | |
398 | } | |
399 | ||
400 | local function genWeld(a,b) | |
401 | local w = Instance.new("Weld",a) | |
402 | w.Part0 = a | |
403 | w.Part1 = b | |
404 | return w | |
405 | end | |
406 | ||
407 | local Neck = genWeld(pchar.Torso,pchar.Head) | |
408 | ||
409 | local LeftShoulder = genWeld(pchar.Torso,pchar['Left Arm']) | |
410 | ||
411 | local RightShoulder = genWeld(pchar.Torso,pchar['Right Arm']) | |
412 | ||
413 | local LeftHip = genWeld(pchar.Torso,pchar['Left Leg']) | |
414 | ||
415 | local RightHip = genWeld(pchar.Torso,pchar['Right Leg']) | |
416 | ||
417 | local RootJoint = genWeld(pchar.HumanoidRootPart,pchar.Torso) | |
418 | ||
419 | Neck.C0 = CFrame.new(0,1,0) | |
420 | ||
421 | Neck.C1 = CFrame.new(0,-0.5,0) | |
422 | ||
423 | LeftShoulder.C0 = CFrame.new(-1,0.5,0) | |
424 | ||
425 | LeftShoulder.C1 = CFrame.new(0.5,0.5,0) | |
426 | ||
427 | RightShoulder.C0 = CFrame.new(1,0.5,0) | |
428 | ||
429 | RightShoulder.C1 = CFrame.new(-0.5,0.5,0) | |
430 | ||
431 | LeftHip.C0 = CFrame.new(-1,-1,0) | |
432 | ||
433 | LeftHip.C1 = CFrame.new(-0.5,1,0) | |
434 | ||
435 | RightHip.C0 = CFrame.new(1,-1,0) | |
436 | ||
437 | RightHip.C1 = CFrame.new(0.5,1,0) | |
438 | ||
439 | RootJoint.C0 = CFrame.new(0,0,0) * CFrame.Angles(-math.pi/2,0,math.pi) | |
440 | ||
441 | RootJoint.C1 = CFrame.new(0,0,0) * CFrame.Angles(-math.pi/2,0,math.pi) | |
442 | ||
443 | local mo=Instance.new("Model",pchar) | |
444 | ||
445 | local mpa1= Part(1.1,.3,1.1,'Black',0,false,false,mo) | |
446 | ||
447 | Mesh(mpa1,'rbxasset://fonts/torso.mesh',.55,.05,1.1) | |
448 | ||
449 | local mwl1= Weld(mpa1,pchar['Right Arm'],0,-.75,0,0,0,0,mo) | |
450 | ||
451 | local pa= Part(1.1,.3,1.1,'Black',0,false,false,mo) | |
452 | ||
453 | Mesh(pa,'rbxasset://fonts/torso.mesh',.55,.05,1.1) | |
454 | ||
455 | Weld(pa,mpa1,0,.75,0,0,0,0,mo) | |
456 | ||
457 | local pa= Part(1.1,.3,1.1,'Black',0,false,false,mo) | |
458 | ||
459 | Mesh(pa,'rbxasset://fonts/torso.mesh',.55,.05,1.2) | |
460 | ||
461 | Weld(pa,mpa1,0,.375,0,rad(30),0,0,mo) | |
462 | ||
463 | local pa= Part(1.1,.3,1.1,'Black',0,false,false,mo) | |
464 | ||
465 | Mesh(pa,'rbxasset://fonts/torso.mesh',.55,.05,1.2) | |
466 | ||
467 | Weld(pa,mpa1,0,.375,0,-rad(30),0,0,mo) | |
468 | ||
469 | local pa= Part(1.1,.3,1.1,'Black',0,false,false,mo) | |
470 | ||
471 | Mesh(pa,'rbxasset://fonts/torso.mesh',.6,.05,1.1) | |
472 | ||
473 | Weld(pa,mpa1,0,.375,0,0,0,rad(30),mo) | |
474 | ||
475 | local pa= Part(1.1,.3,1.1,'Black',0,false,false,mo) | |
476 | ||
477 | Mesh(pa,'rbxasset://fonts/torso.mesh',.6,.05,1.1) | |
478 | ||
479 | Weld(pa,mpa1,0,.375,0,0,0,-rad(30),mo) | |
480 | ||
481 | local hol= Part(1,1,1,'',0,false,false,mo) | |
482 | ||
483 | Mesh(hol,1,.4,.5,.4) | |
484 | ||
485 | Weld(hol,mpa1,0,.375,-.31,rad(90),0,0,mo) | |
486 | ||
487 | local pa= Part(1,1,1,'',0,false,false,mo) | |
488 | ||
489 | Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.4,.4,.4) | |
490 | ||
491 | Weld(pa,mpa1,0,.375,-.55,0,0,0,mo) | |
492 | ||
493 | local ball= Part(1,1,1,'White',0,false,false,mo) | |
494 | ||
495 | Mesh(ball,'http://www.roblox.com/asset/?id=1185246',.5,.5,.5) | |
496 | ||
497 | local ballweld= Weld(ball,mpa1,0,.375,-.55,0,0,0,mo) | |
498 | ||
499 | for i=1,5 do | |
500 | ||
501 | local spk= Part(1,1,1,'White',0,false,false,mo) | |
502 | ||
503 | Mesh(spk,'http://www.roblox.com/asset/?id=1778999',.2,.25,.2) | |
504 | ||
505 | local spkw= Weld(spk,ball,0,0,0.25,rad(90),0,0,spk) | |
506 | ||
507 | table.insert(animationprts,spkw) | |
508 | ||
509 | end | |
510 | ||
511 | ||
512 | local function newLerpTo(weld) | |
513 | return { | |
514 | Weld = weld; | |
515 | To = weld.C0; | |
516 | Cache = weld.C0; | |
517 | Speed = 0.2; | |
518 | } | |
519 | end | |
520 | ||
521 | local function opnbl(v) | |
522 | if v=='t' then | |
523 | Tween(ballweld,cf(0,.375,-1.2),.1) | |
524 | for i=1,#animationprts do | |
525 | if i==1 then | |
526 | Tween(animationprts[i],cf(0,0,.25)*ca(rad(90),0,0),.1) | |
527 | elseif i==2 then | |
528 | Tween(animationprts[i],cf(0,.25,0)*ca(0,0,0),.1) | |
529 | elseif i==3 then | |
530 | Tween(animationprts[i],cf(0,-.25,0)*ca(-rad(180),0,0),.1) | |
531 | elseif i==4 then | |
532 | Tween(animationprts[i],cf(.25,0,0)*ca(0,0,-rad(90)),.1) | |
533 | elseif i==5 then | |
534 | Tween(animationprts[i],cf(-.25,0,0)*ca(0,0,rad(90)),.1) | |
535 | end | |
536 | end | |
537 | elseif v=='f' then | |
538 | SetAnimData({Head=true,RightArm=false,LeftArm=false,RightLeg=true,LeftLeg=true,Torso=true}) | |
539 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(120),0,rad(50)) * CFrame.new(.2,-.5,0) | |
540 | wait(.25) | |
541 | Spawn(function() | |
542 | for i = 0,1,0.1 do wait() | |
543 | so('28445431',torso,false,20) | |
544 | ballweld.C1=ballweld.C1 *CFrame.Angles(0,0,i*2-0.0005) | |
545 | end | |
546 | end) | |
547 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,rad(40)) * CFrame.new(.2,-.5,0) | |
548 | wait(.25) | |
549 | SetAnimData({Head=true,RightArm=true,LeftArm=true,RightLeg=true,LeftLeg=true,Torso=true}) | |
550 | wait(.25) | |
551 | Tween(ballweld,cf(0,.375,-.55),.1) | |
552 | for i=1,#animationprts do | |
553 | Tween(animationprts[i],cf(0,0,.25)*ca(rad(90),0,0),.1) | |
554 | end | |
555 | end | |
556 | end | |
557 | ||
558 | local function build(what) | |
559 | if what=='Sniper' then | |
560 | wep=Instance.new('Model',mo) | |
561 | wep.Name='Sniper' | |
562 | mpa1= Part(1,.3,.3,'Dark stone grey',0,false,false,wep) | |
563 | mwl1= TWeld(mpa1,pchar['Right Arm'],0,-2,-.4,0,-pi/2,pi/2,wep) | |
564 | pa= Part(1,.4,.2,'Dark stone grey',0,false,false,wep) | |
565 | TWeld(pa,mpa1,0,-0.35,0,0,0,0,wep) | |
566 | pa= Part(.2,.75,.2,'Black',0,false,false,wep) | |
567 | Mesh(pa,1,1,1,1) | |
568 | TWeld(pa,mpa1,-.75,-0.4,0,0,0,rad(90),wep) | |
569 | pa= Part(.2,.75,.2,'Black',0,false,false,wep) | |
570 | Mesh(pa,1,1,1,1) | |
571 | TWeld(pa,mpa1,-1.3,-.15,0,0,0,rad(40),wep) | |
572 | pa= Part(2,.3,.3,'Dark stone grey',0,false,false,wep) | |
573 | TWeld(pa,mpa1,-.5,0.2,0,0,0,0,wep) | |
574 | pa= Part(.3,1.2,.3,'Black',0,false,false,wep) | |
575 | Mesh(pa,1,1,1,1) | |
576 | TWeld(pa,mpa1,-1.1,0.2,0,0,0,rad(90),wep) | |
577 | pa= Part(.1,2,.1,'Black',0,false,false,wep) | |
578 | Mesh(pa,1,1,1,1) | |
579 | TWeld(pa,mpa1,-2.6,0.2,0,0,0,rad(90),wep) | |
580 | brl= Part(.3,.2,.3,'Black',0,false,false,wep) | |
581 | Mesh(brl,1,1,.5,1) | |
582 | TWeld(brl,mpa1,-3.25,0.2,0,0,0,rad(90),wep) | |
583 | pa= Part(1.2,.2,.2,'Dark stone grey',0,false,false,wep) | |
584 | TWeld(pa,mpa1,-0.2,0.3,0,0,0,0,wep) | |
585 | pa= Part(1,1,1,'Black',0,false,false,wep) | |
586 | Mesh(pa,1,.1,.2,.1) | |
587 | TWeld(pa,mpa1,0,0.45,0,0,0,0,wep) | |
588 | pa= Part(1,1,1,'Black',0,false,false,wep) | |
589 | Mesh(pa,1,.1,.2,.1) | |
590 | TWeld(pa,mpa1,-.4,0.45,0,0,0,0,wep) | |
591 | pa= Part(1,1,1,'Black',0,false,false,wep) | |
592 | Mesh(pa,1,.2,.75,.2) | |
593 | TWeld(pa,mpa1,-.2,0.625,0,0,0,rad(90),wep) | |
594 | pa= Part(1,1,1,'Black',0,false,false,wep) | |
595 | Mesh(pa,1,.3,.2,.3) | |
596 | TWeld(pa,mpa1,.25,0.625,0,0,0,rad(90),wep) | |
597 | pa= Part(1,1,1,'Black',0,false,false,wep) | |
598 | Mesh(pa,1,.35,.2,.35) | |
599 | TWeld(pa,mpa1,-.8,0.625,0,0,0,rad(90),wep) | |
600 | pa= Part(1,1,1,'Black',0,false,false,wep) | |
601 | Mesh(pa,'http://www.roblox.com/asset/?id=1778999',.26,.2,.26) | |
602 | TWeld(pa,mpa1,-.55,0.625,0,0,0,-rad(90),wep) | |
603 | pa= Part(1,1,1,'Black',0,false,false,wep) | |
604 | Mesh(pa,3,.075,.2,.075) | |
605 | TWeld(pa,mpa1,-.875,0.8,0,0,0,0,wep) | |
606 | pa= Part(1,1,1,'Black',0,false,false,wep) | |
607 | Mesh(pa,3,.075,.2,.075) | |
608 | TWeld(pa,mpa1,.325,0.775,0,0,0,0,wep) | |
609 | pa= Part(1,1,1,'Black',0,false,false,wep) | |
610 | Mesh(pa,1,.35,.05,.35) | |
611 | TWeld(pa,mpa1,-.92,0.9,0,0,0,rad(90),wep) | |
612 | pa= Part(1,1,1,'Black',0,false,false,wep) | |
613 | Mesh(pa,1,.3,.05,.3) | |
614 | TWeld(pa,mpa1,.36,0.85,0,0,0,rad(90),wep) | |
615 | sld= Part(.1,.5,.1,'Black',0,false,false,wep) | |
616 | Mesh(sld,1,1,1,1) | |
617 | slider=TWeld(sld,mpa1,.4,0.2,0,0,0,rad(90),wep) | |
618 | pa= Part(1,1,1,'Black',0,false,false,wep) | |
619 | Mesh(pa,1,.1,.3,.1) | |
620 | TWeld(pa,sld,0,-0.18,0.15,rad(90),0,0,wep) | |
621 | bulleth= Part(.5,.2,.2,'Black',0,false,false,wep) | |
622 | TWeld(bulleth,mpa1,0,0.2,-.1,0,0,0,wep) | |
623 | pa= Part(1.5,.2,.3,'Dark stone grey',0,false,false,wep) | |
624 | TWeld(pa,mpa1,1.2,0,0,0,0,0,wep) | |
625 | pa= Part(1,.2,.2,'Dark stone grey',0,false,false,wep) | |
626 | TWeld(pa,mpa1,0.65,-.45,0,0,0,0,wep) | |
627 | pa= Part(.85,.2,.3,'Dark stone grey',0,false,false,wep) | |
628 | TWeld(pa,mpa1,1.04,-0.34,0,0,0,-rad(60),wep) | |
629 | pa= Part(.3,.2,.2,'Black',0,false,false,wep) | |
630 | Mesh(pa,3,1,.5,.5) | |
631 | TWeld(pa,mpa1,.8,-.2,0,0,0,rad(60),wep) | |
632 | pa= Part(.75,.2,.3,'Dark stone grey',0,false,false,wep) | |
633 | TWeld(pa,mpa1,1.55,-.7,0,0,0,0,wep) | |
634 | pa= Part(.2,.9,.3,'Dark stone grey',0,false,false,wep) | |
635 | TWeld(pa,mpa1,2,-.35,0,0,0,0,wep) | |
636 | clip= Part(.5,.5,.2,'Black',0,false,false,wep) | |
637 | Mesh(clip,3,1,1,.5) | |
638 | TWeld(clip,mpa1,0,-0.5,0,0,0,0,wep) | |
639 | byp= Part(.2,.4,.2,'Black',0,false,false,wep) | |
640 | Mesh(byp,1,.5,1,.5) | |
641 | TWeld(byp,mpa1,-1.5,0,0,rad(90),0,0,wep) | |
642 | pa= Part(.2,.2,.2,'Black',0,false,false,wep) | |
643 | Mesh(pa,1,1,.5,1) | |
644 | TWeld(pa,byp,0,0.15,0,0,0,0,wep) | |
645 | pa= Part(.2,.2,.2,'Black',0,false,false,wep) | |
646 | Mesh(pa,1,1,.5,1) | |
647 | TWeld(pa,byp,0,-0.15,0,0,0,0,wep) | |
648 | mv1= Part(.2,1,.2,'Black',0,false,false,wep) | |
649 | Mesh(mv1,1,.5,1,.5) | |
650 | TWeld(mv1,byp,-.55,-0.15,0.1,-rad(50),0,rad(100),wep) | |
651 | mv2= Part(.2,1,.2,'Black',0,false,false,wep) | |
652 | Mesh(mv2,1,.5,1,.5) | |
653 | TWeld(mv2,byp,-.55,0.15,0.1,rad(50),0,-rad(100),wep) | |
654 | pa= Part(.2,.2,.2,'Black',0,false,false,wep) | |
655 | Mesh(pa,1,.75,.4,.75) | |
656 | TWeld(pa,mv1,0,-0.1,0,0,0,0,wep) | |
657 | pa= Part(.2,.2,.2,'Black',0,false,false,wep) | |
658 | Mesh(pa,1,.75,.75,.75) | |
659 | TWeld(pa,mv1,0,0.1,0,0,0,0,wep) | |
660 | pa= Part(.2,.2,.2,'Black',0,false,false,wep) | |
661 | Mesh(pa,1,.9,.5,.9) | |
662 | TWeld(pa,mv1,0,0.5,0,0,0,0,wep) | |
663 | pa= Part(.2,.2,.2,'Black',0,false,false,wep) | |
664 | Mesh(pa,1,.75,.4,.75) | |
665 | TWeld(pa,mv2,0,0.1,0,0,0,0,wep) | |
666 | pa= Part(.2,.2,.2,'Black',0,false,false,wep) | |
667 | Mesh(pa,1,.75,.75,.75) | |
668 | TWeld(pa,mv2,0,-0.1,0,0,0,0,wep) | |
669 | pa= Part(.2,.2,.2,'Black',0,false,false,wep) | |
670 | Mesh(pa,1,.9,.5,.9) | |
671 | TWeld(pa,mv2,0,-0.5,0,0,0,0,wep) | |
672 | elseif what=='Sword' then | |
673 | wep=Instance.new('Model',mo) | |
674 | wep.Name='Sword' | |
675 | mpa1= Part(.25,1.2,.25,'Dark stone grey',0,false,false,wep) | |
676 | Mesh(mpa1,1,1,1,1) | |
677 | mwl1= TWeld(mpa1,pchar['Right Arm'],0,-1.2,-0.2,-pi/2,rad(53),0,wep) | |
678 | pa= Part(1,.4,.2,'Black',0,false,false,wep) | |
679 | Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.6,.3,.4) | |
680 | TWeld(pa,mpa1,0,-0.27,0,rad(90),rad(70),0,wep) | |
681 | pa= Part(1,.4,.2,'Black',0,false,false,wep) | |
682 | Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.6,.3,.4) | |
683 | TWeld(pa,mpa1,0,-0.27,0,rad(90),-rad(70),0,wep) | |
684 | pa= Part(1,.4,.2,'Black',0,false,false,wep) | |
685 | Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.3,.6,.4) | |
686 | TWeld(pa,mpa1,0,-0.27,0,rad(30),0,0,wep) | |
687 | pa= Part(1,.4,.2,'Black',0,false,false,wep) | |
688 | Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.3,.6,.4) | |
689 | TWeld(pa,mpa1,0,-0.27,0,-rad(30),0,0,wep) | |
690 | pa= Part(1,.4,.2,'Black',0,false,false,wep) | |
691 | Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.6,.3,.4) | |
692 | TWeld(pa,mpa1,0,0.27,0,rad(90),rad(70),0,wep) | |
693 | pa= Part(1,.4,.2,'Black',0,false,false,wep) | |
694 | Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.6,.3,.4) | |
695 | TWeld(pa,mpa1,0,0.27,0,rad(90),-rad(70),0,wep) | |
696 | pa= Part(1,.4,.2,'Black',0,false,false,wep) | |
697 | Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.3,.6,.4) | |
698 | TWeld(pa,mpa1,0,0.27,0,rad(30),0,0,wep) | |
699 | pa= Part(1,.4,.2,'Black',0,false,false,wep) | |
700 | Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.3,.6,.4) | |
701 | TWeld(pa,mpa1,0,0.27,0,-rad(30),0,0,wep) | |
702 | blade1= Part(.5,1.75,.2,'Dark stone grey',0,false,false,wep) | |
703 | Mesh(blade1,3,1,1,.5) | |
704 | TWeld(blade1,mpa1,0,1.5,0,0,0,0,wep) | |
705 | blade2= Part(.3,.75,.2,'Dark stone grey',0,false,false,wep) | |
706 | Mesh(blade2,3,1,1,.5) | |
707 | TWeld(blade2,mpa1,0,2.75,0,0,0,0,wep) | |
708 | blade3= Part(.435,.75,.2,'Dark stone grey',0,false,false,wep) | |
709 | Mesh(blade3,3,1,1,.5) | |
710 | TWeld(blade3,mpa1,0,3.5,0,0,0,0,wep) | |
711 | table.insert(sworddmg,blade1) | |
712 | table.insert(sworddmg,blade2) | |
713 | table.insert(sworddmg,blade3) | |
714 | pa= Part(.2,1.75,.2,'Black',0,false,false,wep) | |
715 | Mesh(pa,3,.5,1,.5) | |
716 | TWeld(pa,mpa1,.25,1.5,0,0,rad(45),0,wep) | |
717 | pa= Part(.2,1.75,.2,'Black',0,false,false,wep) | |
718 | Mesh(pa,3,.5,1,.5) | |
719 | TWeld(pa,mpa1,-.25,1.5,0,0,-rad(45),0,wep) | |
720 | pa= Part(.2,.75,.2,'Black',0,false,false,wep) | |
721 | Mesh(pa,3,.5,1,.5) | |
722 | TWeld(pa,mpa1,.15,2.75,0,0,rad(45),0,wep) | |
723 | pa= Part(.2,.75,.2,'Black',0,false,false,wep) | |
724 | Mesh(pa,3,.5,1,.5) | |
725 | TWeld(pa,mpa1,-.15,2.75,0,0,-rad(45),0,wep) | |
726 | pa= Part(.2,.75,.2,'Black',0,false,false,wep) | |
727 | Mesh(pa,3,.5,1,.5) | |
728 | TWeld(pa,mpa1,0.2175,3.5,0,0,rad(45),0,wep) | |
729 | pa= Part(.2,.75,.2,'Black',0,false,false,wep) | |
730 | Mesh(pa,3,.5,1,.5) | |
731 | TWeld(pa,mpa1,-0.2175,3.5,0,0,-rad(45),0,wep) | |
732 | pa= Part(.2,.75,.2,'Black',0,false,false,wep) | |
733 | Mesh(pa,3,1,1,1) | |
734 | TWeld(pa,mpa1,.2,.75,.1,0,rad(45),-rad(30),wep) | |
735 | pa= Part(.2,.75,.2,'Black',0,false,false,wep) | |
736 | Mesh(pa,3,1,1,1) | |
737 | TWeld(pa,mpa1,.2,.75,-.1,0,-rad(45),-rad(30),wep) | |
738 | pa= Part(.2,.75,.2,'Black',0,false,false,wep) | |
739 | Mesh(pa,3,1,1,1) | |
740 | TWeld(pa,mpa1,-.2,.75,.1,0,-rad(45),rad(30),wep) | |
741 | pa= Part(.2,.75,.2,'Black',0,false,false,wep) | |
742 | Mesh(pa,3,1,1,1) | |
743 | TWeld(pa,mpa1,-.2,.75,-.1,0,rad(45),rad(30),wep) | |
744 | pa= Part(.2,.75,.2,'Black',0,false,false,wep) | |
745 | Mesh(pa,'http://www.roblox.com/Asset/?id=9756362',.4,1,.15) | |
746 | TWeld(pa,mpa1,0,3.85,0,0,0,0,wep) | |
747 | elseif what=='HBoard' then | |
748 | wep=Instance.new('Model',mo) | |
749 | wep.Name='Sword' | |
750 | mpa1= Part(.25,1.2,.25,'Black',0,false,false,wep) | |
751 | Mesh(mpa1,1,1,1,1) | |
752 | mwl1= TWeld(mpa1,pchar['Right Arm'],0,-1,0,pi/2,0,0,wep) | |
753 | pa= Part(.25,1.2,.6,'Dark stone grey',0,false,false,wep) | |
754 | TWeld(pa,mpa1,0,1,0,0,0,0,wep) | |
755 | pa= Part(.25,1.2,.6,'Dark stone grey',0,false,false,wep) | |
756 | TWeld(pa,mpa1,0,-1,0,0,0,0,wep) | |
757 | pa= wPart(.25,1.2,.3,'Dark stone grey',0,false,false,wep) | |
758 | TWeld(pa,mpa1,0,-1,-.45,0,0,0,wep) | |
759 | pa= wPart(.25,1.2,.3,'Dark stone grey',0,false,false,wep) | |
760 | TWeld(pa,mpa1,0,-1,.45,0,pi,0,wep) | |
761 | pa= wPart(.25,1.2,.3,'Dark stone grey',0,false,false,wep) | |
762 | TWeld(pa,mpa1,0,1,-.45,0,0,pi,wep) | |
763 | pa= wPart(.25,1.2,.3,'Dark stone grey',0,false,false,wep) | |
764 | TWeld(pa,mpa1,0,1,.45,0,pi,pi,wep) | |
765 | pa= Part(.25,.8,.2,'Dark stone grey',0,false,false,wep) | |
766 | TWeld(pa,mpa1,0,2,.5,0,0,0,wep) | |
767 | pa= Part(.25,.8,.2,'Dark stone grey',0,false,false,wep) | |
768 | TWeld(pa,mpa1,0,2,-.5,0,0,0,wep) | |
769 | pa= Part(.25,.8,.2,'Dark stone grey',0,false,false,wep) | |
770 | TWeld(pa,mpa1,0,-2,.5,0,0,0,wep) | |
771 | pa= Part(.25,.8,.2,'Dark stone grey',0,false,false,wep) | |
772 | TWeld(pa,mpa1,0,-2,-.5,0,0,0,wep) | |
773 | pa= wPart(.25,.6,.2,'Dark stone grey',0,false,false,wep) | |
774 | TWeld(pa,mpa1,0,2.5,.3,pi/2,0,0,wep) | |
775 | pa= wPart(.25,.6,.2,'Dark stone grey',0,false,false,wep) | |
776 | TWeld(pa,mpa1,0,2.5,-.3,-pi/2,pi,0,wep) | |
777 | pa= wPart(.25,.6,.2,'Dark stone grey',0,false,false,wep) | |
778 | TWeld(pa,mpa1,0,-2.5,.3,pi/2,pi,0,wep) | |
779 | pa= wPart(.25,.6,.2,'Dark stone grey',0,false,false,wep) | |
780 | TWeld(pa,mpa1,0,-2.5,-.3,-pi/2,0,0,wep) | |
781 | pa= wPart(.2,1.18,.3,'Black',0,false,false,wep) | |
782 | TWeld(pa,mpa1,0,-1,-.46,0,0,0,wep) | |
783 | pa= wPart(.2,1.18,.3,'Black',0,false,false,wep) | |
784 | TWeld(pa,mpa1,0,-1,.46,0,pi,0,wep) | |
785 | pa= wPart(.2,1.18,.3,'Black',0,false,false,wep) | |
786 | TWeld(pa,mpa1,0,1,-.46,0,0,pi,wep) | |
787 | pa= wPart(.2,1.18,.3,'Black',0,false,false,wep) | |
788 | TWeld(pa,mpa1,0,1,.46,0,pi,pi,wep) | |
789 | pa= Part(.2,1.2,.6,'Black',0,false,false,wep) | |
790 | TWeld(pa,mpa1,0,.99,0,0,0,0,wep) | |
791 | pa= Part(.2,1.2,.6,'Black',0,false,false,wep) | |
792 | TWeld(pa,mpa1,0,-.99,0,0,0,0,wep) | |
793 | pa= Part(.2,.8,.2,'Black',0,false,false,wep) | |
794 | TWeld(pa,mpa1,0,2,.51,0,0,0,wep) | |
795 | pa= Part(.2,.8,.2,'Black',0,false,false,wep) | |
796 | TWeld(pa,mpa1,0,2,-.51,0,0,0,wep) | |
797 | pa= Part(.2,.8,.2,'Black',0,false,false,wep) | |
798 | TWeld(pa,mpa1,0,-2,.51,0,0,0,wep) | |
799 | pa= Part(.2,.8,.2,'Black',0,false,false,wep) | |
800 | TWeld(pa,mpa1,0,-2,-.51,0,0,0,wep) | |
801 | pa= wPart(.2,.6,.2,'Black',0,false,false,wep) | |
802 | TWeld(pa,mpa1,0,2.51,.3,pi/2,0,0,wep) | |
803 | pa= wPart(.2,.6,.2,'Black',0,false,false,wep) | |
804 | TWeld(pa,mpa1,0,2.51,-.3,-pi/2,pi,0,wep) | |
805 | pa= wPart(.2,.6,.2,'Black',0,false,false,wep) | |
806 | TWeld(pa,mpa1,0,-2.51,.3,pi/2,pi,0,wep) | |
807 | pa= wPart(.2,.6,.2,'Black',0,false,false,wep) | |
808 | TWeld(pa,mpa1,0,-2.51,-.3,-pi/2,0,0,wep) | |
809 | whel1= Part(.2,.7,.2,'Dark stone grey',0,false,false,wep) | |
810 | Mesh(whel1,3,.5,1,.5) | |
811 | whel1w=TWeld(whel1,mpa1,0,-2,0,0,0,0,wep) | |
812 | whel2= Part(.2,.7,.2,'Dark stone grey',0,false,false,wep) | |
813 | Mesh(whel2,3,.5,1,.5) | |
814 | whel2w=TWeld(whel2,mpa1,0,2,0,0,0,0,wep) | |
815 | pa= Part(.2,.2,.2,'Black',0,false,false,wep) | |
816 | Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.75,.75,1) | |
817 | TWeld(pa,whel1,0,0,0,0,pi/2,0,wep) | |
818 | pa= Part(.2,.2,.2,'Black',0,false,false,wep) | |
819 | Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.75,.75,1) | |
820 | TWeld(pa,whel2,0,0,0,0,pi/2,0,wep) | |
821 | end | |
822 | end | |
823 | ||
824 | Used={Head=false,RightArm=false,LeftArm=false,RightLeg=false,LeftLeg=false,Torso=false} | |
825 | ||
826 | function SetAnimData(IF_DATA_IS_USED) | |
827 | Used = IF_DATA_IS_USED | |
828 | end | |
829 | ||
830 | function CheckAnimData(ANIM_TAB,DO_ANIM) | |
831 | anglespeed=Anims[ANIM_TAB][DO_ANIM].speed or 1 | |
832 | if Used.Head == true then | |
833 | LerpTo.Neck.To = LerpTo.Neck.Cache * Anims[ANIM_TAB][DO_ANIM].Head | |
834 | end | |
835 | if Used.RightArm == true then | |
836 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * Anims[ANIM_TAB][DO_ANIM].RightArm | |
837 | end | |
838 | if Used.LeftArm == true then | |
839 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * Anims[ANIM_TAB][DO_ANIM].LeftArm | |
840 | end | |
841 | if Used.RightLeg == true then | |
842 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * Anims[ANIM_TAB][DO_ANIM].RightLeg | |
843 | end | |
844 | if Used.LeftLeg == true then | |
845 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * Anims[ANIM_TAB][DO_ANIM].LeftLeg | |
846 | end | |
847 | if Used.Torso == true then | |
848 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * Anims[ANIM_TAB][DO_ANIM].Torso | |
849 | end | |
850 | end | |
851 | LerpTo = { | |
852 | Neck = newLerpTo(Neck); | |
853 | LeftArm = newLerpTo(LeftShoulder); | |
854 | RightArm = newLerpTo(RightShoulder); | |
855 | LeftLeg = newLerpTo(LeftHip); | |
856 | RightLeg = newLerpTo(RightHip); | |
857 | RootJoint = newLerpTo(RootJoint); | |
858 | } | |
859 | function onKeyDown(key) | |
860 | key = key:lower() | |
861 | if deb==true then return end | |
862 | if key == "z" then | |
863 | z= not z | |
864 | if z then | |
865 | mode='Sniper' | |
866 | opnbl('f') | |
867 | build('Sniper') | |
868 | SetAnimData({Head=false,RightArm=false,LeftArm=false,RightLeg=true,LeftLeg=true,Torso=false}) | |
869 | wait(.3) | |
870 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(-rad(30),rad(60),0) | |
871 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90)) | |
872 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,-rad(50)) * CFrame.new(.2,-.5,0) | |
873 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(80)) * CFrame.new(.2,-.5,0) | |
874 | else | |
875 | mode='' | |
876 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) | |
877 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0) | |
878 | SetAnimData({Head=true,RightArm=true,LeftArm=true,RightLeg=true,LeftLeg=true,Torso=true}) | |
879 | for i=1,#spawn do | |
880 | Tween(spawn[i],cf(0,0,0),.05) | |
881 | end | |
882 | wait(.8) | |
883 | spawn={} | |
884 | wep:Destroy() | |
885 | opnbl('t') | |
886 | end | |
887 | elseif key == "x" then | |
888 | x= not x | |
889 | if x then | |
890 | mode='Sword' | |
891 | opnbl('f') | |
892 | build('Sword') | |
893 | wait(.3) | |
894 | CurrentActiveAnim="Sword" | |
895 | else | |
896 | mode='' | |
897 | CurrentActiveAnim="Equip" | |
898 | sworddmg={} | |
899 | for i=1,#spawn do | |
900 | Tween(spawn[i],cf(0,0,0),.05) | |
901 | end | |
902 | wait(.8) | |
903 | spawn={} | |
904 | wep:Destroy() | |
905 | opnbl('t') | |
906 | end | |
907 | elseif key == "v" then | |
908 | v= not v | |
909 | if v then | |
910 | mode='Orb' | |
911 | SetAnimData({Head=true,RightArm=false,LeftArm=false,RightLeg=true,LeftLeg=true,Torso=true}) | |
912 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(60),0,rad(20)) | |
913 | mgblock(pchar['Left Arm'],CFrame.new(0,-1,0),10,"Dark stone grey","Light stone grey",Vector3.new(1.25,1.25,1.25),.1) | |
914 | so('2974000',torso,false,.75,2) | |
915 | for i=1,20 do wait(.05) | |
916 | Lightning(pchar['Left Arm'].CFrame*CFrame.new(0,-1,0).p,ball.Position,math.random(5,10),math.random(-2.5,2.5),BrickColor.new("Black"),0.2) | |
917 | end | |
918 | CurrentActiveAnim="Orb" | |
919 | for i=1,#animationprts do | |
920 | animationprts[i].Parent.Transparency=1 | |
921 | end | |
922 | ball.Transparency=1 | |
923 | so('161006033',torso,false,1,2) | |
924 | pro = Part(1,1,1,'White',0,false,true,mo) | |
925 | pro.CFrame=ball.CFrame | |
926 | Mesh(pro,'http://www.roblox.com/asset/?id=1185246',.5,.5,.5) | |
927 | SetAnimData({Head=true,RightArm=true,LeftArm=true,RightLeg=true,LeftLeg=true,Torso=true}) | |
928 | for i=1,6 do | |
929 | local spk= Part(1,1,1,'White',0,false,true,mo) | |
930 | Mesh(spk,'http://www.roblox.com/asset/?id=1778999',.2,.25,.2) | |
931 | table.insert(spkparts,spk) | |
932 | end | |
933 | bl=true | |
934 | else | |
935 | so('161006033',torso,false,.8,2) | |
936 | mode='' | |
937 | for i=1,10 do wait() | |
938 | for i=1,#animationprts do | |
939 | animationprts[i].Parent.Transparency=animationprts[i].Parent.Transparency-.1 | |
940 | end | |
941 | ball.Transparency=ball.Transparency-.1 | |
942 | for i=1,#spkparts do | |
943 | spkparts[i].Transparency=spkparts[i].Transparency+.1 | |
944 | end | |
945 | pro.Transparency=pro.Transparency-.1 | |
946 | end | |
947 | for i=1,#spkparts do | |
948 | spkparts[i]:Destroy() | |
949 | end | |
950 | pro:Destroy() | |
951 | spkparts={} | |
952 | bl=false | |
953 | CurrentActiveAnim="Equip" | |
954 | end | |
955 | elseif key == "c" then | |
956 | c= not c | |
957 | if c then | |
958 | mode='HBoard' | |
959 | opnbl('f') | |
960 | build('HBoard') | |
961 | else | |
962 | mode='' | |
963 | sworddmg={} | |
964 | for i=1,#spawn do | |
965 | Tween(spawn[i],cf(0,0,0),.05) | |
966 | end | |
967 | wait(.8) | |
968 | spawn={} | |
969 | wep:Destroy() | |
970 | opnbl('t') | |
971 | end | |
972 | elseif key == "r" then | |
973 | if mode=='Sniper' then | |
974 | if SAmmo==0 then | |
975 | deb=true | |
976 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(30),0) | |
977 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90)) | |
978 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,0) * CFrame.new(.2,-.5,0) | |
979 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(50)) * CFrame.new(.2,-.5,0) | |
980 | wait(.3) | |
981 | so('2697295',torso,false,.4) | |
982 | newc=clip:Clone() | |
983 | newc.Parent=workspace | |
984 | newc.CFrame=clip.CFrame | |
985 | newc:BreakJoints() | |
986 | newc.CanCollide=true | |
987 | game.Debris:AddItem(newc,math.random(7,15)) | |
988 | clip.Transparency=1 | |
989 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(60),0,0) * CFrame.new(.2,-.5,0) | |
990 | wait(.2) | |
991 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(-rad(20),0,rad(20)) * CFrame.new(.2,-.5,0) | |
992 | wait(.1) | |
993 | newc= Part(.5,.5,.2,'Black',0,false,false,mo) | |
994 | Mesh(newc,3,1,1,.5) | |
995 | Weld(newc,pchar['Left Arm'],0,-1,-0.5,rad(90),0,0,mo) | |
996 | wait(.1) | |
997 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(60),0,0) * CFrame.new(.2,-.5,0) | |
998 | wait(.2) | |
999 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,0) * CFrame.new(.2,-.5,0) | |
1000 | wait(.05) | |
1001 | so('2697295',torso,false,.5) | |
1002 | newc:Destroy() | |
1003 | clip.Transparency=0 | |
1004 | wait(.2) | |
1005 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(-rad(30),rad(60),0) | |
1006 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90)) | |
1007 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,-rad(50)) * CFrame.new(.2,-.5,0) | |
1008 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(80)) * CFrame.new(.2,-.5,0) | |
1009 | SAmmo=7 | |
1010 | wait(.4) | |
1011 | deb=false | |
1012 | end | |
1013 | elseif mode == "Orb" then | |
1014 | if tov then return end | |
1015 | rov=false | |
1016 | so('10209640',torso,false,.5,1) | |
1017 | SetAnimData({Head=false,RightArm=false,LeftArm=false,RightLeg=true,LeftLeg=true,Torso=false}) | |
1018 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,rad(90)) | |
1019 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,-rad(90),0) | |
1020 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),-rad(90),0)*CFrame.new(-.5,0,-0.5) | |
1021 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(0,0,-rad(30)) | |
1022 | for i=1,20 do game:service'RunService'.RenderStepped:wait() | |
1023 | pro.CFrame=clerp(pro.CFrame,hol.CFrame*CFrame.new(0,-.25,0),.2) | |
1024 | end | |
1025 | pro.CFrame=hol.CFrame*CFrame.new(0,-.25,0) | |
1026 | sides=false | |
1027 | for i=1,15 do game:service'RunService'.RenderStepped:wait() | |
1028 | spkparts[3].CFrame=clerp(spkparts[3].CFrame,pro.CFrame*cf(-3.5,0,0)*ca(0,0,pi/2),.2) | |
1029 | spkparts[4].CFrame=clerp(spkparts[4].CFrame,pro.CFrame*cf(3.5,0,0)*ca(0,0,-pi/2),.2) | |
1030 | spkparts[5].CFrame=clerp(spkparts[5].CFrame,pro.CFrame*cf(0,0,3.5)*ca(pi/2,0,0),.2) | |
1031 | spkparts[6].CFrame=clerp(spkparts[6].CFrame,pro.CFrame*cf(0,0,-3.5)*ca(-pi/2,0,0),.2) | |
1032 | end | |
1033 | cfm=torso.CFrame*ca(0,-pi/2,0) | |
1034 | goto=cfm.lookVector*40 | |
1035 | local v = Instance.new("BodyVelocity",torso) | |
1036 | v.maxForce = v3(1,1,1)*9e9 | |
1037 | v.P = 2000 | |
1038 | v.velocity = goto | |
1039 | Spawn(function() | |
1040 | wait(1) | |
1041 | v:Destroy() | |
1042 | end) | |
1043 | Spawn(function() | |
1044 | for i=1,25 do | |
1045 | local efx= Part(1,1,1,'White',0,false,true,mo) | |
1046 | local m= Mesh(efx,'http://www.roblox.com/asset/?id=3270017',6,6,.1) | |
1047 | efx.CFrame=torso.CFrame*ca(0,pi/2,0) | |
1048 | Spawn(function() | |
1049 | for i=1,10 do wait() | |
1050 | efx.Transparency=efx.Transparency+.1 | |
1051 | end | |
1052 | efx:Destroy() | |
1053 | end) | |
1054 | wait() | |
1055 | end | |
1056 | end) | |
1057 | so('161006131',torso,false,1.25,4) | |
1058 | for i=1,64 do game:service'RunService'.RenderStepped:wait() | |
1059 | pro.CFrame=hol.CFrame*CFrame.new(0,-.25,0)*ca(0,rad(i*10),0) | |
1060 | spkparts[3].CFrame=pro.CFrame*cf(-3,0,0)*ca(0,0,pi/2) | |
1061 | spkparts[4].CFrame=pro.CFrame*cf(3,0,0)*ca(0,0,-pi/2) | |
1062 | spkparts[5].CFrame=pro.CFrame*cf(0,0,3)*ca(pi/2,0,0) | |
1063 | spkparts[6].CFrame=pro.CFrame*cf(0,0,-3)*ca(-pi/2,0,0) | |
1064 | end | |
1065 | wait() | |
1066 | for i=1,15 do game:service'RunService'.RenderStepped:wait() | |
1067 | spkparts[3].CFrame=clerp(spkparts[3].CFrame,pro.CFrame*cf(-.2,0,0)*ca(0,0,pi/2),.2) | |
1068 | spkparts[4].CFrame=clerp(spkparts[4].CFrame,pro.CFrame*cf(.2,0,0)*ca(0,0,-pi/2),.2) | |
1069 | spkparts[5].CFrame=clerp(spkparts[5].CFrame,pro.CFrame*cf(0,0,.2)*ca(pi/2,0,0),.2) | |
1070 | spkparts[6].CFrame=clerp(spkparts[6].CFrame,pro.CFrame*cf(0,0,-.2)*ca(-pi/2,0,0),.2) | |
1071 | end | |
1072 | SetAnimData({Head=true,RightArm=true,LeftArm=true,RightLeg=true,LeftLeg=true,Torso=true}) | |
1073 | sides=true | |
1074 | rov=true | |
1075 | elseif mode=='Sword' then | |
1076 | connectsworddmg() | |
1077 | deb=true | |
1078 | SetAnimData({Head=false,RightArm=false,LeftArm=true,RightLeg=true,LeftLeg=false,Torso=false}) | |
1079 | spn=0 | |
1080 | Tween(mwl1,cf(0,-1.2,-0.2)*ca(0,0,rad(220)),.2) | |
1081 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(40))* CFrame.new(-.2,-.25,0) | |
1082 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,rad(40))* CFrame.new(.2,-.25,0) | |
1083 | wait(.2) | |
1084 | Spawn(function() | |
1085 | for i=1,3 do | |
1086 | so('161006212',torso,false,1) | |
1087 | wait(.5) | |
1088 | end | |
1089 | end) | |
1090 | TrailOn=true | |
1091 | for i=1,36 do | |
1092 | spn=spn+30 | |
1093 | wait() | |
1094 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,rad(spn)) | |
1095 | end | |
1096 | TrailOn=false | |
1097 | SetAnimData({Head=false,RightArm=false,LeftArm=false,RightLeg=false,LeftLeg=false,Torso=false}) | |
1098 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,-rad(10)) * CFrame.new(0,.5,0) | |
1099 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(0,0,rad(10)) * CFrame.new(0,.5,0) | |
1100 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,0,-.5) | |
1101 | so('10209645',torso,false,.3) | |
1102 | wait(.2) | |
1103 | Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2,-rad(35),0),1) | |
1104 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(120),0,-rad(40))* CFrame.new(-.2,-.25,0) | |
1105 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(120),0,rad(40))* CFrame.new(.2,-.25,0) | |
1106 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,-rad(30)) | |
1107 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(0,0,rad(30)) | |
1108 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,0,7) | |
1109 | wait(.4) | |
1110 | Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2-rad(180),-rad(35),0),1) | |
1111 | wait(.1) | |
1112 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(40))* CFrame.new(-.2,-.25,0) | |
1113 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,rad(40))* CFrame.new(.2,-.25,0) | |
1114 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,0,-1) | |
1115 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,1,-1) | |
1116 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(-rad(50),0,0) * CFrame.new(0,0.5,0) | |
1117 | wait(.2) | |
1118 | so('138210320',torso,false,1) | |
1119 | explosion('Black','White',torso.CFrame,v3(20,20,20),10,30) | |
1120 | wait(.4) | |
1121 | Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2,rad(53),0),.2) | |
1122 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,0,0) | |
1123 | disconnectsworddmg() | |
1124 | TrailOn=false | |
1125 | SetAnimData({Head=true,RightArm=true,LeftArm=true,RightLeg=true,LeftLeg=true,Torso=true}) | |
1126 | legs=true | |
1127 | deb=false | |
1128 | elseif mode == 'HBoard' then | |
1129 | if skate == true then | |
1130 | end | |
1131 | end | |
1132 | elseif key=="e" then | |
1133 | if mode == "Orb" then | |
1134 | if tov then return end | |
1135 | rov=false | |
1136 | pos=mouse.Hit.p | |
1137 | so('10209640',torso,false,.5,1) | |
1138 | pro.CFrame=CFrame.new(pro.CFrame.x,pro.CFrame.y,pro.CFrame.z) | |
1139 | for i=1,20 do game:service'RunService'.RenderStepped:wait() | |
1140 | pro.CFrame=clerp(pro.CFrame,CFrame.new(pos),.2) | |
1141 | end | |
1142 | sides=false | |
1143 | for i=1,15 do game:service'RunService'.RenderStepped:wait() | |
1144 | spkparts[3].CFrame=clerp(spkparts[3].CFrame,pro.CFrame*cf(-6,0,0)*ca(0,0,pi/2),.2) | |
1145 | spkparts[4].CFrame=clerp(spkparts[4].CFrame,pro.CFrame*cf(6,0,0)*ca(0,0,-pi/2),.2) | |
1146 | spkparts[5].CFrame=clerp(spkparts[5].CFrame,pro.CFrame*cf(0,0,6)*ca(pi/2,0,0),.2) | |
1147 | spkparts[6].CFrame=clerp(spkparts[6].CFrame,pro.CFrame*cf(0,0,-6)*ca(-pi/2,0,0),.2) | |
1148 | end | |
1149 | so('169380495',torso,false,1,1) | |
1150 | torso.CFrame=CFrame.new(pro.CFrame.x,pro.CFrame.y,pro.CFrame.z)*cf(0,3,0) | |
1151 | wait(.2) | |
1152 | for i=1,15 do game:service'RunService'.RenderStepped:wait() | |
1153 | spkparts[3].CFrame=clerp(spkparts[3].CFrame,pro.CFrame*cf(-.2,0,0)*ca(0,0,pi/2),.2) | |
1154 | spkparts[4].CFrame=clerp(spkparts[4].CFrame,pro.CFrame*cf(.2,0,0)*ca(0,0,-pi/2),.2) | |
1155 | spkparts[5].CFrame=clerp(spkparts[5].CFrame,pro.CFrame*cf(0,0,.2)*ca(pi/2,0,0),.2) | |
1156 | spkparts[6].CFrame=clerp(spkparts[6].CFrame,pro.CFrame*cf(0,0,-.2)*ca(-pi/2,0,0),.2) | |
1157 | end | |
1158 | sides=true | |
1159 | rov=true | |
1160 | end | |
1161 | elseif key == 'w' then | |
1162 | if skate then | |
1163 | foward=true | |
1164 | Spawn(function()repeat wait()csp = math.min(50,csp+(10*(1/30)))until foward==false end) | |
1165 | end | |
1166 | elseif key == 'a' then | |
1167 | if skate then | |
1168 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,rad(10),-rad(90))*cf(0,0,.3) | |
1169 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(90),rad(10)) | |
1170 | left=true | |
1171 | Spawn(function()repeat wait()tsp= math.min(8,tsp+(.5)) until left==false end) | |
1172 | end | |
1173 | elseif key == 's' then | |
1174 | if skate then | |
1175 | back=true | |
1176 | Spawn(function()repeat wait()csp = math.max(-50,csp-(10*(1/30)))until back==false end) | |
1177 | end | |
1178 | elseif key == 'd' then | |
1179 | if skate then | |
1180 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,-rad(10),-rad(90))*cf(0,0,.3) | |
1181 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(90),-rad(10)) | |
1182 | right=true | |
1183 | Spawn(function()repeat wait()tsp= math.max(-8,tsp-(.5)) until right==false end) | |
1184 | end | |
1185 | elseif key == "f" then | |
1186 | if mode=='Sword' then | |
1187 | connectsworddmg() | |
1188 | deb=true | |
1189 | SetAnimData({Head=false,RightArm=false,LeftArm=false,RightLeg=true,LeftLeg=true,Torso=false}) | |
1190 | Tween(mwl1,cf(0,-1.2,-0.2)*ca(rad(90),-rad(13),rad(90)),.2) | |
1191 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,rad(20))* CFrame.new(0,0,0) | |
1192 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,rad(40))* CFrame.new(0,0,0) | |
1193 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90)) | |
1194 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(60),0) | |
1195 | wait(.4) | |
1196 | Tween(mwl1,cf(0,-1.2,-0.2)*ca(rad(90),rad(50),rad(90)),.75) | |
1197 | so('160069154',torso,false,1) | |
1198 | wait(.05) | |
1199 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(50))* CFrame.new(0,0,0) | |
1200 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,-rad(20))* CFrame.new(0,0,0) | |
1201 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90)) | |
1202 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(60),0) | |
1203 | wait() | |
1204 | Spawn(function() | |
1205 | for i=1,3 do | |
1206 | local efx= Part(1,1,1,'Black',.5,false,true,wep) | |
1207 | local m= Mesh(efx,'http://www.roblox.com/asset/?id=20329976',3,1,3) | |
1208 | efx.CFrame=torso.CFrame*ca(pi/2,0,-pi/2) | |
1209 | Spawn(function() | |
1210 | for i=1,7 do wait() | |
1211 | m.Scale=m.Scale+Vector3.new(1,.1,1) | |
1212 | end | |
1213 | efx:Destroy() | |
1214 | end) | |
1215 | wait(.1) | |
1216 | end | |
1217 | end) | |
1218 | cfm=torso.CFrame*ca(0,pi/2,0) | |
1219 | goto=cfm.lookVector*60 | |
1220 | local v = Instance.new("BodyVelocity",torso) | |
1221 | v.maxForce = Vector3.new(1,1,1)*9e9 | |
1222 | v.P = 2000 | |
1223 | v.velocity = goto | |
1224 | wait(.25) | |
1225 | v:Destroy() | |
1226 | --LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,rad(90)) | |
1227 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(40),0,rad(50))* CFrame.new(0,0,0) | |
1228 | Tween(mwl1,cf(0,-1.2,-0.2)*ca(pi/1,0,0),.3) | |
1229 | wait(.2) | |
1230 | so('161006212',torso,false,.5) | |
1231 | TrailOn=true | |
1232 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,rad(90))* CFrame.new(-0.5,-0.5,0) | |
1233 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,-rad(80),0) | |
1234 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,rad(80)) | |
1235 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(0,0,-rad(30)) | |
1236 | wait(.3) | |
1237 | TrailOn=false | |
1238 | SetAnimData({Head=false,RightArm=false,LeftArm=false,RightLeg=false,LeftLeg=false,Torso=false}) | |
1239 | Tween(mwl1,cf(0,-1.2,-0.2)*ca(pi/1,rad(90),0),.3) | |
1240 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),-rad(30),rad(90))* CFrame.new(-0.5,-0.5,0) | |
1241 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,rad(80)) * CFrame.new(0,0,-1) | |
1242 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,1,-1) | |
1243 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(-rad(50),0,0) * CFrame.new(0,0.5,0) | |
1244 | wait(.2) | |
1245 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),rad(30),rad(90))* CFrame.new(-0.5,-0.5,0) | |
1246 | for i=1,4 do wait() | |
1247 | so('182765513',torso,false,1.2) | |
1248 | local bm= Part(1,1,1,'Black',0.2,false,true,pchar) | |
1249 | local bmm=Mesh(bm,'http://www.roblox.com/asset/?id=1778999',0,0,0) | |
1250 | bm.CFrame=torso.CFrame*cf(3+i*8,0,0)*ca(math.random(-50,50)/100,0,math.random(-50,50)/100) | |
1251 | for i,v in pairs(workspace:children()) do | |
1252 | if v:IsA("Model") and v:findFirstChild("Humanoid") then | |
1253 | if v:findFirstChild("Head") and v:findFirstChild("Torso") then | |
1254 | if (v:findFirstChild("Torso").Position - bm.Position).magnitude < 10 and v.Name ~= pchar.Name then | |
1255 | Spawn(function() | |
1256 | v.Humanoid:TakeDamage(40) | |
1257 | local cur= v.Torso | |
1258 | cur.Anchored=true | |
1259 | for i=1,4 do | |
1260 | local new= Part(1,1,1,'Black',0.2,false,true,mo) | |
1261 | local newm=Mesh(new,'http://www.roblox.com/asset/?id=1778999',1,3,1) | |
1262 | new.CFrame=cur.CFrame*CFrame.new(0,-2.5,0)*CFrame.Angles(math.random(-100,100)/100,0,math.random(-100,100)/100) | |
1263 | game.Debris:AddItem(new,3) | |
1264 | end | |
1265 | wait(3) | |
1266 | so('87015121',cur,false,1) | |
1267 | cur.Anchored=false | |
1268 | end) | |
1269 | end | |
1270 | end | |
1271 | end | |
1272 | end | |
1273 | Spawn(function() | |
1274 | for i=1,10 do wait()bmm.Scale=bmm.Scale+Vector3.new(.5,1,.5) end | |
1275 | wait(.5) | |
1276 | for i=1,10 do wait()bmm.Scale=bmm.Scale-Vector3.new(.5,1,.5) end | |
1277 | bm:Destroy() | |
1278 | end) | |
1279 | end | |
1280 | wait(.2) | |
1281 | Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2,rad(53),0),.2) | |
1282 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0) | |
1283 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,0,0) | |
1284 | disconnectsworddmg() | |
1285 | TrailOn=false | |
1286 | SetAnimData({Head=true,RightArm=true,LeftArm=true,RightLeg=true,LeftLeg=true,Torso=true}) | |
1287 | deb=false | |
1288 | elseif mode == "Orb" then | |
1289 | f=not f | |
1290 | if f then | |
1291 | rov=false | |
1292 | so('10209640',torso,false,.5,1) | |
1293 | for i=1,20 do game:service'RunService'.RenderStepped:wait() | |
1294 | pro.CFrame=clerp(pro.CFrame,torso.CFrame,.2) | |
1295 | end | |
1296 | sides=false | |
1297 | tops=false | |
1298 | so('169445683',torso,false,.5,1) | |
1299 | for i=1,15 do game:service'RunService'.RenderStepped:wait() | |
1300 | spkparts[1].CFrame=clerp(spkparts[1].CFrame,pro.CFrame*cf(0,4,0),.2) | |
1301 | spkparts[2].CFrame=clerp(spkparts[2].CFrame,pro.CFrame*cf(0,-4,0)*ca(pi/1,0,0),.2) | |
1302 | spkparts[3].CFrame=clerp(spkparts[3].CFrame,pro.CFrame*cf(-4,0,0)*ca(0,0,pi/2),.2) | |
1303 | spkparts[4].CFrame=clerp(spkparts[4].CFrame,pro.CFrame*cf(4,0,0)*ca(0,0,-pi/2),.2) | |
1304 | spkparts[5].CFrame=clerp(spkparts[5].CFrame,pro.CFrame*cf(0,0,4)*ca(pi/2,0,0),.2) | |
1305 | spkparts[6].CFrame=clerp(spkparts[6].CFrame,pro.CFrame*cf(0,0,-4)*ca(-pi/2,0,0),.2) | |
1306 | end | |
1307 | spinn=0 | |
1308 | tov=true | |
1309 | else | |
1310 | tov=false | |
1311 | spinn=0 | |
1312 | for i=1,15 do game:service'RunService'.RenderStepped:wait() | |
1313 | spkparts[1].CFrame=clerp(spkparts[1].CFrame,pro.CFrame*cf(0,.2,0),.2) | |
1314 | spkparts[2].CFrame=clerp(spkparts[2].CFrame,pro.CFrame*cf(0,-.2,0)*ca(pi/1,0,0),.2) | |
1315 | spkparts[3].CFrame=clerp(spkparts[3].CFrame,pro.CFrame*cf(-.2,0,0)*ca(0,0,pi/2),.2) | |
1316 | spkparts[4].CFrame=clerp(spkparts[4].CFrame,pro.CFrame*cf(.2,0,0)*ca(0,0,-pi/2),.2) | |
1317 | spkparts[5].CFrame=clerp(spkparts[5].CFrame,pro.CFrame*cf(0,0,.2)*ca(pi/2,0,0),.2) | |
1318 | spkparts[6].CFrame=clerp(spkparts[6].CFrame,pro.CFrame*cf(0,0,-.2)*ca(-pi/2,0,0),.2) | |
1319 | end | |
1320 | sides=true | |
1321 | tops=true | |
1322 | rov=true | |
1323 | end | |
1324 | elseif mode == 'HBoard' then | |
1325 | f= not f | |
1326 | if f then | |
1327 | SetAnimData({Head=false,RightArm=false,LeftArm=false,RightLeg=false,LeftLeg=false,Torso=false}) | |
1328 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(40))* CFrame.new(-.2,-.25,0) | |
1329 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,rad(40))* CFrame.new(.2,-.25,0) | |
1330 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,0,-1) | |
1331 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,1,-1) | |
1332 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(-rad(50),0,0) * CFrame.new(0,0.5,0) | |
1333 | wait(.3) | |
1334 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,-rad(10)) | |
1335 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(0,0,rad(10)) | |
1336 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))*cf(0,0,1) | |
1337 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,-rad(90),0) | |
1338 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(0,0,-rad(20)) | |
1339 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),-rad(30),rad(90))* CFrame.new(-0.5,-0.5,0) | |
1340 | wait(.1) | |
1341 | Tween(mwl1,cf(0,-1,2)*ca(0,pi/2,pi/2),.5) | |
1342 | Tween(whel1w,cf(0,-2,0)*ca(0,pi/2,0),.5) | |
1343 | Tween(whel2w,cf(0,2,0)*ca(0,pi/2,0),.5) | |
1344 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),-rad(70),rad(90))* CFrame.new(-0.5,-1,0) | |
1345 | wait(.12) | |
1346 | mwl1.Part1=torso | |
1347 | mwl1.C1=cf(0,-3,0)*ca(0,0,pi/2) | |
1348 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))*cf(0,0,.3) | |
1349 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(90),0) | |
1350 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(0,0,rad(20)) | |
1351 | ROF=Instance.new('BodyAngularVelocity',torso) | |
1352 | ROF.maxTorque = v3(0, math.huge, 0) | |
1353 | ROF.angularvelocity = v3(0, 0, 0) | |
1354 | BV=Instance.new('BodyVelocity',torso) | |
1355 | BV.maxForce = v3(math.huge,0,math.huge) | |
1356 | BV.velocity = v3(0,0,0) | |
1357 | skateso=so('22917014',torso,true,0) | |
1358 | skateso.Volume=100 | |
1359 | skate=true | |
1360 | pchar.Humanoid.WalkSpeed=0 | |
1361 | else | |
1362 | skate=false | |
1363 | csp=0 | |
1364 | tsp=0 | |
1365 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) | |
1366 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0) | |
1367 | skateso:Destroy() | |
1368 | BV:Destroy() | |
1369 | ROF:Destroy() | |
1370 | pchar.Humanoid.WalkSpeed=16 | |
1371 | mwl1.Part1=pchar['Right Arm'] | |
1372 | Tween(whel1w,cf(0,-2,0)*ca(0,0,0),.5) | |
1373 | Tween(whel2w,cf(0,2,0)*ca(0,0,0),.5) | |
1374 | Tween(mwl1,cf(0,-1,0)*ca(pi/2,0,0),.5) | |
1375 | SetAnimData({Head=true,RightArm=true,LeftArm=true,RightLeg=true,LeftLeg=true,Torso=true}) | |
1376 | end | |
1377 | end | |
1378 | elseif key == "t" then | |
1379 | if mode == "Orb" then | |
1380 | a=not a | |
1381 | if a then | |
1382 | rov=false | |
1383 | so('10209640',torso,false,.5,1) | |
1384 | for i=1,20 do game:service'RunService'.RenderStepped:wait() | |
1385 | pro.CFrame=clerp(pro.CFrame,torso.CFrame*CFrame.new(0,-1.5,0),.2) | |
1386 | end | |
1387 | sides=false | |
1388 | so('200633433',torso,false,1.5,1) | |
1389 | for i=1,15 do game:service'RunService'.RenderStepped:wait() | |
1390 | spkparts[3].CFrame=clerp(spkparts[3].CFrame,pro.CFrame*cf(-4,0,0)*ca(0,0,pi/2),.2) | |
1391 | spkparts[4].CFrame=clerp(spkparts[4].CFrame,pro.CFrame*cf(4,0,0)*ca(0,0,-pi/2),.2) | |
1392 | spkparts[5].CFrame=clerp(spkparts[5].CFrame,pro.CFrame*cf(0,0,4)*ca(pi/2,0,0),.2) | |
1393 | spkparts[6].CFrame=clerp(spkparts[6].CFrame,pro.CFrame*cf(0,0,-4)*ca(-pi/2,0,0),.2) | |
1394 | end | |
1395 | spinn=0 | |
1396 | pov=true | |
1397 | pchar.Humanoid.WalkSpeed=100 | |
1398 | else | |
1399 | pov=false | |
1400 | spinn=0 | |
1401 | for i=1,15 do game:service'RunService'.RenderStepped:wait() | |
1402 | spkparts[3].CFrame=clerp(spkparts[3].CFrame,pro.CFrame*cf(-.2,0,0)*ca(0,0,pi/2),.2) | |
1403 | spkparts[4].CFrame=clerp(spkparts[4].CFrame,pro.CFrame*cf(.2,0,0)*ca(0,0,-pi/2),.2) | |
1404 | spkparts[5].CFrame=clerp(spkparts[5].CFrame,pro.CFrame*cf(0,0,.2)*ca(pi/2,0,0),.2) | |
1405 | spkparts[6].CFrame=clerp(spkparts[6].CFrame,pro.CFrame*cf(0,0,-.2)*ca(-pi/2,0,0),.2) | |
1406 | end | |
1407 | sides=true | |
1408 | rov=true | |
1409 | pchar.Humanoid.WalkSpeed=16 | |
1410 | end | |
1411 | end | |
1412 | end | |
1413 | end | |
1414 | ||
1415 | ||
1416 | ||
1417 | function onKeyUp(key) | |
1418 | key = key:lower() | |
1419 | if key == 'w' then | |
1420 | if skate then | |
1421 | foward=false | |
1422 | end | |
1423 | elseif key == 'a' then | |
1424 | if skate then | |
1425 | left=false | |
1426 | if skate then | |
1427 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))*cf(0,0,.3) | |
1428 | else | |
1429 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))*cf(0,0,2) | |
1430 | end | |
1431 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(90),0) | |
1432 | wait() | |
1433 | tsp=0 | |
1434 | end | |
1435 | elseif key == 's' then | |
1436 | if skate then | |
1437 | back=false | |
1438 | end | |
1439 | elseif key == 'd' then | |
1440 | if skate then | |
1441 | if skate then | |
1442 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))*cf(0,0,.3) | |
1443 | else | |
1444 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))*cf(0,0,2) | |
1445 | end | |
1446 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(90),0) | |
1447 | right=false | |
1448 | wait() | |
1449 | tsp=0 | |
1450 | end | |
1451 | end | |
1452 | end | |
1453 | ||
1454 | function onClicked(mouse) | |
1455 | if deb==true then return end | |
1456 | if mode=='Sniper' then | |
1457 | if SAmmo > 0 then | |
1458 | deb=true | |
1459 | SAmmo=SAmmo-1 | |
1460 | so('10209859',torso,false,.5) | |
1461 | local ray = Ray.new(brl.CFrame.p,(mouse.hit.p - brl.CFrame.p).unit*1200) | |
1462 | local hit,position = game.Workspace:FindPartOnRay(ray,pchar) | |
1463 | local humanoid = hit and hit.Parent and hit.Parent:findFirstChild("Humanoid") | |
1464 | function part(par,colr) | |
1465 | local prt=Instance.new("Part",par) | |
1466 | prt.FormFactor=3 | |
1467 | prt.TopSurface=0 | |
1468 | prt.BottomSurface=0 | |
1469 | prt.Transparency=1 | |
1470 | prt.CanCollide=false | |
1471 | local item=Instance.new('BillboardGui',prt) | |
1472 | item.Adornee=prt | |
1473 | item.Size=UDim2.new(math.random(5,10)/10, 0, math.random(5,10)/10, 0) | |
1474 | local frm=Instance.new('Frame',item) | |
1475 | frm.Size=UDim2.new(1,0,1,0) | |
1476 | frm.BorderSizePixel=0 | |
1477 | frm.BackgroundTransparency=math.random(2,6)/10 | |
1478 | if colr then | |
1479 | frm.BackgroundColor3=BrickColor.new(colr).Color | |
1480 | end | |
1481 | return prt | |
1482 | end | |
1483 | ypcall(function() | |
1484 | if not humanoid then | |
1485 | if hit.Name=='Handle' then | |
1486 | hit:BreakJoints() | |
1487 | hit.Velocity=Vector3.new(math.random(-20,20),math.random(30,60),math.random(-20,20)) | |
1488 | end | |
1489 | else | |
1490 | if humanoid.Parent.Name ~= pchar.Name then | |
1491 | if hit.Name=='Head' then | |
1492 | humanoid.Health=0 | |
1493 | for i=1,10 do | |
1494 | local noob1=part(workspace,'Bright red') | |
1495 | noob1.CFrame=humanoid.Torso.CFrame*CFrame.new(math.random(-3.5,3.5),0,math.random(-3.5,3.5)) | |
1496 | noob1.Velocity=Vector3.new(math.random(-20,20),math.random(20,40),math.random(-20,20)) | |
1497 | end | |
1498 | else | |
1499 | humanoid.Health=humanoid.Health-30 | |
1500 | for i=1,10 do | |
1501 | local noob1=part(workspace,'Bright red') | |
1502 | noob1.CFrame=humanoid.Torso.CFrame*CFrame.new(math.random(-3.5,3.5),0,math.random(-3.5,3.5)) | |
1503 | noob1.Velocity=Vector3.new(math.random(-20,20),math.random(20,40),math.random(-20,20)) | |
1504 | end | |
1505 | end | |
1506 | end | |
1507 | end | |
1508 | end) | |
1509 | local distance = (position - brl.CFrame.p).magnitude | |
1510 | local ray= Part(1,1,1,'White',0,false,true,mo) | |
1511 | local raym=Mesh(ray,1,.2,distance,.2) | |
1512 | ray.CFrame = cf(position, brl.CFrame.p) *cf(0,0,-distance/2)*ca(rad(90),0,0) | |
1513 | local bult= Part(.2,.5,.2,'Bright yellow',0,true,false,mo) | |
1514 | Mesh(bult,1,1,1,1) | |
1515 | bult.CFrame=bulleth.CFrame*ca(0,0,rad(90)) | |
1516 | bult.Velocity=bult.CFrame.lookVector*20 | |
1517 | game.Debris:AddItem(bult,math.random(7,15)) | |
1518 | local cols={'Bright orange','Bright red'} | |
1519 | local dcf=brl.CFrame*ca(pi/2,0,0) | |
1520 | local goto=dcf.lookVector*.5 | |
1521 | Spawn(function() | |
1522 | for i=1,math.random(3,6) do wait() | |
1523 | local a= Part(1,1,1,cols[math.random(1,2)],0,false,true,mo) | |
1524 | local m= Mesh(a,3,1,1,1) | |
1525 | a.CFrame=dcf*ca(math.random(),math.random(),math.random()) | |
1526 | Spawn(function() | |
1527 | while wait() do | |
1528 | if a.Transparency >= 1 then a:Destroy() break end | |
1529 | m.Scale=m.Scale-Vector3.new(0.1,0.1,0.1) | |
1530 | a.CFrame=a.CFrame+goto | |
1531 | a.Transparency=a.Transparency+0.05 | |
1532 | end | |
1533 | end) | |
1534 | end | |
1535 | end) | |
1536 | Spawn(function() | |
1537 | repeat wait() raym.Scale=raym.Scale-Vector3.new(0.01,0,0.01) until raym.Scale.x < 0 | |
1538 | end) | |
1539 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(60),0) | |
1540 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(120),-rad(30),-rad(50)) * CFrame.new(.2,-.5,0) | |
1541 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(100),-rad(30),-rad(80)) * CFrame.new(.2,-.5,0) | |
1542 | Tween(slider,cf(.6,0.2,0)*ca(0,0,rad(90)),.5) | |
1543 | wait(.15) | |
1544 | Tween(slider,cf(.4,0.2,0)*ca(0,0,rad(90)),.05) | |
1545 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(-rad(30),rad(60),0) | |
1546 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,-rad(50)) * CFrame.new(.2,-.5,0) | |
1547 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(80)) * CFrame.new(.2,-.5,0) | |
1548 | wait(.6) | |
1549 | deb=false | |
1550 | end | |
1551 | elseif mode=='Sword' then | |
1552 | SetAnimData({Head=false,RightArm=false,LeftArm=false,RightLeg=true,LeftLeg=true,Torso=false}) | |
1553 | deb=true | |
1554 | if swing==1 then | |
1555 | so('161006212',torso,false,math.random(5,11)/10) | |
1556 | connectsworddmg() | |
1557 | Tween(mwl1,cf(0,-1.2,-0.2)*ca(0,0,rad(220)),.2) | |
1558 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(40))* CFrame.new(-.2,-.25,0) | |
1559 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,rad(40))* CFrame.new(.2,-.25,0) | |
1560 | wait(.15) | |
1561 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,rad(60)) | |
1562 | TrailOn=true | |
1563 | wait(.3) | |
1564 | Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2,rad(53),0),.2) | |
1565 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) | |
1566 | disconnectsworddmg() | |
1567 | TrailOn=false | |
1568 | SetAnimData({Head=true,RightArm=true,LeftArm=true,RightLeg=true,LeftLeg=true,Torso=true}) | |
1569 | swing=2 | |
1570 | wait(.4) | |
1571 | deb=false | |
1572 | return | |
1573 | elseif swing==2 then | |
1574 | so('161006212',torso,false,math.random(5,11)/10) | |
1575 | connectsworddmg() | |
1576 | Tween(mwl1,cf(0,-1.2,-0.2)*ca(0,rad(180),rad(150)),.2) | |
1577 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(40))* CFrame.new(-.2,-.25,0) | |
1578 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,rad(40))* CFrame.new(.2,-.25,0) | |
1579 | wait(.15) | |
1580 | TrailOn=true | |
1581 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(60)) | |
1582 | wait(.3) | |
1583 | Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2,rad(53),0),.2) | |
1584 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) | |
1585 | disconnectsworddmg() | |
1586 | TrailOn=false | |
1587 | SetAnimData({Head=true,RightArm=true,LeftArm=true,RightLeg=true,LeftLeg=true,Torso=true}) | |
1588 | swing=3 | |
1589 | wait(.4) | |
1590 | deb=false | |
1591 | return | |
1592 | elseif swing==3 then | |
1593 | connectsworddmg() | |
1594 | Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2-rad(20),rad(55),-rad(50)),.2) | |
1595 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(120),0,-rad(40))* CFrame.new(-.2,-.25,0) | |
1596 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(120),0,rad(40))* CFrame.new(.2,-.25,0) | |
1597 | wait(.4) | |
1598 | so('161006212',torso,false,math.random(5,11)/10) | |
1599 | TrailOn=true | |
1600 | Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2-rad(45),rad(55),-rad(60)),.2) | |
1601 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(50),0,-rad(40))* CFrame.new(-.2,-.25,0) | |
1602 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(50),0,rad(40))* CFrame.new(.2,-.25,0) | |
1603 | wait(.4) | |
1604 | Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2,rad(53),0),.2) | |
1605 | disconnectsworddmg() | |
1606 | TrailOn=false | |
1607 | SetAnimData({Head=true,RightArm=true,LeftArm=true,RightLeg=true,LeftLeg=true,Torso=true}) | |
1608 | swing=1 | |
1609 | wait(.4) | |
1610 | deb=false | |
1611 | return | |
1612 | end | |
1613 | end | |
1614 | end | |
1615 | ||
1616 | tol.Selected:connect(function(mouse) | |
1617 | mouse.Button1Down:connect(function() onClicked(mouse) end) | |
1618 | mouse.KeyDown:connect(onKeyDown) | |
1619 | mouse.KeyUp:connect(onKeyUp) | |
1620 | CurrentActiveAnim="Equip" | |
1621 | wait(.2) | |
1622 | opnbl('t') | |
1623 | end) | |
1624 | ||
1625 | tol.Deselected:connect(function(mouse) | |
1626 | CurrentActiveAnim="Idle" | |
1627 | Tween(ballweld,cf(0,.375,-.55),.1) | |
1628 | for i=1,#animationprts do | |
1629 | Tween(animationprts[i],cf(0,0,.25)*ca(rad(90),0,0),.1) | |
1630 | end | |
1631 | end) | |
1632 | ||
1633 | ||
1634 | function UpdateAnims() | |
1635 | Anims = { | |
1636 | ["Idle"] = { | |
1637 | ["Stance"] = { | |
1638 | speed=.25, | |
1639 | Head = CFrame.Angles(sin(angle)*0.01,0,0), | |
1640 | RightArm = CFrame.Angles(sin(angle)*0.1,0,0), | |
1641 | LeftArm = CFrame.Angles(sin(angle)*0.1,0,0), | |
1642 | RightLeg = CFrame.Angles(0,0,abs(sin(angle))*0.1), | |
1643 | LeftLeg = CFrame.Angles(0,0,-abs(sin(angle))*0.1), | |
1644 | Torso = CFrame.Angles(0,0,0), | |
1645 | }, | |
1646 | ["Walk"] = { | |
1647 | speed=2, | |
1648 | Head = CFrame.Angles(0,0,sin(angle)*0.01), | |
1649 | RightArm = CFrame.Angles(-sin(angle)*.8,0,rad(10)), | |
1650 | LeftArm = CFrame.Angles(sin(angle)*.8,0,-rad(10)), | |
1651 | RightLeg = CFrame.Angles(sin(angle)*.8,0,0), | |
1652 | LeftLeg = CFrame.Angles(-sin(angle)*.8,0,0), | |
1653 | Torso = CFrame.Angles(0,0,0), | |
1654 | } | |
1655 | }, | |
1656 | ["Equip"] = { | |
1657 | ["Stance"] = { | |
1658 | speed=.25, | |
1659 | Head = CFrame.Angles(sin(angle)*0.01,0,0), | |
1660 | RightArm = CFrame.Angles(rad(60),0,-rad(20)), | |
1661 | LeftArm = CFrame.Angles(sin(angle)*0.1,0,0), | |
1662 | RightLeg = CFrame.Angles(0,0,abs(sin(angle))*0.1), | |
1663 | LeftLeg = CFrame.Angles(0,0,-abs(sin(angle))*0.1), | |
1664 | Torso = CFrame.Angles(0,0,0), | |
1665 | }, | |
1666 | ["Walk"] = { | |
1667 | speed=2, | |
1668 | Head = CFrame.Angles(0,0,sin(angle)*0.01), | |
1669 | RightArm = CFrame.Angles(rad(60),rad(20),-rad(50)), | |
1670 | LeftArm = CFrame.Angles(sin(angle)*.8,0,-rad(10)), | |
1671 | RightLeg = CFrame.Angles(sin(angle)*.8,0,0), | |
1672 | LeftLeg = CFrame.Angles(-sin(angle)*.8,0,0), | |
1673 | Torso = CFrame.Angles(0,0,0), | |
1674 | } | |
1675 | }, | |
1676 | ["Sword"] = { | |
1677 | ["Stance"] = { | |
1678 | speed=.25, | |
1679 | Head = CFrame.Angles(sin(angle)*0.05,0,0), | |
1680 | RightArm = CFrame.Angles(rad(60)+sin(angle)*.05,0,-rad(40))* CFrame.new(-.2,-.25,0), | |
1681 | LeftArm = CFrame.Angles(rad(60)+sin(angle)*.05,0,rad(40))* CFrame.new(.2,-.25,0), | |
1682 | RightLeg = CFrame.Angles(0,0,abs(sin(angle))*0.1), | |
1683 | LeftLeg = CFrame.Angles(0,0,-abs(sin(angle))*0.1), | |
1684 | Torso = CFrame.Angles(0,0,0), | |
1685 | }, | |
1686 | ["Walk"] = { | |
1687 | speed=2, | |
1688 | Head = CFrame.Angles(0,0,math.sin(angle)*0.05), | |
1689 | RightArm = CFrame.Angles(rad(60)+sin(angle)*.1,0,-rad(40))* CFrame.new(-.2,-.25,0), | |
1690 | LeftArm = CFrame.Angles(rad(60)+sin(angle)*.1,0,rad(40))* CFrame.new(.2,-.25,0), | |
1691 | RightLeg = CFrame.Angles(sin(angle)*.8,0,0), | |
1692 | LeftLeg = CFrame.Angles(-sin(angle)*.8,0,0), | |
1693 | Torso = CFrame.Angles(0,0,0), | |
1694 | } | |
1695 | }, | |
1696 | ["Orb"] = { | |
1697 | ["Stance"] = { | |
1698 | speed=.25, | |
1699 | Head = CFrame.Angles(0,0,0), | |
1700 | RightArm = CFrame.Angles(-sin(angle)*0.1,0,0), | |
1701 | LeftArm = CFrame.Angles(sin(angle)*0.1,0,0), | |
1702 | RightLeg = CFrame.Angles(sin(angle)*0.1,0,0), | |
1703 | LeftLeg = CFrame.Angles(-sin(angle)*0.1,0,0), | |
1704 | Torso = CFrame.Angles(0,0,0), | |
1705 | }, | |
1706 | ["Walk"] = { | |
1707 | speed=2, | |
1708 | Head = CFrame.Angles(0,0,0), | |
1709 | RightArm = CFrame.Angles(-sin(angle)*1,0,0), | |
1710 | LeftArm = CFrame.Angles(sin(angle)*1,0,0), | |
1711 | RightLeg = CFrame.Angles(sin(angle)*1,0,0), | |
1712 | LeftLeg = CFrame.Angles(-sin(angle)*1,0,0), | |
1713 | Torso = CFrame.Angles(0,0,0), | |
1714 | } | |
1715 | } | |
1716 | } | |
1717 | end | |
1718 | ||
1719 | UpdateAnims() | |
1720 | SetAnimData({Head=true,RightArm=true,LeftArm=true,RightLeg=true,LeftLeg=true,Torso=true}) | |
1721 | ||
1722 | CurrentActiveAnim="Idle" | |
1723 | ||
1724 | game:service'RunService'.RenderStepped:connect(function() | |
1725 | spinn=spinn+.5 | |
1726 | UpdateAnims(angle) | |
1727 | for _,v in pairs(LerpTo) do | |
1728 | v.Weld.C0 = Lerp.CFrame(v.Weld.C0,v.To,v.Speed) | |
1729 | end | |
1730 | angle = (angle % 100) + anglespeed/10 | |
1731 | if bl and rov then | |
1732 | pro.CFrame=clerp(pro.CFrame,torso.CFrame*cf(3,2+math.sin((tick())*.5),0)*ca(rad(spinn),-rad(spinn),rad(spinn)),.1) | |
1733 | elseif bl and tov then | |
1734 | pchar.Humanoid.Health=pchar.Humanoid.MaxHealth | |
1735 | pro.CFrame=torso.CFrame*ca(rad(spinn),-rad(spinn),rad(spinn)) | |
1736 | spkparts[1].CFrame=pro.CFrame*cf(0,4,0) | |
1737 | spkparts[2].CFrame=pro.CFrame*cf(0,-4,0)*ca(pi/1,0,0) | |
1738 | spkparts[3].CFrame=pro.CFrame*cf(-4,0,0)*ca(0,0,pi/2) | |
1739 | spkparts[4].CFrame=pro.CFrame*cf(4,0,0)*ca(0,0,-pi/2) | |
1740 | spkparts[5].CFrame=pro.CFrame*cf(0,0,4)*ca(pi/2,0,0) | |
1741 | spkparts[6].CFrame=pro.CFrame*cf(0,0,-4)*ca(-pi/2,0,0) | |
1742 | for i,v in pairs(workspace:children()) do | |
1743 | if v:IsA("Model") and v:findFirstChild("Humanoid") then | |
1744 | if v:findFirstChild("Head") and v:findFirstChild("Torso") then | |
1745 | if (v:findFirstChild("Torso").Position - pchar.Torso.Position).magnitude < 5 and v.Name ~= pchar.Name then | |
1746 | Lightning(v.Torso.Position,pchar['Torso'].Position,math.random(5,10),math.random(-2.5,2.5),BrickColor.random(),0.35) | |
1747 | skul(v) | |
1748 | end | |
1749 | end | |
1750 | end | |
1751 | end | |
1752 | elseif bl and pov then | |
1753 | pro.CFrame=torso.CFrame*CFrame.new(0,-1.5,0)*ca(0,rad(spinn*2),0) | |
1754 | spkparts[3].CFrame=pro.CFrame*cf(-4,0,0)*ca(0,0,pi/2) | |
1755 | spkparts[4].CFrame=pro.CFrame*cf(4,0,0)*ca(0,0,-pi/2) | |
1756 | spkparts[5].CFrame=pro.CFrame*cf(0,0,4)*ca(pi/2,0,0) | |
1757 | spkparts[6].CFrame=pro.CFrame*cf(0,0,-4)*ca(-pi/2,0,0) | |
1758 | end | |
1759 | if bl and tops then | |
1760 | spkparts[1].CFrame=pro.CFrame*cf(0,0.2,0) | |
1761 | spkparts[2].CFrame=pro.CFrame*cf(0,-0.2,0)*ca(pi/1,0,0) | |
1762 | end | |
1763 | if bl and sides then | |
1764 | spkparts[3].CFrame=pro.CFrame*cf(-0.2,0,0)*ca(0,0,pi/2) | |
1765 | spkparts[4].CFrame=pro.CFrame*cf(0.2,0,0)*ca(0,0,-pi/2) | |
1766 | spkparts[5].CFrame=pro.CFrame*cf(0,0,.2)*ca(pi/2,0,0) | |
1767 | spkparts[6].CFrame=pro.CFrame*cf(0,0,-.2)*ca(-pi/2,0,0) | |
1768 | end | |
1769 | if skate then | |
1770 | if csp < 0 then | |
1771 | it = tonumber(tostring(csp):sub(2)) | |
1772 | skateso.Pitch=it/20 | |
1773 | else | |
1774 | skateso.Pitch=csp/20 | |
1775 | end | |
1776 | ROF.angularvelocity = Vector3.new(0, tsp, 0) | |
1777 | local direction = torso.CFrame * ca(0,pi/2,-pi/2) | |
1778 | direction = direction.lookVector | |
1779 | direction = Vector3.new(direction.x,0,direction.z).unit | |
1780 | BV.velocity = direction*(csp) | |
1781 | whel1w.C1=whel1w.C1*ca(-csp/90,0,0) | |
1782 | whel2w.C1=whel2w.C1*ca(-csp/90,0,0) | |
1783 | end | |
1784 | pchar.Humanoid.CameraOffset = (pchar.HumanoidRootPart.CFrame:toObjectSpace(pchar.Head.CFrame)).p - Vector3.new(0, 1.25, 0) | |
1785 | if blade2 then | |
1786 | local blcf = blade2.CFrame*cf(0,-.5,0) | |
1787 | if TrailOn then | |
1788 | if scfr and (blade2.Position-scfr.p).magnitude > .1 then | |
1789 | local h = 3.8 | |
1790 | local a,b = Triangle((scfr*cf(0,h/2,0)).p,(scfr*cf(0,-h/2,0)).p,(blcf*cf(0,h/2,0)).p) | |
1791 | if a then game.Debris:AddItem(a,1) end | |
1792 | if b then game.Debris:AddItem(b,1) end | |
1793 | local a,b = Triangle((blcf*cf(0,h/2,0)).p,(blcf*cf(0,-h/2,0)).p,(scfr*cf(0,-h/2,0)).p) | |
1794 | if a then game.Debris:AddItem(a,1) end | |
1795 | if b then game.Debris:AddItem(b,1) end | |
1796 | scfr = blcf | |
1797 | elseif not scfr then | |
1798 | scfr = blcf | |
1799 | end | |
1800 | elseif not TrailsOn then | |
1801 | scfr = nil | |
1802 | end | |
1803 | end | |
1804 | if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then | |
1805 | CheckAnimData(CurrentActiveAnim,"Stance") | |
1806 | elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then | |
1807 | CheckAnimData(CurrentActiveAnim,"Walk") | |
1808 | end | |
1809 | end) |