Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tool = Instance.new("Tool",game.ReplicatedStorage)
- tool.Name = "Dubstep Gun"
- tool.GripForward = Vector3.new(1,0,0)
- tool.GripPos = Vector3.new(-2,0.3,0)
- tool.GripRight = Vector3.new(0,1,0)
- tool.GripUp = Vector3.new(0,0,-1)
- tool.ToolTip = "Throw the dubstep out of people!"
- tool.Enabled = true
- local dubstep = Instance.new("Sound",tool)
- dubstep.Name = "Sound"
- dubstep.Volume = 1
- dubstep.Looped = true
- dubstep.SoundId = "rbxassetid://130768080"
- local handle = Instance.new("Part",tool)
- handle.Name = "Handle"
- handle.Color = Color3.fromRGB(0,32,96)
- handle.Material = "Plastic"
- handle.Size = Vector3.new(2.4,0.9,2)
- handle.CanCollide = false
- handle.Orientation = Vector3.new(88.95,0,-90)
- handle.Position = Vector3.new(1.2,3.436,-3.499)
- local mesh = Instance.new("SpecialMesh",handle)
- mesh.MeshId = "rbxassetid://519125417"
- mesh.MeshType = Enum.MeshType.FileMesh
- mesh.Offset = Vector3.new(0,0,0)
- mesh.Scale = Vector3.new(0.006,0.006,0.006)
- script.Parent = tool
- tool.Parent = game.Players.projor22.Backpack
- local m = script.Parent.Parent.Parent:GetMouse()
- local holding = false
- m.Button1Down:connect(function()
- if tool.Parent == game.Players.projor22.Character then
- holding = true
- script.Parent.Sound:Play()
- repeat
- local TARGET = m.Target
- if TARGET~=nil then
- if TARGET.Parent:FindFirstChild("Humanoid")~=nil then
- TARGET.Parent.Humanoid.Health = TARGET.Parent.Humanoid.Health - (TARGET.Parent.Humanoid.MaxHealth/50)
- end
- end
- wait(.05)
- until holding == false
- end
- end)
- m.Button1Up:connect(function()
- if tool.Parent == game.Players.projor22.Character then
- holding = false
- script.Parent.Sound:Stop()
- end
- end)
- tool.Unequipped:connect(function()
- script.Parent.Sound:Stop()
- end)
- --[[
- repeat
- local bullet = script.Parent.Bullet:Clone()
- bullet.Position = script.Parent.Handle.Position
- local perfectrotation = script.Parent.Handle.Orientation
- bullet.Orientation = perfectrotation
- for i = 1,1000 do
- bullet.Position = bullet.Position + Vector3.new(0,0,1)
- wait()
- end
- wait(.05)
- --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement