SHOW:
|
|
- or go back to the newest paste.
1 | local Scale = game.Players.LocalPlayer.Character.Torso.Size.X/2*(game.Players.LocalPlayer.Character.Torso:FindFirstChild("ScaleInserted") ~= nil and game.Players.LocalPlayer.Character.Torso:FindFirstChild("ScaleInserted").Scale.Z or 1)*0.8 | |
2 | local Speed = 20*Scale | |
3 | local Gravity = 0.1 | |
4 | ||
5 | local Player = game.Players.LocalPlayer | |
6 | local Character = Player.Character | |
7 | local Humanoid = Character.Humanoid | |
8 | Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,false) | |
9 | local Torso = Character.HumanoidRootPart | |
10 | local Mouse = game.Players.LocalPlayer:GetMouse() | |
11 | local RenderStepped = game:GetService("RunService").RenderStepped | |
12 | local Camera = Workspace.CurrentCamera | |
13 | Camera:ClearAllChildren() | |
14 | local Model = Instance.new("Model",Character) | |
15 | local IgnoreList = {Character,Workspace.Terrain} | |
16 | ||
17 | local Part0Joint = CFrame.new(Vector3.new(1,0.75,0)*Scale*1.25) | |
18 | local Part1Joint = CFrame.new(Vector3.new(-0.5,0.75,0)*Scale*1.25) | |
19 | local RotationOffset = CFrame.Angles(math.rad(90),math.rad(0),0) | |
20 | local Gangster = false | |
21 | ||
22 | local Part0JointHead = CFrame.new(Vector3.new(0,1,0)*Scale*1.25) | |
23 | local Part1JointHead = CFrame.new(Vector3.new(0,-0.5,0)*Scale*1.25) | |
24 | local RotationOffsetHead = CFrame.Angles(0,0,0) | |
25 | ||
26 | local Handle = Instance.new("Part",Model) | |
27 | Handle.CanCollide = false | |
28 | Handle.Name = "Handle" | |
29 | Handle.Position = Vector3.new(0,100,0) | |
30 | Handle:BreakJoints() | |
31 | Handle.FormFactor = "Custom" | |
32 | Handle.Size = Vector3.new(0.2,0.2,0.2) | |
33 | Handle.TopSurface = "SmoothNoOutlines" | |
34 | Handle.BottomSurface = "SmoothNoOutlines" | |
35 | Handle.FrontSurface = "SmoothNoOutlines" | |
36 | Handle.BackSurface = "SmoothNoOutlines" | |
37 | Handle.RightSurface = "SmoothNoOutlines" | |
38 | Handle.LeftSurface = "SmoothNoOutlines" | |
39 | Handle.BrickColor = BrickColor.new("Black") | |
40 | local Mesh = Instance.new("BlockMesh",Handle) | |
41 | Mesh.Scale = Vector3.new(0.25,1,0.4) / 0.2 * Scale | |
42 | local HandleWeld = Instance.new("Motor6D") | |
43 | HandleWeld.Part0 = Character["Right Arm"] | |
44 | HandleWeld.Part1 = Handle | |
45 | HandleWeld.C0 = CFrame.new(Vector3.new(0,-1,0)*Scale) * CFrame.Angles(math.rad(-105),0,0) | |
46 | HandleWeld.Parent = Handle | |
47 | ||
48 | local Part = Instance.new("Part",Model) | |
49 | Part.CanCollide = false | |
50 | Part.Position = Vector3.new(0,100,0) | |
51 | Part:BreakJoints() | |
52 | Part.FormFactor = "Custom" | |
53 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
54 | Part.TopSurface = "SmoothNoOutlines" | |
55 | Part.BottomSurface = "SmoothNoOutlines" | |
56 | Part.FrontSurface = "SmoothNoOutlines" | |
57 | Part.BackSurface = "SmoothNoOutlines" | |
58 | Part.RightSurface = "SmoothNoOutlines" | |
59 | Part.LeftSurface = "SmoothNoOutlines" | |
60 | Part.BrickColor = BrickColor.new("Black") | |
61 | local Mesh = Instance.new("CylinderMesh",Part) | |
62 | Mesh.Scale = Vector3.new(0.07,0.2,0.07) / 0.2 * Scale | |
63 | local PartWeld = Instance.new("Motor6D") | |
64 | PartWeld.Part0 = Handle | |
65 | PartWeld.Part1 = Part | |
66 | PartWeld.C0 = CFrame.new(Vector3.new(-0.115,-0.475,-0.190)*Scale) * CFrame.Angles(0,0,0) | |
67 | PartWeld.Parent = Part | |
68 | ||
69 | local Part = Instance.new("Part",Model) | |
70 | Part.CanCollide = false | |
71 | Part.Position = Vector3.new(0,100,0) | |
72 | Part:BreakJoints() | |
73 | Part.FormFactor = "Custom" | |
74 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
75 | Part.TopSurface = "SmoothNoOutlines" | |
76 | Part.BottomSurface = "SmoothNoOutlines" | |
77 | Part.FrontSurface = "SmoothNoOutlines" | |
78 | Part.BackSurface = "SmoothNoOutlines" | |
79 | Part.RightSurface = "SmoothNoOutlines" | |
80 | Part.LeftSurface = "SmoothNoOutlines" | |
81 | Part.BrickColor = BrickColor.new("Black") | |
82 | local Mesh = Instance.new("CylinderMesh",Part) | |
83 | Mesh.Scale = Vector3.new(0.07,0.2,0.07) / 0.2 * Scale | |
84 | local PartWeld = Instance.new("Motor6D") | |
85 | PartWeld.Part0 = Handle | |
86 | PartWeld.Part1 = Part | |
87 | PartWeld.C0 = CFrame.new(Vector3.new(0.115,-0.475,0.190)*Scale) * CFrame.Angles(0,0,0) | |
88 | PartWeld.Parent = Part | |
89 | ||
90 | local Part = Instance.new("Part",Model) | |
91 | Part.CanCollide = false | |
92 | Part.Position = Vector3.new(0,100,0) | |
93 | Part:BreakJoints() | |
94 | Part.FormFactor = "Custom" | |
95 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
96 | Part.TopSurface = "SmoothNoOutlines" | |
97 | Part.BottomSurface = "SmoothNoOutlines" | |
98 | Part.FrontSurface = "SmoothNoOutlines" | |
99 | Part.BackSurface = "SmoothNoOutlines" | |
100 | Part.RightSurface = "SmoothNoOutlines" | |
101 | Part.LeftSurface = "SmoothNoOutlines" | |
102 | Part.BrickColor = BrickColor.new("Black") | |
103 | local Mesh = Instance.new("CylinderMesh",Part) | |
104 | Mesh.Scale = Vector3.new(0.07,0.2,0.07) / 0.2 * Scale | |
105 | local PartWeld = Instance.new("Motor6D") | |
106 | PartWeld.Part0 = Handle | |
107 | PartWeld.Part1 = Part | |
108 | PartWeld.C0 = CFrame.new(Vector3.new(-0.115,-0.475,0.190)*Scale) * CFrame.Angles(0,0,0) | |
109 | PartWeld.Parent = Part | |
110 | ||
111 | local Part = Instance.new("Part",Model) | |
112 | Part.CanCollide = false | |
113 | Part.Position = Vector3.new(0,100,0) | |
114 | Part:BreakJoints() | |
115 | Part.FormFactor = "Custom" | |
116 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
117 | Part.TopSurface = "SmoothNoOutlines" | |
118 | Part.BottomSurface = "SmoothNoOutlines" | |
119 | Part.FrontSurface = "SmoothNoOutlines" | |
120 | Part.BackSurface = "SmoothNoOutlines" | |
121 | Part.RightSurface = "SmoothNoOutlines" | |
122 | Part.LeftSurface = "SmoothNoOutlines" | |
123 | Part.BrickColor = BrickColor.new("Black") | |
124 | local Mesh = Instance.new("CylinderMesh",Part) | |
125 | Mesh.Scale = Vector3.new(0.07,0.2,0.07) / 0.2 * Scale | |
126 | local PartWeld = Instance.new("Motor6D") | |
127 | PartWeld.Part0 = Handle | |
128 | PartWeld.Part1 = Part | |
129 | PartWeld.C0 = CFrame.new(Vector3.new(0.115,-0.475,-0.190)*Scale) * CFrame.Angles(0,0,0) | |
130 | PartWeld.Parent = Part | |
131 | ||
132 | local Part = Instance.new("Part",Model) | |
133 | Part.CanCollide = false | |
134 | Part.Position = Vector3.new(0,100,0) | |
135 | Part:BreakJoints() | |
136 | Part.FormFactor = "Custom" | |
137 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
138 | Part.TopSurface = "SmoothNoOutlines" | |
139 | Part.BottomSurface = "SmoothNoOutlines" | |
140 | Part.FrontSurface = "SmoothNoOutlines" | |
141 | Part.BackSurface = "SmoothNoOutlines" | |
142 | Part.RightSurface = "SmoothNoOutlines" | |
143 | Part.LeftSurface = "SmoothNoOutlines" | |
144 | Part.BrickColor = BrickColor.new("Black") | |
145 | local Mesh = Instance.new("BlockMesh",Part) | |
146 | Mesh.Scale = Vector3.new(0.23,0.2,0.1) / 0.2 * Scale | |
147 | local PartWeld = Instance.new("Motor6D") | |
148 | PartWeld.Part0 = Handle | |
149 | PartWeld.Part1 = Part | |
150 | PartWeld.C0 = CFrame.new(Vector3.new(0,-0.475,-0.175)*Scale) * CFrame.Angles(0,0,0) | |
151 | PartWeld.Parent = Part | |
152 | ||
153 | local Part = Instance.new("Part",Model) | |
154 | Part.CanCollide = false | |
155 | Part.Position = Vector3.new(0,100,0) | |
156 | Part:BreakJoints() | |
157 | Part.FormFactor = "Custom" | |
158 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
159 | Part.TopSurface = "SmoothNoOutlines" | |
160 | Part.BottomSurface = "SmoothNoOutlines" | |
161 | Part.FrontSurface = "SmoothNoOutlines" | |
162 | Part.BackSurface = "SmoothNoOutlines" | |
163 | Part.RightSurface = "SmoothNoOutlines" | |
164 | Part.LeftSurface = "SmoothNoOutlines" | |
165 | Part.BrickColor = BrickColor.new("Black") | |
166 | local Mesh = Instance.new("BlockMesh",Part) | |
167 | Mesh.Scale = Vector3.new(0.23,0.2,0.1) / 0.2 * Scale | |
168 | local PartWeld = Instance.new("Motor6D") | |
169 | PartWeld.Part0 = Handle | |
170 | PartWeld.Part1 = Part | |
171 | PartWeld.C0 = CFrame.new(Vector3.new(0,-0.475,0.175)*Scale) * CFrame.Angles(0,0,0) | |
172 | PartWeld.Parent = Part | |
173 | ||
174 | local Part = Instance.new("Part",Model) | |
175 | Part.CanCollide = false | |
176 | Part.Position = Vector3.new(0,100,0) | |
177 | Part:BreakJoints() | |
178 | Part.FormFactor = "Custom" | |
179 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
180 | Part.TopSurface = "SmoothNoOutlines" | |
181 | Part.BottomSurface = "SmoothNoOutlines" | |
182 | Part.FrontSurface = "SmoothNoOutlines" | |
183 | Part.BackSurface = "SmoothNoOutlines" | |
184 | Part.RightSurface = "SmoothNoOutlines" | |
185 | Part.LeftSurface = "SmoothNoOutlines" | |
186 | Part.BrickColor = BrickColor.new("Black") | |
187 | local Mesh = Instance.new("BlockMesh",Part) | |
188 | Mesh.Scale = Vector3.new(0.1,0.2,0.38) / 0.2 * Scale | |
189 | local PartWeld = Instance.new("Motor6D") | |
190 | PartWeld.Part0 = Handle | |
191 | PartWeld.Part1 = Part | |
192 | PartWeld.C0 = CFrame.new(Vector3.new(-0.1,-0.475,0)*Scale) * CFrame.Angles(0,0,0) | |
193 | PartWeld.Parent = Part | |
194 | ||
195 | local Part = Instance.new("Part",Model) | |
196 | Part.CanCollide = false | |
197 | Part.Position = Vector3.new(0,100,0) | |
198 | Part:BreakJoints() | |
199 | Part.FormFactor = "Custom" | |
200 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
201 | Part.TopSurface = "SmoothNoOutlines" | |
202 | Part.BottomSurface = "SmoothNoOutlines" | |
203 | Part.FrontSurface = "SmoothNoOutlines" | |
204 | Part.BackSurface = "SmoothNoOutlines" | |
205 | Part.RightSurface = "SmoothNoOutlines" | |
206 | Part.LeftSurface = "SmoothNoOutlines" | |
207 | Part.BrickColor = BrickColor.new("Black") | |
208 | local Mesh = Instance.new("BlockMesh",Part) | |
209 | Mesh.Scale = Vector3.new(0.1,0.2,0.38) / 0.2 * Scale | |
210 | local PartWeld = Instance.new("Motor6D") | |
211 | PartWeld.Part0 = Handle | |
212 | PartWeld.Part1 = Part | |
213 | PartWeld.C0 = CFrame.new(Vector3.new(0.1,-0.475,0)*Scale) * CFrame.Angles(0,0,0) | |
214 | PartWeld.Parent = Part | |
215 | ||
216 | local Part = Instance.new("Part",Model) | |
217 | Part.CanCollide = false | |
218 | Part.Position = Vector3.new(0,100,0) | |
219 | Part:BreakJoints() | |
220 | Part.FormFactor = "Custom" | |
221 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
222 | Part.TopSurface = "SmoothNoOutlines" | |
223 | Part.BottomSurface = "SmoothNoOutlines" | |
224 | Part.FrontSurface = "SmoothNoOutlines" | |
225 | Part.BackSurface = "SmoothNoOutlines" | |
226 | Part.RightSurface = "SmoothNoOutlines" | |
227 | Part.LeftSurface = "SmoothNoOutlines" | |
228 | Part.BrickColor = BrickColor.new("Black") | |
229 | local Mesh = Instance.new("BlockMesh",Part) | |
230 | Mesh.Scale = Vector3.new(0.1,0.3,0.05) / 0.2 * Scale | |
231 | local PartWeld = Instance.new("Motor6D") | |
232 | PartWeld.Part0 = Handle | |
233 | PartWeld.Part1 = Part | |
234 | PartWeld.C0 = CFrame.Angles(math.rad(15),0,0) * CFrame.new(Vector3.new(0,0.25,-0.75)*Scale) * CFrame.Angles(math.rad(-10),0,0) | |
235 | PartWeld.Parent = Part | |
236 | ||
237 | local Part = Instance.new("Part",Model) | |
238 | Part.CanCollide = false | |
239 | Part.Position = Vector3.new(0,100,0) | |
240 | Part:BreakJoints() | |
241 | Part.FormFactor = "Custom" | |
242 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
243 | Part.TopSurface = "SmoothNoOutlines" | |
244 | Part.BottomSurface = "SmoothNoOutlines" | |
245 | Part.FrontSurface = "SmoothNoOutlines" | |
246 | Part.BackSurface = "SmoothNoOutlines" | |
247 | Part.RightSurface = "SmoothNoOutlines" | |
248 | Part.LeftSurface = "SmoothNoOutlines" | |
249 | Part.BrickColor = BrickColor.new("Black") | |
250 | local Mesh = Instance.new("BlockMesh",Part) | |
251 | Mesh.Scale = Vector3.new(0.1,0.05,0.625) / 0.2 * Scale | |
252 | local PartWeld = Instance.new("Motor6D") | |
253 | PartWeld.Part0 = Handle | |
254 | PartWeld.Part1 = Part | |
255 | PartWeld.C0 = CFrame.Angles(math.rad(15),0,0) * CFrame.new(Vector3.new(0,0.1,-0.435)*Scale) | |
256 | PartWeld.Parent = Part | |
257 | ||
258 | for i = 0,80,10 do | |
259 | local Part = Instance.new("Part",Model) | |
260 | Part.CanCollide = false | |
261 | Part.Position = Vector3.new(0,100,0) | |
262 | Part:BreakJoints() | |
263 | Part.FormFactor = "Custom" | |
264 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
265 | Part.TopSurface = "SmoothNoOutlines" | |
266 | Part.BottomSurface = "SmoothNoOutlines" | |
267 | Part.FrontSurface = "SmoothNoOutlines" | |
268 | Part.BackSurface = "SmoothNoOutlines" | |
269 | Part.RightSurface = "SmoothNoOutlines" | |
270 | Part.LeftSurface = "SmoothNoOutlines" | |
271 | Part.BrickColor = BrickColor.new("Black") | |
272 | local Mesh = Instance.new("BlockMesh",Part) | |
273 | Mesh.Scale = Vector3.new(0.25,0.15,0.03555*2) / 0.2 * Scale | |
274 | local PartWeld = Instance.new("Motor6D") | |
275 | PartWeld.Part0 = Handle | |
276 | PartWeld.Part1 = Part | |
277 | PartWeld.C0 = CFrame.new(Vector3.new(0,0.15,0.315)*Scale) * CFrame.Angles(math.rad(i-65),0,0) * CFrame.new(Vector3.new(0,0.2,0)*Scale) | |
278 | PartWeld.Parent = Part | |
279 | end | |
280 | ||
281 | local Barrel = Instance.new("Part",Model) | |
282 | Barrel.CanCollide = false | |
283 | Barrel.Position = Vector3.new(0,100,0) | |
284 | Barrel:BreakJoints() | |
285 | Barrel.FormFactor = "Custom" | |
286 | Barrel.Size = Vector3.new(0.2,0.2,0.2) | |
287 | Barrel.TopSurface = "SmoothNoOutlines" | |
288 | Barrel.BottomSurface = "SmoothNoOutlines" | |
289 | Barrel.FrontSurface = "SmoothNoOutlines" | |
290 | Barrel.BackSurface = "SmoothNoOutlines" | |
291 | Barrel.RightSurface = "SmoothNoOutlines" | |
292 | Barrel.LeftSurface = "SmoothNoOutlines" | |
293 | Barrel.BrickColor = BrickColor.new("Black") | |
294 | local Mesh = Instance.new("BlockMesh",Barrel) | |
295 | Mesh.Scale = Vector3.new(0.25,0.2,2) / 0.2 * Scale | |
296 | local BarrelWeld = Instance.new("Motor6D") | |
297 | BarrelWeld.Part0 = Handle | |
298 | BarrelWeld.Part1 = Barrel | |
299 | BarrelWeld.C0 = CFrame.Angles(math.rad(15),0,0) * CFrame.new(Vector3.new(0,0.5,-0.7)*Scale) | |
300 | BarrelWeld.Parent = Barrel | |
301 | ||
302 | local Barrel1 = Barrel | |
303 | ||
304 | local Barrel2 = Instance.new("Part",Model) | |
305 | Barrel2.CanCollide = false | |
306 | Barrel2.Position = Vector3.new(0,100,0) | |
307 | Barrel2:BreakJoints() | |
308 | Barrel2.FormFactor = "Custom" | |
309 | Barrel2.Size = Vector3.new(0.2,0.2,0.2) | |
310 | Barrel2.TopSurface = "SmoothNoOutlines" | |
311 | Barrel2.BottomSurface = "SmoothNoOutlines" | |
312 | Barrel2.FrontSurface = "SmoothNoOutlines" | |
313 | Barrel2.BackSurface = "SmoothNoOutlines" | |
314 | Barrel2.RightSurface = "SmoothNoOutlines" | |
315 | Barrel2.LeftSurface = "SmoothNoOutlines" | |
316 | Barrel2.BrickColor = BrickColor.new("Really black") | |
317 | local Mesh = Instance.new("BlockMesh",Barrel2) | |
318 | Mesh.Scale = Vector3.new(0.25,0.25,2) / 0.2 * Scale | |
319 | local Barrel2Weld = Instance.new("Motor6D") | |
320 | Barrel2Weld.Part0 = Barrel | |
321 | Barrel2Weld.Part1 = Barrel2 | |
322 | Barrel2Weld.C0 = CFrame.new(Vector3.new(0,0.225,0)*Scale) | |
323 | Barrel2Weld.Parent = Barrel2 | |
324 | ||
325 | local RealBarrel = Instance.new("Part",Model) | |
326 | RealBarrel.CanCollide = false | |
327 | RealBarrel.Position = Vector3.new(0,100,0) | |
328 | RealBarrel:BreakJoints() | |
329 | RealBarrel.FormFactor = "Custom" | |
330 | RealBarrel.Size = Vector3.new(0.2,0.2,0.2) | |
331 | RealBarrel.TopSurface = "SmoothNoOutlines" | |
332 | RealBarrel.BottomSurface = "SmoothNoOutlines" | |
333 | RealBarrel.FrontSurface = "SmoothNoOutlines" | |
334 | RealBarrel.BackSurface = "SmoothNoOutlines" | |
335 | RealBarrel.RightSurface = "SmoothNoOutlines" | |
336 | RealBarrel.LeftSurface = "SmoothNoOutlines" | |
337 | RealBarrel.BrickColor = BrickColor.new("Dark grey metallic") | |
338 | local Mesh = Instance.new("CylinderMesh",RealBarrel) | |
339 | Mesh.Scale = Vector3.new(0.2,2,0.2) / 0.2 * Scale | |
340 | local RealBarrelWeld = Instance.new("Motor6D") | |
341 | RealBarrelWeld.Part0 = Barrel | |
342 | RealBarrelWeld.Part1 = RealBarrel | |
343 | RealBarrelWeld.C0 = CFrame.new(Vector3.new(0,0.1,-0.01)*Scale) * CFrame.Angles(math.rad(-90),0,0) | |
344 | RealBarrelWeld.Parent = RealBarrel | |
345 | ||
346 | for i = 1,75,15 do | |
347 | local Part = Instance.new("Part",Model) | |
348 | Part.CanCollide = false | |
349 | Part.Position = Vector3.new(0,100,0) | |
350 | Part:BreakJoints() | |
351 | Part.FormFactor = "Custom" | |
352 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
353 | Part.TopSurface = "SmoothNoOutlines" | |
354 | Part.BottomSurface = "SmoothNoOutlines" | |
355 | Part.FrontSurface = "SmoothNoOutlines" | |
356 | Part.BackSurface = "SmoothNoOutlines" | |
357 | Part.RightSurface = "SmoothNoOutlines" | |
358 | Part.LeftSurface = "SmoothNoOutlines" | |
359 | Part.BrickColor = BrickColor.new("Black") | |
360 | local Mesh = Instance.new("BlockMesh",Part) | |
361 | Mesh.Scale = Vector3.new(0.05,0.065,0.05) / 0.2 * Scale | |
362 | local PartWeld = Instance.new("Motor6D") | |
363 | PartWeld.Part0 = Handle | |
364 | PartWeld.Part1 = Part | |
365 | PartWeld.C0 = CFrame.new(Vector3.new(0,0.525,-0.515)*Scale) * CFrame.Angles(math.rad(i),0,0) * CFrame.new(Vector3.new(0,0,0.2)*Scale) | |
366 | PartWeld.Parent = Part | |
367 | end | |
368 | ||
369 | local Part = Instance.new("Part",Model) | |
370 | Part.CanCollide = false | |
371 | Part.Position = Vector3.new(0,100,0) | |
372 | Part:BreakJoints() | |
373 | Part.FormFactor = "Custom" | |
374 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
375 | Part.TopSurface = "SmoothNoOutlines" | |
376 | Part.BottomSurface = "SmoothNoOutlines" | |
377 | Part.FrontSurface = "SmoothNoOutlines" | |
378 | Part.BackSurface = "SmoothNoOutlines" | |
379 | Part.RightSurface = "SmoothNoOutlines" | |
380 | Part.LeftSurface = "SmoothNoOutlines" | |
381 | Part.BrickColor = BrickColor.new("Really black") | |
382 | local Mesh = Instance.new("BlockMesh",Part) | |
383 | Mesh.Scale = Vector3.new(0.05,0.11,0.1) / 0.2 * Scale | |
384 | local PartWeld = Instance.new("Motor6D") | |
385 | PartWeld.Part0 = Barrel2 | |
386 | PartWeld.Part1 = Part | |
387 | PartWeld.C0 = CFrame.new(Vector3.new(0.06,0.135,0.925)*Scale) | |
388 | PartWeld.Parent = Part | |
389 | ||
390 | local Part = Instance.new("Part",Model) | |
391 | Part.CanCollide = false | |
392 | Part.Position = Vector3.new(0,100,0) | |
393 | Part:BreakJoints() | |
394 | Part.FormFactor = "Custom" | |
395 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
396 | Part.TopSurface = "SmoothNoOutlines" | |
397 | Part.BottomSurface = "SmoothNoOutlines" | |
398 | Part.FrontSurface = "SmoothNoOutlines" | |
399 | Part.BackSurface = "SmoothNoOutlines" | |
400 | Part.RightSurface = "SmoothNoOutlines" | |
401 | Part.LeftSurface = "SmoothNoOutlines" | |
402 | Part.BrickColor = BrickColor.new("Really black") | |
403 | local Mesh = Instance.new("BlockMesh",Part) | |
404 | Mesh.Scale = Vector3.new(0.05,0.11,0.1) / 0.2 * Scale | |
405 | local PartWeld = Instance.new("Motor6D") | |
406 | PartWeld.Part0 = Barrel2 | |
407 | PartWeld.Part1 = Part | |
408 | PartWeld.C0 = CFrame.new(Vector3.new(-0.06,0.135,0.925)*Scale) | |
409 | PartWeld.Parent = Part | |
410 | ||
411 | local Part = Instance.new("Part",Model) | |
412 | Part.CanCollide = false | |
413 | Part.Position = Vector3.new(0,100,0) | |
414 | Part:BreakJoints() | |
415 | Part.FormFactor = "Custom" | |
416 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
417 | Part.TopSurface = "SmoothNoOutlines" | |
418 | Part.BottomSurface = "SmoothNoOutlines" | |
419 | Part.FrontSurface = "SmoothNoOutlines" | |
420 | Part.BackSurface = "SmoothNoOutlines" | |
421 | Part.RightSurface = "SmoothNoOutlines" | |
422 | Part.LeftSurface = "SmoothNoOutlines" | |
423 | Part.BrickColor = BrickColor.new("Really black") | |
424 | local Mesh = Instance.new("BlockMesh",Part) | |
425 | Mesh.Scale = Vector3.new(0.025,0.1,0.1) / 0.2 * Scale | |
426 | local PartWeld = Instance.new("Motor6D") | |
427 | PartWeld.Part0 = Barrel2 | |
428 | PartWeld.Part1 = Part | |
429 | PartWeld.C0 = CFrame.new(Vector3.new(0,0.135,-0.925)*Scale) | |
430 | PartWeld.Parent = Part | |
431 | ||
432 | local Part = Instance.new("Part",Model) | |
433 | Part.CanCollide = false | |
434 | Part.Position = Vector3.new(0,100,0) | |
435 | Part:BreakJoints() | |
436 | Part.FormFactor = "Custom" | |
437 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
438 | Part.Transparency = 1 | |
439 | Part.TopSurface = "SmoothNoOutlines" | |
440 | Part.BottomSurface = "SmoothNoOutlines" | |
441 | Part.FrontSurface = "SmoothNoOutlines" | |
442 | Part.BackSurface = "SmoothNoOutlines" | |
443 | Part.RightSurface = "SmoothNoOutlines" | |
444 | Part.LeftSurface = "SmoothNoOutlines" | |
445 | Part.BrickColor = BrickColor.new("Really black") | |
446 | local Mesh = Instance.new("BlockMesh",Part) | |
447 | Mesh.Scale = Vector3.new(0.1,0.1,0.1) / 0.2 * Scale | |
448 | local PartWeld = Instance.new("Motor6D") | |
449 | PartWeld.Part0 = Barrel | |
450 | PartWeld.Part1 = Part | |
451 | PartWeld.C0 = CFrame.new(Vector3.new(0,0,-5)*Scale) | |
452 | PartWeld.Parent = Part | |
453 | ||
454 | local Light = Instance.new("PointLight",Part) | |
455 | Light.Color = BrickColor.new("Gold").Color | |
456 | Light.Enabled = true | |
457 | Light.Shadows = true | |
458 | Light.Brightness = 0 | |
459 | Light.Range = 6 | |
460 | ||
461 | local Part = Instance.new("Part",Model) | |
462 | Part.Material = "Neon" | |
463 | Part.CanCollide = false | |
464 | Part.Position = Vector3.new(0,100,0) | |
465 | Part:BreakJoints() | |
466 | Part.FormFactor = "Custom" | |
467 | Part.Size = Vector3.new(0.2,0.2,0.2) | |
468 | Part.TopSurface = "SmoothNoOutlines" | |
469 | Part.BottomSurface = "SmoothNoOutlines" | |
470 | Part.FrontSurface = "SmoothNoOutlines" | |
471 | Part.BackSurface = "SmoothNoOutlines" | |
472 | Part.RightSurface = "SmoothNoOutlines" | |
473 | Part.LeftSurface = "SmoothNoOutlines" | |
474 | Part.BrickColor = BrickColor.new("Bright yellow") | |
475 | Part.Transparency = 0.25 | |
476 | local RecoilMesh = Instance.new("SpecialMesh",Part) | |
477 | RecoilMesh.MeshType = "FileMesh" | |
478 | RecoilMesh.MeshId = "http://www.roblox.com/Asset/?id=1323306" | |
479 | RecoilMesh.TextureId = "http://www.roblox.com/Asset/?id=98896228" | |
480 | RecoilMesh.Scale = Vector3.new(0.175,0,0.175) * Scale | |
481 | local PartWeld = Instance.new("Motor6D") | |
482 | PartWeld.Part0 = RealBarrel | |
483 | PartWeld.Part1 = Part | |
484 | PartWeld.C0 = CFrame.new(Vector3.new(0,0.95,0)*Scale) | |
485 | PartWeld.Parent = Part | |
486 | ||
487 | function ShootBullet(Target,barrel) | |
488 | local barrel = barrel or Barrel | |
489 | local Bullet = Instance.new("Part",Workspace) | |
490 | Barrel.CanCollide = false | |
491 | Bullet.FormFactor = "Custom" | |
492 | Bullet.Size = Vector3.new(0.2,0.2,5)*Scale | |
493 | Bullet.TopSurface = "Smooth" | |
494 | Bullet.BottomSurface = "Smooth" | |
495 | Bullet.Anchored = true | |
496 | Bullet.CanCollide = false | |
497 | Bullet.CFrame = CFrame.new((barrel.CFrame*CFrame.new(0,0,-barrel.Size.Z*barrel.Mesh.Scale.Z/2)).p,Target)*CFrame.new(0,0,-Bullet.Size.Z/2) | |
498 | Bullet.Transparency = 0.1 | |
499 | Bullet.BrickColor = BrickColor.new("Gold") | |
500 | --[[local Mesh = Instance.new("SpecialMesh",Bullet) | |
501 | Mesh.MeshType = "FileMesh" | |
502 | Mesh.Scale = Vector3.new(0.5,0.5,0.2) | |
503 | Mesh.MeshId = "http://www.roblox.com/asset/?id=2697549" | |
504 | --Mesh.TextureId = "http://www.roblox.com/asset/?id=2697544"]] | |
505 | local Mesh = Instance.new("BlockMesh",Bullet) | |
506 | Mesh.Scale = Vector3.new(0.2,0.2,5)*Scale/Bullet.Size | |
507 | IgnoreList[#IgnoreList+1] = Bullet | |
508 | RenderStepped:wait() | |
509 | for i = Speed,1000,Speed do -- Loop to do the bullet movement and stuff. | |
510 | local ray,Hit,Pos,SurfaceNormal; | |
511 | ray = Ray.new(Bullet.Position,((Bullet.CFrame*CFrame.Angles(math.rad(-Gravity),0,0)*CFrame.new(0,0,-Speed)).p-Bullet.Position).unit*Speed) | |
512 | Hit,Pos,SurfaceNormal = Workspace:FindPartOnRayWithIgnoreList(ray,IgnoreList) | |
513 | Bullet.CFrame = Bullet.CFrame*CFrame.Angles(math.rad(-Gravity),0,0)*CFrame.new(0,0,-Speed) | |
514 | if Hit ~= nil then | |
515 | local Hum = Hit.Parent:FindFirstChild("Humanoid") or Hit.Parent.Parent:FindFirstChild("Humanoid") or (Hit.Parent.Parent.Parent ~= nil and Hit.Parent.Parent.Parent:FindFirstChild("Humanoid")) | |
516 | if Hum ~= nil then | |
517 | Hum:TakeDamage((((Gangster and math.random(99999,99999) or math.random(99999,99999))*Scale)/100)*Hum.MaxHealth) | |
518 | end | |
519 | break | |
520 | end | |
521 | RenderStepped:wait() | |
522 | end | |
523 | Bullet:Destroy() | |
524 | end | |
525 | ||
526 | Mouse.Button1Down:connect(function() | |
527 | if not Down and not DB then | |
528 | Down = true | |
529 | while Down do | |
530 | if Humanoid.Health == 0 then break end | |
531 | if not DB then | |
532 | DB = true | |
533 | local Sound = Instance.new("Sound",Barrel) | |
534 | Sound.SoundId = "http://www.roblox.com/Asset/?id=292117557" -- 132373574 | |
535 | - | Sound.SoundId = "http://www.roblox.com/Asset/?id=165946426" -- 132373574 |
535 | + | |
536 | Sound.Pitch = (math.random(70,110)/100)/((Scale < 0.25 and 0.25) or (Scale > 4 and 4) or Scale) | |
537 | Sound:Play() | |
538 | Spawn(function() | |
539 | ShootBullet(Mouse.Hit.p,Barrel1) | |
540 | end) | |
541 | RecoilMesh.VertexColor = Vector3.new(1,math.random(160,245)/255,20/255) | |
542 | PartWeld.C0 = PartWeld.C0 * CFrame.Angles(0,math.rad(math.random(-40,40)),0) | |
543 | local Shell = Instance.new("Part",Workspace) | |
544 | Shell.FormFactor = "Custom" | |
545 | Shell.BrickColor = BrickColor.new("Bright yellow") | |
546 | Shell.Size = Vector3.new(0.2,0.5,0.2)*Scale | |
547 | Shell.CFrame = Barrel.CFrame*CFrame.new(0.5,0.5,0)*CFrame.Angles(math.rad(-90),0,0) | |
548 | Shell.Velocity = ((Barrel.CFrame*CFrame.new(5,0,math.random(-2,2))).p-Barrel.CFrame.p)*5*Scale | |
549 | local Mesh = Instance.new("CylinderMesh",Shell) | |
550 | Mesh.Scale = Vector3.new(0.2,0.5,0.2)*Scale/Shell.Size | |
551 | Spawn(function() | |
552 | wait(5) | |
553 | Shell:Destroy() | |
554 | end) | |
555 | for i = 1,20,7.5 do | |
556 | RotationOffset = RotationOffset*CFrame.Angles(math.rad(7.5),0,0) | |
557 | Part1Joint = Part1Joint*CFrame.new(Vector3.new(0,-0.15,0)*Scale) | |
558 | Barrel2Weld.C0 = Barrel2Weld.C0*CFrame.new(Vector3.new(0,0,0.15)*Scale) | |
559 | Light.Brightness = Light.Brightness+38 | |
560 | RecoilMesh.Scale = RecoilMesh.Scale+(Vector3.new(0,0.375,0)*Scale) | |
561 | RenderStepped:wait() | |
562 | end | |
563 | wait(0.02) | |
564 | for i = 1,20,3.75 do | |
565 | RotationOffset = RotationOffset*CFrame.Angles(math.rad(-3.75),0,0) | |
566 | Part1Joint = Part1Joint*CFrame.new(Vector3.new(0,0.075,0)*Scale) | |
567 | Barrel2Weld.C0 = Barrel2Weld.C0*CFrame.new(Vector3.new(0,0,-0.075)*Scale) | |
568 | Light.Brightness = Light.Brightness-19 | |
569 | RecoilMesh.Scale = RecoilMesh.Scale+(Vector3.new(0,-0.1875,0)*Scale) | |
570 | RenderStepped:wait() | |
571 | end | |
572 | wait(0.02) | |
573 | DB = false | |
574 | end | |
575 | end | |
576 | end | |
577 | end) | |
578 | ||
579 | Mouse.Button1Up:connect(function() | |
580 | Down = false | |
581 | end) | |
582 | ||
583 | Mouse.KeyDown:connect(function(Key) | |
584 | if Key:lower() == "g" and not DB then | |
585 | DB = true | |
586 | if Gangster == true then | |
587 | for i = 1,70,5 do | |
588 | RotationOffset = RotationOffset*CFrame.Angles(0,math.rad(-5),0) | |
589 | RenderStepped:wait() | |
590 | end | |
591 | Gangster = false | |
592 | else | |
593 | for i = 1,70,5 do | |
594 | RotationOffset = RotationOffset*CFrame.Angles(0,math.rad(5),0) | |
595 | RenderStepped:wait() | |
596 | end | |
597 | Gangster = true | |
598 | end | |
599 | DB = false | |
600 | end | |
601 | end) | |
602 | ||
603 | local Weld = Instance.new("Weld") | |
604 | Weld.Part0 = Torso | |
605 | Weld.Part1 = Character["Right Arm"] | |
606 | Weld.Parent = Torso | |
607 | ||
608 | local Weld2 = Instance.new("Weld") | |
609 | Weld2.Part0 = Torso | |
610 | Weld2.Part1 = Character.Head | |
611 | Weld2.Parent = Torso | |
612 | ||
613 | local RA = Character["Right Arm"] | |
614 | ||
615 | game:GetService("RunService"):BindToRenderStep("Pistol",Enum.RenderPriority.Character.Value,function() | |
616 | local Point = Torso.CFrame:vectorToObjectSpace(Mouse.Hit.p-Torso.CFrame.p) | |
617 | if Point.Z > 0 then | |
618 | if Point.X > 0 then | |
619 | Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(Mouse.Hit.X,Torso.Position.Y,Mouse.Hit.Z))*CFrame.Angles(0,math.rad(90),0) | |
620 | elseif Point.X < 0 then | |
621 | Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(Mouse.Hit.X,Torso.Position.Y,Mouse.Hit.Z))*CFrame.Angles(0,math.rad(-90),0) | |
622 | end | |
623 | end | |
624 | ||
625 | local CFr = (Torso.CFrame*Part0Joint):toObjectSpace(CFrame.new((Torso.CFrame*Part0Joint).p,Mouse.Hit.p))--RayEnd)) | |
626 | Weld.C0 = Part0Joint * (CFr-CFr.p) * RotationOffset | |
627 | Weld.C1 = Part1Joint | |
628 | Weld.Part0 = Torso | |
629 | Weld.Part1 = RA | |
630 | local CFr = (Torso.CFrame*Part0JointHead):toObjectSpace(CFrame.new((Torso.CFrame*Part0JointHead).p,Mouse.Hit.p))--RayEnd)) | |
631 | Weld2.C0 = Part0JointHead * (CFr-CFr.p) * RotationOffsetHead | |
632 | Weld2.C1 = Part1JointHead | |
633 | Weld2.Part0 = Torso | |
634 | Weld2.Part1 = Character.Head | |
635 | local Last = Scale | |
636 | Scale = game.Players.LocalPlayer.Character.Torso.Size.X/2*(game.Players.LocalPlayer.Character.Torso:FindFirstChild("ScaleInserted") ~= nil and game.Players.LocalPlayer.Character.Torso:FindFirstChild("ScaleInserted").Scale.Z or 1)*0.8 | |
637 | Speed = 20*Scale | |
638 | if Scale ~= Last then | |
639 | Part0Joint = CFrame.new(Vector3.new(1,0.75,0)*Scale*1.25) | |
640 | Part1Joint = CFrame.new(Vector3.new(-0.5,0.75,0)*Scale*1.25) | |
641 | Part0JointHead = CFrame.new(Vector3.new(0,1,0)*Scale*1.25) | |
642 | Part1JointHead = CFrame.new(Vector3.new(0,-0.5,0)*Scale*1.25) | |
643 | end | |
644 | end) |