SHOW:
|
|
- or go back to the newest paste.
1 | -- This script has been converted to FE by iPxter | |
2 | ||
3 | ||
4 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
5 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
6 | do | |
7 | print("FE Compatibility code by Mokiros | Translated to FE by iPxter") | |
8 | script.Parent = Player.Character | |
9 | ||
10 | --RemoteEvent for communicating | |
11 | local Event = Instance.new("RemoteEvent") | |
12 | Event.Name = "UserInput_Event" | |
13 | ||
14 | --Fake event to make stuff like Mouse.KeyDown work | |
15 | local function fakeEvent() | |
16 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} | |
17 | t.connect = t.Connect | |
18 | return t | |
19 | end | |
20 | ||
21 | --Creating fake input objects with fake variables | |
22 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
23 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
24 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
25 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
26 | end} | |
27 | --Merged 2 functions into one by checking amount of arguments | |
28 | CAS.UnbindAction = CAS.BindAction | |
29 | ||
30 | --This function will trigger the events that have been :Connect()'ed | |
31 | local function te(self,ev,...) | |
32 | local t = m[ev] | |
33 | if t and t._fakeEvent and t.Function then | |
34 | t.Function(...) | |
35 | end | |
36 | end | |
37 | m.TrigEvent = te | |
38 | UIS.TrigEvent = te | |
39 | ||
40 | Event.OnServerEvent:Connect(function(plr,io) | |
41 | if plr~=Player then return end | |
42 | if io.isMouse then | |
43 | m.Target = io.Target | |
44 | m.Hit = io.Hit | |
45 | else | |
46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
49 | end | |
50 | for _,t in pairs(CAS.Actions) do | |
51 | for _,k in pairs(t.Keys) do | |
52 | if k==io.KeyCode then | |
53 | t.Function(t.Name,io.UserInputState,io) | |
54 | end | |
55 | end | |
56 | end | |
57 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
58 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
59 | end | |
60 | end) | |
61 | Event.Parent = NLS([==[ | |
62 | local Player = game:GetService("Players").LocalPlayer | |
63 | local Event = script:WaitForChild("UserInput_Event") | |
64 | ||
65 | local UIS = game:GetService("UserInputService") | |
66 | local input = function(io,a) | |
67 | if a then return end | |
68 | --Since InputObject is a client-side instance, we create and pass table instead | |
69 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}) | |
70 | end | |
71 | UIS.InputBegan:Connect(input) | |
72 | UIS.InputEnded:Connect(input) | |
73 | ||
74 | local h,t | |
75 | --Give the server mouse data 30 times every second, but only if the values changed | |
76 | --If player is not moving their mouse, client won't fire events | |
77 | while wait(1/30) do | |
78 | if h~=Mouse.Hit or t~=Mouse.Target then | |
79 | h,t=Mouse.Hit,Mouse.Target | |
80 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
81 | end | |
82 | end]==],Player.Character) | |
83 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
84 | end | |
85 | ||
86 | --Grab Gun v1 | |
87 | local plr = owner | |
88 | local plrg = plr.PlayerGui | |
89 | local char = plr.Character | |
90 | script.Parent = char | |
91 | local ra = char["Right Arm"] | |
92 | local la = char["Left Arm"] | |
93 | local rl = char["Right Leg"] | |
94 | local ll = char["Left Leg"] | |
95 | local h = char.Head | |
96 | local t = char.Torso | |
97 | local anim = "idle" | |
98 | local mode = "shoot" | |
99 | local killmode = "kill" | |
100 | local rad = math.rad | |
101 | local black = nil | |
102 | ||
103 | function info(text,timebeforefade) | |
104 | coroutine.resume(coroutine.create(function() | |
105 | local pos = {.001,.002,.003,.004,.005} | |
106 | local mpos = {-.001,-.002,-.003,-.004,-.005} | |
107 | local sc = Instance.new("ScreenGui",plrg) | |
108 | local tex = Instance.new("TextLabel",sc) tex.Rotation = math.random(-5,5) tex.Position = UDim2.new(.5,0,.05,0) tex.Size = UDim2.new(0,0,.15,0) tex.TextScaled = true tex.BackgroundTransparency = 1 tex.TextTransparency = 1 tex.BackgroundColor3 = Color3.fromRGB(40,40,40) tex.BorderSizePixel = 0 tex.TextColor3 = Color3.fromRGB(255,255,255) tex.Text = text | |
109 | for i = 1,20 do | |
110 | tex.Size = tex.Size + UDim2.new(.025,0,0,0) | |
111 | tex.Rotation = math.random(-5,5) | |
112 | tex.TextColor3 = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255)) | |
113 | tex.Position = tex.Position - UDim2.new(.0125,0,0,0) | |
114 | tex.Position = tex.Position +- UDim2.new(0,math.random(-10,10),0,math.random(-10,10)) | |
115 | tex.BackgroundColor3 = Color3.fromRGB(math.random(0,60),math.random(0,60),math.random(0,60)) | |
116 | tex.BackgroundTransparency = tex.BackgroundTransparency -.05 | |
117 | swait() | |
118 | end | |
119 | for i = 1,10 do | |
120 | tex.Rotation = math.random(-5,5) | |
121 | tex.TextColor3 = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255)) | |
122 | tex.Position = tex.Position +- UDim2.new(0,math.random(-10,10),0,math.random(-10,10)) | |
123 | tex.BackgroundColor3 = Color3.fromRGB(math.random(0,60),math.random(0,60),math.random(0,60)) | |
124 | tex.TextTransparency = tex.TextTransparency -.1 | |
125 | swait() | |
126 | end | |
127 | tex.BackgroundColor3 = Color3.fromRGB(40,40,40) | |
128 | tex.TextColor3 = Color3.fromRGB(255,255,255) | |
129 | wait(timebeforefade) | |
130 | for i = 1,10 do | |
131 | tex.Rotation = math.random(-5,5) | |
132 | tex.TextColor3 = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255)) | |
133 | tex.Position = tex.Position +- UDim2.new(0,math.random(-10,10),0,math.random(-10,10)) | |
134 | tex.BackgroundColor3 = Color3.fromRGB(math.random(0,60),math.random(0,60),math.random(0,60)) | |
135 | tex.TextTransparency = tex.TextTransparency +.1 | |
136 | swait() | |
137 | end | |
138 | for i = 1,20 do | |
139 | tex.Size = tex.Size - UDim2.new(.025,0,0,0) | |
140 | tex.Rotation = math.random(-5,5) | |
141 | tex.TextColor3 = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255)) | |
142 | tex.Position = tex.Position +- UDim2.new(0,math.random(-10,10),0,math.random(-10,10)) | |
143 | tex.BackgroundColor3 = Color3.fromRGB(math.random(0,30),math.random(0,60),math.random(0,60)) | |
144 | tex.Position = tex.Position + UDim2.new(.0125,0,0,0) | |
145 | tex.BackgroundTransparency = tex.BackgroundTransparency +.05 | |
146 | swait() | |
147 | end | |
148 | tex:Destroy() | |
149 | end)) | |
150 | end | |
151 | ||
152 | print("Made by vlad20020") | |
153 | ||
154 | coroutine.resume(coroutine.create(function() | |
155 | wait(1) | |
156 | info("Press Z to equip the gun.",1) | |
157 | wait(2) | |
158 | info("Press X to unequip the gun.",1) | |
159 | wait(2) | |
160 | info("Press M for control list",1) | |
161 | end)) | |
162 | ||
163 | function swait(TIME) | |
164 | game:GetService("RunService").RenderStepped:wait(TIME) | |
165 | end | |
166 | ||
167 | local rs = t["Right Shoulder"] | |
168 | local ls = t["Left Shoulder"] | |
169 | local rh = t["Right Hip"] | |
170 | local lh = t["Left Hip"] | |
171 | local nec = t.Neck | |
172 | local rut = char.HumanoidRootPart | |
173 | local rutj = rut.RootJoint | |
174 | local hum = char:FindFirstChildOfClass("Humanoid") | |
175 | local using = true | |
176 | local canequip = true | |
177 | local uneq = false | |
178 | local grab = false | |
179 | huge = math.huge | |
180 | local ammo = 7 | |
181 | char.Animate.idle.Animation2:Destroy() | |
182 | ||
183 | --arm joint parts_ | |
184 | local tpr = Instance.new("Part",t) tpr.Size = Vector3.new(.1,.1,.1) tpr.CanCollide = false tpr.Transparency = 1 | |
185 | local tpl = Instance.new("Part",t) tpl.Size = Vector3.new(.1,.1,.1) tpl.CanCollide = false tpl.Transparency = 1 | |
186 | local tprw = Instance.new("Weld",t) tprw.Part0 = t tprw.Part1 = tpr tprw.C0 = CFrame.new(1,.5,0) | |
187 | local tplw = Instance.new("Weld",t) tplw.Part0 = t tplw.Part1 = tpl tplw.C0 = CFrame.new(-1,.5,0) | |
188 | -- | |
189 | local rapr = Instance.new("Part",ra) rapr.Size = Vector3.new(.1,.1,.1) rapr.CanCollide = false rapr.Transparency = 1 --Right Arm | |
190 | local lapl = Instance.new("Part",la) lapl.Size = Vector3.new(.1,.1,.1) lapl.CanCollide = false lapl.Transparency = 1 --Left Arm | |
191 | local raprw = Instance.new("Weld",ra) raprw.Part0 = ra raprw.Part1 = rapr raprw.C0 = CFrame.new(-.5,.5,0) | |
192 | local laplw = Instance.new("Weld",la) laplw.Part0 = la laplw.Part1 = lapl laplw.C0 = CFrame.new(.5,.5,0) | |
193 | --joint welds | |
194 | local rsw = Instance.new("Weld",ra) rsw.Part0 = tpr rsw.Part1 = nil --Right Shoulder | |
195 | local lsw = Instance.new("Weld",la) lsw.Part0 = tpl lsw.Part1 = nil --Left Shoulder | |
196 | --gun model-- | |
197 | local function creategun() | |
198 | --Converted with ttyyuu12345's model to script plugin v4 | |
199 | function sandbox(var,func) | |
200 | local env = getfenv(func) | |
201 | local newenv = setmetatable({},{ | |
202 | __index = function(self,k) | |
203 | if k=="script" then | |
204 | return var | |
205 | else | |
206 | return env[k] | |
207 | end | |
208 | end, | |
209 | }) | |
210 | setfenv(func,newenv) | |
211 | return func | |
212 | end | |
213 | cors = {} | |
214 | mas = Instance.new("Model",game:GetService("Lighting")) | |
215 | Model0 = Instance.new("Model") | |
216 | Part1 = Instance.new("Part") | |
217 | Part2 = Instance.new("Part") | |
218 | Part3 = Instance.new("Part") | |
219 | WeldConstraint4 = Instance.new("WeldConstraint") | |
220 | Part5 = Instance.new("Part") | |
221 | WeldConstraint6 = Instance.new("WeldConstraint") | |
222 | WeldConstraint7 = Instance.new("WeldConstraint") | |
223 | Part8 = Instance.new("Part") | |
224 | WeldConstraint9 = Instance.new("WeldConstraint") | |
225 | WeldConstraint10 = Instance.new("WeldConstraint") | |
226 | WeldConstraint11 = Instance.new("WeldConstraint") | |
227 | Part12 = Instance.new("Part") | |
228 | Part13 = Instance.new("Part") | |
229 | WeldConstraint14 = Instance.new("WeldConstraint") | |
230 | Part15 = Instance.new("Part") | |
231 | Part16 = Instance.new("Part") | |
232 | WeldConstraint17 = Instance.new("WeldConstraint") | |
233 | WeldConstraint18 = Instance.new("WeldConstraint") | |
234 | Part19 = Instance.new("Part") | |
235 | Part20 = Instance.new("Part") | |
236 | WeldConstraint21 = Instance.new("WeldConstraint") | |
237 | Part22 = Instance.new("Part") | |
238 | WeldConstraint23 = Instance.new("WeldConstraint") | |
239 | Model0.Name = "gun" | |
240 | Model0.Parent = mas | |
241 | Part1.Name = "Handle" | |
242 | Part1.Parent = Model0 | |
243 | Part1.CFrame = CFrame.new(100.938477, 23.8801613, -108.945274, 0.803930104, -0.00498482632, -0.594721258, 0.000852990604, 0.999974132, -0.00722878333, 0.594741881, 0.00530394772, 0.803912997) | |
244 | Part1.Orientation = Vector3.new(0.409999996, -36.4899979, 0.049999997) | |
245 | Part1.Position = Vector3.new(100.938477, 23.8801613, -108.945274) | |
246 | Part1.Rotation = Vector3.new(0.519999981, -36.4899979, 0.359999985) | |
247 | Part1.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
248 | Part1.Transparency = 1 | |
249 | Part1.Size = Vector3.new(0.271587253, 1.35793722, 0.271587431) | |
250 | Part1.BottomSurface = Enum.SurfaceType.Smooth | |
251 | Part1.BrickColor = BrickColor.new("Black") | |
252 | Part1.CanCollide = false | |
253 | Part1.Material = Enum.Material.Metal | |
254 | Part1.TopSurface = Enum.SurfaceType.Smooth | |
255 | Part1.brickColor = BrickColor.new("Black") | |
256 | Part2.Parent = Model0 | |
257 | Part2.CFrame = CFrame.new(100.662735, 23.9763107, -109.178238, 0.803839028, -0.00493576005, -0.594844699, 0.000852896366, 0.999974787, -0.00714508584, 0.594864845, 0.00523596723, 0.803822458) | |
258 | Part2.Orientation = Vector3.new(0.409999996, -36.5, 0.049999997) | |
259 | Part2.Position = Vector3.new(100.662735, 23.9763107, -109.178238) | |
260 | Part2.Rotation = Vector3.new(0.50999999, -36.5, 0.349999994) | |
261 | Part2.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
262 | Part2.Size = Vector3.new(0.339484632, 0.108634979, 0.0950556025) | |
263 | Part2.BottomSurface = Enum.SurfaceType.Smooth | |
264 | Part2.BrickColor = BrickColor.new("Black") | |
265 | Part2.CanCollide = false | |
266 | Part2.Material = Enum.Material.Metal | |
267 | Part2.TopSurface = Enum.SurfaceType.Smooth | |
268 | Part2.brickColor = BrickColor.new("Black") | |
269 | Part3.Parent = Model0 | |
270 | Part3.CFrame = CFrame.new(100.477272, 24.1208344, -109.300568, 0.00492594484, 0.803836763, -0.594847798, -0.999974728, 0.000837364234, -0.00714954128, -0.00524876919, 0.594867945, 0.803820133) | |
271 | Part3.Orientation = Vector3.new(0.409999996, -36.5, -89.9499969) | |
272 | Part3.Position = Vector3.new(100.477272, 24.1208344, -109.300568) | |
273 | Part3.Rotation = Vector3.new(0.50999999, -36.5, -89.6500015) | |
274 | Part3.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
275 | Part3.Size = Vector3.new(0.393802106, 0.108634979, 0.0950556025) | |
276 | Part3.BottomSurface = Enum.SurfaceType.Smooth | |
277 | Part3.BrickColor = BrickColor.new("Black") | |
278 | Part3.CanCollide = false | |
279 | Part3.Material = Enum.Material.Metal | |
280 | Part3.TopSurface = Enum.SurfaceType.Smooth | |
281 | Part3.brickColor = BrickColor.new("Black") | |
282 | WeldConstraint4.Parent = Part3 | |
283 | WeldConstraint4.Part0 = Part3 | |
284 | WeldConstraint4.Part1 = Part2 | |
285 | Part5.Parent = Model0 | |
286 | Part5.CFrame = CFrame.new(100.603096, 24.3147335, -109.201149, 0.804022074, -0.00503333705, -0.594596386, 0.00085399684, 0.999973536, -0.0073103467, 0.594617426, 0.00536970189, 0.80400461) | |
287 | Part5.Orientation = Vector3.new(0.419999987, -36.4799995, 0.049999997) | |
288 | Part5.Position = Vector3.new(100.603096, 24.3147335, -109.201149) | |
289 | Part5.Rotation = Vector3.new(0.519999981, -36.4799995, 0.359999985) | |
290 | Part5.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
291 | Part5.Size = Vector3.new(1.69742119, 0.203690529, 0.271587461) | |
292 | Part5.BottomSurface = Enum.SurfaceType.Smooth | |
293 | Part5.BrickColor = BrickColor.new("Black") | |
294 | Part5.CanCollide = false | |
295 | Part5.Material = Enum.Material.Metal | |
296 | Part5.TopSurface = Enum.SurfaceType.Smooth | |
297 | Part5.brickColor = BrickColor.new("Black") | |
298 | WeldConstraint6.Parent = Part5 | |
299 | WeldConstraint6.Part0 = Part5 | |
300 | WeldConstraint6.Part1 = Part16 | |
301 | WeldConstraint7.Parent = Part5 | |
302 | WeldConstraint7.Part0 = Part5 | |
303 | WeldConstraint7.Part1 = Part19 | |
304 | Part8.Parent = Model0 | |
305 | Part8.CFrame = CFrame.new(100.928474, 23.7767162, -108.965073, 0.790873766, -0.144370049, -0.594724894, 0.174304828, 0.984665811, -0.00723577663, 0.586649835, -0.0979410186, 0.803910255) | |
306 | Part8.Orientation = Vector3.new(0.409999996, -36.4899979, 10.04) | |
307 | Part8.Position = Vector3.new(100.928474, 23.7767162, -108.965073) | |
308 | Part8.Rotation = Vector3.new(0.519999981, -36.4899979, 10.3499994) | |
309 | Part8.Color = Color3.new(0.623529, 0.631373, 0.67451) | |
310 | Part8.Size = Vector3.new(0.407381058, 0.678968549, 0.271587461) | |
311 | Part8.BottomSurface = Enum.SurfaceType.Smooth | |
312 | Part8.BrickColor = BrickColor.new("Fossil") | |
313 | Part8.CanCollide = false | |
314 | Part8.Material = Enum.Material.Slate | |
315 | Part8.TopSurface = Enum.SurfaceType.Smooth | |
316 | Part8.brickColor = BrickColor.new("Fossil") | |
317 | WeldConstraint9.Parent = Part8 | |
318 | WeldConstraint9.Part0 = Part8 | |
319 | WeldConstraint9.Part1 = Part22 | |
320 | WeldConstraint10.Parent = Part8 | |
321 | WeldConstraint10.Part0 = Part8 | |
322 | WeldConstraint10.Part1 = Part2 | |
323 | WeldConstraint11.Parent = Part8 | |
324 | WeldConstraint11.Part0 = Part8 | |
325 | WeldConstraint11.Part1 = Part1 | |
326 | Part12.Parent = Model0 | |
327 | Part12.CFrame = CFrame.new(99.8241043, 24.4670258, -109.770966, 0.803930223, -0.00498490315, -0.594721019, 0.00085299596, 0.999974012, -0.00722887041, 0.594741583, 0.00530401571, 0.803913176) | |
328 | Part12.Orientation = Vector3.new(0.409999996, -36.4899979, 0.049999997) | |
329 | Part12.Position = Vector3.new(99.8241043, 24.4670258, -109.770966) | |
330 | Part12.Rotation = Vector3.new(0.519999981, -36.4899979, 0.359999985) | |
331 | Part12.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
332 | Part12.Size = Vector3.new(0.0678968653, 0.20369038, 0.176531628) | |
333 | Part12.BottomSurface = Enum.SurfaceType.Smooth | |
334 | Part12.BrickColor = BrickColor.new("Black") | |
335 | Part12.CanCollide = false | |
336 | Part12.Material = Enum.Material.SmoothPlastic | |
337 | Part12.TopSurface = Enum.SurfaceType.Smooth | |
338 | Part12.brickColor = BrickColor.new("Black") | |
339 | Part12.Shape = Enum.PartType.Cylinder | |
340 | Part13.Parent = Model0 | |
341 | Part13.CFrame = CFrame.new(101.002449, 23.3428402, -108.930023, 0.790792346, -0.144294962, -0.594851375, 0.174290657, 0.984668911, -0.0071533937, 0.586763799, -0.0980203673, 0.803817451) | |
342 | Part13.Orientation = Vector3.new(0.409999996, -36.5, 10.04) | |
343 | Part13.Position = Vector3.new(101.002449, 23.3428402, -108.930023) | |
344 | Part13.Rotation = Vector3.new(0.50999999, -36.5, 10.3400002) | |
345 | Part13.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
346 | Part13.Size = Vector3.new(0.407381058, 0.203690544, 0.271587461) | |
347 | Part13.BottomSurface = Enum.SurfaceType.Smooth | |
348 | Part13.BrickColor = BrickColor.new("Black") | |
349 | Part13.CanCollide = false | |
350 | Part13.Material = Enum.Material.Metal | |
351 | Part13.TopSurface = Enum.SurfaceType.Smooth | |
352 | Part13.brickColor = BrickColor.new("Black") | |
353 | WeldConstraint14.Parent = Part13 | |
354 | WeldConstraint14.Part0 = Part13 | |
355 | WeldConstraint14.Part1 = Part8 | |
356 | Part15.Parent = Model0 | |
357 | Part15.CFrame = CFrame.new(99.8172379, 24.46702, -109.773712, 0.803930223, -0.00498490315, -0.594721019, 0.00085299596, 0.999974012, -0.00722887041, 0.594741583, 0.00530401571, 0.803913176) | |
358 | Part15.Orientation = Vector3.new(0.409999996, -36.4899979, 0.049999997) | |
359 | Part15.Position = Vector3.new(99.8172379, 24.46702, -109.773712) | |
360 | Part15.Rotation = Vector3.new(0.519999981, -36.4899979, 0.359999985) | |
361 | Part15.Color = Color3.new(0.0666667, 0.0666667, 0.0666667) | |
362 | Part15.Size = Vector3.new(0.0678968653, 0.20369038, 0.135793507) | |
363 | Part15.BottomSurface = Enum.SurfaceType.Smooth | |
364 | Part15.BrickColor = BrickColor.new("Really black") | |
365 | Part15.CanCollide = false | |
366 | Part15.Material = Enum.Material.SmoothPlastic | |
367 | Part15.TopSurface = Enum.SurfaceType.Smooth | |
368 | Part15.brickColor = BrickColor.new("Really black") | |
369 | Part15.Shape = Enum.PartType.Cylinder | |
370 | Part16.Parent = Model0 | |
371 | Part16.CFrame = CFrame.new(100.518448, 24.4841995, -109.259399, 0.80401504, -0.00503334729, -0.59459132, 0.000853998587, 0.999973059, -0.00731024938, 0.594612062, 0.00536973123, 0.803997576) | |
372 | Part16.Orientation = Vector3.new(0.419999987, -36.4799995, 0.049999997) | |
373 | Part16.Position = Vector3.new(100.518448, 24.4841995, -109.259399) | |
374 | Part16.Rotation = Vector3.new(0.519999981, -36.4799995, 0.359999985) | |
375 | Part16.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
376 | Part16.Size = Vector3.new(1.76531804, 0.271587402, 0.271587461) | |
377 | Part16.BottomSurface = Enum.SurfaceType.Smooth | |
378 | Part16.BrickColor = BrickColor.new("Black") | |
379 | Part16.CanCollide = false | |
380 | Part16.Material = Enum.Material.Metal | |
381 | Part16.TopSurface = Enum.SurfaceType.Smooth | |
382 | Part16.brickColor = BrickColor.new("Black") | |
383 | WeldConstraint17.Parent = Part16 | |
384 | WeldConstraint17.Part0 = Part16 | |
385 | WeldConstraint17.Part1 = Part12 | |
386 | WeldConstraint18.Parent = Part16 | |
387 | WeldConstraint18.Part0 = Part16 | |
388 | WeldConstraint18.Part1 = Part15 | |
389 | Part19.Parent = Model0 | |
390 | Part19.CFrame = CFrame.new(99.8672562, 24.3137894, -109.7491, 0.803929985, -0.00498482212, -0.594721317, 0.000852967962, 0.999974132, -0.0072287661, 0.59474194, 0.00530394865, 0.803912997) | |
391 | Part19.Orientation = Vector3.new(0.409999996, -36.4899979, 0.049999997) | |
392 | Part19.Position = Vector3.new(99.8672562, 24.3137894, -109.7491) | |
393 | Part19.Rotation = Vector3.new(0.519999981, -36.4899979, 0.359999985) | |
394 | Part19.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
395 | Part19.Size = Vector3.new(0.135793433, 0.0678968653, 0.271587461) | |
396 | Part19.BottomSurface = Enum.SurfaceType.Smooth | |
397 | Part19.BrickColor = BrickColor.new("Black") | |
398 | Part19.CanCollide = false | |
399 | Part19.Material = Enum.Material.Metal | |
400 | Part19.TopSurface = Enum.SurfaceType.Smooth | |
401 | Part19.brickColor = BrickColor.new("Black") | |
402 | Part20.Parent = Model0 | |
403 | Part20.CFrame = CFrame.new(100.96167, 23.2699795, -108.967567, 0.803838253, -0.00491723372, -0.594845951, 0.00083023723, 0.999974787, -0.00714454427, 0.594866037, 0.00524902251, 0.803821564) | |
404 | Part20.Orientation = Vector3.new(0.409999996, -36.5, 0.049999997) | |
405 | Part20.Position = Vector3.new(100.96167, 23.2699795, -108.967567) | |
406 | Part20.Rotation = Vector3.new(0.50999999, -36.5, 0.349999994) | |
407 | Part20.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
408 | Part20.Size = Vector3.new(0.543174803, 0.135793686, 0.271587461) | |
409 | Part20.BottomSurface = Enum.SurfaceType.Smooth | |
410 | Part20.BrickColor = BrickColor.new("Black") | |
411 | Part20.CanCollide = false | |
412 | Part20.Material = Enum.Material.Metal | |
413 | Part20.TopSurface = Enum.SurfaceType.Smooth | |
414 | Part20.brickColor = BrickColor.new("Black") | |
415 | WeldConstraint21.Parent = Part20 | |
416 | WeldConstraint21.Part0 = Part20 | |
417 | WeldConstraint21.Part1 = Part13 | |
418 | Part22.Parent = Model0 | |
419 | Part22.CFrame = CFrame.new(100.859795, 24.2106876, -109.005821, 0.790954888, -0.144435093, -0.594601154, 0.174307793, 0.984664679, -0.0073169847, 0.586539567, -0.0978563949, 0.804001033) | |
420 | Part22.Orientation = Vector3.new(0.419999987, -36.4799995, 10.04) | |
421 | Part22.Position = Vector3.new(100.859795, 24.2106876, -109.005821) | |
422 | Part22.Rotation = Vector3.new(0.519999981, -36.4799995, 10.3499994) | |
423 | Part22.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
424 | Part22.Size = Vector3.new(0.407381058, 0.203690529, 0.271587461) | |
425 | Part22.BottomSurface = Enum.SurfaceType.Smooth | |
426 | Part22.BrickColor = BrickColor.new("Black") | |
427 | Part22.CanCollide = false | |
428 | Part22.Material = Enum.Material.Metal | |
429 | Part22.TopSurface = Enum.SurfaceType.Smooth | |
430 | Part22.brickColor = BrickColor.new("Black") | |
431 | WeldConstraint23.Parent = Part22 | |
432 | WeldConstraint23.Part0 = Part22 | |
433 | WeldConstraint23.Part1 = Part5 | |
434 | for i,v in pairs(mas:GetChildren()) do | |
435 | v.Parent = workspace | |
436 | pcall(function() v:MakeJoints() end) | |
437 | end | |
438 | mas:Destroy() | |
439 | for i,v in pairs(cors) do | |
440 | spawn(function() | |
441 | pcall(v) | |
442 | end) | |
443 | end | |
444 | ||
445 | Model0.Parent = char | |
446 | end | |
447 | creategun() | |
448 | --gun model end-- | |
449 | local shot = Instance.new("Part",Model0) shot.Size = Vector3.new(.2,.2,.2) shot.Transparency = 1 shot.Anchored = true shot.CanCollide = false shot.CFrame = ra.CFrame * CFrame.new(0,-2,0) | |
450 | coroutine.resume(coroutine.create(function() | |
451 | while true do | |
452 | shot.CFrame = ra.CFrame * CFrame.new(0,-2.6,-.4) * CFrame.Angles(rad(-90),rad(0),rad(0)) | |
453 | swait() | |
454 | end | |
455 | end)) | |
456 | local gunweld = Instance.new("Weld",ra) gunweld.Part0 = t gunweld.Part1 = Part1 gunweld.C0 = CFrame.new(1.1,-.7,0) * CFrame.Angles(rad(-120),rad(-90),rad(0)) | |
457 | function turnto(position) | |
458 | rut.CFrame = CFrame.new(rut.CFrame.p, Vector3.new(position.X, rut.Position.Y, position.Z)) * CFrame.new(0, 0, 0) | |
459 | end | |
460 | function fireto(position) | |
461 | shot.CFrame = CFrame.new(shot.CFrame.p, Vector3.new(position.X, position.Y, position.Z)) * CFrame.new(0, 0, 0) | |
462 | end | |
463 | ||
464 | function sound(parent,id,vol,pit) | |
465 | local sound = Instance.new("Sound",parent) | |
466 | sound.Volume = vol | |
467 | sound.SoundId = "rbxassetid://"..id | |
468 | sound.Pitch = pit | |
469 | sound:Play() | |
470 | coroutine.resume(coroutine.create(function() | |
471 | ||
472 | repeat | |
473 | swait() | |
474 | until sound.Playing == false | |
475 | sound:Destroy() | |
476 | end)) | |
477 | end | |
478 | function blood(POSITION) | |
479 | local blub = Instance.new("Part",workspace) | |
480 | blub.Material = "SmoothPlastic" | |
481 | blub.BrickColor = BrickColor.new("Maroon") | |
482 | blub.Size = Vector3.new(.3,.3,.3) | |
483 | blub.Shape = "Ball" | |
484 | blub.CFrame = POSITION.CFrame * CFrame.new(math.random(-1,1),math.random(-1,1),math.random(-1,1)) blub.Transparency = 0 | |
485 | blub.CanCollide = true blub.Anchored = false blub.Name = "Blood" | |
486 | coroutine.resume(coroutine.create(function(PART) | |
487 | wait(.5) | |
488 | blub.CanCollide = false blub.Anchored = true | |
489 | blub.Shape = "Cylinder" | |
490 | for i = 0,10 do | |
491 | blub.Orientation = Vector3.new(0,0,90) | |
492 | blub.Size = blub.Size + Vector3.new(0,.05,.05) | |
493 | blub.Size = blub.Size - Vector3.new(.035,0,0) | |
494 | wait(.1) | |
495 | end | |
496 | for i = 0,10 do | |
497 | ||
498 | blub.Orientation = Vector3.new(0,0,90) | |
499 | blub.Size = blub.Size + Vector3.new(0,.05,.05) | |
500 | blub.Size = blub.Size - Vector3.new(.035,0,0) | |
501 | wait(.1) | |
502 | end | |
503 | coroutine.resume(coroutine.create(function() | |
504 | for i = 0,1,.01 do | |
505 | blub.Color = blub.Color:lerp(Color3.fromRGB(40,0,0),i) | |
506 | swait() | |
507 | end | |
508 | end)) | |
509 | for i = 0,10 do | |
510 | blub.Size = blub.Size + Vector3.new(0,.025,.025) | |
511 | blub.Size = blub.Size - Vector3.new(.035,0,0) | |
512 | blub.Transparency = blub.Transparency + .1 | |
513 | wait(.1) | |
514 | end | |
515 | if blub.Transparency >= .99 then | |
516 | blub:Destroy() | |
517 | end | |
518 | end)) | |
519 | end | |
520 | function nubblud(pos) | |
521 | local sizes = {.1,.2,.3,.4,.5,.6} | |
522 | local poses = {.1,.2,.3,.4,.5} | |
523 | local mposes = {-.1,-.2,-.3,-.4,-.5} | |
524 | coroutine.resume(coroutine.create(function() | |
525 | local blod = Instance.new("Part",workspace) blod.Size = Vector3.new(sizes[math.random(1,6)],sizes[math.random(1,6)],sizes[math.random(1,6)]) blod.BrickColor = BrickColor.new("Maroon") blod.Material = "SmoothPlastic" | |
526 | blod.CFrame = pos.CFrame * CFrame.new(math.random(mposes[math.random(1,5)],poses[math.random(1,5)]),math.random(mposes[math.random(1,5)],poses[math.random(1,5)]),math.random(mposes[math.random(1,5)],poses[math.random(1,5)])) | |
527 | wait(5) | |
528 | blod:Destroy() | |
529 | end)) | |
530 | end | |
531 | function bullet() | |
532 | local bulet = Instance.new("Part",workspace) | |
533 | bulet.Size = Vector3.new(.15,.15,2) | |
534 | bulet.BrickColor = BrickColor.new("Daisy orange") | |
535 | bulet.Material = "Neon" bulet.CanCollide = false | |
536 | bulet.CFrame = shot.CFrame * CFrame.new(0,0,-2.2) bulet.Name = "Bullet" | |
537 | local mes = Instance.new("SpecialMesh",bulet) mes.MeshType = "Sphere" | |
538 | coroutine.resume(coroutine.create(function() | |
539 | wait(.02) | |
540 | for i = 0,1,.01 do | |
541 | bulet.Size = bulet.Size:lerp(Vector3.new(.15,.15,35),i) | |
542 | swait() | |
543 | end | |
544 | end)) | |
545 | local direc = Instance.new("BodyGyro",bulet) direc.MaxTorque = Vector3.new(huge,huge,huge) direc.CFrame = CFrame.new(bulet.Position,mouse.Hit.p) | |
546 | local vel = Instance.new("BodyVelocity",bulet) vel.MaxForce = Vector3.new(huge,huge,huge) vel.Velocity = direc.CFrame.lookVector * 400 | |
547 | local a = false | |
548 | function ow(hit) | |
549 | if hit ~= nil then | |
550 | local nub = hit.Parent:FindFirstChildOfClass("Humanoid") | |
551 | if nub ~= nil then | |
552 | if hit.Parent == char then | |
553 | ||
554 | else | |
555 | a = true | |
556 | nub.MaxHealth = 100 | |
557 | nub.Health = nub.Health -0 | |
558 | nub:TakeDamage(math.random(11,23)) | |
559 | nub.WalkSpeed = nub.WalkSpeed -1.2 | |
560 | nub.JumpPower = nub.JumpPower -10 | |
561 | if hit.Name == "Head" or hit.Name == "Handle" then | |
562 | function expl(pos) | |
563 | local p = Instance.new("Part",workspace) | |
564 | p.Size = Vector3.new(.1,.1,.1) p.BrickColor = BrickColor.new("Maroon") | |
565 | p.Material = "Neon" p.Shape = "Ball" p.CanCollide = false p.Anchored = true | |
566 | p.CFrame = pos.CFrame | |
567 | coroutine.resume(coroutine.create(function() | |
568 | for i = 0,2,.1 do | |
569 | p.Size = p.Size:lerp(Vector3.new(4,4,4),i) | |
570 | p.Transparency = p.Transparency +.07 | |
571 | swait() | |
572 | if p.Transparency >.99 then | |
573 | p:Destroy() | |
574 | end | |
575 | end | |
576 | end)) | |
577 | end | |
578 | nub.Parent:BreakJoints() | |
579 | hit.Parent.Head:Destroy() | |
580 | bulet:Destroy() | |
581 | sound(char,"131313234",2,1) | |
582 | expl(hit) | |
583 | local bum = Instance.new("Explosion",workspace) bum.Visible = false bum.BlastPressure = 20000 bum.BlastRadius = .5 bum.Position = hit.Position | |
584 | for i = 1,math.random(2,7) do | |
585 | blood(hit) | |
586 | nubblud(hit) | |
587 | end | |
588 | end | |
589 | end | |
590 | end | |
591 | bulet:Destroy() | |
592 | end | |
593 | end | |
594 | bulet.Touched:connect(ow) | |
595 | coroutine.resume(coroutine.create(function() | |
596 | wait(2) | |
597 | bulet:Destroy() | |
598 | end)) | |
599 | end | |
600 | ||
601 | function mag() | |
602 | local mag = Instance.new("Part",workspace) mag.Size = Vector3.new(.35,1,.2) mag.BrickColor = BrickColor.new("Black") mag.Material = "Metal" mag.CFrame = Part1.CFrame * CFrame.new(0,-1,0) | |
603 | coroutine.resume(coroutine.create(function() | |
604 | wait(3) | |
605 | mag:Destroy() | |
606 | end)) | |
607 | end | |
608 | ||
609 | function effect() | |
610 | local ef = Instance.new("Part",Model0) ef.Material = "Neon" ef.Name = "Effect" ef.Size = Vector3.new(.4,.4,.4) ef.Anchored = true ef.CanCollide = false ef.BrickColor = BrickColor.new("Daisy orange") ef.Transparency = 0 ef.CFrame = Part15.CFrame | |
611 | coroutine.resume(coroutine.create(function() | |
612 | for i = 1,10 do | |
613 | ef.Size = ef.Size +Vector3.new(.05,.05,.05) | |
614 | ef.Transparency = ef.Transparency +.1 | |
615 | ef.CFrame = ef.CFrame * CFrame.Angles(rad(math.random(-180,180)),rad(math.random(-180,180)),rad(math.random(-180,180))) | |
616 | if ef.Transparency > .99 then | |
617 | ef:Destroy() | |
618 | end | |
619 | swait() | |
620 | end | |
621 | end)) | |
622 | end | |
623 | ||
624 | local grabda = false | |
625 | local keyhold = false | |
626 | local lukin = false | |
627 | function fire() | |
628 | if not using and mode == "shoot" or using and grabda and mode == "grab" and killmode == "shoot1" then | |
629 | using = true | |
630 | rsw.Part1 = rapr | |
631 | lukin = true | |
632 | coroutine.resume(coroutine.create(function() | |
633 | while lukin do | |
634 | turnto(mouse.Hit.p) | |
635 | swait() | |
636 | end | |
637 | end)) | |
638 | keyhold = true | |
639 | for i = 0,1,.07 do | |
640 | rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(90),rad(0),rad(53)),i) | |
641 | rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(233)),i) | |
642 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(127)),i) | |
643 | swait() | |
644 | end | |
645 | repeat | |
646 | if ammo >0 then | |
647 | fireto(mouse.Hit.p) | |
648 | sound(char,"131070686",4,1) | |
649 | ammo = ammo -1 | |
650 | effect() | |
651 | bullet() | |
652 | for i = 0,1,.3 do | |
653 | rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,.3) * CFrame.Angles(rad(90),rad(0),rad(53)) * CFrame.Angles(rad(40),rad(0),rad(0)),i) | |
654 | swait() | |
655 | end | |
656 | for i = 0,1,.2 do | |
657 | rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(90),rad(0),rad(53)),i) | |
658 | swait() | |
659 | end | |
660 | wait(.35) | |
661 | else | |
662 | sound(char,"537744814",10,1) | |
663 | keyhold = false | |
664 | swait() | |
665 | end | |
666 | until keyhold == false | |
667 | wait(.2) | |
668 | lukin = false | |
669 | for i = 0,1,.07 do | |
670 | rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i) | |
671 | rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
672 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
673 | swait() | |
674 | end | |
675 | rsw.Part1 = nil | |
676 | if killmode ~= "shoot1" then | |
677 | using = false | |
678 | end | |
679 | end | |
680 | end | |
681 | function keyup() | |
682 | keyhold = false | |
683 | end | |
684 | mouse.Button1Down:connect(fire) | |
685 | mouse.Button1Up:connect(keyup) | |
686 | ||
687 | function reload() | |
688 | if ammo >6 then | |
689 | else | |
690 | using = true | |
691 | rsw.Part1 = rapr lsw.Part1 = lapl | |
692 | sound(char,"198915489",2,1.3) | |
693 | info("Reloading...",2.2) | |
694 | for i = 0,1,.05 do | |
695 | rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(80),rad(-45),rad(-40)),i) | |
696 | lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(60),rad(0),rad(50)),i) | |
697 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
698 | swait() | |
699 | end | |
700 | mag() | |
701 | for i = 0,1,.1 do | |
702 | rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(60),rad(-45),rad(-40)),i) | |
703 | lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-10),rad(0),rad(0)),i) | |
704 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
705 | swait() | |
706 | end | |
707 | for i = 0,1,.05 do | |
708 | rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(60),rad(-45),rad(-40)),i) | |
709 | lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-10),rad(0),rad(50)),i) | |
710 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
711 | swait() | |
712 | end | |
713 | local mag = Instance.new("Part",workspace) mag.Size = Vector3.new(.35,1,.2) mag.BrickColor = BrickColor.new("Black") mag.CanCollide = false mag.Material = "Metal" | |
714 | local magw = Instance.new("Weld",mag) magw.Part0 = la magw.Part1 = mag magw.C0 = CFrame.new(.3,-1,.1) * CFrame.Angles(rad(90),rad(-40),rad(-90)) | |
715 | for i = 0,1,.05 do | |
716 | rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(80),rad(-45),rad(-40)),i) | |
717 | lsw.C0 = lsw.C0:lerp(CFrame.new(.4,0,0) * CFrame.Angles(rad(50),rad(45),rad(50)),i) | |
718 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
719 | swait() | |
720 | end | |
721 | mag:Destroy() | |
722 | for i = 0,1,.05 do | |
723 | rsw.C0 = rsw.C0:lerp(CFrame.new(-.5,-.7,0) * CFrame.Angles(rad(110),rad(0),rad(-47)),i) | |
724 | lsw.C0 = lsw.C0:lerp(CFrame.new(.3,-.5,0) * CFrame.Angles(rad(160),rad(-77),rad(40)),i) | |
725 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
726 | swait() | |
727 | end | |
728 | for i = 0,1,.05 do | |
729 | rsw.C0 = rsw.C0:lerp(CFrame.new(-.5,-.7,0) * CFrame.Angles(rad(110),rad(0),rad(-47)),i) | |
730 | lsw.C0 = lsw.C0:lerp(CFrame.new(.5,-.5,.3) * CFrame.Angles(rad(150),rad(-50),rad(40)),i) | |
731 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
732 | swait() | |
733 | end | |
734 | for i = 0,1,.05 do | |
735 | rsw.C0 = rsw.C0:lerp(CFrame.new(-.5,-.7,0) * CFrame.Angles(rad(110),rad(0),rad(-47)),i) | |
736 | lsw.C0 = lsw.C0:lerp(CFrame.new(.3,-.5,0) * CFrame.Angles(rad(160),rad(-77),rad(40)),i) | |
737 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
738 | swait() | |
739 | end | |
740 | for i = 0,.6,.05 do | |
741 | rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(0),rad(0)),i) | |
742 | lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(0),rad(0)),i) | |
743 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
744 | swait() | |
745 | end | |
746 | ammo = 7 | |
747 | rsw.Part1 = nil lsw.Part1 = nil | |
748 | using = false | |
749 | end | |
750 | end | |
751 | ||
752 | function greb() | |
753 | local hbox = Instance.new("Part",char) hbox.Size = Vector3.new(2,5,.5) hbox.CanCollide = false hbox.Transparency = 1 | |
754 | local hwb = Instance.new("Weld",hbox) hwb.Part0 = t hwb.Part1 = hbox hwb.C0 = CFrame.new(0,0,-1) | |
755 | local aa = false | |
756 | function grabd(hit) | |
757 | if hit ~= nil and not grab and not aa then | |
758 | local aaa = hit.Parent:FindFirstChildOfClass("Humanoid") or hit.Parent.Parent:FindFirstChildOfClass("Humanoid") or hit.Parent.Parent.Parent:FindFirstChildOfClass("Humanoid") | |
759 | if aaa ~= nil and not grab then | |
760 | grab = true aa = true | |
761 | hbox:Destroy() | |
762 | if aaa.Parent.Name == "ded" then | |
763 | info("Press E or Q to change the mode",1) | |
764 | else | |
765 | info("Press E or Q to change the mode",1) | |
766 | end | |
767 | local tos = aaa.Parent:FindFirstChild("Torso") or aaa.Parent:FindFirstChild("UpperTorso") | |
768 | aaa.PlatformStand = true | |
769 | local w = Instance.new("Weld",t) w.Name = "grabweld" w.Part0 = t w.Part1 = tos | |
770 | coroutine.resume(coroutine.create(function() | |
771 | for i = 0,.5,.1 do | |
772 | w.C0 = w.C0:lerp(CFrame.new(-.9,0,-.8),i) | |
773 | swait() | |
774 | end | |
775 | end)) | |
776 | if aaa.Parent.Name ~= "ded" then | |
777 | for i = 0,1,.05 do | |
778 | rsw.C0 = rsw.C0:lerp(CFrame.new(.7,0,-.15) * CFrame.Angles(rad(110),rad(0),rad(-80)) * CFrame.Angles(rad(10),rad(0),rad(0)),i) | |
779 | lsw.C0 = lsw.C0:lerp(CFrame.new(-.2,-.2,-.4) * CFrame.Angles(rad(130),rad(10),rad(50)),i) | |
780 | swait() | |
781 | end | |
782 | function kill() | |
783 | grab = false | |
784 | if ammo >0 then | |
785 | ammo = ammo -1 | |
786 | sound(char,"131070686",5,1) | |
787 | coroutine.resume(coroutine.create(function() | |
788 | for i = 0,1,.5 do | |
789 | rsw.C0 = rsw.C0:lerp(CFrame.new(1,0,.45) * CFrame.Angles(rad(110),rad(0),rad(-80)) * CFrame.Angles(rad(10),rad(0),rad(15)),i) | |
790 | swait() | |
791 | end | |
792 | for i = 0,1,.05 do | |
793 | rsw.C0 = rsw.C0:lerp(CFrame.new(.7,0,-.15) * CFrame.Angles(rad(110),rad(0),rad(-80)),i) | |
794 | swait() | |
795 | end | |
796 | end)) | |
797 | coroutine.resume(coroutine.create(function() | |
798 | aaa.Health = .1 | |
799 | for i,v in pairs(aaa.Parent:GetChildren()) do | |
800 | if v:IsA("Script") then | |
801 | v:Destroy() | |
802 | end | |
803 | end | |
804 | end)) | |
805 | wait(.5) | |
806 | coroutine.resume(coroutine.create(function() | |
807 | for i,v in pairs(tos.Parent:GetChildren()) do | |
808 | if v:IsA("BasePart") then | |
809 | v.Anchored = false | |
810 | end | |
811 | end | |
812 | for i,v in pairs(t:GetChildren()) do | |
813 | if v.Name == "grabweld" then | |
814 | v:Destroy() | |
815 | end | |
816 | end | |
817 | end)) | |
818 | coroutine.resume(coroutine.create(function() | |
819 | for i = 0,.5,.1 do | |
820 | rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(-15),rad(0),rad(20)),i) | |
821 | lsw.C0 = lsw.C0:lerp(CFrame.Angles(rad(110),rad(20),rad(-30)),i) | |
822 | rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(150)),i) | |
823 | swait() | |
824 | end | |
825 | end)) | |
826 | aaa.DisplayDistanceType = "None" | |
827 | if tos.Name == "Torso" then | |
828 | coroutine.resume(coroutine.create(function() | |
829 | aaa.PlatformStand = true | |
830 | local disshit = aaa.Parent | |
831 | local h1 = disshit.Head | |
832 | local t1 = disshit.Torso | |
833 | local ra1 = disshit["Right Arm"] | |
834 | local la1 = disshit["Left Arm"] | |
835 | local rl1 = disshit["Right Leg"] | |
836 | local ll1 = disshit["Left Leg"] | |
837 | t1:BreakJoints() | |
838 | at2 = Instance.new("Attachment",t1) at2.Position = Vector3.new(1,.7,0) at2.Position = Vector3.new(1,.5,0) | |
839 | at = Instance.new("Attachment",ra1) at.Name = "oof" at.Position = Vector3.new(-.5,.7,0) | |
840 | balls = Instance.new("BallSocketConstraint",ra1) balls.Attachment0 = at2 balls.Attachment1 = at | |
841 | at21 = Instance.new("Attachment",t1) at21.Position = Vector3.new(-1,.7,0) at21.Position = Vector3.new(-1,.5,0) at21.Orientation = Vector3.new(0,180,0) | |
842 | at1 = Instance.new("Attachment",la1) at.Name = "oof" at1.Position = Vector3.new(.5,.7,0) | |
843 | balls1 = Instance.new("BallSocketConstraint",la1) balls1.Attachment0 = at21 balls1.Attachment1 = at1 | |
844 | nek = Instance.new("Attachment",h1) nek2 = Instance.new("Attachment",t1) nek2.Position = Vector3.new(0,1,0) nek.Position = Vector3.new(0,-.5,0) nball = Instance.new("BallSocketConstraint",h1) nball.Attachment0 = nek nball.Attachment1 = nek2 | |
845 | owihatedis = Instance.new("Attachment",t1) owihatedis.Position = Vector3.new(.5,-1,0) oihd = Instance.new("Attachment",rl1) oihd.Position = Vector3.new(0,1,0) oww = Instance.new("BallSocketConstraint",rl1) oww.Attachment0 = owihatedis oww.Attachment1 = oihd | |
846 | owihatedis2 = Instance.new("Attachment",t1) owihatedis2.Position = Vector3.new(-.5,-1,0) oihd2 = Instance.new("Attachment",ll1) oihd2.Position = Vector3.new(0,1,0) oww2 = Instance.new("BallSocketConstraint",ll1) oww2.Attachment0 = owihatedis2 oww2.Attachment1 = oihd2 | |
847 | box = Instance.new("Part",t1) box.Size = Vector3.new(1,1.3,1) box.Transparency = 1 | |
848 | box1 = Instance.new("Part",t1) box1.Size = Vector3.new(1,1.3,1) box1.Transparency = 1 | |
849 | box2 = Instance.new("Part",t1) box2.Size = Vector3.new(1,1.3,1) box2.Transparency = 1 | |
850 | box3 = Instance.new("Part",t1) box3.Size = Vector3.new(1,1.3,1) box3.Transparency = 1 | |
851 | box4 = Instance.new("Part",t1) box4.Size = h.Size - Vector3.new(0,.7,0) box4.Transparency = 1 | |
852 | bw = Instance.new("Weld",box) bw.Part0 = box bw.Part1 = ra1 bw.C0 = bw.C0 * CFrame.new(0,.45,0) | |
853 | bw1 = Instance.new("Weld",box1) bw1.Part0 = box1 bw1.Part1 = la1 bw1.C0 = bw1.C0 * CFrame.new(0,.45,0) | |
854 | bw2 = Instance.new("Weld",box2) bw2.Part0 = box2 bw2.Part1 = rl1 bw2.C0 = bw2.C0 * CFrame.new(0,.45,0) | |
855 | bw3 = Instance.new("Weld",box3) bw3.Part0 = box3 bw3.Part1 = ll1 bw3.C0 = bw3.C0 * CFrame.new(0,.45,0) | |
856 | bw4 = Instance.new("Weld",box4) bw4.Part0 = box4 bw4.Part1 = h1 bw4.C0 = bw4.C0 * CFrame.new(0,0,0) | |
857 | local rt = disshit:FindFirstChild("HumanoidRootPart") | |
858 | if rt ~= nil then | |
859 | rt:Destroy() | |
860 | end | |
861 | wait() | |
862 | local ded = disshit:Clone() | |
863 | local as = ded:FindFirstChildOfClass("Humanoid") | |
864 | as.Died:connect(function() | |
865 | for i,v in pairs(ded.Torso:GetChildren()) do | |
866 | if v:IsA("Part") then | |
867 | v:Destroy() | |
868 | end | |
869 | end | |
870 | end) | |
871 | coroutine.resume(coroutine.create(function() | |
872 | for i = 1,math.random(4,9) do | |
873 | nubblud(ded.Head) | |
874 | wait(.05) | |
875 | end | |
876 | end)) | |
877 | as.PlatformStand = true | |
878 | ded.Parent = workspace disshit:Destroy() | |
879 | ded.Torso.CFrame = ded.Torso.CFrame * CFrame.new(0,4,-6) | |
880 | ded.Torso.Orientation = Vector3.new(math.random(-70,70),math.random(-70,70),math.random(-70,70)) | |
881 | ded.Name = "ded" | |
882 | local yes = Instance.new("Part",char) yes.Size = t.Size yes.Anchored = true yes.CanCollide = false yes.Transparency = 1 yes.CFrame = rut.CFrame * CFrame.Angles(rad(50),rad(0),rad(0)) | |
883 | local furs = Instance.new("BodyVelocity",ded.Torso) furs.MaxForce = Vector3.new(huge,huge,huge) | |
884 | furs.Velocity = yes.CFrame.lookVector * 35 | |
885 | ||
886 | coroutine.resume(coroutine.create(function() | |
887 | wait(.1) | |
888 | furs:Destroy() | |
889 | yes:Destroy() | |
890 | end)) | |
891 | end)) | |
892 | end | |
893 | wait(.4) | |
894 | for i = 0,1,.05 do | |
895 | rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i) | |
896 | lsw.C0 = lsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i) | |
897 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
898 | rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
899 | swait() | |
900 | end | |
901 | if aaa.Parent ~= nil then | |
902 | aaa.Parent:BreakJoints() | |
903 | end | |
904 | using = false | |
905 | rsw.Part1 = nil lsw.Part1 = nil | |
906 | else | |
907 | aaa.PlatformStand = true | |
908 | sound(char,"537744814",10,1) | |
909 | wait(.5) | |
910 | local furs = Instance.new("BodyVelocity",tos) furs.MaxForce = Vector3.new(huge,huge,huge) | |
911 | furs.Velocity = rut.CFrame.lookVector * 30 | |
912 | w:Destroy() | |
913 | for i = 0,.5,.05 do | |
914 | rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(-15),rad(0),rad(-20)),i) | |
915 | lsw.C0 = lsw.C0:lerp(CFrame.Angles(rad(90),rad(20),rad(10)),i) | |
916 | swait() | |
917 | end | |
918 | furs:Destroy() | |
919 | for i = 0,1,.1 do | |
920 | rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i) | |
921 | lsw.C0 = lsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i) | |
922 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
923 | swait() | |
924 | end | |
925 | coroutine.resume(coroutine.create(function() | |
926 | wait(2) | |
927 | if aaa.Parent.Name == "ded" then | |
928 | else | |
929 | aaa.PlatformStand = false | |
930 | end | |
931 | end)) | |
932 | grab = false | |
933 | using = false | |
934 | rsw.Part1 = nil lsw.Part1 = nil | |
935 | end | |
936 | end | |
937 | function drop() | |
938 | aaa.PlatformStand = true | |
939 | w:Destroy() | |
940 | local furs = Instance.new("BodyVelocity",tos) furs.MaxForce = Vector3.new(huge,huge,huge) | |
941 | furs.Velocity = rut.CFrame.lookVector * 30 | |
942 | for i = 0,.5,.05 do | |
943 | rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(-15),rad(0),rad(-20)),i) | |
944 | lsw.C0 = lsw.C0:lerp(CFrame.Angles(rad(90),rad(20),rad(10)),i) | |
945 | swait() | |
946 | end | |
947 | furs:Destroy() | |
948 | for i = 0,1,.05 do | |
949 | rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i) | |
950 | lsw.C0 = lsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i) | |
951 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
952 | swait() | |
953 | end | |
954 | coroutine.resume(coroutine.create(function() | |
955 | wait(2) | |
956 | if aaa.Parent.Name == "ded" then | |
957 | else | |
958 | aaa.PlatformStand = false | |
959 | end | |
960 | end)) | |
961 | using = false | |
962 | rsw.Part1 = nil lsw.Part1 = nil | |
963 | grab = false | |
964 | end | |
965 | else | |
966 | oldmode = killmode | |
967 | killmode = "release1" | |
968 | hum.JumpPower = 0 | |
969 | hum.WalkSpeed = 8 | |
970 | coroutine.resume(coroutine.create(function() | |
971 | for i = 0,1,.05 do | |
972 | rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0),i) | |
973 | lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-33),rad(0),rad(-30)),i) | |
974 | swait() | |
975 | end | |
976 | end)) | |
977 | grabda = true | |
978 | w:Destroy() | |
979 | local ata = Instance.new("Attachment",la) ata.Position = Vector3.new(0,-.8,0) | |
980 | local ata1 = Instance.new("Attachment",aaa.Parent["Right Leg"]) ata1.Position = Vector3.new(0,-.8,0) | |
981 | local ba = Instance.new("BallSocketConstraint",ata) ba.Attachment0 = ata ba.Attachment1 = ata1 | |
982 | rsw.Part1 = nil | |
983 | function drop1() | |
984 | using = true | |
985 | grabda = false | |
986 | killmode = oldmode | |
987 | ba.Attachment1 = nil | |
988 | ata:Destroy() | |
989 | ata1:Destroy() | |
990 | ba:Destroy() | |
991 | hum.JumpPower = 50 | |
992 | hum.WalkSpeed = 16 | |
993 | for i = 0,1,.05 do | |
994 | lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0),i) | |
995 | swait() | |
996 | end | |
997 | lsw.Part1 = nil | |
998 | using = false | |
999 | grab = false | |
1000 | end | |
1001 | end | |
1002 | end | |
1003 | end | |
1004 | end | |
1005 | local tcon = hbox.Touched:connect(grabd) | |
1006 | using = true | |
1007 | coroutine.resume(coroutine.create(function() | |
1008 | for i = 0,.5,.1 do | |
1009 | rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
1010 | rh.C0 = rh.C0:lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i) | |
1011 | lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i) | |
1012 | swait() | |
1013 | end | |
1014 | end)) | |
1015 | rsw.Part1 = rapr lsw.Part1 = lapl | |
1016 | for i = 0,.7,.05 do | |
1017 | rsw.C0 = rsw.C0:lerp(CFrame.new(.2,0,-.3) * CFrame.Angles(rad(90),rad(0),rad(70)),i) | |
1018 | lsw.C0 = lsw.C0:lerp(CFrame.new(-.2,0,-.5) * CFrame.Angles(rad(90),rad(0),rad(-70)),i) | |
1019 | swait() | |
1020 | end | |
1021 | wait(.25) | |
1022 | hbox:Destroy() | |
1023 | tcon:disconnect() | |
1024 | if grab == false then | |
1025 | for i = 0,1,.05 do | |
1026 | rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i) | |
1027 | lsw.C0 = lsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i) | |
1028 | swait() | |
1029 | end | |
1030 | using = false | |
1031 | rsw.Part1 = nil lsw.Part1 = nil | |
1032 | end | |
1033 | end | |
1034 | ||
1035 | function dumi() | |
1036 | local dog = Instance.new("Model",workspace) dog.Name = "dumi" | |
1037 | local head = Instance.new("Part",dog) head.Name = "Head" head.Size = Vector3.new(2,1,1) | |
1038 | local la1 = Instance.new("Part",dog) la1.Name = "Left Arm" la1.Size = Vector3.new(1,2,1) local t1 = Instance.new("Part",dog) t1.Name = "Torso" t1.Size = Vector3.new(2,2,1) local ra1 = Instance.new("Part",dog) ra1.Name = "Right Arm" ra1.Size = Vector3.new(1,2,1) | |
1039 | local ll1 = Instance.new("Part",dog) ll1.Name = "Left Leg" ll1.Size = Vector3.new(1,2,1) local rl1 = Instance.new("Part",dog) rl1.Name = "Right Leg" rl1.Size = Vector3.new(1,2,1) | |
1040 | local dhum = Instance.new("Humanoid",dog) local hmesh = Instance.new("SpecialMesh",head) hmesh.Scale = Vector3.new(1.25,1.25,1.25) | |
1041 | dhum.MaxHealth = "inf" dhum.Health = "inf" dhum.AutoJumpEnabled = true | |
1042 | head.BrickColor = BrickColor.new("Institutional white") t1.BrickColor = BrickColor.new("Really black") ra1.BrickColor = BrickColor.new("Institutional white") la1.BrickColor = BrickColor.new("Institutional white") rl1.BrickColor = BrickColor.new("Dark stone grey") ll1.BrickColor = BrickColor.new("Dark stone grey") | |
1043 | local fais = Instance.new("Decal",head) fais.Texture = "http://www.roblox.com/asset/?id=1077397727" | |
1044 | local nec = Instance.new("Motor6D",t1) nec.Part0 = t1 nec.Part1 = head nec.C0 = nec.C0 * CFrame.new(0,1.5,0) | |
1045 | local ris = Instance.new("Motor6D",t1) ris.Part0 = t1 ris.Part1 = ra1 ris.C0 = ris.C0 * CFrame.new(1.5,0,0) | |
1046 | local lis = Instance.new("Motor6D",t1) lis.Part0 = t1 lis.Part1 = la1 lis.C0 = lis.C0 * CFrame.new(-1.5,0,0) | |
1047 | local rih = Instance.new("Motor6D",t1) rih.Part0 = t1 rih.Part1 = rl1 rih.C0 = rih.C0 * CFrame.new(.5,-2,0) | |
1048 | local lih = Instance.new("Motor6D",t1) lih.Part0 = t1 lih.Part1 = ll1 lih.C0 = lih.C0 * CFrame.new(-.5,-2,0) | |
1049 | head.CFrame = h.CFrame * CFrame.new(4,0,0) | |
1050 | t1.CFrame = t.CFrame * CFrame.new(4,0,0) | |
1051 | ra1.CFrame = ra.CFrame * CFrame.new(4,0,0) | |
1052 | la1.CFrame = la.CFrame * CFrame.new(4,0,0) | |
1053 | rl1.CFrame = rl.CFrame * CFrame.new(4,0,0) | |
1054 | ll1.CFrame = ll.CFrame * CFrame.new(4,0,0) | |
1055 | end | |
1056 | ||
1057 | mouse.KeyDown:connect(function(key) | |
1058 | if key == "z"and canequip then | |
1059 | rsw.Part1 = rapr | |
1060 | using = true | |
1061 | info("Equipped, press F or G to change the mode.",1) | |
1062 | for i = 0,1,.03 do | |
1063 | rsw.C0 = rsw.C0:lerp(CFrame.new(0,.3,0) * CFrame.Angles(rad(0),rad(0),rad(-20)),i) | |
1064 | swait() | |
1065 | end | |
1066 | gunweld.Part0 = ra gunweld.C0 = CFrame.new(0,-.9,0) * CFrame.Angles(rad(-90),rad(-90),rad(0)) | |
1067 | for i = 0,1,.05 do | |
1068 | rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(0),rad(0)),i) | |
1069 | swait() | |
1070 | end | |
1071 | uneq = true | |
1072 | rsw.Part1 = nil | |
1073 | canequip = false | |
1074 | using = false | |
1075 | end | |
1076 | end) | |
1077 | ||
1078 | mouse.KeyDown:connect(function(key) | |
1079 | if key == "x" and not canequip and uneq then | |
1080 | rsw.Part1 = rapr | |
1081 | using = true | |
1082 | info("Unequipped.",1) | |
1083 | for i = 0,1,.05 do | |
1084 | rsw.C0 = rsw.C0:lerp(CFrame.new(0,.3,0) * CFrame.Angles(rad(0),rad(0),rad(-20)),i) | |
1085 | swait() | |
1086 | end | |
1087 | gunweld.Part0 = t gunweld.C0 = CFrame.new(1.1,-.7,0) * CFrame.Angles(rad(-120),rad(-90),rad(0)) | |
1088 | for i = 0,.5,.1 do | |
1089 | rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
1090 | rs.C0 = rs.C0:lerp(CFrame.new(1,.5,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i) | |
1091 | ls.C0 = ls.C0:lerp(CFrame.new(-1,.5,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i) | |
1092 | rh.C0 = rh.C0:lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i) | |
1093 | lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i) | |
1094 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
1095 | swait() | |
1096 | end | |
1097 | for i = 0,1,.03 do | |
1098 | rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(0),rad(0)),i) | |
1099 | swait() | |
1100 | end | |
1101 | uneq = false | |
1102 | canequip = true | |
1103 | rsw.Part1 = nil | |
1104 | end | |
1105 | end) | |
1106 | ||
1107 | mouse.KeyDown:connect(function(key) | |
1108 | key = string.lower(key) | |
1109 | if string.byte(key) == 48 and not grabda then | |
1110 | hum.WalkSpeed = 30 | |
1111 | end | |
1112 | end) | |
1113 | mouse.KeyUp:connect(function(key) | |
1114 | key = string.lower(key) | |
1115 | if string.byte(key) == 48 and not grabda then | |
1116 | hum.WalkSpeed = 16 | |
1117 | end | |
1118 | end) | |
1119 | ||
1120 | local conts = false | |
1121 | function controls() | |
1122 | conts = true | |
1123 | coroutine.resume(coroutine.create(function() | |
1124 | info("Click - Shoot.",1) | |
1125 | wait(1) | |
1126 | info("R - Reload.",1) | |
1127 | wait(1) | |
1128 | info("F - Change the mode to Grab.",1) | |
1129 | wait(1) | |
1130 | info("G - Change the mode to Shoot.",1) | |
1131 | wait(1) | |
1132 | info("C - Spawn a dummy.",1) | |
1133 | wait(1) | |
1134 | info("v - Destroy all dead victims.",1) | |
1135 | wait(1) | |
1136 | info("N - Dance(Take the L).",1) | |
1137 | conts = false | |
1138 | end)) | |
1139 | end | |
1140 | ||
1141 | function cleardumi() | |
1142 | for i,v in pairs(workspace:GetChildren()) do | |
1143 | if v.Name == "ded" then | |
1144 | local exp = Instance.new("Explosion",workspace) exp.Position = v.Torso.Position exp.BlastRadius = 0 | |
1145 | v:Destroy() | |
1146 | end | |
1147 | end | |
1148 | end | |
1149 | ||
1150 | hum.Running:connect(function(spd) | |
1151 | if spd > 0 then | |
1152 | anim = "walk" | |
1153 | else | |
1154 | anim = "idle" | |
1155 | end | |
1156 | end) | |
1157 | ||
1158 | function sog() | |
1159 | if mode == "grab" and not using then | |
1160 | greb() | |
1161 | end | |
1162 | end | |
1163 | function act() | |
1164 | if grab and using and killmode == "kill" then | |
1165 | kill() | |
1166 | end | |
1167 | if grab and using and killmode == "release" then | |
1168 | drop() | |
1169 | end | |
1170 | if grabda and grab and killmode == "release1" then | |
1171 | drop1() | |
1172 | end | |
1173 | end | |
1174 | mouse.Button1Down:connect(act) | |
1175 | mouse.Button1Down:connect(sog) | |
1176 | ||
1177 | local change = false | |
1178 | function modegrab() | |
1179 | change = true | |
1180 | mode = "grab" | |
1181 | info("Mode changed to Grab click to perform an action.",1) | |
1182 | wait(1) | |
1183 | change = false | |
1184 | end | |
1185 | function modeshoot() | |
1186 | change = true | |
1187 | mode = "shoot" | |
1188 | info("Mode changed to Shoot click to perform an action.",1) | |
1189 | wait(1) | |
1190 | change = false | |
1191 | end | |
1192 | ||
1193 | ||
1194 | ||
1195 | mouse.KeyDown:connect(function(key) | |
1196 | if key == "e" and grab and not grabda then | |
1197 | killmode = "kill" | |
1198 | info("Mode changed to Kill",1) | |
1199 | end | |
1200 | if key == "q" and grab and not grabda then | |
1201 | killmode = "release" | |
1202 | info("Mode changed to Release",1) | |
1203 | end | |
1204 | if grabda and key == "q" then | |
1205 | killmode = "release1" | |
1206 | info("Mode changed to Release",1) | |
1207 | end | |
1208 | if grabda and key == "e" then | |
1209 | killmode = "shoot1" | |
1210 | info("Mode changed to Shoot",1) | |
1211 | end | |
1212 | if key == "r" and not using and not grab then | |
1213 | reload() | |
1214 | end | |
1215 | if key == "c" then | |
1216 | dumi() | |
1217 | end | |
1218 | if key == "v" then | |
1219 | cleardumi() | |
1220 | end | |
1221 | if key == "m" and not conts then | |
1222 | controls() | |
1223 | end | |
1224 | if key == "f" and not change and not using then | |
1225 | if mode ~= "grab" then | |
1226 | modegrab() | |
1227 | end | |
1228 | end | |
1229 | if key == "g" and not change and not using then | |
1230 | if mode ~= "shoot" then | |
1231 | modeshoot() | |
1232 | end | |
1233 | end | |
1234 | end) | |
1235 | ||
1236 | local dancing = false | |
1237 | local mus = Instance.new("Sound",char) mus.Looped = true mus.SoundId = "rbxassetid://1563991094" mus.Volume = 5 | |
1238 | mouse.KeyDown:connect(function(key) | |
1239 | key = key:lower() | |
1240 | if key == "n" then | |
1241 | if not dancing then | |
1242 | dancing = true | |
1243 | using = true | |
1244 | char.Animate.Disabled = true | |
1245 | for i,v in pairs(Model0:GetChildren()) do | |
1246 | if v:IsA("Part") then | |
1247 | v.Transparency = 1 | |
1248 | end | |
1249 | end | |
1250 | mus:Play() | |
1251 | while dancing do | |
1252 | if dancing then | |
1253 | coroutine.resume(coroutine.create(function() | |
1254 | for i = 0,.3,.035 do | |
1255 | rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(5),rad(180)) * CFrame.new(0,0,-.1),i) | |
1256 | rs.C0 = rs.C0:lerp(CFrame.new(.3,.7,-1.3) * CFrame.Angles(rad(0),rad(114),rad(190)) * CFrame.Angles(rad(43),rad(0),rad(0)),i) | |
1257 | ls.C0 = ls.C0:lerp(CFrame.new(-1.3,.5,-.3) * CFrame.Angles(rad(0),rad(-166),rad(-40)) * CFrame.Angles(rad(23),rad(0),rad(0)),i) | |
1258 | rh.C0 = rh.C0:lerp(CFrame.new(1,-.9,-.05) * CFrame.Angles(rad(0),rad(60),rad(-10)),i) | |
1259 | lh.C0 = lh.C0:lerp(CFrame.new(-1,-.8,-.15) * CFrame.Angles(rad(0),rad(-45),rad(-31.5)),i) | |
1260 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
1261 | swait() | |
1262 | end | |
1263 | end)) | |
1264 | end | |
1265 | wait(.07) | |
1266 | if dancing then | |
1267 | for i = 0,.7,.035 do | |
1268 | rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(5),rad(180)) * CFrame.new(0,0,-.2),i) | |
1269 | rs.C0 = rs.C0:lerp(CFrame.new(.3,.7,-1.3) * CFrame.Angles(rad(0),rad(114),rad(190)) * CFrame.Angles(rad(43),rad(0),rad(0)),i) | |
1270 | ls.C0 = ls.C0:lerp(CFrame.new(-1.3,.5,-.3) * CFrame.Angles(rad(0),rad(-166),rad(-40)) * CFrame.Angles(rad(23),rad(0),rad(0)),i) | |
1271 | rh.C0 = rh.C0:lerp(CFrame.new(1,-.8,-.05) * CFrame.Angles(rad(0),rad(60),rad(-20)),i) | |
1272 | lh.C0 = lh.C0:lerp(CFrame.new(-1,-.8,-.15) * CFrame.Angles(rad(0),rad(-45),rad(-63)),i) | |
1273 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
1274 | swait() | |
1275 | end | |
1276 | end | |
1277 | if dancing then | |
1278 | coroutine.resume(coroutine.create(function() | |
1279 | for i = 0,.3,.035 do | |
1280 | rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(-5),rad(180)) * CFrame.new(0,0,-.1),i) | |
1281 | rs.C0 = rs.C0:lerp(CFrame.new(.3,.7,-1.3) * CFrame.Angles(rad(0),rad(114),rad(190)) * CFrame.Angles(rad(43),rad(0),rad(0)),i) | |
1282 | ls.C0 = ls.C0:lerp(CFrame.new(-1.3,.5,-.3) * CFrame.Angles(rad(0),rad(-166),rad(-40)) * CFrame.Angles(rad(23),rad(0),rad(0)),i) | |
1283 | rh.C0 = rh.C0:lerp(CFrame.new(1,-.8,-.15) * CFrame.Angles(rad(0),rad(45),rad(31.5)),i) | |
1284 | lh.C0 = lh.C0:lerp(CFrame.new(-1,-.9,-.05) * CFrame.Angles(rad(0),rad(-60),rad(20)),i) | |
1285 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
1286 | swait() | |
1287 | end | |
1288 | end)) | |
1289 | end | |
1290 | wait(.07) | |
1291 | if dancing then | |
1292 | for i = 0,.7,.035 do | |
1293 | rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(-5),rad(180)) * CFrame.new(0,0,-.2),i) | |
1294 | rs.C0 = rs.C0:lerp(CFrame.new(.3,.7,-1.3) * CFrame.Angles(rad(0),rad(114),rad(190)) * CFrame.Angles(rad(43),rad(0),rad(0)),i) | |
1295 | ls.C0 = ls.C0:lerp(CFrame.new(-1.3,.5,-.3) * CFrame.Angles(rad(0),rad(-166),rad(-40)) * CFrame.Angles(rad(23),rad(0),rad(0)),i) | |
1296 | rh.C0 = rh.C0:lerp(CFrame.new(1,-.8,-.15) * CFrame.Angles(rad(0),rad(45),rad(63)),i) | |
1297 | lh.C0 = lh.C0:lerp(CFrame.new(-1,-.8,-.05) * CFrame.Angles(rad(0),rad(-60),rad(20)),i) | |
1298 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
1299 | swait() | |
1300 | end | |
1301 | end | |
1302 | swait() | |
1303 | end | |
1304 | else | |
1305 | mus:Stop() | |
1306 | char.Animate.Disabled = false | |
1307 | dancing = false | |
1308 | for i,v in pairs(Model0:GetChildren()) do | |
1309 | if v:IsA("Part") then | |
1310 | v.Transparency = 0 | |
1311 | end | |
1312 | end | |
1313 | shot.Transparency = 1 | |
1314 | if not canequip then | |
1315 | using = false | |
1316 | else | |
1317 | for i,v in pairs(Model0:GetChildren()) do | |
1318 | if v:IsA("Part") then | |
1319 | v.Transparency = 0 | |
1320 | end | |
1321 | end | |
1322 | shot.Transparency = 1 | |
1323 | using = true | |
1324 | wait(.3) | |
1325 | for i = 0,1,.1 do | |
1326 | rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
1327 | rs.C0 = rs.C0:lerp(CFrame.new(1,.5,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i) | |
1328 | ls.C0 = ls.C0:lerp(CFrame.new(-1,.5,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i) | |
1329 | rh.C0 = rh.C0:lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i) | |
1330 | lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i) | |
1331 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
1332 | swait() | |
1333 | end | |
1334 | end | |
1335 | end | |
1336 | end | |
1337 | end) | |
1338 | ||
1339 | local musica = Instance.new("Sound",char) musica.Volume = 1 musica.Looped = true musica.SoundId = "rbxassetid://1306847940" | |
1340 | local visonlyvlad = false | |
1341 | local vispart = Instance.new("Part",char) --[[vispart.Shape = "Ball"]] vispart.Material = "Neon" vispart.Size = Vector3.new(.3,.3,.3) vispart.Anchored = true vispart.CanCollide = false vispart.BrickColor = BrickColor.new("Royal purple") vispart.Transparency = 1 | |
1342 | mouse.KeyDown:connect(function(key) | |
1343 | key = key:lower() | |
1344 | if key == "u" and plr.Name == "CoulerFreak2016" then | |
1345 | if not visonlyvlad then | |
1346 | vispart.Transparency = 0 | |
1347 | musica:Play() | |
1348 | visonlyvlad = true | |
1349 | info("Visualiser mode:On",.3) | |
1350 | else | |
1351 | info("Visualiser mode:Off",.3) | |
1352 | vispart.Transparency = 1 | |
1353 | vispart.CFrame = CFrame.new(0,-10,0) | |
1354 | visonlyvlad = false | |
1355 | musica:Stop() | |
1356 | end | |
1357 | end | |
1358 | end) | |
1359 | coroutine.resume(coroutine.create(function() | |
1360 | while true do | |
1361 | if visonlyvlad == true then | |
1362 | for i = 0,1,.0001 do | |
1363 | vispart.CFrame = vispart.CFrame:lerp(rut.CFrame * CFrame.new(3,3,3) * CFrame.new(musica.PlaybackLoudness/85,musica.PlaybackLoudness/85,musica.PlaybackLoudness/85) * CFrame.Angles(rad(musica.PlaybackLoudness/1),rad(musica.PlaybackLoudness/1),rad(musica.PlaybackLoudness/1)),i) | |
1364 | vispart.Size = Vector3.new(musica.PlaybackLoudness/65,musica.PlaybackLoudness/65,musica.PlaybackLoudness/65) | |
1365 | vispart.Color = Color3.fromRGB(musica.PlaybackLoudness/4,musica.PlaybackLoudness/50,musica.PlaybackLoudness/1) | |
1366 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)) * CFrame.Angles(rad(musica.PlaybackLoudness/20),rad(0),rad(0)),i) | |
1367 | swait() | |
1368 | end | |
1369 | end | |
1370 | swait() | |
1371 | end | |
1372 | end)) | |
1373 | ||
1374 | while true do | |
1375 | if anim == "walk" and not using and uneq then | |
1376 | for i = 0,.5,.1 do | |
1377 | rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
1378 | rs.C0 = rs.C0:lerp(CFrame.new(1,.5,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i) | |
1379 | ls.C0 = ls.C0:lerp(CFrame.new(-1,.5,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i) | |
1380 | rh.C0 = rh.C0:lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i) | |
1381 | lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i) | |
1382 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i) | |
1383 | swait() | |
1384 | end | |
1385 | end | |
1386 | if anim == "idle" and not using and uneq then | |
1387 | for i = 0,.5,.06 do | |
1388 | rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(160)),i) | |
1389 | rs.C0 = rs.C0:lerp(CFrame.new(1,.5,0) * CFrame.Angles(rad(0),rad(74),rad(-20)),i) | |
1390 | ls.C0 = ls.C0:lerp(CFrame.new(-1,.5,0) * CFrame.Angles(rad(0),rad(-110),rad(-20)),i) | |
1391 | rh.C0 = rh.C0:lerp(CFrame.new(1,-1.1,0) * CFrame.Angles(rad(7),rad(80),rad(0)),i) | |
1392 | lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(-7),rad(-80),rad(0)),i) | |
1393 | nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(200)),i) | |
1394 | swait() | |
1395 | end | |
1396 | end | |
1397 | swait() | |
1398 | end |