Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local char = plr.Character
- local mou = plr:GetMouse()
- local equipped = false
- local hum = char:FindFirstChildOfClass("Humanoid")
- local tor = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- local head = char:FindFirstChild("Head")
- local pepsi = Instance.new("Tool", plr.Backpack)
- pepsi.Name = "MLG PEPSI GUN"
- local hand = Instance.new("Part", pepsi)
- hand.Size = Vector3.new(1, 1, 1)
- hand.Transparency = 1
- hand.Name = "Handle"
- pepsi.Equipped:connect(function()
- equipped = true
- mouse.Button1Down:connect(function()
- if equipped = true then
- clicked = true
- local ray = Ray.new(hand.CFrame.p, (mou.Hit.p - hand.CFrame.p).unit * 300)
- local part, position = workspace:FindPartOnRay(ray, char, false, true)
- yum = Instance.new("Part", pepsi)
- yum.BrickColor = BrickColor.new("Really black")
- yum.Material = "Neon"
- yum.Anchored = true
- yum.CanCollide = false
- yum.Locked = true
- local dis = (hand.CFrame.p - position).magnitude
- while clicked == true do
- yum.Size = Vector3.new(0.9, 0.9, dis)
- yum.CFrame = CFrame.new(hand.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
- end
- end
- end)
- mou.Button1Up:connect(function()
- clicked = false
- game:GetService("Debris"):AddItem(yum, 0)
- end)
- end)
- pepsi.Unequipped:connect(function()
- equipped = false
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement