Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- svd = Instance.new("Tool",game.Players.LocalPlayer.Backpack)
- svd.GripPos = Vector3.new(-0.10000000149012,-0.40000000596046,0.10000000149012)
- svd.Grip = CFrame.new(-0.10000000149012,-0.40000000596046,0.10000000149012) * CFrame.Angles(3.1414785385132, 1.3336758613586, 3.1415865421295)
- svd.GripForward = Vector3.new(-0.97201842069626,2.6802434149431e-005,0.23490445315838)
- svd.CanBeDropped = false
- svd.Name = "SVD"
- svd.GripRight = Vector3.new(-0.2349044829607,-0.00011697719310177,-0.97201853990555)
- svd.GripUp = Vector3.new(-1.4260000398281e-006,1,-0.00011999999696855)
- svd.ToolTip = "[10] Snayperskaya Vintovka Dragunova"
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,1.1200100183487,13.953337669373) * CFrame.Angles(0, 1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",part)
- mesh.Scale = Vector3.new(0.66666668653488,0.66666668653488,0.33333334326744)
- maxammo = Instance.new("IntValue",svd)
- maxammo.Name = "MaxAmmo"
- maxammo.Value = 10
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,1.2533299922943,13.319984436035) * CFrame.Angles(-1.5707963705063, 7.2759576141834e-012, 3.1415927410126)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("CylinderMesh",part)
- mesh.Scale = Vector3.new(1,0.33333334326744,2)
- stringvalue = Instance.new("StringValue",svd)
- stringvalue.Name = "StringValue"
- isdown = Instance.new("BoolValue",svd)
- isdown.Name = "IsDown"
- ammo = Instance.new("IntValue",svd)
- ammo.Name = "Ammo"
- ammo.Value = 10
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,1.133333325386,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,1.0167570114136,14.986680030823) * CFrame.Angles(1.5707963705063, -7.2759576141834e-012, 1.1368683772162e-013)
- part.BrickColor = BrickColor.new("Reddish brown")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("SpecialMesh",part)
- mesh.Scale = Vector3.new(1.5,1,1)
- storedammo = Instance.new("IntValue",svd)
- storedammo.Name = "StoredAmmo"
- storedammo.Value = 60
- zoomedin = Instance.new("BoolValue",svd)
- zoomedin.Name = "ZoomedIn"
- visibleb = Instance.new("BoolValue",svd)
- visibleb.Name = "VisibleB"
- modetext = Instance.new("StringValue",svd)
- modetext.Name = "ModeText"
- modetext.Value = "Nil"
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,1.1200100183487,13.620007514954) * CFrame.Angles(0, 1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",part)
- mesh.Scale = Vector3.new(0.66666668653488,0.66666668653488,0.33333334326744)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,1.2533349990845,13.286680221558) * CFrame.Angles(-3.1415927410126, 1.1368683772162e-013, -3.1415927410126)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("SpecialMesh",part)
- mesh.Scale = Vector3.new(0.17333333194256,0.17333333194256,0.66666668653488)
- mesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
- mesh.TextureId = "http://www.roblox.com/asset/?id=0"
- mesh.MeshType = Enum.MeshType.FileMesh
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,1.2666666507721,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.8866760134697,16.120010375977) * CFrame.Angles(1.5707963705063, -1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("CylinderMesh",part)
- mesh.Scale = Vector3.new(0.5,1,0.66666668653488)
- handle = Instance.new("Part",svd)
- handle.CanCollide = false
- handle.Transparency = 1
- handle.TopSurface = Enum.SurfaceType.Smooth
- handle.Anchored = false
- handle.Size = Vector3.new(1,1.2000000476837,1)
- handle.Name = "Handle"
- handle.CFrame = CFrame.new(-21.383255004883,0.65335100889206,13.443597793579) * CFrame.Angles(7.8047623901512e-006, 1.5707963705063, 0)
- handle.BrickColor = BrickColor.new("Black")
- handle.Friction = 0.30000001192093
- handle.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",handle)
- mesh.Scale = Vector3.new(0.16666667163372,0.36666667461395,0.20000000298023)
- fire = Instance.new("Sound",handle)
- fire.Pitch = 1.5
- fire.Name = "Fire"
- fire.Volume = 1
- fire.SoundId = "http://roblox.com/asset/?id=10209859"
- reload = Instance.new("Sound",handle)
- reload.Name = "Reload"
- reload.Volume = 1
- reload.SoundId = "http://www.roblox.com/asset/?version=1&id=2691591"
- switch = Instance.new("Sound",handle)
- switch.Pitch = 1.5
- switch.Name = "Switch"
- switch.Volume = 1
- switch.SoundId = "rbxasset://sounds//clickfast.wav"
- barrel = Instance.new("Part",svd)
- barrel.FormFactor = Enum.FormFactor.Custom
- barrel.CanCollide = false
- barrel.TopSurface = Enum.SurfaceType.Smooth
- barrel.Anchored = false
- barrel.Size = Vector3.new(0.20000000298023,0.26666668057442,0.20000000298023)
- barrel.Name = "Barrel"
- barrel.CFrame = CFrame.new(-21.399993896484,0.88667798042297,16.820028305054) * CFrame.Angles(1.5707963705063, -1.5707963705063, 0)
- barrel.BrickColor = BrickColor.new("Black")
- barrel.Friction = 0.30000001192093
- barrel.BottomSurface = Enum.SurfaceType.Smooth
- decal = Instance.new("Decal",barrel)
- decal.Face = Enum.NormalId.Top
- decal.Texture = "http://www.roblox.com/asset/?id=94500807"
- mesh = Instance.new("CylinderMesh",barrel)
- mesh.Scale = Vector3.new(0.66666668653488,1,0.66666668653488)
- light = Instance.new("BillboardGui",barrel)
- light.Enabled = false
- light.Active = true
- light.Adornee = Barrel
- light.Name = "Light"
- light.Size = UDim2.new(2.75, 0, 2.75, 0)
- light = Instance.new("ImageLabel",light)
- light.Visible = false
- light.Active = true
- light.Image = "http://www.roblox.com/asset/?id=95361991"
- light.Size = UDim2.new(0.75, 0, 0.66, 0)
- light.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
- light.BackgroundTransparency = 1
- light.Position = UDim2.new(0.125, 0, 0.15, 0)
- light.Name = "Light"
- light.BackgroundColor3 = Color3.new(0.756863, 0.752941, 0.764706)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,1.0866730213165,13.620007514954) * CFrame.Angles(0, 1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",part)
- mesh.Scale = Vector3.new(0.66666668653488,0.33333334326744,1)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.26666668057442,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,1.2533349990845,13.486680030823) * CFrame.Angles(-1.5707963705063, 7.2759576141834e-012, 3.1415927410126)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("CylinderMesh",part)
- mesh.Scale = Vector3.new(0.66666668653488,1,1.3333333730698)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.26666668057442,0.20000000298023,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.59333699941635,13.553345680237) * CFrame.Angles(-0, -1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",part)
- mesh.Scale = Vector3.new(1,0.066666670143604,0.66666668653488)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.40000000596046,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.86384499073029,14.606811523438) * CFrame.Angles(1.3961431980133, -1.978526415769e-005, -4.7557005018461e-005)
- part.BrickColor = BrickColor.new("Reddish brown")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("SpecialMesh",part)
- mesh.Scale = Vector3.new(1.5,1,1)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.46666666865349,0.26666668057442,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.60096096992493,13.220337867737) * CFrame.Angles(1.8599240779877, -1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Reddish brown")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",part)
- mesh.Scale = Vector3.new(1,1,0.89999997615814)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.26666668057442,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.72001898288727,13.653351783752) * CFrame.Angles(-3.0517574487021e-005, -1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",part)
- mesh.Scale = Vector3.new(0.33333334326744,1,0.66666668653488)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.26666668057442)
- part.CFrame = CFrame.new(-21.39999961853,1.0533410310745,16.520004272461) * CFrame.Angles(1.5707963705063, -7.2759576141834e-012, -3.1415927410126)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("SpecialMesh",part)
- mesh.Scale = Vector3.new(0.33333334326744,1,1)
- mesh.MeshType = Enum.MeshType.Wedge
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(1.133333325386,0.20000000298023,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.95673596858978,14.986665725708) * CFrame.Angles(0, 1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Reddish brown")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",part)
- mesh.Scale = Vector3.new(1,0.66666668653488,1)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.93333333730698,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.47972100973129,12.637727737427) * CFrame.Angles(1.5271239280701, -1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Reddish brown")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",part)
- mesh.Scale = Vector3.new(0.33333334326744,1,0.89999997615814)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.86666667461395)
- part.CFrame = CFrame.new(-21.399993896484,0.41166898608208,12.607316017151) * CFrame.Angles(3.0980036258698, 7.7024014899507e-005, -3.9828235458117e-005)
- part.BrickColor = BrickColor.new("Reddish brown")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("SpecialMesh",part)
- mesh.Scale = Vector3.new(0.89999997615814,0.33333334326744,1)
- mesh.MeshType = Enum.MeshType.Wedge
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.33333334326744,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.49702900648117,12.269940376282) * CFrame.Angles(1.5271239280701, -1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Reddish brown")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",part)
- mesh.Scale = Vector3.new(0.66666668653488,1,0.89999997615814)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.66355001926422,12.262665748596) * CFrame.Angles(3.0979778766632, -1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Dark stone grey")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("CylinderMesh",part)
- mesh.Scale = Vector3.new(0.16666667163372,1,0.16666667163372)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,1.2000000476837,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.81279301643372,12.623167991638) * CFrame.Angles(1.5271239280701, -1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Reddish brown")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",part)
- mesh.Scale = Vector3.new(0.33333334326744,1,0.89999997615814)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.40000000596046,0.20000000298023,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.5563600063324,12.100509643555) * CFrame.Angles(1.5271239280701, -1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Reddish brown")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",part)
- mesh.Scale = Vector3.new(1,0.66666668653488,0.89999997615814)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.99722599983215,13.320495605469) * CFrame.Angles(0.78535580635071, -9.7146912594326e-006, -1.3593356925412e-005)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("SpecialMesh",part)
- mesh.Scale = Vector3.new(1.5,1,1)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,1.2000000476837,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,1.0167520046234,13.886672019958) * CFrame.Angles(1.5707963705063, -7.2759576141834e-012, 1.1368683772162e-013)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("SpecialMesh",part)
- mesh.Scale = Vector3.new(1.5,1,1)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(1.2000000476837,0.26666668057442,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.88667798042297,13.820003509521) * CFrame.Angles(0, 1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",part)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.46666666865349,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,1.2533299922943,13.786680221558) * CFrame.Angles(-1.5707963705063, 7.2759576141834e-012, 3.1415927410126)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("CylinderMesh",part)
- mesh.Scale = Vector3.new(1,1,2)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.33333334326744,0.20000000298023)
- part.CFrame = CFrame.new(-21.39999961853,1.0167520046234,15.586675643921) * CFrame.Angles(1.5707963705063, -1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("CylinderMesh",part)
- mesh.Scale = Vector3.new(0.5,1,0.66666668653488)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.96258401870728,15.792440414429) * CFrame.Angles(2.3561956882477, -1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("CylinderMesh",part)
- mesh.Scale = Vector3.new(0.5,1,0.66666668653488)
- mag = Instance.new("Part",svd)
- mag.FormFactor = Enum.FormFactor.Custom
- mag.CanCollide = false
- mag.TopSurface = Enum.SurfaceType.Smooth
- mag.Anchored = false
- mag.Size = Vector3.new(0.33333334326744,0.33333334326744,0.20000000298023)
- mag.Name = "Mag"
- mag.CFrame = CFrame.new(-21.399993896484,0.6533420085907,13.986680030823) * CFrame.Angles(-3.1415927410126, -1.5707963705063, 0)
- mag.BrickColor = BrickColor.new("Black")
- mag.Friction = 0.30000001192093
- mag.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",mag)
- mesh.Scale = Vector3.new(1,1.1000000238419,0.89999997615814)
- mag2 = Instance.new("Part",svd)
- mag2.FormFactor = Enum.FormFactor.Custom
- mag2.CanCollide = false
- mag2.TopSurface = Enum.SurfaceType.Smooth
- mag2.Anchored = false
- mag2.Size = Vector3.new(0.33333334326744,0.20000000298023,0.20000000298023)
- mag2.Name = "Mag2"
- mag2.CFrame = CFrame.new(-21.399993896484,0.39999398589134,14.000012397766) * CFrame.Angles(2.9670794010162, -1.5707963705063, 0)
- mag2.BrickColor = BrickColor.new("Black")
- mag2.Friction = 0.30000001192093
- mag2.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",mag2)
- mesh.Scale = Vector3.new(1,1.1000000238419,0.89999997615814)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.61900502443314,13.401012420654) * CFrame.Angles(0.78537756204605, -1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",part)
- mesh.Scale = Vector3.new(0.33333334326744,0.066666670143604,0.66666668653488)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,1.2000000476837,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.88667798042297,14.953337669373) * CFrame.Angles(1.5707963705063, -7.2759576141834e-012, 1.1368683772162e-013)
- part.BrickColor = BrickColor.new("Reddish brown")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("SpecialMesh",part)
- mesh.Scale = Vector3.new(1.5,1,1)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.40000000596046,0.26666668057442,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,0.63896298408508,12.463959693909) * CFrame.Angles(1.5271239280701, -1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Reddish brown")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",part)
- mesh.Scale = Vector3.new(1,1,0.89999997615814)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,1.0866730213165,13.953337669373) * CFrame.Angles(0, 1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("BlockMesh",part)
- mesh.Scale = Vector3.new(0.66666668653488,0.33333334326744,1)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.Transparency = 0.40000000596046
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Reflectance = 0.20000000298023
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,1.2533299922943,14.386684417725) * CFrame.Angles(-1.5708290338516, 1.5707963705063, 0)
- part.BrickColor = BrickColor.new("White")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("CylinderMesh",part)
- mesh.Scale = Vector3.new(1.3333333730698,0.34999999403954,0.66666668653488)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.26666668057442,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,1.2533349990845,13.486680030823) * CFrame.Angles(1.5707428455353, 1.5707963705063, 0)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("SpecialMesh",part)
- mesh.Scale = Vector3.new(0.10000000149012,0.36666667461395,0.10000000149012)
- mesh.MeshId = "http://www.roblox.com/asset/?id=1033714"
- mesh.VertexColor = Vector3.new(0,0,0)
- mesh.MeshType = Enum.MeshType.FileMesh
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.Transparency = 0.40000000596046
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Reflectance = 0.20000000298023
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,1.2533299922943,13.319984436035) * CFrame.Angles(-1.5708290338516, 1.5707963705063, 0)
- part.BrickColor = BrickColor.new("White")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("CylinderMesh",part)
- mesh.Scale = Vector3.new(1.5,0.34999999403954,0.75)
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,1.2533299922943,14.386684417725) * CFrame.Angles(-3.1415927410126, 5.3468229452847e-005, 3.1415495872498)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("SpecialMesh",part)
- mesh.Scale = Vector3.new(0.15000000596046,0.15000000596046,0.66666668653488)
- mesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
- mesh.TextureId = "http://www.roblox.com/asset/?id=0"
- mesh.MeshType = Enum.MeshType.FileMesh
- part = Instance.new("Part",svd)
- part.FormFactor = Enum.FormFactor.Custom
- part.CanCollide = false
- part.TopSurface = Enum.SurfaceType.Smooth
- part.Anchored = false
- part.Size = Vector3.new(0.20000000298023,0.33333334326744,0.20000000298023)
- part.CFrame = CFrame.new(-21.399993896484,1.2533349990845,14.186676025391) * CFrame.Angles(-1.5707658529282, -3.0517570849042e-005, 3.1415622234344)
- part.BrickColor = BrickColor.new("Black")
- part.Friction = 0.30000001192093
- part.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("CylinderMesh",part)
- mesh.Scale = Vector3.new(0.83333337306976,1,1.6666667461395)
- Tool = svd;
- local arms = nil
- local torso = nil
- local welds = {}
- function Equip(mouse)
- wait(0.01)
- arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
- torso = Tool.Parent:FindFirstChild("Torso")
- if arms ~= nil and torso ~= nil then
- local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
- if sh ~= nil then
- local yes = true
- if yes then
- yes = false
- sh[1].Part1 = nil
- sh[2].Part1 = nil
- local weld1 = Instance.new("Weld")
- weld1.Part0 = torso
- weld1.Parent = torso
- weld1.Part1 = arms[1]
- weld1.C1 = CFrame.new(-0.249, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))
- welds[1] = weld1
- weld1.Name = "weld1"
- local weld2 = Instance.new("Weld")
- weld2.Part0 = torso
- weld2.Parent = torso
- weld2.Part1 = arms[2]
- weld2.C1 = CFrame.new(-0.75, -0.2, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
- welds[2] = weld2
- weld2.Name = "weld2"
- end
- else
- print("sh")
- end
- else
- print("arms")
- end
- end
- function Unequip(mouse)
- if arms ~= nil and torso ~= nil then
- local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
- if sh ~= nil then
- local yes = true
- if yes then
- yes = false
- sh[1].Part1 = arms[1]
- sh[2].Part1 = arms[2]
- welds[1].Parent = nil
- welds[2].Parent = nil
- end
- else
- print("sh")
- end
- else
- print("arms")
- end
- end
- Tool.Equipped:connect(Equip)
- Tool.Unequipped:connect(Unequip)
- local prev
- local parts = svd:GetChildren()
- for i = 1,#parts do
- if (parts[i].className == "Part") then
- if (prev ~= nil)then
- local weld = Instance.new("Weld")
- weld.Part0 = prev
- weld.Part1 = parts[i]
- weld.C0 = prev.CFrame:inverse()
- weld.C1 = parts[i].CFrame:inverse()
- weld.Parent = prev
- end
- prev = parts[i]
- end
- end
- local Tool = svd
- a = false
- cam = nil
- wut = Tool.Parent
- MaximumZoom = 1
- function onEquipped(mouse2)
- mouse2.KeyDown:connect(onkeyDown)
- mouse = mouse2
- end
- function onkeyDown(key)
- if (key == "q") and svd.IsDown.Value == false then
- local Camera = workspace.CurrentCamera
- local Pos1 = Vector3.new(Camera.Focus.X, Camera.Focus.Y, Camera.Focus.Z)
- local Pos2 = Vector3.new(Camera.CoordinateFrame.X, Camera.CoordinateFrame.Y, Camera.CoordinateFrame.Z)
- local Distance = (Pos1-Pos2).magnitude
- if not a then
- cam=game.Workspace.CurrentCamera:clone()
- cam.Parent=game.Workspace
- game.Workspace.CurrentCamera.FieldOfView = 17
- a=true
- else
- game.Workspace.CurrentCamera:Remove()
- game.Workspace.CurrentCamera = cam
- game.Workspace.CurrentCamera.FieldOfView = 70
- a=false
- end
- end
- end
- svd.Equipped:connect(onEquipped)
- on = 0
- Tool = svd
- welds = {}
- sh = {}
- arms = nil
- torso = nil
- f = nil
- function StanceChange(ison)
- if arms == nil and torso == nil then
- arms = {Tool.Parent:FindFirstChild("Left Leg"), Tool.Parent:FindFirstChild("Right Leg")}
- torso = Tool.Parent:FindFirstChild("Torso")
- end
- if arms ~= nil and torso ~= nil then
- sh = {torso:FindFirstChild("Left Hip"), torso:FindFirstChild("Right Hip")}
- if sh ~= nil then
- local yes = true
- if yes then
- yes = false
- -------------------------------------------
- if ison == 1 then
- sh[1].Part1 = nil
- sh[2].Part1 = nil
- local weld1 = Instance.new("Weld")
- weld1.Part0 = torso
- weld1.Parent = torso
- weld1.Part1 = arms[1]
- weld1.C1 = CFrame.new(0.5, 0.6, 1.15) * CFrame.fromEulerAnglesXYZ(math.rad(20),0,0) --Left leg
- arms[1].Name = "LDave"
- arms[1].CanCollide = true
- welds[1] = weld1
- Tool.Parent.Humanoid.WalkSpeed = 11
- local weld2 = Instance.new("Weld")
- weld2.Part0 = torso
- weld2.Parent = torso
- weld2.Part1 = arms[2]
- weld2.C1 = CFrame.new(-0.5,0.495,1) * CFrame.fromEulerAnglesXYZ(math.rad(60),0,0) --Right leg
- arms[2].Name = "RDave"
- arms[2].CanCollide = true
- welds[2] = weld2
- local force = Instance.new("BodyForce")
- force.Parent = torso
- f = force
- wait(0.01)
- -------------------------------------------
- elseif ison == 2 then
- sh[1].Part1 = nil
- sh[2].Part1 = nil
- local weld1 = Instance.new("Weld")
- weld1.Part0 = torso
- weld1.Parent = torso
- weld1.Part1 = arms[1]
- weld1.C1 = CFrame.new(0.4, 1.25, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(90),0.25,0) --Left leg
- arms[1].Name = "LDave"
- arms[1].CanCollide = true
- welds[1] = weld1
- Tool.Parent.Humanoid.WalkSpeed = 7
- local weld2 = Instance.new("Weld")
- weld2.Part0 = torso
- weld2.Parent = torso
- weld2.Part1 = arms[2]
- weld2.C1 = CFrame.new(-0.4, 1.25, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(90),-0.25,0) --Right leg
- arms[2].Name = "RDave"
- arms[2].CanCollide = true
- welds[2] = weld2
- local force = Instance.new("BodyForce")
- force.Parent = torso
- f = force
- wait(0.01)
- -------------------------------------------
- elseif ison == 0 then
- if arms then
- sh[1].Part1 = arms[1]
- sh[2].Part1 = arms[2]
- f.Parent = nil
- arms[2].Name = "Right Leg"
- arms[1].Name = "Left Leg"
- welds[1].Parent = nil
- welds[2].Parent = nil
- Tool.Parent.Humanoid.WalkSpeed = 16
- end
- end
- end
- end
- end
- end
- function Key(key)
- if key then
- key = string.lower(key)
- if (key=="x") then --lower stance
- if on == 0 then
- on = 1
- StanceChange(on)
- elseif on == 1 then
- on = 0
- StanceChange(on)
- wait(0.1)
- on = 2
- StanceChange(on)
- elseif on > 1 then
- end
- end
- if (key=="c") then --raise stance
- if on == 2 then
- on = 0
- StanceChange(on)
- wait(0.1)
- on = 1
- StanceChange(on)
- elseif on == 1 then
- on = 0
- StanceChange(on)
- elseif on < 1 then
- end
- end
- end
- end
- function Equip(mouse)
- mouse.KeyDown:connect(Key)
- end
- svd.Equipped:connect(Equip)
- wait(1)
- local Tool = svd;
- local pewsound
- local bangsound
- local cam
- local ggui
- --EDITED BY ROBOTESTGEAR.. I made it way better -.-
- enabled = true
- automatichold = false
- dmged = false
- shotgun = false
- equipped = false
- reloading = false
- -----------------------------------------------------------------------------ONLY EDIT THESE VALUES!!!!!
- -----!Instructions!-----
- --Make sure you have a part in the gun named Barrel, it is where the laser will shoot from.--
- --Just place this script into any gun and edit the values below.--
- --Don't edit anything else or risk breaking it.--
- --Acttuly mr. guy who scripted this, Myself (robotestgear) made it better. You're welcome. :)
- ------------------------
- DamageMin = 75
- DamageMax = 160
- SPS = 6 -- Shots Per Second, gives a limit of how fast the gun shoots.
- Accuracy = 11.5 -- [1-10] [1 = Minigun, 10 = Sniper]
- WallShoot = false -- Shoots through walls.
- GH = false -- [True = RB can't hurt RB.] [False = RB can hurt RB.]
- BulletColor = "Bright yellow" -- Any Brickcolor will work.
- Flash = true
- --------------------------------------------------------------------------------------------------------
- local zm = Instance.new("Part")
- zm.Name = "ZoomZM"
- zm.Anchored = true
- zm.Transparency = 1
- zm.Size = Vector3.new(1,1,1)
- zm.CanCollide = false
- GunType = 0
- --[[local gui = Instance.new("ScreenGui")
- local bg = Instance.new("Frame",gui)
- local bar = Instance.new("Frame",bg)
- local bvl = Instance.new("ImageLabel", bg)
- bvl.Name = "Bevel"
- bvl.BackgroundTransparency = 1
- bvl.Image = "http://www.roblox.com/asset/?id=56852431"
- bvl.Size = UDim2.new(1,0,1,0)
- bg.Name = "Back"
- bar.Name = "Charge"
- bar.BackgroundColor3 = Color3.new(200/255,0/255,0/255)
- bg.BackgroundColor3 = Color3.new(200/255,200/255,200/255)
- bg.Size = UDim2.new(0,10,0,-100)
- bg.Position = UDim2.new(0,5,0,500)
- bar.Size = UDim2.new(0,4,-1,0)
- bar.Position = UDim2.new(0,3,1,0)
- ggui = gui:Clone()
- ggui.Name = "GunGui"
- ggui.Back.Charge.Size = UDim2.new(0,4,-(script.Charge.Value/100),0)]]
- GroupID = 5520
- function AntiGH(char1,char2)
- if GH then
- local plyr1 = game.Players:findFirstChild(char1.Name)
- local plyr2 = game.Players:findFirstChild(char2.Name)
- if plyr1 and plyr2 then
- if plyr1:IsInGroup(GroupID) and plyr2:IsInGroup(GroupID) then
- return false
- end
- end
- return true
- elseif not GH then
- return true
- end
- end
- MaxDist = 2400
- function RayCast(Start,End,Ignore)
- if WallShoot then
- ray1 = Ray.new(Start, End.unit * 999.999)
- local Part1, TempPos = Workspace:FindPartOnRay(ray1,Ignore)
- ray2 = Ray.new(TempPos, End.unit * 999.999)
- local Part2, EndPos = Workspace:FindPartOnRay(ray2,Part1)
- return Part1, Part2, EndPos
- elseif not WallShoot then
- ray = Ray.new(Start, End.unit * 999.999)
- return Workspace:FindPartOnRay(ray,Ignore)
- end
- end
- function DmgPlr(Part)
- if Part ~= nil then
- local c = Instance.new("ObjectValue")
- c.Name = "creator"
- c.Value = game.Players:findFirstChild(svd.Parent.Name)
- local hum = Part.Parent:findFirstChild("Humanoid")
- local hathum = Part.Parent.Parent:findFirstChild("Humanoid")
- local hat = Part.Parent
- if hathum ~= nil and hat:IsA("Hat") and AntiGH(hathum.Parent, script.Parent.Parent) then
- hathum:TakeDamage((math.random(DamageMin,DamageMax))/3)
- Part.Parent = game.Workspace
- Part.CFrame = CFrame.new(Part.Position + Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)))
- hat:Remove()
- c.Parent = hathum
- game.Debris:AddItem(c,1.5)
- elseif hum ~= nil and AntiGH(hum.Parent, svd.Parent) then
- if Part.Name == "Head" then
- hum:TakeDamage((math.random(DamageMin,DamageMax))*2)
- end
- hum:TakeDamage((math.random(DamageMin,DamageMax)))
- c.Parent = hum
- game.Debris:AddItem(c,1.5)
- end
- end
- end
- function onButton1Down(mouse)
- if svd.Ammo.Value == 0 and reloading == false then
- else
- if GunType == 0 and svd.IsDown.Value == false then
- if (not enabled) then return end
- enabled = false
- LaserShoot(mouse)
- if Flash then
- svd.Barrel.Light.Light.Visible = true
- end
- svd.Ammo.Value = svd.Ammo.Value - 1
- wait(0.01)
- if Flash then
- svd.Barrel.Light.Light.Visible = false
- end
- wait(1/SPS)
- enabled = true
- elseif GunType == 1 and svd.IsDown.Value == false then
- automatichold = true
- while automatichold == true and svd.Ammo.Value ~= 0 do wait()
- if (not enabled) then return end
- if svd.Parent:findFirstChild("Humanoid").Health == 0 then svd:Remove() end
- enabled = false
- LaserShoot(mouse)
- if Flash then
- svd.Barrel.Light.Light.Visible = true
- end
- svd.Ammo.Value = svd.Ammo.Value - 1
- wait(0.01)
- if Flash then
- svd.Barrel.Light.Light.Visible = false
- end
- wait(1/SPS)
- enabled = true
- end
- end
- end
- end
- function LaserShoot(mouse)
- hit = mouse.Hit.p
- local StartPos = svd.Barrel.CFrame.p
- local rv = (StartPos-hit).magnitude/(Accuracy * 20)
- local rcl = Vector3.new(math.random(-rv,rv),math.random(-rv,rv),math.random(-rv,rv))
- aim = hit + rcl
- local P = Instance.new("Part")
- P.Name = "Bullet"
- P.formFactor = 3
- P.BrickColor = BrickColor.new(BulletColor)
- P.Size = Vector3.new(0.1,0.1,0.1)
- P.Anchored = true
- P.CanCollide = false
- P.Transparency = 1
- P.Parent = svd.Parent
- local m = Instance.new("CylinderMesh")
- m.Name = "Mesh"
- m.Parent = P
- local c = Instance.new("ObjectValue")
- c.Name = "creator"
- c.Value = game.Players:findFirstChild(svd.Parent.Name)
- pewsound = svd.Handle:FindFirstChild("Fire")
- if pewsound then
- pewsound:Play()
- end --Brick created. Moving on to next part
- local SPos = svd.Barrel.CFrame.p
- if WallShoot then
- local Part1, Part2, EndPos = RayCast(SPos, (aim-SPos).unit * 999, svd.Parent)
- DmgPlr(Part1)
- DmgPlr(Part2)
- if Part1 and Part2 then
- local enddist = (EndPos-SPos).magnitude
- P.CFrame = CFrame.new(EndPos, SPos) * CFrame.new(0,0,-enddist/2) * CFrame.Angles(math.rad(90),0,0)
- m.Scale = Vector3.new(.04,enddist,.04)
- else
- P.CFrame = CFrame.new(EndPos, SPos) * CFrame.new(0,0,-MaxDist/2) * CFrame.Angles(math.rad(90),0,0)
- m.Scale = Vector3.new(.04,MaxDist,.04)
- end
- elseif not WallShoot then
- local Part, Pos = RayCast(SPos, (aim-SPos).unit * 999, svd.Parent)
- DmgPlr(Part)
- if Part then
- local dist = (Pos-SPos).magnitude
- P.CFrame = CFrame.new(Pos, SPos) * CFrame.new(0,0,-dist/2) * CFrame.Angles(math.rad(90),0,0)
- m.Scale = Vector3.new(.1,dist,.1)
- else
- P.CFrame = CFrame.new(Pos, SPos) * CFrame.new(0,0,-MaxDist/2) * CFrame.Angles(math.rad(90),0,0)
- m.Scale = Vector3.new(.1,MaxDist,.1)
- end
- end
- game.Debris:AddItem(P,.1)
- end
- function onButton1Up(mouse)
- automatichold = false
- end
- function onKeyDown(key, mouse)
- if key:lower() == "r" then
- if svd.Ammo.Value < svd.MaxAmmo.Value and reloading == false and svd.StoredAmmo.Value >= 1 then
- reloadsound = svd.Handle:FindFirstChild("Reload")
- if reloadsound then
- reloadsound:Play()
- end
- enabled = false
- svd.VisibleB.Value = true
- svd.StringValue.Value = "Reloading"
- reloading = true
- svd.Mag.Transparency = 1
- svd.Mag2.Transparency = 1
- svd.StoredAmmo.Value = svd.StoredAmmo.Value + svd.Ammo.Value
- svd.Ammo.Value = 0
- if svd.StoredAmmo.Value >= svd.MaxAmmo.Value then
- svd.StoredAmmo.Value = svd.StoredAmmo.Value - svd.MaxAmmo.Value
- wait(3)
- svd.Ammo.Value = svd.MaxAmmo.Value
- svd.StoredAmmo.Value = svd.StoredAmmo.Value - (svd.MaxAmmo.Value - svd.Ammo.Value)
- elseif svd.StoredAmmo.Value < svd.MaxAmmo.Value and svd.StoredAmmo.Value >= 1 then
- wait(3)
- svd.Ammo.Value = svd.StoredAmmo.Value
- svd.StoredAmmo.Value = 0
- end
- wait(0.2)
- svd.VisibleB.Value = false
- enabled = true
- reloading = false
- svd.Mag.Transparency = 0
- svd.Mag2.Transparency = 0
- end
- end
- if key:lower() == "m" then
- switch = svd.Handle.Switch
- if GunType == 1 then
- switch:Play()
- GunType = 0
- Accuracy = 11.5
- else
- switch:Play()
- GunType = 0
- Accuracy = 11.5
- end
- end
- end
- function onEquipped(mouse)
- equipped = true
- if mouse == nil then
- print("Mouse not found")
- return
- end
- mouse.Icon = "http://www.roblox.com/asset/?id=52812029"
- mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- mouse.Button1Up:connect(function() onButton1Up(mouse) end)
- mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
- end
- function onUnequipped(mouse)
- equipped = false
- automatichold = false
- end
- svd.Equipped:connect(onEquipped)
- svd.Unequipped:connect(onUnequipped)
- while true do wait()
- if svd.Ammo.Value == 0 then
- svd.VisibleB.Value = true
- svd.StringValue.Value = "Reload"
- end
- if GunType == 1 and svd.IsDown.Value == false then
- svd.ModeText.Value = "Auto"
- elseif GunType == 0 and svd.IsDown.Value == false then
- svd.ModeText.Value = "Semi"
- elseif svd.IsDown.Value == true then
- svd.ModeText.Value = "Safe"
- end
- end
- screengui = Instance.new("ScreenGui",svd)
- stats = Instance.new("Frame",screengui)
- stats.Size = UDim2.new(0.15, 0, 0.175, 0)
- stats.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
- stats.Name = "Stats"
- stats.Position = UDim2.new(0.1, 0, 0.65, 0)
- stats.Style = Enum.FrameStyle.RobloxRound
- stats.BackgroundColor3 = Color3.new(0.639216, 0.635294, 0.647059)
- mode = Instance.new("TextButton",stats)
- mode.FontSize = Enum.FontSize.Size18
- mode.BackgroundTransparency = 1
- mode.Size = UDim2.new(1, 0, 0.5, 0)
- mode.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
- mode.Text = "Mode: Nil"
- mode.Font = Enum.Font.ArialBold
- mode.Name = "Mode"
- mode.TextColor3 = Color3.new(0.866667, 0.866667, 0.866667)
- mode.BackgroundColor3 = Color3.new(0.639216, 0.635294, 0.647059)
- ammo = Instance.new("TextButton",stats)
- ammo.FontSize = Enum.FontSize.Size18
- ammo.BackgroundTransparency = 1
- ammo.Position = UDim2.new(-0.12, 0, 0.5, 0)
- ammo.Size = UDim2.new(1, 0, 0.5, 0)
- ammo.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
- ammo.Text = "Ammo: "
- ammo.Font = Enum.Font.ArialBold
- ammo.Name = "Ammo"
- ammo.TextColor3 = Color3.new(0.866667, 0.866667, 0.866667)
- ammo.BackgroundColor3 = Color3.new(0.639216, 0.635294, 0.647059)
- ammo = Instance.new("TextButton",ammo)
- ammo.FontSize = Enum.FontSize.Size18
- ammo.BackgroundTransparency = 1
- ammo.Position = UDim2.new(0.7, 0, 0, 0)
- ammo.Size = UDim2.new(1, 0, 1, 0)
- ammo.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
- ammo.Text = "20 / 140"
- ammo.Font = Enum.Font.ArialBold
- ammo.Name = "Ammo"
- ammo.TextXAlignment = Enum.TextXAlignment.Left
- ammo.TextColor3 = Color3.new(1, 0.2, 0)
- ammo.BackgroundColor3 = Color3.new(0.639216, 0.635294, 0.647059)
- reload = Instance.new("TextButton",stats)
- reload.Visible = false
- reload.FontSize = Enum.FontSize.Size18
- reload.TextTransparency = 2.8999993801117
- reload.BackgroundTransparency = 1
- reload.Position = UDim2.new(0, 0, 1, 0)
- reload.Size = UDim2.new(1, 0, 0.5, 0)
- reload.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
- reload.Text = "Reloading"
- reload.Font = Enum.Font.ArialBold
- reload.Name = "Reload"
- reload.TextColor3 = Color3.new(1, 0.2, 0)
- reload.BackgroundColor3 = Color3.new(0.639216, 0.635294, 0.647059)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement