Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game:GetService("Players").LocalPlayer
- local char = plr.Character
- function FindInTable(t, n)
- for i,v in pairs(t) do
- if v == n then
- return true
- end
- end
- return false
- end
- for i,v in pairs(char:children'') do
- local toremove = {"CharacterMesh", "ShirtGraphic", "Accessory"}
- if FindInTable(toremove, v.ClassName) then v:Destroy()
- end end
- --Transformaaaaation--
- char["Left Arm"].BrickColor = BrickColor.new("Pastel brown")
- char["Right Arm"].BrickColor = BrickColor.new("Pastel brown")
- char.Head.BrickColor = BrickColor.new("Pastel brown")
- char["Left Leg"].BrickColor = BrickColor.new("Pastel brown")
- char["Right Leg"].BrickColor = BrickColor.new("Pastel brown")
- local face = char.Head:FindFirstChild'face' if face then face.Texture = "http://www.roblox.com/asset/?id=13038247" end
- char.Pants.PantsTemplate = "rbxassetid://874740004"
- char.Shirt.ShirtTemplate = "rbxassetid://874739759"
- local function CreateHat(name, meshid, textureid)
- local h = Instance.new("Accessory")
- h.Name = name
- local han = Instance.new("Part", h)
- han.Name = "Handle"
- local mesh = Instance.new("SpecialMesh", han)
- mesh.Name = "Mesh"
- mesh.MeshId = meshid
- mesh.TextureId = textureid
- return h,han,mesh
- end
- hum = char:FindFirstChildOfClass'Humanoid'
- local h,han,mesh = CreateHat("Chanka Helmet", "rbxassetid://1280954161", "rbxassetid://1280954190")
- h.AttachmentForward = Vector3.new(0,0,1)
- h.AttachmentPos = Vector3.new (0,0.25,0.15)
- h.AttachmentUp = Vector3.new(0,1,0)
- h.AttachmentRight = Vector3.new(-1,0,0)
- mesh.Offset = Vector3.new(0,0,0.2)
- mesh.Scale = Vector3.new(1., 1., 1.)
- han.Size = Vector3.new(1, 1, 1)
- hum:AddAccessory(h)
- local music = Instance.new("Sound",char.Torso)
- music.Volume = 5
- music.Looped = true
- music.SoundId = "rbxassetid://1349162023"
- music:Play()
- -- Made by 1ndrew Galil V3
- --Controls
- --T for Stand by
- --R for Reload
- --Right Click to Aim
- --Q for Inspect
- --C to Crouch
- --X to get back up
- --Left Shift to Sprint
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Part3 = Instance.new("Part")
- Part4 = Instance.new("Part")
- SpecialMesh5 = Instance.new("SpecialMesh")
- Part6 = Instance.new("Part")
- SpecialMesh7 = Instance.new("SpecialMesh")
- Part8 = Instance.new("Part")
- SpecialMesh9 = Instance.new("SpecialMesh")
- Part10 = Instance.new("Part")
- SpecialMesh11 = Instance.new("SpecialMesh")
- Part12 = Instance.new("Part")
- SpecialMesh13 = Instance.new("SpecialMesh")
- Part14 = Instance.new("Part")
- SpecialMesh15 = Instance.new("SpecialMesh")
- Part16 = Instance.new("Part")
- SpecialMesh17 = Instance.new("SpecialMesh")
- Part18 = Instance.new("Part")
- SpecialMesh19 = Instance.new("SpecialMesh")
- Sound20 = Instance.new("Sound")
- Sound21 = Instance.new("Sound")
- Part22 = Instance.new("Part")
- SpecialMesh23 = Instance.new("SpecialMesh")
- Part24 = Instance.new("Part")
- Sound25 = Instance.new("Sound")
- Sound26 = Instance.new("Sound")
- Sound27 = Instance.new("Sound")
- ParticleEmitter28 = Instance.new("ParticleEmitter")
- SpotLight29 = Instance.new("SpotLight")
- BlockMesh30 = Instance.new("BlockMesh")
- ParticleEmitter31 = Instance.new("ParticleEmitter")
- Part32 = Instance.new("Part")
- Sound33 = Instance.new("Sound")
- Sound34 = Instance.new("Sound")
- Sound35 = Instance.new("Sound")
- Sound36 = Instance.new("Sound")
- Part37 = Instance.new("Part")
- CylinderMesh38 = Instance.new("CylinderMesh")
- Part39 = Instance.new("Part")
- LocalScript40 = Instance.new("LocalScript")
- NumberValue41 = Instance.new("NumberValue")
- StringValue42 = Instance.new("StringValue")
- NumberValue43 = Instance.new("NumberValue")
- NumberValue44 = Instance.new("NumberValue")
- NumberValue45 = Instance.new("NumberValue")
- ScreenGui46 = Instance.new("ScreenGui")
- Frame47 = Instance.new("Frame")
- Frame48 = Instance.new("Frame")
- TextLabel49 = Instance.new("TextLabel")
- Frame50 = Instance.new("Frame")
- TextLabel51 = Instance.new("TextLabel")
- TextLabel52 = Instance.new("TextLabel")
- TextLabel53 = Instance.new("TextLabel")
- Frame54 = Instance.new("Frame")
- ImageLabel55 = Instance.new("ImageLabel")
- ImageLabel56 = Instance.new("ImageLabel")
- ImageLabel57 = Instance.new("ImageLabel")
- ImageLabel58 = Instance.new("ImageLabel")
- Frame59 = Instance.new("Frame")
- TextLabel60 = Instance.new("TextLabel")
- ImageLabel61 = Instance.new("ImageLabel")
- Frame62 = Instance.new("Frame")
- TextLabel63 = Instance.new("TextLabel")
- Part64 = Instance.new("Part")
- CylinderMesh65 = Instance.new("CylinderMesh")
- Part66 = Instance.new("Part")
- SpecialMesh67 = Instance.new("SpecialMesh")
- Model68 = Instance.new("Model")
- Part69 = Instance.new("Part")
- SpecialMesh70 = Instance.new("SpecialMesh")
- Part71 = Instance.new("Part")
- Part72 = Instance.new("Part")
- Sound73 = Instance.new("Sound")
- Sound74 = Instance.new("Sound")
- Sound75 = Instance.new("Sound")
- Sound76 = Instance.new("Sound")
- Sound77 = Instance.new("Sound")
- Sound78 = Instance.new("Sound")
- Sound79 = Instance.new("Sound")
- Sound80 = Instance.new("Sound")
- Sound81 = Instance.new("Sound")
- Sound82 = Instance.new("Sound")
- Sound83 = Instance.new("Sound")
- Sound84 = Instance.new("Sound")
- Sound85 = Instance.new("Sound")
- SpecialMesh86 = Instance.new("SpecialMesh")
- Part87 = Instance.new("Part")
- SpecialMesh88 = Instance.new("SpecialMesh")
- Script89 = Instance.new("Script")
- Script90 = Instance.new("Script")
- Script91 = Instance.new("Script")
- Script92 = Instance.new("Script")
- Script93 = Instance.new("Script")
- NumberValue94 = Instance.new("NumberValue")
- NumberValue95 = Instance.new("NumberValue")
- StringValue96 = Instance.new("StringValue")
- NumberValue97 = Instance.new("NumberValue")
- StringValue98 = Instance.new("StringValue")
- NumberValue99 = Instance.new("NumberValue")
- NumberValue100 = Instance.new("NumberValue")
- NumberValue101 = Instance.new("NumberValue")
- StringValue102 = Instance.new("StringValue")
- Script103 = Instance.new("Script")
- LocalScript104 = Instance.new("LocalScript")
- LocalScript105 = Instance.new("LocalScript")
- LocalScript106 = Instance.new("LocalScript")
- Tool0.Name = "Galil"
- Tool0.Parent = mas
- Tool0.ToolTip = "Made in Germany"
- Part1.Name = "Stock"
- Part1.Parent = Tool0
- Part1.Material = Enum.Material.Concrete
- Part1.Rotation = Vector3.new(90, 0, 0)
- Part1.Anchored = true
- Part1.CanCollide = false
- Part1.Size = Vector3.new(1.37353814, 0.225373551, 0.677169979)
- Part1.CFrame = CFrame.new(38.0703812, 0.827715993, -67.2808838, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part1.Position = Vector3.new(38.0703812, 0.827715993, -67.2808838)
- Part1.Orientation = Vector3.new(90, 0, 0)
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "rbxassetid://777168070"
- SpecialMesh2.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- SpecialMesh2.TextureId = "rbxassetid://777335465"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- SpecialMesh2.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- Part3.Name = "SightMark"
- Part3.Parent = Tool0
- Part3.Material = Enum.Material.SmoothPlastic
- Part3.BrickColor = BrickColor.new("New Yeller")
- Part3.Transparency = 1
- Part3.Rotation = Vector3.new(0, 90, 0)
- Part3.Anchored = true
- Part3.CanCollide = false
- Part3.FormFactor = Enum.FormFactor.Custom
- Part3.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part3.CFrame = CFrame.new(34.9918442, 1.39999795, -67.282486, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.TopSurface = Enum.SurfaceType.Smooth
- Part3.Color = Color3.new(1, 1, 0)
- Part3.Position = Vector3.new(34.9918442, 1.39999795, -67.282486)
- Part3.Orientation = Vector3.new(0, 90, 0)
- Part3.Color = Color3.new(1, 1, 0)
- Part4.Name = "Mag"
- Part4.Parent = Tool0
- Part4.Material = Enum.Material.Concrete
- Part4.Rotation = Vector3.new(90, 0, 0)
- Part4.Anchored = true
- Part4.CanCollide = false
- Part4.Size = Vector3.new(0.611639202, 0.225373551, 1.02088165)
- Part4.CFrame = CFrame.new(36.3986664, 0.510468006, -67.2739868, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part4.Position = Vector3.new(36.3986664, 0.510468006, -67.2739868)
- Part4.Orientation = Vector3.new(90, 0, 0)
- SpecialMesh5.Parent = Part4
- SpecialMesh5.MeshId = "rbxassetid://777172237"
- SpecialMesh5.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- SpecialMesh5.TextureId = "rbxassetid://777384640"
- SpecialMesh5.MeshType = Enum.MeshType.FileMesh
- SpecialMesh5.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- Part6.Name = "Carry Handle and Bipod"
- Part6.Parent = Tool0
- Part6.Material = Enum.Material.Fabric
- Part6.Rotation = Vector3.new(90, 0, 0)
- Part6.Anchored = true
- Part6.CanCollide = false
- Part6.Size = Vector3.new(1.56262827, 0.330295652, 0.420204818)
- Part6.CFrame = CFrame.new(35.4157333, 0.999992013, -67.2069931, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part6.Position = Vector3.new(35.4157333, 0.999992013, -67.2069931)
- Part6.Orientation = Vector3.new(90, 0, 0)
- SpecialMesh7.Parent = Part6
- SpecialMesh7.MeshId = "rbxassetid://777123880"
- SpecialMesh7.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- SpecialMesh7.TextureId = "rbxassetid://777364176"
- SpecialMesh7.MeshType = Enum.MeshType.FileMesh
- SpecialMesh7.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- Part8.Name = "Sights"
- Part8.Parent = Tool0
- Part8.Material = Enum.Material.Concrete
- Part8.Rotation = Vector3.new(90, 0, 0)
- Part8.Anchored = true
- Part8.CanCollide = false
- Part8.Size = Vector3.new(2.59750986, 0.225373551, 0.46276167)
- Part8.CFrame = CFrame.new(35.9409561, 1.20389795, -67.2585602, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part8.Position = Vector3.new(35.9409561, 1.20389795, -67.2585602)
- Part8.Orientation = Vector3.new(90, 0, 0)
- SpecialMesh9.Parent = Part8
- SpecialMesh9.MeshId = "rbxassetid://777163506"
- SpecialMesh9.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- SpecialMesh9.TextureId = "rbxassetid://777369857"
- SpecialMesh9.MeshType = Enum.MeshType.FileMesh
- SpecialMesh9.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- Part10.Name = "Lower receiver"
- Part10.Parent = Tool0
- Part10.Material = Enum.Material.Concrete
- Part10.Rotation = Vector3.new(90, 0, 0)
- Part10.Anchored = true
- Part10.CanCollide = false
- Part10.Size = Vector3.new(2.53263402, 0.225373551, 0.633969903)
- Part10.CFrame = CFrame.new(36.136528, 0.955763996, -67.283287, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part10.Position = Vector3.new(36.136528, 0.955763996, -67.283287)
- Part10.Orientation = Vector3.new(90, 0, 0)
- SpecialMesh11.Parent = Part10
- SpecialMesh11.MeshId = "rbxassetid://777158802"
- SpecialMesh11.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- SpecialMesh11.TextureId = "rbxassetid://777342509"
- SpecialMesh11.MeshType = Enum.MeshType.FileMesh
- SpecialMesh11.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- Part12.Name = "Handguard"
- Part12.Parent = Tool0
- Part12.Material = Enum.Material.Concrete
- Part12.Rotation = Vector3.new(90, 0, 0)
- Part12.Anchored = true
- Part12.CanCollide = false
- Part12.Size = Vector3.new(0.91803354, 0.263795912, 0.339953363)
- Part12.CFrame = CFrame.new(35.626503, 1.040447, -67.2594986, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part12.Position = Vector3.new(35.626503, 1.040447, -67.2594986)
- Part12.Orientation = Vector3.new(90, 0, 0)
- SpecialMesh13.Parent = Part12
- SpecialMesh13.MeshId = "rbxassetid://777126216"
- SpecialMesh13.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- SpecialMesh13.TextureId = "rbxassetid://777479988"
- SpecialMesh13.MeshType = Enum.MeshType.FileMesh
- SpecialMesh13.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- Part14.Name = "FakeGrip"
- Part14.Parent = Tool0
- Part14.Material = Enum.Material.Concrete
- Part14.Rotation = Vector3.new(90, 0, 0)
- Part14.Anchored = true
- Part14.CanCollide = false
- Part14.Size = Vector3.new(0.639974177, 0.225373551, 0.605908811)
- Part14.CFrame = CFrame.new(37.1062241, 0.618148029, -67.2739868, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part14.Position = Vector3.new(37.1062241, 0.618148029, -67.2739868)
- Part14.Orientation = Vector3.new(90, 0, 0)
- SpecialMesh15.Parent = Part14
- SpecialMesh15.MeshId = "rbxassetid://777114867"
- SpecialMesh15.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- SpecialMesh15.TextureId = "rbxassetid://777375519"
- SpecialMesh15.MeshType = Enum.MeshType.FileMesh
- SpecialMesh15.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- Part16.Name = "Barrel"
- Part16.Parent = Tool0
- Part16.Material = Enum.Material.Concrete
- Part16.Rotation = Vector3.new(90, 0, 0)
- Part16.Anchored = true
- Part16.CanCollide = false
- Part16.Size = Vector3.new(2.24157023, 0.225373551, 0.225373551)
- Part16.CFrame = CFrame.new(34.8835526, 1.06779397, -67.2739868, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part16.Position = Vector3.new(34.8835526, 1.06779397, -67.2739868)
- Part16.Orientation = Vector3.new(90, 0, 0)
- SpecialMesh17.Parent = Part16
- SpecialMesh17.MeshId = "rbxassetid://777120329"
- SpecialMesh17.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- SpecialMesh17.TextureId = "rbxassetid://777358188"
- SpecialMesh17.MeshType = Enum.MeshType.FileMesh
- SpecialMesh17.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- Part18.Name = "Barrier"
- Part18.Parent = Tool0
- Part18.Material = Enum.Material.Concrete
- Part18.Rotation = Vector3.new(90, 0, 0)
- Part18.Anchored = true
- Part18.CanCollide = false
- Part18.Size = Vector3.new(0.426093042, 0.225373551, 0.225373551)
- Part18.CFrame = CFrame.new(36.3743973, 1.17568004, -67.3239899, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part18.Position = Vector3.new(36.3743973, 1.17568004, -67.3239899)
- Part18.Orientation = Vector3.new(90, 0, 0)
- SpecialMesh19.Parent = Part18
- SpecialMesh19.MeshId = "rbxassetid://777196460"
- SpecialMesh19.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- SpecialMesh19.TextureId = "rbxassetid://777328045"
- SpecialMesh19.MeshType = Enum.MeshType.FileMesh
- SpecialMesh19.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- Sound20.Name = "BoltForward"
- Sound20.Parent = Part18
- Sound20.SoundId = "rbxassetid://393678926"
- Sound20.Volume = 1
- Sound21.Name = "BoltBack"
- Sound21.Parent = Part18
- Sound21.SoundId = "rbxassetid://393678915"
- Sound21.Volume = 1
- Part22.Name = "AimPart"
- Part22.Parent = Tool0
- Part22.BrickColor = BrickColor.new("Black")
- Part22.Transparency = 1
- Part22.Rotation = Vector3.new(0, 90, 0)
- Part22.Anchored = true
- Part22.CanCollide = false
- Part22.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part22.CFrame = CFrame.new(37.4960022, 1.38299894, -67.276001, 0, -2.70000019e-05, 1.00000024, 0, 1.00000024, 2.70000019e-05, -1, 0, 0)
- Part22.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part22.Position = Vector3.new(37.4960022, 1.38299894, -67.276001)
- Part22.Orientation = Vector3.new(0, 90, 0)
- Part22.Color = Color3.new(0.105882, 0.164706, 0.207843)
- SpecialMesh23.Parent = Part22
- SpecialMesh23.Scale = Vector3.new(0.731707275, 0.731707275, 0.731707275)
- SpecialMesh23.MeshType = Enum.MeshType.Brick
- SpecialMesh23.Scale = Vector3.new(0.731707275, 0.731707275, 0.731707275)
- Part24.Name = "FirePart"
- Part24.Parent = Tool0
- Part24.Material = Enum.Material.Metal
- Part24.BrickColor = BrickColor.new("New Yeller")
- Part24.Transparency = 1
- Part24.Rotation = Vector3.new(0, 90, 0)
- Part24.Anchored = true
- Part24.CanCollide = false
- Part24.FormFactor = Enum.FormFactor.Custom
- Part24.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part24.CFrame = CFrame.new(33.7980003, 1.06799996, -67.2730026, 0, -2.7e-05, 1, 0, 1, 2.7e-05, -1, 0, 0)
- Part24.BottomSurface = Enum.SurfaceType.Smooth
- Part24.TopSurface = Enum.SurfaceType.Smooth
- Part24.Color = Color3.new(1, 1, 0)
- Part24.Position = Vector3.new(33.7980003, 1.06799996, -67.2730026)
- Part24.Orientation = Vector3.new(0, 90, 0)
- Part24.Color = Color3.new(1, 1, 0)
- Sound25.Name = "Whizz"
- Sound25.Parent = Part24
- Sound25.Pitch = 0.99500000476837
- Sound25.SoundId = "rbxassetid://294837636"
- Sound25.Volume = 1
- Sound26.Name = "Whiz"
- Sound26.Parent = Part24
- Sound26.SoundId = "rbxassetid://269514843"
- Sound26.Volume = 1
- Sound26.Looped = true
- Sound27.Name = "Fire"
- Sound27.Parent = Part24
- Sound27.SoundId = "rbxassetid://284938795"
- Sound27.Volume = 0.80000001192093
- ParticleEmitter28.Name = "1FlashFX2"
- ParticleEmitter28.Parent = Part24
- ParticleEmitter28.Transparency = NumberSequence.new(0.625,1)
- ParticleEmitter28.Rotation = NumberRange.new(-90, 90)
- ParticleEmitter28.Size = NumberSequence.new(1,0)
- ParticleEmitter28.Color = ColorSequence.new(Color3.new(1, 1, 0.498039),Color3.new(1, 1, 0.498039))
- ParticleEmitter28.Enabled = false
- ParticleEmitter28.LightEmission = 1
- ParticleEmitter28.Texture = "http://www.roblox.com/asset/?id=257430870"
- ParticleEmitter28.Lifetime = NumberRange.new(0.050000000745058, 0.075000002980232)
- ParticleEmitter28.Rate = 1000
- ParticleEmitter28.Speed = NumberRange.new(100, 100)
- ParticleEmitter28.Color = ColorSequence.new(Color3.new(1, 1, 0.498039),Color3.new(1, 1, 0.498039))
- SpotLight29.Name = "FlashFX"
- SpotLight29.Parent = Part24
- SpotLight29.Color = Color3.new(1, 0.956863, 0.835294)
- SpotLight29.Enabled = false
- SpotLight29.Brightness = 100
- SpotLight29.Range = 15
- SpotLight29.Angle = 180
- SpotLight29.Color = Color3.new(1, 0.956863, 0.835294)
- BlockMesh30.Parent = Part24
- BlockMesh30.Scale = Vector3.new(0.65365845, 0.65365845, 0.65365845)
- BlockMesh30.Scale = Vector3.new(0.65365845, 0.65365845, 0.65365845)
- ParticleEmitter31.Name = "Smoke"
- ParticleEmitter31.Parent = Part24
- ParticleEmitter31.Transparency = NumberSequence.new(0.99000000953674,0.99000000953674)
- ParticleEmitter31.Rotation = NumberRange.new(0, 100)
- ParticleEmitter31.Size = NumberSequence.new(0.20000000298023,0.20000000298023)
- ParticleEmitter31.Enabled = false
- ParticleEmitter31.LightEmission = 0.0099999997764826
- ParticleEmitter31.Texture = "http://www.roblox.com/asset/?id=117472237"
- ParticleEmitter31.Lifetime = NumberRange.new(1, 1)
- ParticleEmitter31.Rate = 998
- ParticleEmitter31.RotSpeed = NumberRange.new(200, 200)
- ParticleEmitter31.Speed = NumberRange.new(7, 7)
- ParticleEmitter31.VelocitySpread = 40
- Part32.Name = "Grip"
- Part32.Parent = Tool0
- Part32.Material = Enum.Material.SmoothPlastic
- Part32.BrickColor = BrickColor.new("Electric blue")
- Part32.Transparency = 1
- Part32.Rotation = Vector3.new(0, 90, 0)
- Part32.Anchored = true
- Part32.CanCollide = false
- Part32.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
- Part32.CFrame = CFrame.new(36.8268509, 1.04155803, -67.3024826, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Part32.BottomSurface = Enum.SurfaceType.Smooth
- Part32.TopSurface = Enum.SurfaceType.Smooth
- Part32.Color = Color3.new(0.0352941, 0.537255, 0.811765)
- Part32.Position = Vector3.new(36.8268509, 1.04155803, -67.3024826)
- Part32.Orientation = Vector3.new(0, 90, 0)
- Part32.Color = Color3.new(0.0352941, 0.537255, 0.811765)
- Sound33.Name = "Click"
- Sound33.Parent = Part32
- Sound33.SoundId = "http://www.roblox.com/asset/?id=265275510"
- Sound33.Volume = 1
- Sound34.Name = "M3"
- Sound34.Parent = Part32
- Sound34.SoundId = "http://www.roblox.com/asset/?id=166238161"
- Sound35.Name = "MagIn"
- Sound35.Parent = Part32
- Sound35.SoundId = "http://roblox.com/asset/?id=166238223"
- Sound35.Volume = 0.20000000298023
- Sound36.Name = "MagOut"
- Sound36.Parent = Part32
- Sound36.SoundId = "http://roblox.com/asset/?id=166238177"
- Sound36.Volume = 0.20000000298023
- Part37.Name = "LaserLight"
- Part37.Parent = Tool0
- Part37.Material = Enum.Material.Neon
- Part37.BrickColor = BrickColor.new("Really red")
- Part37.Transparency = 1
- Part37.Rotation = Vector3.new(0, 0, 90)
- Part37.CanCollide = false
- Part37.FormFactor = Enum.FormFactor.Custom
- Part37.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part37.CFrame = CFrame.new(35.2833481, 0.979876995, -67.262619, 0, -1, 0, 1, 0, -0, 0, 0, 1)
- Part37.Color = Color3.new(1, 0, 0)
- Part37.Position = Vector3.new(35.2833481, 0.979876995, -67.262619)
- Part37.Orientation = Vector3.new(0, 0, 90)
- Part37.Color = Color3.new(1, 0, 0)
- CylinderMesh38.Parent = Part37
- CylinderMesh38.Offset = Vector3.new(0, 100, 0)
- CylinderMesh38.Scale = Vector3.new(0.0500000007, 1000, 0.0500000007)
- CylinderMesh38.Scale = Vector3.new(0.0500000007, 1000, 0.0500000007)
- Part39.Name = "LaserThing"
- Part39.Parent = Tool0
- Part39.Material = Enum.Material.Neon
- Part39.BrickColor = BrickColor.new("Really black")
- Part39.Transparency = 0.5
- Part39.Rotation = Vector3.new(0, 90, 0)
- Part39.Anchored = true
- Part39.CanCollide = false
- Part39.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
- Part39.CFrame = CFrame.new(35.2928848, 0.977980018, -67.2691498, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Part39.BottomSurface = Enum.SurfaceType.Smooth
- Part39.TopSurface = Enum.SurfaceType.Smooth
- Part39.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part39.Position = Vector3.new(35.2928848, 0.977980018, -67.2691498)
- Part39.Orientation = Vector3.new(0, 90, 0)
- Part39.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- LocalScript40.Name = "GunScript"
- LocalScript40.Parent = Tool0
- table.insert(cors,sandbox(LocalScript40,function()
- wait(1)
- local Tool = script.Parent
- local Player = game.Players.LocalPlayer
- local Character = Player.Character
- local Torso = Character.Torso
- local Neck = Torso:WaitForChild("Neck")
- local Humanoid = Character.Humanoid
- local Mouse = Player:GetMouse()
- local Camera = game.Workspace.CurrentCamera
- local GunSetup = {
- Name = "M4A1";
- Ammo = script.Ammo.Value;
- RPM = 666;
- BurstRPM = 666;
- FireMode = "Automatic";
- BkFM = "Automatic";
- BurstFire = 3;
- SwitchableModes = {
- Burst = false;
- Single = true;
- Automatic = true;
- };
- GrenadeLauncher = false;
- M203Ammo = 1; -- 1 For HEGrenade, 2 For SmokeGrenade
- GLFirerate = 2;
- AnimSpeed = 1;
- Chamber = true;
- CanBreak = false;
- CanSeeMag = true;
- FastReload = true;
- BType = "5.56x45mm";
- BSpeed = 884;
- ATK = true;
- BDrop = 90;
- BSpread = 0;
- LimbsDamage = {10,20};
- TorsoDamage = {30,40};
- HeadDamage = {85,100};
- HelmetDamage = 64;
- VestDamage = 34;
- Recoil = {32,42};
- Aimpart = Tool.AimPart;
- FOV1 = 40;
- FOV2 = 35;
- RightPos = CFrame.new(-0.575, -0.465, -1.185) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0));
- LeftPos = CFrame.new(1.123,0.25,-1.795) * CFrame.Angles(math.rad(-120),math.rad(46.5),math.rad(15));
- ----------------------
- LeftAimPosition = CFrame.new(1,-0.25,-1.1) * CFrame.Angles(math.rad(-110),math.rad(48.5),math.rad(2));
- LeftAim2Position = CFrame.new(1,0.25,-1.5) * CFrame.Angles(math.rad(-120),math.rad(25),math.rad(-15))
- }
- local Recoilup = 0
- local Recoil = math.random(GunSetup.Recoil[1],GunSetup.Recoil[2])/60
- local RecoilG
- local Firerate = 1/(GunSetup.RPM/60)
- local BURSTFirerate = 1/(GunSetup.BurstRPM/60)
- local GLFirerate = GunSetup.GLFirerate
- local Ammo = GunSetup.Ammo
- local GLAmmo = script.GLAmmo
- local MaxAmmo = script.MaxAmmo
- local StoredAmmo = script.StoredAmmo
- local EnableCycleSight = true
- local EnableFireMode = true
- local AimPartMode = 1
- local slideback = false
- local Checando = false
- local Emperrado = false
- local Chambered = false
- local MagOut = false
- local GLChambered = false
- local Animando = false
- _G.Sprinting = false
- local Safemode = false
- local MouseHeld
- local Equipped = false
- local Sprinting = false
- local Shooting = false
- local Aiming = false
- local Reloading = false
- local GLReloading = false
- pos = 0.0006
- neg = -0.0006
- local shell
- local AmmoGui
- local RAW
- local LAW
- local arms
- local Shell = Tool:WaitForChild("Shells"):WaitForChild("Shell")
- local function GetAmmo()
- AmmoGui.Frame.AText.Text = Ammo
- return Ammo
- end
- local uis = game:GetService("UserInputService")
- local RG = Character["Right Arm"]:FindFirstChild("RightGrip")
- ---------------------------------------------------------------------------------------
- ---------------- [ Tween Module ] --------------------------------------------------------
- ---------------------------------------------------------------------------------------
- function tweenFoV(goal, frames)
- coroutine.resume(coroutine.create(function()
- SFn = SFn and SFn + 1 or 0
- local SFn_S = SFn
- for i = 1, frames do
- if SFn ~= SFn_S then break end
- Camera.FieldOfView = Camera.FieldOfView + (goal - Camera.FieldOfView) * (i / frames)
- game:GetService("RunService").RenderStepped:wait()
- end
- end))
- end
- --[[
- tweenJoint Function Parameters:
- Object Joint - This has to be a weld with a C0 and C1 property
- CFrame newC0 - This is what the new C0 of the weld will be. You can put nil if you don't want to effect the C0
- CFrame newC1 - This is what the new C1 of the weld will be. You can put nil if you don't want to effect the C1
- function Alpha - This is an alpha function that takes an input parameter of a number between 0 and 90 and returns a number between 0 and 1.
- For example, function(X) return math.sin(math.rad(X)) end
- float Duration - This is how long the tweening takes to complete
- --]]
- local RS = game:GetService("RunService")
- function tweenJoint(Joint, newC0, newC1, Alpha, Duration)
- spawn(function()
- local newCode = math.random(-1e9, 1e9) --This creates a random code between -1000000000 and 1000000000
- local tweenIndicator = nil
- if (not Joint:findFirstChild("tweenCode")) then --If the joint isn't being tweened, then
- tweenIndicator = Instance.new("IntValue")
- tweenIndicator.Name = "tweenCode"
- tweenIndicator.Value = newCode
- tweenIndicator.Parent = Joint
- else
- tweenIndicator = Joint.tweenCode
- tweenIndicator.Value = newCode --If the joint is already being tweened, this will change the code, and the tween loop will stop
- end
- --local tweenIndicator = createTweenIndicator:InvokeServer(Joint, newCode)
- if Duration <= 0 then --If the duration is less than or equal to 0 then there's no need for a tweening loop
- if newC0 then Joint.C0 = newC0 end
- if newC1 then Joint.C1 = newC1 end
- else
- local Increment = 1.5 / Duration
- local startC0 = Joint.C0
- local startC1 = Joint.C1
- local X = 0
- while true do
- RS.RenderStepped:wait() --This makes the for loop step every 1/60th of a second
- local newX = X + Increment
- X = (newX > 90 and 90 or newX)
- if tweenIndicator.Value ~= newCode then break end --This makes sure that another tween wasn't called on the same joint
- if (not Equipped) then break end --This stops the tween if the tool is deselected
- if newC0 then Joint.C0 = startC0:lerp(newC0, Alpha(X)) end
- if newC1 then Joint.C1 = startC1:lerp(newC1, Alpha(X)) end
- --if newC0 then lerpCF:InvokeServer(Joint, "C0", startC0, newC0, Alpha(X)) end
- --if newC1 then lerpCF:InvokeServer(Joint, "C1", startC1, newC1, Alpha(X)) end
- if X == 90 then break end
- end
- end
- if tweenIndicator.Value == newCode then --If this tween functions was the last one called on a joint then it will remove the code
- tweenIndicator:Destroy()
- end
- --deleteTweenIndicator:InvokeServer(tweenIndicator, newCode)
- end)
- end
- -------------Motor6Ding Section------------------------
- Tool.Equipped:connect(function()
- if Humanoid.Health > 0 then
- RAW = Instance.new("Motor6D")
- RAW.Name= "RightWeld"
- RAW.Part0 =Player.Character["Right Arm"]
- RAW.Part1 = Character["Head"]
- RAW.Parent=Player.Character["Right Arm"]
- -- Player.CameraMode="LockFirstPerson"
- Torso:WaitForChild("Right Shoulder").Part1 = nil
- if Reloading then
- Reloading = false
- end
- if GLReloading then
- GLReloading = false
- end
- LAW = Instance.new("Motor6D")
- LAW.Name= "LeftWeld"
- LAW.Part0 = Player.Character["Left Arm"]
- LAW.Part1 = Character["Head"]
- LAW.Parent = Player.Character["Left Arm"]
- LAW.C0 = GunSetup.LeftPos
- RAW.C0 = GunSetup.RightPos
- Torso:WaitForChild("Left Shoulder").Part1 = nil
- LAW.C1 = CFrame.new()
- RAW.C1 = CFrame.new()
- uis.MouseIconEnabled = false
- AmmoGui = script.AmmoGui:Clone()
- AmmoGui.Parent = Player.PlayerGui
- AmmoGui.Frame.Visible = false
- Equipped = true
- game:GetService('RunService').RenderStepped:connect(function()
- RAW.C1 = CFrame.new() * CFrame.new((Recoilup/4),0,(Recoilup*2))
- LAW.C1 = CFrame.new() * CFrame.new((Recoilup/4),0,(Recoilup*2))
- if not Equipped then
- IdleOrSteadyAnim()
- Reloading = false
- GLReloading = false
- end
- if AmmoGui:FindFirstChild("Frame") then
- AmmoGui.Frame.FText.Text = GunSetup.FireMode
- AmmoGui.Frame.SAText.Text = ""..math.ceil(StoredAmmo.Value/math.ceil(GunSetup.Ammo)).." MAGS"
- AmmoGui.Frame.Btext.Text = GunSetup.BType
- if Safemode then
- AmmoGui.Frame.A.Visible = true
- else
- AmmoGui.Frame.A.Visible = false
- end
- if Chambered then
- AmmoGui.Frame.B.Visible = false
- else
- AmmoGui.Frame.B.Visible = true
- end
- if GunSetup.GrenadeLauncher and GLChambered then
- AmmoGui.Frame.E.Visible = false
- elseif GunSetup.GrenadeLauncher and not GLChambered then
- AmmoGui.Frame.E.Visible = true
- else
- AmmoGui.Frame.E.Visible = false
- end
- if Emperrado then
- AmmoGui.Frame.C.Visible = true
- else
- AmmoGui.Frame.C.Visible = false
- end
- if slideback then
- AmmoGui.Frame.D.Visible = true
- else
- AmmoGui.Frame.D.Visible = false
- end
- if GunSetup.FireMode == "M203" then
- AmmoGui.Frame.NText.Text = "M203"
- AmmoGui.Frame.SAText.Text = GLAmmo.Value
- AmmoGui.Frame.AText.Text = Ammo .." Bullets"
- end
- if StoredAmmo.Value > MaxAmmo.Value then
- StoredAmmo.Value = MaxAmmo.Value
- end
- if GunSetup.FireMode ~= "M203" then
- AmmoGui.Frame.NText.Text = GunSetup.Name
- AmmoGui.Frame.AText.Text = Ammo .." Bullets"
- end
- end
- end)
- end
- end)
- ---------- Animations ------------------
- function SprintAnim()
- Humanoid.WalkSpeed = 24
- tweenJoint(RAW, CFrame.new(-0.75, 0.125, -1.3) * CFrame.Angles(math.rad(-80), math.rad(-55), math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.25 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.25,0.85,-1.125) * CFrame.Angles(math.rad(-85),math.rad(-10.5),math.rad(-10)) , nil, function(X) return math.sin(math.rad(X)) end, 0.25 * GunSetup.AnimSpeed)
- _G.Sprinting = true
- end
- function SafetyAnim()
- tweenJoint(RAW, CFrame.new(-0.75, 0.125, -1.3) * CFrame.Angles(math.rad(-80), math.rad(-55), math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.25 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.25,0.85,-1.125) * CFrame.Angles(math.rad(-85),math.rad(-10.5),math.rad(-10)) , nil, function(X) return math.sin(math.rad(X)) end, 0.25 * GunSetup.AnimSpeed)
- end
- function IdleOrSteadyAnim()
- tweenJoint(RAW, GunSetup.RightPos , nil, function(X) return math.sin(math.rad(X)) end, 0.225 * GunSetup.AnimSpeed)
- tweenJoint(LAW, GunSetup.LeftPos , nil, function(X) return math.sin(math.rad(X)) end, 0.215 * GunSetup.AnimSpeed)
- end
- function ReloadAnim()
- if Equipped then
- tweenJoint(RAW, CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.425 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.195,-0.35,-1.48) * CFrame.Angles(math.rad(-100),math.rad(75),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- wait(0.55 * GunSetup.AnimSpeed)
- tweenJoint(RAW, CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-85), math.rad(-2), math.rad(9)) , nil, function(X) return math.sin(math.rad(X)) end, 0.525 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.195,1.4,-0.5) * CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- Tool.Handle.MagOut:Play()
- local MagC = Tool:WaitForChild("Mag"):clone()
- Tool.Mag.Transparency = 1
- MagC.Parent = Tool
- MagC.Name = "MagC"
- MagC.Transparency = 0
- local MagCW = Instance.new("Motor6D")
- MagCW.Part0 = MagC
- MagCW.Part1 = Player.Character["Left Arm"]
- MagCW.Parent = MagC
- MagCW.C1 = MagC.CFrame:toObjectSpace(Tool.Mag.CFrame)
- wait(0.75 * (GunSetup.AnimSpeed/1))
- if (StoredAmmo.Value - (GunSetup.Ammo - Ammo)) < 0 then
- Ammo = Ammo + StoredAmmo.Value
- StoredAmmo.Value = 0
- elseif Ammo <= 0 then
- StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
- Ammo = GunSetup.Ammo
- Chambered = false
- elseif Ammo > 0 and Chambered and GunSetup.Chamber then
- StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
- Ammo = GunSetup.Ammo + 1
- elseif Ammo > 0 and Chambered and not GunSetup.Chamber then
- StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
- Ammo = GunSetup.Ammo
- end
- Tool.Handle.MagIn:Play()
- tweenJoint(RAW, CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.195,-0.35,-1.48) * CFrame.Angles(math.rad(-100),math.rad(75),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.275 * GunSetup.AnimSpeed)
- wait(0.15 * GunSetup.AnimSpeed)
- MagC:Destroy()
- Tool.Mag.Transparency = 0
- wait(0.35 * GunSetup.AnimSpeed)
- end
- end
- function SeeMag()
- if Equipped then
- Animando = true
- tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(2.195,-0.825,-1.08) * CFrame.Angles(math.rad(-100),math.rad(75),math.rad(-41)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- wait(1.125 * (GunSetup.AnimSpeed/2))
- tweenJoint(RAW, CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.425 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.195,-0.35,-1.48) * CFrame.Angles(math.rad(-100),math.rad(75),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- wait(0.55 * GunSetup.AnimSpeed)
- tweenJoint(RAW, CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-85), math.rad(-2), math.rad(9)) , nil, function(X) return math.sin(math.rad(X)) end, 0.525 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.195,1.4,-0.5) * CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- Tool.Handle.MagOut:Play()
- local MagC = Tool:WaitForChild("Mag"):clone()
- Tool.Mag.Transparency = 1
- MagC.Parent = Tool
- MagC.Name = "MagC"
- MagC.Transparency = 0
- local MagCW = Instance.new("Motor6D")
- MagCW.Part0 = MagC
- MagCW.Part1 = Player.Character["Left Arm"]
- MagCW.Parent = MagC
- MagCW.C1 = MagC.CFrame:toObjectSpace(Tool.Mag.CFrame)
- wait(0.75 * (GunSetup.AnimSpeed/1))
- tweenJoint(RAW, CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.195,-0.35,-1.48) * CFrame.Angles(math.rad(-100),math.rad(45),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.275 * GunSetup.AnimSpeed)
- wait(0.12 * (GunSetup.AnimSpeed/1))
- Animando = false
- --[[wait(0.15 * GunSetup.AnimSpeed)
- MagC:Destroy()
- Tool.Mag.Transparency = 0
- wait(0.35 * GunSetup.AnimSpeed)]]
- end
- end
- function UNSeeMag()
- if Equipped then
- Animando = true
- local MagC = Tool:WaitForChild("MagC")
- local MagCW = script.Parent.MagC.Motor6D
- wait(0.75 * (GunSetup.AnimSpeed/1))
- tweenJoint(RAW, CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.195,-0.35,-1.48) * CFrame.Angles(math.rad(-100),math.rad(75),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.275 * GunSetup.AnimSpeed)
- wait(0.15 * GunSetup.AnimSpeed)
- Tool.Handle.MagIn:Play()
- MagC:Destroy()
- Tool.Mag.Transparency = 0
- wait(0.35 * GunSetup.AnimSpeed)
- tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.25,0.55,-1.08) * CFrame.Angles(math.rad(-100),math.rad(25),math.rad(-41)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- wait(0.12 * (GunSetup.AnimSpeed/1))
- Animando = false
- end
- end
- function CheckAnim()
- if Equipped then
- Animando = true
- tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.25,0.55,-1.08) * CFrame.Angles(math.rad(-100),math.rad(25),math.rad(-41)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- wait(0.20 * (GunSetup.AnimSpeed/1))
- Animando = false
- end
- end
- function ChamberAnim()
- if Equipped then
- Animando = true
- tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(0.75,-0.6,-0.85) * CFrame.Angles(math.rad(-140),math.rad(70),math.rad(40)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- wait(0.15 * (GunSetup.AnimSpeed/2))
- Tool.Handle.MagIn:Play()
- tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(0.195,-0.8,-0.85) * CFrame.Angles(math.rad(-140),math.rad(70),math.rad(40)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- wait(0.12 * (GunSetup.AnimSpeed/1))
- Animando = false
- end
- end
- function ChamberBKAnim()
- if Equipped then
- Animando = true
- tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(0.195,-0.8,-0.85) * CFrame.Angles(math.rad(-140),math.rad(70),math.rad(40)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- wait(0.15 * (GunSetup.AnimSpeed/2))
- Tool.Handle.MagIn:Play()
- tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(0.75,-0.6,-0.85) * CFrame.Angles(math.rad(-140),math.rad(70),math.rad(40)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- wait(0.12 * (GunSetup.AnimSpeed/1))
- Animando = false
- end
- end
- function FastReloadAnim()
- if Equipped then
- tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.25,0.55,-1.08) * CFrame.Angles(math.rad(-100),math.rad(25),math.rad(-41)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- wait(1.125 * (GunSetup.AnimSpeed/2))
- tweenJoint(RAW, CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.425 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.195,-0.35,-1.48) * CFrame.Angles(math.rad(-100),math.rad(75),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- wait(0.55 * GunSetup.AnimSpeed)
- tweenJoint(RAW, CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-85), math.rad(-2), math.rad(9)) , nil, function(X) return math.sin(math.rad(X)) end, 0.525 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.195,1.4,-0.5) * CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- Tool.Handle.MagOut:Play()
- local MagC = Tool:WaitForChild("Mag"):clone()
- Tool.Mag.Transparency = 1
- MagC.Parent = Tool
- MagC.Name = "MagC"
- MagC.Transparency = 0
- local MagCW = Instance.new("Motor6D")
- MagCW.Part0 = MagC
- MagCW.Part1 = Player.Character["Left Arm"]
- MagCW.Parent = MagC
- MagCW.C1 = MagC.CFrame:toObjectSpace(Tool.Mag.CFrame)
- wait(0.75 * (GunSetup.AnimSpeed/1))
- if (StoredAmmo.Value - (GunSetup.Ammo - Ammo)) < 0 then
- Ammo = Ammo + StoredAmmo.Value
- StoredAmmo.Value = 0
- elseif Ammo <= 0 then
- StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
- Ammo = GunSetup.Ammo
- Chambered = false
- elseif Ammo > 0 and Chambered and GunSetup.Chamber then
- StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
- Ammo = GunSetup.Ammo + 1
- elseif Ammo > 0 and Chambered and not GunSetup.Chamber then
- StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
- Ammo = GunSetup.Ammo
- end
- Tool.Handle.MagIn:Play()
- tweenJoint(RAW, CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.195,-0.35,-1.48) * CFrame.Angles(math.rad(-100),math.rad(75),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.275 * GunSetup.AnimSpeed)
- wait(0.15 * GunSetup.AnimSpeed)
- MagC:Destroy()
- Tool.Mag.Transparency = 0
- wait(0.35 * GunSetup.AnimSpeed)
- end
- end
- function FastBolt()
- tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(0.75,-0.6,-0.85) * CFrame.Angles(math.rad(-140),math.rad(70),math.rad(40)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- wait(0.55 * (GunSetup.AnimSpeed/2))
- tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(0.75,-0.6,-0.85) * CFrame.Angles(math.rad(-140),math.rad(70),math.rad(40)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- wait(0.3 * (GunSetup.AnimSpeed/2))
- Tool.Handle.MagIn:Play()
- tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(0.195,-0.8,-0.85) * CFrame.Angles(math.rad(-140),math.rad(70),math.rad(40)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- slideback = true
- Emperrado = false
- if Ammo > 0 and Chambered then
- EjectShells()
- Ammo = Ammo - 1
- print(Ammo)
- end
- wait(0.75 * (GunSetup.AnimSpeed/2))
- Tool.Handle.MagIn:Play()
- tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(0.75,-0.6,-0.85) * CFrame.Angles(math.rad(-140),math.rad(70),math.rad(40)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- slideback = false
- Chambered = true
- wait(0.25 * (GunSetup.AnimSpeed/2))
- tweenJoint(RAW, GunSetup.RightPos , nil, function(X) return math.sin(math.rad(X)) end, 0.225 * GunSetup.AnimSpeed)
- tweenJoint(LAW, GunSetup.LeftPos , nil, function(X) return math.sin(math.rad(X)) end, 0.215 * GunSetup.AnimSpeed)
- end
- function GLReloadAnim()
- if Equipped then
- tweenJoint(RAW, CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-85), math.rad(-2), math.rad(9)) , nil, function(X) return math.sin(math.rad(X)) end, 0.525 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1,0,-1.795) * CFrame.Angles(math.rad(-120),math.rad(45),math.rad(5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- wait(0.25 * (GunSetup.AnimSpeed/1))
- tweenJoint(RAW, CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.425 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.195,1.4,-0.5) * CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- wait(0.75 * (GunSetup.AnimSpeed/1))
- Tool.Handle.MagOut:Play()
- tweenJoint(RAW, CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-85), math.rad(-2), math.rad(9)) , nil, function(X) return math.sin(math.rad(X)) end, 0.525 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1,0,-1.795) * CFrame.Angles(math.rad(-120),math.rad(45),math.rad(5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- if (StoredAmmo.Value - (GunSetup.Ammo - Ammo)) < 0 then
- Ammo = Ammo + StoredAmmo.Value
- StoredAmmo.Value = 0
- elseif Ammo <= 0 then
- StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
- Ammo = GunSetup.Ammo
- Chambered = false
- elseif Ammo > 0 and Chambered and GunSetup.Chamber then
- StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
- Ammo = GunSetup.Ammo + 1
- elseif Ammo > 0 and Chambered and not GunSetup.Chamber then
- StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
- Ammo = GunSetup.Ammo
- end
- wait(0.75 * GunSetup.AnimSpeed)
- tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
- tweenJoint(LAW, CFrame.new(1.25,0.55,-1.08) * CFrame.Angles(math.rad(-100),math.rad(25),math.rad(-41)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
- end
- end
- -----------------------ADS Function------------------------------
- Mouse.Button2Down:connect(function()
- if Equipped then
- if not Aiming and not Reloading and not GLReloading and not Sprinting and not Safemode and not Checando then
- Aiming = true
- -- Mouse.Icon = GunSetup.Cursor.Aiming
- if AimPartMode == 1 then
- tweenJoint(RAW, RAW.C0 * CFrame.new(-Tool.AimPart.CFrame:toObjectSpace(Character.Head.CFrame).p), nil, function(X) return math.sin(math.rad(X)) end, 0.25 * GunSetup.AnimSpeed)
- tweenJoint(LAW, GunSetup.LeftAimPosition , nil, function(X) return math.sin(math.rad(X)) end, 0.25 * GunSetup.AnimSpeed)
- tweenFoV(GunSetup.FOV1, 40)
- end
- if AimPartMode == 2 then
- tweenJoint(RAW, RAW.C0 * CFrame.new(-Tool.AimPart2.CFrame:toObjectSpace(Character.Head.CFrame).p), nil, function(X) return math.sin(math.rad(X)) end, 0.25 * GunSetup.AnimSpeed)
- tweenJoint(LAW, GunSetup.LeftAim2Position , nil, function(X) return math.sin(math.rad(X)) end, 0.25 * GunSetup.AnimSpeed)
- tweenFoV(GunSetup.FOV2, 40)
- end
- game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
- end
- end
- end)
- Mouse.Button2Up:connect(function()
- if Equipped then
- if Aiming then
- Aiming = false
- -- Mouse.Icon = GunSetup.Cursor.Aiming
- if not Safemode then
- IdleOrSteadyAnim()
- tweenFoV(70, 40)
- end
- end
- end
- end)
- -----------------------shooting function-----------------
- function Rand(Min, Max, Accuracy)
- local Inverse = 1 / (Accuracy or 1)
- return (math.random(Min * Inverse, Max * Inverse) / Inverse)
- end
- function GetHitSurfaceCFrame(HitPos,Obj)
- local SurfaceCF = {
- {"Back",Obj.CFrame * CFrame.new(0,0,Obj.Size.z)};
- {"Bottom",Obj.CFrame * CFrame.new(0,-Obj.Size.y,0)};
- {"Front",Obj.CFrame * CFrame.new(0,0,-Obj.Size.z)};
- {"Left",Obj.CFrame * CFrame.new(-Obj.Size.x,0,0)};
- {"Right",Obj.CFrame * CFrame.new(Obj.Size.x,0,0)};
- {"Top",Obj.CFrame * CFrame.new(0,Obj.Size.y,0)}
- }
- local ClosestDist = math.huge
- local ClosestSurface = nil
- for _,v in pairs(SurfaceCF) do
- local SurfaceDist = (HitPos - v[2].p).magnitude
- if SurfaceDist < ClosestDist then
- ClosestDist = SurfaceDist
- ClosestSurface = v
- end
- end
- return ClosestSurface[2]
- end
- local Bullet
- local HitMark
- local BulletModel = workspace:FindFirstChild("Ray_Ignore") or Instance.new("Model", workspace)
- BulletModel.Name = "Ray_Ignore"
- spawn(function()
- while true do
- BulletModel.Parent = game.Workspace
- wait(1 / 20)
- end
- end)
- local Ray_Ignore = {Character, BulletModel, Camera}
- function CreateBullet()
- local Origin = Tool.FirePart.Position
- local Direction = Tool.FirePart.CFrame.lookVector
- local BulletCF = CFrame.new(Origin, Origin + Direction)
- Bullet = Instance.new("Part")
- game.Debris:AddItem(Bullet, 3)
- Bullet.Name = "Bullet"
- Bullet.Shape = Enum.PartType.Ball
- Bullet.Size = Vector3.new(0.2, 0.2, 0.2)
- Bullet.TopSurface = "Smooth"
- Bullet.BottomSurface = "Smooth"
- Bullet.BrickColor = BrickColor.new("Bright yellow")
- Bullet.Material = "Neon"
- Bullet.Transparency = 0
- Bullet.CanCollide = false
- Bullet.CFrame = Tool.FirePart.CFrame + (Tool.FirePart.CFrame.p - Tool.FirePart.CFrame.p)
- Bullet.CFrame = CFrame.new(Tool.FirePart.CFrame.p, Tool.FirePart.CFrame.p + Tool.FirePart.CFrame.lookVector)
- local BM = Instance.new("SpecialMesh", Bullet)
- BM.MeshType = "Brick"
- BM.Scale = Vector3.new(0.2,0.2,25)
- local BulletMass = Bullet.Size.X * Bullet.Size.Y * Bullet.Size.Z
- local BF = Instance.new("BodyForce")
- BF.force = Vector3.new(0, BulletMass * (65 - GunSetup.BDrop), 0)
- BF.Parent = Bullet
- Bullet.Velocity = Direction * 1000
- Bullet.CFrame = BulletCF + Direction
- if GunSetup.BSpeed >= 343 then
- local BulletWhizz = Instance.new("Sound")
- BulletWhizz.Parent = Bullet
- BulletWhizz.Pitch = 1
- BulletWhizz.Looped = true
- BulletWhizz.EmitterSize = 25
- BulletWhizz.MaxDistance = 500
- BulletWhizz.SoundId = "rbxassetid://151284431"
- BulletWhizz:Play()
- end
- return Bullet
- end
- function CreateBulletImpact(HitPos, HitObj, HumanoidFound)
- local SurfaceCF = GetHitSurfaceCFrame(HitPos, HitObj)
- local SurfaceDir = CFrame.new(HitObj.CFrame.p, SurfaceCF.p)
- local SurfaceDist = SurfaceDir.lookVector * (HitObj.CFrame.p - SurfaceCF.p).magnitude / 2
- local SurfaceOffset = HitPos - SurfaceCF.p + SurfaceDist
- local SurfaceCFrame = SurfaceDir + SurfaceDist + SurfaceOffset
- HitMark = Instance.new("Part")
- HitMark.BrickColor = BrickColor.new("Black")
- HitMark.Transparency = 1
- HitMark.Anchored = true
- HitMark.CanCollide = false
- HitMark.FormFactor = "Custom"
- HitMark.Size = Vector3.new(math.random(1,1.5), math.random(1,1.5), 0.2)
- HitMark.TopSurface = 0
- HitMark.BottomSurface = 0
- local Mesh = Instance.new("BlockMesh")
- Mesh.Offset = Vector3.new(0, 0, -0.05)
- Mesh.Scale = Vector3.new(-0.25, -0.25, 0)
- Mesh.Parent = HitMark
- local mat = HitObj.Material
- if mat == Enum.Material.Wood or mat == Enum.Material.WoodPlanks then
- local BulletWhizz = Instance.new("Sound")
- BulletWhizz.Parent = HitMark
- BulletWhizz.Pitch = BulletWhizz.Pitch * math.random(34, 46)/40
- BulletWhizz.SoundId = "rbxassetid://142082171"
- BulletWhizz:Play()
- if game.ReplicatedStorage:FindFirstChild("Dust" or "Smoke") then
- local D1 = game.ReplicatedStorage.Dust:clone()
- D1.Parent = HitMark
- D1.Enabled = true
- end
- local Decal = Instance.new("Decal")
- Decal.Face = Enum.NormalId.Front
- Decal.Texture = "http://www.roblox.com/asset/?id=64291961"
- Decal.Parent = HitMark
- HitMark.Parent = BulletModel
- HitMark.CFrame = SurfaceCFrame
- local Particles = Instance.new("ParticleEmitter")
- Particles.Color = ColorSequence.new(Color3.new(255, 255, 255))
- Particles.LightEmission = 0
- Particles.Size = NumberSequence.new(0.25)
- Particles.Texture = "http://www.roblox.com/asset/?id=434255560"
- Particles.Transparency = NumberSequence.new(
- {
- NumberSequenceKeypoint.new(0, 0.25, 0.25);
- NumberSequenceKeypoint.new(1, 1);
- }
- )
- Particles.Acceleration = Vector3.new(0, -196.2, 0)
- Particles.Lifetime = NumberRange.new(0.25 - 0.05, 0.25 + 0.15)
- Particles.Rate = 500
- Particles.RotSpeed = NumberRange.new(360)
- Particles.Speed = NumberRange.new(25 - 0, 25 + 0)
- Particles.VelocitySpread = 45
- Particles.Parent = HitMark
- Particles.EmissionDirection = "Top"
- game.Debris:AddItem(Particles, 0.2)
- game.Debris:AddItem(HitMark, 0.95)
- elseif mat == Enum.Material.Plastic and HitObj.Name == "Head" or HitObj.Name == "Torso" or HitObj.Name == "Right Arm" or HitObj.Name == "Left Arm" or HitObj.Name == "Right Leg" or HitObj.Name == "Left Leg" then
- local BulletWhizz = Instance.new("Sound")
- BulletWhizz.Parent = HitMark
- BulletWhizz.Pitch = BulletWhizz.Pitch * math.random(34, 46)/40
- BulletWhizz.SoundId = "rbxassetid://330595293"
- BulletWhizz:Play()
- local Decal = Instance.new("Decal")
- Decal.Face = Enum.NormalId.Front
- Decal.Texture = "http://www.roblox.com/asset/?id=112969718"
- Decal.Parent = HitMark
- HitMark.Parent = BulletModel
- HitMark.CFrame = SurfaceCFrame
- local Particles = Instance.new("ParticleEmitter")
- Particles.Color = ColorSequence.new(Color3.new(25, 0, 0))
- Particles.LightEmission = 0
- Particles.Size = NumberSequence.new(.5)
- Particles.Texture = "http://www.roblox.com/asset/?id=176677966"
- Particles.Transparency = NumberSequence.new(
- {
- NumberSequenceKeypoint.new(0, 0, 0);
- NumberSequenceKeypoint.new(1, 1);
- }
- )
- Particles.Acceleration = Vector3.new(0, 0, 0)
- Particles.Lifetime = NumberRange.new(0.1 - 0.05, 0.1 + 0.05)
- Particles.Rate = 500
- Particles.RotSpeed = NumberRange.new(1000)
- Particles.Speed = NumberRange.new(0 - 0, 0 + 0)
- Particles.VelocitySpread = 0
- Particles.Parent = HitMark
- Particles.EmissionDirection = "Top"
- game.Debris:AddItem(Particles, 0.2)
- game.Debris:AddItem(HitMark, 0.95)
- elseif mat == Enum.Material.Concrete or mat == Enum.Material.Slate or mat == Enum.Material.Cobblestone or mat == Enum.Material.Brick or mat == Enum.Material.Granite or mat == Enum.Material.Granite or mat == Enum.Material.Plastic or mat == Enum.Material.SmoothPlastic then
- local BulletWhizz = Instance.new("Sound")
- BulletWhizz.Parent = HitMark
- BulletWhizz.Pitch = BulletWhizz.Pitch * math.random(34, 46)/40
- BulletWhizz.SoundId = "rbxassetid://142082166"
- BulletWhizz:Play()
- if game.ReplicatedStorage:FindFirstChild("Dust" or "Smoke") then
- local D1 = game.ReplicatedStorage.Dust:clone()
- D1.Parent = HitMark
- D1.Enabled = true
- local D2 = game.ReplicatedStorage.Smoke:clone()
- D2.Parent = HitMark
- D2.Enabled = true
- end
- local Decal = Instance.new("Decal")
- Decal.Face = Enum.NormalId.Front
- Decal.Texture = "http://www.roblox.com/asset/?id=64291961"
- Decal.Parent = HitMark
- HitMark.Parent = BulletModel
- HitMark.CFrame = SurfaceCFrame
- local Particles = Instance.new("ParticleEmitter")
- Particles.Color = ColorSequence.new(Color3.new(50, 50, 50))
- Particles.LightEmission = 0
- Particles.Size = NumberSequence.new(0.25)
- Particles.Texture = "rbxasset://textures/particles/smoke_main.dds"
- Particles.Transparency = NumberSequence.new(
- {
- NumberSequenceKeypoint.new(0, 0.25, 0.25);
- NumberSequenceKeypoint.new(1, 1);
- }
- )
- Particles.Acceleration = Vector3.new(0, -196.2, 0)
- Particles.Lifetime = NumberRange.new(0.1 - 0.05, 0.1 + 0.05)
- Particles.Rate = 500
- Particles.RotSpeed = NumberRange.new(360)
- Particles.Speed = NumberRange.new(25 - 5, 25 + 5)
- Particles.VelocitySpread = 45
- Particles.Parent = HitMark
- Particles.EmissionDirection = "Top"
- game.Debris:AddItem(Particles, 0.2)
- game.Debris:AddItem(HitMark, 0.95)
- elseif mat == Enum.Material.Grass or mat == Enum.Material.Sand then
- local BulletWhizz = Instance.new("Sound")
- BulletWhizz.Parent = HitMark
- BulletWhizz.Pitch = BulletWhizz.Pitch * math.random(34, 46)/40
- BulletWhizz.SoundId = "rbxassetid://133758545"
- BulletWhizz:Play()
- if game.ReplicatedStorage:FindFirstChild("Dust" or "Smoke") then
- local D1 = game.ReplicatedStorage.Dust:clone()
- D1.Parent = HitMark
- D1.Enabled = true
- local D2 = game.ReplicatedStorage.Smoke:clone()
- D2.Parent = HitMark
- D2.Enabled = true
- end
- if game.ReplicatedStorage:FindFirstChild("Dust" or "Smoke") then
- local D1 = game.ReplicatedStorage.Dust:clone()
- D1.Parent = HitMark
- D1.Enabled = true
- local D2 = game.ReplicatedStorage.Smoke:clone()
- D2.Parent = HitMark
- D2.Enabled = true
- end
- local Decal = Instance.new("Decal")
- Decal.Face = Enum.NormalId.Front
- Decal.Texture = "http://www.roblox.com/asset/?id=64291961"
- Decal.Parent = HitMark
- HitMark.Parent = BulletModel
- HitMark.CFrame = SurfaceCFrame
- local Particles = Instance.new("ParticleEmitter")
- Particles.Color = ColorSequence.new(Color3.new(50, 50, 50))
- Particles.LightEmission = 0
- Particles.Size = NumberSequence.new(0.25)
- Particles.Texture = "rbxasset://textures/particles/smoke_main.dds"
- Particles.Transparency = NumberSequence.new(
- {
- NumberSequenceKeypoint.new(0, 0.25, 0.25);
- NumberSequenceKeypoint.new(1, 1);
- }
- )
- Particles.Acceleration = Vector3.new(0, -196.2, 0)
- Particles.Lifetime = NumberRange.new(0.1 - 0.05, 0.1 + 0.05)
- Particles.Rate = 500
- Particles.RotSpeed = NumberRange.new(360)
- Particles.Speed = NumberRange.new(25 - 5, 25 + 5)
- Particles.VelocitySpread = 45
- Particles.Parent = HitMark
- Particles.EmissionDirection = "Top"
- game.Debris:AddItem(Particles, 0.2)
- game.Debris:AddItem(HitMark, 0.95)
- elseif mat == Enum.Material.CorrodedMetal or mat == Enum.Material.Metal or mat == Enum.Material.DiamondPlate then
- local BulletWhizz = Instance.new("Sound")
- BulletWhizz.Parent = HitMark
- BulletWhizz.Pitch = BulletWhizz.Pitch * math.random(34, 46)/40
- BulletWhizz.SoundId = "rbxassetid://142082170"
- BulletWhizz:Play()
- local Decal = Instance.new("Decal")
- Decal.Face = Enum.NormalId.Front
- Decal.Texture = "http://www.roblox.com/asset/?id=64291961"
- Decal.Parent = HitMark
- HitMark.Parent = BulletModel
- HitMark.CFrame = SurfaceCFrame
- local Particles = Instance.new("ParticleEmitter")
- Particles.Color = ColorSequence.new(Color3.new(255, 200, 0))
- Particles.LightEmission = 1
- Particles.Size = NumberSequence.new(0.075)
- Particles.Texture = "http://www.roblox.com/asset/?id=416917683"
- Particles.Transparency = NumberSequence.new(
- {
- NumberSequenceKeypoint.new(0, 0.25, 0.25);
- NumberSequenceKeypoint.new(1, 1);
- }
- )
- Particles.Acceleration = Vector3.new(0, -196.2, 0)
- Particles.Lifetime = NumberRange.new(0.1 - 0.05, 0.1 + 0.05)
- Particles.Rate = 500
- Particles.RotSpeed = NumberRange.new(360)
- Particles.Speed = NumberRange.new(25 - 5, 25 + 5)
- Particles.VelocitySpread = 45
- Particles.Parent = HitMark
- Particles.EmissionDirection = "Top"
- game.Debris:AddItem(Particles, 0.2)
- game.Debris:AddItem(HitMark, 0.95)
- else
- local BulletWhizz = Instance.new("Sound")
- BulletWhizz.Parent = HitMark
- BulletWhizz.Pitch = BulletWhizz.Pitch * math.random(34, 46)/40
- BulletWhizz.SoundId = "rbxassetid://142082166"
- BulletWhizz:Play()
- end
- end
- --rocket.Touched:connect(function(hit)
- function EjectShells()
- shell = Shell:clone()
- shell.CFrame = Tool.Chamber.CFrame * CFrame.fromEulerAnglesXYZ(2.5,1,1.25)
- shell.Velocity = Tool.Chamber.CFrame.lookVector * 20 + Vector3.new(0,10,0)
- shell.RotVelocity = Vector3.new(-10,40,30)
- shell.Parent = BulletModel
- game:GetService("Debris"):addItem(shell,0.125)
- print("Ejecting Shell")
- end
- local connection
- function M203()
- if GunSetup.GrenadeLauncher == true then
- Tool.Handle.M203:Play()
- local M203 = game.ReplicatedStorage.M203["M203"]:clone()
- M203.Parent = game.Workspace
- M203.CFrame = Tool.FirePart2.CFrame*CFrame.new(.15,-0.7,-5.5)
- if GunSetup.M203Ammo == 1 then
- M203.Velocity = Tool.FirePart2.CFrame.lookVector*(500-196.2)
- end
- if GunSetup.M203Ammo == 2 then
- M203.Velocity = Tool.FirePart2.CFrame.lookVector*(575-196.2)
- end
- if GunSetup.M203Ammo == 1 then
- local Explosion =Instance.new("Explosion")
- Explosion.BlastRadius=15
- Explosion.BlastPressure=0
- damage = math.random(80,120)
- M203.Touched:connect(function(Hit)
- Explosion.Hit:connect(Damage)
- Explosion.Position= M203.Position
- Explosion.Parent=game.Workspace
- M203:remove()
- end)
- end
- if GunSetup.M203Ammo == 2 then
- local Smoke = M203.Smoke
- M203.Touched:connect(function(Hit)
- Smoke.Enabled = true
- M203.Velocity = Camera.CoordinateFrame.lookVector*0
- wait(9.5)
- Smoke.Enabled = false
- wait(1.5)
- M203:remove()
- end)
- end
- end
- end
- function Raycasting()
- local Hit,Pos
- local Position0 = Bullet.Position;
- local Position1 = Bullet.Position;
- local Distance = 0
- while true do
- RS.RenderStepped:wait()
- if Distance > 1500 then
- Bullet:Destroy()
- break
- end
- Position1 = Bullet.Position;
- Distance = Distance + (Position1 - Position0).magnitude
- Hit, Pos = workspace:FindPartOnRayWithIgnoreList(Ray.new(Position0,(Position1 - Position0)), Ray_Ignore);
- if Hit then
- Bullet:Destroy()
- local hitHumanoid = ( Hit.Parent:IsA( "Accessory" ) and Hit.Parent.Parent:FindFirstChild( "Humanoid" ) or Hit.Parent:FindFirstChild( "Humanoid" ) );
- local c = Instance.new("ObjectValue");
- c.Name = "creator";
- c.Value = Player;
- game.Debris:AddItem(c, 3);
- c.Parent = hitHumanoid;
- local hitPlyr = ( hitHumanoid and game.Players:GetPlayerFromCharacter( hitHumanoid.Parent ) );
- if not hitHumanoid then
- CreateBulletImpact(Pos,Hit,false)
- if game.ReplicatedStorage:FindFirstChild("Smoke") then
- local D2 = game.ReplicatedStorage.Smoke:clone()
- D2.Parent = HitMark
- D2.Enabled = true
- end
- elseif hitHumanoid then
- if game.ReplicatedStorage:FindFirstChild("Blood") then
- local D2 = game.ReplicatedStorage.Blood:clone()
- D2.Parent = HitMark
- D2.Enabled = true
- end
- CreateBulletImpact(Pos,Hit,true)
- end
- if hitPlyr then
- local isEnemy;
- if GunSetup.ATK then
- isEnemy = ( hitPlyr.TeamColor ~= Player.TeamColor or hitPlyr.Neutral );
- elseif not GunSetup.ATK then
- isEnemy = (hitPlyr.TeamColor == Player.TeamColor or hitPlyr.TeamColor ~= Player.TeamColor or hitPlyr.Neutral );
- end
- if isEnemy and Hit.Name == "Head" then
- hitHumanoid:TakeDamage( GunSetup.HeadDamage );
- elseif isEnemy and Hit.Name ~= "Head" then
- hitHumanoid:TakeDamage( GunSetup.Damage);
- elseif isEnemy and Hit.Name == "Chest" then
- hitHumanoid:TakeDamage( GunSetup.Damage);
- elseif isEnemy and Hit:IsA("Accessory") or Hit:IsA("Hat") and Hit.Parent.Parent:FindFirstChild("Humanoid") then
- Hit.Parent.Parent:FindFirstChild("Humanoid"):TakeDamage(GunSetup.HeadDamage);
- end
- elseif hitHumanoid and Hit.Name == "Head" then
- hitHumanoid:TakeDamage( GunSetup.HeadDamage );
- elseif hitHumanoid and Hit.Name ~= "Head" then
- hitHumanoid:TakeDamage( GunSetup.Damage );
- elseif hitHumanoid and Hit.Name == "Chest" then
- hitHumanoid:TakeDamage( GunSetup.VestDamage );
- elseif hitHumanoid and Hit:IsA("Accessory") or Hit:IsA("Hat") or Hit.Name == "Face" and Hit.Parent.Parent:FindFirstChild("Humanoid") then
- Hit.Parent.Parent:FindFirstChild("Humanoid"):TakeDamage( GunSetup.HeadDamage);
- end
- print(Hit.Name)
- return Hit, Pos;
- end
- Position0 = Position1;
- end
- end
- function Damage(Targ)
- local humanoid=Targ.Parent:FindFirstChild("Humanoid")
- if Targ.Parent:FindFirstChild("Humanoid") then
- -- for i,v in ipairs(humanoids) do
- -- if v==targ.Parent.Humanoid then
- -- return
- -- end
- -- end
- -- table.insert(humanoids,targ.Parent.Humanoid)
- Targ.Parent.Humanoid:TakeDamage(damage)
- end
- end
- function shoot()
- local move = (Tool.FirePart.CFrame * CFrame.Angles(math.rad(math.random(-GunSetup.BSpread, GunSetup.BSpread)/10), math.rad(math.random(-GunSetup.BSpread, GunSetup.BSpread)/10), math.rad(math.random(-GunSetup.BSpread, GunSetup.BSpread)/10))).lookVector * 450
- local from = Tool.FirePart.Position
- local ray = Ray.new(from,move-Vector3.new(0, GunSetup.BDrop*0.05, 0))
- local Hit,Pos = workspace:FindPartOnRayWithIgnoreList(ray, Ray_Ignore)
- local HumanoidFound = false
- CreateBullet()
- local humanoid
- if Hit then
- CreateBulletImpact(Pos, Hit, HumanoidFound)
- if Hit.Parent.Name == "Chest" then
- if Hit.Parent.Parent:FindFirstChild("Humanoid") then
- humanoid = Hit.Parent.Parent:FindFirstChild("Humanoid")
- local c = Instance.new("ObjectValue")
- c.Name = "creator"
- c.Value = Player
- game.Debris:AddItem(c, 3)
- c.Parent = humanoid
- humanoid:TakeDamage(GunSetup.VestDamage)
- HumanoidFound = true
- end
- elseif Hit.Parent:IsA("Hat") or Hit.Parent:IsA("Accessory") then
- if Hit.Parent.Parent:FindFirstChild("Humanoid") then
- humanoid = Hit.Parent.Parent:FindFirstChild("Humanoid")
- local c = Instance.new("ObjectValue")
- c.Name = "creator"
- c.Value = Player
- game.Debris:AddItem(c, 3)
- c.Parent = humanoid
- local d = math.random(GunSetup.HeadDamage[1], GunSetup.HeadDamage[2])
- humanoid:TakeDamage(d)
- HumanoidFound = true
- end
- elseif Hit.Parent.Name=="Face" then
- if Hit.Parent.Parent:FindFirstChild("Humanoid") then
- humanoid = Hit.Parent.Parent:FindFirstChild("Humanoid")
- local c = Instance.new("ObjectValue")
- c.Name = "creator"
- c.Value = Player
- game.Debris:AddItem(c, 3)
- c.Parent = humanoid
- humanoid:TakeDamage(GunSetup.HelmetDamage)
- HumanoidFound = true
- end
- end
- if Hit.Parent:FindFirstChild("Humanoid") and Hit.Name == "Head" then
- humanoid = Hit.Parent:FindFirstChild("Humanoid")
- local c = Instance.new("ObjectValue")
- c.Name = "creator"
- c.Value = Player
- game.Debris:AddItem(c, 3)
- c.Parent = humanoid
- local d = math.random(GunSetup.HeadDamage[1], GunSetup.HeadDamage[2])
- humanoid:TakeDamage(d)
- HumanoidFound = true
- elseif Hit.Parent:FindFirstChild("Humanoid") and Hit.Name == "Torso" then
- humanoid = Hit.Parent:FindFirstChild("Humanoid")
- local c = Instance.new("ObjectValue")
- c.Name = "creator"
- c.Value = Player
- game.Debris:AddItem(c, 3)
- c.Parent = humanoid
- local d = math.random(GunSetup.TorsoDamage[1], GunSetup.TorsoDamage[2])
- humanoid:TakeDamage(d)
- HumanoidFound = true
- elseif Hit.Parent:FindFirstChild("Humanoid") and Hit.Name == "Right Arm" or Hit.Name == "Left Arm" or Hit.Name == "Right Leg" or Hit.Name == "Left Leg" then
- humanoid = Hit.Parent:FindFirstChild("Humanoid")
- local c = Instance.new("ObjectValue")
- c.Name = "creator"
- c.Value = Player
- game.Debris:AddItem(c, 3)
- c.Parent = humanoid
- local d = math.random(GunSetup.LimbsDamage[1], GunSetup.LimbsDamage[2])
- humanoid:TakeDamage(d)
- HumanoidFound = true
- end
- end
- Tool.FirePart.Fire:Play()
- RecoilG = math.rad(math.random(GunSetup.Recoil[1],GunSetup.Recoil[1])/10 * Rand(1, 1.5, 0.1))--(GunSettings.Recoil*math.random(1,4))
- Recoilup = RecoilG/2
- print(RecoilG)
- for i = Recoil, Recoil*Recoil do
- Recoilup = Recoilup * math.abs(Recoil) * math.random(-i,i)
- end
- for _, v in pairs(Tool.FirePart:GetChildren()) do
- if v.Name:sub(1, 7) == "FlashFX" or v.Name:sub(1, 7) == "Smoke" then
- v.Enabled = true
- end
- end
- delay(1 / 30, function()
- for _, v in pairs(Tool.FirePart:GetChildren()) do
- if v.Name:sub(1, 7) == "FlashFX" or v.Name:sub(1, 7) == "Smoke" then
- v.Enabled = false
- Recoilup = 0
- end
- end
- end)
- coroutine.resume(coroutine.create(function()
- local r = math.abs(Recoilup)/3
- local r2 = math.abs(Recoilup)/12
- local r3 = math.abs(Recoilup)/14
- if _G.Crouched then
- r = r2
- elseif _G.Proned then
- r = r3
- end
- local ran = math.random(-1, 1)
- Camera.CoordinateFrame = CFrame.new(Camera.Focus.p) * (Camera.CoordinateFrame - Camera.CoordinateFrame.p) * CFrame.Angles(r, 0, 0) * CFrame.new(0, 0, (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude)
- local c = -r/20
- local cx = -(r*ran)/20
- for i = 1, math.random(15, 25) do
- if EquipId == curId then
- Camera.CoordinateFrame = CFrame.new(Camera.Focus.p) * (Camera.CoordinateFrame - Camera.CoordinateFrame.p) * CFrame.Angles(c, 0, 0) * CFrame.new(0, 0, (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude)
- wait()
- else
- break
- end
- end
- end))
- -- Bullet Creation
- EjectShells()
- AmmoGui.Frame.AText.Text = Ammo
- print(Ammo)
- end
- ------------Some Random Functions----------------
- local Btype = script.BType
- Btype.Value = GunSetup.BType
- function Checar()
- CheckAnim()
- end
- function Emperrar()
- if GunSetup.CanBreak == true then
- local Jam = math.random(200)
- print("Chance de emperrar: "..Jam)
- if Jam <= 2 then
- Emperrado = true
- end
- end
- end
- ------------Shooting Function--------------------
- Mouse.Button1Down:connect(function()
- if Equipped then
- if Safemode or slideback then return end
- MouseHeld = true
- if GetAmmo() == 0 or MagOut and GunSetup.FireMode ~= "M203" then
- Tool.Handle.Click:Play()
- Chambered = false
- end
- if Emperrado or not Chambered and GunSetup.FireMode ~= "M203" then
- Tool.Handle.Click:Play()
- return
- end
- if not Shooting and not Reloading and not GLReloading or Sprinting and not Emperrado and not Checando then
- Shooting = true
- if GunSetup.FireMode == "Single" and GetAmmo() > 0 and not Checando then
- shoot()
- Emperrar()
- Ammo = Ammo - 1
- GetAmmo()
- wait(Firerate)
- elseif GunSetup.FireMode == "Automatic" then
- while MouseHeld and Equipped and Shooting and not Emperrado and GetAmmo() > 0 and not Checando do
- shoot()
- Emperrar()
- Ammo = Ammo - 1
- GetAmmo()
- wait(Firerate)
- end
- elseif GunSetup.FireMode == "Burst" and GetAmmo() > 0 and not Checando then
- for i = 1, GunSetup.BurstFire do
- if GetAmmo() < 1 then
- break
- end
- shoot()
- Emperrar()
- Ammo = Ammo - 1
- GetAmmo()
- wait(BURSTFirerate)
- end
- elseif GunSetup.FireMode == "M203" and GLAmmo.Value > 0 and GLChambered and not Checando then
- M203()
- GLChambered = false
- GLAmmo.Value = GLAmmo.Value - 1
- wait(GLFirerate)
- end
- Shooting = false
- end
- end
- end)
- Mouse.Button1Up:connect(function()
- if Equipped then
- MouseHeld = false
- end
- end)
- ----------------Mouse Function---------------------------
- Mouse.KeyDown:connect(function(Key)
- if Equipped then
- if Key == "t" then
- if not Reloading and not GLReloading and not Aiming and not Checando then
- if Safemode then
- Safemode = false
- IdleOrSteadyAnim()
- elseif not Safemode then
- if MouseHeld then
- MouseHeld = false
- end
- Safemode = true
- SafetyAnim()
- end
- end
- end
- if Key:byte() == 48 then
- if MouseHeld then
- MouseHeld = false
- end
- if not Sprinting and not Reloading and not GLReloading and not Checando and not Aiming and not _G.Crouched and not _G.Proned then
- Sprinting = true
- SprintAnim()
- end
- end
- if Key == "y" then
- if Tool:FindFirstChild('AimPart2') ~= nil then
- if EnableCycleSight then
- if AimPartMode == 1 then
- AimPartMode = 2
- if Aiming then
- tweenJoint(RAW, RAW.C0 * CFrame.new(-Tool.AimPart2.CFrame:toObjectSpace(Character.Head.CFrame).p), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(LAW, GunSetup.LeftAim2Position , nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenFoV(GunSetup.FOV2, 60)
- end
- elseif AimPartMode == 2 then
- AimPartMode = 1
- if Aiming then
- tweenJoint(RAW, RAW.C0 * CFrame.new(-Tool.AimPart.CFrame:toObjectSpace(Character.Head.CFrame).p), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(LAW, GunSetup.LeftAimPosition , nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenFoV(GunSetup.FOV1, 60)
- end
- end
- end
- end
- end
- if Key == "f" then
- if EnableFireMode then
- if MouseHeld then
- MouseHeld = false
- end
- if GunSetup.FireMode == "Automatic" then
- if GunSetup.SwitchableModes.Burst then
- GunSetup.FireMode = "Burst"
- Tool.Handle.SafetyClick:Play()
- elseif GunSetup.SwitchableModes.Single then
- GunSetup.FireMode = "Single"
- Tool.Handle.SafetyClick:Play()
- end
- elseif GunSetup.FireMode == "Burst" then
- if GunSetup.SwitchableModes.Single then
- GunSetup.FireMode = "Single"
- Tool.Handle.SafetyClick:Play()
- elseif GunSetup.SwitchableModes.Automatic then
- GunSetup.FireMode = "Automatic"
- Tool.Handle.SafetyClick:Play()
- end
- elseif GunSetup.FireMode == "Single" then
- if GunSetup.SwitchableModes.Automatic then
- GunSetup.FireMode = "Automatic"
- Tool.Handle.SafetyClick:Play()
- elseif GunSetup.SwitchableModes.Burst then
- GunSetup.FireMode = "Burst"
- Tool.Handle.SafetyClick:Play()
- end
- end
- -- if GunSetup.FireMode == "Automatic" then
- -- GunSetup.FireMode = "Single"
- -- Tool.Handle.SafetyClick:Play()
- -- elseif GunSetup.FireMode == "Single" then
- -- GunSetup.FireMode = "Burst"
- -- Tool.Handle.SafetyClick:Play()
- -- elseif GunSetup.FireMode == "Burst" then
- -- GunSetup.FireMode = "Automatic"
- -- Tool.Handle.SafetyClick:Play()
- -- end
- end
- end
- if Key == "r" then
- if not Reloading and not Animando and not GLReloading and StoredAmmo.Value > 0 and not Sprinting and not Aiming and Checando and not MagOut then
- if MouseHeld then
- MouseHeld = false
- end
- Reloading = true
- ReloadAnim()
- Reloading = false
- if Checando then
- CheckAnim()
- elseif Safemode then
- SafetyAnim()
- end
- end
- end
- if Key == "r" then
- if GunSetup.FastReload and not Animando and not Reloading and not GLReloading and StoredAmmo.Value > 0 and not Sprinting and not Aiming and not Checando and not MagOut then
- if MouseHeld then
- MouseHeld = false
- end
- Reloading = true
- FastReloadAnim()
- FastBolt()
- Reloading = false
- if Safemode then
- SafetyAnim()
- end
- end
- end
- if Key == "q" then
- if not Reloading and not GLReloading and not Sprinting and not Aiming and not Checando then
- if MouseHeld then
- MouseHeld = false
- end
- Checando = true
- CheckAnim()
- AmmoGui.Frame.Some.Visible = true
- AmmoGui.Frame.Btext.Visible = true
- AmmoGui.Frame.FText.Visible = true
- AmmoGui.Frame.SAText.Visible = true
- elseif not Reloading and not GLReloading and not Sprinting and not Aiming and Checando then
- if Safemode then
- SafetyAnim()
- Checando = false
- AmmoGui.Frame.Some.Visible = false
- AmmoGui.Frame.Btext.Visible = false
- AmmoGui.Frame.FText.Visible = false
- AmmoGui.Frame.SAText.Visible = false
- else
- IdleOrSteadyAnim()
- Checando = false
- AmmoGui.Frame.Some.Visible = false
- AmmoGui.Frame.Btext.Visible = false
- AmmoGui.Frame.FText.Visible = false
- AmmoGui.Frame.SAText.Visible = false
- end
- end
- end
- end
- if Key == "e" then
- if not Animando and not Reloading and not GLReloading and not Sprinting and not Aiming and Checando and not MagOut then
- if MouseHeld then
- MouseHeld = false
- end
- if not slideback then
- ChamberAnim()
- slideback = true
- Emperrado = false
- if Ammo > 0 and Chambered and not MagOut then
- EjectShells()
- Ammo = Ammo - 1
- print(Ammo)
- end
- elseif slideback then
- ChamberBKAnim()
- slideback = false
- Chambered = true
- end
- end
- end
- if Key == "g" then
- if GunSetup.GrenadeLauncher and not Checando then
- if MouseHeld then
- MouseHeld = false
- end
- if GunSetup.FireMode ~= "M203" then
- Tool.Handle.SafetyClick:Play()
- GunSetup.FireMode = "M203"
- else
- Tool.Handle.SafetyClick:Play()
- GunSetup.FireMode = GunSetup.BkFM
- end
- end
- end
- if Key == "g" then
- if GunSetup.GrenadeLauncher and not Animando and GLAmmo.Value > 0 and not Reloading and not GLReloading and not Sprinting and Checando and not MagOut then
- if MouseHeld then
- MouseHeld = false
- end
- GLReloading = true
- GLReloadAnim()
- GLReloading = false
- GLChambered = true
- end
- end
- if Key == "b" then
- if GunSetup.CanSeeMag and not Animando and not Reloading and not GLReloading and not Sprinting and not Aiming and Checando then
- if MouseHeld then
- MouseHeld = false
- end
- if not MagOut then
- MagOut = true
- SeeMag()
- AmmoGui.Frame.Some2.Visible = true
- AmmoGui.Frame.AText.Visible = true
- else
- AmmoGui.Frame.Some2.Visible = false
- AmmoGui.Frame.AText.Visible = false
- UNSeeMag()
- MagOut = false
- end
- end
- end
- end)
- Mouse.KeyUp:connect(function(Key)
- if Equipped then
- if Key:byte() == 48 then
- if MouseHeld then
- MouseHeld = false
- end
- if Sprinting and not Aiming and not Reloading and not GLReloading and not _G.Crouched and not _G.Proned then
- if not Safemode then
- IdleOrSteadyAnim()
- end
- wait(0.25 * GunSetup.AnimSpeed)
- _G.Sprinting = false
- Humanoid.WalkSpeed = 16
- Sprinting = false
- end
- end
- end
- end)
- -----------------Unequiping------------
- Character.Humanoid.Died:connect(function()
- Tool.Parent = Player.Backpack
- Equipped = false
- Torso:WaitForChild("Right Shoulder").Part1 = Character["Right Arm"]
- Torso:WaitForChild("Left Shoulder").Part1 = Character["Left Arm"]
- RAW:Destroy()
- LAW:Destroy()
- if Aiming then
- Aiming = false
- end
- if Reloading then
- Reloading = false
- end
- if GLReloading then
- GLReloading = false
- end
- if Sprinting then
- Sprinting = false
- end
- end)
- Tool.Unequipped:connect(function()
- Equipped = false
- uis.MouseIconEnabled = true
- if MouseHeld then
- MouseHeld = false
- end
- if GunSetup.FireMode == "M203" then
- AmmoGui.Frame.AText.Text = GLAmmo.Value
- end
- if GunSetup.FireMode ~= "M203" then
- AmmoGui.Frame.AText.Text = Ammo
- end
- Player.PlayerGui:WaitForChild("AmmoGui"):Destroy()
- if Aiming then
- Aiming = false
- end
- if Reloading then
- Reloading = false
- IdleOrSteadyAnim()
- end
- tweenFoV(70, 10)
- _G.Sprinting = false
- Player.CameraMode="Classic"
- Torso:WaitForChild("Right Shoulder").Part1 = Character["Right Arm"]
- Torso:WaitForChild("Left Shoulder").Part1 = Character["Left Arm"]
- RAW:Destroy()
- LAW:Destroy()
- end)
- end))
- NumberValue41.Name = "Ammo"
- NumberValue41.Parent = LocalScript40
- NumberValue41.Value = 50
- StringValue42.Name = "BType"
- StringValue42.Parent = LocalScript40
- NumberValue43.Name = "StoredAmmo"
- NumberValue43.Parent = LocalScript40
- NumberValue43.Value = 10000000000
- NumberValue44.Name = "MaxAmmo"
- NumberValue44.Parent = LocalScript40
- NumberValue44.Value = 1e+18
- NumberValue45.Name = "GLAmmo"
- NumberValue45.Parent = LocalScript40
- NumberValue45.Value = 10
- ScreenGui46.Name = "AmmoGui"
- ScreenGui46.Parent = LocalScript40
- Frame47.Parent = ScreenGui46
- Frame47.Transparency = 1
- Frame47.Size = UDim2.new(0.0812182724, 0, 0.300000012, 0)
- Frame47.Position = UDim2.new(0.899999976, 0, 0.649999976, 0)
- Frame47.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame47.BackgroundTransparency = 1
- Frame48.Name = "nao"
- Frame48.Parent = Frame47
- Frame48.Size = UDim2.new(1, 0, 0.100000001, 0)
- Frame48.Style = Enum.FrameStyle.RobloxRound
- Frame48.BackgroundColor3 = Color3.new(0, 0, 0)
- TextLabel49.Name = "NText"
- TextLabel49.Parent = Frame47
- TextLabel49.Transparency = 1
- TextLabel49.Size = UDim2.new(1, 0, 0.100000001, 0)
- TextLabel49.Text = "M16A4"
- TextLabel49.BackgroundColor3 = Color3.new(0, 0, 0)
- TextLabel49.BackgroundTransparency = 1
- TextLabel49.BorderSizePixel = 0
- TextLabel49.Font = Enum.Font.SourceSansBold
- TextLabel49.FontSize = Enum.FontSize.Size18
- TextLabel49.TextColor3 = Color3.new(1, 1, 1)
- TextLabel49.TextStrokeTransparency = 0.85000002384186
- TextLabel49.TextWrapped = true
- Frame50.Name = "Some"
- Frame50.Parent = Frame47
- Frame50.Size = UDim2.new(1, 0, 0.600000024, 0)
- Frame50.Style = Enum.FrameStyle.RobloxRound
- Frame50.Position = UDim2.new(0, 0, 0.400000006, 0)
- Frame50.Visible = false
- Frame50.BackgroundColor3 = Color3.new(0, 0, 0)
- TextLabel51.Name = "FText"
- TextLabel51.Parent = Frame47
- TextLabel51.Transparency = 1
- TextLabel51.Size = UDim2.new(1, 0, 0.100000001, 0)
- TextLabel51.Text = "Automatic"
- TextLabel51.Position = UDim2.new(0, 0, 0.400000006, 0)
- TextLabel51.Visible = false
- TextLabel51.BackgroundColor3 = Color3.new(0, 0, 0)
- TextLabel51.BackgroundTransparency = 1
- TextLabel51.BorderSizePixel = 0
- TextLabel51.Font = Enum.Font.SourceSansBold
- TextLabel51.FontSize = Enum.FontSize.Size18
- TextLabel51.TextColor3 = Color3.new(1, 1, 1)
- TextLabel51.TextStrokeTransparency = 0.85000002384186
- TextLabel51.TextWrapped = true
- TextLabel52.Name = "SAText"
- TextLabel52.Parent = Frame47
- TextLabel52.Transparency = 1
- TextLabel52.Size = UDim2.new(1, 0, 0.25, 0)
- TextLabel52.Text = "30"
- TextLabel52.Position = UDim2.new(0, 0, 0.550000012, 0)
- TextLabel52.Visible = false
- TextLabel52.BackgroundColor3 = Color3.new(0, 0, 0)
- TextLabel52.BackgroundTransparency = 1
- TextLabel52.BorderSizePixel = 0
- TextLabel52.Font = Enum.Font.SourceSansBold
- TextLabel52.FontSize = Enum.FontSize.Size24
- TextLabel52.TextColor3 = Color3.new(1, 1, 1)
- TextLabel52.TextScaled = true
- TextLabel52.TextStrokeTransparency = 0.85000002384186
- TextLabel52.TextWrapped = true
- TextLabel53.Name = "Btext"
- TextLabel53.Parent = Frame47
- TextLabel53.Transparency = 1
- TextLabel53.Size = UDim2.new(1, 0, 0.100000001, 0)
- TextLabel53.Text = "5.56x45mm"
- TextLabel53.Position = UDim2.new(0, 0, 0.850000024, 0)
- TextLabel53.Visible = false
- TextLabel53.BackgroundColor3 = Color3.new(0, 0, 0)
- TextLabel53.BackgroundTransparency = 1
- TextLabel53.BorderSizePixel = 0
- TextLabel53.Font = Enum.Font.SourceSansBold
- TextLabel53.FontSize = Enum.FontSize.Size18
- TextLabel53.TextColor3 = Color3.new(1, 1, 1)
- TextLabel53.TextStrokeTransparency = 0.85000002384186
- TextLabel53.TextWrapped = true
- Frame54.Name = "nao"
- Frame54.Parent = Frame47
- Frame54.Size = UDim2.new(1, 0, 0.100000001, 0)
- Frame54.Style = Enum.FrameStyle.RobloxRound
- Frame54.Position = UDim2.new(0, 0, 0.150000006, 0)
- Frame54.BackgroundColor3 = Color3.new(0, 0, 0)
- ImageLabel55.Name = "A"
- ImageLabel55.Parent = Frame47
- ImageLabel55.Size = UDim2.new(0.100000001, 0, 0.0500000007, 0)
- ImageLabel55.Position = UDim2.new(0.100000001, 0, 0.180000007, 0)
- ImageLabel55.BackgroundColor3 = Color3.new(0, 1, 0)
- ImageLabel55.Image = "rbxassetid://133293265"
- ImageLabel55.ImageTransparency = 1
- ImageLabel56.Name = "B"
- ImageLabel56.Parent = Frame47
- ImageLabel56.Size = UDim2.new(0.100000001, 0, 0.0500000007, 0)
- ImageLabel56.Position = UDim2.new(0.280000001, 0, 0.180000007, 0)
- ImageLabel56.BackgroundColor3 = Color3.new(1, 1, 0)
- ImageLabel56.Image = "rbxassetid://133293265"
- ImageLabel56.ImageTransparency = 1
- ImageLabel57.Name = "C"
- ImageLabel57.Parent = Frame47
- ImageLabel57.Size = UDim2.new(0.100000001, 0, 0.0500000007, 0)
- ImageLabel57.Position = UDim2.new(0.460000008, 0, 0.180000007, 0)
- ImageLabel57.BackgroundColor3 = Color3.new(1, 0, 0)
- ImageLabel57.Image = "rbxassetid://133293265"
- ImageLabel57.ImageTransparency = 1
- ImageLabel58.Name = "D"
- ImageLabel58.Parent = Frame47
- ImageLabel58.Size = UDim2.new(0.100000001, 0, 0.0500000007, 0)
- ImageLabel58.Position = UDim2.new(0.819999993, 0, 0.180000007, 0)
- ImageLabel58.BackgroundColor3 = Color3.new(0, 1, 1)
- ImageLabel58.Image = "rbxassetid://133293265"
- ImageLabel58.ImageTransparency = 1
- Frame59.Name = "Some2"
- Frame59.Parent = Frame47
- Frame59.Size = UDim2.new(1, 0, 0.100000001, 0)
- Frame59.Style = Enum.FrameStyle.RobloxRound
- Frame59.Position = UDim2.new(0, 0, 0.289999992, 0)
- Frame59.Visible = false
- Frame59.BackgroundColor3 = Color3.new(0, 0, 0)
- TextLabel60.Name = "AText"
- TextLabel60.Parent = Frame47
- TextLabel60.Transparency = 1
- TextLabel60.Size = UDim2.new(1, 0, 0.100000001, 0)
- TextLabel60.Text = "30 Bullets"
- TextLabel60.Position = UDim2.new(0, 0, 0.280000001, 0)
- TextLabel60.Visible = false
- TextLabel60.BackgroundColor3 = Color3.new(0, 0, 0)
- TextLabel60.BackgroundTransparency = 1
- TextLabel60.BorderSizePixel = 0
- TextLabel60.Font = Enum.Font.SourceSansBold
- TextLabel60.FontSize = Enum.FontSize.Size48
- TextLabel60.TextColor3 = Color3.new(1, 1, 1)
- TextLabel60.TextScaled = true
- TextLabel60.TextStrokeTransparency = 0.85000002384186
- TextLabel60.TextWrapped = true
- ImageLabel61.Name = "E"
- ImageLabel61.Parent = Frame47
- ImageLabel61.Size = UDim2.new(0.100000001, 0, 0.0500000007, 0)
- ImageLabel61.Position = UDim2.new(0.639999986, 0, 0.180000007, 0)
- ImageLabel61.BackgroundColor3 = Color3.new(1, 1, 1)
- ImageLabel61.Image = "rbxassetid://133293265"
- ImageLabel61.ImageTransparency = 1
- Frame62.Parent = ScreenGui46
- Frame62.Transparency = 0.5
- Frame62.Size = UDim2.new(0, 126, 0, 10)
- Frame62.Position = UDim2.new(1, -153, 1, -62)
- Frame62.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392)
- Frame62.BackgroundTransparency = 0.5
- Frame62.BorderSizePixel = 3
- TextLabel63.Name = "Caliber"
- TextLabel63.Parent = Frame62
- TextLabel63.Transparency = 1
- TextLabel63.Size = UDim2.new(1, 0, 1, 0)
- TextLabel63.Text = "Made by 1ndrew"
- TextLabel63.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392)
- TextLabel63.BackgroundTransparency = 1
- TextLabel63.Font = Enum.Font.SourceSansBold
- TextLabel63.FontSize = Enum.FontSize.Size12
- TextLabel63.TextColor3 = Color3.new(0, 0, 0)
- TextLabel63.TextStrokeColor3 = Color3.new(0.380392, 0.380392, 0.380392)
- TextLabel63.TextStrokeTransparency = 0.5
- TextLabel63.TextXAlignment = Enum.TextXAlignment.Right
- Part64.Name = "Bolt"
- Part64.Parent = Tool0
- Part64.Material = Enum.Material.SmoothPlastic
- Part64.BrickColor = BrickColor.new("Dark stone grey")
- Part64.Rotation = Vector3.new(90, 0, -90)
- Part64.Anchored = true
- Part64.CanCollide = false
- Part64.FormFactor = Enum.FormFactor.Custom
- Part64.Size = Vector3.new(0.200000003, 0.402905315, 0.200000003)
- Part64.CFrame = CFrame.new(36.3748398, 1.176, -67.2724762, 5.89999981e-05, 1, 0, 0, 0, -1, -1, 5.89999981e-05, 0)
- Part64.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part64.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part64.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part64.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part64.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part64.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part64.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part64.Position = Vector3.new(36.3748398, 1.176, -67.2724762)
- Part64.Orientation = Vector3.new(90, 90, 0)
- Part64.Color = Color3.new(0.388235, 0.372549, 0.384314)
- CylinderMesh65.Parent = Part64
- CylinderMesh65.Scale = Vector3.new(0.496383131, 1, 0.979876816)
- CylinderMesh65.Scale = Vector3.new(0.496383131, 1, 0.979876816)
- Part66.Name = "Chamber"
- Part66.Parent = Tool0
- Part66.Material = Enum.Material.Metal
- Part66.BrickColor = BrickColor.new("Really red")
- Part66.Reflectance = 0.30000001192093
- Part66.Transparency = 1
- Part66.Rotation = Vector3.new(17.1999989, 0, 0)
- Part66.Anchored = true
- Part66.CanCollide = false
- Part66.FormFactor = Enum.FormFactor.Custom
- Part66.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part66.CFrame = CFrame.new(36.3460007, 1.17399895, -67.4499969, 1, 6.41626975e-05, -5.65001392e-05, -7.8000623e-05, 0.955279768, -0.295703858, 3.50002811e-05, 0.295703888, 0.955279648)
- Part66.BottomSurface = Enum.SurfaceType.Smooth
- Part66.TopSurface = Enum.SurfaceType.Smooth
- Part66.Color = Color3.new(1, 0, 0)
- Part66.Position = Vector3.new(36.3460007, 1.17399895, -67.4499969)
- Part66.Orientation = Vector3.new(17.1999989, 0, 0)
- Part66.Color = Color3.new(1, 0, 0)
- SpecialMesh67.Parent = Part66
- SpecialMesh67.Scale = Vector3.new(0.800000072, 0.800000072, 0.800000072)
- SpecialMesh67.MeshType = Enum.MeshType.Brick
- SpecialMesh67.Scale = Vector3.new(0.800000072, 0.800000072, 0.800000072)
- Model68.Name = "Shells"
- Model68.Parent = Tool0
- Part69.Name = "Shell"
- Part69.Parent = Model68
- Part69.BrickColor = BrickColor.new("Cool yellow")
- Part69.Rotation = Vector3.new(-90, 0, -90)
- Part69.Anchored = true
- Part69.Size = Vector3.new(0.0520000011, 0.0520000011, 0.236000001)
- Part69.CFrame = CFrame.new(36.375, 1.176, -67.2740021, 0, 1, 0, 0, 0, 1, 1, 0, 0)
- Part69.BottomSurface = Enum.SurfaceType.Smooth
- Part69.TopSurface = Enum.SurfaceType.Smooth
- Part69.Color = Color3.new(0.992157, 0.917647, 0.552941)
- Part69.Position = Vector3.new(36.375, 1.176, -67.2740021)
- Part69.Orientation = Vector3.new(-90, -90, 0)
- Part69.Color = Color3.new(0.992157, 0.917647, 0.552941)
- SpecialMesh70.Parent = Part69
- SpecialMesh70.MeshId = "http://www.roblox.com/Asset/?id=10207677"
- SpecialMesh70.Scale = Vector3.new(0.0199999996, 0.0199999996, 0.0199999996)
- SpecialMesh70.MeshType = Enum.MeshType.FileMesh
- SpecialMesh70.Scale = Vector3.new(0.0199999996, 0.0199999996, 0.0199999996)
- Part71.Name = "Trigger"
- Part71.Parent = Tool0
- Part71.Material = Enum.Material.SmoothPlastic
- Part71.BrickColor = BrickColor.new("New Yeller")
- Part71.Transparency = 1
- Part71.Rotation = Vector3.new(0, 90, 0)
- Part71.Anchored = true
- Part71.CanCollide = false
- Part71.FormFactor = Enum.FormFactor.Custom
- Part71.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part71.CFrame = CFrame.new(36.8918419, 0.830000997, -67.282486, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Part71.BottomSurface = Enum.SurfaceType.Smooth
- Part71.TopSurface = Enum.SurfaceType.Smooth
- Part71.Color = Color3.new(1, 1, 0)
- Part71.Position = Vector3.new(36.8918419, 0.830000997, -67.282486)
- Part71.Orientation = Vector3.new(0, 90, 0)
- Part71.Color = Color3.new(1, 1, 0)
- Part72.Name = "Handle"
- Part72.Parent = Tool0
- Part72.Material = Enum.Material.SmoothPlastic
- Part72.BrickColor = BrickColor.new("New Yeller")
- Part72.Reflectance = 0.30000001192093
- Part72.Transparency = 1
- Part72.Rotation = Vector3.new(0, 90, 0)
- Part72.Anchored = true
- Part72.CanCollide = false
- Part72.FormFactor = Enum.FormFactor.Custom
- Part72.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part72.CFrame = CFrame.new(37.1920013, 0.580000997, -67.4820023, 0, -2.70000019e-05, 1.00000024, 0, 1.00000024, 2.70000019e-05, -1, 0, 0)
- Part72.BottomSurface = Enum.SurfaceType.Smooth
- Part72.TopSurface = Enum.SurfaceType.Smooth
- Part72.Color = Color3.new(1, 1, 0)
- Part72.Position = Vector3.new(37.1920013, 0.580000997, -67.4820023)
- Part72.Orientation = Vector3.new(0, 90, 0)
- Part72.Color = Color3.new(1, 1, 0)
- Sound73.Name = "Click"
- Sound73.Parent = Part72
- Sound73.SoundId = "rbxassetid://132464034"
- Sound74.Name = "FireSound"
- Sound74.Parent = Part72
- Sound74.Pitch = 0.94999998807907
- Sound74.SoundId = "rbxassetid://258085548"
- Sound74.Volume = 1
- Sound75.Name = "MagIn"
- Sound75.Parent = Part72
- Sound75.Pitch = 0.92500001192093
- Sound75.SoundId = "rbxassetid://269079412"
- Sound75.Volume = 1
- Sound76.Name = "MagOut"
- Sound76.Parent = Part72
- Sound76.Pitch = 0.89999997615814
- Sound76.SoundId = "rbxassetid://268870109"
- Sound76.Volume = 1
- Sound77.Name = "ReloadSound"
- Sound77.Parent = Part72
- Sound77.SoundId = "rbxassetid://147323220"
- Sound77.Volume = 0.80000001192093
- Sound78.Name = "Running"
- Sound78.Parent = Part72
- Sound78.Pitch = 0.97500002384186
- Sound78.SoundId = "http://www.roblox.com/asset/?id=246376673"
- Sound78.Volume = 1
- Sound78.Looped = true
- Sound79.Name = "SafetyClick"
- Sound79.Parent = Part72
- Sound79.Pitch = 1.5
- Sound79.SoundId = "rbxassetid://132464034"
- Sound79.Volume = 0.30000001192093
- Sound80.Name = "WindowBreak"
- Sound80.Parent = Part72
- Sound80.Pitch = 0.97500002384186
- Sound80.SoundId = "http://www.roblox.com/asset/?id=142082167"
- Sound80.Volume = 1
- Sound81.Name = "M203"
- Sound81.Parent = Part72
- Sound81.SoundId = "http://roblox.com/asset/?id=135039581"
- Sound81.Volume = 1
- Sound82.Name = "BoltForward"
- Sound82.Parent = Part72
- Sound82.Pitch = 0.92500001192093
- Sound82.SoundId = "rbxassetid://393678926"
- Sound82.Volume = 1
- Sound83.Name = "BoltBack"
- Sound83.Parent = Part72
- Sound83.Pitch = 0.92500001192093
- Sound83.SoundId = "rbxassetid://393678915"
- Sound83.Volume = 1
- Sound84.Name = "M203ReloadIn"
- Sound84.Parent = Part72
- Sound84.Pitch = 0.94999998807907
- Sound84.SoundId = "http://roblox.com/asset/?id=158810321"
- Sound84.Volume = 1
- Sound85.Name = "M203ReloadOut"
- Sound85.Parent = Part72
- Sound85.Pitch = 0.99000000953674
- Sound85.SoundId = "http://roblox.com/asset/?id=166188835"
- Sound85.Volume = 1
- SpecialMesh86.Parent = Part72
- SpecialMesh86.Scale = Vector3.new(0.800000072, 0.800000072, 0.800000072)
- SpecialMesh86.MeshType = Enum.MeshType.Brick
- SpecialMesh86.Scale = Vector3.new(0.800000072, 0.800000072, 0.800000072)
- Part87.Name = "Upper receiver"
- Part87.Parent = Tool0
- Part87.Material = Enum.Material.Concrete
- Part87.Rotation = Vector3.new(90, 0, 0)
- Part87.Anchored = true
- Part87.CanCollide = false
- Part87.Size = Vector3.new(1.22473347, 0.225373551, 0.225373551)
- Part87.CFrame = CFrame.new(36.7707443, 1.18544996, -67.2739868, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part87.Position = Vector3.new(36.7707443, 1.18544996, -67.2739868)
- Part87.Orientation = Vector3.new(90, 0, 0)
- SpecialMesh88.Parent = Part87
- SpecialMesh88.MeshId = "rbxassetid://777155048"
- SpecialMesh88.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- SpecialMesh88.TextureId = "rbxassetid://777328045"
- SpecialMesh88.MeshType = Enum.MeshType.FileMesh
- SpecialMesh88.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
- Script89.Name = "Gore + Ragdoll"
- Script89.Parent = Tool0
- table.insert(cors,sandbox(Script89,function()
- ----------------------------------Gore + Ragdoll----------------------------------------------------------------------------
- script.Parent = nil
- script.Name = "RobloxAdvanced"
- if _G.RobloxAdvanced ~= nil then
- pcall(function() _G.RobloxAdvanced.Disable() end)
- wait(0.5)
- _G.RobloxAdvanced = nil
- wait(0.5)
- end
- _G.RobloxAdvanced = {}
- _G.RobloxAdvanced.Instance = script
- _G.RobloxAdvanced.Connections = {}
- _G.RobloxAdvanced.RagdollOnHit = true
- _G.RobloxAdvanced.DamageOnHit = true
- _G.RobloxAdvanced.CriticalHitsEnabled = false
- _G.RobloxAdvanced.RagdollOnDeath = true
- _G.RobloxAdvanced.KeepCorpses = true
- _G.RobloxAdvanced.KeepCorpsesTime = 15
- _G.RobloxAdvanced.ShowDamage = false
- _G.RobloxAdvanced.BloodEnabled = true
- _G.RobloxAdvanced.BloodGuiEnabled = true
- _G.RobloxAdvanced.DeathGuiEnabled = false
- _G.RobloxAdvanced.SpawnGuiEnabled = false
- _G.RobloxAdvanced.HUDEnabled = false
- _G.RobloxAdvanced.HUDTimeReset = function() _G.RobloxAdvanced.HUDTimeOffset = tick() end
- _G.RobloxAdvanced.HUDTimeReset()
- _G.RobloxAdvanced.HUDRemove = function()
- for _, PlayerList in pairs(game:GetService("Players"):GetChildren()) do
- pcall(function() while true do PlayerList.PlayerGui.RobloxAdvancedHUD:Remove() end end)
- end
- end
- _G.RobloxAdvanced.HUDShow = function()
- _G.RobloxAdvanced.HUDRemove()
- for _, PlayerList in pairs(game:GetService("Players"):GetChildren()) do
- _G.RobloxAdvanced.HUD(PlayerList)
- end
- end
- _G.RobloxAdvanced.Disable = function()
- _G.RobloxAdvanced.RagdollOnHit = false
- _G.RobloxAdvanced.DamageOnHit = false
- _G.RobloxAdvanced.CriticalHitsEnabled = false
- _G.RobloxAdvanced.RagdollOnDeath = false
- _G.RobloxAdvanced.KeepCorpses = false
- _G.RobloxAdvanced.ShowDamage = false
- _G.RobloxAdvanced.BloodEnabled = false
- _G.RobloxAdvanced.BloodGuiEnabled = false
- _G.RobloxAdvanced.DeathGuiEnabled = false
- _G.RobloxAdvanced.SpawnGuiEnabled = false
- _G.RobloxAdvanced.HUDEnabled = false
- _G.RobloxAdvanced.HUDRemove()
- pcall(function() _G.RobloxAdvanced.Instance.Disabled = true end)
- for _, Connection in pairs(_G.RobloxAdvanced.Connections) do
- pcall(function() Connection:disconnect() end)
- end
- end
- _G.RobloxAdvanced.MakeBlood = function()
- local Size = math.random(10, 75) / 100
- local Blood = Instance.new("Part")
- Blood.Name = "Blood"
- Blood.BrickColor = BrickColor.new("Really red")
- Blood.TopSurface = 0
- Blood.BottomSurface = 0
- Blood.FormFactor = "Custom"
- Blood.Size = Vector3.new(Size, Size, Size)
- Blood.CanCollide = false
- Instance.new("SpecialMesh", Blood).MeshType = "Sphere"
- local HasTouched = true
- coroutine.wrap(function()
- wait(0.09)
- HasTouched = false
- end)()
- table.insert(_G.RobloxAdvanced.Connections, Blood.Touched:connect(function(Hit)
- if Hit.Name ~= "Blood" and Hit.Name ~= "Blood Pool" then
- if Hit:GetMass() < 100 and math.random(1, 30) == 1 then
- Hit.BrickColor = BrickColor.new((function()
- local Color = math.random(1, 2)
- if Color == 1 then
- return "Bright red"
- elseif Color == 2 then
- return "Really red"
- end
- end)())
- end
- end
- if Blood.Name == "Blood" and Hit.Name == "Blood Pool" then
- Blood:Remove()
- elseif Blood.Name == "Blood Pool" and Hit.Name == "Blood" then
- if Blood.Size.x > math.random(5, 20) or Blood.Size.z > math.random(5, 20) then return end
- local _, C0, C1, Part1 = pcall(function() return Blood.Weld.C0, Blood.Weld.C1, Blood.Weld.Part1 end)
- Blood.Size = Blood.Size + Vector3.new(Hit.Size.x / 5, 0, Hit.Size.z / 5)
- Blood.CFrame = Part1.CFrame * C0 * C1
- if C0 ~= nil and C1 ~= nil and Part1 ~= nil then
- local Weld = Instance.new("Weld", Blood)
- Weld.Part0 = Blood
- Weld.Part1 = Part1
- Weld.C0 = C0
- Weld.C1 = C1
- end
- elseif HasTouched == false and Hit.Name ~= "Blood" then
- HasTouched = true
- local NewHit, Position = Workspace:FindPartOnRay(Ray.new(Blood.Position + Vector3.new(0, 1, 0), Vector3.new(0, -3, 0)), Blood)
- if NewHit ~= nil and NewHit.Anchored == true then
- Blood.Size = Vector3.new(Size * 2, 0.3, Size * 2)
- Blood.Name = "Blood Pool"
- Blood.CFrame = CFrame.new(Position)
- local Weld = Instance.new("Weld", Blood)
- Weld.Part0 = Blood
- Weld.Part1 = NewHit
- Weld.C0 = Blood.CFrame:inverse() * CFrame.new(Position)
- Weld.C1 = NewHit.CFrame:inverse() * CFrame.new(Position)
- else
- local Weld = Instance.new("Weld", Blood)
- Weld.Part0 = Blood
- Weld.Part1 = Hit
- Weld.C0 = Blood.CFrame:inverse() * CFrame.new(Blood.Position)
- Weld.C1 = Hit.CFrame:inverse() * CFrame.new(Blood.Position)
- end
- end
- end))
- coroutine.wrap(function()
- local Size = Blood.Size
- local Step = math.random(40, 100) / 1000
- while Blood.Transparency < 1 do
- if Blood.Name == "Blood Pool" and Size ~= Blood.Size then
- Step = 0.003
- Size = Blood.Size
- Blood.Transparency = 0
- end
- Blood.Transparency = Blood.Transparency + Step
- wait()
- end
- Blood:Remove()
- end)()
- return Blood
- end
- _G.RobloxAdvanced.HUD = function(Player)
- if _G.RobloxAdvanced.HUDEnabled == false then return end
- local PlayerGui = Player:FindFirstChild("PlayerGui")
- if PlayerGui == nil then return end
- coroutine.wrap(function()
- while _G.RobloxAdvanced.HUDEnabled == true do
- pcall(function()
- PlayerGui.HealthGUI:Remove()
- end)
- wait()
- end
- end)()
- local Gui = Instance.new("ScreenGui")
- Gui.Name = "RobloxAdvancedHUD"
- local Frame = Instance.new("Frame")
- Frame.Name = "Background"
- Frame.Size = UDim2.new(0, 500, 0, 15)
- Frame.Position = UDim2.new(0.5, (-500 / 2), 1, -15)
- Frame.BackgroundTransparency = 1
- Frame.BorderSizePixel = 0
- Frame.Parent = Gui
- local Kills = Instance.new("TextLabel")
- Kills.Name = "Kills"
- Kills.Size = UDim2.new(1 / 5, 0, 1, 0)
- Kills.Position = UDim2.new(0, 0, 0, 0)
- Kills.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
- Kills.BorderSizePixel = 1
- Kills.BorderColor3 = Color3.new(1, 1, 1)
- Kills.TextColor3 = Color3.new(1, 1, 1)
- Kills.Parent = Frame
- coroutine.wrap(function()
- while true do
- Kills.Text = "Kills: " ..(Player:FindFirstChild("RobloxAdvancedKills") ~= nil and Player.RobloxAdvancedKills.Value or 0)
- wait(0.5)
- end
- end)()
- Frame.Parent = Gui
- local Killstreak = Instance.new("TextLabel")
- Killstreak.Name = "Killstreak"
- Killstreak.Size = UDim2.new(1 / 5, 0, 1, 0)
- Killstreak.Position = UDim2.new(1 / 5, 0, 0, 0)
- Killstreak.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
- Killstreak.BorderSizePixel = 1
- Killstreak.BorderColor3 = Color3.new(1, 1, 1)
- Killstreak.TextColor3 = Color3.new(1, 1, 1)
- Killstreak.Parent = Frame
- coroutine.wrap(function()
- while true do
- Killstreak.Text = "Streak: " ..(Player:FindFirstChild("RobloxAdvancedKillstreak") ~= nil and Player.RobloxAdvancedKillstreak.Value or 0)
- wait(0.5)
- end
- end)()
- local Deaths = Instance.new("TextLabel")
- Deaths.Name = "Deaths"
- Deaths.Size = UDim2.new(1 / 5, 0, 1, 0)
- Deaths.Position = UDim2.new(1 / 5 * 2, 0, 0, 0)
- Deaths.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
- Deaths.BorderSizePixel = 1
- Deaths.BorderColor3 = Color3.new(1, 1, 1)
- Deaths.TextColor3 = Color3.new(1, 1, 1)
- Deaths.Parent = Frame
- coroutine.wrap(function()
- while true do
- Deaths.Text = "Deaths: " ..(Player:FindFirstChild("RobloxAdvancedDeaths") ~= nil and Player.RobloxAdvancedDeaths.Value or 0)
- wait(0.5)
- end
- end)()
- local Health = Instance.new("TextLabel")
- Health.Name = "Health"
- Health.Size = UDim2.new(1 / 5, 0, 1, 0)
- Health.Position = UDim2.new(1 / 5 * 3, 0, 0, 0)
- Health.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
- Health.BorderSizePixel = 1
- Health.BorderColor3 = Color3.new(1, 1, 1)
- Health.TextColor3 = Color3.new(1, 1, 1)
- Health.Parent = Frame
- coroutine.wrap(function()
- for i = 0, math.huge, 0.5 do
- if pcall(function() local _ = Player.Character.Humanoid end) == true then
- if Player.Character.Humanoid.Health == math.huge or Player.Character.Humanoid.MaxHealth == math.huge then
- Health.Text = "Invincible"
- Health.BackgroundColor3 = Color3.new(0, 0, 0.5)
- else
- Health.Text = "Health: " ..math.floor(Player.Character.Humanoid.Health).. "/" ..math.floor(Player.Character.Humanoid.MaxHealth)
- Health.BackgroundColor3 = Color3.new((1 - (Player.Character.Humanoid.Health / Player.Character.Humanoid.MaxHealth)) * 0.9, (Player.Character.Humanoid.Health / Player.Character.Humanoid.MaxHealth) * 0.5, 0)
- end
- if Player.Character:FindFirstChild("ForceField") ~= nil then
- Health.BackgroundColor3 = Color3.new(((math.sin(i) + 1) / 2), 0, 1 - ((math.sin(i) + 1) / 2))
- end
- else
- Health.Text = "Health: Nil"
- Health.BackgroundColor3 = Color3.new(0, 0, 0)
- end
- wait(0.05)
- end
- end)()
- local Time = Instance.new("TextLabel")
- Time.Name = "Time"
- Time.Size = UDim2.new(1 / 5, 0, 1, 0)
- Time.Position = UDim2.new(1 / 5 * 4, 0, 0, 0)
- Time.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
- Time.BorderSizePixel = 1
- Time.BorderColor3 = Color3.new(1, 1, 1)
- Time.TextColor3 = Color3.new(1, 1, 1)
- Time.Parent = Frame
- coroutine.wrap(function()
- while true do
- local Total = tick() - _G.RobloxAdvanced.HUDTimeOffset
- local Minutes = math.floor(Total / 60)
- local Seconds = math.floor(Total % 60)
- if string.len(Minutes) == 1 then Minutes = "0" ..Minutes end
- if string.len(Seconds) == 1 then Seconds = "0" ..Seconds end
- Time.Text = "Time: " ..Minutes.. ":" ..Seconds
- wait(0.05)
- end
- end)()
- Gui.Parent = PlayerGui
- end
- _G.RobloxAdvanced.HookPlayerDeath = function(Player)
- table.insert(_G.RobloxAdvanced.Connections, Player.Changed:connect(function(Property)
- if Property == "Character" then
- if Player.Character ~= nil then
- if _G.RobloxAdvanced.SpawnGuiEnabled == true then
- local PlayerGui = Player:FindFirstChild("PlayerGui")
- if PlayerGui == nil then return end
- local Gui = Instance.new("ScreenGui")
- Gui.Name = "Life"
- local Frame = Instance.new("Frame")
- Frame.Name = "White"
- Frame.Size = UDim2.new(2, 0, 2, 0)
- Frame.Position = UDim2.new(-0.5, 0, -0.5, 0)
- Frame.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame.BackgroundTransparency = 0
- Frame.Parent = Gui
- Gui.Parent = PlayerGui
- coroutine.wrap(function()
- wait(0.1)
- for i = 0, 1, 0.1 do
- Frame.BackgroundColor3 = Color3.new(i, i, i)
- wait()
- end
- Frame.BackgroundColor3 = Color3.new(1, 1, 1)
- wait(0.3)
- for i = 0, 1, 0.05 do
- Frame.BackgroundTransparency = i
- wait()
- end
- Gui:Remove()
- end)()
- end
- _G.RobloxAdvanced.HUD(Player)
- end
- end
- end))
- _G.RobloxAdvanced.HUD(Player)
- table.insert(_G.RobloxAdvanced.Connections, Player.Chatted:connect(function(Message)
- if string.sub(Message, 0, 5) == "lego " then Message = string.sub(Message, 6) end
- Message = Message:lower()
- if Message == "throw me" or Message == "ragdoll" then
- if Player.Character == nil then return end
- if Player.Character:FindFirstChild("Humanoid") == nil then return end
- if Player.Character:FindFirstChild("Torso") == nil then return end
- Player.Character.Humanoid.Sit = true
- _G.RobloxAdvanced.Ragdoll(true, Player.Character)
- if Message == "throw me" then
- Player.Character.Torso.Velocity = Player.Character.Torso.Velocity + (Player.Character.Torso.CFrame.lookVector * 150) + Vector3.new(0, 50, 0)
- end
- end
- end))
- end
- _G.RobloxAdvanced.HookModelDeath = function(Character)
- wait()
- if Character == nil then return end
- if Character:FindFirstChild("Humanoid") == nil then return end
- local RagdollStatus = false
- local ConnectTouched = function(Part)
- if Part.Parent ~= Character then return end
- pcall(function()
- table.insert(_G.RobloxAdvanced.Connections, Part.Touched:connect(function(Hit)
- if Hit == nil then return end
- if Hit.Parent == nil then return end
- if Hit.Parent ~= Character and Hit.Parent.Parent ~= Character and Hit:GetMass() > 3 then
- local Velocity1 = {
- math.abs(Part.Velocity.x),
- math.abs(Part.Velocity.y),
- math.abs(Part.Velocity.z)
- }
- local RotVelocity1 = {
- math.abs(Part.RotVelocity.x),
- math.abs(Part.RotVelocity.y),
- math.abs(Part.RotVelocity.z)
- }
- local Velocity2 = {
- math.abs(Hit.Velocity.x),
- math.abs(Hit.Velocity.y),
- math.abs(Hit.Velocity.z)
- }
- local RotVelocity2 = {
- math.abs(Hit.RotVelocity.x),
- math.abs(Hit.RotVelocity.y),
- math.abs(Hit.RotVelocity.z)
- }
- if RagdollStatus == false and _G.RobloxAdvanced.RagdollOnHit == true then
- for i = 1, 3 do
- local Total = math.abs(Velocity1[i] - Velocity2[i])
- if Total > math.random(85, 150) then
- RagdollStatus = true
- end
- end
- for i = 1, 3 do
- local Total = math.abs(RotVelocity1[i] - RotVelocity2[i])
- if Total > math.random(75, 100) then
- RagdollStatus = true
- end
- end
- if RagdollStatus == true then
- _G.RobloxAdvanced.Ragdoll(true, Character)
- if Character.Humanoid.PlatformStand == true or Character.Humanoid.Sit == true then
- coroutine.wrap(function()
- wait(5)
- RagdollStatus = false
- end)()
- else
- coroutine.wrap(function()
- Character.Humanoid.PlatformStand = true
- wait(1)
- Character.Humanoid.PlatformStand = false
- wait(5)
- RagdollStatus = false
- end)()
- end
- end
- end
- local Damage = 0
- for i = 1, #Velocity1 do Damage = Damage + Velocity1[i] end
- for i = 1, #RotVelocity1 do Damage = Damage + RotVelocity1[i] end
- for i = 1, #Velocity2 do Damage = Damage + Velocity2[i] end
- for i = 1, #RotVelocity2 do Damage = Damage + RotVelocity2[i] end
- Damage = Damage / 60
- if Damage >= 4 and _G.RobloxAdvanced.DamageOnHit == true then
- pcall(function() Character.Humanoid:TakeDamage(math.floor(Damage)) end)
- end
- end
- end))
- end)
- end
- for _, Part in pairs(Character:GetChildren()) do ConnectTouched(Part) end
- table.insert(_G.RobloxAdvanced.Connections, Character.ChildAdded:connect(function(Part) ConnectTouched(Part) end))
- local OldHealth = Character.Humanoid.Health
- table.insert(_G.RobloxAdvanced.Connections, Character.Humanoid.Changed:connect(function(Property)
- if Property == "Health" then
- local Source = nil
- for _, Part in pairs(Character:GetChildren()) do
- if Part:IsA("BasePart") then
- if Source == nil then
- Source = Part
- else
- if math.abs(Part.Velocity.x) + math.abs(Part.Velocity.y) + math.abs(Part.Velocity.z) > math.abs(Source.Velocity.x) + math.abs(Source.Velocity.y) + math.abs(Source.Velocity.z) then
- Source = Part
- end
- end
- end
- end
- if Source == nil then return end
- if math.abs(Character.Humanoid.Health - OldHealth) > math.abs((Character.Humanoid.Health + 0.01 * 1.05 * Character.Humanoid.MaxHealth) - Character.Humanoid.Health) and _G.RobloxAdvanced.ShowDamage == true then
- local Model = Instance.new("Model", Workspace)
- Model.Name = tostring(math.floor(Character.Humanoid.Health - OldHealth))
- Model.Name = Model.Name:sub(0, 1) ~= "-" and Model.Name.. "+" or Model.Name
- local Damage = Instance.new("Part", Model)
- Damage.Name = "Head"
- Damage.BrickColor = BrickColor.new(Model.Name:match("-") and "Really red" or "Lime green")
- if (OldHealth - Character.Humanoid.Health) / Character.Humanoid.MaxHealth > 0.25 then
- coroutine.wrap(function()
- while Damage.Parent ~= nil do
- Damage.BrickColor = BrickColor.new("New Yeller")
- wait()
- Damage.BrickColor = BrickColor.new("Really blue")
- wait()
- end
- end)()
- end
- Damage.TopSurface = 0
- Damage.BottomSurface = 0
- Damage.CanCollide = false
- Damage.FormFactor = "Custom"
- Damage.Size = (OldHealth - Character.Humanoid.Health) / Character.Humanoid.MaxHealth > 0.25 and Vector3.new(1, 1, 1) or Vector3.new(0.5, 0.5, 0.5)
- Damage.CFrame = CFrame.new(Source.Position)
- coroutine.wrap(function()
- while Damage.Parent ~= nil do
- Damage.CanCollide = false
- wait()
- end
- end)()
- local Humanoid = Instance.new("Humanoid", Model)
- Humanoid.Name = "Corpse"
- Humanoid.MaxHealth = 100
- Humanoid.Health = 0
- Humanoid.WalkSpeed = 0
- Humanoid.PlatformStand = true
- local BodyVelocity = Instance.new("BodyVelocity", Damage)
- BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
- BodyVelocity.velocity = Vector3.new(0, 7, 0)
- coroutine.wrap(function()
- wait(1)
- for i = 0, 1, 0.05 do
- Damage.Transparency = i
- BodyVelocity.velocity = Vector3.new(0, 7 * (1 - i), 0)
- wait()
- end
- Model:Remove()
- end)()
- end
- if OldHealth - Character.Humanoid.Health >= 3 then
- if _G.RobloxAdvanced.BloodEnabled == true then
- local Max = math.ceil((OldHealth - Character.Humanoid.Health) * 2)
- for i = 1, (Max > 20 and 20 or Max + 1) do
- local Blood = _G.RobloxAdvanced.MakeBlood()
- Blood.CFrame = Source.CFrame * CFrame.new(math.random(-2, 2), math.random(-2, 2), math.random(-2, 2))
- Blood.Velocity = (Blood.Position - Source.Position).unit * math.random(5, 25)
- Blood.Parent = Workspace
- end
- end
- local Player = game:GetService("Players"):GetPlayerFromCharacter(Character)
- if Player ~= nil and _G.RobloxAdvanced.BloodGuiEnabled == true then
- local PlayerGui = Player:FindFirstChild("PlayerGui")
- if PlayerGui == nil then PlayerGui = Instance.new("PlayerGui", Player) end
- if PlayerGui:FindFirstChild("Pain") ~= nil then PlayerGui.Pain:Remove() end
- local Gui = Instance.new("ScreenGui")
- Gui.Name = "Pain"
- local Frame = Instance.new("Frame")
- Frame.Name = "Red"
- Frame.Size = UDim2.new(2, 0, 2, 0)
- Frame.Position = UDim2.new(-0.5, 0, -0.5, 0)
- Frame.BackgroundColor3 = Color3.new(1, 0, 0)
- Frame.BackgroundTransparency = (math.abs(OldHealth - Character.Humanoid.Health) / Character.Humanoid.MaxHealth) * 1.2
- Frame.Parent = Gui
- Gui.Parent = PlayerGui
- coroutine.wrap(function()
- for i = Frame.BackgroundTransparency, 1, 0.05 do
- Frame.BackgroundTransparency = i
- wait()
- end
- Gui:Remove()
- end)()
- end
- end
- if (OldHealth - Character.Humanoid.Health) / Character.Humanoid.MaxHealth > 0.25 and _G.RobloxAdvanced.CriticalHitsEnabled == true and Character.Humanoid.Health > 0 and RagdollStatus == false then
- RagdollStatus = true
- _G.RobloxAdvanced.Ragdoll(true, Character)
- Character.Humanoid.PlatformStand = true
- local Sound = Instance.new("Sound", Character.Torso)
- Sound.SoundId = "http://www.roblox.com/Asset/?id=2801263"
- Sound.Volume = 1
- Sound.Pitch = math.random(500, 700) / 1000
- Sound:Play()
- local Player = game:GetService("Players"):GetPlayerFromCharacter(Character)
- if Player ~= nil then
- local PlayerGui = Player:FindFirstChild("PlayerGui")
- if PlayerGui == nil then return end
- if PlayerGui:FindFirstChild("Pain") ~= nil then PlayerGui.Pain:Remove() end
- if PlayerGui:FindFirstChild("Critical Hit") ~= nil then PlayerGui.Pain:Remove() end
- local Gui = Instance.new("ScreenGui", PlayerGui)
- Gui.Name = "Critical Hit"
- local Frame = Instance.new("Frame", Gui)
- Frame.Name = "Yellow"
- Frame.Size = UDim2.new(2, 0, 2, 0)
- Frame.Position = UDim2.new(-0.5, 0, -0.5, 0)
- Frame.BackgroundColor3 = Color3.new(0.9, 0.9, 0)
- Frame.BackgroundTransparency = 0
- coroutine.wrap(function()
- for i = 0, 1, 0.01 do
- Frame.BackgroundTransparency = i
- wait()
- end
- Gui:Remove()
- end)()
- for i = 1, 5 do
- local Label = Instance.new("TextLabel", Frame)
- Label.Name = "Notification"
- Label.Position = UDim2.new(0.5, 0, 0.5, 0)
- Label.Text = "CRITICAL HIT"
- Label.FontSize = "Size18"
- Label.TextColor3 = Color3.new(1, 0.5, 0)
- Label.TextTransparency = 0
- coroutine.wrap(function()
- while Label.Parent ~= nil do
- Label.Position = UDim2.new(0.5, math.random(-25, 25), 0.5, math.random(-25, 25))
- Label.FontSize = "Size" ..tostring((function()
- local Size = math.random(1, 5)
- if Size == 1 then
- return 14
- elseif Size == 2 then
- return 18
- elseif Size == 3 then
- return 24
- elseif Size == 4 then
- return 36
- elseif Size == 5 then
- return 48
- end
- end)())
- wait()
- end
- end)()
- coroutine.wrap(function()
- for i = 0.01, 1, 0.05 do
- Label.TextTransparency = i
- wait()
- end
- end)()
- end
- end
- coroutine.wrap(function()
- wait(3)
- Character.Humanoid.PlatformStand = false
- wait(5)
- RagdollStatus = false
- end)()
- end
- OldHealth = Character.Humanoid.Health
- end
- end))
- table.insert(_G.RobloxAdvanced.Connections, Character.Humanoid.Died:connect(function()
- local Humanoid = Character:FindFirstChild("Humanoid")
- if Humanoid == nil then return end
- local Player = game:GetService("Players"):GetPlayerFromCharacter(Character)
- local Killer = nil
- if Humanoid:FindFirstChild("creator") ~= nil then
- Killer = Humanoid.creator.Value
- end
- if Killer ~= nil then
- if Killer:FindFirstChild("RobloxAdvancedKills") == nil then
- Instance.new("IntValue", Killer).Name = "RobloxAdvancedKills"
- end
- if Killer:FindFirstChild("RobloxAdvancedKillstreak") == nil then
- Instance.new("IntValue", Killer).Name = "RobloxAdvancedKillstreak"
- end
- if Player ~= nil and Player.Neutral == false and Killer.Neutral == false and Player.TeamColor == Killer.TeamColor then
- Killer.RobloxAdvancedKills.Value = Killer.RobloxAdvancedKills.Value - 2
- Killer.RobloxAdvancedKillstreak.Value = 0
- else
- Killer.RobloxAdvancedKills.Value = Killer.RobloxAdvancedKills.Value + 1
- Killer.RobloxAdvancedKillstreak.Value = Killer.RobloxAdvancedKillstreak.Value + 1
- end
- end
- if Player ~= nil then
- if Player:FindFirstChild("RobloxAdvancedDeaths") == nil then
- Instance.new("IntValue", Player).Name = "RobloxAdvancedDeaths"
- end
- if Player:FindFirstChild("RobloxAdvancedKillstreak") == nil then
- Instance.new("IntValue", Player).Name = "RobloxAdvancedKillstreak"
- end
- Player.RobloxAdvancedDeaths.Value = Player.RobloxAdvancedDeaths.Value + 1
- Player.RobloxAdvancedKillstreak.Value = 0
- end
- if _G.RobloxAdvanced.RagdollOnDeath == true then
- _G.RobloxAdvanced.Ragdoll(true, Character, true)
- end
- coroutine.wrap(function()
- if _G.RobloxAdvanced.DeathGuiEnabled == false then return end
- if Player == nil then return end
- local PlayerGui = Player:FindFirstChild("PlayerGui")
- if PlayerGui == nil then return end
- local Gui = Instance.new("ScreenGui")
- Gui.Name = "Death"
- local Frame = Instance.new("Frame")
- Frame.Name = "Black"
- Frame.Size = UDim2.new(2, 0, 2, 0)
- Frame.Position = UDim2.new(-0.5, 0, -0.5, 0)
- Frame.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame.BackgroundTransparency = 1
- Frame.Parent = Gui
- local Label = Instance.new("TextLabel")
- Label.Name = "Notification"
- Label.Position = UDim2.new(0.5, 0, 0.5, 0)
- if Killer ~= nil then
- if Killer == Player then
- Label.Text = "You have killed yourself."
- else
- Label.Text = "You have been killed by " ..Killer.Name.. "."
- end
- else
- Label.Text = "You have died."
- end
- Label.FontSize = "Size24"
- Label.TextColor3 = Color3.new(1, 0.5, 0)
- Label.TextTransparency = 1
- Label.Parent = Frame
- Gui.Parent = PlayerGui
- wait(0.5)
- for i = 1, 0, -0.05 do
- Label.TextTransparency = i
- wait()
- end
- Label.BackgroundTransparency = 0
- wait(0.5)
- for i = 1, 0, -0.025 do
- Frame.BackgroundTransparency = i
- wait()
- end
- Frame.BackgroundTransparency = 0
- wait(0.5)
- for i = 0, 1, 0.05 do
- Label.TextTransparency = i
- wait()
- end
- Label.BackgroundTransparency = 1
- end)()
- wait(4.5)
- if Character == nil or _G.RobloxAdvanced.KeepCorpses == false then return end
- if Character.Parent == nil then return end
- local ReweldNeck = false
- if Character:FindFirstChild("Torso") ~= nil then
- if Character.Torso:FindFirstChild("Neck") ~= nil then
- ReweldNeck = true
- end
- end
- local Model = Instance.new("Model", Workspace)
- Model.Name = Character.Name.. "'s Corpse"
- for _, Part in pairs(Character:GetChildren()) do
- if Part.ClassName == "CharacterMesh" or Part:IsA("Clothing") or Part.ClassName == "ShirtGraphic" then
- Part:Clone().Parent = Model
- end
- for _, Part2 in pairs(Part:GetChildren()) do
- if Part2.ClassName == "Sound" then
- Part2.SoundId = ""
- Part2.Looped = false
- Part2.PlayOnRemove = false
- Part2.Volume = 0
- Part2.Pitch = 0
- Part2:Stop()
- end
- end
- if Part.ClassName == "Part" then
- pcall(function()
- Part.Parent = Model
- Part.CanCollide = true
- end)
- end
- end
- local Humanoid = Instance.new("Humanoid")
- Humanoid.Name = "Corpse"
- Humanoid.Health = 0
- Humanoid.WalkSpeed = 0
- Humanoid.PlatformStand = true
- Humanoid.Parent = Model
- if ReweldNeck == true then
- local Neck = Instance.new("Weld")
- Neck.Part0 = Torso
- Neck.Part1 = Head
- Neck.C0 = CFrame.new(0, 1.5, 0)
- Neck.Parent = Torso
- end
- game:GetService("Debris"):AddItem(Model, _G.RobloxAdvanced.KeepCorpsesTime)
- end))
- table.insert(_G.RobloxAdvanced.Connections, Character.Humanoid.FallingDown:connect(function() _G.RobloxAdvanced.Ragdoll(true, Character) end))
- table.insert(_G.RobloxAdvanced.Connections, Character.Humanoid.GettingUp:connect(function() _G.RobloxAdvanced.Ragdoll(false, Character) end))
- coroutine.wrap(function()
- local function RemoveLimb(Name)
- if Character:FindFirstChild(Name) == nil then return false end
- local Model = Instance.new("Model")
- Model.Name = "Decapitated Limb"
- for _, Part in pairs(Character:GetChildren()) do
- if Part.ClassName == "CharacterMesh" or Part:IsA("Clothing") then
- Part:Clone().Parent = Model
- end
- if Part.Name == Name then
- pcall(function()
- Part.Parent = Model
- Part.CanCollide = true
- Part:BreakJoints()
- end)
- end
- end
- local Humanoid = Instance.new("Humanoid")
- Humanoid.Name = "Corpse"
- Humanoid.Health = 0
- Humanoid.MaxHealth = 0
- Humanoid.WalkSpeed = 0
- Humanoid.PlatformStand = true
- Humanoid.Parent = Model
- Model.Parent = Workspace
- game:GetService("Debris"):AddItem(Model, _G.RobloxAdvanced.KeepCorpsesTime)
- return true, Model
- end
- while true do
- if Character.Parent == nil then break end
- if Character:FindFirstChild("Torso") == nil then break end
- if Character:FindFirstChild("Humanoid") == nil then break end
- if Character.Torso:FindFirstChild("Left Shoulder") == nil and Character.Torso:FindFirstChild("LeftShoulder") == nil and Character.Torso:FindFirstChild("Left Shoulder 2") == nil then
- local Blood = _G.RobloxAdvanced.MakeBlood()
- Blood.CFrame = Character.Torso.CFrame * CFrame.new(-1.2, 0.5, 0)
- Blood.Velocity = (Blood.Position - (Character.Torso.CFrame * CFrame.new(0, 0.5, 0)).p).unit * math.random(10, 25)
- Blood.Parent = _G.RobloxAdvanced.BloodEnabled == true and Workspace
- if Character:FindFirstChild("Humanoid") ~= nil then Character.Humanoid:TakeDamage(0.25) end
- if Character:FindFirstChild("Left Arm") ~= nil then RemoveLimb("Left Arm") end
- end
- if Character.Torso:FindFirstChild("Right Shoulder") == nil and Character.Torso:FindFirstChild("RightShoulder") == nil and Character.Torso:FindFirstChild("Right Shoulder 2") == nil then
- local Blood = _G.RobloxAdvanced.MakeBlood()
- Blood.CFrame = Character.Torso.CFrame * CFrame.new(1.2, 0.5, 0)
- Blood.Velocity = (Blood.Position - (Character.Torso.CFrame * CFrame.new(0, 0.5, 0)).p).unit * math.random(10, 25)
- Blood.Parent = _G.RobloxAdvanced.BloodEnabled == true and Workspace
- if Character:FindFirstChild("Humanoid") ~= nil then Character.Humanoid:TakeDamage(0.25) end
- if Character:FindFirstChild("Right Arm") ~= nil then RemoveLimb("Right Arm") end
- end
- if Character.Torso:FindFirstChild("Left Hip") == nil and Character.Torso:FindFirstChild("LeftHip") == nil and Character.Torso:FindFirstChild("Left Hip 2") == nil then
- local Blood = _G.RobloxAdvanced.MakeBlood()
- Blood.CFrame = Character.Torso.CFrame * CFrame.new(-0.5, -1.2, 0)
- Blood.Velocity = (Blood.Position - (Character.Torso.CFrame * CFrame.new(-0.5, 0, 0)).p).unit * math.random(4, 8)
- Blood.Parent = _G.RobloxAdvanced.BloodEnabled == true and Workspace
- if Character:FindFirstChild("Humanoid") ~= nil then Character.Humanoid:TakeDamage(0.25) end
- if Character:FindFirstChild("Left Leg") ~= nil then RemoveLimb("Left Leg") end
- end
- if Character.Torso:FindFirstChild("Right Hip") == nil and Character.Torso:FindFirstChild("RightHip") == nil and Character.Torso:FindFirstChild("Right Hip 2") == nil then
- local Blood = _G.RobloxAdvanced.MakeBlood()
- Blood.CFrame = Character.Torso.CFrame * CFrame.new(0.5, -1.2, 0)
- Blood.Velocity = (Blood.Position - (Character.Torso.CFrame * CFrame.new(0.5, 0, 0)).p).unit * math.random(4, 80)
- Blood.Parent = _G.RobloxAdvanced.BloodEnabled == true and Workspace
- if Character:FindFirstChild("Humanoid") ~= nil then Character.Humanoid:TakeDamage(0.25) end
- if Character:FindFirstChild("Right Leg") ~= nil then RemoveLimb("Right Leg") end
- end
- if Character.Torso:FindFirstChild("Neck") == nil then
- local Blood = _G.RobloxAdvanced.MakeBlood()
- Blood.CFrame = Character.Torso.CFrame * CFrame.new(0, 1, 0)
- Blood.Velocity = (Blood.Position - Character.Torso.Position).unit * math.random(25, 75)
- Blood.Parent = _G.RobloxAdvanced.BloodEnabled == true and Workspace
- if Character:FindFirstChild("Head") ~= nil then
- local Blood = _G.RobloxAdvanced.MakeBlood()
- Blood.CFrame = Character.Head.CFrame * CFrame.new(0, -0.5, 0)
- Blood.Velocity = (Blood.Position - Character.Head.Position).unit * math.random(5, 25)
- Blood.Parent = Workspace
- end
- end
- wait(0.11)
- end
- end)()
- end
- _G.RobloxAdvanced.Ragdoll = function(Format, Character, Force)
- if Force ~= true then
- if Character:FindFirstChild("Ragdoll") ~= nil and Format == true then return false end
- if Character:FindFirstChild("Ragdoll") == nil and Format == false then return false end
- end
- local Head = nil
- local Torso = nil
- local Humanoid = nil
- local Dead = false
- for _, Children in pairs(Character:GetChildren()) do
- if Children.ClassName == "ForceField" then Children:Remove() end
- if Children.Name == "" then Children:Remove() end
- if Children.Name == "Head" then Head = Children end
- if Children.Name == "Torso" then Torso = Children end
- if Children.ClassName == "Humanoid" then Humanoid = Children end
- if Children:IsA("Accoutrement") then
- if Children:FindFirstChild("Handle") ~= nil then
- if math.random(1, 3) == 1 then
- coroutine.wrap(function()
- Children.Parent = Workspace
- wait()
- Children.Parent = Character
- Children.Handle.CanCollide = true
- end)()
- else
- Children.Parent = Workspace
- Children.Handle.CanCollide = true
- end
- else
- Children:Remove()
- end
- end
- end
- if Humanoid ~= nil then
- if Humanoid.Health <= 0 then
- Dead = true
- end
- end
- if Torso ~= nil then
- for _, Children2 in pairs(Torso:GetChildren()) do
- if Children2:IsA("JointInstance") then
- Children2:Remove()
- end
- end
- end
- if Head ~= nil and (function()
- if Dead == true and math.random(1, 2) == 1 then
- return true
- else
- return false
- end
- end)() == false then
- local Neck = Instance.new("Motor6D")
- Neck.Name = "Neck"
- Neck.Part0 = Torso
- Neck.Part1 = Head
- Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180))
- Neck.C1 = CFrame.new(0, -0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180))
- Neck.MaxVelocity = 0.1
- Neck.Parent = Torso
- end
- if Format == true then
- local Ragdoll = Instance.new("IntValue")
- Ragdoll.Name = "Ragdoll"
- Ragdoll.Parent = Character
- if Torso ~= nil then
- Torso.Velocity = Torso.Velocity / 1.25
- Torso.RotVelocity = (Torso.RotVelocity / 1.25) + Vector3.new(math.random(-25, 25), math.random(-25, 25), math.random(-25, 25))
- if Dead == true then
- if Humanoid ~= nil then
- local Humanoid2 = Humanoid:Clone()
- wait()
- Humanoid:Remove()
- Humanoid2.Parent = Character
- Humanoid = Humanoid2
- end
- end
- local Limb = Character:FindFirstChild("Right Arm")
- if Limb ~= nil then
- Limb.Velocity = Torso.Velocity
- Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "RightShoulder"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.Parent = Torso
- local Weight = Instance.new("Part")
- Weight.Name = ""
- Weight.TopSurface = 0
- Weight.BottomSurface = 0
- Weight.Shape = "Block"
- Weight.FormFactor = "Custom"
- Weight.Size = Vector3.new(1, 1, 1)
- Weight.Transparency = 1
- Weight.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- Weight.Parent = Character
- local Weld = Instance.new("Weld")
- Weld.Part0 = Limb
- Weld.Part1 = Weight
- Weld.C0 = CFrame.new(0, -0.5, 0)
- Weld.Parent = Limb
- end
- local Limb = Character:FindFirstChild("Left Arm")
- if Limb then
- Limb.Velocity = Torso.Velocity
- Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "LeftShoulder"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.Parent = Torso
- local Weight = Instance.new("Part")
- Weight.Name = ""
- Weight.TopSurface = 0
- Weight.BottomSurface = 0
- Weight.Shape = "Block"
- Weight.FormFactor = "Custom"
- Weight.Size = Vector3.new(1, 1, 1)
- Weight.Transparency = 1
- Weight.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- Weight.Parent = Character
- local Weld = Instance.new("Weld")
- Weld.Part0 = Limb
- Weld.Part1 = Weight
- Weld.C0 = CFrame.new(0, -0.5, 0)
- Weld.Parent = Limb
- end
- local Limb = Character:FindFirstChild("Right Leg")
- if Limb then
- Limb.Velocity = Torso.Velocity
- Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "RightHip"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.Parent = Torso
- local Weight = Instance.new("Part")
- Weight.Name = ""
- Weight.TopSurface = 0
- Weight.BottomSurface = 0
- Weight.Shape = "Block"
- Weight.FormFactor = "Custom"
- Weight.Size = Vector3.new(1, 1, 1)
- Weight.Transparency = 1
- Weight.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- Weight.Parent = Character
- local Weld = Instance.new("Weld")
- Weld.Part0 = Limb
- Weld.Part1 = Weight
- Weld.C0 = CFrame.new(0, -0.5, 0)
- Weld.Parent = Limb
- end
- local Limb = Character:FindFirstChild("Left Leg")
- if Limb then
- Limb.Velocity = Torso.Velocity
- Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "LeftHip"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.Parent = Torso
- local Weight = Instance.new("Part")
- Weight.Name = ""
- Weight.TopSurface = 0
- Weight.BottomSurface = 0
- Weight.Shape = "Block"
- Weight.FormFactor = "Custom"
- Weight.Size = Vector3.new(1, 1, 1)
- Weight.Transparency = 1
- Weight.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- Weight.Parent = Character
- local Weld = Instance.new("Weld")
- Weld.Part0 = Limb
- Weld.Part1 = Weight
- Weld.C0 = CFrame.new(0, -0.5, 0)
- Weld.Parent = Limb
- end
- local Weight = Instance.new("Part")
- Weight.Name = ""
- Weight.TopSurface = 0
- Weight.BottomSurface = 0
- Weight.Shape = "Block"
- Weight.FormFactor = "Custom"
- Weight.Size = Vector3.new(1.75, 1.5, 1.1)
- Weight.Transparency = 1
- Weight.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
- Weight.Parent = Character
- local Weld = Instance.new("Weld")
- Weld.Part0 = Torso
- Weld.Part1 = Weight
- Weld.C0 = CFrame.new(0, 0.5, 0)
- Weld.Parent = Torso
- end
- elseif Format == false then
- if Character:FindFirstChild("Ragdoll") ~= nil then Character.Ragdoll:Remove() end
- if Torso ~= nil then
- local Limb = Character:FindFirstChild("Right Arm")
- if Limb ~= nil then
- local Joint = Instance.new("Motor6D")
- Joint.Name = "Right Shoulder"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
- Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
- Joint.MaxVelocity = 0.15
- Joint.Parent = Torso
- end
- local Limb = Character:FindFirstChild("Left Arm")
- if Limb ~= nil then
- local Joint = Instance.new("Motor6D")
- Joint.Name = "Left Shoulder"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
- Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
- Joint.MaxVelocity = 0.15
- Joint.Parent = Torso
- end
- local Limb = Character:FindFirstChild("Right Leg")
- if Limb ~= nil then
- local Joint = Instance.new("Motor6D")
- Joint.Name = "Right Hip"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
- Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
- Joint.MaxVelocity = 0.1
- Joint.Parent = Torso
- end
- local Limb = Character:FindFirstChild("Left Leg")
- if Limb ~= nil then
- local Joint = Instance.new("Motor6D")
- Joint.Name = "Left Hip"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
- Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
- Joint.MaxVelocity = 0.1
- Joint.Parent = Torso
- end
- local Animate = Character:FindFirstChild("Animate")
- if Animate ~= nil then
- local Animate2 = Animate:Clone()
- Animate:Remove()
- Animate2.Parent = Character
- end
- end
- else
- return false
- end
- return true, Format
- end
- table.insert(_G.RobloxAdvanced.Connections, Workspace.DescendantAdded:connect(_G.RobloxAdvanced.HookModelDeath))
- table.insert(_G.RobloxAdvanced.Connections, game:GetService("Players").PlayerAdded:connect(_G.RobloxAdvanced.HookPlayerDeath))
- for _, Players in pairs(game:GetService("Players"):GetPlayers()) do
- _G.RobloxAdvanced.HookPlayerDeath(Players)
- end
- for _, Children in pairs(Workspace:GetChildren()) do
- _G.RobloxAdvanced.HookModelDeath(Children)
- end
- end))
- Script90.Name = "BloodScript"
- Script90.Parent = Tool0
- table.insert(cors,sandbox(Script90,function()
- function onPlayerDied(dead)
- local h = script.Parent.Humanoid
- if (h.Health==0) then
- local head = script.Parent.Head
- local blood1 = Instance.new("Part")
- blood1.BrickColor = BrickColor.new(21)
- blood1.formFactor = 2
- blood1.Size = Vector3.new(1, 0.4, 1)
- blood1.Position = head.Position
- blood1.Name = "Blood"
- blood1.Parent = script.Parent
- local blood2 = Instance.new("Part")
- blood2.BrickColor = BrickColor.new(21)
- blood2.formFactor = 2
- blood2.Size = Vector3.new(1, 0.4, 1)
- blood2.Position = head.Position
- blood2.Name = "Blood"
- blood2.Parent = script.Parent
- local blood3 = Instance.new("Part")
- blood3.BrickColor = BrickColor.new(21)
- blood3.formFactor = 2
- blood3.Size = Vector3.new(1, 0.4, 1)
- blood3.Position = head.Position
- blood3.Name = "Blood"
- blood3.Parent = script.Parent
- local blood4 = Instance.new("Part")
- blood4.BrickColor = BrickColor.new(21)
- blood4.formFactor = 2
- blood4.Size = Vector3.new(1, 0.4, 1)
- blood4.Position = head.Position
- blood4.Name = "Blood"
- blood4.Parent = script.Parent
- end
- end
- script.Parent.Humanoid.Died:connect(onPlayerDied)
- end))
- Script91.Name = "Ragdoll"
- Script91.Parent = Tool0
- table.insert(cors,sandbox(Script91,function()
- print("Hello world!")
- Character = script.Parent
- Humanoid = Character.Humanoid
- Torso = Character.Torso
- function OnDeath()
- print("Death")
- Humanoid.Parent = nil
- if Torso then
- local Head = Character:FindFirstChild("Head")
- if Head then
- local Neck = Instance.new("Weld")
- Neck.Name = "Neck"
- Neck.Part0 = Torso
- Neck.Part1 = Head
- Neck.C0 = CFrame.new(0, 1.5, 0)
- Neck.C1 = CFrame.new()
- Neck.Parent = Torso
- end
- local Limb = Character:FindFirstChild("Right Arm")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "RightShoulder"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = Character:FindFirstChild("Left Arm")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "LeftShoulder"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = Character:FindFirstChild("Right Leg")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "RightHip"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = Character:FindFirstChild("Left Leg")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "LeftHip"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- --[
- local Bar = Instance.new("Part")
- Bar.TopSurface = 0
- Bar.BottomSurface = 0
- Bar.formFactor = "Symmetric"
- Bar.Size = Vector3.new(1, 1, 1)
- Bar.Transparency = 1
- Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
- Bar.Parent = Character
- local Weld = Instance.new("Weld")
- Weld.Part0 = Torso
- Weld.Part1 = Bar
- Weld.C0 = CFrame.new(0, 0.5, 0)
- Weld.Parent = Torso
- --]]
- end
- end
- Humanoid.Died:connect(OnDeath)
- end))
- Script92.Name = "RagdollInitializer"
- Script92.Parent = Tool0
- table.insert(cors,sandbox(Script92,function()
- print("Bouyer's Ragdoll Physics Loaded")
- function OnEntered(Player)
- while Player.Character == nil do -- Notice it does not use break.
- wait()
- end
- wait(1)
- Player.Changed:connect(function(Property)
- if Property == "Character" then
- if Player.Character then
- local Mods = script:GetChildren()
- for X = 1, # Mods do
- if Mods[X].className == "Script" or Mods[X].className == "LocalScript" then
- local S = Mods[X]:Clone()
- S.Disabled = false
- S.Parent = Player.Character
- end
- end
- end
- end
- end)
- local Mods = script:GetChildren()
- for X = 1, # Mods do
- if Mods[X].className == "Script" or Mods[X].className == "LocalScript" then
- local S = Mods[X]:Clone()
- S.Disabled = false
- S.Parent = Player.Character
- end
- end
- end
- game.Players.ChildAdded:connect(OnEntered)
- end))
- Script93.Name = "Ragdoll"
- Script93.Parent = Script92
- table.insert(cors,sandbox(Script93,function()
- print("Hello world!")
- Character = script.Parent
- Humanoid = Character.Humanoid
- Torso = Character.Torso
- function OnDeath()
- print("Death")
- Humanoid.Parent = nil
- if Torso then
- local Head = Character:FindFirstChild("Head")
- if Head then
- local Neck = Instance.new("Weld")
- Neck.Name = "Neck"
- Neck.Part0 = Torso
- Neck.Part1 = Head
- Neck.C0 = CFrame.new(0, 1.5, 0)
- Neck.C1 = CFrame.new()
- Neck.Parent = Torso
- end
- local Limb = Character:FindFirstChild("Right Arm")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "RightShoulder"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = Character:FindFirstChild("Left Arm")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "LeftShoulder"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = Character:FindFirstChild("Right Leg")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "RightHip"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = Character:FindFirstChild("Left Leg")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "LeftHip"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- --[
- local Bar = Instance.new("Part")
- Bar.TopSurface = 0
- Bar.BottomSurface = 0
- Bar.formFactor = "Symmetric"
- Bar.Size = Vector3.new(1, 1, 1)
- Bar.Transparency = 1
- Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
- Bar.Parent = Character
- local Weld = Instance.new("Weld")
- Weld.Part0 = Torso
- Weld.Part1 = Bar
- Weld.C0 = CFrame.new(0, 0.5, 0)
- Weld.Parent = Torso
- --]]
- end
- end
- Humanoid.Died:connect(OnDeath)
- end))
- NumberValue94.Name = "Ammo"
- NumberValue94.Parent = Tool0
- NumberValue94.Value = 10000
- NumberValue95.Name = "BulletSpeed"
- NumberValue95.Parent = Tool0
- NumberValue95.Value = 800
- StringValue96.Name = "BulletType"
- StringValue96.Parent = Tool0
- StringValue96.Value = "5.45x39mm"
- NumberValue97.Name = "GLAmmo"
- NumberValue97.Parent = Tool0
- NumberValue97.Value = 10000
- StringValue98.Name = "GName"
- StringValue98.Parent = Tool0
- StringValue98.Value = "AK74m"
- NumberValue99.Name = "MagSize"
- NumberValue99.Parent = Tool0
- NumberValue99.Value = 30
- NumberValue100.Name = "Mags"
- NumberValue100.Parent = Tool0
- NumberValue100.Value = 90
- NumberValue101.Name = "RPM"
- NumberValue101.Parent = Tool0
- NumberValue101.Value = 545
- StringValue102.Name = "Type"
- StringValue102.Parent = Tool0
- StringValue102.Value = "Primary"
- Script103.Name = "Weld"
- Script103.Parent = Tool0
- table.insert(cors,sandbox(Script103,function()
- function Weld(x,y,Name)
- local W = Instance.new("Weld")
- W.Name = Name
- W.Part0 = x
- W.Part1 = y
- local CJ = CFrame.new(x.Position)
- local C0 = x.CFrame:inverse()*CJ
- local C1 = y.CFrame:inverse()*CJ
- W.C0 = C0
- W.C1 = C1
- W.Parent = x
- end
- function Get(A)
- if A.Name == "Slide" then
- Weld(script.Parent.Handle, A,"Slide")
- A.Anchored = false
- elseif A.className == "Part" or A.className == "UnionOperation" or A.className == "MeshPart" and not A.Name == "Bolt" then
- Weld(script.Parent.Handle, A,"Weld")
- A.Anchored = false
- else
- local C = A:GetChildren()
- for i=1, #C do
- Get(C[i])
- end
- end
- end
- function Finale()
- Get(script.Parent)
- end
- Finale()
- end))
- LocalScript104.Parent = Tool0
- table.insert(cors,sandbox(LocalScript104,function()
- wait(1)
- --Warning if You removed this,You're head wont follow to the Camera, I made it seperately cuz to prevent lag(Hope so)
- local Player = game.Players.LocalPlayer
- local Character = Player.Character
- local Humanoid = Character.Humanoid
- local Mouse = Player:GetMouse()
- local Tool = script.Parent
- local Camera = game.Workspace.CurrentCamera
- local Equipped = false
- local RA = Character:WaitForChild("Right Arm")
- local LA = Character:WaitForChild("Left Arm")
- local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
- local Torso = Character:WaitForChild("Torso")
- local Neck = Torso["Neck"]
- local FRA
- local FLA
- local FRW
- local FLW
- function MakeArmModel()
- arms = Instance.new("Model", Camera)
- arms.Name = "Arms"
- end
- function RemoveArmModel()
- arms:Destroy()
- end
- -- Making the FakeArms
- function MakeFakeArms()
- FRA = RA:clone()
- FRA.Parent = arms
- FRA.Name = "Right Arm"
- FRA.FormFactor = "Custom"
- FRA.Size = Vector3.new(0.6,1.9,0.6)
- FRA.Transparency = 0
- FRA.Anchored = false
- FRW = Instance.new("Motor6D")
- FRW.Part0 = FRA
- FRW.Part1 = RA
- FRW.Parent = FRA
- FRW.C0 = CFrame.new(0.2,0,0.2)
- FRW.C1 = CFrame.new()
- FLA = LA:clone()
- FLA.Parent = arms
- FLA.Name = "Left Arm"
- FLA.FormFactor = "Custom"
- FLA.Size = Vector3.new(0.6,1.9,0.6)
- FLA.Transparency = 0
- FLA.Anchored = false
- FLW = Instance.new("Motor6D")
- FLW.Part0 = FLA
- FLW.Part1 = LA
- FLW.Parent = FLA
- FLW.C0 = CFrame.new(-0.2,0,0.2)
- FLW.C1 = CFrame.new()
- end
- function RemoveFakeArms()
- FRA:Destroy()
- FLA:Destroy()
- end
- -- Making Arm Model Stuff
- function MakeArmStuff()
- local Human = Instance.new("Humanoid")
- Human.MaxHealth = 0
- Human.Health = 0
- Human.Name = ""
- Human.Parent = arms
- local newShirt = Character:WaitForChild("Shirt"):clone()
- newShirt.Parent = arms
- end
- Tool.Equipped:connect(function()
- Equipped = true
- MakeArmModel()
- MakeFakeArms()
- MakeArmStuff()
- game:GetService("RunService").RenderStepped:connect(function()
- if Equipped then
- local HRPCF = HumanoidRootPart.CFrame * CFrame.new(0, 1.5, 0)* CFrame.new(Humanoid.CameraOffset)
- Neck.C0 = Torso.CFrame:toObjectSpace(HRPCF)
- Neck.C1 = CFrame.Angles(-math.asin(Camera.CoordinateFrame.lookVector.y), 0, 0)
- end
- end)
- end)
- Tool.Unequipped:connect(function()
- Equipped = false
- RemoveArmModel()
- RemoveFakeArms()
- Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- end)
- end))
- LocalScript105.Parent = Tool0
- table.insert(cors,sandbox(LocalScript105,function()
- repeat wait() until game.Players.LocalPlayer.Character
- repeat wait(1) until game.Players.LocalPlayer.Character:IsDescendantOf(game.Workspace)
- wait(4 / 20)
- local Player = game.Players.LocalPlayer
- local player = game.Players.LocalPlayer
- local Character = Player.Character
- local char = Player.Character
- local Humanoid = Character.Humanoid
- local Mouse = Player:GetMouse()
- local mouse = Player:GetMouse()
- local Camera = game.Workspace.CurrentCamera
- local HumanoidRootPart = Character.HumanoidRootPart
- local Torso = Character.Torso
- local Neck = Torso:WaitForChild("Neck")
- game.Players.LocalPlayer.CameraMaxZoomDistance = 15
- game.Players.LocalPlayer.CameraMinZoomDistance = 0
- local NightVision = false
- local AltPressed = false
- local Stances = 0
- _G.SteadyStance = false
- _G.LeanR = 0
- _G.LeanL = 0
- local RAW
- local LAW
- ----------------
- local RootPart = char:WaitForChild("HumanoidRootPart")
- local RootJoint = RootPart.RootJoint
- RootJoint.C0 = CFrame.new()
- RootJoint.C1 = CFrame.new()
- local Aiming = false
- local ZoomDistance = 40
- local NV
- ----------------
- ---------------------------------------------------------------------------------------
- ---------------- [ Tween Module ] --------------------------------------------------------
- ---------------------------------------------------------------------------------------
- --[[
- tweenJoint Function Parameters:
- Object Joint - This has to be a weld with a C0 and C1 property
- CFrame newC0 - This is what the new C0 of the weld will be. You can put nil if you don't want to effect the C0
- CFrame newC1 - This is what the new C1 of the weld will be. You can put nil if you don't want to effect the C1
- function Alpha - This is an alpha function that takes an input parameter of a number between 0 and 90 and returns a number between 0 and 1.
- For example, function(X) return math.sin(math.rad(X)) end
- float Duration - This is how long the tweening takes to complete
- --]]
- local RS = game:GetService("RunService")
- function tweenJoint(Joint, newC0, newC1, Alpha, Duration)
- spawn(function()
- local newCode = math.random(-1e9, 1e9) --This creates a random code between -1000000000 and 1000000000
- local tweenIndicator = nil
- if (not Joint:findFirstChild("tweenCode")) then --If the joint isn't being tweened, then
- tweenIndicator = Instance.new("IntValue")
- tweenIndicator.Name = "tweenCode"
- tweenIndicator.Value = newCode
- tweenIndicator.Parent = Joint
- else
- tweenIndicator = Joint.tweenCode
- tweenIndicator.Value = newCode --If the joint is already being tweened, this will change the code, and the tween loop will stop
- end
- if Duration <= 0 then --If the duration is less than or equal to 0 then there's no need for a tweening loop
- if newC0 then Joint.C0 = newC0 end
- if newC1 then Joint.C1 = newC1 end
- else
- local Increment = 1.5 / Duration --Calculate the increment here so it doesn't need to be calculated in the loop
- local startC0 = Joint.C0
- local startC1 = Joint.C1
- local X = 0
- while true do
- RS.RenderStepped:wait() --This makes the for loop step every 1/60th of a second
- local newX = X + Increment
- X = (newX > 90 and 90 or newX) --Makes sure the X never goes above 90
- if tweenIndicator.Value ~= newCode then break end --This makes sure that another tween wasn't called on the same joint
- if newC0 then Joint.C0 = startC0:lerp(newC0, Alpha(X)) end
- if newC1 then Joint.C1 = startC1:lerp(newC1, Alpha(X)) end
- if X == 90 then break end --If the tweening is done...
- end
- end
- if tweenIndicator.Value == newCode then --If this tween functions was the last one called on a joint then it will remove the code
- tweenIndicator:Destroy()
- end
- end)
- end
- function CreateWeld(Part, CF)
- local w = Instance.new("Weld")
- w.Name = "LegWeld"
- w.Parent = Torso
- w.Part0 = Torso
- w.Part1 = Part
- tweenJoint(w, nil, CF, function(X) return math.sin(math.rad(X)) end, 0.25)
- end
- ----------------------------------------------
- local RS = Torso["Right Shoulder"]
- local LS = Torso["Left Shoulder"]
- local RH = char["Torso"]:WaitForChild("Right Hip")
- local LH = char["Torso"]:WaitForChild("Left Hip")
- local LeftLeg = char["Left Leg"]
- local RightLeg = char["Right Leg"]
- local Proned2
- function TweenCOffset(CO, t)
- coroutine.resume(coroutine.create(function()
- COn = COn and COn + 1 or 0 local COn_S = COn
- for i = 1, t do
- if COn ~= COn_S then break end
- char.Humanoid.CameraOffset = char.Humanoid.CameraOffset + (CO - char.Humanoid.CameraOffset) * (i / t)
- game:GetService("RunService").RenderStepped:wait()
- end
- end))
- end
- function TweenTransparency(Part,Trans, t)
- coroutine.resume(coroutine.create(function()
- COn = COn and COn + 1 or 0 local COn_S = COn
- for i = 1, t do
- if COn ~= COn_S then break end
- Part.Transparency = Part.Transparency + (Trans - Part.Transparency) * (i / t)
- game:GetService("RunService").RenderStepped:wait()
- end
- end))
- end
- function TweenColor(Part,Color, t)
- coroutine.resume(coroutine.create(function()
- COn = COn and COn + 1 or 0 local COn_S = COn
- for i = 1, t do
- if COn ~= COn_S then break end
- Part.BrickColor = Part.BrickColor + (Color - Part.BrickColor) * (i / t)
- game:GetService("RunService").RenderStepped:wait()
- end
- end))
- end
- function Stand()
- TweenCOffset(Vector3.new(0,0,0), 20)
- Humanoid.WalkSpeed = 16
- Humanoid.JumpPower = 30
- IsStanced = false
- LH.Part1 = LeftLeg
- RH.Part1 = RightLeg
- Proned2 = Vector3.new(0,0,0)
- tweenJoint(RootJoint, CFrame.new()* CFrame.Angles(math.rad(-0),0,math.rad(0)), CFrame.new(0,0,0), function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(RH, CFrame.new(1,-1,0)* CFrame.Angles(math.rad(-0),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(LH, CFrame.new(-1,-1,0)* CFrame.Angles(math.rad(-0),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(RS, CFrame.new(1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(LS, CFrame.new(-1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- for i, s in pairs(Torso:GetChildren()) do
- if (s.Name == "LegWeld") and (s.ClassName == "Weld") then
- s:Destroy()
- end
- end
- end
- function StandEquip()
- TweenCOffset(Vector3.new(0,0,0), 20)
- Humanoid.WalkSpeed = 12
- Humanoid.JumpPower = 25
- IsStanced = false
- LH.Part1 = LeftLeg
- RH.Part1 = RightLeg
- Proned2 = Vector3.new(0,0,0)
- tweenJoint(RootJoint, CFrame.new(0,0,0.275)* CFrame.Angles(math.rad(-10),0,math.rad(0)), CFrame.new(0,0,0), function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(RH, CFrame.new(1,-1,-0.15)* CFrame.Angles(math.rad(20),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(LH, CFrame.new(-1,-1,-0.2)* CFrame.Angles(math.rad(-10),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(RS, CFrame.new(1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(LS, CFrame.new(-1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- for i, s in pairs(Torso:GetChildren()) do
- if (s.Name == "LegWeld") and (s.ClassName == "Weld") then
- s:Destroy()
- end
- end
- end
- function Crouch()
- TweenCOffset(Vector3.new(0, -1,0), 20)
- Humanoid.WalkSpeed = 8
- Humanoid.JumpPower = 10
- for i, s in pairs(Torso:GetChildren()) do
- if (s.Name == "LegWeld") and (s.ClassName == "Weld") then
- s:Destroy()
- end
- end
- IsStanced = true
- RH.Part1 = RightLeg
- LH.Part1 = LeftLeg
- Proned2 = Vector3.new(0,0,0)
- tweenJoint(RootJoint, CFrame.new(0,-1,0.25)* CFrame.Angles(math.rad(-10),0,math.rad(0)), CFrame.new(0,0,0), function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(RH, CFrame.new(1,-0.35,-0.65)* CFrame.Angles(math.rad(-20),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(LH, CFrame.new(-1,-1.25,-0.625)* CFrame.Angles(math.rad(-60),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(RS, CFrame.new(1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(LS, CFrame.new(-1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- end
- function Prone()
- TweenCOffset(Vector3.new(0, -3.25, 0), 20)
- Humanoid.WalkSpeed = 4
- Humanoid.JumpPower = 0
- IsStanced = true
- RH.Part1 = nil
- LH.Part1 = nil
- Proned2 = Vector3.new(0,0.5,0.5)
- tweenJoint(RootJoint, CFrame.new(0,-2.5,1.35)* CFrame.Angles(math.rad(-90),0,math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(RS, CFrame.new(0.9,1.1,0)* CFrame.Angles(math.rad(-180),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(LS, CFrame.new(-0.9,1.1,0)* CFrame.Angles(math.rad(-180),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- CreateWeld(RightLeg, CFrame.new(-0.2,1.85,0)* CFrame.Angles(math.rad(-0),0,math.rad(-20)))
- CreateWeld(LeftLeg, CFrame.new(0.2,1.85,0)* CFrame.Angles(math.rad(-0),0,math.rad(20)))
- end
- local AlreadyProned = false
- mouse.KeyDown:connect(function(Key)
- if Key == "c" and Stances == 0 and not _G.Sprinting and not _G.Lean then
- Stances = 1
- Crouch()
- _G.Crouched = true
- elseif Key == "c" and Stances == 1 and not _G.Sprinting and not _G.Lean then
- Stances = 2
- Prone()
- _G.Crouched = false
- _G.Proned = true
- elseif Key == "x" and Stances == 2 and not _G.Sprinting and not _G.Lean then
- _G.Crouched = true
- _G.Proned = false
- Stances = 1
- Crouch()
- elseif Key == "x" and Stances == 1 and not _G.Sprinting and not _G.Lean then
- _G.Crouched = false
- Stances = 0
- if not _G.SteadyStance then
- Stand()
- elseif _G.SteadyStance then
- StandEquip()
- end
- end
- if Key == "z" and not _G.SteadyStance and Stances == 0 then
- if not _G.Lean and Stances == 0 then
- StandEquip()
- end
- _G.SteadyStance = true
- elseif Key == "z" and _G.SteadyStance and Stances == 0 then
- if not _G.Lean and Stances == 0 then
- Stand()
- end
- _G.SteadyStance = false
- end
- if Key:byte() == 308 or Key:byte() == 307 then
- AltPressed = true
- print("Alt pressed")
- end
- end)
- mouse.KeyUp:connect(function(Key)
- if Key:byte() == 308 then
- AltPressed = false
- end
- end)
- Stand()
- -------------Motor6Ding Section------------------------
- Character.Humanoid.Died:connect(function()
- Stand()
- _G.Proned = false
- _G.Crouched = false
- _G.Sprinting = false
- Player.TeamColor = BrickColor.new("Deep blue")
- end)
- game:GetService("RunService").RenderStepped:connect(function()
- Mouse.TargetFilter = game.Workspace
- if Aiming then
- game:GetService('UserInputService').MouseDeltaSensitivity = Player.PlayerGui:WaitForChild("ScreenGui").Frame.Sensitivity.Text
- else
- game:GetService('UserInputService').MouseDeltaSensitivity = 1
- end
- Mouse.Button2Down:connect(function()
- if not Aiming then
- Aiming = true
- end
- end)
- Mouse.Button2Up:connect(function()
- if Aiming then
- Aiming = false
- end
- end)
- end)
- end))
- LocalScript106.Parent = Tool0
- table.insert(cors,sandbox(LocalScript106,function()
- repeat wait() until game.Players.LocalPlayer.Character
- repeat wait(1) until game.Players.LocalPlayer.Character:IsDescendantOf(game.Workspace)
- wait(4 / 20)
- local Player = game.Players.LocalPlayer
- local player = game.Players.LocalPlayer
- local Character = Player.Character
- local char = Player.Character
- local Humanoid = Character.Humanoid
- local Mouse = Player:GetMouse()
- local mouse = Player:GetMouse()
- local Camera = game.Workspace.CurrentCamera
- local HumanoidRootPart = Character.HumanoidRootPart
- local Torso = Character.Torso
- local Neck = Torso:WaitForChild("Neck")
- game.Players.LocalPlayer.CameraMaxZoomDistance = 15
- game.Players.LocalPlayer.CameraMinZoomDistance = 0
- local NightVision = false
- local AltPressed = false
- local Stances = 0
- _G.SteadyStance = false
- _G.LeanR = 0
- _G.LeanL = 0
- local RAW
- local LAW
- ----------------
- local RootPart = char:WaitForChild("HumanoidRootPart")
- local RootJoint = RootPart.RootJoint
- RootJoint.C0 = CFrame.new()
- RootJoint.C1 = CFrame.new()
- local Aiming = false
- local ZoomDistance = 40
- local NV
- ----------------
- ---------------------------------------------------------------------------------------
- ---------------- [ Tween Module ] --------------------------------------------------------
- ---------------------------------------------------------------------------------------
- --[[
- tweenJoint Function Parameters:
- Object Joint - This has to be a weld with a C0 and C1 property
- CFrame newC0 - This is what the new C0 of the weld will be. You can put nil if you don't want to effect the C0
- CFrame newC1 - This is what the new C1 of the weld will be. You can put nil if you don't want to effect the C1
- function Alpha - This is an alpha function that takes an input parameter of a number between 0 and 90 and returns a number between 0 and 1.
- For example, function(X) return math.sin(math.rad(X)) end
- float Duration - This is how long the tweening takes to complete
- --]]
- local RS = game:GetService("RunService")
- function tweenJoint(Joint, newC0, newC1, Alpha, Duration)
- spawn(function()
- local newCode = math.random(-1e9, 1e9) --This creates a random code between -1000000000 and 1000000000
- local tweenIndicator = nil
- if (not Joint:findFirstChild("tweenCode")) then --If the joint isn't being tweened, then
- tweenIndicator = Instance.new("IntValue")
- tweenIndicator.Name = "tweenCode"
- tweenIndicator.Value = newCode
- tweenIndicator.Parent = Joint
- else
- tweenIndicator = Joint.tweenCode
- tweenIndicator.Value = newCode --If the joint is already being tweened, this will change the code, and the tween loop will stop
- end
- if Duration <= 0 then --If the duration is less than or equal to 0 then there's no need for a tweening loop
- if newC0 then Joint.C0 = newC0 end
- if newC1 then Joint.C1 = newC1 end
- else
- local Increment = 1.5 / Duration --Calculate the increment here so it doesn't need to be calculated in the loop
- local startC0 = Joint.C0
- local startC1 = Joint.C1
- local X = 0
- while true do
- RS.RenderStepped:wait() --This makes the for loop step every 1/60th of a second
- local newX = X + Increment
- X = (newX > 90 and 90 or newX) --Makes sure the X never goes above 90
- if tweenIndicator.Value ~= newCode then break end --This makes sure that another tween wasn't called on the same joint
- if newC0 then Joint.C0 = startC0:lerp(newC0, Alpha(X)) end
- if newC1 then Joint.C1 = startC1:lerp(newC1, Alpha(X)) end
- if X == 90 then break end --If the tweening is done...
- end
- end
- if tweenIndicator.Value == newCode then --If this tween functions was the last one called on a joint then it will remove the code
- tweenIndicator:Destroy()
- end
- end)
- end
- function CreateWeld(Part, CF)
- local w = Instance.new("Weld")
- w.Name = "LegWeld"
- w.Parent = Torso
- w.Part0 = Torso
- w.Part1 = Part
- tweenJoint(w, nil, CF, function(X) return math.sin(math.rad(X)) end, 0.25)
- end
- ----------------------------------------------
- local RS = Torso["Right Shoulder"]
- local LS = Torso["Left Shoulder"]
- local RH = char["Torso"]:WaitForChild("Right Hip")
- local LH = char["Torso"]:WaitForChild("Left Hip")
- local LeftLeg = char["Left Leg"]
- local RightLeg = char["Right Leg"]
- local Proned2
- function TweenCOffset(CO, t)
- coroutine.resume(coroutine.create(function()
- COn = COn and COn + 1 or 0 local COn_S = COn
- for i = 1, t do
- if COn ~= COn_S then break end
- char.Humanoid.CameraOffset = char.Humanoid.CameraOffset + (CO - char.Humanoid.CameraOffset) * (i / t)
- game:GetService("RunService").RenderStepped:wait()
- end
- end))
- end
- function TweenTransparency(Part,Trans, t)
- coroutine.resume(coroutine.create(function()
- COn = COn and COn + 1 or 0 local COn_S = COn
- for i = 1, t do
- if COn ~= COn_S then break end
- Part.Transparency = Part.Transparency + (Trans - Part.Transparency) * (i / t)
- game:GetService("RunService").RenderStepped:wait()
- end
- end))
- end
- function TweenColor(Part,Color, t)
- coroutine.resume(coroutine.create(function()
- COn = COn and COn + 1 or 0 local COn_S = COn
- for i = 1, t do
- if COn ~= COn_S then break end
- Part.BrickColor = Part.BrickColor + (Color - Part.BrickColor) * (i / t)
- game:GetService("RunService").RenderStepped:wait()
- end
- end))
- end
- function Stand()
- TweenCOffset(Vector3.new(0,0,0), 20)
- Humanoid.WalkSpeed = 16
- Humanoid.JumpPower = 30
- IsStanced = false
- LH.Part1 = LeftLeg
- RH.Part1 = RightLeg
- Proned2 = Vector3.new(0,0,0)
- tweenJoint(RootJoint, CFrame.new()* CFrame.Angles(math.rad(-0),0,math.rad(0)), CFrame.new(0,0,0), function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(RH, CFrame.new(1,-1,0)* CFrame.Angles(math.rad(-0),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(LH, CFrame.new(-1,-1,0)* CFrame.Angles(math.rad(-0),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(RS, CFrame.new(1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(LS, CFrame.new(-1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- for i, s in pairs(Torso:GetChildren()) do
- if (s.Name == "LegWeld") and (s.ClassName == "Weld") then
- s:Destroy()
- end
- end
- end
- function StandEquip()
- TweenCOffset(Vector3.new(0,0,0), 20)
- Humanoid.WalkSpeed = 12
- Humanoid.JumpPower = 25
- IsStanced = false
- LH.Part1 = LeftLeg
- RH.Part1 = RightLeg
- Proned2 = Vector3.new(0,0,0)
- tweenJoint(RootJoint, CFrame.new(0,0,0.275)* CFrame.Angles(math.rad(-10),0,math.rad(0)), CFrame.new(0,0,0), function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(RH, CFrame.new(1,-1,-0.15)* CFrame.Angles(math.rad(20),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(LH, CFrame.new(-1,-1,-0.2)* CFrame.Angles(math.rad(-10),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(RS, CFrame.new(1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(LS, CFrame.new(-1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- for i, s in pairs(Torso:GetChildren()) do
- if (s.Name == "LegWeld") and (s.ClassName == "Weld") then
- s:Destroy()
- end
- end
- end
- function Crouch()
- TweenCOffset(Vector3.new(0, -1,0), 20)
- Humanoid.WalkSpeed = 8
- Humanoid.JumpPower = 10
- for i, s in pairs(Torso:GetChildren()) do
- if (s.Name == "LegWeld") and (s.ClassName == "Weld") then
- s:Destroy()
- end
- end
- IsStanced = true
- RH.Part1 = RightLeg
- LH.Part1 = LeftLeg
- Proned2 = Vector3.new(0,0,0)
- tweenJoint(RootJoint, CFrame.new(0,-1,0.25)* CFrame.Angles(math.rad(-10),0,math.rad(0)), CFrame.new(0,0,0), function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(RH, CFrame.new(1,-0.35,-0.65)* CFrame.Angles(math.rad(-20),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(LH, CFrame.new(-1,-1.25,-0.625)* CFrame.Angles(math.rad(-60),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(RS, CFrame.new(1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(LS, CFrame.new(-1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- end
- function Prone()
- TweenCOffset(Vector3.new(0, -3.25, 0), 20)
- Humanoid.WalkSpeed = 4
- Humanoid.JumpPower = 0
- IsStanced = true
- RH.Part1 = nil
- LH.Part1 = nil
- Proned2 = Vector3.new(0,0.5,0.5)
- tweenJoint(RootJoint, CFrame.new(0,-2.5,1.35)* CFrame.Angles(math.rad(-90),0,math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(RS, CFrame.new(0.9,1.1,0)* CFrame.Angles(math.rad(-180),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- tweenJoint(LS, CFrame.new(-0.9,1.1,0)* CFrame.Angles(math.rad(-180),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
- CreateWeld(RightLeg, CFrame.new(-0.2,1.85,0)* CFrame.Angles(math.rad(-0),0,math.rad(-20)))
- CreateWeld(LeftLeg, CFrame.new(0.2,1.85,0)* CFrame.Angles(math.rad(-0),0,math.rad(20)))
- end
- local AlreadyProned = false
- mouse.KeyDown:connect(function(Key)
- if Key == "c" and Stances == 0 and not _G.Sprinting and not _G.Lean then
- Stances = 1
- Crouch()
- _G.Crouched = true
- elseif Key == "c" and Stances == 1 and not _G.Sprinting and not _G.Lean then
- Stances = 2
- Prone()
- _G.Crouched = false
- _G.Proned = true
- elseif Key == "x" and Stances == 2 and not _G.Sprinting and not _G.Lean then
- _G.Crouched = true
- _G.Proned = false
- Stances = 1
- Crouch()
- elseif Key == "x" and Stances == 1 and not _G.Sprinting and not _G.Lean then
- _G.Crouched = false
- Stances = 0
- if not _G.SteadyStance then
- Stand()
- elseif _G.SteadyStance then
- StandEquip()
- end
- end
- if Key == "z" and not _G.SteadyStance and Stances == 0 then
- if not _G.Lean and Stances == 0 then
- StandEquip()
- end
- _G.SteadyStance = true
- elseif Key == "z" and _G.SteadyStance and Stances == 0 then
- if not _G.Lean and Stances == 0 then
- Stand()
- end
- _G.SteadyStance = false
- end
- if Key:byte() == 308 or Key:byte() == 307 then
- AltPressed = true
- print("Alt pressed")
- end
- end)
- mouse.KeyUp:connect(function(Key)
- if Key:byte() == 308 then
- AltPressed = false
- end
- end)
- Stand()
- -------------Motor6Ding Section------------------------
- Character.Humanoid.Died:connect(function()
- Stand()
- _G.Proned = false
- _G.Crouched = false
- _G.Sprinting = false
- Player.TeamColor = BrickColor.new("Deep blue")
- end)
- game:GetService("RunService").RenderStepped:connect(function()
- Mouse.TargetFilter = game.Workspace
- if Aiming then
- game:GetService('UserInputService').MouseDeltaSensitivity = Player.PlayerGui:WaitForChild("ScreenGui").Frame.Sensitivity.Text
- else
- game:GetService('UserInputService').MouseDeltaSensitivity = 1
- end
- Mouse.Button2Down:connect(function()
- if not Aiming then
- Aiming = true
- end
- end)
- Mouse.Button2Up:connect(function()
- if Aiming then
- Aiming = false
- end
- end)
- end)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement