SHOW:
|
|
- or go back to the newest paste.
1 | - | |
1 | + | --https://github.com/Mokiros/roblox-FE-compatibility |
2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
3 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
4 | local RealPlayer = Player | |
5 | do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end | |
6 | ||
7 | ------------------------------------------------------------------------------------------------------------------------------ | |
8 | Player = game.Players.LocalPlayer | |
9 | Character = Player.Character | |
10 | ||
11 | PlayerGui = Player.PlayerGui | |
12 | ||
13 | Backpack = Player.Backpack | |
14 | ||
15 | Torso = Character.Torso | |
16 | ||
17 | Head = Character.Head | |
18 | ||
19 | Humanoid = Character.Humanoid | |
20 | ||
21 | LeftArm = Character["Left Arm"] | |
22 | ||
23 | LeftLeg = Character["Left Leg"] | |
24 | ||
25 | RightArm = Character["Right Arm"] | |
26 | ||
27 | RightLeg = Character["Right Leg"] | |
28 | ||
29 | LS = Torso["Left Shoulder"] | |
30 | ||
31 | LH = Torso["Left Hip"] | |
32 | ||
33 | RS = Torso["Right Shoulder"] | |
34 | ||
35 | RH = Torso["Right Hip"] | |
36 | ||
37 | Neck = Torso.Neck | |
38 | ||
39 | it=Instance.new | |
40 | ||
41 | vt=Vector3.new | |
42 | ||
43 | cf=CFrame.new | |
44 | ||
45 | euler=CFrame.fromEulerAnglesXYZ | |
46 | ||
47 | angles=CFrame.Angles | |
48 | ||
49 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
50 | ||
51 | necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
52 | ||
53 | attack = false | |
54 | ||
55 | attacktype = 1 | |
56 | ||
57 | damage = math.huge | |
58 | ||
59 | oridamage = 50 | |
60 | ||
61 | attackdebounce = false | |
62 | ||
63 | ssdebounce=false | |
64 | ||
65 | MMouse=nil | |
66 | ||
67 | combo=0 | |
68 | ||
69 | --player | |
70 | ||
71 | player = nil | |
72 | ||
73 | --save shoulders | |
74 | ||
75 | RSH, LSH = nil, nil | |
76 | ||
77 | --welds | |
78 | ||
79 | RW, LW = Instance.new("Weld"), Instance.new("Weld") | |
80 | ||
81 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
82 | ||
83 | ||
84 | ||
85 | ||
86 | ||
87 | if Character:findFirstChild("Crossbow",true) ~= nil then | |
88 | ||
89 | Character:findFirstChild("Crossbow",true).Parent = nil | |
90 | ||
91 | end | |
92 | ||
93 | ||
94 | ||
95 | ||
96 | ||
97 | function part(formfactor,parent,reflectance,transparency,brickcolor,name,size) | |
98 | ||
99 | local fp = it("Part") | |
100 | ||
101 | fp.formFactor = formfactor | |
102 | ||
103 | fp.Parent = parent | |
104 | ||
105 | fp.Reflectance = reflectance | |
106 | ||
107 | fp.Transparency = transparency | |
108 | ||
109 | fp.CanCollide = false | |
110 | ||
111 | fp.Locked=true | |
112 | ||
113 | fp.BrickColor = brickcolor | |
114 | ||
115 | fp.Name = name | |
116 | ||
117 | fp.Size = size | |
118 | ||
119 | fp.Position = Torso.Position | |
120 | ||
121 | fp.BottomSurface="Smooth" | |
122 | ||
123 | fp.TopSurface="Smooth" | |
124 | ||
125 | fp:BreakJoints() | |
126 | ||
127 | return fp | |
128 | ||
129 | end | |
130 | ||
131 | ||
132 | ||
133 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
134 | ||
135 | local mesh = it(Mesh) | |
136 | ||
137 | mesh.Parent = part | |
138 | ||
139 | if Mesh=="SpecialMesh" then | |
140 | ||
141 | mesh.MeshType = meshtype | |
142 | ||
143 | mesh.MeshId = meshid | |
144 | ||
145 | end | |
146 | ||
147 | mesh.Offset=offset | |
148 | ||
149 | mesh.Scale=scale | |
150 | ||
151 | return mesh | |
152 | ||
153 | end | |
154 | ||
155 | ||
156 | ||
157 | function weld(parent,part0,part1,c0) | |
158 | ||
159 | local weld = it("Weld") | |
160 | ||
161 | weld.Parent = parent | |
162 | ||
163 | weld.Part0 = part0 | |
164 | ||
165 | weld.Part1 = part1 | |
166 | ||
167 | weld.C0 = c0 | |
168 | ||
169 | return weld | |
170 | ||
171 | end | |
172 | ||
173 | ||
174 | ||
175 | local modelzorz = Instance.new("Model") | |
176 | ||
177 | modelzorz.Parent = Character | |
178 | ||
179 | modelzorz.Name = "Crossbow" | |
180 | ||
181 | ||
182 | ||
183 | local prt1=part(3,modelzorz,0,0,Torso.BrickColor,"Part1",vt(1,1,1)) | |
184 | ||
185 | local prt2=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Part2",vt(1,1,1)) | |
186 | ||
187 | local prt3=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Part3",vt(1,1,1)) | |
188 | ||
189 | local prt4=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Part4",vt(1,1,1)) | |
190 | ||
191 | local prt5=part(3,modelzorz,0,0,BrickColor.new("Blue"),"Part5",vt(1,1,1)) | |
192 | ||
193 | local prt6=part(3,modelzorz,0,0,BrickColor.new("Blue"),"Part6",vt(1,1,1)) | |
194 | ||
195 | local prt7=part(3,modelzorz,0,0,BrickColor.new("Blue"),"Part7",vt(1,1,1)) | |
196 | ||
197 | local prt8=part(3,modelzorz,0,0,BrickColor.new("Bluen"),"Part8",vt(1,1,1)) | |
198 | ||
199 | local prt9=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Part9",vt(1,1,1)) | |
200 | ||
201 | local prt10=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Part10",vt(1,1,1)) | |
202 | ||
203 | local prt11=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Part11",vt(1,1,1)) | |
204 | ||
205 | local prt12=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Part12",vt(1,1,1)) | |
206 | ||
207 | local prt13=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part13",vt(1,1,1)) | |
208 | ||
209 | local prt14=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part14",vt(1,1,1)) | |
210 | ||
211 | local prt15=part(3,modelzorz,0,1,BrickColor.new("Black"),"StringGuide",vt(0.2,0.2,0.2)) | |
212 | ||
213 | ||
214 | ||
215 | local msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(0.4,0.8,0.4)) | |
216 | ||
217 | local msh2=mesh("BlockMesh",prt2,"","",vt(0,0,0),vt(0.8,0.5,2.5)) | |
218 | ||
219 | local msh3=mesh("BlockMesh",prt3,"","",vt(0,0,0),vt(0.5,0.49,3)) | |
220 | ||
221 | local msh4=mesh("BlockMesh",prt4,"","",vt(0,0,0),vt(0.2,0.21,3)) | |
222 | ||
223 | local msh5=mesh("CylinderMesh",prt5,"","",vt(0,0,0),vt(0.1,2.99,0.1)) | |
224 | ||
225 | local msh6=mesh("CylinderMesh",prt6,"","",vt(0,0,0),vt(0.1,2.99,0.1)) | |
226 | ||
227 | local msh7=mesh("BlockMesh",prt7,"","",vt(0,0,0),vt(0.5,0.5,0.5)) | |
228 | ||
229 | local msh8=mesh("CylinderMesh",prt8,"","",vt(0,0,0),vt(0.13,1,0.13)) | |
230 | ||
231 | local msh9=mesh("CylinderMesh",prt9,"","",vt(0,0,0),vt(0.13,0.8,0.13)) | |
232 | ||
233 | local msh10=mesh("BlockMesh",prt10,"","",vt(0,0,0),vt(0.4,0.1,1)) | |
234 | ||
235 | local msh11=mesh("CylinderMesh",prt11,"","",vt(0,0,0),vt(0.13,0.8,0.13)) | |
236 | ||
237 | local msh12=mesh("BlockMesh",prt12,"","",vt(0,0,0),vt(0.4,0.1,1)) | |
238 | ||
239 | local msh13=mesh("CylinderMesh",prt13,"","",vt(0,0,0),vt(0.1,0.11,0.1)) | |
240 | ||
241 | local msh14=mesh("CylinderMesh",prt14,"","",vt(0,0,0),vt(0.1,0.11,0.1)) | |
242 | ||
243 | ||
244 | ||
245 | local wld1=weld(prt1,prt1,Torso,euler(0.5+1.57,0,0)*cf(-0.5,-1.5,-1)) | |
246 | ||
247 | local wld2=weld(prt2,prt2,prt1,euler(-0.5,0,0)*cf(0,-0.5,0.2)) | |
248 | ||
249 | local wld3=weld(prt3,prt3,prt2,euler(0,0,0)*cf(0,0,0.8)) | |
250 | ||
251 | local wld4=weld(prt4,prt4,prt3,euler(0,0,0)*cf(0,-0.15,0.3)) | |
252 | ||
253 | local wld5=weld(prt5,prt5,prt4,euler(1.57,0,0)*cf(0.1,-0.1,0)) | |
254 | ||
255 | local wld6=weld(prt6,prt6,prt4,euler(1.57,0,0)*cf(-0.1,-0.1,0)) | |
256 | ||
257 | local wld7=weld(prt7,prt7,prt4,euler(1.57,0,0)*cf(0,0,-1.5)) | |
258 | ||
259 | local wld8=weld(prt8,prt8,prt4,euler(0,0,1.57)*cf(0,-0.05,1.45)) | |
260 | ||
261 | local wld9=weld(prt9,prt9,prt8,euler(0.5,0,0)*cf(0,0.5,0)) | |
262 | ||
263 | local wld10=weld(prt10,prt10,prt9,euler(-0.7,0,0)*cf(0,0.6,-0.25)) | |
264 | ||
265 | local wld11=weld(prt11,prt11,prt8,euler(-0.5,0,0)*cf(0,-0.5,0)) | |
266 | ||
267 | local wld12=weld(prt12,prt12,prt11,euler(0.7,0,0)*cf(0,-0.6,-0.25)) | |
268 | ||
269 | local wld13=weld(prt13,prt13,prt10,euler(0,0,0)*cf(0.08,-0.01,-0.4)) | |
270 | ||
271 | local wld14=weld(prt14,prt14,prt12,euler(0,0,0)*cf(0.08,0.01,-0.4)) | |
272 | ||
273 | local wld15=weld(prt15,prt15,prt2,euler(0,0,0)*cf(0,-0.3,1.65)) | |
274 | ||
275 | ||
276 | ||
277 | local string1=part(3,modelzorz,0,0,BrickColor.new("White"),"String1",vt(1,1,1)) | |
278 | ||
279 | string1.Anchored=true | |
280 | ||
281 | local stringmsh1=mesh("CylinderMesh",string1,"","",vt(0,0,0),vt(0.1,1,0.1)) | |
282 | ||
283 | local string2=part(3,modelzorz,0,0,BrickColor.new("White"),"String1",vt(1,1,1)) | |
284 | ||
285 | string2.Anchored=true | |
286 | ||
287 | local stringmsh2=mesh("CylinderMesh",string2,"","",vt(0,0,0),vt(0.1,1,0.1)) | |
288 | ||
289 | ||
290 | ||
291 | local strmdl = "Arrow" | |
292 | ||
293 | coroutine.resume(coroutine.create(function() | |
294 | ||
295 | repeat | |
296 | ||
297 | wait(0) | |
298 | ||
299 | local top = prt13.CFrame | |
300 | ||
301 | local bottom = prt14.CFrame | |
302 | ||
303 | local oristrpos | |
304 | ||
305 | if strmdl == "Bow" then | |
306 | ||
307 | oristrpos = CFrame.new((top.p+bottom.p)/2) | |
308 | ||
309 | elseif strmdl == "Arrow" then | |
310 | ||
311 | oristrpos = prt15.CFrame | |
312 | ||
313 | end | |
314 | ||
315 | local mg1 = (top.p - oristrpos.p).magnitude | |
316 | ||
317 | local mg2 = (bottom.p - oristrpos.p).magnitude | |
318 | ||
319 | string1.Size = Vector3.new(0.2,mg1,0.2) | |
320 | ||
321 | string1.CFrame = CFrame.new((top.p+oristrpos.p)/2,oristrpos.p) * CFrame.Angles(math.rad(90),0,0) | |
322 | ||
323 | string2.Size = Vector3.new(0.2,mg2,0.2) | |
324 | ||
325 | string2.CFrame = CFrame.new((bottom.p+oristrpos.p)/2,oristrpos.p) * CFrame.Angles(math.rad(90),0,0) | |
326 | ||
327 | until false | |
328 | ||
329 | end)) | |
330 | ||
331 | ||
332 | ||
333 | ||
334 | ||
335 | if (script.Parent.className ~= "HopperBin") then | |
336 | ||
337 | Tool = Instance.new("HopperBin") | |
338 | ||
339 | Tool.Parent = Backpack | |
340 | ||
341 | Tool.Name = "Crossbow" | |
342 | ||
343 | script.Parent = Tool | |
344 | ||
345 | end | |
346 | ||
347 | Bin = script.Parent | |
348 | ||
349 | ||
350 | ||
351 | local bg = it("BodyGyro") | |
352 | ||
353 | bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge | |
354 | ||
355 | bg.P = 20e+003 | |
356 | ||
357 | bg.Parent = nil | |
358 | ||
359 | ||
360 | ||
361 | so = function(id,par,vol,pit) | |
362 | ||
363 | coroutine.resume(coroutine.create(function() | |
364 | ||
365 | local sou = Instance.new("Sound",par or workspace) | |
366 | ||
367 | sou.Volume=vol | |
368 | ||
369 | sou.Pitch=pit or 1 | |
370 | ||
371 | sou.SoundId=id | |
372 | ||
373 | wait() | |
374 | ||
375 | sou:play() | |
376 | ||
377 | wait(6) | |
378 | ||
379 | sou:Remove() | |
380 | ||
381 | end)) | |
382 | ||
383 | end | |
384 | ||
385 | ||
386 | ||
387 | function unequipweld() | |
388 | ||
389 | wld1.Part1=Torso | |
390 | ||
391 | wld1.C0=euler(0.5+1.57,0,0)*cf(-0.5,-1.5,-1) | |
392 | ||
393 | end | |
394 | ||
395 | ||
396 | ||
397 | function equipweld() | |
398 | ||
399 | wld1.Part1=RightArm | |
400 | ||
401 | wld1.C0=euler(0.5+1.57,0,0)*cf(0,1,0) | |
402 | ||
403 | end | |
404 | ||
405 | ||
406 | ||
407 | function hideanim() | |
408 | ||
409 | equipped=false | |
410 | ||
411 | wait(0.1) | |
412 | ||
413 | bg.Parent=nil | |
414 | ||
415 | unequipweld() | |
416 | ||
417 | end | |
418 | ||
419 | ||
420 | ||
421 | function equipanim() | |
422 | ||
423 | equipped=true | |
424 | ||
425 | wait(0.1) | |
426 | ||
427 | equipweld() | |
428 | ||
429 | RW.C0=cf(1.5, 0.5, 0) * euler(0.8,0,0) | |
430 | ||
431 | RW.C1=cf(0, 0.5, 0) * euler(0,0.2,-0.2) | |
432 | ||
433 | LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2) | |
434 | ||
435 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
436 | ||
437 | end | |
438 | ||
439 | ||
440 | ||
441 | function Melee() | |
442 | ||
443 | attack=true | |
444 | ||
445 | SpecialEffect() | |
446 | ||
447 | for i=0,1,0.1 do | |
448 | ||
449 | wait() | |
450 | ||
451 | RW.C0=cf(1.5-0.5*i, 0.5, -0.5*i) * euler(0.8+0.77*i,0,0) | |
452 | ||
453 | RW.C1=cf(0, 0.5, 0) * euler(0,0.2-1.77*i,-0.2+0.8*i) | |
454 | ||
455 | end | |
456 | ||
457 | bg.Parent=Torso | |
458 | ||
459 | CF = Torso.CFrame | |
460 | ||
461 | con1=prt2.Touched:connect(function(hit) Damagefunc1(hit,20,20) end) | |
462 | ||
463 | con2=prt3.Touched:connect(function(hit) Damagefunc1(hit,20,20) end) | |
464 | ||
465 | so("http://roblox.com/asset/?id=10209640",LeftArm,1,0.8) | |
466 | ||
467 | for i=0,1,0.1 do | |
468 | ||
469 | wait() | |
470 | ||
471 | RW.C0=cf(1.5-0.5+0.5*i, 0.5, -0.5+0.5*i) * euler(1.57,0,0) | |
472 | ||
473 | RW.C1=cf(0, 0.5, 0) * euler(0,-1.57,0.6-2.17*i) | |
474 | ||
475 | LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2-1.37*i) | |
476 | ||
477 | bg.cframe=CF*euler(0,-6.283*i,0) | |
478 | ||
479 | end | |
480 | ||
481 | con1:disconnect() | |
482 | ||
483 | con2:disconnect() | |
484 | ||
485 | bg.Parent=nil | |
486 | ||
487 | for i=0,1,0.1 do | |
488 | ||
489 | wait() | |
490 | ||
491 | RW.C0=cf(1.5, 0.5, 0) * euler(1.57-0.77*i,0,0) | |
492 | ||
493 | RW.C1=cf(0, 0.5, 0) * euler(0,-1.57+1.77*i,-1.57+1.37*i) | |
494 | ||
495 | LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2-1.37+1.37*i) | |
496 | ||
497 | end | |
498 | ||
499 | attack=false | |
500 | ||
501 | end | |
502 | ||
503 | ||
504 | ||
505 | function TripleShot() | |
506 | ||
507 | attack=true | |
508 | ||
509 | SpecialEffect() | |
510 | ||
511 | Humanoid.WalkSpeed=5 | |
512 | ||
513 | holding=true | |
514 | ||
515 | for i=0,1,0.2 do | |
516 | ||
517 | wait() | |
518 | ||
519 | RW.C0=cf(1.5, 0.5, 0) * euler(0.8-0.2*i,0,0) | |
520 | ||
521 | RW.C1=cf(0, 0.5, 0) * euler(0,0.2,-0.2) | |
522 | ||
523 | LW.C0=cf(-1.5, 0.5, 0) * euler(-0.6*i,0,-0.2+0.4*i) | |
524 | ||
525 | LW.C1=cf(0, 0.5, 0) * euler(0,-1.57*i,0) | |
526 | ||
527 | end | |
528 | ||
529 | local arrow=part(3,modelzorz,0,0,BrickColor.new("White"),"Arrow",vt(1,1,1)) | |
530 | ||
531 | local arrowmsh=mesh("SpecialMesh",arrow,"FileMesh","http://www.roblox.com/asset/?id=15887356",vt(0,0,0),vt(1,1,2)) | |
532 | ||
533 | arrowmsh.VertexColor=vt(1,1,1) | |
534 | ||
535 | --arrowmsh.TextureId="http://www.roblox.com/asset/?id=15886781" | |
536 | ||
537 | local arrowwld=weld(arrow,arrow,LeftArm,euler(0,0,0)*cf(0,1,0)) | |
538 | ||
539 | for i=0,1,0.1 do | |
540 | ||
541 | wait() | |
542 | ||
543 | Torso.Neck.C0=necko*euler(0.3*i,0,0) | |
544 | ||
545 | RW.C0=cf(1.5, 0.5, 0) * euler(0.6,0,0) | |
546 | ||
547 | RW.C1=cf(0, 0.5, 0) * euler(0,0.2-0.2*i,-0.2+0.2*i) | |
548 | ||
549 | LW.C0=cf(-1.5, 0.5, -0.2*i) * euler(-0.6+1.7*i,0,0.2) | |
550 | ||
551 | LW.C1=cf(0, 0.5, 0) * euler(0,-1.57+3.14*i,0) | |
552 | ||
553 | wld1.C0=euler(0.5+1.57,0,1.57*i)*cf(0,1,0) | |
554 | ||
555 | arrowwld.C0=euler(0,0,1.57*i)*cf(0,1,-1*i) | |
556 | ||
557 | end | |
558 | ||
559 | arrowwld.Part1=prt4 | |
560 | ||
561 | arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5) | |
562 | ||
563 | for i=0,1,0.1 do | |
564 | ||
565 | wait() | |
566 | ||
567 | LW.C0=cf(-1.5+0.5*i, 0.5, -0.2-0.3*i) * euler(1.1-0.1*i,0,0.2+0.3*i) | |
568 | ||
569 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0) | |
570 | ||
571 | arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5-1.5*i) | |
572 | ||
573 | wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65-2*i) | |
574 | ||
575 | end | |
576 | ||
577 | coroutine.resume(coroutine.create(function() | |
578 | ||
579 | wait() | |
580 | ||
581 | while holding==true do | |
582 | ||
583 | wait(0) | |
584 | ||
585 | bg.Parent = Torso | |
586 | ||
587 | local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z) | |
588 | ||
589 | bg.cframe = cf(Torso.Position,pos4) * euler(0,1.57,0) * cf(0,0,0) | |
590 | ||
591 | end | |
592 | ||
593 | bg.Parent=nil | |
594 | ||
595 | end)) | |
596 | ||
597 | for i=0,1,0.1 do | |
598 | ||
599 | wait() | |
600 | ||
601 | Torso.Neck.C0=necko*euler(0.3-0.3*i,0,-1.57*i) | |
602 | ||
603 | RW.C0=cf(1.5, 0.5, 0) * euler(0.6-0.6*i,0,1.57*i) | |
604 | ||
605 | RW.C1=cf(0, 0.5, 0) * euler(0,1.57*i,0) | |
606 | ||
607 | LW.C0=cf(-1.5+0.5-0.5*i, 0.5, -0.5+0.5*i) * euler(1-1*i,0,0.5-0.7*i) | |
608 | ||
609 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0) | |
610 | ||
611 | wld1.C0=euler(0.5+1.57,0,1.57-1.57*i)*cf(0,1,0) | |
612 | ||
613 | end | |
614 | ||
615 | wait(0.2) | |
616 | ||
617 | arrowfft=arrow:Clone() | |
618 | ||
619 | arrowfft.Parent=arrow.Parent | |
620 | ||
621 | arrowfft.CFrame=arrow.CFrame | |
622 | ||
623 | arrowfft.Anchored=true | |
624 | ||
625 | fftmsh=arrowfft.Mesh | |
626 | ||
627 | coroutine.resume(coroutine.create(function(Arrow,Mesh) | |
628 | ||
629 | for i=0,1,0.1 do | |
630 | ||
631 | wait() | |
632 | ||
633 | Arrow.Transparency=i | |
634 | ||
635 | Mesh.Scale=Mesh.Scale+vt(0.5,0.5,0.5) | |
636 | ||
637 | end | |
638 | ||
639 | Arrow.Parent=nil | |
640 | ||
641 | end),arrowfft,fftmsh) | |
642 | ||
643 | for i=1,3 do | |
644 | ||
645 | spread=1 | |
646 | ||
647 | so("http://www.roblox.com/asset/?id=16211041",prt8,1,1) | |
648 | ||
649 | shoottrail(mouse,prt8) | |
650 | ||
651 | end | |
652 | ||
653 | spread=0 | |
654 | ||
655 | arrow.Parent=nil | |
656 | ||
657 | wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65) | |
658 | ||
659 | for i=0,1,0.2 do | |
660 | ||
661 | wait() | |
662 | ||
663 | Torso.Neck.C0=necko*euler(0,0.2*i,-1.57) | |
664 | ||
665 | RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2*i) | |
666 | ||
667 | end | |
668 | ||
669 | for i=0,1,0.2 do | |
670 | ||
671 | wait() | |
672 | ||
673 | Torso.Neck.C0=necko*euler(0,0.2+0.1*i,-1.57) | |
674 | ||
675 | RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2+0.1*i) | |
676 | ||
677 | end | |
678 | ||
679 | Humanoid.WalkSpeed=16 | |
680 | ||
681 | holding=false | |
682 | ||
683 | for i=0,1,0.1 do | |
684 | ||
685 | wait() | |
686 | ||
687 | Torso.Neck.C0=necko*euler(0,0.3-0.3*i,-1.57+1.57*i) | |
688 | ||
689 | RW.C0=cf(1.5, 0.5, 0) * euler(0.8*i,0,1.87-1.87*i) | |
690 | ||
691 | RW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.37*i,-0.2*i) | |
692 | ||
693 | end | |
694 | ||
695 | attack=false | |
696 | ||
697 | end | |
698 | ||
699 | ||
700 | ||
701 | function SpiritArrows() | |
702 | ||
703 | attack=true | |
704 | ||
705 | SpecialEffect() | |
706 | ||
707 | Humanoid.WalkSpeed=0 | |
708 | ||
709 | holding=true | |
710 | ||
711 | spread=2 | |
712 | ||
713 | for i=0,1,0.2 do | |
714 | ||
715 | wait() | |
716 | ||
717 | RW.C0=cf(1.5, 0.5, 0) * euler(0.8-0.2*i,0,0) | |
718 | ||
719 | RW.C1=cf(0, 0.5, 0) * euler(0,0.2,-0.2) | |
720 | ||
721 | LW.C0=cf(-1.5, 0.5, 0) * euler(-0.6*i,0,-0.2+0.4*i) | |
722 | ||
723 | LW.C1=cf(0, 0.5, 0) * euler(0,-1.57*i,0) | |
724 | ||
725 | end | |
726 | ||
727 | local arrow=part(3,modelzorz,0.5,0,BrickColor.new("White"),"Arrow",vt(1,1,1)) | |
728 | ||
729 | local arrowmsh=mesh("SpecialMesh",arrow,"FileMesh","http://www.roblox.com/asset/?id=15887356",vt(0,0,0),vt(1,1,2)) | |
730 | ||
731 | arrowmsh.VertexColor=vt(1,1,1) | |
732 | ||
733 | --arrowmsh.TextureId="http://www.roblox.com/asset/?id=15886781" | |
734 | ||
735 | local arrowwld=weld(arrow,arrow,LeftArm,euler(0,0,0)*cf(0,1,0)) | |
736 | ||
737 | for i=0,1,0.1 do | |
738 | ||
739 | wait() | |
740 | ||
741 | Torso.Neck.C0=necko*euler(0.3*i,0,0) | |
742 | ||
743 | RW.C0=cf(1.5, 0.5, 0) * euler(0.6,0,0) | |
744 | ||
745 | RW.C1=cf(0, 0.5, 0) * euler(0,0.2-0.2*i,-0.2+0.2*i) | |
746 | ||
747 | LW.C0=cf(-1.5, 0.5, -0.2*i) * euler(-0.6+1.7*i,0,0.2) | |
748 | ||
749 | LW.C1=cf(0, 0.5, 0) * euler(0,-1.57+3.14*i,0) | |
750 | ||
751 | wld1.C0=euler(0.5+1.57,0,1.57*i)*cf(0,1,0) | |
752 | ||
753 | arrowwld.C0=euler(0,0,1.57*i)*cf(0,1,-1*i) | |
754 | ||
755 | end | |
756 | ||
757 | arrowwld.Part1=prt4 | |
758 | ||
759 | arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5) | |
760 | ||
761 | for i=0,1,0.1 do | |
762 | ||
763 | wait() | |
764 | ||
765 | LW.C0=cf(-1.5+0.5*i, 0.5, -0.2-0.3*i) * euler(1.1-0.1*i,0,0.2+0.3*i) | |
766 | ||
767 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0) | |
768 | ||
769 | arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5-1.5*i) | |
770 | ||
771 | wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65-2*i) | |
772 | ||
773 | end | |
774 | ||
775 | coroutine.resume(coroutine.create(function() | |
776 | ||
777 | wait() | |
778 | ||
779 | while holding==true do | |
780 | ||
781 | wait(0) | |
782 | ||
783 | bg.Parent = Torso | |
784 | ||
785 | local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z) | |
786 | ||
787 | bg.cframe = cf(Torso.Position,pos4) * euler(0,1.57,0) * cf(0,0,0) | |
788 | ||
789 | end | |
790 | ||
791 | bg.Parent=nil | |
792 | ||
793 | end)) | |
794 | ||
795 | for i=0,1,0.1 do | |
796 | ||
797 | wait() | |
798 | ||
799 | Torso.Neck.C0=necko*euler(0.3-0.3*i,0,-1.57*i) | |
800 | ||
801 | RW.C0=cf(1.5, 0.5, 0) * euler(0.6-0.6*i,0,1.57*i) | |
802 | ||
803 | RW.C1=cf(0, 0.5, 0) * euler(0,1.57*i,0) | |
804 | ||
805 | LW.C0=cf(-1.5+0.5-0.5*i, 0.5, -0.5+0.5*i) * euler(1-1*i,0,0.5-0.7*i) | |
806 | ||
807 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0) | |
808 | ||
809 | wld1.C0=euler(0.5+1.57,0,1.57-1.57*i)*cf(0,1,0) | |
810 | ||
811 | end | |
812 | ||
813 | arrowlimit=0 | |
814 | ||
815 | makearrow=false | |
816 | ||
817 | while holding==true do | |
818 | ||
819 | wait(0) | |
820 | ||
821 | coroutine.resume(coroutine.create(function() | |
822 | ||
823 | if makearrow==false then | |
824 | ||
825 | makearrow=true | |
826 | ||
827 | if arrowlimit<=7 then | |
828 | ||
829 | arrowlimit=arrowlimit+1 | |
830 | ||
831 | local arrowclone=part(3,modelzorz,0.5,1,BrickColor.new("White"),"Arrow",vt(1,1,1)) | |
832 | ||
833 | local arrowmshclone=mesh("SpecialMesh",arrowclone,"FileMesh","http://www.roblox.com/asset/?id=15887356",vt(0,0,0),vt(1,1,2)) | |
834 | ||
835 | arrowmsh.VertexColor=vt(1,1,1) | |
836 | ||
837 | local arrowwldclone=weld(arrowclone,arrowclone,arrow,euler(0,0,3.14)*cf(math.random(-8,8),math.random(-3,3),math.random(-8,8))) | |
838 | ||
839 | coroutine.resume(coroutine.create(function(Arrow) | |
840 | ||
841 | for i=1,0.3,-0.05 do | |
842 | ||
843 | wait() | |
844 | ||
845 | Arrow.Transparency=i | |
846 | ||
847 | end | |
848 | ||
849 | while holding==true do | |
850 | ||
851 | wait() | |
852 | ||
853 | end | |
854 | ||
855 | Arrow.Anchored=true | |
856 | ||
857 | if Arrow:findFirstChild("Weld")~=nil then | |
858 | ||
859 | Arrow.Weld.Parent=nil | |
860 | ||
861 | end | |
862 | ||
863 | wait(math.random()-math.random()) | |
864 | ||
865 | so("http://www.roblox.com/asset/?id=16211041",Arrow,1,1) | |
866 | ||
867 | shoottrail(mouse,Arrow) | |
868 | ||
869 | Arrow.Parent=nil | |
870 | ||
871 | end),arrowclone) | |
872 | ||
873 | end | |
874 | ||
875 | wait(math.random()) | |
876 | ||
877 | makearrow=false | |
878 | ||
879 | end | |
880 | ||
881 | end)) | |
882 | ||
883 | end | |
884 | ||
885 | arrowfft=arrow:Clone() | |
886 | ||
887 | arrowfft.Parent=arrow.Parent | |
888 | ||
889 | arrowfft.CFrame=arrow.CFrame | |
890 | ||
891 | arrowfft.Anchored=true | |
892 | ||
893 | fftmsh=arrowfft.Mesh | |
894 | ||
895 | coroutine.resume(coroutine.create(function(Arrow,Mesh) | |
896 | ||
897 | for i=0,1,0.1 do | |
898 | ||
899 | wait() | |
900 | ||
901 | Arrow.Transparency=i | |
902 | ||
903 | Mesh.Scale=Mesh.Scale+vt(0.2,0.2,0.2) | |
904 | ||
905 | end | |
906 | ||
907 | Arrow.Parent=nil | |
908 | ||
909 | end),arrowfft,fftmsh) | |
910 | ||
911 | so("http://www.roblox.com/asset/?id=16211041",prt8,1,1) | |
912 | ||
913 | shoottrail(mouse,prt8) | |
914 | ||
915 | arrow.Parent=nil | |
916 | ||
917 | wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65) | |
918 | ||
919 | for i=0,1,0.2 do | |
920 | ||
921 | wait() | |
922 | ||
923 | Torso.Neck.C0=necko*euler(0,0.2*i,-1.57) | |
924 | ||
925 | RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2*i) | |
926 | ||
927 | end | |
928 | ||
929 | for i=0,1,0.2 do | |
930 | ||
931 | wait() | |
932 | ||
933 | Torso.Neck.C0=necko*euler(0,0.2+0.1*i,-1.57) | |
934 | ||
935 | RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2+0.1*i) | |
936 | ||
937 | end | |
938 | ||
939 | Humanoid.WalkSpeed=16 | |
940 | ||
941 | for i=0,1,0.1 do | |
942 | ||
943 | wait() | |
944 | ||
945 | Torso.Neck.C0=necko*euler(0,0.3-0.3*i,-1.57+1.57*i) | |
946 | ||
947 | RW.C0=cf(1.5, 0.5, 0) * euler(0.8*i,0,1.87-1.87*i) | |
948 | ||
949 | RW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.37*i,-0.2*i) | |
950 | ||
951 | end | |
952 | ||
953 | spread=0 | |
954 | ||
955 | attack=false | |
956 | ||
957 | end | |
958 | ||
959 | ||
960 | ||
961 | function Decimate() | |
962 | ||
963 | attack=true | |
964 | ||
965 | Humanoid.WalkSpeed=0 | |
966 | ||
967 | print("Archer SS initiated.") | |
968 | ||
969 | SpecialEffect() | |
970 | ||
971 | holding=true | |
972 | ||
973 | coroutine.resume(coroutine.create(function() | |
974 | ||
975 | wait() | |
976 | ||
977 | while holding==true do | |
978 | ||
979 | wait(0) | |
980 | ||
981 | bg.Parent = Torso | |
982 | ||
983 | local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z) | |
984 | ||
985 | bg.cframe = cf(Torso.Position,pos4) * euler(0,1.57,0) * cf(0,0,0) | |
986 | ||
987 | end | |
988 | ||
989 | bg.Parent=nil | |
990 | ||
991 | end)) | |
992 | ||
993 | so("http://roblox.com/asset/?id=2101144",arrow,1,1) | |
994 | ||
995 | local arrow=part(3,modelzorz,0,1,BrickColor.new("White"),"Arrow",vt(1,1,1)) | |
996 | ||
997 | local arrowmsh=mesh("SpecialMesh",arrow,"FileMesh","http://www.roblox.com/asset/?id=15887356",vt(0,0,0),vt(2,2,4)) | |
998 | ||
999 | local arrowwld=weld(arrow,arrow,LeftArm,euler(-1.57,0,0)*cf(0,2,0)) | |
1000 | ||
1001 | for i=0,1,0.1 do | |
1002 | ||
1003 | wait() | |
1004 | ||
1005 | arrow.Transparency=arrow.Transparency-0.05 | |
1006 | ||
1007 | arrowwld.C0=euler(-1.57+0.2*i,0,0)*cf(-0.5*i,2,-0.5*i) | |
1008 | ||
1009 | Torso.Neck.C0=necko*euler(0,0.3*i,-1.57*i) | |
1010 | ||
1011 | RW.C0=cf(1.5, 0.5, -0.5*i) * euler(0.8+2.2*i,0,0) | |
1012 | ||
1013 | RW.C1=cf(0, 0.5, 0) * euler(0,0.2-1.77*i,-0.2+0.2*i) | |
1014 | ||
1015 | LW.C0=cf(-1.5+1.8*i, 0.5+2*i, -0.5*i) * euler(3.1*i,0,-0.2+0.6*i) | |
1016 | ||
1017 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57*i,0) | |
1018 | ||
1019 | end | |
1020 | ||
1021 | arrowwld.Part1=prt4 | |
1022 | ||
1023 | arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5) | |
1024 | ||
1025 | for i=0,1,0.05 do | |
1026 | ||
1027 | wait() | |
1028 | ||
1029 | Torso.Neck.C0=necko*euler(0,0.3-0.1*i,-1.57) | |
1030 | ||
1031 | LW.C0=cf(-1.5+1.8, 2.5-1.5*i, -0.5) * euler(3.1,0,0.4) | |
1032 | ||
1033 | arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5-1*i) | |
1034 | ||
1035 | wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65-4*i) | |
1036 | ||
1037 | end | |
1038 | ||
1039 | for i=0,1,0.05 do | |
1040 | ||
1041 | wait() | |
1042 | ||
1043 | Torso.Neck.C0=necko*euler(0,0.2-0.2*i,-1.57) | |
1044 | ||
1045 | RW.C0=cf(1.5, 0.5, -0.5) * euler(3+0.14*i,0,0) | |
1046 | ||
1047 | RW.C1=cf(0, 0.5, 0) * euler(0,-1.57,-1.57*i) | |
1048 | ||
1049 | LW.C0=cf(-1.5+1.8, 1, -0.5) * euler(3.1,0,0.4+1.17*i) | |
1050 | ||
1051 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0) | |
1052 | ||
1053 | end | |
1054 | ||
1055 | while holding==true do | |
1056 | ||
1057 | wait() | |
1058 | ||
1059 | end | |
1060 | ||
1061 | so("http://www.roblox.com/asset/?id=16211041",prt8,1,1) | |
1062 | ||
1063 | SSshoottrail(mouse,prt8) | |
1064 | ||
1065 | arrow.Parent=nil | |
1066 | ||
1067 | Humanoid.WalkSpeed=16 | |
1068 | ||
1069 | for i=0,1,0.2 do | |
1070 | ||
1071 | wait() | |
1072 | ||
1073 | Torso.Neck.C0=necko*euler(0,0.3*i,-1.57) | |
1074 | ||
1075 | RW.C0=cf(1.5, 0.5, -0.5) * euler(3.24,0,0) | |
1076 | ||
1077 | RW.C1=cf(0, 0.5, 0) * euler(0,-1.57,-1.57+1*i) | |
1078 | ||
1079 | LW.C0=cf(-1.5+1.8, 1, -0.5) * euler(3.1,0,1.57-1*i) | |
1080 | ||
1081 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0) | |
1082 | ||
1083 | wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65) | |
1084 | ||
1085 | end | |
1086 | ||
1087 | for i=0,1,0.1 do | |
1088 | ||
1089 | wait() | |
1090 | ||
1091 | Torso.Neck.C0=necko*euler(0,0.3+0.1*i,-1.57) | |
1092 | ||
1093 | RW.C0=cf(1.5, 0.5, -0.5) * euler(3.24,0,0) | |
1094 | ||
1095 | RW.C1=cf(0, 0.5, 0) * euler(0,-1.57,-1.57+1+0.1*i) | |
1096 | ||
1097 | LW.C0=cf(-1.5+1.8, 1, -0.5) * euler(3.1,0,1.57-1-0.1*i) | |
1098 | ||
1099 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0) | |
1100 | ||
1101 | wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65) | |
1102 | ||
1103 | end | |
1104 | ||
1105 | for i=0,1,0.05 do | |
1106 | ||
1107 | wait() | |
1108 | ||
1109 | Torso.Neck.C0=necko*euler(0,0.4-0.4*i,-1.57+1.57*i) | |
1110 | ||
1111 | RW.C0=cf(1.5, 0.5, -0.5+0.5*i) * euler(3.24-2.44*i,0,0) | |
1112 | ||
1113 | RW.C1=cf(0, 0.5, 0) * euler(0,-1.57+1.77*i,-0.47+0.27*i) | |
1114 | ||
1115 | LW.C0=cf(-1.5+1.8-1.8*i, 1-0.5*i, -0.5+0.5*i) * euler(3.1-3.1*i,0,0.47-0.67*i) | |
1116 | ||
1117 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0) | |
1118 | ||
1119 | end | |
1120 | ||
1121 | attack=false | |
1122 | ||
1123 | end | |
1124 | ||
1125 | ||
1126 | ||
1127 | function MagicCircle(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3) | |
1128 | ||
1129 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1130 | ||
1131 | prt.Anchored=true | |
1132 | ||
1133 | prt.CFrame=cframe*cf(x2,y2,z2) | |
1134 | ||
1135 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
1136 | ||
1137 | coroutine.resume(coroutine.create(function() | |
1138 | ||
1139 | for i=0,1,0.1 do | |
1140 | ||
1141 | wait() | |
1142 | ||
1143 | prt.CFrame=prt.CFrame | |
1144 | ||
1145 | prt.Transparency=i | |
1146 | ||
1147 | msh.Scale=msh.Scale+vt(x3,y3,z3) | |
1148 | ||
1149 | end | |
1150 | ||
1151 | prt.Parent=nil | |
1152 | ||
1153 | end)) | |
1154 | ||
1155 | end | |
1156 | ||
1157 | ||
1158 | ||
1159 | function SpecialEffect() | |
1160 | ||
1161 | local prt=part(3,workspace,1,0,BrickColor.new("White"),"Part",vt(1,1,1)) | |
1162 | ||
1163 | prt.Anchored=true | |
1164 | ||
1165 | prt.CFrame=Torso.CFrame | |
1166 | ||
1167 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5)) | |
1168 | ||
1169 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1170 | ||
1171 | for i=0,1,0.2 do | |
1172 | ||
1173 | wait(0) | |
1174 | ||
1175 | Part.Transparency=i | |
1176 | ||
1177 | Mesh.Scale=Mesh.Scale+vt(10,10,10) | |
1178 | ||
1179 | end | |
1180 | ||
1181 | prt.Parent=nil | |
1182 | ||
1183 | end),prt,msh) | |
1184 | ||
1185 | end | |
1186 | ||
1187 | ||
1188 | ||
1189 | Damagefunc1=function(hit,Damage,Knockback) | |
1190 | ||
1191 | if hit.Parent==nil then | |
1192 | ||
1193 | return | |
1194 | ||
1195 | end | |
1196 | ||
1197 | CPlayer=Bin | |
1198 | ||
1199 | h=hit.Parent:FindFirstChild("Humanoid") | |
1200 | ||
1201 | if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then | |
1202 | ||
1203 | if attackdebounce == false then | |
1204 | ||
1205 | attackdebounce = true | |
1206 | ||
1207 | coroutine.resume(coroutine.create(function() | |
1208 | ||
1209 | wait(0.2) | |
1210 | ||
1211 | attackdebounce = false | |
1212 | ||
1213 | end)) | |
1214 | ||
1215 | Damage=Damage | |
1216 | ||
1217 | --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then | |
1218 | ||
1219 | return | |
1220 | ||
1221 | end]] | |
1222 | ||
1223 | -- hs(hit,1.2) | |
1224 | ||
1225 | c=Instance.new("ObjectValue") | |
1226 | ||
1227 | c.Name="creator" | |
1228 | ||
1229 | c.Value=game.Players.LocalPlayer | |
1230 | ||
1231 | c.Parent=h | |
1232 | ||
1233 | game:GetService("Debris"):AddItem(c,.5) | |
1234 | ||
1235 | Damage=Damage+math.random(0,10) | |
1236 | ||
1237 | -- h:TakeDamage(Damage) | |
1238 | ||
1239 | h.Health=h.Health-Damage | |
1240 | ||
1241 | showDamage(hit.Parent,Damage,.5) | |
1242 | ||
1243 | vp=Instance.new("BodyVelocity") | |
1244 | ||
1245 | vp.P=500 | |
1246 | ||
1247 | vp.maxForce=Vector3.new(math.huge,0,math.huge) | |
1248 | ||
1249 | -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback | |
1250 | ||
1251 | vp.velocity=Head.CFrame.lookVector*Knockback+Head.Velocity/1.05 | |
1252 | ||
1253 | if Knockback>0 then | |
1254 | ||
1255 | vp.Parent=hit.Parent.Torso | |
1256 | ||
1257 | end | |
1258 | ||
1259 | rl=Instance.new("BodyAngularVelocity") | |
1260 | ||
1261 | rl.P=3000 | |
1262 | ||
1263 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
1264 | ||
1265 | rl.angularvelocity=Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1266 | ||
1267 | rl.Parent=hit | |
1268 | ||
1269 | coroutine.resume(coroutine.create(function(vel) | |
1270 | ||
1271 | wait(1) | |
1272 | ||
1273 | vel:Remove() | |
1274 | ||
1275 | end),rl) | |
1276 | ||
1277 | game:GetService("Debris"):AddItem(vp,.25) | |
1278 | ||
1279 | game:GetService("Debris"):AddItem(r,.5) | |
1280 | ||
1281 | c=Instance.new("ObjectValue") | |
1282 | ||
1283 | c.Name="creator" | |
1284 | ||
1285 | c.Value=Player | |
1286 | ||
1287 | c.Parent=h | |
1288 | ||
1289 | game:GetService("Debris"):AddItem(c,.5) | |
1290 | ||
1291 | CRIT=false | |
1292 | ||
1293 | hitDeb=true | |
1294 | ||
1295 | AttackPos=6 | |
1296 | ||
1297 | end | |
1298 | ||
1299 | end | |
1300 | ||
1301 | end | |
1302 | ||
1303 | ||
1304 | ||
1305 | Damagefunc2=function(hit,Damage,Knockback) | |
1306 | ||
1307 | if hit.Parent==nil then | |
1308 | ||
1309 | return | |
1310 | ||
1311 | end | |
1312 | ||
1313 | CPlayer=Bin | |
1314 | ||
1315 | blocked=false | |
1316 | ||
1317 | h=hit.Parent:FindFirstChild("Humanoid") | |
1318 | ||
1319 | if h~=nil and hit.Parent:FindFirstChild("Torso")~=nil then | |
1320 | ||
1321 | Damage=Damage | |
1322 | ||
1323 | c=it("ObjectValue") | |
1324 | ||
1325 | c.Name="creator" | |
1326 | ||
1327 | c.Value=game.Players.LocalPlayer | |
1328 | ||
1329 | c.Parent=h | |
1330 | ||
1331 | game:GetService("Debris"):AddItem(c,.5) | |
1332 | ||
1333 | -- print(c.Value) | |
1334 | ||
1335 | --[[ if math.random(0,99)+math.random()<=7.8 then | |
1336 | ||
1337 | CRIT=true | |
1338 | ||
1339 | Damage=Damage*2 | |
1340 | ||
1341 | s=it("Sound") | |
1342 | ||
1343 | s.SoundId="http://www.roblox.com/asset/?id=2801263" | |
1344 | ||
1345 | s.Volume=1 | |
1346 | ||
1347 | s.Pitch=2 | |
1348 | ||
1349 | s.Parent=hit | |
1350 | ||
1351 | s.PlayOnRemove=true | |
1352 | ||
1353 | s.Parent=nil | |
1354 | ||
1355 | ||
1356 | ||
1357 | end]] | |
1358 | ||
1359 | Damage=Damage+math.random(0,10) | |
1360 | ||
1361 | -- Blood(hit.CFrame*cf(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/2)) | |
1362 | ||
1363 | block=hit.Parent:findFirstChild("Block") | |
1364 | ||
1365 | if block~=nil then | |
1366 | ||
1367 | print("herp") | |
1368 | ||
1369 | if block.Value>0 then | |
1370 | ||
1371 | blocked=true | |
1372 | ||
1373 | block.Value=block.Value-3 | |
1374 | ||
1375 | print(block.Value) | |
1376 | ||
1377 | end | |
1378 | ||
1379 | end | |
1380 | ||
1381 | if blocked==false then | |
1382 | ||
1383 | -- h:TakeDamage(Damage) | |
1384 | ||
1385 | h.Health=h.Health-Damage | |
1386 | ||
1387 | showDamage(hit.Parent,Damage,.5) | |
1388 | ||
1389 | else | |
1390 | ||
1391 | h:TakeDamage(1) | |
1392 | ||
1393 | showDamage(hit.Parent,1,.5) | |
1394 | ||
1395 | end | |
1396 | ||
1397 | --if blocked==false then | |
1398 | ||
1399 | --end | |
1400 | ||
1401 | local bodyVelocity=Instance.new("BodyVelocity") | |
1402 | ||
1403 | bodyVelocity.velocity=angle*40+Vector3.new(0,0,0) | |
1404 | ||
1405 | bodyVelocity.P=5000 | |
1406 | ||
1407 | bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
1408 | ||
1409 | bodyVelocity.Parent=hit | |
1410 | ||
1411 | coroutine.resume(coroutine.create(function(Vel) | |
1412 | ||
1413 | wait(1) | |
1414 | ||
1415 | Vel:Remove() | |
1416 | ||
1417 | end),bodyVelocity) | |
1418 | ||
1419 | game:GetService("Debris"):AddItem(vp,1) | |
1420 | ||
1421 | c=it("ObjectValue") | |
1422 | ||
1423 | c.Name="creator" | |
1424 | ||
1425 | c.Value=Player | |
1426 | ||
1427 | c.Parent=h | |
1428 | ||
1429 | game:GetService("Debris"):AddItem(c,.5) | |
1430 | ||
1431 | CRIT=false | |
1432 | ||
1433 | hitDeb=true | |
1434 | ||
1435 | AttackPos=6 | |
1436 | ||
1437 | end | |
1438 | ||
1439 | end | |
1440 | ||
1441 | ||
1442 | ||
1443 | showDamage=function(Char,Dealt,du) | |
1444 | ||
1445 | m=Instance.new("Model") | |
1446 | ||
1447 | m.Name=tostring(Dealt) | |
1448 | ||
1449 | h=Instance.new("Humanoid") | |
1450 | ||
1451 | h.Health=0 | |
1452 | ||
1453 | h.MaxHealth=0 | |
1454 | ||
1455 | h.Parent=m | |
1456 | ||
1457 | c=Instance.new("Part") | |
1458 | ||
1459 | c.Transparency=0 | |
1460 | ||
1461 | c.BrickColor=BrickColor:Red() | |
1462 | ||
1463 | if CRIT==true then | |
1464 | ||
1465 | c.BrickColor=BrickColor.new("Really red") | |
1466 | ||
1467 | end | |
1468 | ||
1469 | c.Name="Head" | |
1470 | ||
1471 | c.TopSurface=0 | |
1472 | ||
1473 | c.BottomSurface=0 | |
1474 | ||
1475 | c.formFactor="Plate" | |
1476 | ||
1477 | c.Size=Vector3.new(1,.4,1) | |
1478 | ||
1479 | ms=Instance.new("CylinderMesh") | |
1480 | ||
1481 | ms.Scale=Vector3.new(.8,.8,.8) | |
1482 | ||
1483 | if CRIT==true then | |
1484 | ||
1485 | ms.Scale=Vector3.new(1,1.25,1) | |
1486 | ||
1487 | end | |
1488 | ||
1489 | ms.Parent=c | |
1490 | ||
1491 | c.Reflectance=0 | |
1492 | ||
1493 | Instance.new("BodyGyro").Parent=c | |
1494 | ||
1495 | c.Parent=m | |
1496 | ||
1497 | c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0)) | |
1498 | ||
1499 | f=Instance.new("BodyPosition") | |
1500 | ||
1501 | f.P=2000 | |
1502 | ||
1503 | f.D=100 | |
1504 | ||
1505 | f.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
1506 | ||
1507 | f.position=c.Position+Vector3.new(0,3,0) | |
1508 | ||
1509 | f.Parent=c | |
1510 | ||
1511 | game:GetService("Debris"):AddItem(m,.5+du) | |
1512 | ||
1513 | c.CanCollide=false | |
1514 | ||
1515 | m.Parent=workspace | |
1516 | ||
1517 | c.CanCollide=false | |
1518 | ||
1519 | end | |
1520 | ||
1521 | ||
1522 | ||
1523 | local function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
1524 | ||
1525 | return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
1526 | ||
1527 | end | |
1528 | ||
1529 | ||
1530 | ||
1531 | spread=0 | |
1532 | ||
1533 | range=500 | |
1534 | ||
1535 | rangepower=50 | |
1536 | ||
1537 | function shoottrail(mouse,baseprt) | |
1538 | ||
1539 | coroutine.resume(coroutine.create(function(v) | |
1540 | ||
1541 | local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread))) * (baseprt.Position-MMouse.Hit.p).magnitude/100 | |
1542 | ||
1543 | local dir = CFrame.new((baseprt.Position+MMouse.Hit.p)/2,MMouse.Hit.p+spreadvector) | |
1544 | ||
1545 | local hit,pos = rayCast(baseprt.Position,dir.lookVector,10,Character) | |
1546 | ||
1547 | local rangepos = range | |
1548 | ||
1549 | local function drawtrail(From,To) | |
1550 | ||
1551 | local effectsmsh = Instance.new("CylinderMesh") | |
1552 | ||
1553 | effectsmsh.Scale = Vector3.new(1,1,1) | |
1554 | ||
1555 | effectsmsh.Name = "Mesh" | |
1556 | ||
1557 | local effectsg = Instance.new("Part") | |
1558 | ||
1559 | effectsg.formFactor = 3 | |
1560 | ||
1561 | effectsg.CanCollide = false | |
1562 | ||
1563 | effectsg.Name = "Eff" | |
1564 | ||
1565 | effectsg.Locked = true | |
1566 | ||
1567 | effectsg.Anchored = true | |
1568 | ||
1569 | effectsg.Size = Vector3.new(0.2,0.2,0.2) | |
1570 | ||
1571 | effectsg.Parent = modelzorz | |
1572 | ||
1573 | effectsmsh.Parent = effectsg | |
1574 | ||
1575 | effectsg.BrickColor = BrickColor.new("White") | |
1576 | ||
1577 | effectsg.Reflectance = 0.25 | |
1578 | ||
1579 | local LP = From | |
1580 | ||
1581 | local point1 = To | |
1582 | ||
1583 | local mg = (LP - point1).magnitude | |
1584 | ||
1585 | effectsmsh.Scale = Vector3.new(1.5,mg*5,1.5) | |
1586 | ||
1587 | effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0) | |
1588 | ||
1589 | coroutine.resume(coroutine.create(function() | |
1590 | ||
1591 | for i = 0 , 1 , 0.1 do | |
1592 | ||
1593 | wait() | |
1594 | ||
1595 | effectsg.Transparency = 1*i | |
1596 | ||
1597 | effectsmsh.Scale = Vector3.new(1-1*i,mg*5,1-1*i) | |
1598 | ||
1599 | end | |
1600 | ||
1601 | effectsg.Parent = nil | |
1602 | ||
1603 | end)) | |
1604 | ||
1605 | end | |
1606 | ||
1607 | local newpos = baseprt.Position | |
1608 | ||
1609 | local inc = rangepower | |
1610 | ||
1611 | repeat | |
1612 | ||
1613 | wait() wait() | |
1614 | ||
1615 | rangepos = rangepos - 10 | |
1616 | ||
1617 | dir = dir * CFrame.Angles(math.rad(-1),0,0) | |
1618 | ||
1619 | hit,pos = rayCast(newpos,dir.lookVector,inc,Character) | |
1620 | ||
1621 | drawtrail(newpos,pos) | |
1622 | ||
1623 | newpos = newpos + (dir.lookVector * inc) | |
1624 | ||
1625 | if inc >= 20 then | |
1626 | ||
1627 | inc = inc - 10 | |
1628 | ||
1629 | end | |
1630 | ||
1631 | if hit ~= nil then | |
1632 | ||
1633 | rangepos = 0 | |
1634 | ||
1635 | end | |
1636 | ||
1637 | until rangepos <= 0 | |
1638 | ||
1639 | if hit ~= nil then | |
1640 | ||
1641 | if hit.Parent:FindFirstChild("Humanoid") ~= nil then | |
1642 | ||
1643 | hum = hit.Parent.Humanoid | |
1644 | ||
1645 | tTorso=hit.Parent.Torso | |
1646 | ||
1647 | Damagefunc2(hit,math.huge,math.huge) | |
1648 | ||
1649 | --ADmg(hum,hit) | |
1650 | ||
1651 | elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then | |
1652 | ||
1653 | hum = hit.Parent.Parent.Humanoid | |
1654 | ||
1655 | tTorso=hit.Parent.Parent.Torso | |
1656 | ||
1657 | Damagefunc2(hit.Parent.Parent.Torso,20,30) | |
1658 | ||
1659 | --ADmg(hum,hit) | |
1660 | ||
1661 | end | |
1662 | ||
1663 | end | |
1664 | ||
1665 | end)) | |
1666 | ||
1667 | end | |
1668 | ||
1669 | ||
1670 | ||
1671 | function SSshoottrail(mouse,baseprt) | |
1672 | ||
1673 | coroutine.resume(coroutine.create(function(v) | |
1674 | ||
1675 | local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread))) * (baseprt.Position-MMouse.Hit.p).magnitude/100 | |
1676 | ||
1677 | local dir = CFrame.new((baseprt.Position+MMouse.Hit.p)/2,MMouse.Hit.p+spreadvector) | |
1678 | ||
1679 | local hit,pos = rayCast(baseprt.Position,dir.lookVector,10,Character) | |
1680 | ||
1681 | local rangepos = range | |
1682 | ||
1683 | local function drawtrail(From,To) | |
1684 | ||
1685 | local effectsmsh = Instance.new("CylinderMesh") | |
1686 | ||
1687 | effectsmsh.Scale = Vector3.new(1,1,1) | |
1688 | ||
1689 | effectsmsh.Name = "Mesh" | |
1690 | ||
1691 | local effectsg = Instance.new("Part") | |
1692 | ||
1693 | effectsg.formFactor = 3 | |
1694 | ||
1695 | effectsg.CanCollide = false | |
1696 | ||
1697 | effectsg.Name = "Eff" | |
1698 | ||
1699 | effectsg.Locked = true | |
1700 | ||
1701 | effectsg.Anchored = true | |
1702 | ||
1703 | effectsg.Size = Vector3.new(0.2,0.2,0.2) | |
1704 | ||
1705 | effectsg.Parent = modelzorz | |
1706 | ||
1707 | effectsmsh.Parent = effectsg | |
1708 | ||
1709 | effectsg.BrickColor = BrickColor.new("White") | |
1710 | ||
1711 | effectsg.Reflectance = 0.25 | |
1712 | ||
1713 | local LP = From | |
1714 | ||
1715 | local point1 = To | |
1716 | ||
1717 | local mg = (LP - point1).magnitude | |
1718 | ||
1719 | effectsmsh.Scale = Vector3.new(2.5,mg*5,2.5) | |
1720 | ||
1721 | effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0) | |
1722 | ||
1723 | coroutine.resume(coroutine.create(function() | |
1724 | ||
1725 | for i = 0 , 1 , 0.1 do | |
1726 | ||
1727 | wait() | |
1728 | ||
1729 | effectsg.Transparency = 1*i | |
1730 | ||
1731 | effectsmsh.Scale = Vector3.new(2.5-2.5*i,mg*5,2.5-2.5*i) | |
1732 | ||
1733 | end | |
1734 | ||
1735 | effectsg.Parent = nil | |
1736 | ||
1737 | end)) | |
1738 | ||
1739 | end | |
1740 | ||
1741 | local newpos = baseprt.Position | |
1742 | ||
1743 | local inc = rangepower | |
1744 | ||
1745 | repeat | |
1746 | ||
1747 | wait() wait() | |
1748 | ||
1749 | rangepos = rangepos - 5 | |
1750 | ||
1751 | hit,pos = rayCast(newpos,dir.lookVector,inc,Character) | |
1752 | ||
1753 | drawtrail(newpos,pos) | |
1754 | ||
1755 | newpos = newpos + (dir.lookVector * inc) | |
1756 | ||
1757 | dir = CFrame.new(pos,MMouse.Hit.p) | |
1758 | ||
1759 | if hit ~= nil then | |
1760 | ||
1761 | MagicCircle(BrickColor.new("White"),CFrame.new(pos),5,5,5,0,0,0,10,10,10) | |
1762 | ||
1763 | if hit.Parent:FindFirstChild("Humanoid") ~= nil then | |
1764 | ||
1765 | hum = hit.Parent.Humanoid | |
1766 | ||
1767 | tTorso=hit.Parent.Torso | |
1768 | ||
1769 | Damagefunc1(hit,60,100) | |
1770 | ||
1771 | --ADmg(hum,hit) | |
1772 | ||
1773 | elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then | |
1774 | ||
1775 | hum = hit.Parent.Parent.Humanoid | |
1776 | ||
1777 | tTorso=hit.Parent.Parent.Torso | |
1778 | ||
1779 | Damagefunc1(hit.Parent.Parent.Torso,60,100) | |
1780 | ||
1781 | --ADmg(hum,hit) | |
1782 | ||
1783 | end | |
1784 | ||
1785 | end | |
1786 | ||
1787 | until rangepos <= 0 | |
1788 | ||
1789 | end)) | |
1790 | ||
1791 | end | |
1792 | ||
1793 | ||
1794 | ||
1795 | function ArrowIn() | |
1796 | ||
1797 | attack=true | |
1798 | ||
1799 | for i=0,1,0.2 do | |
1800 | ||
1801 | wait() | |
1802 | ||
1803 | RW.C0=cf(1.5, 0.5, 0) * euler(0.8-0.2*i,0,0) | |
1804 | ||
1805 | RW.C1=cf(0, 0.5, 0) * euler(0,0.2,-0.2) | |
1806 | ||
1807 | LW.C0=cf(-1.5, 0.5, 0) * euler(-0.6*i,0,-0.2+0.4*i) | |
1808 | ||
1809 | LW.C1=cf(0, 0.5, 0) * euler(0,-1.57*i,0) | |
1810 | ||
1811 | end | |
1812 | ||
1813 | local arrow=part(3,modelzorz,0,0,BrickColor.new("White"),"Arrow",vt(1,1,1)) | |
1814 | ||
1815 | local arrowmsh=mesh("SpecialMesh",arrow,"FileMesh","http://www.roblox.com/asset/?id=15887356",vt(0,0,0),vt(1,1,2)) | |
1816 | ||
1817 | arrowmsh.TextureId="http://www.roblox.com/asset/?id=15886781" | |
1818 | ||
1819 | local arrowwld=weld(arrow,arrow,LeftArm,euler(0,0,0)*cf(0,1,0)) | |
1820 | ||
1821 | for i=0,1,0.2 do | |
1822 | ||
1823 | wait() | |
1824 | ||
1825 | Torso.Neck.C0=necko*euler(0.3*i,0,0) | |
1826 | ||
1827 | RW.C0=cf(1.5, 0.5, 0) * euler(0.6,0,0) | |
1828 | ||
1829 | RW.C1=cf(0, 0.5, 0) * euler(0,0.2-0.2*i,-0.2+0.2*i) | |
1830 | ||
1831 | LW.C0=cf(-1.5, 0.5, -0.2*i) * euler(-0.6+1.7*i,0,0.2) | |
1832 | ||
1833 | LW.C1=cf(0, 0.5, 0) * euler(0,-1.57+3.14*i,0) | |
1834 | ||
1835 | wld1.C0=euler(0.5+1.57,0,1.57*i)*cf(0,1,0) | |
1836 | ||
1837 | arrowwld.C0=euler(0,0,1.57*i)*cf(0,1,-1*i) | |
1838 | ||
1839 | end | |
1840 | ||
1841 | arrowwld.Part1=prt4 | |
1842 | ||
1843 | arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5) | |
1844 | ||
1845 | for i=0,1,0.2 do | |
1846 | ||
1847 | wait() | |
1848 | ||
1849 | LW.C0=cf(-1.5+0.5*i, 0.5, -0.2-0.3*i) * euler(1.1-0.1*i,0,0.2+0.3*i) | |
1850 | ||
1851 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0) | |
1852 | ||
1853 | arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5-1.5*i) | |
1854 | ||
1855 | wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65-2*i) | |
1856 | ||
1857 | end | |
1858 | ||
1859 | coroutine.resume(coroutine.create(function() | |
1860 | ||
1861 | wait() | |
1862 | ||
1863 | while attack==true do | |
1864 | ||
1865 | wait(0) | |
1866 | ||
1867 | bg.Parent = Torso | |
1868 | ||
1869 | local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z) | |
1870 | ||
1871 | bg.cframe = cf(Torso.Position,pos4) * euler(0,1.57,0) * cf(0,0,0) | |
1872 | ||
1873 | end | |
1874 | ||
1875 | bg.Parent=nil | |
1876 | ||
1877 | end)) | |
1878 | ||
1879 | for i=0,1,0.2 do | |
1880 | ||
1881 | wait() | |
1882 | ||
1883 | Torso.Neck.C0=necko*euler(0.3-0.3*i,0,-1.57*i) | |
1884 | ||
1885 | RW.C0=cf(1.5, 0.5, 0) * euler(0.6-0.6*i,0,1.57*i) | |
1886 | ||
1887 | RW.C1=cf(0, 0.5, 0) * euler(0,1.57*i,0) | |
1888 | ||
1889 | LW.C0=cf(-1.5+0.5-0.5*i, 0.5, -0.5+0.5*i) * euler(1-1*i,0,0.5-0.7*i) | |
1890 | ||
1891 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0) | |
1892 | ||
1893 | wld1.C0=euler(0.5+1.57,0,1.57-1.57*i)*cf(0,1,0) | |
1894 | ||
1895 | end | |
1896 | ||
1897 | while hold==true do | |
1898 | ||
1899 | wait(0) | |
1900 | ||
1901 | end | |
1902 | ||
1903 | so("http://www.roblox.com/asset/?id=16211041",prt8,1,1) | |
1904 | ||
1905 | arrow.Parent=nil | |
1906 | ||
1907 | shoottrail(mouse,prt8) | |
1908 | ||
1909 | wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65) | |
1910 | ||
1911 | for i=0,1,0.2 do | |
1912 | ||
1913 | wait() | |
1914 | ||
1915 | Torso.Neck.C0=necko*euler(0,0.2*i,-1.57) | |
1916 | ||
1917 | RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2*i) | |
1918 | ||
1919 | end | |
1920 | ||
1921 | for i=0,1,0.2 do | |
1922 | ||
1923 | wait() | |
1924 | ||
1925 | Torso.Neck.C0=necko*euler(0,0.2+0.1*i,-1.57) | |
1926 | ||
1927 | RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2+0.1*i) | |
1928 | ||
1929 | end | |
1930 | ||
1931 | attack=false | |
1932 | ||
1933 | end | |
1934 | ||
1935 | ||
1936 | ||
1937 | function ob1d(mouse) | |
1938 | ||
1939 | if attack == true then return end | |
1940 | ||
1941 | hold=true | |
1942 | ||
1943 | ArrowIn() | |
1944 | ||
1945 | end | |
1946 | ||
1947 | ||
1948 | ||
1949 | function ob1u(mouse) | |
1950 | ||
1951 | hold = false | |
1952 | ||
1953 | repeat wait() until attack==false | |
1954 | ||
1955 | for i=0,1,0.1 do | |
1956 | ||
1957 | wait() | |
1958 | ||
1959 | Torso.Neck.C0=necko*euler(0,0.3-0.3*i,-1.57+1.57*i) | |
1960 | ||
1961 | RW.C0=cf(1.5, 0.5, 0) * euler(0.8*i,0,1.87-1.87*i) | |
1962 | ||
1963 | RW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.37*i,-0.2*i) | |
1964 | ||
1965 | end | |
1966 | ||
1967 | Torso.Neck.C0=necko | |
1968 | ||
1969 | wld1.C0=euler(0.5+1.57,0,0)*cf(0,1,0) | |
1970 | ||
1971 | wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65) | |
1972 | ||
1973 | RW.C0=cf(1.5, 0.5, 0) * euler(0.8,0,0) | |
1974 | ||
1975 | RW.C1=cf(0, 0.5, 0) * euler(0,0.2,-0.2) | |
1976 | ||
1977 | LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2) | |
1978 | ||
1979 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1980 | ||
1981 | end | |
1982 | ||
1983 | ||
1984 | ||
1985 | buttonhold = false | |
1986 | ||
1987 | ||
1988 | ||
1989 | eul=0 | |
1990 | ||
1991 | function key(key) | |
1992 | ||
1993 | if attack == true then return end | |
1994 | ||
1995 | if key=="z" then | |
1996 | ||
1997 | Melee() | |
1998 | ||
1999 | end | |
2000 | ||
2001 | if key=="x" then | |
2002 | ||
2003 | TripleShot() | |
2004 | ||
2005 | end | |
2006 | ||
2007 | if key=="c" then | |
2008 | ||
2009 | SpiritArrows() | |
2010 | ||
2011 | end | |
2012 | ||
2013 | if key=="v" and ssdebounce==false then | |
2014 | ||
2015 | --ssdebounce=true | |
2016 | ||
2017 | coroutine.resume(coroutine.create(function() | |
2018 | ||
2019 | wait(30) | |
2020 | ||
2021 | ssdebounce=false | |
2022 | ||
2023 | end)) | |
2024 | ||
2025 | Decimate() | |
2026 | ||
2027 | end | |
2028 | ||
2029 | end | |
2030 | ||
2031 | ||
2032 | ||
2033 | function key2(key) | |
2034 | ||
2035 | if key=="c" or key=="v" then | |
2036 | ||
2037 | holding=false | |
2038 | ||
2039 | end | |
2040 | ||
2041 | end | |
2042 | ||
2043 | ||
2044 | ||
2045 | function s(mouse) | |
2046 | ||
2047 | mouse.Button1Down:connect(function() ob1d(mouse) end) | |
2048 | ||
2049 | mouse.Button1Up:connect(function() ob1u(mouse) end) | |
2050 | ||
2051 | mouse.KeyDown:connect(key) | |
2052 | ||
2053 | mouse.KeyUp:connect(key2) | |
2054 | ||
2055 | unsheathed = true | |
2056 | ||
2057 | player = Player | |
2058 | ||
2059 | ch = Character | |
2060 | ||
2061 | MMouse = mouse | |
2062 | ||
2063 | RSH = ch.Torso["Right Shoulder"] | |
2064 | ||
2065 | LSH = ch.Torso["Left Shoulder"] | |
2066 | ||
2067 | -- | |
2068 | ||
2069 | RSH.Parent = nil | |
2070 | ||
2071 | LSH.Parent = nil | |
2072 | ||
2073 | -- | |
2074 | ||
2075 | RW.Part0 = ch.Torso | |
2076 | ||
2077 | RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
2078 | ||
2079 | RW.C1 = CFrame.new(0, 0.5, 0) | |
2080 | ||
2081 | RW.Part1 = ch["Right Arm"] | |
2082 | ||
2083 | RW.Parent = ch.Torso | |
2084 | ||
2085 | --_G.R = RW | |
2086 | ||
2087 | -- | |
2088 | ||
2089 | LW.Part0 = ch.Torso | |
2090 | ||
2091 | LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
2092 | ||
2093 | LW.C1 = CFrame.new(0, 0.5, 0) | |
2094 | ||
2095 | LW.Part1 = ch["Left Arm"] | |
2096 | ||
2097 | LW.Parent = ch.Torso | |
2098 | ||
2099 | --_G.L = LW | |
2100 | ||
2101 | -- | |
2102 | ||
2103 | equipanim() | |
2104 | ||
2105 | end | |
2106 | ||
2107 | ||
2108 | ||
2109 | function ds(mouse) | |
2110 | ||
2111 | hideanim() | |
2112 | ||
2113 | wait(0) | |
2114 | ||
2115 | RW.Parent = nil | |
2116 | ||
2117 | LW.Parent = nil | |
2118 | ||
2119 | RSH.Parent = player.Character.Torso | |
2120 | ||
2121 | LSH.Parent = player.Character.Torso | |
2122 | ||
2123 | end | |
2124 | ||
2125 | ||
2126 | ||
2127 | Bin.Selected:connect(s) | |
2128 | ||
2129 | Bin.Deselected:connect(ds) | |
2130 | ||
2131 | print("Crossbow loaded.") | |
2132 | ||
2133 | -- mediafire | |
2134 | ||
2135 | --[[ | |
2136 | ||
2137 | Copyrighted (C) Fenrier 2013 | |
2138 | ||
2139 | ]] |