SHOW:
|
|
- or go back to the newest paste.
1 | --https://github.com/Mokiros/roblox-FE-compatibility | |
2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
3 | local Player,game,owner = owner,game | |
4 | local RealPlayer = Player | |
5 | do | |
6 | print("FE Compatibility code V2 by Mokiros") | |
7 | local RealPlayer = RealPlayer | |
8 | script.Parent = RealPlayer.Character | |
9 | ||
10 | --Fake event to make stuff like Mouse.KeyDown work | |
11 | local Disconnect_Function = function(this) | |
12 | this[1].Functions[this[2]] = nil | |
13 | end | |
14 | local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}} | |
15 | local FakeEvent_Metatable = {__index={ | |
16 | Connect = function(this,f) | |
17 | local i = tostring(math.random(0,10000)) | |
18 | while this.Functions[i] do | |
19 | i = tostring(math.random(0,10000)) | |
20 | end | |
21 | this.Functions[i] = f | |
22 | return setmetatable({this,i},Disconnect_Metatable) | |
23 | end | |
24 | }} | |
25 | FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect | |
26 | local function fakeEvent() | |
27 | return setmetatable({Functions={}},FakeEvent_Metatable) | |
28 | end | |
29 | ||
30 | --Creating fake input objects with fake variables | |
31 | local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()} | |
32 | FakeMouse.keyUp = FakeMouse.KeyUp | |
33 | FakeMouse.keyDown = FakeMouse.KeyDown | |
34 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
35 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
36 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
37 | end} | |
38 | --Merged 2 functions into one by checking amount of arguments | |
39 | CAS.UnbindAction = CAS.BindAction | |
40 | ||
41 | --This function will trigger the events that have been :Connect()'ed | |
42 | local function TriggerEvent(self,ev,...) | |
43 | for _,f in pairs(self[ev].Functions) do | |
44 | f(...) | |
45 | end | |
46 | end | |
47 | FakeMouse.TriggerEvent = TriggerEvent | |
48 | UIS.TriggerEvent = TriggerEvent | |
49 | ||
50 | --Client communication | |
51 | local Event = Instance.new("RemoteEvent") | |
52 | Event.Name = "UserInput_Event" | |
53 | Event.OnServerEvent:Connect(function(plr,io) | |
54 | if plr~=RealPlayer then return end | |
55 | FakeMouse.Target = io.Target | |
56 | FakeMouse.Hit = io.Hit | |
57 | if not io.isMouse then | |
58 | local b = io.UserInputState == Enum.UserInputState.Begin | |
59 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
60 | return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up") | |
61 | end | |
62 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
63 | return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up") | |
64 | end | |
65 | for _,t in pairs(CAS.Actions) do | |
66 | for _,k in pairs(t.Keys) do | |
67 | if k==io.KeyCode then | |
68 | t.Function(t.Name,io.UserInputState,io) | |
69 | end | |
70 | end | |
71 | end | |
72 | FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
73 | UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false) | |
74 | end | |
75 | end) | |
76 | Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event") | |
77 | local Mouse = owner:GetMouse() | |
78 | local UIS = game:GetService("UserInputService") | |
79 | local input = function(io,RobloxHandled) | |
80 | if RobloxHandled then return end | |
81 | --Since InputObject is a client-side instance, we create and pass table instead | |
82 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
83 | end | |
84 | UIS.InputBegan:Connect(input) | |
85 | UIS.InputEnded:Connect(input) | |
86 | local h,t | |
87 | --Give the server mouse data every second frame, but only if the values changed | |
88 | --If player is not moving their mouse, client won't fire events | |
89 | local HB = game:GetService("RunService").Heartbeat | |
90 | while true do | |
91 | if h~=Mouse.Hit or t~=Mouse.Target then | |
92 | h,t=Mouse.Hit,Mouse.Target | |
93 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
94 | end | |
95 | --Wait 2 frames | |
96 | for i=1,2 do | |
97 | HB:Wait() | |
98 | end | |
99 | end]==],script) | |
100 | ||
101 | ----Sandboxed game object that allows the usage of client-side methods and services | |
102 | --Real game object | |
103 | local RealGame = game | |
104 | ||
105 | --Metatable for fake service | |
106 | local FakeService_Metatable = { | |
107 | __index = function(self,k) | |
108 | local s = rawget(self,"_RealService") | |
109 | if s then | |
110 | return typeof(s[k])=="function" | |
111 | and function(_,...)return s[k](s,...)end or s[k] | |
112 | end | |
113 | end, | |
114 | __newindex = function(self,k,v) | |
115 | local s = rawget(self,"_RealService") | |
116 | if s then s[k]=v end | |
117 | end | |
118 | } | |
119 | local function FakeService(t,RealService) | |
120 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
121 | return setmetatable(t,FakeService_Metatable) | |
122 | end | |
123 | ||
124 | --Fake game object | |
125 | local FakeGame = { | |
126 | GetService = function(self,s) | |
127 | return rawget(self,s) or RealGame:GetService(s) | |
128 | end, | |
129 | Players = FakeService({ | |
130 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player) | |
131 | },"Players"), | |
132 | UserInputService = FakeService(UIS,"UserInputService"), | |
133 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
134 | RunService = FakeService({ | |
135 | _btrs = {}, | |
136 | RenderStepped = RealGame:GetService("RunService").Heartbeat, | |
137 | BindToRenderStep = function(self,name,_,fun) | |
138 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
139 | end, | |
140 | UnbindFromRenderStep = function(self,name) | |
141 | self._btrs[name]:Disconnect() | |
142 | end, | |
143 | },"RunService") | |
144 | } | |
145 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
146 | FakeGame.service = FakeGame.GetService | |
147 | FakeService(FakeGame,game) | |
148 | --Changing owner to fake player object to support owner:GetMouse() | |
149 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
150 | end | |
151 | --School Shooter script by DMS ok bye | |
152 | o1 = Instance.new("Model") | |
153 | o1.Name = "Vest" | |
154 | o2 = Instance.new("Part") | |
155 | o2.Name = "Middle" | |
156 | o2.Parent = o1 | |
157 | o2.BrickColor = BrickColor.new("Brick yellow") | |
158 | o2.Transparency = 1 | |
159 | o2.Position = Vector3.new(0.139906004, 1.05800402, -11.1099901) | |
160 | o2.Anchored = true | |
161 | o2.CFrame = CFrame.new(0.139906004, 1.05800402, -11.1099901, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
162 | o2.CanCollide = false | |
163 | o2.FormFactor = Enum.FormFactor.Symmetric | |
164 | o2.Size = Vector3.new(2, 2, 1) | |
165 | o2.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
166 | o2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
167 | o2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
168 | o2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
169 | o2.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
170 | o2.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
171 | o2.Color = Color3.new(0.843137, 0.772549, 0.603922) | |
172 | o3 = Instance.new("Part") | |
173 | o3.Name = "Pack" | |
174 | o3.Parent = o1 | |
175 | o3.BrickColor = BrickColor.new("Dark stone grey") | |
176 | o3.Position = Vector3.new(0.139907002, 1.07000601, -10.3049936) | |
177 | o3.Rotation = Vector3.new(-180, 0, -180) | |
178 | o3.Anchored = true | |
179 | o3.CFrame = CFrame.new(0.139907002, 1.07000601, -10.3049936, -1, 0, 0, 0, 1, 0, 0, 0, -1) | |
180 | o3.CanCollide = false | |
181 | o3.FormFactor = Enum.FormFactor.Custom | |
182 | o3.Size = Vector3.new(1.65999985, 1.80000019, 0.630000472) | |
183 | o3.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
184 | o3.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
185 | o3.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
186 | o3.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
187 | o3.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
188 | o3.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
189 | o3.Color = Color3.new(0.388235, 0.372549, 0.384314) | |
190 | o4 = Instance.new("Part") | |
191 | o4.Name = "Strap" | |
192 | o4.Parent = o1 | |
193 | o4.BrickColor = BrickColor.new("Black") | |
194 | o4.Position = Vector3.new(0.66991502, 1.05500698, -11.1149797) | |
195 | o4.Anchored = true | |
196 | o4.CFrame = CFrame.new(0.66991502, 1.05500698, -11.1149797, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
197 | o4.CanCollide = false | |
198 | o4.FormFactor = Enum.FormFactor.Custom | |
199 | o4.Size = Vector3.new(0.259999752, 2.11000037, 1.15000045) | |
200 | o4.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
201 | o4.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
202 | o4.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
203 | o4.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
204 | o4.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
205 | o4.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
206 | o4.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
207 | o5 = Instance.new("Part") | |
208 | o5.Name = "Flap" | |
209 | o5.Parent = o1 | |
210 | o5.BrickColor = BrickColor.new("Black") | |
211 | o5.Position = Vector3.new(0.139905006, 1.85000098, -10.2900219) | |
212 | o5.Anchored = true | |
213 | o5.CFrame = CFrame.new(0.139905006, 1.85000098, -10.2900219, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
214 | o5.CanCollide = false | |
215 | o5.FormFactor = Enum.FormFactor.Custom | |
216 | o5.Size = Vector3.new(1.71999979, 0.400000006, 0.639999866) | |
217 | o5.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
218 | o5.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
219 | o5.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
220 | o5.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
221 | o5.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
222 | o5.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
223 | o5.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
224 | o6 = Instance.new("Part") | |
225 | o6.Name = "Pocket" | |
226 | o6.Parent = o1 | |
227 | o6.BrickColor = BrickColor.new("Black") | |
228 | o6.Position = Vector3.new(0.149883002, 0.860005975, -10.0399857) | |
229 | o6.Rotation = Vector3.new(-0, 0, -90) | |
230 | o6.Anchored = true | |
231 | o6.CFrame = CFrame.new(0.149883002, 0.860005975, -10.0399857, 0, 1, 0, -1, 0, 0, 0, 0, 1) | |
232 | o6.CanCollide = false | |
233 | o6.FormFactor = Enum.FormFactor.Custom | |
234 | o6.Size = Vector3.new(0.600000024, 0.800000131, 0.200000003) | |
235 | o6.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
236 | o6.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
237 | o6.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
238 | o6.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
239 | o6.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
240 | o6.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
241 | o6.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
242 | o7 = Instance.new("Part") | |
243 | o7.Name = "Pocket" | |
244 | o7.Parent = o1 | |
245 | o7.BrickColor = BrickColor.new("Black") | |
246 | o7.Position = Vector3.new(0.139600992, 1.10000801, -10.3099718) | |
247 | o7.Rotation = Vector3.new(-90, 90, 0) | |
248 | o7.Anchored = true | |
249 | o7.CFrame = CFrame.new(0.139600992, 1.10000801, -10.3099718, 0, 0, 1, -1, 0, 0, 0, -1, 0) | |
250 | o7.CanCollide = false | |
251 | o7.FormFactor = Enum.FormFactor.Custom | |
252 | o7.Size = Vector3.new(0.600000024, 0.400000155, 1.70000005) | |
253 | o7.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
254 | o7.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
255 | o7.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
256 | o7.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
257 | o7.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
258 | o7.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
259 | o7.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
260 | o8 = Instance.new("Part") | |
261 | o8.Name = "Strap" | |
262 | o8.Parent = o1 | |
263 | o8.BrickColor = BrickColor.new("Black") | |
264 | o8.Position = Vector3.new(-0.37014699, 1.05500698, -11.1149921) | |
265 | o8.Anchored = true | |
266 | o8.CFrame = CFrame.new(-0.37014699, 1.05500698, -11.1149921, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
267 | o8.CanCollide = false | |
268 | o8.FormFactor = Enum.FormFactor.Custom | |
269 | o8.Size = Vector3.new(0.259999752, 2.11000037, 1.15000045) | |
270 | o8.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
271 | o8.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
272 | o8.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
273 | o8.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
274 | o8.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
275 | o8.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
276 | o8.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
277 | o9 = Instance.new("Part") | |
278 | o9.Parent = o1 | |
279 | o9.BrickColor = BrickColor.new("Really black") | |
280 | o9.Reflectance = 0.10000000149012 | |
281 | o9.Position = Vector3.new(0.173590899, 4.00173569, -9.98207664) | |
282 | o9.Rotation = Vector3.new(2.9181666e-009, -3.48279983e-008, -8.55249798e-019) | |
283 | o9.Anchored = true | |
284 | o9.CFrame = CFrame.new(0.173590899, 4.00173569, -9.98207664, 0.999998331, 1.49269007e-020, -6.07863204e-010, 1.49269007e-020, 1, -5.09317831e-011, -6.07863204e-010, -5.09317831e-011, 1.00000334) | |
285 | o9.FormFactor = Enum.FormFactor.Plate | |
286 | o9.Size = Vector3.new(2, 4.80000019, 2) | |
287 | o9.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
288 | o9.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
289 | o9.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
290 | o9.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
291 | o9.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
292 | o9.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
293 | o9.Color = Color3.new(0.0666667, 0.0666667, 0.0666667) | |
294 | o10 = Instance.new("SpecialMesh") | |
295 | o10.Parent = o9 | |
296 | o10.Scale = Vector3.new(0.600000024, 1, 0.600000024) | |
297 | o10.MeshType = Enum.MeshType.Brick | |
298 | o11 = Instance.new("Part") | |
299 | o11.Parent = o1 | |
300 | o11.BrickColor = BrickColor.new("Mid gray") | |
301 | o11.Reflectance = 0.20000000298023 | |
302 | o11.Position = Vector3.new(0.173592806, 4.10173273, -11.1821489) | |
303 | o11.Rotation = Vector3.new(-180, 89.8953247, -90) | |
304 | o11.Anchored = true | |
305 | o11.CFrame = CFrame.new(0.173592806, 4.10173273, -11.1821489, -1.49269007e-020, 6.07863204e-010, 0.999998331, -1, 5.09317831e-011, 1.49269007e-020, 5.09317831e-011, -1.00000334, -6.07863204e-010) | |
306 | o11.FormFactor = Enum.FormFactor.Plate | |
307 | o11.Size = Vector3.new(1, 0.400000006, 2) | |
308 | o11.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
309 | o11.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
310 | o11.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
311 | o11.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
312 | o11.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
313 | o11.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
314 | o11.Color = Color3.new(0.803922, 0.803922, 0.803922) | |
315 | o12 = Instance.new("CylinderMesh") | |
316 | o12.Parent = o11 | |
317 | o12.Offset = Vector3.new(0, -0.600000024, 0) | |
318 | o12.Scale = Vector3.new(0.5, 0.100000001, 0.5) | |
319 | o13 = Instance.new("Part") | |
320 | o13.Parent = o1 | |
321 | o13.BrickColor = BrickColor.new("Mid gray") | |
322 | o13.Reflectance = 0.20000000298023 | |
323 | o13.Position = Vector3.new(0.173592806, 5.60169125, -11.1821489) | |
324 | o13.Rotation = Vector3.new(1.40697509e-009, -89.8953247, -90) | |
325 | o13.Anchored = true | |
326 | o13.CFrame = CFrame.new(0.173592806, 5.60169125, -11.1821489, 1.49269007e-020, 6.07863204e-010, -0.999998331, 1, 5.09317831e-011, -1.49269007e-020, -5.09317831e-011, -1.00000334, 6.07863204e-010) | |
327 | o13.FormFactor = Enum.FormFactor.Plate | |
328 | o13.Size = Vector3.new(2, 0.400000006, 2) | |
329 | o13.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
330 | o13.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
331 | o13.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
332 | o13.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
333 | o13.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
334 | o13.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
335 | o13.Color = Color3.new(0.803922, 0.803922, 0.803922) | |
336 | o14 = Instance.new("CylinderMesh") | |
337 | o14.Parent = o13 | |
338 | o14.Offset = Vector3.new(0, -0.600000024, 0) | |
339 | o14.Scale = Vector3.new(0.5, 0.100000001, 0.5) | |
340 | o15 = Instance.new("Part") | |
341 | o15.Parent = o1 | |
342 | o15.BrickColor = BrickColor.new("Mid gray") | |
343 | o15.Reflectance = 0.20000000298023 | |
344 | o15.Position = Vector3.new(0.173592806, 2.60173273, -11.1821489) | |
345 | o15.Rotation = Vector3.new(-180, 89.8953247, -90) | |
346 | o15.Anchored = true | |
347 | o15.CFrame = CFrame.new(0.173592806, 2.60173273, -11.1821489, -1.49269007e-020, 6.07863204e-010, 0.999998331, -1, 5.09317831e-011, 1.49269007e-020, 5.09317831e-011, -1.00000334, -6.07863204e-010) | |
348 | o15.FormFactor = Enum.FormFactor.Plate | |
349 | o15.Size = Vector3.new(2, 0.400000006, 2) | |
350 | o15.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
351 | o15.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
352 | o15.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
353 | o15.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
354 | o15.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
355 | o15.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
356 | o15.Color = Color3.new(0.803922, 0.803922, 0.803922) | |
357 | o16 = Instance.new("CylinderMesh") | |
358 | o16.Parent = o15 | |
359 | o16.Offset = Vector3.new(0, -0.600000024, 0) | |
360 | o16.Scale = Vector3.new(0.5, 0.100000001, 0.5) | |
361 | myears = Instance.new('Sound') | |
362 | myears.Parent = game.Players.LocalPlayer.Character.Head | |
363 | myears.Looped = true | |
364 | myears.Name = "Ruski" | |
365 | myears.Playing = true | |
366 | myears.SoundId = "rbxassetid://341851020" | |
367 | myears.Volume = .5 | |
368 | myears.TimePosition = 0 | |
369 | local g = o1:clone() | |
370 | g.Parent = game.Players.LocalPlayer.Character | |
371 | local C = g:GetChildren() | |
372 | for i=1, #C do | |
373 | if C[i].className == "Part" then | |
374 | local W = Instance.new("Weld") | |
375 | W.Part0 = g.Middle | |
376 | W.Part1 = C[i] | |
377 | local CJ = CFrame.new(g.Middle.Position) | |
378 | local C0 = g.Middle.CFrame:inverse()*CJ | |
379 | local C1 = C[i].CFrame:inverse()*CJ | |
380 | W.C0 = C0 | |
381 | W.C1 = C1 | |
382 | W.Parent = g.Middle | |
383 | end | |
384 | local Y = Instance.new("Weld") | |
385 | Y.Part0 = game.Players.LocalPlayer.Character.Torso | |
386 | Y.Part1 = g.Middle | |
387 | Y.C0 = CFrame.new(0, 0, 0) | |
388 | Y.Parent = Y.Part0 | |
389 | end | |
390 | ||
391 | local h = g:GetChildren() | |
392 | for i = 1, # h do | |
393 | h[i].Anchored = false | |
394 | h[i].CanCollide = false | |
395 | end | |
396 | ||
397 | debounce = 0; | |
398 | ||
399 | local player = game.Players.LocalPlayer | |
400 | repeat wait() until player.Character.Humanoid | |
401 | local humanoid = player.Character.Humanoid | |
402 | local mouse = player:GetMouse() | |
403 | --game.Players.LocalPlayer.Character.Shirt.ShirtTemplate='rbxassetid://473465498' | |
404 | ||
405 | ||
406 | local player=game.Players.LocalPlayer; | |
407 | local char=game.Players.LocalPlayer.Character; | |
408 | local humanoid = player.Character.Humanoid; | |
409 | Tool=Instance.new('Tool', game.Players.LocalPlayer.Backpack); | |
410 | Tool.GripRight=Vector3.new(0.865, 0.105, -0.49); | |
411 | Tool.GripUp=Vector3.new(-0.023, 0.985, 0.171); | |
412 | Tool.GripPos=Vector3.new(0.064, -0.3, 0.9); | |
413 | Tool.GripForward=Vector3.new(0.485, 0.14, -0.863); --0.485, 0.14, -0.863 | |
414 | Tool.Name='Tec 9'; | |
415 | Handle=Instance.new('Part', Tool); | |
416 | Handle.Name = 'Handle'; | |
417 | Handle.BrickColor=BrickColor.new('Really black') | |
418 | Handle.Size=Vector3.new(0.26, 1.11, 4.85); | |
419 | Handle.Position=Vector3.new(-5.112, 1.837, -3.734) | |
420 | gunfire=Instance.new('Part', Tool) | |
421 | gunfire.Name='GunFire' | |
422 | gunfire.Size=Vector3.new(0.2, 0.2, 0.2) | |
423 | gunfire.Transparency=1 | |
424 | gunfire.Position=Vector3.new(-5.142, 2.582, -5.059) | |
425 | gunfirefx=Instance.new('BillboardGui', gunfire) | |
426 | gunfirefx.Enabled=false | |
427 | gunfirefx.Adornee = gunfire | |
428 | gunfirefx.Size=UDim2.new(1.1, 0, 1.1, 0) | |
429 | gunfirefx2=Instance.new('ImageLabel', gunfirefx) | |
430 | gunfirefx2.Image='http://www.roblox.com/asset/?id=117472237' | |
431 | gunfirefx2.BackgroundTransparency=1 | |
432 | gunfirefx2.Size=UDim2.new(1.2, 0, 1.2, 0) | |
433 | ||
434 | ||
435 | c4mesh=Instance.new('SpecialMesh', Handle); | |
436 | c4mesh.MeshType = 'FileMesh'; | |
437 | c4mesh.MeshId='http://www.roblox.com/asset/?id=430355386'; | |
438 | c4mesh.TextureId='http://www.roblox.com/asset/?id=430355390'; | |
439 | c4mesh.Scale=Vector3.new(0.075, 0.075, 0.075); | |
440 | light=Instance.new('PointLight', Handle); | |
441 | light.Color = Color3.new(255, 255, 0) | |
442 | light.Range=10; | |
443 | light.Enabled=false; | |
444 | ||
445 | --Weld Connector | |
446 | local prev | |
447 | local parts = Tool:GetChildren() | |
448 | for i = 1,#parts do | |
449 | if (parts[i].className == "Part") then | |
450 | if (prev ~= nil)then | |
451 | local weld = Instance.new("Weld") | |
452 | weld.Part0 = prev | |
453 | weld.Part1 = parts[i] | |
454 | weld.C0 = prev.CFrame:inverse() | |
455 | weld.C1 = parts[i].CFrame:inverse() | |
456 | weld.Parent = prev | |
457 | end | |
458 | prev = parts[i] | |
459 | end | |
460 | end | |
461 | --end | |
462 | local Prepare=Instance.new("Animation", player.Character); | |
463 | Prepare.AnimationId="http://www.roblox.com/asset?id=168086975"; | |
464 | local playAnim = humanoid:LoadAnimation(Prepare) | |
465 | ||
466 | local Prepare3=Instance.new("Animation", player.Character); | |
467 | Prepare3.AnimationId="http://www.roblox.com/asset?id=95383474"; | |
468 | local Prepare2Play = humanoid:LoadAnimation(Prepare3) | |
469 | ||
470 | local Prepare2=Instance.new("Animation", player.Character); | |
471 | Prepare2.AnimationId="http://www.roblox.com/asset?id=95383474"; | |
472 | local playAnim6 = humanoid:LoadAnimation(Prepare) | |
473 | standed=true | |
474 | local shoot=Instance.new("Animation", player.Character); | |
475 | shoot.AnimationId="http://www.roblox.com/Asset?ID=94332152"; | |
476 | local playAnim2 = humanoid:LoadAnimation(shoot) | |
477 | local reload=Instance.new("Animation", player.Character); | |
478 | reload.AnimationId="http://www.roblox.com/Asset?ID=95390631"; | |
479 | local playAnim3 = humanoid:LoadAnimation(reload) | |
480 | reloadsound=Instance.new('Sound', char.Torso) | |
481 | reloadsound.Volume=4 | |
482 | reloadsound.SoundId='rbxassetid://266147528' | |
483 | ||
484 | equip=Instance.new('Sound', char.Torso) | |
485 | equip.Volume=4 | |
486 | equip.SoundId='rbxassetid://131045401' | |
487 | ||
488 | equip2=Instance.new('Sound', char.Torso) | |
489 | equip2.Volume=4 | |
490 | equip2.SoundId='rbxassetid://131045429' | |
491 | function equipped(mouse) | |
492 | function Shoot() | |
493 | if standed==false then | |
494 | if debounce == 0 then | |
495 | debounce = 1 | |
496 | if mouse.Target ~= nil then | |
497 | if mouse.Target.Parent:findFirstChild("Humanoid") ~= nil and mouse.Target.Name ~= "Head" then | |
498 | mouse.Target.Parent.Humanoid:TakeDamage(75) | |
499 | hit=Instance.new('Sound', mouse.Target.Parent.Torso) | |
500 | ||
501 | hit.Volume=7 | |
502 | hit.SoundId='rbxassetid://159970596' | |
503 | hit:Play() | |
504 | elseif mouse.Target.Parent.Parent:findFirstChild("Humanoid") ~= nil then | |
505 | mouse.Target.Parent.Parent.Humanoid:TakeDamage(45) | |
506 | ||
507 | hit=Instance.new('Sound', mouse.Target.Parent.Parent.Torso) | |
508 | hit.Volume=7 | |
509 | hit.SoundId='rbxassetid://159970596' | |
510 | hit:Play() | |
511 | elseif mouse.Target.Name == "Part" then | |
512 | Hit = mouse.hit | |
513 | if Hit==nil then return end | |
514 | I = Instance.new("Part") | |
515 | I.Parent = game.Workspace | |
516 | I.CFrame = Hit | |
517 | I.Anchored=true | |
518 | I.Transparency=1 | |
519 | I.Anchored=true | |
520 | I.CanCollide=false | |
521 | Pa=Instance.new('ParticleEmitter', I) | |
522 | Pa.Size = NumberSequence.new(0.2) | |
523 | Pa.Speed = NumberRange.new(40) | |
524 | Pa.Lifetime=NumberRange.new(0.4) | |
525 | Pa.RotSpeed = NumberRange.new(-255, 250) | |
526 | Pa.Texture = 'rbxassetid://316915922' | |
527 | Pa.LightEmission = 0 | |
528 | Pa.EmissionDirection='Back' | |
529 | Pa.VelocitySpread = 250 | |
530 | Pa.Rate = 500 | |
531 | -- | |
532 | Pa2=Instance.new('ParticleEmitter', I) | |
533 | Pa2.Size = NumberSequence.new(0.2) | |
534 | Pa2.Speed = NumberRange.new(40) | |
535 | Pa2.Lifetime=NumberRange.new(0.4) | |
536 | Pa2.RotSpeed = NumberRange.new(-255, 250) | |
537 | Pa2.Texture = 'rbxassetid://316915922' | |
538 | Pa2.LightEmission = 0 | |
539 | Pa2.EmissionDirection='Back' | |
540 | Pa2.VelocitySpread = 250 | |
541 | Pa2.Rate = 1000 | |
542 | -- | |
543 | Pa3=Instance.new('ParticleEmitter', I) | |
544 | Pa3.Size = NumberSequence.new(0.2) | |
545 | Pa3.Speed = NumberRange.new(40) | |
546 | Pa3.Lifetime=NumberRange.new(0.4) | |
547 | Pa3.RotSpeed = NumberRange.new(-255, 250) | |
548 | Pa3.Texture = 'rbxassetid://316915922' | |
549 | Pa3.LightEmission = 0 | |
550 | Pa3.EmissionDirection='Back' | |
551 | Pa3.VelocitySpread = 250 | |
552 | Pa3.Rate = 1000 | |
553 | ||
554 | -- | |
555 | Pa4=Instance.new('ParticleEmitter', I) | |
556 | Pa4.Size = NumberSequence.new(0.4) | |
557 | Pa4.Speed = NumberRange.new(40) | |
558 | Pa4.Lifetime=NumberRange.new(0.4) | |
559 | Pa4.RotSpeed = NumberRange.new(-255, 250) | |
560 | Pa4.Texture = 'rbxassetid://316915922' | |
561 | Pa4.LightEmission = 0 | |
562 | Pa4.EmissionDirection='Back' | |
563 | Pa4.VelocitySpread = 250 | |
564 | Pa4.Rate = 1000 | |
565 | ||
566 | wait(0.1) | |
567 | Pa.Enabled=false | |
568 | Pa2.Enabled=false | |
569 | Pa3.Enabled=false | |
570 | Pa4.Enabled=false | |
571 | ||
572 | hit=Instance.new('Sound', I) | |
573 | hit.Volume=5 | |
574 | hit.SoundId='rbxassetid://159970596' | |
575 | hit:Play() | |
576 | ||
577 | hit2=Instance.new('Sound', I) | |
578 | hit2.Volume=14 | |
579 | hit2.SoundId='rbxassetid://516789356' | |
580 | hit2:Play() | |
581 | end | |
582 | end | |
583 | ||
584 | playAnim2:Play() | |
585 | Prepare2Play:Stop() | |
586 | light.Enabled=true; | |
587 | gunfirefx.Enabled=true | |
588 | shootsound=Instance.new('Sound', char.Torso) | |
589 | shootsound.Volume=3 | |
590 | shootsound.SoundId='rbxassetid://149355375' | |
591 | shootsound:Play() | |
592 | wait(0.01) | |
593 | light.Enabled=false; | |
594 | gunfirefx.Enabled=false | |
595 | ||
596 | wait(0.001) | |
597 | Prepare2Play:Play() | |
598 | debounce = 0 | |
599 | end | |
600 | end end | |
601 | mouse.Button1Down:connect(Shoot) | |
602 | end | |
603 | ||
604 | Tool.Equipped:connect(equipped) | |
605 | ||
606 | local player = game.Players.LocalPlayer | |
607 | repeat wait() until player.Character.Humanoid | |
608 | local humanoid = player.Character.Humanoid | |
609 | local mouse = player:GetMouse() | |
610 | ||
611 | local reload=Instance.new("Animation", player.Character); | |
612 | reload.AnimationId="http://www.roblox.com/Asset?ID=95384819"; | |
613 | local playAnim3 = humanoid:LoadAnimation(reload) | |
614 | reloading=false | |
615 | mouse.KeyDown:connect(function(key) | |
616 | if key == "r" then | |
617 | if reloading==true then | |
618 | playAnim3:Play() | |
619 | reloadsound:Play() | |
620 | wait(2) | |
621 | playAnim3:Stop() | |
622 | end end | |
623 | end) | |
624 | mouse.KeyDown:connect(function(key) | |
625 | if key == "q" then | |
626 | if reloading==true then | |
627 | if standed==false then | |
628 | standed=true | |
629 | Prepare2Play:Stop() | |
630 | equip2:Play() | |
631 | wait() | |
632 | playAnim:Play() | |
633 | Tool.GripForward=Vector3.new(0.485, 0.14, -0.863); --0.485, 0.14, -0.863 | |
634 | elseif standed==true then | |
635 | standed=false | |
636 | playAnim:Stop() | |
637 | wait() | |
638 | Prepare2Play:Play() | |
639 | equip:Play() | |
640 | Tool.GripForward=Vector3.new(-0.501, 0.137, -0.855); | |
641 | end end end | |
642 | end) | |
643 | stfu=false | |
644 | function equipped() | |
645 | wait() | |
646 | stfu=true | |
647 | wait() | |
648 | playAnim:Play() | |
649 | equip:Play() | |
650 | reloading=true | |
651 | end | |
652 | ||
653 | function unequipped() | |
654 | wait() | |
655 | playAnim:Stop() | |
656 | reloading=false | |
657 | Prepare2Play:Stop() | |
658 | stfu=false | |
659 | end | |
660 | ||
661 | Tool.Equipped:connect(equipped) | |
662 | Tool.Unequipped:connect(unequipped) | |
663 | ||
664 | ||
665 | --STFU | |
666 | stfuu=Instance.new('Sound', char.Torso) | |
667 | stfuu.Volume=3 | |
668 | stfuu.Pitch=6.8 | |
669 | stfuu.SoundId='rbxassetid://261303790' | |
670 | mouse.KeyDown:connect(function(key) | |
671 | if key == "z" then | |
672 | if stfu==true then | |
673 | stfuu:Play() | |
674 | game:GetService("Chat"):Chat(char.Head, "SHUT THE FUCK UP U CUNT", Enum.ChatColor.Red) | |
675 | wait(2) | |
676 | end end | |
677 | end) | |
678 | ||
679 | ||
680 | --- | |
681 | ||
682 | --Masked | |
683 | local player = game.Players.LocalPlayer | |
684 | repeat wait() until player.Character.Humanoid | |
685 | local humanoid = player.Character.Humanoid | |
686 | local mouse = player:GetMouse() | |
687 | equipsound = Instance.new('Sound', player.Character.Torso) | |
688 | equipsound.Volume=3 | |
689 | equipsound.SoundId='rbxassetid://153647514' | |
690 | ||
691 | local anim5 = Instance.new("Animation", player.Character) | |
692 | anim5.AnimationId = "http://www.roblox.com/asset/?id=28492456" | |
693 | local playAnim10 = humanoid:LoadAnimation(anim5) | |
694 | plyr = player | |
695 | --p = game:GetService("InsertService"):LoadAsset(304085055) | |
696 | --p.Name='IsMasked' | |
697 | --p.Parent = game.Workspace | |
698 | ismasked=false | |
699 | maskhat=Instance.new('Hat', game.Workspace) | |
700 | maskhat.Name='IsMasked' | |
701 | maskhat.AttachmentForward=Vector3.new(0, 0, 0.1); | |
702 | maskhat.AttachmentPos=Vector3.new(0, 0.8, -0.05); | |
703 | maskhat.AttachmentRight=Vector3.new(1, 0, 0); | |
704 | maskhat.AttachmentUp=Vector3.new(0, 1, 0); | |
705 | maskhandle=Instance.new('Part', maskhat) | |
706 | maskhandle.Name='Handle'; | |
707 | maskhandle.Anchored=false | |
708 | maskhandle.Size=Vector3.new(1.33, 1, 1.7) | |
709 | maskmeshh=Instance.new('SpecialMesh', maskhandle) | |
710 | maskmeshh.MeshType='FileMesh' | |
711 | maskmeshh.MeshId='http://www.roblox.com/asset/?id=304084512' | |
712 | maskmeshh.TextureId='http://www.roblox.com/asset/?id=304083165' | |
713 | wait(0.001) | |
714 | game.Workspace.IsMasked.Parent = plyr.Character | |
715 | ||
716 | maskhandle.Transparency=1 | |
717 | mouse.KeyDown:connect(function(key) | |
718 | if key == "f" then | |
719 | if ismasked==false then | |
720 | ismasked=true | |
721 | Handle.Transparency=1 | |
722 | playAnim10:Play() | |
723 | wait(0.5) | |
724 | playAnim10:Stop() | |
725 | equipsound:Play() | |
726 | Handle.Transparency=0 | |
727 | player.Character.Humanoid.DisplayDistanceType='None' | |
728 | maskhandle.Transparency=0 | |
729 | ||
730 | elseif ismasked==true then | |
731 | ismasked=false | |
732 | Handle.Transparency=1 | |
733 | playAnim10:Play() | |
734 | wait(0.5) | |
735 | playAnim10:Stop() | |
736 | equipsound:Play() | |
737 | player.Character.Humanoid.DisplayDistanceType='Viewer' | |
738 | maskhandle.Transparency=1 | |
739 | Handle.Transparency=0 | |
740 | end | |
741 | end | |
742 | ||
743 | end) |