View difference between Paste ID: iZGvPYaj and TTJKBTJf
SHOW: | | - or go back to the newest paste.
1-
Player = game.Players.LocalPlayer
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 Player = game.Players.LocalPlayer
6
Character = Player.Character
7
script.Parent = Character
8
 
9
--[[ * Fire Handle * ]]--
10
 
11
pcall(function() Character.Gun:Remove() end)
12
 
13
Gun = Instance.new("Model")
14
Gun.Name = "Gun"
15
Gun.Parent = Character
16
 
17
--[[ * Arm Weld * ]]--
18
 
19
ArmWeld = Instance.new("Weld") 
20
ArmWeld.Parent = Character["Torso"]
21
ArmWeld.Part0 = ArmWeld.Parent
22
ArmWeld.Part1 = Character["Right Arm"]
23
ArmWeld.C0 = CFrame.new(1.5,0.5,-0.5) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)
24
 
25
--[[ * Arm Weld * ]]--
26
 
27
ArmWeldR = Instance.new("Weld") 
28
ArmWeldR.Parent = Character["Torso"]
29
ArmWeldR.Part0 = ArmWeldR.Parent
30
ArmWeldR.Part1 = Character["Left Arm"]
31
ArmWeldR.C0 = CFrame.new(-1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
32
 
33
--[[ * Neck Weld * ]]--
34
 
35
Neck = Instance.new("Weld") 
36
Neck.Parent = Character["Torso"]
37
Neck.Part0 = Neck.Parent
38
Neck.Part1 = Character["Head"]
39
Neck.C0 = CFrame.new(0,1.5,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
40
 
41
--[[ * Handle * ]]--
42
 
43
Handle = Instance.new("Part")
44
Handle.formFactor = "Custom"
45
Handle.Locked = true
46
Handle.CanCollide = false
47
Handle.BrickColor = BrickColor.new("Medium stone grey")
48
Handle.Anchored = false
49
Handle.Size = Vector3.new(0.25,0.7,0.25)
50
Handle.TopSurface = 0
51
Handle.BottomSurface = 0
52
Handle.Parent = Gun
53
MeshA = Instance.new("BlockMesh",Handle)
54
WeldA = Instance.new("Weld")
55
WeldA.Parent = Handle
56
WeldA.Part0 = Character["Right Arm"]
57
WeldA.Part1 = Handle
58
WeldA.C0 = CFrame.new(0,-1.1,-0.2) * CFrame.Angles(-math.pi/2-0.1,0,0)
59
 
60
--[[ * Cartrage * ]]--
61
 
62
Cartrage = Instance.new("Part")
63
Cartrage.formFactor = "Custom"
64
Cartrage.Locked = true
65
Cartrage.CanCollide = false
66
Cartrage.BrickColor = BrickColor.new("Really black")
67
Cartrage.Anchored = false
68
Cartrage.Size = Vector3.new(0.2,0.5,0.2)
69
Cartrage.TopSurface = 0
70
Cartrage.BottomSurface = 0
71
Cartrage.Parent = Gun
72
MeshB = Instance.new("BlockMesh",Cartrage)
73
WeldB = Instance.new("Weld")
74
WeldB.Parent = Cartrage
75
WeldB.Part0 = Handle
76
WeldB.Part1 = Cartrage
77
WeldB.C0 = CFrame.new(0,0,0) * CFrame.Angles(0,0,0)
78
 
79
--[[ * Trigger * ]]--
80
 
81
Trigger = Instance.new("Part")
82
Trigger.formFactor = "Custom"
83
Trigger.Locked = true
84
Trigger.CanCollide = false
85
Trigger.BrickColor = BrickColor.new("Really black")
86
Trigger.Anchored = false
87
Trigger.Size = Vector3.new(0.2,0.4,0.4)
88
Trigger.TopSurface = 0
89
Trigger.BottomSurface = 0
90
Trigger.Parent = Gun
91
MeshB = Instance.new("BlockMesh",Trigger)
92
WeldB = Instance.new("Weld")
93
WeldB.Parent = Trigger
94
WeldB.Part0 = Handle
95
WeldB.Part1 = Trigger
96
WeldB.C0 = CFrame.new(0,0.21,-0.09) * CFrame.Angles(0,0,0)
97
 
98
--[[ * BWall * ]]--
99
 
100
BWall = Instance.new("Part")
101
BWall.formFactor = "Custom"
102
BWall.Locked = true
103
BWall.CanCollide = false
104
BWall.BrickColor = BrickColor.new("Medium stone grey")
105
BWall.Anchored = false
106
BWall.Size = Vector3.new(0.25,0.6,0.25)
107
BWall.TopSurface = 0
108
BWall.BottomSurface = 0
109
BWall.Parent = Gun
110
MeshB = Instance.new("BlockMesh",BWall)
111
WeldB = Instance.new("Weld")
112
WeldB.Parent = BWall
113
WeldB.Part0 = Handle
114
WeldB.Part1 = BWall
115
WeldB.C0 = CFrame.new(0,0.3,-0.3) * CFrame.Angles(math.pi/2+0.1,0,0)
116
 
117
--[[ * CWall * ]]--
118
 
119
CWall = Instance.new("Part")
120
CWall.formFactor = "Custom"
121
CWall.Locked = true
122
CWall.CanCollide = false
123
CWall.BrickColor = BrickColor.new("Really black")
124
CWall.Anchored = false
125
CWall.Size = Vector3.new(0.3,0.6,0.2)
126
CWall.TopSurface = 0
127
CWall.BottomSurface = 0
128
CWall.Parent = Gun
129
MeshB = Instance.new("BlockMesh",CWall)
130
WeldB = Instance.new("Weld")
131
WeldB.Parent = CWall
132
WeldB.Part0 = Handle
133
WeldB.Part1 = CWall
134
WeldB.C0 = CFrame.new(0,0.4,-0.3) * CFrame.Angles(math.pi/2+0.1,0,0)
135
 
136
--[[ * ButA * ]]--
137
 
138
ButA = Instance.new("Part")
139
ButA.formFactor = "Custom"
140
ButA.Locked = true
141
ButA.CanCollide = false
142
ButA.BrickColor = BrickColor.new("Really black")
143
ButA.Anchored = false
144
ButA.Size = Vector3.new(0.3,0.6,0.3)
145
ButA.TopSurface = 0
146
ButA.BottomSurface = 0
147
ButA.Parent = Gun
148
MeshB = Instance.new("CylinderMesh",ButA)
149
WeldB = Instance.new("Weld")
150
WeldB.Parent = ButA
151
WeldB.Part0 = Handle
152
WeldB.Part1 = ButA
153
WeldB.C0 = CFrame.new(0.1,0.4,-0.3) * CFrame.Angles(math.pi/2+0.1,0,0)
154
 
155
--[[ * ButB * ]]--
156
 
157
ButB = Instance.new("Part")
158
ButB.formFactor = "Custom"
159
ButB.Locked = true
160
ButB.CanCollide = false
161
ButB.BrickColor = BrickColor.new("Really black")
162
ButB.Anchored = false
163
ButB.Size = Vector3.new(0.3,0.6,0.3)
164
ButB.TopSurface = 0
165
ButB.BottomSurface = 0
166
ButB.Parent = Gun
167
MeshB = Instance.new("CylinderMesh",ButB)
168
WeldB = Instance.new("Weld")
169
WeldB.Parent = ButB
170
WeldB.Part0 = Handle
171
WeldB.Part1 = ButB
172
WeldB.C0 = CFrame.new(-0.1,0.4,-0.3) * CFrame.Angles(math.pi/2+0.1,0,0)
173
 
174
--[[ * Hinge * ]]--
175
 
176
Hinge = Instance.new("Part")
177
Hinge.formFactor = "Custom"
178
Hinge.Locked = true
179
Hinge.CanCollide = false
180
Hinge.BrickColor = BrickColor.new("Medium stone grey")
181
Hinge.Anchored = false
182
Hinge.Size = Vector3.new(0.2,0.25,0.2)
183
Hinge.TopSurface = 0
184
Hinge.BottomSurface = 0
185
Hinge.Parent = Gun
186
MeshB = Instance.new("CylinderMesh",Hinge)
187
WeldQ = Instance.new("Weld")
188
WeldQ.Parent = Hinge
189
WeldQ.Part0 = Handle
190
WeldQ.Part1 = Hinge
191
WeldQ.C0 = CFrame.new(0,0.3,-0.6) * CFrame.Angles(math.pi/2+0.1,0,math.pi/2)
192
 
193
--[[ * HingeP * ]]--
194
 
195
HingeP = Instance.new("Part")
196
HingeP.formFactor = "Custom"
197
HingeP.Locked = true
198
HingeP.CanCollide = false
199
HingeP.BrickColor = BrickColor.new("Medium stone grey")
200
HingeP.Anchored = false
201
HingeP.Size = Vector3.new(0.2,0.5,0.2)
202
HingeP.TopSurface = 0
203
HingeP.BottomSurface = 0
204
HingeP.Parent = Gun
205
MeshB = Instance.new("CylinderMesh",HingeP)
206
WeldB = Instance.new("Weld")
207
WeldB.Parent = HingeP
208
WeldB.Part0 = Hinge
209
WeldB.Part1 = HingeP
210
WeldB.C0 = CFrame.new(-0.25,0,0) * CFrame.Angles(0,0,math.pi/2)
211
 
212
--[[ * BarrelA * ]]--
213
 
214
BarrelA = Instance.new("Part")
215
BarrelA.formFactor = "Custom"
216
BarrelA.Locked = true
217
BarrelA.CanCollide = false
218
BarrelA.BrickColor = BrickColor.new("Really black")
219
BarrelA.Anchored = false
220
BarrelA.Size = Vector3.new(0.3,1.5,0.3)
221
BarrelA.TopSurface = 0
222
BarrelA.BottomSurface = 0
223
BarrelA.Parent = Gun
224
MeshB = Instance.new("CylinderMesh",BarrelA)
225
WeldB = Instance.new("Weld")
226
WeldB.Parent = BarrelA
227
WeldB.Part0 = Hinge
228
WeldB.Part1 = BarrelA
229
WeldB.C0 = CFrame.new(-0.75,0.1,-0.125) * CFrame.Angles(0,0,math.pi/2)
230
 
231
--[[ * BarrelB * ]]--
232
 
233
BarrelB = Instance.new("Part")
234
BarrelB.formFactor = "Custom"
235
BarrelB.Locked = true
236
BarrelB.CanCollide = false
237
BarrelB.BrickColor = BrickColor.new("Really black")
238
BarrelB.Anchored = false
239
BarrelB.Size = Vector3.new(0.3,1.5,0.3)
240
BarrelB.TopSurface = 0
241
BarrelB.BottomSurface = 0
242
BarrelB.Parent = Gun
243
MeshB = Instance.new("CylinderMesh",BarrelB)
244
WeldB = Instance.new("Weld")
245
WeldB.Parent = BarrelB
246
WeldB.Part0 = Hinge
247
WeldB.Part1 = BarrelB
248
WeldB.C0 = CFrame.new(-0.75,-0.1,-0.125) * CFrame.Angles(0,0,math.pi/2)
249
 
250
--[[ * Variables * ]]--
251
 
252
Head = false
253
Ammo = 2
254
Arms = false
255
Hopper = Instance.new("HopperBin")
256
 
257
function TName()
258
Hopper.Name = "Gun: "..Ammo
259
end
260
 
261
--[[ * Animation * ]]--
262
 
263
function ArmsOn()
264
for i = 1,10 do wait()
265
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,-math.pi/11/2/2,math.pi/10/2/2)
266
ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0.1,0.05,-0.05)
267
ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0,0,-math.pi/10/2/2/2)
268
ArmWeld.C0 = ArmWeld.C0 + Vector3.new(-0.05,0,0.09)
269
end
270
end
271
 
272
function ArmsOff()
273
for i = 1,10 do wait()
274
ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0.1,0.05,-0.05)
275
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2,math.pi/11/2/2,-math.pi/10/2/2)
276
ArmWeld.C0 = ArmWeld.C0 - Vector3.new(-0.05,0,0.09)
277
ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0,0,math.pi/10/2/2/2)
278
end
279
for i = 1,3 do wait()
280
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(0,0,0.05)
281
end
282
ArmWeldR.C0 = CFrame.new(-1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
283
end
284
 
285
function SuicideYes()
286
for i = 1,10 do wait()
287
ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0,0,math.pi/10/2/2)
288
WeldA.C0 = WeldA.C0 * CFrame.Angles(0,math.pi/11,0)
289
end
290
end
291
 
292
function SuicideNo()
293
for i = 1,10 do wait()
294
ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0,0,-math.pi/10/2/2)
295
WeldA.C0 = WeldA.C0 * CFrame.Angles(0,-math.pi/11,0)
296
end
297
end
298
 
299
function Reload()
300
if Ammo == 0 then
301
if Head == true then SuicideNo() end
302
NewSoundI("http://www.roblox.com/Asset/?id=2761842",10,1,Handle,1.2)
303
if Arms == false then
304
for i = 1,10 do wait()
305
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,-math.pi/11/2/2,math.pi/10/2/2)
306
ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0.1,0.05,-0.05)
307
ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0,0,-math.pi/10/2/2/2)
308
ArmWeld.C0 = ArmWeld.C0 + Vector3.new(-0.05,0,0.09)
309
end
310
end
311
for i = 1,10 do wait()
312
WeldQ.C0 = WeldQ.C0 * CFrame.Angles(0,math.pi/10/2/2,0)
313
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2/2/2,0,0)
314
end
315
for i = 1,10 do wait()
316
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2/2/2,0,0)
317
end
318
for i = 1,9 do wait()
319
ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0.1,0.05,-0.05)
320
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2,math.pi/11/2/2,-math.pi/10/2/2)
321
end
322
for i = 1,3 do wait()
323
ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(-0.1,0.05,-0.05)
324
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2,math.pi/11/2/2,math.pi/10/2/2)
325
end
326
for i = 1,3 do wait()
327
ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(-0.1,0.05,-0.05)
328
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,-math.pi/11/2/2,-math.pi/10/2/2)
329
end
330
for i = 1,9 do wait()
331
ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0.1,0.05,-0.05)
332
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,-math.pi/11/2/2,math.pi/10/2/2)
333
end
334
for i = 1,5 do wait()
335
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/4/2/2/2,0,0)
336
end
337
Ammo = 1
338
TName()
339
NewSound("http://www.roblox.com/Asset/?id=13510352",2,10,Handle)
340
for i = 1,5 do wait()
341
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/4/2/2/2,0,0)
342
end
343
NewSound("http://www.roblox.com/Asset/?id=13510352",2,10,Handle)
344
for i = 1,9 do wait()
345
ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0.1,0.05,-0.05)
346
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2,math.pi/11/2/2,-math.pi/10/2/2)
347
end
348
for i = 1,3 do wait()
349
ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(-0.1,0.05,-0.05)
350
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2,math.pi/11/2/2,math.pi/10/2/2)
351
end
352
for i = 1,3 do wait()
353
ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(-0.1,0.05,-0.05)
354
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,-math.pi/11/2/2,-math.pi/10/2/2)
355
end
356
for i = 1,9 do wait()
357
ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0.1,0.05,-0.05)
358
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,-math.pi/11/2/2,math.pi/10/2/2)
359
end
360
for i = 1,5 do wait()
361
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/4/2/2/2,0,0)
362
end
363
Ammo = 2
364
TName()
365
NewSound("http://www.roblox.com/Asset/?id=13510352",2,10,Handle)
366
for i = 1,5 do wait()
367
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/4/2/2/2,0,0)
368
end
369
NewSound("http://www.roblox.com/Asset/?id=13510352",2,10,Handle)
370
for i = 1,10 do wait()
371
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2,math.pi/11/2/2,-math.pi/10/2/2)
372
ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0.1,0.05,-0.05)
373
end
374
for i = 1,10 do wait()
375
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(0,0,0.05)
376
ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0,0,math.pi/10/2/2/2)
377
ArmWeld.C0 = ArmWeld.C0 - Vector3.new(-0.05,0,0.09)
378
end
379
ArmWeldR.C0 = CFrame.new(-1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
380
NewSound("http://www.roblox.com/Asset/?id=10209881",10,0.9,Handle)
381
for i = 1,5 do wait()
382
WeldQ.C0 = WeldQ.C0 * CFrame.Angles(0,-math.pi/5/2/2,0)
383
ArmWeld.C0 = ArmWeld.C0 * CFrame.new(0,0,-0.1) * CFrame.Angles(math.pi/5/2/2,0,0)
384
end
385
for i = 1,10 do wait()
386
ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(-math.pi/10/2/2,0,0) * CFrame.new(0,0,0.05)
387
end
388
ArmWeld.C0 = CFrame.new(1.5,0.5,-0.5) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)
389
Ammo = 2
390
TName()
391
if Head == true then SuicideYes() end
392
if Arms == true then ArmsOn() end
393
elseif Ammo ~= 0 then
394
if Arms == false then ArmsOn() end
395
wait(0.1)
396
NewSound("http://www.roblox.com/Asset/?id=10209881",10,1,Handle)
397
for i = 1,10 do wait()
398
ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0,0,0.1)
399
end
400
--Ammo = Ammo - 1
401
TName()
402
for i = 1,10 do wait()
403
ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0,0,0.1)
404
end
405
if Arms == false then ArmsOff() end
406
end
407
end
408
 
409
function Shoot()
410
NewSound("http://www.roblox.com/Asset/?id=2691586",10,1,Handle)
411
if Arms == false then
412
for i = 1,5 do wait()
413
ArmWeld.C0 = ArmWeld.C0 * CFrame.new(0,0,-0.1) * CFrame.Angles(math.pi/5/2/2,0,0)
414
WeldA.C0 = WeldA.C0 * CFrame.Angles(0.2,0,0)
415
end
416
for i = 1,10 do wait()
417
ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(-math.pi/10/2/2,0,0) * CFrame.new(0,0,0.05)
418
WeldA.C0 = WeldA.C0 * CFrame.Angles(-0.1,0,0)
419
end
420
if Arms == false then ArmsOn() end
421
wait(0.05)
422
NewSound("http://www.roblox.com/Asset/?id=10209881",10,1,Handle)
423
for i = 1,5 do wait()
424
ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0,0,0.2)
425
end
426
Ammo = Ammo - 1 TName()
427
wait(0.1)
428
for i = 1,5 do wait()
429
ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0,0,0.2)
430
end
431
if Arms == false then ArmsOff() end
432
elseif Arms == true then
433
for i = 1,5 do wait()
434
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/4/2/2/2,0,0)
435
ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0,0.2,0)
436
ArmWeld.C0 = ArmWeld.C0 * CFrame.new(0,0,-0.1) * CFrame.Angles(math.pi/5/2/2,0,0)
437
WeldA.C0 = WeldA.C0 * CFrame.Angles(0.2,0,0)
438
end
439
for i = 1,10 do wait()
440
ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/8/2/2/2,0,0)
441
ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0,0.1,0)
442
ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(-math.pi/10/2/2,0,0) * CFrame.new(0,0,0.05)
443
WeldA.C0 = WeldA.C0 * CFrame.Angles(-0.1,0,0)
444
end
445
NewSound("http://www.roblox.com/Asset/?id=10209881",10,1,Handle)
446
for i = 1,5 do wait()
447
ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0,0,0.2)
448
end
449
Ammo = Ammo - 1 TName()
450
wait(0.1)
451
for i = 1,5 do wait()
452
ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0,0,0.2)
453
end
454
end
455
end
456
 
457
--[[ * Sound * ]]--
458
 
459
function NewSound(ID,V,P,N)
460
coroutine.resume(coroutine.create(function()
461
local SoundD = Instance.new("Sound")
462
SoundD.SoundId = ID
463
SoundD.Volume = V
464
SoundD.Pitch = P
465
SoundD.Parent = N
466
SoundD:Play()
467
while SoundD.IsPlaying do wait() end
468
SoundD:Remove()
469
end))
470
end
471
 
472
function NewSoundI(ID,V,P,N,I)
473
coroutine.resume(coroutine.create(function()
474
local SoundD = Instance.new("Sound")
475
SoundD.SoundId = ID
476
SoundD.Volume = V
477
SoundD.Pitch = P
478
SoundD.Parent = N
479
SoundD:Play()
480
wait(I)
481
SoundD:Stop()
482
wait()
483
SoundD:Remove()
484
end))
485
end
486
 
487
--[[ * Tool * ]]--
488
 
489
if script.Parent.Name == Player.Name then
490
Hopper = Instance.new("HopperBin")
491
Hopper.Name = "Gun"
492
Hopper.Parent = Player.Backpack
493
end
494
 
495
Blah = true
496
ABC = BarrelA.CFrame
497
 
498
function Clicked(Mouse)
499
if Blah == true then
500
Blah = false
501
if Ammo == 0 then
502
Reload()
503
else
504
if Head == true then Character.Head:BreakJoints() return end
505
coroutine.resume(coroutine.create(function()
506
Mouse.Target:BreakJoints()
507
end))
508
Shoot()
509
end
510
Blah = true
511
return
512
end
513
end
514
 
