Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = owner
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- local debris = game:GetService("Debris")
- local tween = game:GetService("TweenService")
- makenoise = function(asset,part)
- local aud = Instance.new("Sound")
- aud.Parent = part
- aud.SoundId = asset
- if asset == "rbxassetid://722989551" then
- aud.TimePosition = .2
- end
- aud.Playing = true
- aud.Stopped:connect(function()
- wait(1)
- aud:Destroy()
- end)
- end
- local gun = Instance.new("Tool")
- gun.Parent = plr['Backpack']
- gun.Name = "Illegal Shotgun"
- gun.GripForward = Vector3.new(0,0,-1)
- gun.GripPos = Vector3.new(0,0,.5)
- local han = Instance.new("Part")
- han.Parent = gun
- han.Name = "Handle"
- han.CanCollide = false
- han.Massless = true
- han.Size = Vector3.new(1,1,4)
- local specm = Instance.new("SpecialMesh")
- specm.Parent = han
- specm.MeshId = "rbxassetid://3835506"
- specm.Scale = Vector3.new(1.8,1.5,1)
- specm.TextureId = "rbxassetid://19630799"
- specm.VertexColor = Vector3.new(math.random(1,255)/255,math.random(1,255)/255,math.random(1,255)/255)
- local cols = {BrickColor.new("Neon orange"),BrickColor.new("Really red"),BrickColor.new("Bright red"),BrickColor.new("Br. yellowish orange"),BrickColor.new("Bright yellow")}
- local taunts = {298689061,2743459732,2852509470,1018518369}
- local attacking = false
- local rapid = true
- local op = true
- local bulletfire = 10
- local reloadwait = 0.15
- gun.Activated:Connect(function()
- if attacking == false and CheckIfAlive() then
- attacking = true
- makenoise("rbxassetid://722989551",han)
- specm.VertexColor = Vector3.new(math.random(1,255)/255,math.random(1,255)/255,math.random(1,255)/255)
- local exp = Instance.new("Explosion")
- exp.Parent = workspace
- exp.Position = (han.CFrame*CFrame.new(0,0,-2)).Position
- exp.DestroyJointRadiusPercent = 0
- exp.BlastRadius = 20
- exp.BlastPressure = 50000
- for i = 1,bulletfire do
- spawn(function()
- local p = Instance.new("Part")
- p.Parent = workspace
- p.Massless = true
- p.Name = "bullet"
- p.Anchored = false
- p.CanCollide = false
- p.Size = Vector3.new(2,2,2)
- p.Transparency = 1
- p.BrickColor = cols[math.random(1,#cols)]
- p.CFrame = han.CFrame*CFrame.new(0,0,-2)
- p.Velocity = (han.Position-(han.CFrame*CFrame.new(math.random(-20,20)/240,math.random(-20,20)/120,1)).Position).Unit * 200
- local fire = Instance.new("Fire",p)
- fire.Size = 15
- fire.Heat = 0
- fire.Color = p.Color
- local smok = Instance.new("Smoke",p)
- smok.Opacity = .1
- debris:AddItem(p,1)
- p.Touched:connect(function(obj)
- if obj.Name ~= "bullet" and obj.Name ~= "Handle" then
- local targhum = obj.Parent:FindFirstChildOfClass("Humanoid")
- local targhead = obj.Parent:FindFirstChild("Head")
- if targhum and targhum ~= hum and targhead and targhead.Parent ~= char and not targhum:FindFirstChild("shot shell confirm - kry") then
- --if (head.Position-p.Position).Magnitude < 5 and hum.PlatformStand == false then
- local confirm = Instance.new("IntValue")
- confirm.Parent = targhum
- confirm.Name = 'shot shell confirm - kry'
- debris:AddItem(confirm,0.1)
- if not op then
- targhum.Health = targhum.Health - targhum.MaxHealth/2
- elseif op then
- targhum.MaxHealth = 0
- targhum.Health = 0
- targhum.Parent:BreakJoints()
- end
- targhum.PlatformStand = true
- targhead.Velocity = (targhead.Position-p.Position).Unit * 50
- targhead.RotVelocity = Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
- wait(.1)
- targhum.PlatformStand = false
- --end
- else
- p.Velocity = p.Velocity + Vector3.new(0,75-p.Velocity.Y,0)
- end
- end
- end)
- end)
- end
- wait(0)
- if not rapid then
- wait(.2)
- makenoise("rbxassetid://254833653",han)
- tween:Create(gun,TweenInfo.new(reloadwait),({Grip = gun.Grip * CFrame.fromEulerAnglesXYZ(-22.5,0,0)})):Play()
- wait(reloadwait)
- tween:Create(gun,TweenInfo.new(reloadwait),({Grip = gun.Grip - Vector3.new(0,0,-0.3)})):Play()
- wait(reloadwait)
- end
- local s1 = Instance.new("Part",workspace)
- s1.Shape = "Cylinder"
- s1.Size = Vector3.new(.2,.1,.2)
- s1.CFrame = han.CFrame*CFrame.new(0.15,.5,0)*CFrame.Angles(0,math.rad(90),0)
- s1.Material = "Metal"
- s1.BrickColor = BrickColor.new("Crimson")
- local s2 = s1:Clone()
- s2.Parent = workspace
- s2.BrickColor = BrickColor.new("New Yeller")
- s2.Size = Vector3.new(.05,.1,.1)
- s2.CFrame = s1.CFrame*CFrame.new(-.125,0,0)
- local wel = Instance.new("WeldConstraint",s1)
- wel.Part0 = s1
- wel.Part1 = s2
- s1.RotVelocity = Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
- s1.Velocity = (s1.Position-han.Position).Unit * 20
- if not rapid then
- tween:Create(gun,TweenInfo.new(reloadwait),({Grip = gun.Grip - Vector3.new(0,0,0.3)})):Play()
- wait(reloadwait)
- tween:Create(gun,TweenInfo.new(reloadwait),({Grip = gun.Grip * CFrame.fromEulerAnglesXYZ(22.5,0,0)})):Play()
- wait(reloadwait)
- end
- attacking = false
- end
- end)
- function CheckIfAlive()
- local alive = false
- if (plr and plr.Parent and char and char.Parent and hum and hum.Parent and hum.Health > 0 and torso and torso.Parent) then
- alive = true
- end
- return alive
- end
- gun.Equipped:Connect(function()
- attacking = true
- --makenoise("rbxassetid://" .. tostring(taunts[math.random(1,#taunts)]),han)
- pcall(function()
- char = gun.Parent
- plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- hum = char:FindFirstChildOfClass("Humanoid")
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- if not CheckIfAlive() then gun.Parent = nil return end
- end)
- for i = 0,15 do
- gun.Grip = gun.Grip * CFrame.Angles(math.rad(-22.5),0,0)
- wait(0)
- end
- if gun.Parent.ClassName == "Model" then
- attacking = false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement