View difference between Paste ID: c9DQig0U and xq3zARGe
SHOW: | | - or go back to the newest paste.
1
me = game.Players.arceus3270
2
cha = me.Character
3
4
tool = Instance.new("Tool")
5
tool.Parent = me.Backpack
6
tool.Name = "Pistol"
7
tool.GripPos = Vector3.new(0.3,0,0)
8
9
we = Instance.new("Weld")
10
we.Parent = cha.Torso
11
we.Part0 = nil
12
we.Part1 = nil
13
we.C1 = CFrame.fromEulerAnglesXYZ(-1.6,-0.5,0.1) * CFrame.new(-0.8,-0.5,0.7)
14
we1 = Instance.new("Weld")
15
we1.Parent = cha.Torso
16
we1.Part0 = nil
17
we1.Part1 = nil
18
we1.C1 = CFrame.fromEulerAnglesXYZ(-1.6,0.7,0.1) * CFrame.new(0.7,-0.5,0.7)
19
20
h = Instance.new("Part")
21
h.Parent = tool
22
h.Name = "Handle"
23
h.Size = Vector3.new(1,1,1)
24
h.TopSurface = 0
25
h.BottomSurface = 0
26
h.BrickColor = BrickColor.new("Really black")
27
h.Reflectance = 0.07
28
h.CanCollide = false
29
30
m = Instance.new("BlockMesh")
31
m.Parent = h
32
m.Scale = Vector3.new(0.38, 1.05, 0.48)
33
m.Name = "oo"
34
35
sound = Instance.new("Sound")
36
sound.Parent = tool
37
sound.Name = "Music"
38
sound.Playing = true
39
sound.SoundId = "rbxassetid://201407631"
40
sound.Volume = 0.6
41
42
h1 = Instance.new("Part")
43
h1.Parent = tool
44
h1.Name = "Handle1"
45
h1.Size = Vector3.new(1,1,1)
46
h1.TopSurface = 0
47
h1.BottomSurface = 0
48
h1.BrickColor = BrickColor.new("Dark grey")
49
h1.Reflectance = 0.07
50
h1.CanCollide = false
51
52
m1 = Instance.new("BlockMesh")
53
m1.Parent = h1
54
m1.Scale = Vector3.new(0.45, 0.45, 1.8)
55
56
h4 = Instance.new("Part")
57
h4.Parent = tool
58
h4.Name = "Handle4"
59
h4.Size = Vector3.new(1,1,1)
60
h4.TopSurface = 0
61
h4.BottomSurface = 0
62
h4.BrickColor = BrickColor.new("Dark grey")
63
h4.Reflectance = 0.01
64
h4.CanCollide = false
65
66
m4 = Instance.new("BlockMesh")
67
m4.Parent = h4
68
m4.Scale = Vector3.new(0.1, 0.2, 0.03)
69
70
h6 = Instance.new("Part")
71
h6.Parent = tool
72
h6.Name = "Handle6"
73
h6.Size = Vector3.new(1,1,1)
74
h6.TopSurface = 0
75
h6.BottomSurface = 0
76
h6.BrickColor = BrickColor.new("Really black")
77
h6.CanCollide = false
78
79
m6 = Instance.new("CylinderMesh")
80
m6.Parent = h6
81
m6.Scale = Vector3.new(0.2, 0.2, 0.2)
82
83
firf = Instance.new("Fire")
84
firf.Size = 0
85
firf.Heat = 40
86
firf.Parent = h6
87
firf.Enabled = false
88
89
h7 = Instance.new("Part")
90
h7.Parent = tool
91
h7.Name = "Handle7"
92
h7.Size = Vector3.new(1,1,1)
93
h7.TopSurface = 0
94
h7.BottomSurface = 0
95
h7.BrickColor = BrickColor.new("Dark grey")
96
h7.CanCollide = false
97
98
m7 = Instance.new("BlockMesh")
99
m7.Parent = h7
100
m7.Scale = Vector3.new(0.025, 0.08, 0.05)
101
102
h8 = h7:clone()
103
h8.Parent = tool
104
h8.Name = "Handle8"
105
106
h9 = h7:clone()
107
h9.Parent = tool
108
h9.Name = "Handle9"
109
h9.CanCollide = false
110
111
h10 = h:clone()
112
h10.Parent = tool
113
h10.Name = "Handle10"
114
h10.oo.Scale = Vector3.new(0.16, 0.8, 0.34)
115
h10.BrickColor = BrickColor.new("Dark grey")
116
117
smo = Instance.new("Smoke")
118
smo.Color = Color3.new(100/255, 100/255, 100/255)
119
smo.Parent = h7
120
smo.Size = 2
121
smo.RiseVelocity = 5
122
smo.Enabled = false
123
124
gui = Instance.new("ScreenGui")
125
gui.Parent = me.PlayerGui
126
gui.Name = "PistolAmmo"
127
128
value = Instance.new("NumberValue")
129
value.Parent = gui
130
value.Value = 8
131
value.Name = "ammoo"
132
133
clips = Instance.new("NumberValue")
134
clips.Parent = gui
135
clips.Value = 5
136
clips.Name = "claps"
137
138
blaa = Instance.new("Frame")
139
blaa.Parent = gui
140
blaa.Size = UDim2.new(0,80,0,40)
141
blaa.Position = UDim2.new(0,50,0,100)
142
blaa.Visible = false
143
blaa.BackgroundColor = BrickColor.new("Really black")
144
blaa.BorderColor = BrickColor.new("Crimson")
145
146
text = Instance.new("TextLabel")
147
text.Parent = gui
148
text.Name = "Ammo"
149
text.Text = value.Value.."/"..clips.Value
150
text.Size = UDim2.new(0, 80, 0, 0)
151
text.Position = UDim2.new(0, 50, 0, 125)
152
text.Visible = false
153
text.BackgroundTransparency = 1
154
text.TextColor = BrickColor.new("Crimson")
155
156
durp = Instance.new("TextLabel")
157
durp.Parent = gui
158
durp.Name = "txt"
159
durp.Text = " "
160
durp.Size = UDim2.new(0, 80, 0, 0)
161
durp.Position = UDim2.new(0, 50, 0, 115)
162
durp.Visible = false
163
durp.BackgroundTransparency = 1
164
durp.TextColor = BrickColor.new("Crimson")
165
166-
local sound = Instance.new("Sound")
166+
167-
sound.Parent = h1
167+
168-
sound.Volume = 1
168+
169-
sound.Pitch = 1
169+
170-
sound.SoundId = "http://www.roblox.com/asset/?id=2760979"
170+
171-
sound.archivable = false
171+
172
p.TopSurface = 0
173-
local soun = Instance.new("Sound")
173+
174-
soun.Parent = h1
174+
175-
soun.Volume = 1
175+
176-
soun.Pitch = 1
176+
177-
soun.SoundId = "http://www.roblox.com/asset/?id=2691591"
177+
178-
soun.archivable = false
178+
179
m.Parent = p
180-
local hed = Instance.new("Sound")
180+
181-
hed.Parent = game.Workspace
181+
182-
hed.Volume = 0.7
182+
183-
hed.Pitch = 1
183+
184-
hed.SoundId = "http://www.roblox.com/asset/?id=1876552"
184+
185-
hed.archivable = false
185+
186
bv.force = h1.CFrame.lookVector * 2500
187
bv.force = bv.force + Vector3.new(0, 220, 0)
188
sound.Pitch = math.random(0.8,1.2)
189
sound.Volume = math.random(0.8,1.0)
190
sound:play()
191
firf.Enabled = true
192
smo.Enabled = true
193
wait(0.04)
194
firf.Enabled = false
195
smo.Enabled = false
196
p.Touched:connect(function(hit)
197
if hit.Parent.Name == me.Name then return end
198
if hit.Name == "Base" then return end
199
hit.Velocity = p.CFrame.lookVector * 30
200
local hum = hit.Parent:GetChildren()
201
for i=1, #hum do
202
if hum[i].className == "Humanoid" then
203
hum[i].Health = hum[i].Health - 20
204
if hit.Name == "Head" then
205
hed:play()
206
hum[i].Health = 0
207
end
208
for i=1, math.random(4,10) do
209
local blood = Instance.new("Part")
210
blood.Parent = game.Workspace
211
blood.BrickColor = BrickColor.new(21)
212
blood.formFactor = "Plate"
213
blood.Size = Vector3.new(1,0.4,1)
214
blood.TopSurface = 0
215
blood.BottomSurface = 0
216
blood.CFrame = hit.CFrame
217
blood.Velocity = Vector3.new(math.random(-40,40),math.random(-10,25),math.random(-40,40))
218
blood.RotVelocity = Vector3.new(math.random(-40,40),math.random(-40,40),math.random(-40,40))
219
blood.CanCollide = false
220
blood.Anchored = false
221
blood:BreakJoints()
222
end
223
end
224
end
225
p:remove()
226
end)
227
end
228
229
function Main(mouse) 
230
if enabled == true then return end
231
enabled = true
232
value.Value = value.Value - 1
233
text.Text = value.Value.."/"..clips.Value
234
235
if value.Value == -1 then
236
durp.Text = "You're out!"
237
text.Text = "0/"..clips.Value
238
if clips.Value <= 0 then return end
239
durp.Text = "Reloading.."
240
soun:play()
241
wait(0.5)
242
local fv = h10:clone()
243
fv.Parent = workspace
244
fv.CanCollide = true
245
fv.Velocity = Vector3.new(math.random(-20,20),math.random(-5,5),math.random(-20,20))
246
fv.RotVelocity = Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
247
h10.Transparency = 1
248
wait(1.7)
249
h10.Transparency = 0
250
wait(0.5)
251
clips.Value = clips.Value - 1
252
value.Value = 8
253
text.Text = value.Value.."/"..clips.Value
254
durp.Text = " "
255
end
256
shot()
257
258
for i=1, 2 do
259
wait()
260
w2.C1 = w2.C1 * CFrame.fromEulerAnglesXYZ(0.23,0,0) * CFrame.new(0,-0.08,-0.2)
261
end
262
for i=1, 2 do
263
wait()
264
w2.C1 = w2.C1 * CFrame.fromEulerAnglesXYZ(-0.23,0,0) * CFrame.new(0,0.08,0.2)
265
end
266
w2.C1 = CFrame.fromEulerAnglesXYZ(-0.1, 0, 0) * CFrame.new(0,-0.43,0.35)
267
wait(0.1)
268
for i = 1, 6 do
269
w4.C1 = w4.C1 * CFrame.new(0,0,-0.08)
270
w7.C1 = w7.C1 * CFrame.new(0,0,-0.08)
271
w8.C1 = w8.C1 * CFrame.new(0,0,-0.08)
272
wait()
273
end
274
for i = 1, 2 do
275
w4.C1 = w4.C1 * CFrame.new(0,0,0.24)
276
w7.C1 = w7.C1 * CFrame.new(0,0,0.24)
277
w8.C1 = w8.C1 * CFrame.new(0,0,0.24)
278
wait()
279
end
280
w5.C1 = CFrame.fromEulerAnglesXYZ(1.571, 0, 0) * CFrame.new(0,-0.8,1.39)
281
w7.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0.03,-1.11,-0.25)
282
w8.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(-0.03,-1.11,-0.25)
283
wait(0.03)
284
enabled = false
285
wait(2)
286
p:remove()
287
end
288
tool.Activated:connect(Main)
289
290
num = 1
291
function Init(mouse)
292
text.Visible = true
293
blaa.Visible = true
294
durp.Visible = true
295
we.Part0 = we.Parent
296
we.Part1 = cha["Right Arm"]
297
we1.Part0 = we1.Parent
298
we1.Part1 = cha["Left Arm"]
299
we2 = Instance.new("Weld")
300
we2.Parent = tool.Parent.Torso
301
we2.Part0 = we2.Parent
302
we2.Part1 = h
303
we2.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,-0.5,1.6)
304
w = Instance.new("Weld")
305
w.Parent = h
306
w.Part0 = w.Parent
307
w.Part1 = h1
308
w.C1 = CFrame.new(0, -0.8, 0.6)
309
w1 = Instance.new("Weld")
310
w1.Parent = h
311
w1.Part0 = w.Parent
312
w1.Part1 = h2
313
w1.C1 = CFrame.fromEulerAnglesXYZ(0.3, 0, 0) * CFrame.new(0,-0.4,0.55)
314
w3 = Instance.new("Weld")
315
w3.Parent = h
316
w3.Part0 = w.Parent
317
w3.Part1 = h3
318
w3.C1 = CFrame.fromEulerAnglesXYZ(1.3, 0, 0) * CFrame.new(0,-0.2,0.35)
319
w2 = Instance.new("Weld")
320
w2.Parent = h
321
w2.Part0 = w.Parent
322
w2.Part1 = h4
323
w2.C1 = CFrame.fromEulerAnglesXYZ(-0.1, 0, 0) * CFrame.new(0,-0.43,0.35)
324
w4 = Instance.new("Weld")
325
w4.Parent = h
326
w4.Part0 = w.Parent
327
w4.Part1 = h5
328
w4.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0,-0.9,0.435)
329
w5 = Instance.new("Weld")
330
w5.Parent = h
331
w5.Part0 = w.Parent
332
w5.Part1 = h6
333
w5.C1 = CFrame.fromEulerAnglesXYZ(1.571, 0, 0) * CFrame.new(0,-0.8,1.39)
334
w6 = Instance.new("Weld")
335
w6.Parent = h
336
w6.Part0 = w.Parent
337
w6.Part1 = h7
338
w6.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0,-1.1,1.4)
339
w7 = Instance.new("Weld")
340
w7.Parent = h5
341
w7.Part0 = w.Parent
342
w7.Part1 = h8
343
w7.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0.03,-1.11,-0.25)
344
w8 = Instance.new("Weld")
345
w8.Parent = h5
346
w8.Part0 = w.Parent
347
w8.Part1 = h9
348
w8.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(-0.03,-1.11,-0.25)
349
w9 = Instance.new("Weld")
350
w9.Parent = h
351
w9.Part0 = w.Parent
352
w9.Part1 = h10
353
w9.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0,0.2,0)
354
end
355
356
tool.Equipped:connect(Init)
357
358
function unq()
359
we.Part0 = nil
360
we.Part1 = nil
361
we1.Part0 = nil
362
we1.Part1 = nil
363
we2:remove()
364
text.Visible = false
365
durp.Visible = false
366
blaa.Visible = false
367
end
368
369
tool.Unequipped:connect(unq)
370
371
372
--lego