515
function onKeyDown(key)
516
if Blah == true then
517
Blah = false
518
 
519
if key == "p" then
520
NewSound("",10,0.5,Handle)
521
end
522
 
523
if key == "0" or key == "/" then
524
if not Head then
525
if Arms == false then
526
ArmsOn()
527
Arms = true
528
elseif Arms == true then
529
ArmsOff()
530
Arms = false
531
end
532
end
533
end
534
 
535
if key == "" then
536
if not Head then
537
if Arms then ArmsOff() Arms = false end
538
SuicideYes()
539
Head = true
540
elseif Head then
541
SuicideNo()
542
if Arms then ArmsOn() end
543
Head = false
544
end
545
end
546
 
547
if key == "r" then
548
Reload()
549
end
550
 
551
Blah = true
552
return
553
end
554
end
555
 
556
function Selected(Mouse) 
557
        Mouse.Icon = "rbxasset://textures\\GunCursor.png"
558
        Mouse.KeyDown:connect(onKeyDown)
559
        Mouse.Button1Down:connect(function()Clicked(Mouse)end) 
560
        TName()
561
        if Blah then
562
        Blah = false
563
        if not Arms then
564
        ArmsOn()
565
        Arms = true
566
        end
567
        Blah = true
568
        end
569
end 
570
 
571
function Deselected(Mouse)
572
        if Blah then
573
        Blah = false
574
        if Arms then
575
        ArmsOff()
576
        Arms = false
577
        end
578
        Blah = true
579
        end
580
end
581
 
582
function Dead()
583
for i,v in pairs(Character:GetChildren()) do
584
pcall(function() v.Anchored = true end)
585
if v.Name == "Head" then v.Anchored = false v.Velocity = Vector3.new(10,0,10) end
586
for i,a in pairs(v:GetChildren()) do pcall(function() a.Anchored = true end) end
587
end
588
end
589
 
590
Character.Humanoid.Died:connect(Dead)
591
Hopper.Selected:connect(Selected)
592
Hopper.Deselected:connect(Deselected)