SHOW:
|
|
- or go back to the newest paste.
1 | - | -- This script has been converted to FE by iPxter |
1 | + | local player = game.Players.LocalPlayer |
2 | local char = player.Character | |
3 | local tor = char.Torso | |
4 | - | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end |
4 | + | |
5 | - | local Player,Mouse,mouse,UserInputService,ContextActionService = owner |
5 | + | |
6 | - | do |
6 | + | |
7 | - | print("FE Compatibility code by Mokiros | Translated to FE by iPxter") |
7 | + | local ammo = 213 |
8 | - | script.Parent = Player.Character |
8 | + | local maxammo = 213 |
9 | local neck=tor:findFirstChild'Neck' | |
10 | - | --RemoteEvent for communicating |
10 | + | |
11 | - | local Event = Instance.new("RemoteEvent") |
11 | + | |
12 | - | Event.Name = "UserInput_Event" |
12 | + | |
13 | local shellsenabled = false | |
14 | - | --Fake event to make stuff like Mouse.KeyDown work |
14 | + | |
15 | - | local function fakeEvent() |
15 | + | |
16 | - | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} |
16 | + | |
17 | - | t.connect = t.Connect |
17 | + | |
18 | - | return t |
18 | + | |
19 | w.C0=c0 | |
20 | return w | |
21 | - | --Creating fake input objects with fake variables |
21 | + | |
22 | - | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} |
22 | + | |
23 | - | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} |
23 | + | |
24 | - | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) |
24 | + | |
25 | - | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil |
25 | + | |
26 | - | end} |
26 | + | |
27 | - | --Merged 2 functions into one by checking amount of arguments |
27 | + | |
28 | - | CAS.UnbindAction = CAS.BindAction |
28 | + | |
29 | local reloading = false | |
30 | - | --This function will trigger the events that have been :Connect()'ed |
30 | + | |
31 | - | local function te(self,ev,...) |
31 | + | |
32 | - | local t = m[ev] |
32 | + | |
33 | - | if t and t._fakeEvent and t.Function then |
33 | + | |
34 | - | t.Function(...) |
34 | + | |
35 | ||
36 | local ppsh = Instance.new("Model", tool) | |
37 | - | m.TrigEvent = te |
37 | + | |
38 | - | UIS.TrigEvent = te |
38 | + | |
39 | handle = Instance.new("Part", ppsh) | |
40 | - | Event.OnServerEvent:Connect(function(plr,io) |
40 | + | |
41 | - | if plr~=Player then return end |
41 | + | |
42 | - | if io.isMouse then |
42 | + | |
43 | - | m.Target = io.Target |
43 | + | |
44 | - | m.Hit = io.Hit |
44 | + | |
45 | - | else |
45 | + | |
46 | - | local b = io.UserInputState == Enum.UserInputState.Begin |
46 | + | |
47 | - | if io.UserInputType == Enum.UserInputType.MouseButton1 then |
47 | + | |
48 | - | return m:TrigEvent(b and "Button1Down" or "Button1Up") |
48 | + | |
49 | - | end |
49 | + | |
50 | - | for _,t in pairs(CAS.Actions) do |
50 | + | |
51 | - | for _,k in pairs(t.Keys) do |
51 | + | |
52 | - | if k==io.KeyCode then |
52 | + | |
53 | - | t.Function(t.Name,io.UserInputState,io) |
53 | + | |
54 | - | end |
54 | + | |
55 | handle.Friction = 0.3 | |
56 | - | end |
56 | + | |
57 | - | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) |
57 | + | |
58 | - | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) |
58 | + | |
59 | - | end |
59 | + | |
60 | part.CanCollide = false | |
61 | - | Event.Parent = NLS([==[ |
61 | + | |
62 | - | local Player = game:GetService("Players").LocalPlayer |
62 | + | |
63 | - | local Event = script:WaitForChild("UserInput_Event") |
63 | + | |
64 | part.Material = Enum.Material.Wood | |
65 | - | local UIS = game:GetService("UserInputService") |
65 | + | |
66 | - | local input = function(io,a) |
66 | + | |
67 | - | if a then return end |
67 | + | |
68 | - | --Since InputObject is a client-side instance, we create and pass table instead |
68 | + | |
69 | - | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}) |
69 | + | |
70 | part.BrickColor = BrickColor.new("Cyan") | |
71 | - | UIS.InputBegan:Connect(input) |
71 | + | |
72 | - | UIS.InputEnded:Connect(input) |
72 | + | |
73 | ||
74 | mesh = Instance.new("SpecialMesh", part) | |
75 | - | local h,t |
75 | + | |
76 | - | --Give the server mouse data 30 times every second, but only if the values changed |
76 | + | |
77 | - | --If player is not moving their mouse, client won't fire events |
77 | + | |
78 | - | while wait(1/30) do |
78 | + | |
79 | - | if h~=Mouse.Hit or t~=Mouse.Target then |
79 | + | |
80 | - | h,t=Mouse.Hit,Mouse.Target |
80 | + | |
81 | - | Event:FireServer({isMouse=true,Target=t,Hit=h}) |
81 | + | |
82 | part_2.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
83 | - | end]==],Player.Character) |
83 | + | |
84 | - | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS |
84 | + | |
85 | part_2.Size = Vector3.new(1, 0.4, 1) | |
86 | - | local player = owner |
86 | + | |
87 | part_2.CFrame = CFrame.new(134.175, 3.327, 86.101)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, 3.1415493488312) | |
88 | part_2.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
89 | part_2.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
90 | part_2.BrickColor = BrickColor.new("Cyan") | |
91 | part_2.Friction = 0.3 | |
92 | - | local ammo = 71 |
92 | + | |
93 | - | local maxammo = 71 |
93 | + | |
94 | mesh_2 = Instance.new("SpecialMesh", part_2) | |
95 | mesh_2.Scale = Vector3.new(0.25, 0.167, 0.667) | |
96 | mesh_2.MeshType = Enum.MeshType.Wedge | |
97 | ||
98 | part_3 = Instance.new("Part", ppsh) | |
99 | part_3.FormFactor = Enum.FormFactor.Plate | |
100 | part_3.CanCollide = false | |
101 | part_3.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
102 | part_3.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
103 | part_3.Anchored = false | |
104 | part_3.Material = Enum.Material.Wood | |
105 | part_3.Size = Vector3.new(1, 0.4, 1) | |
106 | part_3.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
107 | part_3.CFrame = CFrame.new(134.175, 3.594, 86.101)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, -4.3383752199588e-005) | |
108 | part_3.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
109 | part_3.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
110 | part_3.BrickColor = BrickColor.new("Cyan") | |
111 | part_3.Friction = 0.3 | |
112 | part_3.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
113 | ||
114 | mesh_3 = Instance.new("SpecialMesh", part_3) | |
115 | mesh_3.Scale = Vector3.new(0.25, 1.167, 0.667) | |
116 | mesh_3.MeshType = Enum.MeshType.Brick | |
117 | ||
118 | stock = Instance.new("Part", ppsh) | |
119 | stock.FormFactor = Enum.FormFactor.Plate | |
120 | stock.CanCollide = false | |
121 | stock.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
122 | stock.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
123 | stock.Anchored = false | |
124 | stock.Material = Enum.Material.Wood | |
125 | stock.Size = Vector3.new(1, 0.4, 1) | |
126 | stock.Name = "Stock" | |
127 | stock.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
128 | stock.CFrame = CFrame.new(134.172, 3.561, 86.517)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, -4.3383752199588e-005) | |
129 | stock.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
130 | stock.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
131 | stock.BrickColor = BrickColor.new("Cyan") | |
132 | stock.Friction = 0.3 | |
133 | stock.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
134 | ||
135 | mesh_4 = Instance.new("SpecialMesh", stock) | |
136 | mesh_4.Scale = Vector3.new(0.25, 1.333, 0.167) | |
137 | mesh_4.MeshType = Enum.MeshType.Brick | |
138 | ||
139 | part_4 = Instance.new("Part", ppsh) | |
140 | part_4.FormFactor = Enum.FormFactor.Custom | |
141 | part_4.CanCollide = false | |
142 | part_4.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
143 | part_4.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
144 | part_4.Anchored = false | |
145 | part_4.Material = Enum.Material.Metal | |
146 | part_4.Size = Vector3.new(0.242, 0.242, 0.242) | |
147 | part_4.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
148 | part_4.CFrame = CFrame.new(134.178, 4.026, 81.881)* CFrame.Angles(-1.5717061758041, 8.5014959040564e-005, -0.0080821355804801) | |
149 | part_4.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
150 | part_4.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
151 | part_4.BrickColor = BrickColor.new("Really black") | |
152 | part_4.Friction = 0.3 | |
153 | part_4.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
154 | ||
155 | mesh_5 = Instance.new("CylinderMesh", part_4) | |
156 | mesh_5.Scale = Vector3.new(0.6, 0.038, 0.6) | |
157 | ||
158 | muzzleflash = Instance.new("Part", ppsh) | |
159 | muzzleflash.CanCollide = false | |
160 | muzzleflash.Transparency = 1 | |
161 | muzzleflash.TopSurface = Enum.SurfaceType.Smooth | |
162 | muzzleflash.Anchored = false | |
163 | muzzleflash.Material = Enum.Material.Neon | |
164 | muzzleflash.Size = Vector3.new(1.001, 2.003, 2.003) | |
165 | muzzleflash.Name = "MuzzleFlash" | |
166 | muzzleflash.CFrame = CFrame.new(134.206, 4.029, 80.998)* CFrame.Angles(0.010700599290431, 1.5627064704895, -1.5815346240997) | |
167 | muzzleflash.BrickColor = BrickColor.new("New Yeller") | |
168 | muzzleflash.Friction = 0.3 | |
169 | muzzleflash.BottomSurface = Enum.SurfaceType.Smooth | |
170 | ||
171 | mesh_6 = Instance.new("SpecialMesh", muzzleflash) | |
172 | mesh_6.Scale = Vector3.new(0.5, 1, 0.5) | |
173 | mesh_6.MeshType = Enum.MeshType.Sphere | |
174 | ||
175 | pointlight = Instance.new("PointLight", muzzleflash) | |
176 | pointlight.Enabled = false | |
177 | pointlight.Color = Color3.new(1, 1, 0) | |
178 | pointlight.Brightness = 5 | |
179 | pointlight.Range = 5 | |
180 | ||
181 | newp = Instance.new("Part", ppsh) | |
182 | newp.CanCollide = false | |
183 | newp.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
184 | newp.Transparency = 1 | |
185 | newp.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
186 | newp.Anchored = false | |
187 | newp.Material = Enum.Material.Metal | |
188 | newp.Size = Vector3.new(0.242, 0.242, 0.242) | |
189 | newp.Name = "newp" | |
190 | newp.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
191 | newp.CFrame = CFrame.new(134.182, 4.035, 81.738)* CFrame.Angles(1.2531131687865e-006, -0.00099066097754985, -3.862278390443e-005) | |
192 | newp.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
193 | newp.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
194 | newp.BrickColor = BrickColor.new("Really black") | |
195 | newp.Friction = 0.3 | |
196 | newp.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
197 | ||
198 | mesh_7 = Instance.new("BlockMesh", newp) | |
199 | mesh_7.Scale = Vector3.new(0.828, 0.828, 0.828) | |
200 | ||
201 | mag = Instance.new("Part", ppsh) | |
202 | mag.FormFactor = Enum.FormFactor.Symmetric | |
203 | mag.CanCollide = false | |
204 | mag.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
205 | mag.Elasticity = 0 | |
206 | mag.TopSurface = Enum.SurfaceType.Smooth | |
207 | mag.Anchored = false | |
208 | mag.Material = Enum.Material.Metal | |
209 | mag.Size = Vector3.new(1, 1, 1) | |
210 | mag.Name = "mag" | |
211 | mag.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
212 | mag.CFrame = CFrame.new(134.18, 3.537, 83.84)* CFrame.Angles(-1.5707964897156, -1.5707963705063, 0) | |
213 | mag.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
214 | mag.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
215 | mag.BrickColor = BrickColor.new("Royal blue") | |
216 | mag.Friction = 0.3 | |
217 | mag.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
218 | ||
219 | mesh_8 = Instance.new("CylinderMesh", mag) | |
220 | mesh_8.Scale = Vector3.new(0.9, 0.41, 0.9) | |
221 | ||
222 | part_5 = Instance.new("Part", ppsh) | |
223 | part_5.FormFactor = Enum.FormFactor.Plate | |
224 | part_5.CanCollide = false | |
225 | part_5.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
226 | part_5.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
227 | part_5.Anchored = false | |
228 | part_5.Material = Enum.Material.Metal | |
229 | part_5.Size = Vector3.new(1, 2.4, 1) | |
230 | part_5.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
231 | part_5.CFrame = CFrame.new(134.182, 4.024, 83.319)* CFrame.Angles(-1.5707964897156, 4.6109793316873e-008, -4.6110906759544e-010) | |
232 | part_5.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
233 | part_5.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
234 | part_5.BrickColor = BrickColor.new("Royal blue") | |
235 | part_5.Friction = 0.3 | |
236 | part_5.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
237 | ||
238 | mesh_9 = Instance.new("CylinderMesh", part_5) | |
239 | mesh_9.Scale = Vector3.new(1, 1.2, 0.19) | |
240 | ||
241 | part_6 = Instance.new("Part", ppsh) | |
242 | part_6.FormFactor = Enum.FormFactor.Plate | |
243 | part_6.CanCollide = false | |
244 | part_6.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
245 | part_6.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
246 | part_6.Anchored = false | |
247 | part_6.Material = Enum.Material.Metal | |
248 | part_6.Size = Vector3.new(1, 0.4, 1) | |
249 | part_6.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
250 | part_6.CFrame = CFrame.new(134.183, 4.158, 82.302)* CFrame.Angles(0.0042714844457805, 1.5627138614655, -0.0051786983385682) | |
251 | part_6.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
252 | part_6.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
253 | part_6.BrickColor = BrickColor.new("Royal blue") | |
254 | part_6.Friction = 0.3 | |
255 | part_6.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
256 | ||
257 | mesh_10 = Instance.new("SpecialMesh", part_6) | |
258 | mesh_10.Scale = Vector3.new(0.083, 0.333, 0.083) | |
259 | mesh_10.MeshType = Enum.MeshType.Brick | |
260 | ||
261 | part_7 = Instance.new("Part", ppsh) | |
262 | part_7.FormFactor = Enum.FormFactor.Plate | |
263 | part_7.CanCollide = false | |
264 | part_7.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
265 | part_7.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
266 | part_7.Anchored = false | |
267 | part_7.Material = Enum.Material.Metal | |
268 | part_7.Size = Vector3.new(1, 0.4, 1) | |
269 | part_7.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
270 | part_7.CFrame = CFrame.new(134.194, 3.942, 83.767)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, -4.3383752199588e-005) | |
271 | part_7.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
272 | part_7.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
273 | part_7.BrickColor = BrickColor.new("Royal blue") | |
274 | part_7.Friction = 0.3 | |
275 | part_7.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
276 | ||
277 | mesh_11 = Instance.new("SpecialMesh", part_7) | |
278 | mesh_11.Scale = Vector3.new(0.25, 0.083, 0.167) | |
279 | mesh_11.MeshType = Enum.MeshType.Brick | |
280 | ||
281 | part_8 = Instance.new("Part", ppsh) | |
282 | part_8.FormFactor = Enum.FormFactor.Plate | |
283 | part_8.CanCollide = false | |
284 | part_8.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
285 | part_8.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
286 | part_8.Anchored = false | |
287 | part_8.Material = Enum.Material.Metal | |
288 | part_8.Size = Vector3.new(1, 0.4, 1) | |
289 | part_8.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
290 | part_8.CFrame = CFrame.new(134.193, 3.809, 83.934)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, -4.3383752199588e-005) | |
291 | part_8.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
292 | part_8.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
293 | part_8.BrickColor = BrickColor.new("Royal blue") | |
294 | part_8.Friction = 0.3 | |
295 | part_8.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
296 | ||
297 | mesh_12 = Instance.new("SpecialMesh", part_8) | |
298 | mesh_12.Scale = Vector3.new(0.25, 0.75, 0.167) | |
299 | mesh_12.MeshType = Enum.MeshType.Brick | |
300 | ||
301 | part_9 = Instance.new("Part", ppsh) | |
302 | part_9.FormFactor = Enum.FormFactor.Plate | |
303 | part_9.CanCollide = false | |
304 | part_9.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
305 | part_9.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
306 | part_9.Anchored = false | |
307 | part_9.Material = Enum.Material.Metal | |
308 | part_9.Size = Vector3.new(1, 0.4, 1) | |
309 | part_9.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
310 | part_9.CFrame = CFrame.new(134.184, 4.158, 82.219)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, -4.3383752199588e-005) | |
311 | part_9.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
312 | part_9.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
313 | part_9.BrickColor = BrickColor.new("Royal blue") | |
314 | part_9.Friction = 0.3 | |
315 | part_9.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
316 | ||
317 | mesh_13 = Instance.new("SpecialMesh", part_9) | |
318 | mesh_13.Scale = Vector3.new(0.083, 0.333, 0.083) | |
319 | mesh_13.MeshType = Enum.MeshType.Wedge | |
320 | ||
321 | part_10 = Instance.new("Part", ppsh) | |
322 | part_10.FormFactor = Enum.FormFactor.Plate | |
323 | part_10.CanCollide = false | |
324 | part_10.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
325 | part_10.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
326 | part_10.Anchored = false | |
327 | part_10.Material = Enum.Material.Metal | |
328 | part_10.Size = Vector3.new(1, 0.4, 1) | |
329 | part_10.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
330 | part_10.CFrame = CFrame.new(134.183, 4.158, 82.385)* CFrame.Angles(3.1406810283661, 0.0080923540517688, -3.1415493488312) | |
331 | part_10.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
332 | part_10.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
333 | part_10.BrickColor = BrickColor.new("Royal blue") | |
334 | part_10.Friction = 0.3 | |
335 | part_10.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
336 | ||
337 | mesh_14 = Instance.new("SpecialMesh", part_10) | |
338 | mesh_14.Scale = Vector3.new(0.083, 0.333, 0.083) | |
339 | mesh_14.MeshType = Enum.MeshType.Wedge | |
340 | ||
341 | part_11 = Instance.new("Part", ppsh) | |
342 | part_11.FormFactor = Enum.FormFactor.Plate | |
343 | part_11.CanCollide = false | |
344 | part_11.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
345 | part_11.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
346 | part_11.Anchored = false | |
347 | part_11.Material = Enum.Material.Metal | |
348 | part_11.Size = Vector3.new(1, 0.4, 1) | |
349 | part_11.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
350 | part_11.CFrame = CFrame.new(134.196, 3.825, 83.601)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, -4.3383752199588e-005) | |
351 | part_11.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
352 | part_11.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
353 | part_11.BrickColor = BrickColor.new("Royal blue") | |
354 | part_11.Friction = 0.3 | |
355 | part_11.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
356 | ||
357 | mesh_15 = Instance.new("SpecialMesh", part_11) | |
358 | mesh_15.Scale = Vector3.new(0.25, 0.667, 0.167) | |
359 | mesh_15.MeshType = Enum.MeshType.Brick | |
360 | ||
361 | part_12 = Instance.new("Part", ppsh) | |
362 | part_12.FormFactor = Enum.FormFactor.Plate | |
363 | part_12.CanCollide = false | |
364 | part_12.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
365 | part_12.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
366 | part_12.Anchored = false | |
367 | part_12.Material = Enum.Material.Metal | |
368 | part_12.Size = Vector3.new(1, 0.4, 1) | |
369 | part_12.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
370 | part_12.CFrame = CFrame.new(134.196, 3.65, 83.601)* CFrame.Angles(-1.5717036724091, 4.335065750638e-005, -0.0080923531204462) | |
371 | part_12.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
372 | part_12.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
373 | part_12.BrickColor = BrickColor.new("Royal blue") | |
374 | part_12.Friction = 0.3 | |
375 | part_12.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
376 | ||
377 | mesh_16 = Instance.new("SpecialMesh", part_12) | |
378 | mesh_16.Scale = Vector3.new(0.25, 0.417, 0.083) | |
379 | mesh_16.MeshType = Enum.MeshType.Wedge | |
380 | ||
381 | part_13 = Instance.new("Part", ppsh) | |
382 | part_13.FormFactor = Enum.FormFactor.Plate | |
383 | part_13.CanCollide = false | |
384 | part_13.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
385 | part_13.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
386 | part_13.Anchored = false | |
387 | part_13.Material = Enum.Material.Metal | |
388 | part_13.Size = Vector3.new(1, 0.4, 1) | |
389 | part_13.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
390 | part_13.CFrame = CFrame.new(134.19, 3.459, 84.309)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, 3.1415493488312) | |
391 | part_13.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
392 | part_13.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
393 | part_13.BrickColor = BrickColor.new("Royal blue") | |
394 | part_13.Friction = 0.3 | |
395 | part_13.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
396 | ||
397 | mesh_17 = Instance.new("SpecialMesh", part_13) | |
398 | mesh_17.Scale = Vector3.new(0.083, 0.167, 0.083) | |
399 | mesh_17.MeshType = Enum.MeshType.Wedge | |
400 | ||
401 | part_14 = Instance.new("Part", ppsh) | |
402 | part_14.FormFactor = Enum.FormFactor.Plate | |
403 | part_14.CanCollide = false | |
404 | part_14.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
405 | part_14.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
406 | part_14.Anchored = false | |
407 | part_14.Material = Enum.Material.Metal | |
408 | part_14.Size = Vector3.new(1, 0.4, 1) | |
409 | part_14.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
410 | part_14.CFrame = CFrame.new(134.197, 3.875, 83.467)* CFrame.Angles(-1.5717036724091, 4.335065750638e-005, -0.0080923531204462) | |
411 | part_14.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
412 | part_14.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
413 | part_14.BrickColor = BrickColor.new("Royal blue") | |
414 | part_14.Friction = 0.3 | |
415 | part_14.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
416 | ||
417 | mesh_18 = Instance.new("SpecialMesh", part_14) | |
418 | mesh_18.Scale = Vector3.new(0.25, 0.25, 0.167) | |
419 | mesh_18.MeshType = Enum.MeshType.Wedge | |
420 | ||
421 | part_15 = Instance.new("Part", ppsh) | |
422 | part_15.FormFactor = Enum.FormFactor.Plate | |
423 | part_15.CanCollide = false | |
424 | part_15.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
425 | part_15.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
426 | part_15.Anchored = false | |
427 | part_15.Material = Enum.Material.Metal | |
428 | part_15.Size = Vector3.new(1, 0.4, 1) | |
429 | part_15.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
430 | part_15.CFrame = CFrame.new(134.187, 3.576, 84.642)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, -4.3383752199588e-005) | |
431 | part_15.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
432 | part_15.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
433 | part_15.BrickColor = BrickColor.new("Royal blue") | |
434 | part_15.Friction = 0.3 | |
435 | part_15.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
436 | ||
437 | mesh_19 = Instance.new("SpecialMesh", part_15) | |
438 | mesh_19.Scale = Vector3.new(0.083, 0.417, 0.083) | |
439 | mesh_19.MeshType = Enum.MeshType.Brick | |
440 | ||
441 | part_16 = Instance.new("Part", ppsh) | |
442 | part_16.FormFactor = Enum.FormFactor.Plate | |
443 | part_16.CanCollide = false | |
444 | part_16.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
445 | part_16.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
446 | part_16.Anchored = false | |
447 | part_16.Material = Enum.Material.Metal | |
448 | part_16.Size = Vector3.new(1, 0.4, 1) | |
449 | part_16.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
450 | part_16.CFrame = CFrame.new(134.188, 3.459, 84.476)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, -4.3383752199588e-005) | |
451 | part_16.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
452 | part_16.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
453 | part_16.BrickColor = BrickColor.new("Royal blue") | |
454 | part_16.Friction = 0.3 | |
455 | part_16.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
456 | ||
457 | mesh_20 = Instance.new("SpecialMesh", part_16) | |
458 | mesh_20.Scale = Vector3.new(0.083, 0.167, 0.25) | |
459 | mesh_20.MeshType = Enum.MeshType.Brick | |
460 | ||
461 | part_17 = Instance.new("Part", ppsh) | |
462 | part_17.FormFactor = Enum.FormFactor.Plate | |
463 | part_17.CanCollide = false | |
464 | part_17.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
465 | part_17.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
466 | part_17.Anchored = false | |
467 | part_17.Material = Enum.Material.Wood | |
468 | part_17.Size = Vector3.new(1, 0.4, 1) | |
469 | part_17.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
470 | part_17.CFrame = CFrame.new(134.182, 3.41, 85.226)* CFrame.Angles(3.1406810283661, 0.0080923540517688, 4.3383752199588e-005) | |
471 | part_17.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
472 | part_17.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
473 | part_17.BrickColor = BrickColor.new("Cyan") | |
474 | part_17.Friction = 0.3 | |
475 | part_17.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
476 | ||
477 | mesh_21 = Instance.new("SpecialMesh", part_17) | |
478 | mesh_21.Scale = Vector3.new(0.25, 0.083, 0.083) | |
479 | mesh_21.MeshType = Enum.MeshType.Wedge | |
480 | ||
481 | part_18 = Instance.new("Part", ppsh) | |
482 | part_18.FormFactor = Enum.FormFactor.Plate | |
483 | part_18.CanCollide = false | |
484 | part_18.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
485 | part_18.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
486 | part_18.Anchored = false | |
487 | part_18.Material = Enum.Material.Wood | |
488 | part_18.Size = Vector3.new(1, 0.4, 1) | |
489 | part_18.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
490 | part_18.CFrame = CFrame.new(134.183, 3.627, 85.184)* CFrame.Angles(-0.00091102049918845, -0.0080923540517688, -4.3163738155272e-005) | |
491 | part_18.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
492 | part_18.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
493 | part_18.BrickColor = BrickColor.new("Cyan") | |
494 | part_18.Friction = 0.3 | |
495 | part_18.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
496 | ||
497 | mesh_22 = Instance.new("SpecialMesh", part_18) | |
498 | mesh_22.Scale = Vector3.new(0.25, 0.5, 0.333) | |
499 | mesh_22.MeshType = Enum.MeshType.Brick | |
500 | ||
501 | part_19 = Instance.new("Part", ppsh) | |
502 | part_19.FormFactor = Enum.FormFactor.Plate | |
503 | part_19.CanCollide = false | |
504 | part_19.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
505 | part_19.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
506 | part_19.Anchored = false | |
507 | part_19.Material = Enum.Material.Metal | |
508 | part_19.Size = Vector3.new(1, 0.4, 1) | |
509 | part_19.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
510 | part_19.CFrame = CFrame.new(134.187, 3.459, 84.642)* CFrame.Angles(3.1406810283661, 0.0080923540517688, 4.3383752199588e-005) | |
511 | part_19.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
512 | part_19.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
513 | part_19.BrickColor = BrickColor.new("Royal blue") | |
514 | part_19.Friction = 0.3 | |
515 | part_19.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
516 | ||
517 | mesh_23 = Instance.new("SpecialMesh", part_19) | |
518 | mesh_23.Scale = Vector3.new(0.083, 0.167, 0.083) | |
519 | mesh_23.MeshType = Enum.MeshType.Wedge | |
520 | ||
521 | part_20 = Instance.new("Part", ppsh) | |
522 | part_20.FormFactor = Enum.FormFactor.Plate | |
523 | part_20.CanCollide = false | |
524 | part_20.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
525 | part_20.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
526 | part_20.Anchored = false | |
527 | part_20.Material = Enum.Material.Wood | |
528 | part_20.Size = Vector3.new(1, 0.4, 1) | |
529 | part_20.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
530 | part_20.CFrame = CFrame.new(134.181, 3.777, 85.392)* CFrame.Angles(3.1406810283661, 0.0080923540517688, -3.1415493488312) | |
531 | part_20.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
532 | part_20.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
533 | part_20.BrickColor = BrickColor.new("Cyan") | |
534 | part_20.Friction = 0.3 | |
535 | part_20.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
536 | ||
537 | mesh_24 = Instance.new("SpecialMesh", part_20) | |
538 | mesh_24.Scale = Vector3.new(0.25, 0.25, 0.417) | |
539 | mesh_24.MeshType = Enum.MeshType.Wedge | |
540 | ||
541 | part_21 = Instance.new("Part", ppsh) | |
542 | part_21.FormFactor = Enum.FormFactor.Plate | |
543 | part_21.CanCollide = false | |
544 | part_21.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
545 | part_21.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
546 | part_21.Anchored = false | |
547 | part_21.Material = Enum.Material.Wood | |
548 | part_21.Size = Vector3.new(1, 0.4, 1) | |
549 | part_21.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
550 | part_21.CFrame = CFrame.new(134.183, 3.777, 85.101)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, -4.3383752199588e-005) | |
551 | part_21.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
552 | part_21.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
553 | part_21.BrickColor = BrickColor.new("Cyan") | |
554 | part_21.Friction = 0.3 | |
555 | part_21.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
556 | ||
557 | mesh_25 = Instance.new("SpecialMesh", part_21) | |
558 | mesh_25.Scale = Vector3.new(0.25, 0.25, 0.167) | |
559 | mesh_25.MeshType = Enum.MeshType.Brick | |
560 | ||
561 | part_22 = Instance.new("Part", ppsh) | |
562 | part_22.FormFactor = Enum.FormFactor.Plate | |
563 | part_22.CanCollide = false | |
564 | part_22.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
565 | part_22.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
566 | part_22.Anchored = false | |
567 | part_22.Material = Enum.Material.Metal | |
568 | part_22.Size = Vector3.new(1, 0.4, 1) | |
569 | part_22.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
570 | part_22.CFrame = CFrame.new(134.182, 4.024, 84.769)* CFrame.Angles(-1.5707964897156, 4.6109793316873e-008, -4.6110906759544e-010) | |
571 | part_22.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
572 | part_22.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
573 | part_22.BrickColor = BrickColor.new("Royal blue") | |
574 | part_22.Friction = 0.3 | |
575 | part_22.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
576 | ||
577 | mesh_26 = Instance.new("CylinderMesh", part_22) | |
578 | mesh_26.Scale = Vector3.new(1, 1.2, 0.2) | |
579 | ||
580 | part_23 = Instance.new("Part", ppsh) | |
581 | part_23.FormFactor = Enum.FormFactor.Plate | |
582 | part_23.CanCollide = false | |
583 | part_23.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
584 | part_23.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
585 | part_23.Anchored = false | |
586 | part_23.Material = Enum.Material.Wood | |
587 | part_23.Size = Vector3.new(1, 0.4, 1) | |
588 | part_23.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
589 | part_23.CFrame = CFrame.new(134.188, 3.809, 84.517)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, -4.3383752199588e-005) | |
590 | part_23.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
591 | part_23.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
592 | part_23.BrickColor = BrickColor.new("Cyan") | |
593 | part_23.Friction = 0.3 | |
594 | part_23.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
595 | ||
596 | mesh_27 = Instance.new("SpecialMesh", part_23) | |
597 | mesh_27.Scale = Vector3.new(0.25, 0.75, 1) | |
598 | mesh_27.MeshType = Enum.MeshType.Brick | |
599 | ||
600 | part_24 = Instance.new("Part", ppsh) | |
601 | part_24.FormFactor = Enum.FormFactor.Plate | |
602 | part_24.CanCollide = false | |
603 | part_24.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
604 | part_24.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
605 | part_24.Anchored = false | |
606 | part_24.Material = Enum.Material.Metal | |
607 | part_24.Size = Vector3.new(1, 0.4, 1) | |
608 | part_24.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
609 | part_24.CFrame = CFrame.new(134.19, 3.576, 84.309)* CFrame.Angles(-0.00091091770445928, -0.0080922329798341, -4.3334443034837e-005) | |
610 | part_24.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
611 | part_24.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
612 | part_24.BrickColor = BrickColor.new("Royal blue") | |
613 | part_24.Friction = 0.3 | |
614 | part_24.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
615 | ||
616 | mesh_28 = Instance.new("SpecialMesh", part_24) | |
617 | mesh_28.Scale = Vector3.new(0.083, 0.417, 0.083) | |
618 | mesh_28.MeshType = Enum.MeshType.Brick | |
619 | ||
620 | part_25 = Instance.new("Part", ppsh) | |
621 | part_25.FormFactor = Enum.FormFactor.Plate | |
622 | part_25.CanCollide = false | |
623 | part_25.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
624 | part_25.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
625 | part_25.Anchored = false | |
626 | part_25.Material = Enum.Material.Wood | |
627 | part_25.Size = Vector3.new(1, 0.4, 1) | |
628 | part_25.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
629 | part_25.CFrame = CFrame.new(134.183, 3.41, 85.143)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, 3.1415493488312) | |
630 | part_25.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
631 | part_25.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
632 | part_25.BrickColor = BrickColor.new("Cyan") | |
633 | part_25.Friction = 0.3 | |
634 | part_25.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
635 | ||
636 | mesh_29 = Instance.new("SpecialMesh", part_25) | |
637 | mesh_29.Scale = Vector3.new(0.25, 0.083, 0.083) | |
638 | mesh_29.MeshType = Enum.MeshType.Wedge | |
639 | ||
640 | part_26 = Instance.new("Part", ppsh) | |
641 | part_26.FormFactor = Enum.FormFactor.Plate | |
642 | part_26.CanCollide = false | |
643 | part_26.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
644 | part_26.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
645 | part_26.Anchored = false | |
646 | part_26.Material = Enum.Material.Wood | |
647 | part_26.Size = Vector3.new(1, 0.4, 1) | |
648 | part_26.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
649 | part_26.CFrame = CFrame.new(134.185, 3.593, 84.851)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, 3.1415493488312) | |
650 | part_26.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
651 | part_26.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
652 | part_26.BrickColor = BrickColor.new("Cyan") | |
653 | part_26.Friction = 0.3 | |
654 | part_26.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
655 | ||
656 | mesh_30 = Instance.new("SpecialMesh", part_26) | |
657 | mesh_30.Scale = Vector3.new(0.25, 0.333, 0.333) | |
658 | mesh_30.MeshType = Enum.MeshType.Wedge | |
659 | ||
660 | chamber = Instance.new("Part", ppsh) | |
661 | chamber.FormFactor = Enum.FormFactor.Plate | |
662 | chamber.CanCollide = false | |
663 | chamber.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
664 | chamber.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
665 | chamber.Anchored = false | |
666 | chamber.Material = Enum.Material.Metal | |
667 | chamber.Size = Vector3.new(1, 0.4, 1) | |
668 | chamber.Name = "Chamber" | |
669 | chamber.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
670 | chamber.CFrame = CFrame.new(134.188, 4.126, 84.475)* CFrame.Angles(0.0042714844457805, 1.5627138614655, -0.0051786983385682) | |
671 | chamber.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
672 | chamber.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
673 | chamber.BrickColor = BrickColor.new("Royal blue") | |
674 | chamber.Friction = 0.3 | |
675 | chamber.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
676 | ||
677 | mesh_31 = Instance.new("SpecialMesh", chamber) | |
678 | mesh_31.Scale = Vector3.new(0.25, 0.167, 0.083) | |
679 | mesh_31.MeshType = Enum.MeshType.Brick | |
680 | ||
681 | part_27 = Instance.new("Part", ppsh) | |
682 | part_27.FormFactor = Enum.FormFactor.Plate | |
683 | part_27.CanCollide = false | |
684 | part_27.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
685 | part_27.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
686 | part_27.Anchored = false | |
687 | part_27.Material = Enum.Material.Wood | |
688 | part_27.Size = Vector3.new(1, 0.4, 1) | |
689 | part_27.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
690 | part_27.CFrame = CFrame.new(134.18, 3.627, 85.559)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, -4.3383752199588e-005) | |
691 | part_27.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
692 | part_27.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
693 | part_27.BrickColor = BrickColor.new("Cyan") | |
694 | part_27.Friction = 0.3 | |
695 | part_27.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
696 | ||
697 | mesh_32 = Instance.new("SpecialMesh", part_27) | |
698 | mesh_32.Scale = Vector3.new(0.25, 0.5, 0.417) | |
699 | mesh_32.MeshType = Enum.MeshType.Brick | |
700 | ||
701 | part_28 = Instance.new("Part", ppsh) | |
702 | part_28.FormFactor = Enum.FormFactor.Plate | |
703 | part_28.CanCollide = false | |
704 | part_28.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
705 | part_28.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
706 | part_28.Anchored = false | |
707 | part_28.Material = Enum.Material.Wood | |
708 | part_28.Size = Vector3.new(1, 0.4, 1) | |
709 | part_28.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
710 | part_28.CFrame = CFrame.new(134.183, 3.893, 85.1)* CFrame.Angles(3.1406810283661, 0.0080923540517688, -3.1415493488312) | |
711 | part_28.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
712 | part_28.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
713 | part_28.BrickColor = BrickColor.new("Cyan") | |
714 | part_28.Friction = 0.3 | |
715 | part_28.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
716 | ||
717 | mesh_33 = Instance.new("SpecialMesh", part_28) | |
718 | mesh_33.Scale = Vector3.new(0.25, 0.333, 0.167) | |
719 | mesh_33.MeshType = Enum.MeshType.Wedge | |
720 | ||
721 | part_29 = Instance.new("Part", ppsh) | |
722 | part_29.FormFactor = Enum.FormFactor.Plate | |
723 | part_29.CanCollide = false | |
724 | part_29.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
725 | part_29.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
726 | part_29.Anchored = false | |
727 | part_29.Material = Enum.Material.Wood | |
728 | part_29.Size = Vector3.new(1, 0.4, 1) | |
729 | part_29.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
730 | part_29.CFrame = CFrame.new(134.182, 3.477, 85.309)* CFrame.Angles(3.1406810283661, 0.0080923540517688, 4.3383752199588e-005) | |
731 | part_29.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
732 | part_29.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
733 | part_29.BrickColor = BrickColor.new("Cyan") | |
734 | part_29.Friction = 0.3 | |
735 | part_29.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
736 | ||
737 | mesh_34 = Instance.new("SpecialMesh", part_29) | |
738 | mesh_34.Scale = Vector3.new(0.25, 0.25, 0.083) | |
739 | mesh_34.MeshType = Enum.MeshType.Wedge | |
740 | ||
741 | part_30 = Instance.new("Part", ppsh) | |
742 | part_30.FormFactor = Enum.FormFactor.Plate | |
743 | part_30.CanCollide = false | |
744 | part_30.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
745 | part_30.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
746 | part_30.Anchored = false | |
747 | part_30.Material = Enum.Material.Wood | |
748 | part_30.Size = Vector3.new(1, 0.4, 1) | |
749 | part_30.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
750 | part_30.CFrame = CFrame.new(134.184, 3.476, 85.059)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, 3.1415493488312) | |
751 | part_30.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
752 | part_30.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
753 | part_30.BrickColor = BrickColor.new("Cyan") | |
754 | part_30.Friction = 0.3 | |
755 | part_30.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
756 | ||
757 | mesh_35 = Instance.new("SpecialMesh", part_30) | |
758 | mesh_35.Scale = Vector3.new(0.25, 0.25, 0.083) | |
759 | mesh_35.MeshType = Enum.MeshType.Wedge | |
760 | ||
761 | part_31 = Instance.new("Part", ppsh) | |
762 | part_31.FormFactor = Enum.FormFactor.Plate | |
763 | part_31.CanCollide = false | |
764 | part_31.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
765 | part_31.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
766 | part_31.Anchored = false | |
767 | part_31.Material = Enum.Material.Wood | |
768 | part_31.Size = Vector3.new(1, 0.4, 1) | |
769 | part_31.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
770 | part_31.CFrame = CFrame.new(134.18, 3.444, 85.559)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, 3.1415493488312) | |
771 | part_31.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
772 | part_31.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
773 | part_31.BrickColor = BrickColor.new("Cyan") | |
774 | part_31.Friction = 0.3 | |
775 | part_31.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
776 | ||
777 | mesh_36 = Instance.new("SpecialMesh", part_31) | |
778 | mesh_36.Scale = Vector3.new(0.25, 0.417, 0.417) | |
779 | mesh_36.MeshType = Enum.MeshType.Wedge | |
780 | ||
781 | part_32 = Instance.new("Part", ppsh) | |
782 | part_32.FormFactor = Enum.FormFactor.Plate | |
783 | part_32.CanCollide = false | |
784 | part_32.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
785 | part_32.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
786 | part_32.Anchored = false | |
787 | part_32.Material = Enum.Material.Wood | |
788 | part_32.Size = Vector3.new(1, 0.4, 1) | |
789 | part_32.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
790 | part_32.CFrame = CFrame.new(134.183, 3.477, 85.184)* CFrame.Angles(-0.00091165496269241, -0.0080923540517688, -4.3383752199588e-005) | |
791 | part_32.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
792 | part_32.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
793 | part_32.BrickColor = BrickColor.new("Cyan") | |
794 | part_32.Friction = 0.3 | |
795 | part_32.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
796 | ||
797 | mesh_37 = Instance.new("SpecialMesh", part_32) | |
798 | mesh_37.Scale = Vector3.new(0.25, 0.25, 0.167) | |
799 | mesh_37.MeshType = Enum.MeshType.Brick | |
800 | ||
801 | local gungui = Instance.new("GuiMain", player.PlayerGui) | |
802 | gungui.Name = "GunGUI" | |
803 | ||
804 | main = Instance.new("Frame", gungui) | |
805 | main.ZIndex = 2 | |
806 | main.Size = UDim2.new(0, 120, 0, 75) | |
807 | main.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843) | |
808 | main.Name = "Main" | |
809 | main.Position = UDim2.new(1, -250, 1, -100) | |
810 | main.BorderSizePixel = 0 | |
811 | main.BackgroundTransparency = 1 | |
812 | main.BackgroundColor3 = Color3.new(1, 1, 1) | |
813 | ||
814 | local amount = Instance.new("TextLabel", main) | |
815 | amount.TextStrokeTransparency = 0.8 | |
816 | amount.BackgroundColor3 = Color3.new(1, 1, 1) | |
817 | amount.BackgroundTransparency = 1 | |
818 | amount.Size = UDim2.new(0.5, 0, 0.5, 0) | |
819 | amount.TextColor3 = Color3.new(1, 1, 1) | |
820 | amount.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843) | |
821 | amount.Text = "["..ammo.."/"..maxammo.."]" | |
822 | amount.Position = UDim2.new(0.25, 0, 0, 20) | |
823 | amount.Font = Enum.Font.SourceSansBold | |
824 | amount.Name = "Amount" | |
825 | amount.FontSize = Enum.FontSize.Size36 | |
826 | ||
827 | borders = Instance.new("Frame", main) | |
828 | borders.ZIndex = 2 | |
829 | borders.Size = UDim2.new(1, 0, 1, 0) | |
830 | borders.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843) | |
831 | borders.Name = "Borders" | |
832 | borders.BackgroundTransparency = 1 | |
833 | borders.BackgroundColor3 = Color3.new(1, 1, 1) | |
834 | ||
835 | gname = Instance.new("TextLabel", main) | |
836 | gname.TextStrokeTransparency = 0.8 | |
837 | gname.BackgroundColor3 = Color3.new(1, 1, 1) | |
838 | gname.BackgroundTransparency = 1 | |
839 | gname.Size = UDim2.new(0.5, 0, 0.5, 0) | |
840 | gname.TextColor3 = Color3.new(1, 1, 1) | |
841 | gname.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843) | |
842 | gname.Text = "PPSH-41" | |
843 | gname.Position = UDim2.new(0.25, 0, 0, -20) | |
844 | gname.Font = Enum.Font.SourceSansBold | |
845 | gname.Name = "gname" | |
846 | gname.FontSize = Enum.FontSize.Size36 | |
847 | ||
848 | desc = Instance.new("TextLabel", main) | |
849 | desc.TextStrokeTransparency = 0.8 | |
850 | desc.BackgroundColor3 = Color3.new(1, 1, 1) | |
851 | desc.BackgroundTransparency = 1 | |
852 | desc.Size = UDim2.new(0.5, 0, 0.5, 0) | |
853 | desc.TextColor3 = Color3.new(1, 1, 1) | |
854 | desc.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843) | |
855 | desc.Text = "7.62x25mm Tokarev" | |
856 | desc.Position = UDim2.new(0.25, 0, 0, 50) | |
857 | desc.Font = Enum.Font.SourceSansBold | |
858 | desc.Name = "desc" | |
859 | desc.FontSize = Enum.FontSize.Size18 | |
860 | ||
861 | local hitm = Instance.new("ImageLabel", gungui) | |
862 | hitm.Visible = false | |
863 | hitm.BorderSizePixel = 0 | |
864 | hitm.Image = "http://www.roblox.com/asset/?id=131358529" | |
865 | hitm.Name = "Hit" | |
866 | hitm.Position = UDim2.new(0, 938, 0, 198) | |
867 | hitm.BorderColor3 = Color3.new(0, 0, 0) | |
868 | hitm.BackgroundTransparency = 1 | |
869 | hitm.Size = UDim2.new(0, 45, 0, 45) | |
870 | hitm.BackgroundColor3 = Color3.new(0, 0, 0) | |
871 | ||
872 | ppsh.Parent = tool | |
873 | ppsh:BreakJoints() | |
874 | ppsh:MakeJoints() | |
875 | ||
876 | local prev | |
877 | local parts = ppsh:GetChildren() | |
878 | ||
879 | for i = 1,#parts do | |
880 | if (parts[i].className == "Part") or (parts[i].className == "WedgePart") or (parts[i].className == "Seat") or (parts[i].className == "VehicleSeat") or (parts[i].className == "CornerWedgePart") then | |
881 | if (prev ~= nil)then | |
882 | if parts[i]:FindFirstChild("Weld") then parts[i]:FindFirstChild("Weld"):Destroy() end | |
883 | local weld = Instance.new("Weld") | |
884 | weld.Part0 = prev | |
885 | weld.Part1 = parts[i] | |
886 | weld.C0 = prev.CFrame:inverse() | |
887 | weld.C1 = parts[i].CFrame:inverse() | |
888 | weld.Parent = prev | |
889 | parts[i].Anchored = false | |
890 | end | |
891 | prev = parts[i] | |
892 | end | |
893 | end | |
894 | ppsh:MakeJoints() | |
895 | ||
896 | tor["Right Shoulder"].Part1 = nil | |
897 | tor["Left Shoulder"].Part1 = nil | |
898 | ||
899 | weld(tor, ra, CFrame.new(.6,.1,0)*CFrame.Angles(math.rad(0),0,0)) | |
900 | weld(la, ra, CFrame.new(.9,.8,-.1)*CFrame.Angles(math.rad(-5),0,-.4)) | |
901 | ppsh.Handle.Weld.Name = "Weld2" | |
902 | weld(ppsh.Handle, ra, CFrame.new(0,-.5,.9)*CFrame.Angles(math.rad(90),0,0)) | |
903 | local weld1 = tor.Weld | |
904 | local offset = CFrame.new(0,-.1,-0.8)*CFrame.Angles(math.pi/2,0,0) | |
905 | local barrel = newp | |
906 | ||
907 | local newl = char["Left Arm"]:Clone() | |
908 | newl.Size = Vector3.new(.9,1.9,.9) | |
909 | local newr = char["Right Arm"]:Clone() | |
910 | newr.Size = Vector3.new(.9,1.9,.9) | |
911 | newl.Weld:Destroy() | |
912 | newl.Parent = camera | |
913 | newr.Parent = camera | |
914 | weld(newl, la, CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)) | |
915 | weld(newr, ra, CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)) | |
916 | ||
917 | mouse.KeyDown:connect(function(key) | |
918 | if key == "f" then | |
919 | mouselook = mouselook + 1 | |
920 | if mouselook == 1 then | |
921 | ||
922 | end | |
923 | if mouselook == 2 then | |
924 | mouselook = 0 | |
925 | end | |
926 | end | |
927 | end) | |
928 | ||
929 | mouse.TargetFilter = workspace | |
930 | mouse.Move:connect(function(key) | |
931 | if mouselook == 0 then | |
932 | --mouse.Icon = "http://www.roblox.com/asset/?id=316279304" | |
933 | hitm.Position = UDim2.new(0, mouse.X-22.5, 0, mouse.Y-22.5) | |
934 | if canmovemouse == true then | |
935 | local p0c0 = tor:GetRenderCFrame()*weld1.C0 | |
936 | weld1.C1 = (CFrame.new(p0c0.p, mouse.Hit.p)*offset):inverse()*p0c0 | |
937 | end | |
938 | end | |
939 | end) | |
940 | ||
941 | local particleemitter = Instance.new("ParticleEmitter") | |
942 | particleemitter.VelocitySpread = 360 | |
943 | particleemitter.Lifetime = NumberRange.new(1, 2) | |
944 | particleemitter.Speed = NumberRange.new(10) | |
945 | particleemitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.1), NumberSequenceKeypoint.new(1, 0.1)}) | |
946 | particleemitter.Acceleration = Vector3.new(0, -30, 0) | |
947 | particleemitter.RotSpeed = NumberRange.new(260) | |
948 | particleemitter.Texture = "http://www.roblox.com/asset/?id=274551257" | |
949 | ||
950 | local gf1 = Instance.new("Sound") | |
951 | gf1.SoundId="rbxassetid://224837148" | |
952 | gf1.PlayOnRemove=false | |
953 | gf1.Volume=0.7 | |
954 | gf1.Looped=false | |
955 | gf1.Pitch = 1 | |
956 | gf1.Parent=barrel | |
957 | local gf2 = Instance.new("Sound") | |
958 | gf2.SoundId="rbxassetid://240785604" | |
959 | gf2.PlayOnRemove=false | |
960 | gf2.Volume=0.7 | |
961 | gf2.Looped=false | |
962 | gf2.Pitch = 1 | |
963 | gf2.Parent=barrel | |
964 | ||
965 | local magin = Instance.new("Sound") | |
966 | magin.SoundId="http://www.roblox.com/asset/?id=131045429" | |
967 | magin.PlayOnRemove=false | |
968 | magin.Volume=0.7 | |
969 | magin.Looped=false | |
970 | magin.Pitch = 1 | |
971 | magin.Parent=ppsh.mag | |
972 | local magout = Instance.new("Sound") | |
973 | magout.SoundId="http://www.roblox.com/asset/?id=131045401" | |
974 | magout.PlayOnRemove=false | |
975 | magout.Volume=0.7 | |
976 | magout.Looped=false | |
977 | magout.Pitch = 1 | |
978 | magout.Parent=ppsh.mag | |
979 | ||
980 | function reload() | |
981 | coroutine.resume(coroutine.create(function() | |
982 | maxammo = 0 | |
983 | ammo = 0 | |
984 | canfire = false | |
985 | la.Weld.C0 = CFrame.new(.9,.8,-.1)*CFrame.Angles(math.rad(-5),0,-.4) | |
986 | wait(.05) | |
987 | la.Weld.C0 = CFrame.new(.9,.7,-.1)*CFrame.Angles(math.rad(-5),0,-.4) | |
988 | wait(.05) | |
989 | la.Weld.C0 = CFrame.new(.9,.6,-.1)*CFrame.Angles(math.rad(-5),0,-.4) | |
990 | wait(.05) | |
991 | la.Weld.C0 = CFrame.new(.9,.5,-.1)*CFrame.Angles(math.rad(-5),0,-.4) | |
992 | wait(.05) | |
993 | la.Weld.C0 = CFrame.new(.9,.4,-.1)*CFrame.Angles(math.rad(-5),0,-.4) | |
994 | wait(.05) | |
995 | la.Weld.C0 = CFrame.new(.9,.3,-.1)*CFrame.Angles(math.rad(-5),0,-.4) | |
996 | wait(.05) | |
997 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(-5),0,-.4) | |
998 | ||
999 | wait(.5) | |
1000 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(5),0,-.4) | |
1001 | wait(.05) | |
1002 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(10),0,-.4) | |
1003 | wait(.05) | |
1004 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(15),0,-.4) | |
1005 | magout:Play() | |
1006 | local magc = ppsh.mag:Clone() | |
1007 | ppsh.mag.Transparency = 1 | |
1008 | amount.Text = "["..ammo.."/"..maxammo.."]" | |
1009 | magc.Weld:Destroy() | |
1010 | magc.Parent = char | |
1011 | weld(magc, la, CFrame.new(-1,-.15,0)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(90))) | |
1012 | wait(.05) | |
1013 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(20),0,-.4) | |
1014 | wait(.05) | |
1015 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(25),0,-.4) | |
1016 | wait(.1) | |
1017 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(30),0,-.4) | |
1018 | magc.Weld:Destroy() | |
1019 | magc.Parent = workspace | |
1020 | magc.CanCollide = true | |
1021 | game.Debris:AddItem(magc,3) | |
1022 | wait(1) | |
1023 | local magc = ppsh.mag:Clone() | |
1024 | magc.Weld:Destroy() | |
1025 | magc.Transparency = 0 | |
1026 | magc.Parent = char | |
1027 | weld(magc, la, CFrame.new(0,-1,-.1)*CFrame.Angles(math.rad(-180),math.rad(0),math.rad(0))) | |
1028 | wait(.05) | |
1029 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(25),0,-.4) | |
1030 | wait(.05) | |
1031 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(20),0,-.4) | |
1032 | wait(.05) | |
1033 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(15),0,-.4) | |
1034 | wait(.05) | |
1035 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(10),0,-.4) | |
1036 | wait(.05) | |
1037 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(5),0,-.4) | |
1038 | wait(.05) | |
1039 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(-5),0,-.4) | |
1040 | wait(.05) | |
1041 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(-10),0,-.4) | |
1042 | wait(.05) | |
1043 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(-15),0,-.4) | |
1044 | wait(.05) | |
1045 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(-20),0,-.4) | |
1046 | magin:Play() | |
1047 | magc:Destroy() | |
1048 | ppsh.mag.Transparency = 0 | |
1049 | wait(.05) | |
1050 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(-25),0,-.4) | |
1051 | wait(.05) | |
1052 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(-20),0,-.4) | |
1053 | wait(.05) | |
1054 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(-15),0,-.4) | |
1055 | wait(.05) | |
1056 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(-10),0,-.4) | |
1057 | wait(.05) | |
1058 | la.Weld.C0 = CFrame.new(.9,.2,-.1)*CFrame.Angles(math.rad(-5),0,-.4) | |
1059 | wait(.05) | |
1060 | la.Weld.C0 = CFrame.new(.9,.3,-.1)*CFrame.Angles(math.rad(-5),0,-.4) | |
1061 | wait(.05) | |
1062 | la.Weld.C0 = CFrame.new(.9,.4,-.1)*CFrame.Angles(math.rad(-5),0,-.4) | |
1063 | wait(.05) | |
1064 | la.Weld.C0 = CFrame.new(.9,.5,-.1)*CFrame.Angles(math.rad(-5),0,-.4) | |
1065 | wait(.05) | |
1066 | la.Weld.C0 = CFrame.new(.9,.6,-.1)*CFrame.Angles(math.rad(-5),0,-.4) | |
1067 | wait(.05) | |
1068 | la.Weld.C0 = CFrame.new(.9,.7,-.1)*CFrame.Angles(math.rad(-5),0,-.4) | |
1069 | ||
1070 | ||
1071 | wait(.05) | |
1072 | la.Weld.C0 = CFrame.new(.9,.8,-.1)*CFrame.Angles(math.rad(-5),0,-.4) | |
1073 | canfire = true | |
1074 | maxammo = 213 | |
1075 | ammo = 213 | |
1076 | amount.Text = "["..ammo.."/"..maxammo.."]" | |
1077 | end)) | |
1078 | end | |
1079 | ||
1080 | function anim() | |
1081 | coroutine.resume(coroutine.create(function() | |
1082 | local p0c0 = tor:GetRenderCFrame()*weld1.C0 | |
1083 | offset = CFrame.new(0,-.1,-0.6)*CFrame.Angles(math.pi/2,0,0)*CFrame.Angles(math.rad(2),0,0) | |
1084 | weld1.C1 = (CFrame.new(p0c0.p, mouse.Hit.p)*offset):inverse()*p0c0 | |
1085 | wait() | |
1086 | offset = CFrame.new(0,-.1,-0.4)*CFrame.Angles(math.pi/2,0,0)*CFrame.Angles(math.rad(4),0,0) | |
1087 | weld1.C1 = (CFrame.new(p0c0.p, mouse.Hit.p)*offset):inverse()*p0c0 | |
1088 | wait() | |
1089 | offset = CFrame.new(0,-.1,-0.2)*CFrame.Angles(math.pi/2,0,0)*CFrame.Angles(math.rad(6),0,0) | |
1090 | weld1.C1 = (CFrame.new(p0c0.p, mouse.Hit.p)*offset):inverse()*p0c0 | |
1091 | wait() | |
1092 | offset = CFrame.new(0,-.1,-0.4)*CFrame.Angles(math.pi/2,0,0)*CFrame.Angles(math.rad(4),0,0) | |
1093 | weld1.C1 = (CFrame.new(p0c0.p, mouse.Hit.p)*offset):inverse()*p0c0 | |
1094 | wait() | |
1095 | offset = CFrame.new(0,-.1,-0.6)*CFrame.Angles(math.pi/2,0,0)*CFrame.Angles(math.rad(2),0,0) | |
1096 | weld1.C1 = (CFrame.new(p0c0.p, mouse.Hit.p)*offset):inverse()*p0c0 | |
1097 | wait() | |
1098 | offset = CFrame.new(0,-.1,-0.8)*CFrame.Angles(math.pi/2,0,0)*CFrame.Angles(math.rad(0),0,0) | |
1099 | weld1.C1 = (CFrame.new(p0c0.p, mouse.Hit.p)*offset):inverse()*p0c0 | |
1100 | end)) | |
1101 | end | |
1102 | ||
1103 | local newp = ppsh.newp | |
1104 | ||
1105 | function fire() | |
1106 | if ammo >=1 and canfire == true then | |
1107 | firing = true | |
1108 | --gf1.Pitch = math.random(1,1.5) | |
1109 | gf1:Play() | |
1110 | if aimed == false then | |
1111 | anim() | |
1112 | local cam_rot = camera.CoordinateFrame - camera.CoordinateFrame.p | |
1113 | local cam_scroll = (camera.CoordinateFrame.p - camera.Focus.p).magnitude | |
1114 | local ncf = CFrame.new(camera.Focus.p)*cam_rot*CFrame.fromEulerAnglesXYZ(0.0025+math.random()/100, math.random(-10,10)/1000, 0) | |
1115 | camera.CoordinateFrame = ncf*CFrame.new(0, 0, cam_scroll) | |
1116 | end | |
1117 | ||
1118 | ||
1119 | local missile = Instance.new("Part") | |
1120 | missile.CFrame = barrel.CFrame*CFrame.new(0,0,2) | |
1121 | missile.Material = Enum.Material.Metal | |
1122 | missile.Size = Vector3.new(0.2, 0.2, 0.2) | |
1123 | missile.CanCollide = false | |
1124 | ||
1125 | local bvelocity = Instance.new("BodyVelocity",missile) | |
1126 | bvelocity.maxForce = Vector3.new(math.huge,math.huge,math.huge) | |
1127 | bvelocity.velocity = mouse.Hit.lookVector*600 | |
1128 | --missile.Velocity = mouse.Hit.lookVector*1000 | |
1129 | ||
1130 | missile.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
1131 | missile.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
1132 | missile.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
1133 | missile.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
1134 | missile.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
1135 | missile.BrickColor = BrickColor.new("Black") | |
1136 | missile.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
1137 | missile.Name = "Bullet" | |
1138 | missile.Parent = workspace | |
1139 | game.Debris:AddItem(missile,4.2) | |
1140 | local bodyForce = Instance.new('BodyForce', missile) | |
1141 | bodyForce.Name = 'Antigravity' | |
1142 | bodyForce.force = Vector3.new(0, missile:GetMass() * 196.2, 0) | |
1143 | ammo = ammo - 1 | |
1144 | amount.Text = "["..ammo.."/"..maxammo.."]" | |
1145 | coroutine.resume(coroutine.create(function() | |
1146 | wait() | |
1147 | ppsh.MuzzleFlash.Transparency = 0.3 | |
1148 | ppsh.MuzzleFlash.PointLight.Enabled = true | |
1149 | wait() | |
1150 | ppsh.MuzzleFlash.Transparency = 1 | |
1151 | ppsh.MuzzleFlash.PointLight.Enabled = false | |
1152 | end)) | |
1153 | ||
1154 | if shellsenabled == true then | |
1155 | local shell = Instance.new("Part") | |
1156 | shell.CFrame = ppsh.Chamber.CFrame * CFrame.fromEulerAnglesXYZ(1.5,0,0) | |
1157 | shell.Size = Vector3.new(1,1,1) | |
1158 | shell.BrickColor = BrickColor.new(24) | |
1159 | - | maxammo = 71 |
1159 | + | |
1160 | - | ammo = 71 |
1160 | + | |
1161 | shell.Name = "Shell" | |
1162 | shell.Velocity = ppsh.Chamber.CFrame.lookVector * 20 + Vector3.new(math.random(-10,10),20,math.random(-10,10)) | |
1163 | shell.RotVelocity = Vector3.new(0,200,0) | |
1164 | shell.CanCollide = false | |
1165 | shell.Parent = workspace | |
1166 | coroutine.resume(coroutine.create(function() | |
1167 | wait(.1) | |
1168 | shell.CanCollide = true | |
1169 | while (shell) do wait() | |
1170 | shell.Transparency=shell.Transparency+.01 | |
1171 | end | |
1172 | end)) | |
1173 | game.Debris:AddItem(shell,3) | |
1174 | local shellmesh = Instance.new("SpecialMesh") | |
1175 | shellmesh.Scale = Vector3.new(.1,.25,.1) | |
1176 | shellmesh.Parent = shell | |
1177 | end | |
1178 | ||
1179 | if math.random(1,4)==1 then | |
1180 | local air = Instance.new("Sound") | |
1181 | air.SoundId="rbxassetid://341519743" | |
1182 | air.PlayOnRemove=false | |
1183 | air.Volume=0.7 | |
1184 | air.Looped=false | |
1185 | air.Pitch = 1 | |
1186 | air.Parent=missile | |
1187 | air:Play() | |
1188 | end | |
1189 | firing = false | |
1190 | missile.Touched:connect(function(h) | |
1191 | if (not h:isDescendantOf(ppsh)) and (not h:isDescendantOf(char)) then | |
1192 | missile:Destroy() | |
1193 | if not h.Name:lower():find("base") and h.Anchored == false then | |
1194 | h.Velocity = h.CFrame.lookVector*-10 | |
1195 | end | |
1196 | if h.Parent:FindFirstChild("Humanoid") then | |
1197 | coroutine.resume(coroutine.create(function() | |
1198 | hitm.Rotation = math.random(1, 360) | |
1199 | hitm.Visible = true | |
1200 | wait(.1) | |
1201 | hitm.Visible = false | |
1202 | end)) | |
1203 | local pclone = particleemitter:Clone() | |
1204 | pclone.Parent = h | |
1205 | game.Debris:AddItem(pclone,.5) | |
1206 | --missile:Destroy() | |
1207 | if h.Parent.Humanoid.Parent:FindFirstChild("ForceField") then h.Parent.ForceField:Destroy() end | |
1208 | if h.Parent.Humanoid.Health >1000 then h.Parent.Humanoid.MaxHealth = 500 h.Parent.Humanoid.Health = 500 end | |
1209 | missile:destroy() | |
1210 | local dmg = (math.random(50,80)) | |
1211 | if aimed == true then | |
1212 | dmg = (math.random(50,80)) | |
1213 | end | |
1214 | ||
1215 | local hitms = Instance.new("Sound") | |
1216 | hitms.SoundId="rbxassetid://131864673" | |
1217 | hitms.PlayOnRemove=false | |
1218 | hitms.Volume=0.7 | |
1219 | hitms.Looped=false | |
1220 | hitms.Pitch = 1 | |
1221 | hitms.Parent=player.PlayerGui | |
1222 | hitms:Play() | |
1223 | game.Debris:AddItem(hitms,1) | |
1224 | ||
1225 | if math.random(1,5)==1 then | |
1226 | local hitsound = Instance.new("Sound") | |
1227 | hitsound.SoundId="rbxassetid://144884872" | |
1228 | hitsound.PlayOnRemove=false | |
1229 | hitsound.Volume=0.7 | |
1230 | hitsound.Looped=false | |
1231 | hitsound.Pitch = 1 | |
1232 | hitsound.Parent=h | |
1233 | hitsound:Play() | |
1234 | game.Debris:AddItem(hitsound,1) | |
1235 | end | |
1236 | ||
1237 | --Ragdoll-- | |
1238 | local victim = h.Parent | |
1239 | if victim.Humanoid.Health <=0 then | |
1240 | print("died") | |
1241 | if victim.Head:FindFirstChild("ParticleEmitter") then victim.Head.ParticleEmitter:Destroy() end | |
1242 | victim.Archivable = true | |
1243 | local rg = victim:Clone() | |
1244 | rg.HumanoidRootPart:Destroy() | |
1245 | rg.Name = "" | |
1246 | rg.Humanoid.MaxHealth = 0 | |
1247 | for i, v in pairs(rg.Torso:GetChildren()) do | |
1248 | if v:IsA("Motor6D") then | |
1249 | v:Destroy() | |
1250 | end | |
1251 | end | |
1252 | ||
1253 | local n = Instance.new("Glue", rg.Torso) | |
1254 | n.Name = "Neck" | |
1255 | n.Part0 = rg.Torso | |
1256 | n.Part1 = rg.Head | |
1257 | n.C0 = CFrame.new(0, 1, 0) | |
1258 | n.C1 = CFrame.new(0, -0.5, 0) | |
1259 | ||
1260 | local rs = Instance.new("Glue", rg.Torso) | |
1261 | rs.Name = "Right Shoulder" | |
1262 | rs.Part0 = rg.Torso | |
1263 | rs.Part1 = rg["Right Arm"] | |
1264 | rs.C0 = CFrame.new(1.5, 0.5, 0) | |
1265 | rs.C1 = CFrame.new(0, 0.5, 0) | |
1266 | local ls = Instance.new("Glue", rg.Torso) | |
1267 | ls.Name = "Left Shoulder" | |
1268 | ls.Part0 = rg.Torso | |
1269 | ls.Part1 = rg["Left Arm"] | |
1270 | ls.C0 = CFrame.new(-1.5, 0.5, 0) | |
1271 | ls.C1 = CFrame.new(0, 0.5, 0) | |
1272 | ||
1273 | local rh = Instance.new("Glue", rg.Torso) | |
1274 | rh.Name = "Right Hip" | |
1275 | rh.Part0 = rg.Torso | |
1276 | rh.Part1 = rg["Right Leg"] | |
1277 | rh.C0 = CFrame.new(0.5, -1, 0) | |
1278 | rh.C1 = CFrame.new(0, 1, 0) | |
1279 | local lh = Instance.new("Glue", rg.Torso) | |
1280 | lh.Name = "Left Hip" | |
1281 | lh.Part0 = rg.Torso | |
1282 | lh.Part1 = rg["Left Leg"] | |
1283 | lh.C0 = CFrame.new(-0.5, -1, 0) | |
1284 | lh.C1 = CFrame.new(0, 1, 0) | |
1285 | victim.Torso:Destroy() | |
1286 | victim.Head:Destroy() | |
1287 | victim["Left Leg"]:Destroy() | |
1288 | victim["Left Arm"]:Destroy() | |
1289 | victim["Right Leg"]:Destroy() | |
1290 | victim["Right Arm"]:Destroy() | |
1291 | rg.Parent = game.Workspace | |
1292 | rg.Head.BrickColor = BrickColor.new("Maroon") | |
1293 | end | |
1294 | --Ragdoll End-- | |
1295 | - | local dmg = (math.random(5,15)) |
1295 | + | |
1296 | local textt = dmg | |
1297 | - | dmg = (math.random(1,10)) |
1297 | + | |
1298 | if h.Name == "Head" then h.Parent.Humanoid:TakeDamage(dmg) end | |
1299 | local guiMain = Instance.new("BillboardGui",h.Parent.Head) | |
1300 | guiMain.AlwaysOnTop = true | |
1301 | guiMain.Size = UDim2.new(5,5,5) | |
1302 | guiMain.Name = "guiMain" | |
1303 | local bar3 = Instance.new("TextLabel") | |
1304 | bar3.Position = UDim2.new(0, 50, 0, 0) | |
1305 | bar3.Size = UDim2.new(0, 100, 0, 100) | |
1306 | bar3.Parent = guiMain; | |
1307 | bar3.BackgroundColor3 = Color3.new(255/255,255/255,255/255) | |
1308 | bar3.BorderColor3 = Color3.new(27/255,42/255,53/255) | |
1309 | bar3.BackgroundTransparency = 1 | |
1310 | bar3.BorderSizePixel = 1 | |
1311 | bar3.Text = textt | |
1312 | bar3.TextColor3 = Color3.new(255/255,0/255,0/255) | |
1313 | bar3.TextStrokeColor3 = Color3.new(0/255,0/255,0/255) | |
1314 | bar3.TextStrokeTransparency = 1 | |
1315 | bar3.Font = "SourceSans" | |
1316 | bar3.FontSize = Enum.FontSize.Size24 | |
1317 | coroutine.resume(coroutine.create(function() | |
1318 | wait(.2) guiMain:Destroy() | |
1319 | end)) | |
1320 | end | |
1321 | end | |
1322 | end) | |
1323 | end | |
1324 | if ammo <=0 and canfire == true then | |
1325 | gf2:Play() | |
1326 | end | |
1327 | end | |
1328 | ||
1329 | local mousedown = false | |
1330 | mouse.Button1Down:connect(function() | |
1331 | mousedown = true | |
1332 | while mousedown == true do wait(.1) | |
1333 | fire() | |
1334 | end | |
1335 | end) | |
1336 | mouse.Button1Up:connect(function() | |
1337 | mousedown = false | |
1338 | end) | |
1339 | ||
1340 | ||
1341 | mouse.KeyDown:connect(function(key) | |
1342 | if key == "r" then | |
1343 | if canfire == true then | |
1344 | reload() | |
1345 | end | |
1346 | end | |
1347 | end) | |
1348 | ||
1349 | local swingsound = Instance.new("Sound") | |
1350 | swingsound.SoundId="rbxassetid://181894961" | |
1351 | swingsound.PlayOnRemove=false | |
1352 | swingsound.Volume=0.7 | |
1353 | swingsound.Looped=false | |
1354 | swingsound.Pitch = 1 | |
1355 | swingsound.Parent=ppsh.Stock | |
1356 | --game.Debris:AddItem(swingsound,1) | |
1357 | ||
1358 | local handleweld = ppsh.Handle.Weld | |
1359 | local swinging = false | |
1360 | function melee() | |
1361 | canmovemouse = false | |
1362 | ppsh.Stock.CanCollide = true | |
1363 | swinging = true | |
1364 | swingsound:Play() | |
1365 | weld1.C1 = CFrame.new(-.6,.8,0)*CFrame.Angles(math.rad(-90),0,0) | |
1366 | wait() | |
1367 | handleweld.C0 = CFrame.new(0,-.5,.9)*CFrame.Angles(math.rad(90),0,(math.rad(20))) | |
1368 | weld1.C1 = CFrame.new(-.6,1,0)*CFrame.Angles(math.rad(-90),(math.rad(-10)),0) | |
1369 | wait() | |
1370 | handleweld.C0 = CFrame.new(0,-.5,.9)*CFrame.Angles(math.rad(90),0,(math.rad(40))) | |
1371 | weld1.C1 = CFrame.new(-.6,1.2,0)*CFrame.Angles(math.rad(-90),(math.rad(-20)),0) | |
1372 | wait() | |
1373 | handleweld.C0 = CFrame.new(0,-.5,.9)*CFrame.Angles(math.rad(90),0,(math.rad(60))) | |
1374 | weld1.C1 = CFrame.new(-.6,1.4,0)*CFrame.Angles(math.rad(-90),(math.rad(-30)),0) | |
1375 | wait() | |
1376 | handleweld.C0 = CFrame.new(-1,-.5,.9)*CFrame.Angles(math.rad(90),0,(math.rad(80))) | |
1377 | weld1.C1 = CFrame.new(-.6,1.4,0)*CFrame.Angles(math.rad(-90),(math.rad(-40)),0) | |
1378 | wait() | |
1379 | handleweld.C0 = CFrame.new(-1,-.5,.9)*CFrame.Angles(math.rad(90),0,(math.rad(100))) | |
1380 | wait() | |
1381 | handleweld.C0 = CFrame.new(-1,-.5,.9)*CFrame.Angles(math.rad(90),0,(math.rad(100))) | |
1382 | --Return-- | |
1383 | wait() | |
1384 | ppsh.Stock.CanCollide = false | |
1385 | swinging = false | |
1386 | handleweld.C0 = CFrame.new(-1,-.5,.9)*CFrame.Angles(math.rad(90),0,(math.rad(100))) | |
1387 | wait() | |
1388 | handleweld.C0 = CFrame.new(-1,-.5,.9)*CFrame.Angles(math.rad(90),0,(math.rad(80))) | |
1389 | weld1.C1 = CFrame.new(-.6,1.4,0)*CFrame.Angles(math.rad(-90),(math.rad(-40)),0) | |
1390 | wait() | |
1391 | handleweld.C0 = CFrame.new(0,-.5,.9)*CFrame.Angles(math.rad(90),0,(math.rad(60))) | |
1392 | weld1.C1 = CFrame.new(-.6,1.4,0)*CFrame.Angles(math.rad(-90),(math.rad(-30)),0) | |
1393 | wait() | |
1394 | handleweld.C0 = CFrame.new(0,-.5,.9)*CFrame.Angles(math.rad(90),0,(math.rad(40))) | |
1395 | weld1.C1 = CFrame.new(-.6,1.2,0)*CFrame.Angles(math.rad(-90),(math.rad(-20)),0) | |
1396 | wait() | |
1397 | handleweld.C0 = CFrame.new(0,-.5,.9)*CFrame.Angles(math.rad(90),0,(math.rad(20))) | |
1398 | weld1.C1 = CFrame.new(-.6,1,0)*CFrame.Angles(math.rad(-90),(math.rad(-10)),0) | |
1399 | wait() | |
1400 | handleweld.C0 = CFrame.new(0,-.5,.9)*CFrame.Angles(math.rad(90),0,0) | |
1401 | weld1.C1 = CFrame.new(-.6,.8,0)*CFrame.Angles(math.rad(-90),0,0) | |
1402 | wait() | |
1403 | canmovemouse = true | |
1404 | end | |
1405 | ||
1406 | local debounce = false | |
1407 | ppsh.Stock.Touched:connect(function(h) | |
1408 | if swinging == true then | |
1409 | if h.Parent:FindFirstChild("Humanoid") then | |
1410 | if debounce == false then | |
1411 | debounce = true | |
1412 | local pclone = particleemitter:Clone() | |
1413 | pclone.Parent = h | |
1414 | game.Debris:AddItem(pclone,.5) | |
1415 | if h.Parent.Humanoid.Parent:FindFirstChild("ForceField") then h.Parent.ForceField:Destroy() end | |
1416 | if h.Parent.Humanoid.Health >1000 then h.Parent.Humanoid.MaxHealth = 500 h.Parent.Humanoid.Health = 500 end | |
1417 | local dmg = (math.random(10,25)) | |
1418 | local textt = dmg | |
1419 | h.Parent.Humanoid:TakeDamage(dmg) | |
1420 | ||
1421 | local hitsound = Instance.new("Sound") | |
1422 | hitsound.SoundId="rbxassetid://545219984" | |
1423 | hitsound.PlayOnRemove=false | |
1424 | hitsound.Volume=0.7 | |
1425 | hitsound.Looped=false | |
1426 | hitsound.Pitch = 1 | |
1427 | hitsound.Parent=h | |
1428 | hitsound:Play() | |
1429 | game.Debris:AddItem(hitsound,1) | |
1430 | ||
1431 | if h.Parent:FindFirstChild("Torso") then h.Parent.Torso.Velocity = char.Head.CFrame.lookVector*15 end | |
1432 | ||
1433 | --Ragdoll-- | |
1434 | local victim = h.Parent | |
1435 | if victim.Humanoid.Health <=0 then | |
1436 | print("died") | |
1437 | if victim.Head:FindFirstChild("ParticleEmitter") then victim.Head.ParticleEmitter:Destroy() end | |
1438 | victim.Archivable = true | |
1439 | local rg = victim:Clone() | |
1440 | rg.HumanoidRootPart:Destroy() | |
1441 | rg.Name = "" | |
1442 | rg.Humanoid.MaxHealth = 0 | |
1443 | for i, v in pairs(rg.Torso:GetChildren()) do | |
1444 | if v:IsA("Motor6D") then | |
1445 | v:Destroy() | |
1446 | end | |
1447 | end | |
1448 | ||
1449 | local n = Instance.new("Glue", rg.Torso) | |
1450 | n.Name = "Neck" | |
1451 | n.Part0 = rg.Torso | |
1452 | n.Part1 = rg.Head | |
1453 | n.C0 = CFrame.new(0, 1, 0) | |
1454 | n.C1 = CFrame.new(0, -0.5, 0) | |
1455 | ||
1456 | local rs = Instance.new("Glue", rg.Torso) | |
1457 | rs.Name = "Right Shoulder" | |
1458 | rs.Part0 = rg.Torso | |
1459 | rs.Part1 = rg["Right Arm"] | |
1460 | rs.C0 = CFrame.new(1.5, 0.5, 0) | |
1461 | rs.C1 = CFrame.new(0, 0.5, 0) | |
1462 | local ls = Instance.new("Glue", rg.Torso) | |
1463 | ls.Name = "Left Shoulder" | |
1464 | ls.Part0 = rg.Torso | |
1465 | ls.Part1 = rg["Left Arm"] | |
1466 | ls.C0 = CFrame.new(-1.5, 0.5, 0) | |
1467 | ls.C1 = CFrame.new(0, 0.5, 0) | |
1468 | ||
1469 | local rh = Instance.new("Glue", rg.Torso) | |
1470 | rh.Name = "Right Hip" | |
1471 | rh.Part0 = rg.Torso | |
1472 | rh.Part1 = rg["Right Leg"] | |
1473 | rh.C0 = CFrame.new(0.5, -1, 0) | |
1474 | rh.C1 = CFrame.new(0, 1, 0) | |
1475 | local lh = Instance.new("Glue", rg.Torso) | |
1476 | lh.Name = "Left Hip" | |
1477 | lh.Part0 = rg.Torso | |
1478 | lh.Part1 = rg["Left Leg"] | |
1479 | lh.C0 = CFrame.new(-0.5, -1, 0) | |
1480 | lh.C1 = CFrame.new(0, 1, 0) | |
1481 | victim.Torso:Destroy() | |
1482 | victim.Head:Destroy() | |
1483 | victim["Left Leg"]:Destroy() | |
1484 | victim["Left Arm"]:Destroy() | |
1485 | victim["Right Leg"]:Destroy() | |
1486 | victim["Right Arm"]:Destroy() | |
1487 | rg.Parent = game.Workspace | |
1488 | rg.Head.BrickColor = BrickColor.new("Maroon") | |
1489 | end | |
1490 | --Ragdoll End-- | |
1491 | ||
1492 | local guiMain = Instance.new("BillboardGui",h.Parent.Head) | |
1493 | guiMain.AlwaysOnTop = true | |
1494 | guiMain.Size = UDim2.new(5,5,5) | |
1495 | guiMain.Name = "guiMain" | |
1496 | local bar3 = Instance.new("TextLabel") | |
1497 | bar3.Position = UDim2.new(0, 50, 0, 0) | |
1498 | bar3.Size = UDim2.new(0, 100, 0, 100) | |
1499 | bar3.Parent = guiMain; | |
1500 | bar3.BackgroundColor3 = Color3.new(255/255,255/255,255/255) | |
1501 | bar3.BorderColor3 = Color3.new(27/255,42/255,53/255) | |
1502 | bar3.BackgroundTransparency = 1 | |
1503 | bar3.BorderSizePixel = 1 | |
1504 | bar3.Text = textt | |
1505 | bar3.TextColor3 = Color3.new(255/255,0/255,0/255) | |
1506 | bar3.TextStrokeColor3 = Color3.new(0/255,0/255,0/255) | |
1507 | bar3.TextStrokeTransparency = 1 | |
1508 | bar3.Font = "SourceSans" | |
1509 | bar3.FontSize = Enum.FontSize.Size24 | |
1510 | coroutine.resume(coroutine.create(function() | |
1511 | wait(.2) guiMain:Destroy() | |
1512 | end)) | |
1513 | end | |
1514 | wait(.1) debounce = false | |
1515 | end | |
1516 | end | |
1517 | end) | |
1518 | ||
1519 | local eased = 1 | |
1520 | function easeanim() | |
1521 | canmovemouse = false | |
1522 | canfire = false | |
1523 | local p0c0 = tor:GetRenderCFrame()*weld1.C0 | |
1524 | weld1.C1 = CFrame.new(-.6,.8,0)*CFrame.Angles(math.rad(-90),0,0) | |
1525 | wait(.1) | |
1526 | weld1.C1 = CFrame.new(-.6,.8,0)*CFrame.Angles(math.rad(-80),0,0) | |
1527 | wait(.1) | |
1528 | weld1.C1 = CFrame.new(-.6,.8,0)*CFrame.Angles(math.rad(-70),0,0) | |
1529 | wait(.1) | |
1530 | weld1.C1 = CFrame.new(-.6,.8,0)*CFrame.Angles(math.rad(-60),0,0) | |
1531 | wait(.2) | |
1532 | weld1.C1 = CFrame.new(-.6,.8,0)*CFrame.Angles(math.rad(-60),(math.rad(-20)),0) | |
1533 | wait(.1) | |
1534 | weld1.C1 = CFrame.new(-.6,.8,0)*CFrame.Angles(math.rad(-60),(math.rad(-40)),0) | |
1535 | char.Humanoid.WalkSpeed = 16 | |
1536 | mouse.Icon = "" | |
1537 | end | |
1538 | function uneaseanim() | |
1539 | weld1.C1 = CFrame.new(-.6,.8,0)*CFrame.Angles(math.rad(-60),(math.rad(-20)),0) | |
1540 | wait(.1) | |
1541 | weld1.C1 = CFrame.new(-.6,.8,0)*CFrame.Angles(math.rad(-60),0,0) | |
1542 | wait(.1) | |
1543 | weld1.C1 = CFrame.new(-.6,.8,0)*CFrame.Angles(math.rad(-70),0,0) | |
1544 | wait(.1) | |
1545 | weld1.C1 = CFrame.new(-.6,.8,0)*CFrame.Angles(math.rad(-80),0,0) | |
1546 | wait(.1) | |
1547 | weld1.C1 = CFrame.new(-.6,.8,0)*CFrame.Angles(math.rad(-90),0,0) | |
1548 | wait(.1) | |
1549 | weld1.C1 = CFrame.new(.6,.1,0)*CFrame.Angles(math.rad(0),0,0) | |
1550 | ||
1551 | canfire = true | |
1552 | canmovemouse = true | |
1553 | local p0c0 = tor:GetRenderCFrame()*weld1.C0 | |
1554 | offset = CFrame.new(0,-.1,-0.8)*CFrame.Angles(math.pi/2,0,0) | |
1555 | weld1.C1 = (CFrame.new(p0c0.p, mouse.Hit.p)*offset):inverse()*p0c0 | |
1556 | char.Humanoid.WalkSpeed = 16 | |
1557 | mouse.Icon = "http://www.roblox.com/asset/?id=316279304" | |
1558 | end | |
1559 | mouse.KeyDown:connect(function(key) | |
1560 | if key == "e" then | |
1561 | eased = eased + 1 | |
1562 | if eased == 1 then | |
1563 | easeanim() | |
1564 | end | |
1565 | if eased == 2 then | |
1566 | eased = 0 | |
1567 | uneaseanim() | |
1568 | end | |
1569 | end | |
1570 | end) | |
1571 | ||
1572 | mouse.KeyDown:connect(function(key) | |
1573 | if key == "q" and swinging == false and eased == 0 and aimed == false and firing == false then | |
1574 | melee() | |
1575 | end | |
1576 | end) | |
1577 | ||
1578 | mouse.KeyDown:connect(function(key) | |
1579 | if key == "p" then | |
1580 | ||
1581 | local ppshc = ppsh:Clone() | |
1582 | ppshc.Handle:Destroy() | |
1583 | ppshc.Parent = workspace | |
1584 | ppshc.Name = "PPSHClone" | |
1585 | ppshc.Part.CFrame = char.Head.CFrame*CFrame.new(0,0,-4) | |
1586 | ||
1587 | local prev | |
1588 | local parts = ppshc:GetChildren() | |
1589 | ||
1590 | for i = 1,#parts do | |
1591 | if (parts[i].className == "Part") or (parts[i].className == "WedgePart") or (parts[i].className == "Seat") or (parts[i].className == "VehicleSeat") or (parts[i].className == "CornerWedgePart") then | |
1592 | if (prev ~= nil)then | |
1593 | parts[i].CanCollide = true | |
1594 | end | |
1595 | prev = parts[i] | |
1596 | end | |
1597 | end | |
1598 | ||
1599 | ppshc.Part.Touched:connect(function(h) | |
1600 | if h.Parent:FindFirstChild("Humanoid") then | |
1601 | ppshc:Destroy() | |
1602 | local scriptclone = script:Clone() | |
1603 | scriptclone.Parent = h.Parent | |
1604 | ||
1605 | end | |
1606 | end) | |
1607 | ||
1608 | end | |
1609 | end) | |
1610 | ||
1611 | mouse.KeyDown:connect(function(k) | |
1612 | if k:byte() == 48 and eased == 1 then | |
1613 | char.Humanoid.WalkSpeed = 30 | |
1614 | for i = 1,5 do | |
1615 | game.Workspace.CurrentCamera.FieldOfView = (70+(i*2)) | |
1616 | wait() | |
1617 | end | |
1618 | end | |
1619 | end) | |
1620 | mouse.KeyUp:connect(function(k) | |
1621 | if k:byte() == 48 and char.Humanoid.WalkSpeed == 30 then | |
1622 | char.Humanoid.WalkSpeed = 16 | |
1623 | for i = 1,5 do | |
1624 | game.Workspace.CurrentCamera.FieldOfView = (80-(i*2)) | |
1625 | wait() | |
1626 | end | |
1627 | end | |
1628 | end) | |
1629 | ||
1630 | local UserInputService = game:GetService("UserInputService") | |
1631 | local camera = game.Workspace.CurrentCamera | |
1632 | weld(char.Head, tor, CFrame.new(0,-1.5,0)*CFrame.Angles(math.rad(0),0,0)) | |
1633 | local headweld = char.Head.Weld | |
1634 | local aiming = false | |
1635 | function aim() | |
1636 | coroutine.resume(coroutine.create(function() | |
1637 | aiming = true | |
1638 | aimed = true | |
1639 | canmovemouse = false | |
1640 | camera.FieldOfView = 50 | |
1641 | UserInputService.MouseIconEnabled = false | |
1642 | weld1.C1 = CFrame.new(-.6,.8,0)*CFrame.Angles(math.rad(-90),0,0) | |
1643 | wait(.1) | |
1644 | weld1.C1 = CFrame.new(-.4,.8,0)*CFrame.Angles(math.rad(-90),0,0) | |
1645 | wait(.1) | |
1646 | weld1.C1 = CFrame.new(0,.8,0)*CFrame.Angles(math.rad(-90),0,0) | |
1647 | wait(.1) | |
1648 | weld1.C1 = CFrame.new(.2,.8,0)*CFrame.Angles(math.rad(-90),0,0) | |
1649 | wait(.1) | |
1650 | weld1.C1 = CFrame.new(.2,.8,.1)*CFrame.Angles(math.rad(-90),0,0) | |
1651 | wait(.1) | |
1652 | weld1.C1 = CFrame.new(.2,.8,.2)*CFrame.Angles(math.rad(-90),0,0) | |
1653 | wait(.1) | |
1654 | weld1.C1 = CFrame.new(.2,.8,.3)*CFrame.Angles(math.rad(-90),0,0) | |
1655 | wait(.1) | |
1656 | weld1.C1 = CFrame.new(.2,.8,.4)*CFrame.Angles(math.rad(-90),0,0) | |
1657 | headweld.C0 = CFrame.new(0,-1.5,0)*CFrame.Angles(math.rad(0),0,.05) | |
1658 | wait(.1) | |
1659 | headweld.C0 = CFrame.new(0,-1.5,0)*CFrame.Angles(math.rad(0),0,.10) | |
1660 | wait(.1) | |
1661 | headweld.C0 = CFrame.new(0,-1.5,0)*CFrame.Angles(math.rad(0),0,.15) | |
1662 | char.Humanoid.WalkSpeed = 0 | |
1663 | aiming = false | |
1664 | end)) | |
1665 | end | |
1666 | function unaim() | |
1667 | coroutine.resume(coroutine.create(function() | |
1668 | headweld.C0 = CFrame.new(0,-1.5,0)*CFrame.Angles(math.rad(0),0,.10) | |
1669 | wait(.1) | |
1670 | headweld.C0 = CFrame.new(0,-1.5,0)*CFrame.Angles(math.rad(0),0,.05) | |
1671 | wait(.1) | |
1672 | headweld.C0 = CFrame.new(0,-1.5,0)*CFrame.Angles(math.rad(0),0,0) | |
1673 | wait(.1) | |
1674 | weld1.C1 = CFrame.new(.2,.8,.3)*CFrame.Angles(math.rad(-90),0,0) | |
1675 | wait(.1) | |
1676 | weld1.C1 = CFrame.new(.2,.8,.2)*CFrame.Angles(math.rad(-90),0,0) | |
1677 | wait(.1) | |
1678 | weld1.C1 = CFrame.new(.2,.8,.1)*CFrame.Angles(math.rad(-90),0,0) | |
1679 | wait(.1) | |
1680 | weld1.C1 = CFrame.new(.2,.8,0)*CFrame.Angles(math.rad(-90),0,0) | |
1681 | wait(.1) | |
1682 | weld1.C1 = CFrame.new(0,.8,0)*CFrame.Angles(math.rad(-90),0,0) | |
1683 | wait(.1) | |
1684 | weld1.C1 = CFrame.new(-.4,.8,0)*CFrame.Angles(math.rad(-90),0,0) | |
1685 | wait(.1) | |
1686 | weld1.C1 = CFrame.new(-.6,.8,0)*CFrame.Angles(math.rad(-90),0,0) | |
1687 | aimed = false | |
1688 | canmovemouse = true | |
1689 | camera.FieldOfView = 70 | |
1690 | UserInputService.MouseIconEnabled = true | |
1691 | char.Humanoid.WalkSpeed = 16 | |
1692 | end)) | |
1693 | end | |
1694 | mouse.Button2Down:connect(function() | |
1695 | if eased == 0 and aimed == false and aiming == false and swinging == false then | |
1696 | aim() | |
1697 | end | |
1698 | end) | |
1699 | mouse.Button2Up:connect(function() | |
1700 | if aimed == true and aiming == false then | |
1701 | unaim() | |
1702 | end | |
1703 | end) | |
1704 | ||
1705 | ||
1706 | local crouched = 0 | |
1707 | local proned = 0 | |
1708 | ||
1709 | function crouch() | |
1710 | local newl = char["Left Leg"]:Clone() | |
1711 | newl.Parent = char | |
1712 | weld(newl, char.Torso, CFrame.new(-0.5, 0.75, 1)) | |
1713 | newl.CanCollide = false | |
1714 | local newr = char["Right Leg"]:Clone() | |
1715 | newr.Parent = char | |
1716 | weld(newr, char.Torso, CFrame.new(0.5,0.495,1.25) * CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)) | |
1717 | newr.CanCollide = false | |
1718 | local collider = Instance.new("Part",char) | |
1719 | collider.Transparency = 1 | |
1720 | collider.CanCollide = true | |
1721 | collider.Size = Vector3.new(2, 0.2, 3) | |
1722 | collider.Name = "Collider" | |
1723 | collider:BreakJoints() | |
1724 | weld(collider, newl, CFrame.new(0,.968,0)) | |
1725 | char["Left Leg"].Transparency = 1 | |
1726 | char["Right Leg"].Transparency = 1 | |
1727 | char.Torso["Left Hip"].Parent = char.Head | |
1728 | char.Torso["Right Hip"].Parent = char.Head | |
1729 | char["Left Leg"].Parent = char.Head | |
1730 | char["Right Leg"].Parent = char.Head | |
1731 | end | |
1732 | function uncrouch() | |
1733 | char.Collider:Destroy() | |
1734 | char["Left Leg"]:Destroy() | |
1735 | char["Right Leg"]:Destroy() | |
1736 | char.Head["Left Hip"].Parent = char.Torso | |
1737 | char.Head["Right Hip"].Parent = char.Torso | |
1738 | char.Head["Left Leg"].Parent = char | |
1739 | char.Head["Right Leg"].Parent = char | |
1740 | char["Left Leg"].Transparency = 0 | |
1741 | char["Right Leg"].Transparency = 0 | |
1742 | end | |
1743 | ||
1744 | function prone() | |
1745 | local newl = char["Left Leg"]:Clone() | |
1746 | newl.Parent = char | |
1747 | weld(newl, char.Torso, CFrame.new(0.4, 1.25, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(90),0.25,0)) | |
1748 | newl.CanCollide = false | |
1749 | local newr = char["Right Leg"]:Clone() | |
1750 | newr.Parent = char | |
1751 | weld(newr, char.Torso, CFrame.new(-0.4, 1.25, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(90),-0.25,0)) | |
1752 | newr.CanCollide = false | |
1753 | char["Left Leg"].Transparency = 1 | |
1754 | char["Right Leg"].Transparency = 1 | |
1755 | char.Torso["Left Hip"].Parent = char.Head | |
1756 | char.Torso["Right Hip"].Parent = char.Head | |
1757 | char["Left Leg"].Parent = char.Head | |
1758 | char["Right Leg"].Parent = char.Head | |
1759 | end | |
1760 | function unprone() | |
1761 | char["Left Leg"]:Destroy() | |
1762 | char["Right Leg"]:Destroy() | |
1763 | char.Head["Left Hip"].Parent = char.Torso | |
1764 | char.Head["Right Hip"].Parent = char.Torso | |
1765 | char.Head["Left Leg"].Parent = char | |
1766 | char.Head["Right Leg"].Parent = char | |
1767 | char["Left Leg"].Transparency = 0 | |
1768 | char["Right Leg"].Transparency = 0 | |
1769 | end | |
1770 | ||
1771 | mouse.KeyDown:connect(function(key) | |
1772 | if key == "c" and proned == 0 then | |
1773 | crouched = crouched + 1 | |
1774 | if crouched == 1 then | |
1775 | crouch() | |
1776 | end | |
1777 | if crouched == 2 then | |
1778 | uncrouch() | |
1779 | crouched = 0 | |
1780 | end | |
1781 | end | |
1782 | end) | |
1783 | mouse.KeyDown:connect(function(key) | |
1784 | if key == "x" and crouched == 0 then | |
1785 | proned = proned + 1 | |
1786 | if proned == 1 then | |
1787 | prone() | |
1788 | end | |
1789 | if proned == 2 then | |
1790 | unprone() | |
1791 | proned = 0 | |
1792 | end | |
1793 | end | |
1794 | end) | |
1795 | ||
1796 | --Equipped Stance-- | |
1797 | canmovemouse = false | |
1798 | canfire = false | |
1799 | weld1.C1 = CFrame.new(-.6,.8,0)*CFrame.Angles(math.rad(-60),(math.rad(-40)),0) | |
1800 | --Equipped Stance End-- | |
1801 | ||
1802 | bin.Deselected:connect(function() | |
1803 | local ppshc = ppsh:Clone() | |
1804 | if ppshc:FindFirstChild("Handle") then ppshc.Handle.Weld:Destroy() end | |
1805 | if ppshc:FindFirstChild("Handle") then ppshc.Handle.Weld2:Destroy() end | |
1806 | if ppshc:FindFirstChild("Handle") then ppshc.Handle.CanCollide = true end | |
1807 | ppshc.Parent = char | |
1808 | ppshc.Name = "PPSHClone" | |
1809 | ||
1810 | local prev | |
1811 | local parts = ppshc:GetChildren() | |
1812 | ||
1813 | for i = 1,#parts do | |
1814 | if (parts[i].className == "Part") or (parts[i].className == "WedgePart") or (parts[i].className == "Seat") or (parts[i].className == "VehicleSeat") or (parts[i].className == "CornerWedgePart") then | |
1815 | if (prev ~= nil)then | |
1816 | if parts[i]:FindFirstChild("Weld") then parts[i]:FindFirstChild("Weld"):Destroy() end | |
1817 | local weld = Instance.new("Weld") | |
1818 | weld.Part0 = prev | |
1819 | weld.Part1 = parts[i] | |
1820 | weld.C0 = prev.CFrame:inverse() | |
1821 | weld.C1 = parts[i].CFrame:inverse() | |
1822 | weld.Parent = prev | |
1823 | parts[i].CanCollide = false | |
1824 | end | |
1825 | prev = parts[i] | |
1826 | end | |
1827 | end | |
1828 | ||
1829 | weld(ppshc.Handle, tor, CFrame.new(.5,0,0)*CFrame.Angles(math.rad(-120),(math.rad(-90)),0)) | |
1830 | ||
1831 | ppsh:Destroy() | |
1832 | tool:Destroy() | |
1833 | newl:Destroy() | |
1834 | newr:Destroy() | |
1835 | local reloading = false | |
1836 | local canfire = false | |
1837 | local canmovemouse = false | |
1838 | gungui:Destroy() | |
1839 | if la:FindFirstChild("Weld") then la.Weld:Destroy() end | |
1840 | tor["Left Shoulder"].Part1 = la | |
1841 | if ra:FindFirstChild("Weld") then ra.Weld:Destroy() end | |
1842 | tor["Right Shoulder"].Part1 = ra | |
1843 | if char.Torso:FindFirstChild("Weld") then char.Torso.Weld:Destroy() end | |
1844 | end) | |
1845 | end) | |
1846 | end) ---Made by When_Kun |