Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- 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")
- Weld2 = Instance.new("Weld")
- Part3 = Instance.new("Part")
- Script4 = Instance.new("Script")
- Animation5 = Instance.new("Animation")
- Tool0.Name = "Pistol"
- Tool0.Parent = mas
- Tool0.Grip = CFrame.new(0.143165588, -0.257258415, -0.278945893, -4.37113883e-08, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-08)
- Tool0.GripForward = Vector3.new(-1, -0, 4.37113883e-08)
- Tool0.GripPos = Vector3.new(0.143165588, -0.257258415, -0.278945893)
- Tool0.GripRight = Vector3.new(-4.37113883e-08, 0, -1)
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.CFrame = CFrame.new(-132.471054, 5.25725651, -115.356834, 4.37113847e-08, 0, 0.999999821, -4.37113883e-08, 1, 1.91068504e-15, -1, -4.37113883e-08, 4.37113812e-08)
- Part1.Orientation = Vector3.new(0, 90, 0)
- Part1.Position = Vector3.new(-132.471054, 5.25725651, -115.356834)
- Part1.Rotation = Vector3.new(0, 89.9700012, 0)
- Part1.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part1.Size = Vector3.new(0.74999994, 1.49999988, 0.74999994)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.BrickColor = BrickColor.new("Black")
- Part1.brickColor = BrickColor.new("Black")
- Weld2.Name = "BTWeld"
- Weld2.Parent = Part1
- Weld2.C1 = CFrame.new(-0.37500006, -1.12499988, 0, -4.37113883e-08, 1, 0, -1, -4.37113883e-08, 0, 0, 0, 0.99999994)
- Weld2.Part0 = Part1
- Weld2.Part1 = Part3
- Weld2.part1 = Part3
- Part3.Name = "bulletpos"
- Part3.Parent = Tool0
- Part3.CFrame = CFrame.new(-132.471054, 5.63225651, -114.231834, -1.91068525e-15, -4.37113847e-08, 0.999999881, 1, 0, 1.91068525e-15, 0, 1, 4.37113847e-08)
- Part3.Orientation = Vector3.new(0, 90, 90)
- Part3.Position = Vector3.new(-132.471054, 5.63225651, -114.231834)
- Part3.Rotation = Vector3.new(0, 89.9700012, 90)
- Part3.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part3.Size = Vector3.new(0.56249994, 1.49999988, 0.74999994)
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.BrickColor = BrickColor.new("Black")
- Part3.brickColor = BrickColor.new("Black")
- Script4.Name = "Shoot"
- Script4.Parent = Tool0
- table.insert(cors,sandbox(Script4,function()
- wait(.5)
- if script.Parent.Name == "Pistol" then
- Tool = script.Parent
- Handle = Tool.Handle
- Debris = game:GetService("Debris")
- function NewBullet(Position, Velocity, Parent)
- local Bullet = Instance.new("Part",Parent)
- Bullet.Position = Position
- Bullet.CanCollide = false
- Bullet.Material = "SmoothPlastic"
- Bullet.Size = Vector3.new(0.5, 0.5, 1.75)
- Bullet.Anchored = false
- Bullet.Orientation = Tool.Parent.HumanoidRootPart.Orientation
- local Hitter = Bullet.Touched:connect(function(hit)
- local Player = hit.Parent
- for i,Humanoid in pairs (Player:GetChildren()) do
- if Humanoid:IsA("Humanoid") and Humanoid.Parent ~= Tool.Parent then
- Humanoid.Health = Humanoid.Health - 15
- Bullet:Destroy()
- end
- end
- end)
- local BV = Instance.new("BodyVelocity",Bullet)
- BV.Velocity = Bullet.CFrame.lookVector * Velocity
- Debris:AddItem(Bullet, 15)
- return Bullet
- end
- function Activated()
- Tool.Enabled = false
- local toolanim = Instance.new("StringValue",Tool)
- toolanim.Name = "toolanim"
- toolanim.Value = "Lunge"
- end
- Tool.Activated:connect(function()
- Activated()
- local Uuf = NewBullet(Tool.bulletpos.Position, 50, workspace)
- end)
- end
- end))
- Animation5.Parent = Tool0
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = owner.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