SHOW:
|
|
- or go back to the newest paste.
1 | SniperType="Laser" | |
2 | - | Player = game.Players.luxulux |
2 | + | Player = game.Players.sethcuzzone5 |
3 | Character = Player.Character | |
4 | PlayerGui = Player.PlayerGui | |
5 | Backpack = Player.Backpack | |
6 | Torso = Character.Torso | |
7 | Head = Character.Head | |
8 | LeftArm = Character["Left Arm"] | |
9 | LeftLeg = Character["Left Leg"] | |
10 | RightArm = Character["Right Arm"] | |
11 | RightLeg = Character["Right Leg"] | |
12 | LS = Torso["Left Shoulder"] | |
13 | LH = Torso["Left Hip"] | |
14 | RS = Torso["Right Shoulder"] | |
15 | RH = Torso["Right Hip"] | |
16 | X = 1 -- Size.X of the Path | |
17 | Y = 5 -- Size.Y of the Path | |
18 | Z = 1 -- Size.Z of the Path | |
19 | PX = 3 | |
20 | PY = 3 | |
21 | PZ = 3 | |
22 | Longness = 1 -- How long the Path will stay | |
23 | velo = 50 | |
24 | rot = 0 | |
25 | mesh = true | |
26 | scope = false | |
27 | enabled = true | |
28 | dur = nil | |
29 | dur2 = nil | |
30 | ni = 0 | |
31 | --welds | |
32 | RW, LW = Instance.new("Weld"), Instance.new("Weld") | |
33 | --what anim | |
34 | anim = "none" | |
35 | ||
36 | ||
37 | ------------------------------------------------------------- | |
38 | ||
39 | if Character:findFirstChild("Sniper",true) ~= nil then | |
40 | Character:findFirstChild("Sniper",true).Parent = nil | |
41 | end | |
42 | ||
43 | if Character:findFirstChild("Weapon",true) ~= nil then | |
44 | Character:findFirstChild("Weapon",true).Parent = nil | |
45 | end | |
46 | ||
47 | ||
48 | ------------------------------------------------------------- | |
49 | if (script.Parent.className ~= "HopperBin") then | |
50 | Tool = Instance.new("HopperBin") | |
51 | Tool.Parent = Backpack | |
52 | Tool.Name = "Sniper" | |
53 | script.Parent = Tool | |
54 | end | |
55 | Bin = script.Parent | |
56 | ||
57 | local sniper = Instance.new("Part") | |
58 | sniper.Parent = Character | |
59 | sniper.Size = Vector3.new(1,1,1) | |
60 | sniper.CanCollide = false | |
61 | sniper.Anchored = false | |
62 | sniper.Name = "Sniper" | |
63 | sniper.BrickColor = BrickColor.new("Really red") | |
64 | sniper.Position = Torso.Position | |
65 | derp = Instance.new("Part") | |
66 | derp.Parent = nil | |
67 | derp.Transparency = 1 | |
68 | derp.CanCollide = false | |
69 | local son = Instance.new("Sound") | |
70 | son.Parent = sniper | |
71 | son.Pitch = 1 | |
72 | son.Volume = 0.5 | |
73 | son.Looped = false | |
74 | son.SoundId = "http://roblox.com/asset/?id=10209875" | |
75 | local rel = Instance.new("Sound") | |
76 | rel.Parent = sniper | |
77 | rel.Pitch = 1 | |
78 | rel.Volume = 0.5 | |
79 | rel.Looped = false | |
80 | rel.SoundId = "http://roblox.com/asset/?id=10209881" | |
81 | local meh = Instance.new("SpecialMesh") | |
82 | meh.Parent = sniper | |
83 | meh.MeshId = "http://www.roblox.com/asset/?id=2761723" | |
84 | meh.MeshType = "FileMesh" | |
85 | meh.Scale = Vector3.new(0.5,0.5,0.5) | |
86 | local wel = Instance.new("Weld") | |
87 | wel.Parent = sniper | |
88 | wel.Part0 = sniper | |
89 | wel.Part1 = Torso | |
90 | wel.C0 = CFrame.fromEulerAnglesXYZ(0.9,math.rad(90),0) * CFrame.new(0,0, -0.75) | |
91 | ||
92 | ||
93 | hold = false | |
94 | LH0 = LH.C0 | |
95 | RH0 = RH.C0 | |
96 | LS0 = LS.C0 | |
97 | RS0 = RS.C0 | |
98 | ||
99 | function ob1d(mouse) | |
100 | if scope == true then | |
101 | --[[ cam=game.Workspace.CurrentCamera:clone() | |
102 | cam.Parent=game.Workspace | |
103 | cam.Name = "Camzorzlol" | |
104 | game.Workspace.CurrentCamera.CameraSubject = mouse.Target | |
105 | game.Workspace.CurrentCamera.CameraType=3]] | |
106 | workspace.CurrentCamera.FieldOfView=3 | |
107 | Character.Humanoid.WalkSpeed=8 | |
108 | end | |
109 | hold = true | |
110 | ||
111 | ----------------------- | |
112 | ||
113 | ||
114 | ||
115 | --------------------------------------- | |
116 | ||
117 | ||
118 | ||
119 | ||
120 | mouse.Icon = "rbxasset://textures\\GunCursor.png" | |
121 | wp = Instance.new("Part") | |
122 | wp.Parent = Character | |
123 | wp.Size = Vector3.new(1,0.4,1) | |
124 | wp.formFactor = "Plate" | |
125 | wp.Transparency = 1.5 | |
126 | wp.CanCollide = false | |
127 | w = Instance.new("Weld") | |
128 | w.Parent = Torso | |
129 | w.Part0 = Torso | |
130 | w.Part1 = wp | |
131 | w.C0 = CFrame.new(1.5,0.75,0) | |
132 | wp2 = Instance.new("Part") | |
133 | wp2.Parent = Character | |
134 | wp2.Size = Vector3.new(1,0.4,1) | |
135 | wp2.formFactor = "Plate" | |
136 | wp2.Transparency = 1.5 | |
137 | wp2.CanCollide = false | |
138 | w2 = Instance.new("Weld") | |
139 | w2.Parent = Torso | |
140 | w2.Part0 = Torso | |
141 | w2.Part1 = wp2 | |
142 | w2.C0 = CFrame.new(-1.5,0.75,-0) | |
143 | wp3 = Instance.new("Part") | |
144 | wp3.Parent = Character | |
145 | wp3.Size = Vector3.new(1,0.4,1) | |
146 | wp3.formFactor = "Plate" | |
147 | wp3.Transparency = 1.5 | |
148 | wp3.FrontSurface = "Motor" | |
149 | wp3.CanCollide = false | |
150 | w3 = Instance.new("Weld") | |
151 | w3.Parent = Torso | |
152 | w3.Part0 = Torso | |
153 | w3.Part1 = wp3 | |
154 | w3.C0 = CFrame.new(0,0.75,-2.5) * CFrame.fromEulerAnglesXYZ(0,math.rad(-90),0) | |
155 | ||
156 | ||
157 | function laser(to,from) -- MUST BE VECTOR3 | |
158 | local las=Instance.new("Part",Workspace) | |
159 | las.Anchored=true | |
160 | las.Locked=true | |
161 | las.CanCollide=false | |
162 | las.TopSurface=0 | |
163 | las.BottomSurface=0 | |
164 | las.FormFactor = "Custom" | |
165 | las.BrickColor=BrickColor.new("Bright red") | |
166 | las.Size=Vector3.new(1,1,1) | |
167 | las.CFrame=CFrame.new((to+from)/2,from)*CFrame.Angles(math.rad(90),0,0) | |
168 | game.Debris:AddItem(las,0.5) | |
169 | local msh=Instance.new("SpecialMesh",las) | |
170 | msh.Scale=Vector3.new(0.1,(to-from).magnitude,0.1) | |
171 | return las | |
172 | end | |
173 | ||
174 | ||
175 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
176 | return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
177 | end | |
178 | ||
179 | ||
180 | RS.Part1 = nil | |
181 | LS.Part1 = nil | |
182 | while hold == true do | |
183 | ||
184 | offset=(Torso.Position.y-mouse.Hit.p.y)/60 | |
185 | mag=(Torso.Position-mouse.Hit.p).magnitude/80 | |
186 | offset=offset/mag | |
187 | necko=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
188 | Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(offset,0,0) | |
189 | dur = mouse.Hit | |
190 | dur2 = mouse.Target | |
191 | RightArm.CFrame = CFrame.new(wp.Position, mouse.Hit.p) | |
192 | LeftArm.CFrame = CFrame.new(wp2.Position, mouse.Hit.p) | |
193 | RightArm.CFrame = RightArm.CFrame + RightArm.CFrame.lookVector * 1 | |
194 | LeftArm.CFrame = LeftArm.CFrame + LeftArm.CFrame.lookVector * 1 | |
195 | RightArm.CFrame = RightArm.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(90),0,-1) * CFrame.new(0,-2,0) | |
196 | LeftArm.CFrame = LeftArm.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(90),0,0) | |
197 | wel.Part0 = sniper | |
198 | wel.Part1 = LeftArm | |
199 | wel.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90),0,0) * CFrame.new(0,2.3,0) | |
200 | sniper.CFrame = LeftArm.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(-90),0,0) * CFrame.new(0,0.5,-2.3) | |
201 | derp.Parent = Character | |
202 | derp.CFrame = sniper.CFrame * CFrame.new(0,0.2,-3) | |
203 | dwel = Instance.new("Weld") | |
204 | dwel.Parent = derp | |
205 | dwel.Part0 = derp | |
206 | dwel.Part1 = sniper | |
207 | dwel.C0 = CFrame.new(0,-0.1,3) | |
208 | RightArm.Anchored = true | |
209 | LeftArm.Anchored = true | |
210 | ||
211 | wait() | |
212 | end | |
213 | RS.Part1 = RightArm | |
214 | LS.Part1 = LeftArm | |
215 | RightArm.Anchored = false | |
216 | LeftArm.Anchored = false | |
217 | wp:remove() | |
218 | wp2:remove() | |
219 | wp3:remove() | |
220 | derp.Parent = nil | |
221 | end | |
222 | ||
223 | ||
224 | ||
225 | function ob1u(mouse) | |
226 | Torso.Neck.C0=necko | |
227 | --[[if game.workspace:findFirstChild("Camzorzlol") ~= nil then | |
228 | game.Workspace.CurrentCamera.CameraSubject=Character | |
229 | game.Workspace.CurrentCamera:Remove() | |
230 | game.Workspace.CurrentCamera=cam | |
231 | end ]] | |
232 | workspace.CurrentCamera.FieldOfView=70 | |
233 | Character.Humanoid.WalkSpeed=16 | |
234 | hold = false | |
235 | wel.Part0 = sniper | |
236 | wel.Part1 = Torso | |
237 | wel.C0 = CFrame.fromEulerAnglesXYZ(0.9,math.rad(90),0) * CFrame.new(0,0, -0.75) | |
238 | LH.C0 = LH0 | |
239 | RH.C0 = RH0 | |
240 | LS.C0 = LS0 | |
241 | RS.C0 = RS0 | |
242 | end | |
243 | ||
244 | ||
245 | function key(key) | |
246 | if hold == true then | |
247 | if key == "q" then | |
248 | if enabled == true then | |
249 | enabled = false | |
250 | son:Play() | |
251 | sp = derp.Position | |
252 | dirr = derp.CFrame * CFrame.new(math.random(-2,1)*math.random(),math.random(-2,1)*math.random(),math.random(-2,1)*math.random()) | |
253 | ||
254 | local hit,pos = rayCast(sp,dirr.lookVector,500,Character) | |
255 | q = dur | |
256 | coroutine.resume(coroutine.create(function() | |
257 | local mesh = Instance.new("SpecialMesh") | |
258 | mesh.MeshType = "Sphere" | |
259 | mesh.Scale = Vector3.new(0,0,0) | |
260 | local shell = Instance.new("Part") | |
261 | mesh.Parent = shell | |
262 | shell.Anchored = true | |
263 | shell.formFactor = 1 | |
264 | shell.Size = Vector3.new(2,2,2) | |
265 | shell.CFrame = sniper.CFrame * CFrame.new(0,0.2,-3) * CFrame.fromEulerAnglesXYZ(0,0,math.random(-50,50)) | |
266 | shell.Parent = Character | |
267 | shell.Transparency = 0 | |
268 | shell.BrickColor = BrickColor.new("Bright yellow") | |
269 | shell.CanCollide = false | |
270 | coroutine.resume(coroutine.create(function() | |
271 | for i = 0 , 3 , 0.7 do | |
272 | wait(0.1) | |
273 | mesh.Scale = mesh.Scale + Vector3.new(0.3,0.3,0.3) | |
274 | shell.Transparency = shell.Transparency + 0.4 | |
275 | end | |
276 | shell.Transparency = 1 | |
277 | shell.Parent = nil | |
278 | end)) | |
279 | local mesh = Instance.new("SpecialMesh") | |
280 | mesh.MeshType = "Sphere" | |
281 | mesh.Scale = Vector3.new(0.2,0.2,0) | |
282 | local shell = Instance.new("Part") | |
283 | mesh.Parent = shell | |
284 | shell.Anchored = true | |
285 | shell.formFactor = 1 | |
286 | shell.Size = Vector3.new(2,2,2) | |
287 | shell.CFrame = sniper.CFrame * CFrame.new(0,0.2,-3) * CFrame.fromEulerAnglesXYZ(0,0,0) | |
288 | shell.Parent = Character | |
289 | shell.Transparency = 0 | |
290 | shell.BrickColor = BrickColor.new("Bright yellow") | |
291 | shell.CanCollide = false | |
292 | coroutine.resume(coroutine.create(function() | |
293 | for i = 0 , 3 , 0.7 do | |
294 | wait(0.1) | |
295 | mesh.Scale = mesh.Scale + Vector3.new(0,0,1) | |
296 | shell.Transparency = shell.Transparency + 0.4 | |
297 | end | |
298 | shell.Transparency = 1 | |
299 | shell.Parent = nil | |
300 | end)) | |
301 | end)) | |
302 | coroutine.resume(coroutine.create(function() | |
303 | if hit ~= nil and pos ~= nil then | |
304 | if hit.Parent.className == "Hat" then | |
305 | hit:BreakJoints() | |
306 | hit.Velocity = Vector3.new(math.random(-5,5),20,math.random(-5,5)) | |
307 | end | |
308 | if(hit.Parent:findFirstChild("Humanoid")~= nil)then | |
309 | --hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 20 | |
310 | if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Name ~= "Base" and hit.Parent.Name ~= Player.Name then | |
311 | c=Instance.new("ObjectValue") | |
312 | c.Name="creator" | |
313 | c.Value=game.Players.LocalPlayer | |
314 | c.Parent=hit.Parent.Humanoid | |
315 | game:GetService("Debris"):AddItem(c,.5) | |
316 | if hit.Name == "Head" then | |
317 | hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 90 | |
318 | hit.Velocity = Vector3.new(0,100,0) | |
319 | local bld = Instance.new("Part") | |
320 | bld.Parent = game.workspace | |
321 | bld.BrickColor = BrickColor.new("Bright red") | |
322 | bld.Size = Vector3.new(0.2, 0.2, 0.2) | |
323 | bld.Anchored = false | |
324 | bld.formFactor = 2 | |
325 | bld.CFrame = CFrame.new(hit.Position) | |
326 | local bld2 = Instance.new("Part") | |
327 | bld2.Parent = game.workspace | |
328 | bld2.BrickColor = BrickColor.new("Bright red") | |
329 | bld2.Size = Vector3.new(0.2, 0.2, 0.2) | |
330 | bld2.Anchored = false | |
331 | bld2.formFactor = 2 | |
332 | bld2.CFrame = CFrame.new(hit.Position) | |
333 | local bld3 = Instance.new("Part") | |
334 | bld3.Parent = game.workspace | |
335 | bld3.BrickColor = BrickColor.new("Bright red") | |
336 | bld3.Size = Vector3.new(0.2, 0.2, 0.2) | |
337 | bld3.Anchored = false | |
338 | bld3.formFactor = 2 | |
339 | bld3.CFrame = CFrame.new(hit.Position) | |
340 | local bld4 = Instance.new("Part") | |
341 | bld4.Parent = game.workspace | |
342 | bld4.BrickColor = BrickColor.new("Bright red") | |
343 | bld4.Size = Vector3.new(0.2, 0.2, 0.2) | |
344 | bld4.Anchored = false | |
345 | bld4.formFactor = 2 | |
346 | bld4.CFrame = CFrame.new(hit.Position) | |
347 | local bld5 = Instance.new("Part") | |
348 | bld5.Parent = game.workspace | |
349 | bld5.BrickColor = BrickColor.new("Bright red") | |
350 | bld5.Size = Vector3.new(0.2, 0.2, 0.2) | |
351 | bld5.Anchored = false | |
352 | bld5.formFactor = 2 | |
353 | bld5.CFrame = CFrame.new(hit.Position) | |
354 | local bld6 = Instance.new("Part") | |
355 | bld6.Parent = game.workspace | |
356 | bld6.BrickColor = BrickColor.new("Bright red") | |
357 | bld6.Size = Vector3.new(0.2, 0.2, 0.2) | |
358 | bld6.Anchored = false | |
359 | bld6.formFactor = 2 | |
360 | bld6.CFrame = CFrame.new(hit.Position) | |
361 | wait(6) | |
362 | bld:Remove() | |
363 | bld2:Remove() | |
364 | bld3:Remove() | |
365 | bld4:Remove() | |
366 | bld5:Remove() | |
367 | bld6:Remove() | |
368 | else | |
369 | hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 30 | |
370 | for i = 0,3 do | |
371 | local bld = Instance.new("Part") | |
372 | bld.Parent = game.workspace | |
373 | bld.BrickColor = BrickColor.new("Bright red") | |
374 | bld.Size = Vector3.new(0.2, 0.2, 0.2) | |
375 | bld.Anchored = false | |
376 | bld.formFactor = 2 | |
377 | bld.CFrame = CFrame.new(hit.Position) | |
378 | coroutine.resume(coroutine.create(function(Part) | |
379 | wait(6) | |
380 | Part:Remove() | |
381 | end),bld) | |
382 | end | |
383 | end | |
384 | end | |
385 | end | |
386 | end | |
387 | end)) | |
388 | secondpos=pos | |
389 | print(Herp) | |
390 | print(sp) | |
391 | newray=secondpos | |
392 | ||
393 | local hit,pos = rayCast(newray,dirr.lookVector,500,hit) | |
394 | q = dur | |
395 | coroutine.resume(coroutine.create(function() | |
396 | local mesh = Instance.new("SpecialMesh") | |
397 | mesh.MeshType = "Sphere" | |
398 | mesh.Scale = Vector3.new(0,0,0) | |
399 | local shell = Instance.new("Part") | |
400 | mesh.Parent = shell | |
401 | shell.Anchored = true | |
402 | shell.formFactor = 1 | |
403 | shell.Size = Vector3.new(2,2,2) | |
404 | shell.CFrame = sniper.CFrame * CFrame.new(0,0.2,-3) * CFrame.fromEulerAnglesXYZ(0,0,math.random(-50,50)) | |
405 | shell.Parent = Character | |
406 | shell.Transparency = 0 | |
407 | shell.BrickColor = BrickColor.new("Bright yellow") | |
408 | shell.CanCollide = false | |
409 | coroutine.resume(coroutine.create(function() | |
410 | for i = 0 , 3 , 0.7 do | |
411 | wait(0.1) | |
412 | mesh.Scale = mesh.Scale + Vector3.new(0.3,0.3,0.3) | |
413 | shell.Transparency = shell.Transparency + 0.4 | |
414 | end | |
415 | shell.Transparency = 1 | |
416 | shell.Parent = nil | |
417 | end)) | |
418 | local mesh = Instance.new("SpecialMesh") | |
419 | mesh.MeshType = "Sphere" | |
420 | mesh.Scale = Vector3.new(0.2,0.2,0) | |
421 | local shell = Instance.new("Part") | |
422 | mesh.Parent = shell | |
423 | shell.Anchored = true | |
424 | shell.formFactor = 1 | |
425 | shell.Size = Vector3.new(2,2,2) | |
426 | shell.CFrame = sniper.CFrame * CFrame.new(0,0.2,-3) * CFrame.fromEulerAnglesXYZ(0,0,0) | |
427 | shell.Parent = Character | |
428 | shell.Transparency = 0 | |
429 | shell.BrickColor = BrickColor.new("Bright yellow") | |
430 | shell.CanCollide = false | |
431 | coroutine.resume(coroutine.create(function() | |
432 | for i = 0 , 3 , 0.7 do | |
433 | wait(0.1) | |
434 | mesh.Scale = mesh.Scale + Vector3.new(0,0,1) | |
435 | shell.Transparency = shell.Transparency + 0.4 | |
436 | end | |
437 | shell.Transparency = 1 | |
438 | shell.Parent = nil | |
439 | end)) | |
440 | end)) | |
441 | local las=Instance.new("Part",sniper) | |
442 | if SniperType=="Normal" then | |
443 | las.Transparency=1 | |
444 | end | |
445 | las.Anchored=true | |
446 | las.Locked=true | |
447 | las.CanCollide=false | |
448 | las.TopSurface=0 | |
449 | las.BottomSurface=0 | |
450 | las.FormFactor = "Custom" | |
451 | las.BrickColor=BrickColor.new("Bright red") | |
452 | las.Size=Vector3.new(1,1,1) | |
453 | las.CFrame=CFrame.new((derp.Position+pos)/2,pos) *CFrame.Angles(math.rad(90),0,0) | |
454 | local msh=Instance.new("SpecialMesh",las) | |
455 | mag = (derp.Position-pos).magnitude | |
456 | msh.Scale=Vector3.new(0.1,mag,0.1) | |
457 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
458 | for i = 0,1,0.1 do | |
459 | wait() | |
460 | Part.Transparency = Part.Transparency + 0.1 | |
461 | Mesh.Scale = Mesh.Scale + Vector3.new(0.15,0.7,0.15) | |
462 | end | |
463 | Part.Parent = nil | |
464 | end),las,msh) | |
465 | local las=Instance.new("Part",sniper) | |
466 | if SniperType=="Normal" then | |
467 | las.Transparency=1 | |
468 | end | |
469 | las.Anchored=true | |
470 | las.Locked=true | |
471 | las.CanCollide=false | |
472 | las.TopSurface=0 | |
473 | las.BottomSurface=0 | |
474 | las.FormFactor = "Custom" | |
475 | las.BrickColor=BrickColor.new("Bright yellow") | |
476 | las.Size=Vector3.new(1,1,1) | |
477 | las.CFrame=CFrame.new((derp.Position+pos)/2,pos) *CFrame.Angles(math.rad(90),0,0) | |
478 | local msh=Instance.new("SpecialMesh",las) | |
479 | mag = (derp.Position-pos).magnitude | |
480 | msh.Scale=Vector3.new(0.1,mag,0.1) | |
481 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
482 | for i = 0,1,0.05 do | |
483 | wait() | |
484 | Part.Transparency = Part.Transparency + 0.05 | |
485 | --Mesh.Scale = Mesh.Scale + Vector3.new(-0.05,0.7,-0.05) | |
486 | end | |
487 | Part.Parent = nil | |
488 | end),las,msh) | |
489 | if hit ~= nil and pos ~= nil then | |
490 | if hit.Parent.className == "Hat" then | |
491 | hit:BreakJoints() | |
492 | hit.Velocity = Vector3.new(math.random(-5,5),20,math.random(-5,5)) | |
493 | end | |
494 | if(hit.Parent:findFirstChild("Humanoid")~= nil)then | |
495 | --hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 20 | |
496 | if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Name ~= "Base" and hit.Parent.Name ~= Player.Name then | |
497 | c=Instance.new("ObjectValue") | |
498 | c.Name="creator" | |
499 | c.Value=game.Players.LocalPlayer | |
500 | c.Parent=hit.Parent.Humanoid | |
501 | game:GetService("Debris"):AddItem(c,.5) | |
502 | if hit.Name == "Head" then | |
503 | hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 90 | |
504 | hit.Velocity = Vector3.new(0,100,0) | |
505 | local bld = Instance.new("Part") | |
506 | bld.Parent = game.workspace | |
507 | bld.BrickColor = BrickColor.new("Bright red") | |
508 | bld.Size = Vector3.new(0.2, 0.2, 0.2) | |
509 | bld.Anchored = false | |
510 | bld.formFactor = 2 | |
511 | bld.CFrame = CFrame.new(hit.Position) | |
512 | local bld2 = Instance.new("Part") | |
513 | bld2.Parent = game.workspace | |
514 | bld2.BrickColor = BrickColor.new("Bright red") | |
515 | bld2.Size = Vector3.new(0.2, 0.2, 0.2) | |
516 | bld2.Anchored = false | |
517 | bld2.formFactor = 2 | |
518 | bld2.CFrame = CFrame.new(hit.Position) | |
519 | local bld3 = Instance.new("Part") | |
520 | bld3.Parent = game.workspace | |
521 | bld3.BrickColor = BrickColor.new("Bright red") | |
522 | bld3.Size = Vector3.new(0.2, 0.2, 0.2) | |
523 | bld3.Anchored = false | |
524 | bld3.formFactor = 2 | |
525 | bld3.CFrame = CFrame.new(hit.Position) | |
526 | local bld4 = Instance.new("Part") | |
527 | bld4.Parent = game.workspace | |
528 | bld4.BrickColor = BrickColor.new("Bright red") | |
529 | bld4.Size = Vector3.new(0.2, 0.2, 0.2) | |
530 | bld4.Anchored = false | |
531 | bld4.formFactor = 2 | |
532 | bld4.CFrame = CFrame.new(hit.Position) | |
533 | local bld5 = Instance.new("Part") | |
534 | bld5.Parent = game.workspace | |
535 | bld5.BrickColor = BrickColor.new("Bright red") | |
536 | bld5.Size = Vector3.new(0.2, 0.2, 0.2) | |
537 | bld5.Anchored = false | |
538 | bld5.formFactor = 2 | |
539 | bld5.CFrame = CFrame.new(hit.Position) | |
540 | local bld6 = Instance.new("Part") | |
541 | bld6.Parent = game.workspace | |
542 | bld6.BrickColor = BrickColor.new("Bright red") | |
543 | bld6.Size = Vector3.new(0.2, 0.2, 0.2) | |
544 | bld6.Anchored = false | |
545 | bld6.formFactor = 2 | |
546 | bld6.CFrame = CFrame.new(hit.Position) | |
547 | wait(6) | |
548 | bld:Remove() | |
549 | bld2:Remove() | |
550 | bld3:Remove() | |
551 | bld4:Remove() | |
552 | bld5:Remove() | |
553 | bld6:Remove() | |
554 | else | |
555 | hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 30 | |
556 | for i = 0,3 do | |
557 | local bld = Instance.new("Part") | |
558 | bld.Parent = game.workspace | |
559 | bld.BrickColor = BrickColor.new("Bright red") | |
560 | bld.Size = Vector3.new(0.2, 0.2, 0.2) | |
561 | bld.Anchored = false | |
562 | bld.formFactor = 2 | |
563 | bld.CFrame = CFrame.new(hit.Position) | |
564 | coroutine.resume(coroutine.create(function(Part) | |
565 | wait(6) | |
566 | Part:Remove() | |
567 | end),bld) | |
568 | end | |
569 | end | |
570 | end | |
571 | end | |
572 | end | |
573 | end | |
574 | end | |
575 | end | |
576 | if key == "e" then | |
577 | if enabled == false then | |
578 | rel:Play() | |
579 | local shell = Instance.new("Part") | |
580 | shell.Parent = game.workspace | |
581 | shell.formFactor = 0 | |
582 | shell.Size = Vector3.new(1,1,1) | |
583 | shell.TopSurface = 0 | |
584 | shell.BottomSurface = 0 | |
585 | shell.Anchored = false | |
586 | shell.BrickColor = BrickColor.new(24) | |
587 | shell.Locked = true | |
588 | shell.Name = "Shell" | |
589 | shell.Position = sniper.Position | |
590 | local m = Instance.new("SpecialMesh") | |
591 | m.Scale = Vector3.new(0.125,0.25,0.12) | |
592 | m.Parent = shell | |
593 | local cfrf = sniper.CFrame * CFrame.fromEulerAnglesXYZ(0,1.57,0) | |
594 | local cfr = cfrf + cfrf.lookVector * -0.5 | |
595 | shell.CFrame = cfr | |
596 | shell.RotVelocity = Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)) | |
597 | shell.Velocity = cfr.lookVector * -5 | |
598 | wait(0.5) | |
599 | enabled = true | |
600 | wait(3) | |
601 | shell:Remove() | |
602 | end | |
603 | end | |
604 | if key == "z" then | |
605 | if scope == false then | |
606 | scope = true | |
607 | elseif scope == true then | |
608 | scope = false | |
609 | end | |
610 | end | |
611 | if key == "x" then | |
612 | cam=game.Workspace.CurrentCamera:clone() | |
613 | cam.Parent=game.Workspace | |
614 | cam.Name = "Camera" | |
615 | game.Workspace.CurrentCamera.CameraSubject = Head | |
616 | game.Workspace.CurrentCamera.CameraType=3 | |
617 | end | |
618 | end | |
619 | ||
620 | ||
621 | ||
622 | ||
623 | ||
624 | ||
625 | function key2(key) | |
626 | ||
627 | ||
628 | end | |
629 | ||
630 | function s(mouse) | |
631 | mouse.Button1Down:connect(function() ob1d(mouse) end) | |
632 | mouse.Button1Up:connect(function() ob1u(mouse) end) | |
633 | mouse.KeyDown:connect(key) | |
634 | mouse.KeyUp:connect(key2) | |
635 | end | |
636 | function ds(mouse) | |
637 | end | |
638 | Bin.Selected:connect(s) | |
639 | Bin.Deselected:connect(ds) | |
640 | ||
641 | while true do | |
642 | wait() | |
643 | sniper.Parent = workspace | |
644 | end | |
645 | -- lego mediafire |