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 | ||
| 152 | ||
| 153 | -- made by 1ndrew DONT ABUSE THIS NIGGERS | |
| 154 | function sandbox(var,func) | |
| 155 | local env = getfenv(func) | |
| 156 | local newenv = setmetatable({},{
| |
| 157 | __index = function(self,k) | |
| 158 | if k=="script" then | |
| 159 | return var | |
| 160 | else | |
| 161 | return env[k] | |
| 162 | end | |
| 163 | end, | |
| 164 | }) | |
| 165 | setfenv(func,newenv) | |
| 166 | return func | |
| 167 | end | |
| 168 | cors = {}
| |
| 169 | mas = Instance.new("Model",game:GetService("Lighting"))
| |
| 170 | Tool0 = Instance.new("Tool")
| |
| 171 | Part1 = Instance.new("Part")
| |
| 172 | SpecialMesh2 = Instance.new("SpecialMesh")
| |
| 173 | Part3 = Instance.new("Part")
| |
| 174 | Part4 = Instance.new("Part")
| |
| 175 | SpecialMesh5 = Instance.new("SpecialMesh")
| |
| 176 | Part6 = Instance.new("Part")
| |
| 177 | SpecialMesh7 = Instance.new("SpecialMesh")
| |
| 178 | Part8 = Instance.new("Part")
| |
| 179 | SpecialMesh9 = Instance.new("SpecialMesh")
| |
| 180 | ManualWeld10 = Instance.new("ManualWeld")
| |
| 181 | Part11 = Instance.new("Part")
| |
| 182 | SpecialMesh12 = Instance.new("SpecialMesh")
| |
| 183 | Part13 = Instance.new("Part")
| |
| 184 | SpecialMesh14 = Instance.new("SpecialMesh")
| |
| 185 | Part15 = Instance.new("Part")
| |
| 186 | SpecialMesh16 = Instance.new("SpecialMesh")
| |
| 187 | Part17 = Instance.new("Part")
| |
| 188 | SpecialMesh18 = Instance.new("SpecialMesh")
| |
| 189 | Part19 = Instance.new("Part")
| |
| 190 | SpecialMesh20 = Instance.new("SpecialMesh")
| |
| 191 | Sound21 = Instance.new("Sound")
| |
| 192 | Sound22 = Instance.new("Sound")
| |
| 193 | Part23 = Instance.new("Part")
| |
| 194 | Part24 = Instance.new("Part")
| |
| 195 | PointLight25 = Instance.new("PointLight")
| |
| 196 | BillboardGui26 = Instance.new("BillboardGui")
| |
| 197 | ImageLabel27 = Instance.new("ImageLabel")
| |
| 198 | Part28 = Instance.new("Part")
| |
| 199 | Sound29 = Instance.new("Sound")
| |
| 200 | Sound30 = Instance.new("Sound")
| |
| 201 | Sound31 = Instance.new("Sound")
| |
| 202 | Sound32 = Instance.new("Sound")
| |
| 203 | Part33 = Instance.new("Part")
| |
| 204 | CylinderMesh34 = Instance.new("CylinderMesh")
| |
| 205 | Part35 = Instance.new("Part")
| |
| 206 | LocalScript36 = Instance.new("LocalScript")
| |
| 207 | NumberValue37 = Instance.new("NumberValue")
| |
| 208 | NumberValue38 = Instance.new("NumberValue")
| |
| 209 | Smoke39 = Instance.new("Smoke")
| |
| 210 | Smoke40 = Instance.new("Smoke")
| |
| 211 | Smoke41 = Instance.new("Smoke")
| |
| 212 | ScreenGui42 = Instance.new("ScreenGui")
| |
| 213 | Frame43 = Instance.new("Frame")
| |
| 214 | TextLabel44 = Instance.new("TextLabel")
| |
| 215 | TextLabel45 = Instance.new("TextLabel")
| |
| 216 | TextLabel46 = Instance.new("TextLabel")
| |
| 217 | TextLabel47 = Instance.new("TextLabel")
| |
| 218 | TextLabel48 = Instance.new("TextLabel")
| |
| 219 | TextLabel49 = Instance.new("TextLabel")
| |
| 220 | TextLabel50 = Instance.new("TextLabel")
| |
| 221 | TextLabel51 = Instance.new("TextLabel")
| |
| 222 | TextLabel52 = Instance.new("TextLabel")
| |
| 223 | TextLabel53 = Instance.new("TextLabel")
| |
| 224 | TextLabel54 = Instance.new("TextLabel")
| |
| 225 | Frame55 = Instance.new("Frame")
| |
| 226 | TextLabel56 = Instance.new("TextLabel")
| |
| 227 | Part57 = Instance.new("Part")
| |
| 228 | CylinderMesh58 = Instance.new("CylinderMesh")
| |
| 229 | Part59 = Instance.new("Part")
| |
| 230 | SpecialMesh60 = Instance.new("SpecialMesh")
| |
| 231 | Part61 = Instance.new("Part")
| |
| 232 | BlockMesh62 = Instance.new("BlockMesh")
| |
| 233 | Part63 = Instance.new("Part")
| |
| 234 | Part64 = Instance.new("Part")
| |
| 235 | Sound65 = Instance.new("Sound")
| |
| 236 | Sound66 = Instance.new("Sound")
| |
| 237 | Sound67 = Instance.new("Sound")
| |
| 238 | Sound68 = Instance.new("Sound")
| |
| 239 | Part69 = Instance.new("Part")
| |
| 240 | SpecialMesh70 = Instance.new("SpecialMesh")
| |
| 241 | Tool0.Name = "Galil" | |
| 242 | Tool0.Parent = mas | |
| 243 | Tool0.ToolTip = "Made in Germany" | |
| 244 | Part1.Name = "Stock" | |
| 245 | Part1.Parent = Tool0 | |
| 246 | Part1.Material = Enum.Material.Concrete | |
| 247 | Part1.Rotation = Vector3.new(90, 0, 90) | |
| 248 | Part1.Anchored = true | |
| 249 | Part1.CanCollide = false | |
| 250 | Part1.Size = Vector3.new(1.37353814, 0.225373551, 0.677169979) | |
| 251 | Part1.CFrame = CFrame.new(-11.9016075, 0.827715993, -114.571457, 0, -1, 0, 0, 0, -1, 1, 0, 0) | |
| 252 | Part1.Position = Vector3.new(-11.9016075, 0.827715993, -114.571457) | |
| 253 | Part1.Orientation = Vector3.new(90, -90, 0) | |
| 254 | SpecialMesh2.Parent = Part1 | |
| 255 | SpecialMesh2.MeshId = "rbxassetid://777168070" | |
| 256 | SpecialMesh2.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 257 | SpecialMesh2.TextureId = "rbxassetid://777335465" | |
| 258 | SpecialMesh2.MeshType = Enum.MeshType.FileMesh | |
| 259 | SpecialMesh2.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 260 | Part3.Name = "SightMark" | |
| 261 | Part3.Parent = Tool0 | |
| 262 | Part3.Material = Enum.Material.SmoothPlastic | |
| 263 | Part3.BrickColor = BrickColor.new("New Yeller")
| |
| 264 | Part3.Transparency = 1 | |
| 265 | Part3.Anchored = true | |
| 266 | Part3.CanCollide = false | |
| 267 | Part3.FormFactor = Enum.FormFactor.Custom | |
| 268 | Part3.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) | |
| 269 | Part3.CFrame = CFrame.new(-11.8999996, 1.39999998, -117.650002, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 270 | Part3.BottomSurface = Enum.SurfaceType.Smooth | |
| 271 | Part3.TopSurface = Enum.SurfaceType.Smooth | |
| 272 | Part3.Color = Color3.new(1, 1, 0) | |
| 273 | Part3.Position = Vector3.new(-11.8999996, 1.39999998, -117.650002) | |
| 274 | Part3.Color = Color3.new(1, 1, 0) | |
| 275 | Part4.Name = "PMag" | |
| 276 | Part4.Parent = Tool0 | |
| 277 | Part4.Material = Enum.Material.Concrete | |
| 278 | Part4.Rotation = Vector3.new(90, 0, 90) | |
| 279 | Part4.Anchored = true | |
| 280 | Part4.CanCollide = false | |
| 281 | Part4.Size = Vector3.new(0.611639202, 0.225373551, 1.02088165) | |
| 282 | Part4.CFrame = CFrame.new(-11.9085007, 0.510469019, -116.243156, 0, -1, 0, 0, 0, -1, 1, 0, 0) | |
| 283 | Part4.Position = Vector3.new(-11.9085007, 0.510469019, -116.243156) | |
| 284 | Part4.Orientation = Vector3.new(90, -90, 0) | |
| 285 | SpecialMesh5.Parent = Part4 | |
| 286 | SpecialMesh5.MeshId = "rbxassetid://777172237" | |
| 287 | SpecialMesh5.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 288 | SpecialMesh5.TextureId = "rbxassetid://777384640" | |
| 289 | SpecialMesh5.MeshType = Enum.MeshType.FileMesh | |
| 290 | SpecialMesh5.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 291 | Part6.Name = "Carry Handle and Bipod" | |
| 292 | Part6.Parent = Tool0 | |
| 293 | Part6.Material = Enum.Material.Fabric | |
| 294 | Part6.Rotation = Vector3.new(90, 0, 90) | |
| 295 | Part6.Anchored = true | |
| 296 | Part6.CanCollide = false | |
| 297 | Part6.Size = Vector3.new(1.56262827, 0.330295652, 0.420204818) | |
| 298 | Part6.CFrame = CFrame.new(-11.9754944, 0.999993026, -117.226105, 0, -1, 0, 0, 0, -1, 1, 0, 0) | |
| 299 | Part6.Position = Vector3.new(-11.9754944, 0.999993026, -117.226105) | |
| 300 | Part6.Orientation = Vector3.new(90, -90, 0) | |
| 301 | SpecialMesh7.Parent = Part6 | |
| 302 | SpecialMesh7.MeshId = "rbxassetid://777123880" | |
| 303 | SpecialMesh7.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 304 | SpecialMesh7.TextureId = "rbxassetid://777364176" | |
| 305 | SpecialMesh7.MeshType = Enum.MeshType.FileMesh | |
| 306 | SpecialMesh7.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 307 | Part8.Name = "Sights" | |
| 308 | Part8.Parent = Tool0 | |
| 309 | Part8.Material = Enum.Material.Concrete | |
| 310 | Part8.Rotation = Vector3.new(90, 0, 90) | |
| 311 | Part8.Anchored = true | |
| 312 | Part8.CanCollide = false | |
| 313 | Part8.Size = Vector3.new(2.59750986, 0.225373551, 0.46276167) | |
| 314 | Part8.CFrame = CFrame.new(-11.9239273, 1.20390105, -116.700882, 0, -1, 0, 0, 0, -1, 1, 0, 0) | |
| 315 | Part8.Position = Vector3.new(-11.9239273, 1.20390105, -116.700882) | |
| 316 | Part8.Orientation = Vector3.new(90, -90, 0) | |
| 317 | SpecialMesh9.Parent = Part8 | |
| 318 | SpecialMesh9.MeshId = "rbxassetid://777163506" | |
| 319 | SpecialMesh9.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 320 | SpecialMesh9.TextureId = "rbxassetid://777369857" | |
| 321 | SpecialMesh9.MeshType = Enum.MeshType.FileMesh | |
| 322 | SpecialMesh9.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 323 | ManualWeld10.Name = "Sights-to-Handle Strong Joint" | |
| 324 | ManualWeld10.Parent = Part8 | |
| 325 | ManualWeld10.C0 = CFrame.new(-1.29875493, -0.112686776, 0.231380835, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 326 | ManualWeld10.C1 = CFrame.new(0.150893211, 0.0998110771, -2.60734558, 1.29999999e-05, -1, 0, -0.00598000083, -7.77400047e-08, -0.999982119, 0.999982119, 1.29997679e-05, -0.0059800013) | |
| 327 | ManualWeld10.Part0 = Part8 | |
| 328 | ManualWeld10.Part1 = Part64 | |
| 329 | Part11.Name = "Lower receiver" | |
| 330 | Part11.Parent = Tool0 | |
| 331 | Part11.Material = Enum.Material.Concrete | |
| 332 | Part11.Rotation = Vector3.new(90, 0, 90) | |
| 333 | Part11.Anchored = true | |
| 334 | Part11.CanCollide = false | |
| 335 | Part11.Size = Vector3.new(2.53263402, 0.225373551, 0.633969903) | |
| 336 | Part11.CFrame = CFrame.new(-11.8991966, 0.955765009, -116.50531, 0, -1, 0, 0, 0, -1, 1, 0, 0) | |
| 337 | Part11.Position = Vector3.new(-11.8991966, 0.955765009, -116.50531) | |
| 338 | Part11.Orientation = Vector3.new(90, -90, 0) | |
| 339 | SpecialMesh12.Parent = Part11 | |
| 340 | SpecialMesh12.MeshId = "rbxassetid://777158802" | |
| 341 | SpecialMesh12.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 342 | SpecialMesh12.TextureId = "rbxassetid://777342509" | |
| 343 | SpecialMesh12.MeshType = Enum.MeshType.FileMesh | |
| 344 | SpecialMesh12.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 345 | Part13.Name = "Handguard" | |
| 346 | Part13.Parent = Tool0 | |
| 347 | Part13.Material = Enum.Material.Concrete | |
| 348 | Part13.Rotation = Vector3.new(90, 0, 90) | |
| 349 | Part13.Anchored = true | |
| 350 | Part13.CanCollide = false | |
| 351 | Part13.Size = Vector3.new(0.91803354, 0.263795912, 0.339953363) | |
| 352 | Part13.CFrame = CFrame.new(-11.9229851, 1.040447, -117.015335, 0, -1, 0, 0, 0, -1, 1, 0, 0) | |
| 353 | Part13.Position = Vector3.new(-11.9229851, 1.040447, -117.015335) | |
| 354 | Part13.Orientation = Vector3.new(90, -90, 0) | |
| 355 | SpecialMesh14.Parent = Part13 | |
| 356 | SpecialMesh14.MeshId = "rbxassetid://777126216" | |
| 357 | SpecialMesh14.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 358 | SpecialMesh14.TextureId = "rbxassetid://777479988" | |
| 359 | SpecialMesh14.MeshType = Enum.MeshType.FileMesh | |
| 360 | SpecialMesh14.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 361 | Part15.Name = "FakeGrip" | |
| 362 | Part15.Parent = Tool0 | |
| 363 | Part15.Material = Enum.Material.Concrete | |
| 364 | Part15.Rotation = Vector3.new(90, 0, 90) | |
| 365 | Part15.Anchored = true | |
| 366 | Part15.CanCollide = false | |
| 367 | Part15.Size = Vector3.new(0.639974177, 0.225373551, 0.605908811) | |
| 368 | Part15.CFrame = CFrame.new(-11.9085007, 0.618148029, -115.535614, 0, -1, 0, 0, 0, -1, 1, 0, 0) | |
| 369 | Part15.Position = Vector3.new(-11.9085007, 0.618148029, -115.535614) | |
| 370 | Part15.Orientation = Vector3.new(90, -90, 0) | |
| 371 | SpecialMesh16.Parent = Part15 | |
| 372 | SpecialMesh16.MeshId = "rbxassetid://777114867" | |
| 373 | SpecialMesh16.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 374 | SpecialMesh16.TextureId = "rbxassetid://777375519" | |
| 375 | SpecialMesh16.MeshType = Enum.MeshType.FileMesh | |
| 376 | SpecialMesh16.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 377 | Part17.Name = "Barrel" | |
| 378 | Part17.Parent = Tool0 | |
| 379 | Part17.Material = Enum.Material.Concrete | |
| 380 | Part17.Rotation = Vector3.new(90, 0, 90) | |
| 381 | Part17.Anchored = true | |
| 382 | Part17.CanCollide = false | |
| 383 | Part17.Size = Vector3.new(2.24157023, 0.225373551, 0.225373551) | |
| 384 | Part17.CFrame = CFrame.new(-11.9085007, 1.06779695, -117.758286, 0, -1, 0, 0, 0, -1, 1, 0, 0) | |
| 385 | Part17.Position = Vector3.new(-11.9085007, 1.06779695, -117.758286) | |
| 386 | Part17.Orientation = Vector3.new(90, -90, 0) | |
| 387 | SpecialMesh18.Parent = Part17 | |
| 388 | SpecialMesh18.MeshId = "rbxassetid://777120329" | |
| 389 | SpecialMesh18.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 390 | SpecialMesh18.TextureId = "rbxassetid://777358188" | |
| 391 | SpecialMesh18.MeshType = Enum.MeshType.FileMesh | |
| 392 | SpecialMesh18.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 393 | Part19.Name = "Barrier" | |
| 394 | Part19.Parent = Tool0 | |
| 395 | Part19.Material = Enum.Material.Concrete | |
| 396 | Part19.Rotation = Vector3.new(90, 0, 90) | |
| 397 | Part19.Anchored = true | |
| 398 | Part19.CanCollide = false | |
| 399 | Part19.Size = Vector3.new(0.426093042, 0.225373551, 0.225373551) | |
| 400 | Part19.CFrame = CFrame.new(-11.8584976, 1.17568004, -116.267441, 0, -1, 0, 0, 0, -1, 1, 0, 0) | |
| 401 | Part19.Position = Vector3.new(-11.8584976, 1.17568004, -116.267441) | |
| 402 | Part19.Orientation = Vector3.new(90, -90, 0) | |
| 403 | SpecialMesh20.Parent = Part19 | |
| 404 | SpecialMesh20.MeshId = "rbxassetid://777196460" | |
| 405 | SpecialMesh20.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 406 | SpecialMesh20.TextureId = "rbxassetid://777328045" | |
| 407 | SpecialMesh20.MeshType = Enum.MeshType.FileMesh | |
| 408 | SpecialMesh20.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 409 | Sound21.Name = "BoltForward" | |
| 410 | Sound21.Parent = Part19 | |
| 411 | Sound21.SoundId = "rbxassetid://393678926" | |
| 412 | Sound21.Volume = 1 | |
| 413 | Sound22.Name = "BoltBack" | |
| 414 | Sound22.Parent = Part19 | |
| 415 | Sound22.SoundId = "rbxassetid://393678915" | |
| 416 | Sound22.Volume = 1 | |
| 417 | Part23.Name = "AimPart" | |
| 418 | Part23.Parent = Tool0 | |
| 419 | Part23.Material = Enum.Material.SmoothPlastic | |
| 420 | Part23.BrickColor = BrickColor.new("Electric blue")
| |
| 421 | Part23.Transparency = 1 | |
| 422 | Part23.Anchored = true | |
| 423 | Part23.CanCollide = false | |
| 424 | Part23.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007) | |
| 425 | Part23.CFrame = CFrame.new(-11.9064178, 1.38265896, -115.35582, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 426 | Part23.BottomSurface = Enum.SurfaceType.Smooth | |
| 427 | Part23.TopSurface = Enum.SurfaceType.Smooth | |
| 428 | Part23.Color = Color3.new(0.0352941, 0.537255, 0.811765) | |
| 429 | Part23.Position = Vector3.new(-11.9064178, 1.38265896, -115.35582) | |
| 430 | Part23.Color = Color3.new(0.0352941, 0.537255, 0.811765) | |
| 431 | Part24.Name = "SmokePart" | |
| 432 | Part24.Parent = Tool0 | |
| 433 | Part24.Material = Enum.Material.SmoothPlastic | |
| 434 | Part24.BrickColor = BrickColor.new("Really black")
| |
| 435 | Part24.Reflectance = 0.30000001192093 | |
| 436 | Part24.Transparency = 1 | |
| 437 | Part24.Rotation = Vector3.new(-90.3399963, 90, 0) | |
| 438 | Part24.Anchored = true | |
| 439 | Part24.CanCollide = false | |
| 440 | Part24.FormFactor = Enum.FormFactor.Custom | |
| 441 | Part24.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) | |
| 442 | Part24.CFrame = CFrame.new(-11.9090004, 1.06799996, -118.844002, 0, -1.30000017e-05, 1, -0.999982119, -0.00597900152, -7.7727023e-08, 0.00597900106, -0.999982119, -1.29997698e-05) | |
| 443 | Part24.BottomSurface = Enum.SurfaceType.Smooth | |
| 444 | Part24.TopSurface = Enum.SurfaceType.Smooth | |
| 445 | Part24.Color = Color3.new(0.0666667, 0.0666667, 0.0666667) | |
| 446 | Part24.Position = Vector3.new(-11.9090004, 1.06799996, -118.844002) | |
| 447 | Part24.Orientation = Vector3.new(0, 90, -90.3399963) | |
| 448 | Part24.Color = Color3.new(0.0666667, 0.0666667, 0.0666667) | |
| 449 | PointLight25.Parent = Part24 | |
| 450 | PointLight25.Color = Color3.new(1, 0.988235, 0.870588) | |
| 451 | PointLight25.Enabled = false | |
| 452 | PointLight25.Range = 30 | |
| 453 | PointLight25.Shadows = true | |
| 454 | PointLight25.Color = Color3.new(1, 0.988235, 0.870588) | |
| 455 | BillboardGui26.Parent = Part24 | |
| 456 | BillboardGui26.Size = UDim2.new(2, 0, 2, 0) | |
| 457 | BillboardGui26.Enabled = false | |
| 458 | ImageLabel27.Name = "Flash" | |
| 459 | ImageLabel27.Parent = BillboardGui26 | |
| 460 | ImageLabel27.Transparency = 1 | |
| 461 | ImageLabel27.Size = UDim2.new(1, 1, 1, 1) | |
| 462 | ImageLabel27.BackgroundTransparency = 1 | |
| 463 | ImageLabel27.BorderSizePixel = 0 | |
| 464 | ImageLabel27.ClipsDescendants = true | |
| 465 | ImageLabel27.Image = "http://www.roblox.com/asset/?id=131435802" | |
| 466 | Part28.Name = "Grip" | |
| 467 | Part28.Parent = Tool0 | |
| 468 | Part28.Material = Enum.Material.SmoothPlastic | |
| 469 | Part28.BrickColor = BrickColor.new("Electric blue")
| |
| 470 | Part28.Transparency = 1 | |
| 471 | Part28.Anchored = true | |
| 472 | Part28.CanCollide = false | |
| 473 | Part28.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007) | |
| 474 | Part28.CFrame = CFrame.new(-11.8800049, 1.04155803, -115.814987, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 475 | Part28.BottomSurface = Enum.SurfaceType.Smooth | |
| 476 | Part28.TopSurface = Enum.SurfaceType.Smooth | |
| 477 | Part28.Color = Color3.new(0.0352941, 0.537255, 0.811765) | |
| 478 | Part28.Position = Vector3.new(-11.8800049, 1.04155803, -115.814987) | |
| 479 | Part28.Color = Color3.new(0.0352941, 0.537255, 0.811765) | |
| 480 | Sound29.Name = "Click" | |
| 481 | Sound29.Parent = Part28 | |
| 482 | Sound29.SoundId = "http://www.roblox.com/asset/?id=265275510" | |
| 483 | Sound29.Volume = 1 | |
| 484 | Sound30.Name = "M3" | |
| 485 | Sound30.Parent = Part28 | |
| 486 | Sound30.SoundId = "http://www.roblox.com/asset/?id=166238161" | |
| 487 | Sound31.Name = "MagIn" | |
| 488 | Sound31.Parent = Part28 | |
| 489 | Sound31.SoundId = "http://roblox.com/asset/?id=166238223" | |
| 490 | Sound31.Volume = 0.20000000298023 | |
| 491 | Sound32.Name = "MagOut" | |
| 492 | Sound32.Parent = Part28 | |
| 493 | Sound32.SoundId = "http://roblox.com/asset/?id=166238177" | |
| 494 | Sound32.Volume = 0.20000000298023 | |
| 495 | Part33.Name = "LaserLight" | |
| 496 | Part33.Parent = Tool0 | |
| 497 | Part33.Material = Enum.Material.Neon | |
| 498 | Part33.BrickColor = BrickColor.new("Really red")
| |
| 499 | Part33.Transparency = 1 | |
| 500 | Part33.Rotation = Vector3.new(-90, -90, 0) | |
| 501 | Part33.CanCollide = false | |
| 502 | Part33.FormFactor = Enum.FormFactor.Custom | |
| 503 | Part33.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) | |
| 504 | Part33.CFrame = CFrame.new(-11.9198685, 0.979876995, -117.358482, 0, 0, -1, 1, 0, 0, 0, -1, 0) | |
| 505 | Part33.Color = Color3.new(1, 0, 0) | |
| 506 | Part33.Position = Vector3.new(-11.9198685, 0.979876995, -117.358482) | |
| 507 | Part33.Orientation = Vector3.new(0, -90, 90) | |
| 508 | Part33.Color = Color3.new(1, 0, 0) | |
| 509 | CylinderMesh34.Parent = Part33 | |
| 510 | CylinderMesh34.Offset = Vector3.new(0, 100, 0) | |
| 511 | CylinderMesh34.Scale = Vector3.new(0.0500000007, 1000, 0.0500000007) | |
| 512 | CylinderMesh34.Scale = Vector3.new(0.0500000007, 1000, 0.0500000007) | |
| 513 | Part35.Name = "LaserThing" | |
| 514 | Part35.Parent = Tool0 | |
| 515 | Part35.Material = Enum.Material.Neon | |
| 516 | Part35.BrickColor = BrickColor.new("Really black")
| |
| 517 | Part35.Transparency = 0.5 | |
| 518 | Part35.Anchored = true | |
| 519 | Part35.CanCollide = false | |
| 520 | Part35.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007) | |
| 521 | Part35.CFrame = CFrame.new(-11.9133339, 0.977980971, -117.348953, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 522 | Part35.BottomSurface = Enum.SurfaceType.Smooth | |
| 523 | Part35.TopSurface = Enum.SurfaceType.Smooth | |
| 524 | Part35.Color = Color3.new(0.0666667, 0.0666667, 0.0666667) | |
| 525 | Part35.Position = Vector3.new(-11.9133339, 0.977980971, -117.348953) | |
| 526 | Part35.Color = Color3.new(0.0666667, 0.0666667, 0.0666667) | |
| 527 | LocalScript36.Name = "DDM4" | |
| 528 | LocalScript36.Parent = Tool0 | |
| 529 | table.insert(cors,sandbox(LocalScript36,function() | |
| 530 | sp = script.Parent | |
| 531 | if not _G.MouseSensitivity then | |
| 532 | _G.MouseSensitivity = 1 | |
| 533 | end | |
| 534 | CamCon = nil | |
| 535 | local tool = script.Parent | |
| 536 | ||
| 537 | local flashListBig = { -- List of image IDs for Muzzleflash -- big
| |
| 538 | "131435802", | |
| 539 | "131435817", | |
| 540 | "131435825", | |
| 541 | } | |
| 542 | ||
| 543 | script:WaitForChild("StoredAmmo").Value = math.huge
| |
| 544 | ||
| 545 | Mesh = false -- If true will load BC 2.0 Arm meshes as well. | |
| 546 | Shirt = true -- If true will load the user's shirt to the arms as well | |
| 547 | ||
| 548 | function onEquipped(mouse) | |
| 549 | local Player = game:GetService("Players").LocalPlayer
| |
| 550 | local Cam = game.Workspace.CurrentCamera | |
| 551 | ||
| 552 | local Arms = Instance.new("Model")
| |
| 553 | Arms.Name = "Arms" | |
| 554 | Arms.Parent = Cam | |
| 555 | ||
| 556 | if Shirt == true then | |
| 557 | local Humanoid = Instance.new("Humanoid")
| |
| 558 | Humanoid.MaxHealth = 0 | |
| 559 | Humanoid.Health = 0 | |
| 560 | Humanoid.Name = "" | |
| 561 | Humanoid.Parent = Arms | |
| 562 | local newShirt = Player.Character:FindFirstChild("Shirt")
| |
| 563 | if newShirt then | |
| 564 | newShirt = newShirt:clone() | |
| 565 | newShirt.Parent = Arms | |
| 566 | end | |
| 567 | else end | |
| 568 | ||
| 569 | local RightArm = Player.Character:FindFirstChild("Right Arm"):clone()
| |
| 570 | RightArm.Name = "Right Arm" | |
| 571 | RightArm.Transparency = 0 | |
| 572 | ||
| 573 | local w = Instance.new("Weld")
| |
| 574 | w.Part0 = RightArm | |
| 575 | w.Part1 = Player.Character:FindFirstChild("Right Arm")
| |
| 576 | w.C0 = CFrame.new() | |
| 577 | w.C1 = CFrame.new() | |
| 578 | w.Parent = RightArm | |
| 579 | RightArm.Parent = Arms | |
| 580 | ||
| 581 | local LeftArm = Player.Character:FindFirstChild("Left Arm"):clone()
| |
| 582 | LeftArm.Name = "Left Arm" | |
| 583 | LeftArm.Transparency = 0 | |
| 584 | ||
| 585 | local w = Instance.new("Weld")
| |
| 586 | w.Part0 = LeftArm | |
| 587 | w.Part1 = Player.Character:FindFirstChild("Left Arm")
| |
| 588 | w.C0 = CFrame.new() | |
| 589 | w.C1 = CFrame.new() | |
| 590 | w.Parent = LeftArm | |
| 591 | LeftArm.Parent = Arms | |
| 592 | ||
| 593 | if Mesh ~= false then | |
| 594 | local LeftArmMesh = script:FindFirstChild("LeftArm")
| |
| 595 | LeftArmMesh.Parent = LeftArm | |
| 596 | local RightArmMesh = script:FindFirstChild("RightArm")
| |
| 597 | RightArmMesh.Parent = RightArm | |
| 598 | else end | |
| 599 | ||
| 600 | end | |
| 601 | ||
| 602 | function onUnequipped(mouse) | |
| 603 | local Player = game:GetService("Players").LocalPlayer
| |
| 604 | local Cam = game.Workspace.CurrentCamera | |
| 605 | for _, Model in pairs(Cam:GetChildren()) do | |
| 606 | if Model.Name == "Arms" then | |
| 607 | Model:remove() | |
| 608 | else end | |
| 609 | end | |
| 610 | end | |
| 611 | ||
| 612 | sp.Equipped:connect(onEquipped) | |
| 613 | sp.Unequipped:connect(onUnequipped) | |
| 614 | ||
| 615 | wait(0.5) | |
| 616 | --Made by YouTubes-- | |
| 617 | --Edit settings below-- | |
| 618 | local Tool = script.Parent | |
| 619 | local Settings = {
| |
| 620 | Range = 1000 | |
| 621 | ,Spread = 8 | |
| 622 | ,Damage = {25, 40}
| |
| 623 | ,HeadShotDamage = {70, 75}
| |
| 624 | ,Bullets = 1 | |
| 625 | ,FireRate = 0.12 | |
| 626 | ,Automatic = true | |
| 627 | ,AntiTK = true | |
| 628 | ,ImpactDuration = 1 | |
| 629 | --Reload | |
| 630 | ,ReloadKey = "R" | |
| 631 | ,ReloadTime = 1.83 | |
| 632 | ,Ammo = 30 | |
| 633 | ,IncludeChamberedBullet = true | |
| 634 | --Gui | |
| 635 | ,GuiPos = Vector2.new(script.Gui.Frame.Position.X.Scale, script.Gui.Frame.Position.Y.Scale) | |
| 636 | --Arms | |
| 637 | ,OneHanded = false | |
| 638 | ,FakeArms = false | |
| 639 | ,FakeArmTransparency = 1 | |
| 640 | -- (+Left to -Right, +Fward to -Bward, +Up to -Down) (+Up to -Down, +Left to -Right, +Counter to -Clock) | |
| 641 | ,RightPos = CFrame.new(-0.75, -0.25, 0.45) * CFrame.Angles(math.rad(-90), 0, 0) | |
| 642 | ,LeftPos = CFrame.new(0.8, 1.01, 0.38) * CFrame.Angles(math.rad(-90), math.rad(27), math.rad(0), 0) | |
| 643 | ,AimPart = Tool.AimPart | |
| 644 | ,AimPartOffset = CFrame.new() | |
| 645 | ,AimGripOffset = Vector3.new(0, 0, 0) | |
| 646 | ,LeftAimPos = CFrame.new(1, 1.01, 0.4) * CFrame.Angles(math.rad(-95), math.rad(20), math.rad(0), 00) | |
| 647 | ,AimAnim = {
| |
| 648 | Enabled = false | |
| 649 | ,Frames = 50 | |
| 650 | ,Time = 0.1 | |
| 651 | } | |
| 652 | ,ChangeFOV = {true, 45}
| |
| 653 | ,SpreadReduction = 7.5 | |
| 654 | --Weld | |
| 655 | ,Weld = true | |
| 656 | --Mouse | |
| 657 | ,Icons = {
| |
| 658 | Idle = "rbxasset://textures/Blank.png" | |
| 659 | ,Fire1 = "rbxasset://textures/Blank.png" | |
| 660 | ,Fire2 = "rbxasset://textures/Blank.png" | |
| 661 | ,Fire3 = "rbxasset://textures/Blank.png" | |
| 662 | ,Reload = "rbxasset://textures/Blank.png" | |
| 663 | ,Aim = "rbxasset://textures/Blank.png" | |
| 664 | } | |
| 665 | ,FireMouseAnimTime = 0.15 | |
| 666 | --Recoil | |
| 667 | ,Recoil = math.rad(.8) | |
| 668 | --Smoke | |
| 669 | ,Smoke = true | |
| 670 | ,SmokePart = Tool.SmokePart | |
| 671 | ,Smokes = {{script.Smoke, 6, 0.01}, {script.Smoke1, 0.01}, {script.Smoke2, 0.01}}
| |
| 672 | --Sprint | |
| 673 | ,Sprint = true | |
| 674 | ,SprintSpeed = 20 | |
| 675 | ,SprintKey = "0" | |
| 676 | ,SprintSpreadIncrease = 40 | |
| 677 | ,SprintArmOffset = CFrame.new(0.25, -0.1, -0.25) * CFrame.Angles(math.rad(-25), math.rad(20), 0) | |
| 678 | --Other | |
| 679 | ,DropHats = true | |
| 680 | ||
| 681 | } | |
| 682 | ||
| 683 | -- Change how you want the shell casing to look here. | |
| 684 | local Shell = Instance.new("Part")
| |
| 685 | Shell.BrickColor = BrickColor.new(24) | |
| 686 | Shell.Name = "Shell" | |
| 687 | Shell.Locked = true | |
| 688 | Shell.formFactor = 3 | |
| 689 | Shell.CanCollide = true | |
| 690 | Shell.Size = Vector3.new(.2,.2,.2) | |
| 691 | --Shell.Parent = game.Workspace | |
| 692 | local ShellMesh = Instance.new("CylinderMesh")
| |
| 693 | ShellMesh.Scale = Vector3.new(0.30, 1, 0.30) | |
| 694 | ||
| 695 | --Do not edit below this lign-- | |
| 696 | ||
| 697 | local Orig_Spread = Settings.Spread | |
| 698 | local Orig_Grip = Tool.GripPos | |
| 699 | ||
| 700 | local Player = game.Players.LocalPlayer | |
| 701 | repeat wait() until Player.Character and Player.Character.Parent and Player.Character.Parent == game.Workspace | |
| 702 | local Character = Player.Character | |
| 703 | ||
| 704 | local Camera = Workspace.CurrentCamera | |
| 705 | ||
| 706 | local Ammo, StoredAmmo = script.Ammo, script.StoredAmmo | |
| 707 | ||
| 708 | local Gui, CanUpdateGui = nil, true | |
| 709 | ||
| 710 | local Sprinting, Equipped | |
| 711 | ||
| 712 | function Update_Gui() | |
| 713 | if Gui and CanUpdateGui then | |
| 714 | Gui.Frame.AmmoDisplay.Text = Ammo.Value | |
| 715 | Gui.Frame.StoredAmmoDisplay.Text = StoredAmmo.Value | |
| 716 | Gui.Frame.GunName.Text = Tool.Name | |
| 717 | Gui.Frame.GunTip3.Visible = true | |
| 718 | end | |
| 719 | end | |
| 720 | ||
| 721 | local Welded | |
| 722 | if Settings.Weld then | |
| 723 | Delay(0, function() | |
| 724 | local weldC0s = {}
| |
| 725 | for i, v in pairs(Tool:GetChildren()) do | |
| 726 | if v:IsA("BasePart") and v ~= Tool.Handle then
| |
| 727 | table.insert(weldC0s, {v, Tool.Handle.CFrame:toObjectSpace(v.CFrame)})
| |
| 728 | v.Anchored = false | |
| 729 | end | |
| 730 | end | |
| 731 | Tool.Handle.Anchored = false | |
| 732 | local welds = {}
| |
| 733 | Tool.Equipped:connect(function() | |
| 734 | for i, v in ipairs(welds) do | |
| 735 | v.Part1 = nil | |
| 736 | v:Destroy() | |
| 737 | end | |
| 738 | for i, v in ipairs(weldC0s) do | |
| 739 | if v[1] and v[2] then | |
| 740 | local w = Instance.new("Weld", Tool.Handle)
| |
| 741 | w.Part0 = Tool.Handle | |
| 742 | w.Part1 = v[1] | |
| 743 | w.C0 = v[2] | |
| 744 | table.insert(welds, w) | |
| 745 | end | |
| 746 | end | |
| 747 | end) | |
| 748 | wait() | |
| 749 | Welded = true | |
| 750 | end) | |
| 751 | end | |
| 752 | ||
| 753 | local Left_Weld, Right_Weld | |
| 754 | ||
| 755 | Ammo.Changed:connect(Update_Gui) | |
| 756 | StoredAmmo.Changed:connect(Update_Gui) | |
| 757 | ||
| 758 | Settings.Range = math.min(Settings.Range, 999) | |
| 759 | ||
| 760 | local Ignore_Model = Workspace:FindFirstChild("Ray_Ignore") or Instance.new("Model", Workspace)
| |
| 761 | Ignore_Model.Name = "Ray_Ignore" | |
| 762 | ||
| 763 | local Ray_Ignore = {Character, Ignore_Model, Camera}
| |
| 764 | ||
| 765 | Character.Humanoid.Died:connect(function() | |
| 766 | Tool.Parent = Player.Backpack | |
| 767 | end) | |
| 768 | ||
| 769 | function convertToCFrameDegrees(xa, ya, za) | |
| 770 | return CFrame.Angles(math.rad(xa), math.rad(ya), math.rad(za)) | |
| 771 | end | |
| 772 | ||
| 773 | ||
| 774 | function createShellCasing() -- Hooray for a bullet casing! ~~XAXA | |
| 775 | local ShellClone = Shell:Clone() | |
| 776 | ShellClone.Parent = Workspace | |
| 777 | ShellClone.CFrame = tool.E.CFrame * convertToCFrameDegrees(90,0,0) | |
| 778 | ShellClone.Velocity = Vector3.new(0,math.random(10,40),0) + (tool.E.CFrame * convertToCFrameDegrees(0,math.random(-140,-90),0)).lookVector * (math.random(5,25)) | |
| 779 | ShellClone.RotVelocity = Vector3.new(0,0,(math.random(200,400) / 10)) | |
| 780 | local ShellMeshClone = ShellMesh:Clone() | |
| 781 | ShellMeshClone.Parent = ShellClone | |
| 782 | game.Debris:AddItem(ShellClone, 0.3) --Add it to the debris. No script can match this one's reliability. | |
| 783 | end | |
| 784 | ||
| 785 | ||
| 786 | --FlightTheory_WAS_HERE-- | |
| 787 | function GetHitInstDataTableFor(Target) | |
| 788 | local Target = Target | |
| 789 | local DataTable = {
| |
| 790 | 0, --LightEmission | |
| 791 | NumberSequence.new(.5, 1), --Size | |
| 792 | 31727915, --Texture *STANDARD SMOKE* | |
| 793 | NumberSequence.new(0,0), --Transparency | |
| 794 | 0, --ZOffset | |
| 795 | Vector3.new(), --Acceleration *WIND EFFECT IDEA??? | |
| 796 | NumberRange.new(.1,.2), --Lifetime | |
| 797 | 500, --Rate | |
| 798 | NumberRange.new(0,0), --RotSpeed | |
| 799 | NumberRange.new(1,2), --Speed | |
| 800 | 360, --VelocitySpread | |
| 801 | } | |
| 802 | --OriginPos-- | |
| 803 | DataTable[6] = Character.Head.Position | |
| 804 | ------------- | |
| 805 | if not Target or not Target.Parent then return DataTable end | |
| 806 | if Target.Material == Enum.Material.Metal then | |
| 807 | DataTable[1] = .25 | |
| 808 | DataTable[2] = NumberSequence.new(.25, .5) | |
| 809 | DataTable[3] = "237909462" | |
| 810 | DataTable[10] = NumberRange.new(5,10) | |
| 811 | end | |
| 812 | if Target.Material == Enum.Material.DiamondPlate then | |
| 813 | DataTable[1] = .25 | |
| 814 | DataTable[2] = NumberSequence.new(.25, .5) | |
| 815 | DataTable[3] = "237909462" | |
| 816 | DataTable[10] = NumberRange.new(5,10) | |
| 817 | end | |
| 818 | if Target.Material == Enum.Material.CorrodedMetal then | |
| 819 | DataTable[1] = .25 | |
| 820 | DataTable[2] = NumberSequence.new(.25, .5) | |
| 821 | DataTable[3] = "237909462" | |
| 822 | DataTable[10] = NumberRange.new(5,10) | |
| 823 | end | |
| 824 | if Target.Material == Enum.Material.Grass then | |
| 825 | DataTable[1] = .25 | |
| 826 | DataTable[2] = NumberSequence.new(.25, .5) | |
| 827 | DataTable[3] = "242493047" | |
| 828 | DataTable[10] = NumberRange.new(5,10) | |
| 829 | end | |
| 830 | if Target.Parent:FindFirstChild("Humanoid") then
| |
| 831 | DataTable[2] = NumberSequence.new(.2, .4) | |
| 832 | DataTable[3] = "25161378" | |
| 833 | DataTable[10] = NumberRange.new(0,0) | |
| 834 | end | |
| 835 | DataTable[3] = "http://www.roblox.com/asset/?id="..DataTable[3] | |
| 836 | return DataTable | |
| 837 | end | |
| 838 | function HitInst(HitPos, Data, Effect) | |
| 839 | local HitPos, Data, Effect = HitPos, Data, Effect | |
| 840 | if Effect == nil then | |
| 841 | Effect = Instance.new("Part", Workspace["Ray_Ignore"])
| |
| 842 | game.Debris:AddItem(Effect, .2) | |
| 843 | Effect.Name = "Effect" | |
| 844 | Effect.FormFactor = "Custom" | |
| 845 | Effect.Size = Vector3.new() | |
| 846 | Effect.Transparency = 1 | |
| 847 | Effect.CanCollide = false | |
| 848 | Effect.Anchored = true | |
| 849 | Effect.CFrame = CFrame.new(HitPos) | |
| 850 | end | |
| 851 | local Emitter = Instance.new("ParticleEmitter", Effect)
| |
| 852 | Emitter.LightEmission = Data[1] | |
| 853 | Emitter.Size = Data[2] | |
| 854 | Emitter.Texture = Data[3] | |
| 855 | Emitter.Transparency = Data[4] | |
| 856 | Emitter.ZOffset = Data[5] | |
| 857 | Emitter.Acceleration = Data[6] | |
| 858 | Emitter.Lifetime = Data[7] | |
| 859 | Emitter.Rate = Data[8] | |
| 860 | Emitter.Rotation = NumberRange.new(1,360) --START AT RANDOM ROTATION | |
| 861 | Emitter.RotSpeed = Data[9] | |
| 862 | Emitter.Speed = Data[10] | |
| 863 | Emitter.VelocitySpread = Data[11] | |
| 864 | delay(.1, function() | |
| 865 | if Emitter and Emitter.Parent then -- "JUST IN CASE" `GTA V Refference | |
| 866 | Emitter.Enabled = false | |
| 867 | end | |
| 868 | end) | |
| 869 | end | |
| 870 | ------------------------- | |
| 871 | ||
| 872 | function Fire(Mouse) | |
| 873 | local Spread = CFrame.Angles(math.rad(math.random(-Settings.Spread, Settings.Spread)/10), math.rad(math.random(-Settings.Spread, Settings.Spread)/10), math.rad(math.random(-Settings.Spread, Settings.Spread)/10)) | |
| 874 | local Ray = Ray.new(Character.Head.Position, (CFrame.new(Character.Head.Position, Mouse.Hit.p) * Spread).lookVector.unit * Settings.Range) | |
| 875 | local Hit, Pos = Workspace:FindPartOnRayWithIgnoreList(Ray, Ray_Ignore) | |
| 876 | tool.SmokePart.PointLight.Enabled = true | |
| 877 | tool.SmokePart.BillboardGui.Flash.Image = "http://www.roblox.com/asset/?id="..flashListBig[math.random(1,#flashListBig)] | |
| 878 | tool.SmokePart.BillboardGui.Enabled = true | |
| 879 | wait() | |
| 880 | tool.SmokePart.PointLight.Enabled = false | |
| 881 | tool.SmokePart.BillboardGui.Enabled = false | |
| 882 | local Hit_Part | |
| 883 | if Hit and Hit.Parent:FindFirstChild("Humanoid") then
| |
| 884 | local Hit_Player = game.Players:GetPlayerFromCharacter(Hit.Parent) | |
| 885 | if Settings.AntiTK and not Hit_Player.Neutral and Hit_Player.TeamColor == Player.TeamColor then | |
| 886 | return | |
| 887 | end | |
| 888 | local Humanoid = Hit.Parent.Humanoid | |
| 889 | local c = Instance.new("ObjectValue")
| |
| 890 | c.Name = "creator" | |
| 891 | c.Value = Player | |
| 892 | game.Debris:AddItem(c, 3) | |
| 893 | c.Parent = Humanoid | |
| 894 | if Hit.Name == "Head" then | |
| 895 | Humanoid.Health = Humanoid.Health - math.random(Settings.HeadShotDamage[1], Settings.HeadShotDamage[2]) | |
| 896 | else | |
| 897 | Humanoid.Health = Humanoid.Health - math.random(Settings.Damage[1], Settings.Damage[2]) | |
| 898 | end | |
| 899 | elseif Hit and Hit.Parent and Hit.Parent.Parent and Hit.Parent.Parent:FindFirstChild("Humanoid") then
| |
| 900 | local Hit_Player = game.Players:GetPlayerFromCharacter(Hit.Parent.Parent) | |
| 901 | if Settings.AntiTK and not Hit_Player.Neutral and Hit_Player.TeamColor == Player.TeamColor then | |
| 902 | return | |
| 903 | end | |
| 904 | local Humanoid = Hit.Parent.Parent.Humanoid | |
| 905 | local c = Instance.new("ObjectValue")
| |
| 906 | c.Name = "creator" | |
| 907 | c.Value = Player | |
| 908 | game.Debris:AddItem(c, 3) | |
| 909 | c.Parent = Humanoid | |
| 910 | if Hit.Name == "Head" then | |
| 911 | Humanoid.Health = Humanoid.Health - math.random(Settings.HeadShotDamage[1], Settings.HeadShotDamage[2]) | |
| 912 | else | |
| 913 | Humanoid.Health = Humanoid.Health - math.random(Settings.Damage[1], Settings.Damage[2]) | |
| 914 | end | |
| 915 | elseif Hit then | |
| 916 | Hit_Part = Instance.new("Part", Ignore_Model)
| |
| 917 | Hit_Part.FormFactor = "Custom" | |
| 918 | Hit_Part.TopSurface = 0 | |
| 919 | Hit_Part.BottomSurface = 0 | |
| 920 | Hit_Part.Anchored = true | |
| 921 | Hit_Part.CanCollide = false | |
| 922 | Hit_Part.Size = Vector3.new() | |
| 923 | Hit_Part.CFrame = CFrame.new(Pos) * CFrame.Angles(math.random(0, 360), math.random(0, 360), math.random(0, 360)) | |
| 924 | Hit_Part.BrickColor = BrickColor.new("Really black")
| |
| 925 | Hit_Part.Material = "Metal" | |
| 926 | local Holyy = Instance.new("Sound")
| |
| 927 | Holyy.Name = "Cracks" | |
| 928 | Holyy.SoundId = "rbxassetid://151284431" | |
| 929 | Holyy.Volume = 0.3 | |
| 930 | Holyy.Pitch = 2 | |
| 931 | Holyy.Parent = Hit_Part | |
| 932 | ||
| 933 | Holyy:play() | |
| 934 | ||
| 935 | local Cur = Instance.new("SpecialMesh",Hit_Part)
| |
| 936 | Cur.MeshType = "Sphere" | |
| 937 | Cur.Scale = Vector3.new(0.5,0.5,0.5) | |
| 938 | ||
| 939 | createShellCasing() | |
| 940 | ||
| 941 | game.Debris:AddItem(Hit_Part, Settings.ImpactDuration) | |
| 942 | if not Hit.Anchored then | |
| 943 | local w = Instance.new("Weld", Hit_Part)
| |
| 944 | w.Part0 = Hit | |
| 945 | w.Part1 = Hit_Part | |
| 946 | w.C0 = Hit.CFrame:toObjectSpace(Hit_Part.CFrame) | |
| 947 | Hit_Part.Anchored = false | |
| 948 | end | |
| 949 | if Hit.Parent:IsA("Hat") and Settings.DropHats then
| |
| 950 | Hit.Parent.Parent = workspace | |
| 951 | game.Debris:AddItem(Hit, 3) | |
| 952 | ||
| 953 | end | |
| 954 | end | |
| 955 | -- | |
| 956 | HitInst(Pos, GetHitInstDataTableFor(Hit), Hit_Part) | |
| 957 | -- | |
| 958 | end | |
| 959 | ||
| 960 | local Can_Shoot = true | |
| 961 | local Reloading = false | |
| 962 | ||
| 963 | local First_Person = false | |
| 964 | ||
| 965 | local DB = false | |
| 966 | local Mouse_Held | |
| 967 | ||
| 968 | Tool.Equipped:connect(function(Mouse) | |
| 969 | local Mouse = Mouse | |
| 970 | Player.CameraMode = "LockFirstPerson" | |
| 971 | Equipped = true | |
| 972 | if Settings.Weld and not Welded then | |
| 973 | wait() | |
| 974 | Tool.Parent = Player.Backpack | |
| 975 | end | |
| 976 | Character = Player.Character | |
| 977 | if Gui then | |
| 978 | return | |
| 979 | end | |
| 980 | Ray_Ignore = {Character, Ignore_Model, Camera}
| |
| 981 | Mouse.Icon = Settings.Icons.Idle | |
| 982 | Gui = script.Gui:Clone() | |
| 983 | Gui.Parent = Player.PlayerGui | |
| 984 | Gui.Frame.Position = UDim2.new(Settings.GuiPos.X, Gui.Frame.Position.X.Offset, 1.1, Gui.Frame.Position.Y.Offset) | |
| 985 | Gui.Frame:TweenPosition(UDim2.new(Settings.GuiPos.X, Gui.Frame.Position.X.Offset, Settings.GuiPos.Y, Gui.Frame.Position.Y.Offset), "Out", "Bounce", 1) | |
| 986 | CanUpdateGui = true | |
| 987 | Update_Gui() | |
| 988 | Mouse.Button1Down:connect(function() | |
| 989 | if DB then return end | |
| 990 | DB = true | |
| 991 | if Can_Shoot and Ammo.Value > 0 and Character.Humanoid.Health > 0 and not Reloading then | |
| 992 | Mouse_Held = true | |
| 993 | while true do | |
| 994 | if Tool.Parent ~= Character then break end | |
| 995 | if Character.Humanoid.Health <= 0 or Reloading then break end | |
| 996 | Can_Shoot = false | |
| 997 | Delay(0, function() | |
| 998 | local t = math.min(Settings.FireMouseAnimTime/3, Settings.FireRate/3) | |
| 999 | if not Aiming then | |
| 1000 | Mouse.Icon = Settings.Icons.Fire1 | |
| 1001 | end | |
| 1002 | wait(t) | |
| 1003 | if not Aiming then | |
| 1004 | if Reloading then return end | |
| 1005 | Mouse.Icon = Settings.Icons.Fire2 | |
| 1006 | end | |
| 1007 | wait(t) | |
| 1008 | if not Aiming then | |
| 1009 | if Reloading then return end | |
| 1010 | Mouse.Icon = Settings.Icons.Fire3 | |
| 1011 | end | |
| 1012 | wait(t) | |
| 1013 | if not Aiming then | |
| 1014 | if Reloading then return end | |
| 1015 | Mouse.Icon = Settings.Icons.Idle | |
| 1016 | end | |
| 1017 | end) | |
| 1018 | for _ = 1, Settings.Bullets do | |
| 1019 | Delay(0, function() | |
| 1020 | Fire(Mouse, RANGE, SPEED, DROP) | |
| 1021 | end) | |
| 1022 | end | |
| 1023 | ||
| 1024 | Delay(0, function() | |
| 1025 | local r = math.abs(Settings.Recoil) | |
| 1026 | local ran = math.random(-1, 1) | |
| 1027 | Camera.CoordinateFrame = CFrame.new(Camera.Focus.p) * (Camera.CoordinateFrame - Camera.CoordinateFrame.p) * CFrame.Angles(r, r*ran, 0) * CFrame.new(0, 0, (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude) | |
| 1028 | local c = -r/20 | |
| 1029 | local cx = -(r*ran)/20 | |
| 1030 | for i = 1, math.random(15, 25) do | |
| 1031 | if EquipId == curId then | |
| 1032 | Camera.CoordinateFrame = CFrame.new(Camera.Focus.p) * (Camera.CoordinateFrame - Camera.CoordinateFrame.p) * CFrame.Angles(c, cx, 0) * CFrame.new(0, 0, (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude) | |
| 1033 | wait() | |
| 1034 | else | |
| 1035 | break | |
| 1036 | end | |
| 1037 | end | |
| 1038 | end) | |
| 1039 | if Tool.Handle:FindFirstChild("Shoot") then
| |
| 1040 | Tool.Handle.Shoot:Play() | |
| 1041 | end | |
| 1042 | Ammo.Value = Ammo.Value - 1 | |
| 1043 | Tool.Bolt.Mesh.Offset = Vector3.new(0, 0.35, 0) | |
| 1044 | wait(Settings.FireRate) | |
| 1045 | Tool.Bolt.Mesh.Offset = Vector3.new(0, 0, 0) | |
| 1046 | if not Settings.Automatic or Ammo.Value <= 0 or Character.Humanoid.Health <= 0 or not Mouse_Held then | |
| 1047 | break | |
| 1048 | end | |
| 1049 | end | |
| 1050 | Can_Shoot = true | |
| 1051 | elseif Can_Shoot and Character.Humanoid.Health > 0 and Tool.Handle:FindFirstChild("Click") then
| |
| 1052 | Tool.Handle.Click:Play() | |
| 1053 | end | |
| 1054 | DB = false | |
| 1055 | end) | |
| 1056 | Mouse.Button1Up:connect(function() | |
| 1057 | Mouse_Held = false | |
| 1058 | end) | |
| 1059 | Mouse.KeyDown:connect(function(Key) | |
| 1060 | if Key:upper() == Settings.ReloadKey:upper() and Can_Shoot and StoredAmmo.Value > 0 and not Aiming then | |
| 1061 | if Settings.IncludeChamberedBullet and Ammo.Value == Settings.Ammo + 1 or not Settings.IncludeChamberedBullet and Ammo.Value == Settings.Ammo then | |
| 1062 | return | |
| 1063 | end | |
| 1064 | if Reloading then | |
| 1065 | return | |
| 1066 | end | |
| 1067 | Can_Shoot = false | |
| 1068 | Reloading = true | |
| 1069 | local TextLabel = Gui.Frame.AmmoDisplay | |
| 1070 | Delay(0, function() | |
| 1071 | CanUpdateGui = false | |
| 1072 | TextLabel.Text = "000" | |
| 1073 | wait(Settings.ReloadTime/3) | |
| 1074 | if TextLabel then | |
| 1075 | TextLabel.Text = "000" | |
| 1076 | end | |
| 1077 | wait(Settings.ReloadTime/3) | |
| 1078 | if TextLabel then | |
| 1079 | TextLabel.Text = "000" | |
| 1080 | end | |
| 1081 | end) | |
| 1082 | Mouse.Icon = Settings.Icons.Reload | |
| 1083 | -- (+Left to -Right, +Fward to -Bward, +Up to -Down) (+Up to -Down, +Left to -Right, +Counter to -Clock) | |
| 1084 | Right_Weld.C1 = CFrame.new(-0.75, -0.2, 0.5) * CFrame.Angles(math.rad(-90), 0, 0.1) | |
| 1085 | Left_Weld.C1 = CFrame.new(1.2, 0.6, 0.45) * CFrame.Angles(math.rad(-90), math.rad(45), math.rad(0), 0) | |
| 1086 | wait(.02) | |
| 1087 | Right_Weld.C1 = CFrame.new(-0.75, -0.15, 0.55) * CFrame.Angles(math.rad(-90), 0, 0.15) | |
| 1088 | Left_Weld.C1 = CFrame.new(1.2, 0.5, 0.45) * CFrame.Angles(math.rad(-90), math.rad(50), math.rad(0), 0) | |
| 1089 | wait(.02) | |
| 1090 | Right_Weld.C1 = CFrame.new(-0.75, -0.1, 0.6) * CFrame.Angles(math.rad(-90), 0, 0.2) | |
| 1091 | Left_Weld.C1 = CFrame.new(1.2, 0.4, 0.45) * CFrame.Angles(math.rad(-90), math.rad(55), math.rad(0), 0) | |
| 1092 | wait(0.02) | |
| 1093 | ||
| 1094 | Left_Weld.C1 = CFrame.new(1.2, 0.4, 0.40) * CFrame.Angles(math.rad(-90), math.rad(55), math.rad(0), 0) | |
| 1095 | Tool.Handle.MagOut:play() | |
| 1096 | Tool.PMag.Transparency = 1 | |
| 1097 | Tool.PMag1.Transparency = 1 | |
| 1098 | wait(0.03) | |
| 1099 | Left_Weld.C1 = CFrame.new(1.2, 0.35, 0.35) * CFrame.Angles(math.rad(-90), math.rad(55), math.rad(5), 0) | |
| 1100 | wait(0.03) | |
| 1101 | Left_Weld.C1 = CFrame.new(1.2, 0.3, 0.30) * CFrame.Angles(math.rad(-90), math.rad(55), math.rad(10), 0) | |
| 1102 | wait(0.03) | |
| 1103 | Left_Weld.C1 = CFrame.new(1.2, 0.3, 0.25) * CFrame.Angles(math.rad(-90), math.rad(55), math.rad(15), 0) | |
| 1104 | wait(0.03) | |
| 1105 | Left_Weld.C1 = CFrame.new(1.2, 0.3, 0.20) * CFrame.Angles(math.rad(-90), math.rad(55), math.rad(20), 0) | |
| 1106 | wait(0.03) | |
| 1107 | Left_Weld.C1 = CFrame.new(1.2, 0.3, 0.15) * CFrame.Angles(math.rad(-90), math.rad(55), math.rad(25), 0) | |
| 1108 | wait(0.03) | |
| 1109 | Left_Weld.C1 = CFrame.new(1.2, 0.3, 0.10) * CFrame.Angles(math.rad(-90), math.rad(55), math.rad(30), 0) | |
| 1110 | wait(0.03) | |
| 1111 | Left_Weld.C1 = CFrame.new(1.2, 0.25, 0.05) * CFrame.Angles(math.rad(-90), math.rad(60), math.rad(35), 0) | |
| 1112 | wait(0.03) | |
| 1113 | Left_Weld.C1 = CFrame.new(1.2, 0.2, 0) * CFrame.Angles(math.rad(-90), math.rad(65), math.rad(40), 0) | |
| 1114 | wait(0.03) | |
| 1115 | Left_Weld.C1 = CFrame.new(1.2, 0.15, 0) * CFrame.Angles(math.rad(-90), math.rad(70), math.rad(45), 0) | |
| 1116 | wait(0.03) | |
| 1117 | Left_Weld.C1 = CFrame.new(1.2, 0.1, 0) * CFrame.Angles(math.rad(-90), math.rad(75), math.rad(50), 0) | |
| 1118 | wait(0.5) | |
| 1119 | ||
| 1120 | Left_Weld.C1 = CFrame.new(1.2, 0.1, 0.0) * CFrame.Angles(math.rad(-90), math.rad(75), math.rad(40), 0) | |
| 1121 | Tool.Handle.MagIn:play() | |
| 1122 | Tool.PMag.Transparency = 0 | |
| 1123 | Tool.PMag1.Transparency = 0 | |
| 1124 | wait(0.03) | |
| 1125 | Left_Weld.C1 = CFrame.new(1.2, 0.15, 0.05) * CFrame.Angles(math.rad(-90), math.rad(70), math.rad(35), 0) | |
| 1126 | wait(0.03) | |
| 1127 | Left_Weld.C1 = CFrame.new(1.2, 0.2, 0.10) * CFrame.Angles(math.rad(-90), math.rad(65), math.rad(30), 0) | |
| 1128 | wait(0.03) | |
| 1129 | Left_Weld.C1 = CFrame.new(1.2, 0.25, 0.15) * CFrame.Angles(math.rad(-90), math.rad(60), math.rad(25), 0) | |
| 1130 | wait(0.03) | |
| 1131 | Left_Weld.C1 = CFrame.new(1.2, 0.3, 0.20) * CFrame.Angles(math.rad(-90), math.rad(55), math.rad(20), 0) | |
| 1132 | wait(0.03) | |
| 1133 | Left_Weld.C1 = CFrame.new(1.2, 0.3, 0.25) * CFrame.Angles(math.rad(-90), math.rad(55), math.rad(15), 0) | |
| 1134 | wait(0.03) | |
| 1135 | Right_Weld.C1 = CFrame.new(-0.75, -0.1, 0.6) * CFrame.Angles(math.rad(-90), 0, 0.2) | |
| 1136 | Left_Weld.C1 = CFrame.new(1.2, 0.3, 0.30) * CFrame.Angles(math.rad(-90), math.rad(55), math.rad(10), 0) | |
| 1137 | wait(0.03) | |
| 1138 | Right_Weld.C1 = CFrame.new(-0.75, -0.15, 0.55) * CFrame.Angles(math.rad(-90), 0, 0.15) | |
| 1139 | Left_Weld.C1 = CFrame.new(1.2, 0.35, 0.35) * CFrame.Angles(math.rad(-90), math.rad(55), math.rad(05), 0) | |
| 1140 | wait(0.03) | |
| 1141 | Right_Weld.C1 = CFrame.new(-0.75, -0.2, 0.5) * CFrame.Angles(math.rad(-90), 0, 0.1) | |
| 1142 | Left_Weld.C1 = CFrame.new(1.2, 0.4, 0.40) * CFrame.Angles(math.rad(-90), math.rad(55), math.rad(0), 0) | |
| 1143 | wait(0.03) | |
| 1144 | ||
| 1145 | Right_Weld.C1 = CFrame.new(-0.75, -0.25, 0.45) * CFrame.Angles(math.rad(-90), 0, 0) | |
| 1146 | Left_Weld.C1 = CFrame.new(0.8, 1.01, 0.38) * CFrame.Angles(math.rad(-90), math.rad(27), math.rad(0), 0) | |
| 1147 | ||
| 1148 | Mouse.Icon = Settings.Icons.Idle | |
| 1149 | CanUpdateGui = true | |
| 1150 | local m = Settings.Ammo | |
| 1151 | if Ammo.Value > 0 and Settings.IncludeChamberedBullet then | |
| 1152 | m = m + 1 | |
| 1153 | end | |
| 1154 | if (StoredAmmo.Value - (m - Ammo.Value)) <= 0 then | |
| 1155 | Ammo.Value = Ammo.Value + StoredAmmo.Value | |
| 1156 | StoredAmmo.Value = 0 | |
| 1157 | else | |
| 1158 | StoredAmmo.Value = StoredAmmo.Value - (m - Ammo.Value) | |
| 1159 | Ammo.Value = m | |
| 1160 | end | |
| 1161 | Can_Shoot = true | |
| 1162 | Reloading = false | |
| 1163 | elseif Key:upper() == Settings.SprintKey:upper() and Settings.Sprint and not Aiming then | |
| 1164 | Sprinting = true | |
| 1165 | Character.Humanoid.WalkSpeed = Settings.SprintSpeed | |
| 1166 | Settings.Spread = Settings.Spread + Settings.SprintSpreadIncrease | |
| 1167 | end | |
| 1168 | end) | |
| 1169 | Mouse.KeyUp:connect(function(Key) | |
| 1170 | if Key:upper() == Settings.SprintKey:upper() and Sprinting then | |
| 1171 | Sprinting = false | |
| 1172 | Character.Humanoid.WalkSpeed = 16 | |
| 1173 | Settings.Spread = Settings.Spread - Settings.SprintSpreadIncrease | |
| 1174 | Right_Weld.C0 = CFrame.new(0, -1.5, 0) | |
| 1175 | end | |
| 1176 | end) | |
| 1177 | Mouse.Button2Down:connect(function() | |
| 1178 | if not Reloading and not Sprinting and not Aiming and (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude < 1 then | |
| 1179 | Aiming = true | |
| 1180 | Player.CameraMode = "LockFirstPerson" | |
| 1181 | Mouse.WheelBackward:connect(function() | |
| 1182 | if _G.MouseSensitivity >= 0.1 then | |
| 1183 | _G.MouseSensitivity = _G.MouseSensitivity - 0.1 | |
| 1184 | wait() | |
| 1185 | print(_G.MouseSensitivity) | |
| 1186 | end | |
| 1187 | end) | |
| 1188 | Mouse.WheelForward:connect(function() | |
| 1189 | if _G.MouseSensitivity < 2 then | |
| 1190 | _G.MouseSensitivity = _G.MouseSensitivity + 0.1 | |
| 1191 | wait() | |
| 1192 | end | |
| 1193 | end) | |
| 1194 | Mouse.Icon = Settings.Icons.Aim | |
| 1195 | if Settings.AimAnim.Enabled then | |
| 1196 | Right_Weld.C1 = CFrame.new() | |
| 1197 | Right_Weld.C0 = CFrame.new() | |
| 1198 | Delay(0, function() | |
| 1199 | Tween_C0(Right_Weld, Settings.AimAnim.Frames, Settings.AimAnim.Time, Right_Weld.C0, Character.Head.CFrame:toObjectSpace(Settings.AimPart.CFrame)) | |
| 1200 | end) | |
| 1201 | Delay(0, function() | |
| 1202 | Tween_C1(Left_Weld, Settings.AimAnim.Frames, Settings.AimAnim.Time, Left_Weld.C1, Settings.LeftAimPos) | |
| 1203 | end) | |
| 1204 | Delay(0, function() | |
| 1205 | if Settings.ChangeFOV[1] then | |
| 1206 | Camera.FieldOfView = 70 | |
| 1207 | local Cam_Dif, T_F = 70 - Settings.ChangeFOV[2], Settings.AimAnim.Time * Settings.AimAnim.Frames | |
| 1208 | for i = 1, T_F do | |
| 1209 | local FOV = 70 - Cam_Dif/T_F * i | |
| 1210 | Camera.FieldOfView = FOV | |
| 1211 | wait(Settings.AimAnim.Time/Settings.AimAnim.Frames) | |
| 1212 | if not Aiming then | |
| 1213 | return | |
| 1214 | end | |
| 1215 | end | |
| 1216 | Camera.FieldOfView = Settings.ChangeFOV[2] | |
| 1217 | end | |
| 1218 | end) | |
| 1219 | else | |
| 1220 | Right_Weld.C1 = CFrame.new() | |
| 1221 | Right_Weld.C0 = CFrame.new() | |
| 1222 | Right_Weld.C1 = Character.Head.CFrame:toObjectSpace(Settings.AimPart.CFrame) | |
| 1223 | Left_Weld.C1 = Settings.LeftAimPos | |
| 1224 | if Settings.ChangeFOV[1] then | |
| 1225 | Camera.FieldOfView = Settings.ChangeFOV[2] | |
| 1226 | end | |
| 1227 | end | |
| 1228 | Tool.GripPos = Orig_Grip + Settings.AimGripOffset | |
| 1229 | Settings.Spread = Settings.Spread - Settings.SpreadReduction | |
| 1230 | end | |
| 1231 | end) | |
| 1232 | Mouse.Button2Up:connect(function() | |
| 1233 | if Aiming then | |
| 1234 | Player.CameraMode = "LockFirstPerson" | |
| 1235 | Mouse.Icon = Settings.Icons.Idle | |
| 1236 | Tool.GripPos = Orig_Grip | |
| 1237 | if Settings.AimAnim.Enabled then | |
| 1238 | Delay(0, function() | |
| 1239 | Tween_C0(Right_Weld, Settings.AimAnim.Frames, Settings.AimAnim.Time, Right_Weld.C0, CFrame.new(0, -1.5, 0)) | |
| 1240 | end) | |
| 1241 | Delay(0, function() | |
| 1242 | Tween_C1(Left_Weld, Settings.AimAnim.Frames, Settings.AimAnim.Time, Left_Weld.C1, Settings.LeftPos) | |
| 1243 | end) | |
| 1244 | else | |
| 1245 | Right_Weld.C1 = Settings.RightPos | |
| 1246 | Right_Weld.C0 = CFrame.new(0, -1.5, 0) | |
| 1247 | Left_Weld.C1 = Settings.LeftPos | |
| 1248 | end | |
| 1249 | if Settings.ChangeFOV[1] then | |
| 1250 | Camera.FieldOfView = 70 | |
| 1251 | end | |
| 1252 | Settings.Spread = Settings.Spread + Settings.SpreadReduction | |
| 1253 | Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 1254 | Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 1255 | wait(0.25) | |
| 1256 | Aiming = false | |
| 1257 | end | |
| 1258 | end) | |
| 1259 | wait() | |
| 1260 | CamCon = Camera.Changed:connect(function() | |
| 1261 | if Mouse and (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude < 1 and Equipped then | |
| 1262 | Mouse.TargetFilter = workspace | |
| 1263 | Character.Torso.Neck.C1 = CFrame.new() | |
| 1264 | Character.Torso.Neck.C0 = CFrame.new(0, 1.5, 0) * CFrame.Angles(math.asin((Mouse.Hit.p - Mouse.Origin.p).unit.y), 0, 0) | |
| 1265 | end | |
| 1266 | end) | |
| 1267 | Mouse.Idle:connect(function() | |
| 1268 | if (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude < 1 and Equipped then | |
| 1269 | Mouse.TargetFilter = workspace | |
| 1270 | Character.Torso.Neck.C1 = CFrame.new() | |
| 1271 | Character.Torso.Neck.C0 = CFrame.new(0, 1.5, 0) * CFrame.Angles(math.asin((Mouse.Hit.p - Mouse.Origin.p).unit.y), 0, 0) | |
| 1272 | end | |
| 1273 | end) | |
| 1274 | while wait() and Equipped do | |
| 1275 | if Character.Humanoid.Health <= 0 then break end | |
| 1276 | if Sprinting then | |
| 1277 | Can_Shoot = false | |
| 1278 | Right_Weld.C0 = CFrame.new(0, -1.5, 0) * Settings.SprintArmOffset | |
| 1279 | Left_Weld.C0 = CFrame.new(0, -1.5, 0) * Settings.SprintArmOffset | |
| 1280 | elseif not Aiming and not Sprinting then | |
| 1281 | Can_Shoot = true | |
| 1282 | Left_Weld.C0 = CFrame.new(0, -1.5, 0) | |
| 1283 | end | |
| 1284 | if (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude > 1 and Equipped then | |
| 1285 | Mouse.TargetFilter = nil | |
| 1286 | Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 1287 | Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 1288 | end | |
| 1289 | end | |
| 1290 | end) | |
| 1291 | ||
| 1292 | local Arms_Made | |
| 1293 | local Fake_Arm_Right, Fake_Arm_Left, Fake_Arm_Model | |
| 1294 | ||
| 1295 | Tool.Equipped:connect(function(Mouse) | |
| 1296 | if Character and not Arms_Made then | |
| 1297 | Arms_Made = true | |
| 1298 | local Torso = Character.Torso | |
| 1299 | Torso["Right Shoulder"].Part1 = nil | |
| 1300 | Left_Weld = Instance.new("Weld", Torso)
| |
| 1301 | Left_Weld.Name = "Left_Weld" | |
| 1302 | Left_Weld.Part0 = Character.Head | |
| 1303 | Left_Weld.C0 = CFrame.new(0, -1.5, 0) | |
| 1304 | if not Settings.OneHanded then | |
| 1305 | Torso["Left Shoulder"].Part1 = nil | |
| 1306 | Left_Weld.Part1 = Character["Left Arm"] | |
| 1307 | end | |
| 1308 | Right_Weld = Instance.new("Weld", Torso)
| |
| 1309 | Right_Weld.Name = "Right_Weld" | |
| 1310 | Right_Weld.Part0 = Character.Head | |
| 1311 | Right_Weld.Part1 = Character["Right Arm"] | |
| 1312 | Right_Weld.C0 = CFrame.new(0, -1.5, 0) | |
| 1313 | Left_Weld.C1 = Settings.LeftPos | |
| 1314 | Right_Weld.C1 = Settings.RightPos | |
| 1315 | end | |
| 1316 | if Settings.FakeArms and not Fake_Arm_Right then | |
| 1317 | Fake_Arm_Right, Fake_Arm_Left = Character["Right Arm"]:Clone(), Character["Left Arm"]:Clone() | |
| 1318 | Fake_Arm_Right.FormFactor, Fake_Arm_Left.FormFactor = "Custom", "Custom" | |
| 1319 | Fake_Arm_Right.Size, Fake_Arm_Left.Size = Vector3.new(), Vector3.new() | |
| 1320 | local fakeArms = {Fake_Arm_Right, Fake_Arm_Left}
| |
| 1321 | for i = 1, 2 do | |
| 1322 | local w = Instance.new("Weld", fakeArms[i])
| |
| 1323 | w.Part0 = Character[fakeArms[i].Name] | |
| 1324 | w.Part1 = fakeArms[i] | |
| 1325 | fakeArms[i].Transparency = Settings.FakeArmTransparency | |
| 1326 | end | |
| 1327 | Fake_Arm_Model = Instance.new("Model", Camera)
| |
| 1328 | Fake_Arm_Right.Parent = Fake_Arm_Model | |
| 1329 | if not Settings.OneHanded then | |
| 1330 | Fake_Arm_Left.Parent = Fake_Arm_Model | |
| 1331 | end | |
| 1332 | Fake_Arm_Model.Name = "FakeArms" | |
| 1333 | if Settings.CharacterMeshes then | |
| 1334 | for i, v in pairs(Character:GetChildren()) do | |
| 1335 | if v:IsA("CharacterMesh") and v.BodyPart == Enum.BodyPart.LeftArm or v:IsA("CharacterMesh") and v.BodyPart == Enum.BodyPart.RightArm then
| |
| 1336 | v:Clone().Parent = Fake_Arm_Model | |
| 1337 | end | |
| 1338 | end | |
| 1339 | end | |
| 1340 | if Character:FindFirstChild("Shirt") then
| |
| 1341 | Instance.new("Humanoid", Fake_Arm_Model)
| |
| 1342 | Character.Shirt:Clone().Parent = Fake_Arm_Model | |
| 1343 | else | |
| 1344 | local Arm_Mesh = Instance.new("SpecialMesh", Fake_Arm_Right)
| |
| 1345 | Arm_Mesh.MeshType, Arm_Mesh.Scale = "Brick", Vector3.new(1, 2, 1) | |
| 1346 | local Arm_Mesh2 = Instance.new("SpecialMesh", Fake_Arm_Left)
| |
| 1347 | Arm_Mesh2.MeshType, Arm_Mesh2.Scale = "Brick", Vector3.new(1, 2, 1) | |
| 1348 | end | |
| 1349 | end | |
| 1350 | end) | |
| 1351 | ||
| 1352 | Tool.Unequipped:connect(function() | |
| 1353 | if CamCon then | |
| 1354 | CamCon:disconnect() | |
| 1355 | end | |
| 1356 | if Settings.ChangeFOV[1] then | |
| 1357 | Camera.FieldOfView = 70 | |
| 1358 | end | |
| 1359 | Player.CameraMode = "Classic" | |
| 1360 | if Character.Humanoid.Health <= 0 then | |
| 1361 | return | |
| 1362 | end | |
| 1363 | CamCon = nil | |
| 1364 | Equipped = false | |
| 1365 | Tool.GripPos = Orig_Grip | |
| 1366 | Aiming = false | |
| 1367 | Settings.Spread = Orig_Spread | |
| 1368 | if Gui then | |
| 1369 | Gui:Destroy() | |
| 1370 | Gui = nil | |
| 1371 | end | |
| 1372 | for i, v in pairs(Tool.Handle:GetChildren()) do | |
| 1373 | if v:IsA("Sound") then
| |
| 1374 | v:Stop() | |
| 1375 | end | |
| 1376 | end | |
| 1377 | if Fake_Arm_Right and Fake_Arm_Left and Fake_Arm_Model then | |
| 1378 | Fake_Arm_Model:Destroy() | |
| 1379 | Fake_Arm_Right, Fake_Arm_Left, Fake_Arm_Model = nil, nil, nil | |
| 1380 | end | |
| 1381 | if Character and Left_Weld and Right_Weld then | |
| 1382 | Arms_Made = false | |
| 1383 | local Torso = Character.Torso | |
| 1384 | Torso["Right Shoulder"].Part1, Torso["Left Shoulder"].Part1 = Character["Right Arm"], Character["Left Arm"] | |
| 1385 | Left_Weld:Destroy() | |
| 1386 | Right_Weld:Destroy() | |
| 1387 | end | |
| 1388 | Sprinting = false | |
| 1389 | Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 1390 | Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 1391 | Character.Humanoid.WalkSpeed = 16 | |
| 1392 | end) | |
| 1393 | ||
| 1394 | end)) | |
| 1395 | NumberValue37.Name = "StoredAmmo" | |
| 1396 | NumberValue37.Parent = LocalScript36 | |
| 1397 | NumberValue37.Value = 120 | |
| 1398 | NumberValue38.Name = "Ammo" | |
| 1399 | NumberValue38.Parent = LocalScript36 | |
| 1400 | NumberValue38.Value = 30 | |
| 1401 | Smoke39.Parent = LocalScript36 | |
| 1402 | Smoke39.Size = 0.25 | |
| 1403 | Smoke39.Color = Color3.new(0.807843, 0.807843, 0.807843) | |
| 1404 | Smoke39.Enabled = false | |
| 1405 | Smoke39.Opacity = 0.10000000149012 | |
| 1406 | Smoke39.RiseVelocity = 10 | |
| 1407 | Smoke39.Color = Color3.new(0.807843, 0.807843, 0.807843) | |
| 1408 | Smoke40.Name = "Smoke1" | |
| 1409 | Smoke40.Parent = LocalScript36 | |
| 1410 | Smoke40.Size = 0.25 | |
| 1411 | Smoke40.Color = Color3.new(0.807843, 0.807843, 0.807843) | |
| 1412 | Smoke40.Enabled = false | |
| 1413 | Smoke40.Opacity = 0.10000000149012 | |
| 1414 | Smoke40.RiseVelocity = 10 | |
| 1415 | Smoke40.Color = Color3.new(0.807843, 0.807843, 0.807843) | |
| 1416 | Smoke41.Name = "Smoke2" | |
| 1417 | Smoke41.Parent = LocalScript36 | |
| 1418 | Smoke41.Size = 0.25 | |
| 1419 | Smoke41.Color = Color3.new(0.807843, 0.807843, 0.807843) | |
| 1420 | Smoke41.Enabled = false | |
| 1421 | Smoke41.Opacity = 0.10000000149012 | |
| 1422 | Smoke41.RiseVelocity = 10 | |
| 1423 | Smoke41.Color = Color3.new(0.807843, 0.807843, 0.807843) | |
| 1424 | ScreenGui42.Name = "Gui" | |
| 1425 | ScreenGui42.Parent = LocalScript36 | |
| 1426 | Frame43.Parent = ScreenGui42 | |
| 1427 | Frame43.Transparency = 0.30000001192093 | |
| 1428 | Frame43.Size = UDim2.new(-0.100000001, 0, -0.0399999991, 0) | |
| 1429 | Frame43.Position = UDim2.new(0.150000006, -5, 1, -120) | |
| 1430 | Frame43.Active = true | |
| 1431 | Frame43.BackgroundColor3 = Color3.new(0, 0, 0) | |
| 1432 | Frame43.BackgroundTransparency = 0.30000001192093 | |
| 1433 | Frame43.BorderColor3 = Color3.new(0.466667, 0.466667, 0.466667) | |
| 1434 | Frame43.BorderSizePixel = 0 | |
| 1435 | Frame43.SizeConstraint = Enum.SizeConstraint.RelativeXX | |
| 1436 | TextLabel44.Name = "000" | |
| 1437 | TextLabel44.Parent = Frame43 | |
| 1438 | TextLabel44.Transparency = 1 | |
| 1439 | TextLabel44.Size = UDim2.new(0.550000012, 0, 0.75, 0) | |
| 1440 | TextLabel44.Text = "000" | |
| 1441 | TextLabel44.Position = UDim2.new(-0.0299999993, 0, 0.129999995, 0) | |
| 1442 | TextLabel44.BackgroundColor3 = Color3.new(0.501961, 0, 0) | |
| 1443 | TextLabel44.BackgroundTransparency = 1 | |
| 1444 | TextLabel44.ZIndex = 2 | |
| 1445 | TextLabel44.FontSize = Enum.FontSize.Size14 | |
| 1446 | TextLabel44.TextColor3 = Color3.new(1, 1, 1) | |
| 1447 | TextLabel44.TextScaled = true | |
| 1448 | TextLabel44.TextStrokeColor3 = Color3.new(0.647059, 0, 0.129412) | |
| 1449 | TextLabel44.TextTransparency = 0.80000001192093 | |
| 1450 | TextLabel44.TextWrapped = true | |
| 1451 | TextLabel45.Name = "AmmoDisplay" | |
| 1452 | TextLabel45.Parent = Frame43 | |
| 1453 | TextLabel45.Transparency = 1 | |
| 1454 | TextLabel45.Size = UDim2.new(0.550000012, 0, 0.75, 0) | |
| 1455 | TextLabel45.Text = "" | |
| 1456 | TextLabel45.Position = UDim2.new(-0.0900000036, 0, 0.129999995, 0) | |
| 1457 | TextLabel45.BackgroundColor3 = Color3.new(0.501961, 0, 0) | |
| 1458 | TextLabel45.BackgroundTransparency = 1 | |
| 1459 | TextLabel45.ZIndex = 2 | |
| 1460 | TextLabel45.FontSize = Enum.FontSize.Size14 | |
| 1461 | TextLabel45.TextColor3 = Color3.new(1, 1, 1) | |
| 1462 | TextLabel45.TextScaled = true | |
| 1463 | TextLabel45.TextStrokeColor3 = Color3.new(0.647059, 0, 0.129412) | |
| 1464 | TextLabel45.TextWrapped = true | |
| 1465 | TextLabel45.TextXAlignment = Enum.TextXAlignment.Right | |
| 1466 | TextLabel46.Name = "000" | |
| 1467 | TextLabel46.Parent = Frame43 | |
| 1468 | TextLabel46.Transparency = 1 | |
| 1469 | TextLabel46.Size = UDim2.new(0.550000012, 0, 0.75, 0) | |
| 1470 | TextLabel46.Text = "000" | |
| 1471 | TextLabel46.Position = UDim2.new(0.479999989, 0, 0.129999995, 0) | |
| 1472 | TextLabel46.BackgroundColor3 = Color3.new(0.501961, 0, 0) | |
| 1473 | TextLabel46.BackgroundTransparency = 1 | |
| 1474 | TextLabel46.ZIndex = 2 | |
| 1475 | TextLabel46.FontSize = Enum.FontSize.Size14 | |
| 1476 | TextLabel46.TextColor3 = Color3.new(1, 1, 1) | |
| 1477 | TextLabel46.TextScaled = true | |
| 1478 | TextLabel46.TextStrokeColor3 = Color3.new(0.647059, 0, 0.129412) | |
| 1479 | TextLabel46.TextTransparency = 0.80000001192093 | |
| 1480 | TextLabel46.TextWrapped = true | |
| 1481 | TextLabel47.Name = "StoredAmmoDisplay" | |
| 1482 | TextLabel47.Parent = Frame43 | |
| 1483 | TextLabel47.Transparency = 1 | |
| 1484 | TextLabel47.Size = UDim2.new(0.550000012, 0, 0.75, 0) | |
| 1485 | TextLabel47.Text = "" | |
| 1486 | TextLabel47.Position = UDim2.new(0.419999987, 0, 0.129999995, 0) | |
| 1487 | TextLabel47.BackgroundColor3 = Color3.new(0.501961, 0, 0) | |
| 1488 | TextLabel47.BackgroundTransparency = 1 | |
| 1489 | TextLabel47.ZIndex = 2 | |
| 1490 | TextLabel47.FontSize = Enum.FontSize.Size14 | |
| 1491 | TextLabel47.TextColor3 = Color3.new(1, 1, 1) | |
| 1492 | TextLabel47.TextScaled = true | |
| 1493 | TextLabel47.TextStrokeColor3 = Color3.new(0.647059, 0, 0.129412) | |
| 1494 | TextLabel47.TextWrapped = true | |
| 1495 | TextLabel47.TextXAlignment = Enum.TextXAlignment.Right | |
| 1496 | TextLabel48.Name = "Divider" | |
| 1497 | TextLabel48.Parent = Frame43 | |
| 1498 | TextLabel48.Transparency = 1 | |
| 1499 | TextLabel48.Size = UDim2.new(-0.800000012, 0, 0.5, 0) | |
| 1500 | TextLabel48.Text = "|" | |
| 1501 | TextLabel48.Position = UDim2.new(0.903999984, 0, 0.300000012, 0) | |
| 1502 | TextLabel48.BackgroundColor3 = Color3.new(0.501961, 0, 0) | |
| 1503 | TextLabel48.BackgroundTransparency = 1 | |
| 1504 | TextLabel48.ZIndex = 2 | |
| 1505 | TextLabel48.FontSize = Enum.FontSize.Size18 | |
| 1506 | TextLabel48.TextColor3 = Color3.new(1, 1, 1) | |
| 1507 | TextLabel48.TextScaled = true | |
| 1508 | TextLabel48.TextStrokeColor3 = Color3.new(0.647059, 0, 0.129412) | |
| 1509 | TextLabel48.TextWrapped = true | |
| 1510 | TextLabel49.Name = "Divider" | |
| 1511 | TextLabel49.Parent = Frame43 | |
| 1512 | TextLabel49.Transparency = 1 | |
| 1513 | TextLabel49.Size = UDim2.new(-0.800000012, 0, 0.5, 0) | |
| 1514 | TextLabel49.Text = "|" | |
| 1515 | TextLabel49.Position = UDim2.new(0.903999984, 0, 0.100000001, 0) | |
| 1516 | TextLabel49.BackgroundColor3 = Color3.new(0.501961, 0, 0) | |
| 1517 | TextLabel49.BackgroundTransparency = 1 | |
| 1518 | TextLabel49.ZIndex = 2 | |
| 1519 | TextLabel49.FontSize = Enum.FontSize.Size18 | |
| 1520 | TextLabel49.TextColor3 = Color3.new(1, 1, 1) | |
| 1521 | TextLabel49.TextScaled = true | |
| 1522 | TextLabel49.TextStrokeColor3 = Color3.new(0.647059, 0, 0.129412) | |
| 1523 | TextLabel49.TextWrapped = true | |
| 1524 | TextLabel50.Name = "Divider" | |
| 1525 | TextLabel50.Parent = Frame43 | |
| 1526 | TextLabel50.Transparency = 1 | |
| 1527 | TextLabel50.Size = UDim2.new(-0.800000012, 0, 0.5, 0) | |
| 1528 | TextLabel50.Text = "|" | |
| 1529 | TextLabel50.Position = UDim2.new(0.903999984, 0, 0.200000003, 0) | |
| 1530 | TextLabel50.BackgroundColor3 = Color3.new(0.501961, 0, 0) | |
| 1531 | TextLabel50.BackgroundTransparency = 1 | |
| 1532 | TextLabel50.ZIndex = 2 | |
| 1533 | TextLabel50.FontSize = Enum.FontSize.Size18 | |
| 1534 | TextLabel50.TextColor3 = Color3.new(1, 1, 1) | |
| 1535 | TextLabel50.TextScaled = true | |
| 1536 | TextLabel50.TextStrokeColor3 = Color3.new(0.647059, 0, 0.129412) | |
| 1537 | TextLabel50.TextWrapped = true | |
| 1538 | TextLabel51.Name = "GunName" | |
| 1539 | TextLabel51.Parent = Frame43 | |
| 1540 | TextLabel51.Transparency = 1 | |
| 1541 | TextLabel51.Size = UDim2.new(-0.800000012, 0, 0.5, 0) | |
| 1542 | TextLabel51.Text = "Galil" | |
| 1543 | TextLabel51.Position = UDim2.new(1.85000002, 0, 0, 0) | |
| 1544 | TextLabel51.BackgroundColor3 = Color3.new(0.501961, 0, 0) | |
| 1545 | TextLabel51.BackgroundTransparency = 1 | |
| 1546 | TextLabel51.ZIndex = 2 | |
| 1547 | TextLabel51.FontSize = Enum.FontSize.Size14 | |
| 1548 | TextLabel51.TextColor3 = Color3.new(1, 1, 1) | |
| 1549 | TextLabel51.TextScaled = true | |
| 1550 | TextLabel51.TextStrokeColor3 = Color3.new(0.647059, 0, 0.129412) | |
| 1551 | TextLabel51.TextWrapped = true | |
| 1552 | TextLabel51.TextXAlignment = Enum.TextXAlignment.Left | |
| 1553 | TextLabel52.Name = "GunTip" | |
| 1554 | TextLabel52.Parent = Frame43 | |
| 1555 | TextLabel52.Transparency = 1 | |
| 1556 | TextLabel52.Size = UDim2.new(-0.800000012, 0, 0.5, 0) | |
| 1557 | TextLabel52.Text = "5.56x45mm " | |
| 1558 | TextLabel52.Position = UDim2.new(1.85000002, 0, 0.449999988, 0) | |
| 1559 | TextLabel52.BackgroundColor3 = Color3.new(0.501961, 0, 0) | |
| 1560 | TextLabel52.BackgroundTransparency = 1 | |
| 1561 | TextLabel52.ZIndex = 2 | |
| 1562 | TextLabel52.FontSize = Enum.FontSize.Size14 | |
| 1563 | TextLabel52.TextColor3 = Color3.new(1, 1, 1) | |
| 1564 | TextLabel52.TextScaled = true | |
| 1565 | TextLabel52.TextStrokeColor3 = Color3.new(0.647059, 0, 0.129412) | |
| 1566 | TextLabel52.TextWrapped = true | |
| 1567 | TextLabel52.TextXAlignment = Enum.TextXAlignment.Left | |
| 1568 | TextLabel53.Name = "GunTip3" | |
| 1569 | TextLabel53.Parent = Frame43 | |
| 1570 | TextLabel53.Transparency = 1 | |
| 1571 | TextLabel53.Size = UDim2.new(-0.800000012, 0, 0.5, 0) | |
| 1572 | TextLabel53.Text = "MADE BY 1ndrew" | |
| 1573 | TextLabel53.Position = UDim2.new(0.800000012, 0, 0.894999981, 0) | |
| 1574 | TextLabel53.BackgroundColor3 = Color3.new(0.501961, 0, 0) | |
| 1575 | TextLabel53.BackgroundTransparency = 1 | |
| 1576 | TextLabel53.ZIndex = 2 | |
| 1577 | TextLabel53.TextColor3 = Color3.new(1, 1, 1) | |
| 1578 | TextLabel53.TextStrokeColor3 = Color3.new(0.647059, 0, 0.129412) | |
| 1579 | TextLabel53.TextXAlignment = Enum.TextXAlignment.Left | |
| 1580 | TextLabel54.Name = "GunTip3" | |
| 1581 | TextLabel54.Parent = Frame43 | |
| 1582 | TextLabel54.Transparency = 1 | |
| 1583 | TextLabel54.Size = UDim2.new(-0.800000012, 0, 0.5, 0) | |
| 1584 | TextLabel54.Text = "V/B = Laser | G = Light" | |
| 1585 | TextLabel54.Position = UDim2.new(0.800000012, 0, 2, 0) | |
| 1586 | TextLabel54.BackgroundColor3 = Color3.new(0.501961, 0, 0) | |
| 1587 | TextLabel54.BackgroundTransparency = 1 | |
| 1588 | TextLabel54.ZIndex = 2 | |
| 1589 | TextLabel54.TextColor3 = Color3.new(1, 1, 1) | |
| 1590 | TextLabel54.TextStrokeColor3 = Color3.new(0.647059, 0, 0.129412) | |
| 1591 | TextLabel54.TextXAlignment = Enum.TextXAlignment.Left | |
| 1592 | Frame55.Parent = ScreenGui42 | |
| 1593 | Frame55.Transparency = 0.5 | |
| 1594 | Frame55.Size = UDim2.new(0, 126, 0, 10) | |
| 1595 | Frame55.Position = UDim2.new(1, -153, 1, -62) | |
| 1596 | Frame55.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392) | |
| 1597 | Frame55.BackgroundTransparency = 0.5 | |
| 1598 | Frame55.BorderSizePixel = 3 | |
| 1599 | TextLabel56.Name = "Caliber" | |
| 1600 | TextLabel56.Parent = Frame55 | |
| 1601 | TextLabel56.Transparency = 1 | |
| 1602 | TextLabel56.Size = UDim2.new(1, 0, 1, 0) | |
| 1603 | TextLabel56.Text = "Made by 1ndrew" | |
| 1604 | TextLabel56.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392) | |
| 1605 | TextLabel56.BackgroundTransparency = 1 | |
| 1606 | TextLabel56.Font = Enum.Font.SourceSansBold | |
| 1607 | TextLabel56.FontSize = Enum.FontSize.Size12 | |
| 1608 | TextLabel56.TextColor3 = Color3.new(0, 0, 0) | |
| 1609 | TextLabel56.TextStrokeColor3 = Color3.new(0.380392, 0.380392, 0.380392) | |
| 1610 | TextLabel56.TextStrokeTransparency = 0.5 | |
| 1611 | TextLabel56.TextXAlignment = Enum.TextXAlignment.Right | |
| 1612 | Part57.Name = "Bolt" | |
| 1613 | Part57.Parent = Tool0 | |
| 1614 | Part57.Material = Enum.Material.SmoothPlastic | |
| 1615 | Part57.BrickColor = BrickColor.new("Dark stone grey")
| |
| 1616 | Part57.Rotation = Vector3.new(90, 0, 0) | |
| 1617 | Part57.Anchored = true | |
| 1618 | Part57.CanCollide = false | |
| 1619 | Part57.FormFactor = Enum.FormFactor.Custom | |
| 1620 | Part57.Size = Vector3.new(0.200000003, 0.402905315, 0.200000003) | |
| 1621 | Part57.CFrame = CFrame.new(-11.9099998, 1.176, -116.266998, 1, -5.89999981e-05, 0, 0, 0, -1, 5.89999981e-05, 1, 0) | |
| 1622 | Part57.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
| 1623 | Part57.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
| 1624 | Part57.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
| 1625 | Part57.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
| 1626 | Part57.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
| 1627 | Part57.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
| 1628 | Part57.Color = Color3.new(0.388235, 0.372549, 0.384314) | |
| 1629 | Part57.Position = Vector3.new(-11.9099998, 1.176, -116.266998) | |
| 1630 | Part57.Orientation = Vector3.new(90, 0, 0) | |
| 1631 | Part57.Color = Color3.new(0.388235, 0.372549, 0.384314) | |
| 1632 | CylinderMesh58.Parent = Part57 | |
| 1633 | CylinderMesh58.Scale = Vector3.new(0.496383131, 1, 0.979876816) | |
| 1634 | CylinderMesh58.Scale = Vector3.new(0.496383131, 1, 0.979876816) | |
| 1635 | Part59.Name = "PMag1" | |
| 1636 | Part59.Parent = Tool0 | |
| 1637 | Part59.Material = Enum.Material.Concrete | |
| 1638 | Part59.Rotation = Vector3.new(90, 0, 90) | |
| 1639 | Part59.Anchored = true | |
| 1640 | Part59.CanCollide = false | |
| 1641 | Part59.Size = Vector3.new(0.611639202, 0.225373551, 1.02088165) | |
| 1642 | Part59.CFrame = CFrame.new(-11.9085007, 0.510469019, -116.243156, 0, -1, 0, 0, 0, -1, 1, 0, 0) | |
| 1643 | Part59.Position = Vector3.new(-11.9085007, 0.510469019, -116.243156) | |
| 1644 | Part59.Orientation = Vector3.new(90, -90, 0) | |
| 1645 | SpecialMesh60.Parent = Part59 | |
| 1646 | SpecialMesh60.MeshId = "rbxassetid://777172237" | |
| 1647 | SpecialMesh60.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 1648 | SpecialMesh60.TextureId = "rbxassetid://777384640" | |
| 1649 | SpecialMesh60.MeshType = Enum.MeshType.FileMesh | |
| 1650 | SpecialMesh60.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 1651 | Part61.Name = "E" | |
| 1652 | Part61.Parent = Tool0 | |
| 1653 | Part61.Material = Enum.Material.SmoothPlastic | |
| 1654 | Part61.BrickColor = BrickColor.new("Cool yellow")
| |
| 1655 | Part61.Reflectance = 0.30000001192093 | |
| 1656 | Part61.Transparency = 1 | |
| 1657 | Part61.Rotation = Vector3.new(-180, 0, 0) | |
| 1658 | Part61.Anchored = true | |
| 1659 | Part61.CanCollide = false | |
| 1660 | Part61.FormFactor = Enum.FormFactor.Custom | |
| 1661 | Part61.Size = Vector3.new(0.200000003, 0.200000003, 0.338) | |
| 1662 | Part61.CFrame = CFrame.new(-11.8579998, 1.176, -116.266998, 1, 0, 0, 0, -1, 0, 0, 0, -1) | |
| 1663 | Part61.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
| 1664 | Part61.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
| 1665 | Part61.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
| 1666 | Part61.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
| 1667 | Part61.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
| 1668 | Part61.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
| 1669 | Part61.Color = Color3.new(0.992157, 0.917647, 0.552941) | |
| 1670 | Part61.Position = Vector3.new(-11.8579998, 1.176, -116.266998) | |
| 1671 | Part61.Orientation = Vector3.new(0, 180, 180) | |
| 1672 | Part61.Color = Color3.new(0.992157, 0.917647, 0.552941) | |
| 1673 | BlockMesh62.Parent = Part61 | |
| 1674 | BlockMesh62.Scale = Vector3.new(0.0769230723, 0.538461506, 1) | |
| 1675 | BlockMesh62.Scale = Vector3.new(0.0769230723, 0.538461506, 1) | |
| 1676 | Part63.Name = "Trigger" | |
| 1677 | Part63.Parent = Tool0 | |
| 1678 | Part63.Material = Enum.Material.SmoothPlastic | |
| 1679 | Part63.BrickColor = BrickColor.new("New Yeller")
| |
| 1680 | Part63.Transparency = 1 | |
| 1681 | Part63.Anchored = true | |
| 1682 | Part63.CanCollide = false | |
| 1683 | Part63.FormFactor = Enum.FormFactor.Custom | |
| 1684 | Part63.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) | |
| 1685 | Part63.CFrame = CFrame.new(-11.8999996, 0.829999983, -115.75, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 1686 | Part63.BottomSurface = Enum.SurfaceType.Smooth | |
| 1687 | Part63.TopSurface = Enum.SurfaceType.Smooth | |
| 1688 | Part63.Color = Color3.new(1, 1, 0) | |
| 1689 | Part63.Position = Vector3.new(-11.8999996, 0.829999983, -115.75) | |
| 1690 | Part63.Color = Color3.new(1, 1, 0) | |
| 1691 | Part64.Name = "Handle" | |
| 1692 | Part64.Parent = Tool0 | |
| 1693 | Part64.Material = Enum.Material.SmoothPlastic | |
| 1694 | Part64.BrickColor = BrickColor.new("New Yeller")
| |
| 1695 | Part64.Reflectance = 0.30000001192093 | |
| 1696 | Part64.Transparency = 1 | |
| 1697 | Part64.Rotation = Vector3.new(-0.340000004, 0, 0) | |
| 1698 | Part64.Anchored = true | |
| 1699 | Part64.CanCollide = false | |
| 1700 | Part64.FormFactor = Enum.FormFactor.Custom | |
| 1701 | Part64.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) | |
| 1702 | Part64.CFrame = CFrame.new(-11.5, 0.5, -115.449997, 1, 7.77400047e-08, -1.29997679e-05, 0, 0.999982119, 0.0059800013, 1.29999999e-05, -0.00598000083, 0.999982119) | |
| 1703 | Part64.BottomSurface = Enum.SurfaceType.Smooth | |
| 1704 | Part64.TopSurface = Enum.SurfaceType.Smooth | |
| 1705 | Part64.Color = Color3.new(1, 1, 0) | |
| 1706 | Part64.Position = Vector3.new(-11.5, 0.5, -115.449997) | |
| 1707 | Part64.Orientation = Vector3.new(-0.340000004, 0, 0) | |
| 1708 | Part64.Color = Color3.new(1, 1, 0) | |
| 1709 | Sound65.Name = "MagIn" | |
| 1710 | Sound65.Parent = Part64 | |
| 1711 | Sound65.SoundId = "http://roblox.com/asset/?id=166238223" | |
| 1712 | Sound65.Volume = 0.20000000298023 | |
| 1713 | Sound66.Name = "MagOut" | |
| 1714 | Sound66.Parent = Part64 | |
| 1715 | Sound66.SoundId = "http://roblox.com/asset/?id=166238177" | |
| 1716 | Sound66.Volume = 0.20000000298023 | |
| 1717 | Sound67.Name = "Click" | |
| 1718 | Sound67.Parent = Part64 | |
| 1719 | Sound67.SoundId = "http://www.roblox.com/asset/?id=146501511" | |
| 1720 | Sound68.Name = "Shoot" | |
| 1721 | Sound68.Parent = Part64 | |
| 1722 | Sound68.SoundId = "rbxassetid://169799921" | |
| 1723 | Sound68.Volume = 1 | |
| 1724 | Part69.Name = "Upper receiver" | |
| 1725 | Part69.Parent = Tool0 | |
| 1726 | Part69.Material = Enum.Material.Concrete | |
| 1727 | Part69.Rotation = Vector3.new(90, 0, 90) | |
| 1728 | Part69.Anchored = true | |
| 1729 | Part69.CanCollide = false | |
| 1730 | Part69.Size = Vector3.new(1.22473347, 0.225373551, 0.225373551) | |
| 1731 | Part69.CFrame = CFrame.new(-11.9085007, 1.18544996, -115.871094, 0, -1, 0, 0, 0, -1, 1, 0, 0) | |
| 1732 | Part69.Position = Vector3.new(-11.9085007, 1.18544996, -115.871094) | |
| 1733 | Part69.Orientation = Vector3.new(90, -90, 0) | |
| 1734 | SpecialMesh70.Parent = Part69 | |
| 1735 | SpecialMesh70.MeshId = "rbxassetid://777155048" | |
| 1736 | SpecialMesh70.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 1737 | SpecialMesh70.TextureId = "rbxassetid://777328045" | |
| 1738 | SpecialMesh70.MeshType = Enum.MeshType.FileMesh | |
| 1739 | SpecialMesh70.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387) | |
| 1740 | for i,v in pairs(mas:GetChildren()) do | |
| 1741 | v.Parent = game:GetService("Players").LocalPlayer.Backpack
| |
| 1742 | pcall(function() v:MakeJoints() end) | |
| 1743 | end | |
| 1744 | mas:Destroy() | |
| 1745 | for i,v in pairs(cors) do | |
| 1746 | spawn(function() | |
| 1747 | pcall(v) | |
| 1748 | end) | |
| 1749 | end |