Advertisement
omg12

fhgdfh

May 23rd, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. local plr = game.Players.LocalPlayer
  2. local char = plr.Character
  3. local mou = plr:GetMouse()
  4. local equipped = false
  5. local hum = char:FindFirstChildOfClass("Humanoid")
  6. local tor = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
  7. local head = char:FindFirstChild("Head")
  8.  
  9. local pepsi = Instance.new("Tool", plr.Backpack)
  10. pepsi.Name = "MLG PEPSI GUN"
  11. local hand = Instance.new("Part", pepsi)
  12. hand.Size = Vector3.new(1, 1, 1)
  13. hand.Transparency = 1
  14. hand.Name = "Handle"
  15.  
  16. pepsi.Equipped:connect(function()
  17. equipped = true
  18. mouse.Button1Down:connect(function()
  19. if equipped = true then
  20. clicked = true
  21. local ray = Ray.new(hand.CFrame.p, (mou.Hit.p - hand.CFrame.p).unit * 300)
  22. local part, position = workspace:FindPartOnRay(ray, char, false, true)
  23.  
  24. yum = Instance.new("Part", pepsi)
  25. yum.BrickColor = BrickColor.new("Really black")
  26. yum.Material = "Neon"
  27. yum.Anchored = true
  28. yum.CanCollide = false
  29. yum.Locked = true
  30. local dis = (hand.CFrame.p - position).magnitude
  31. while clicked == true do
  32. yum.Size = Vector3.new(0.9, 0.9, dis)
  33. yum.CFrame = CFrame.new(hand.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
  34. end
  35.  
  36. end
  37. end)
  38. mou.Button1Up:connect(function()
  39. clicked = false
  40. game:GetService("Debris"):AddItem(yum, 0)
  41. end)
  42. end)
  43.  
  44. pepsi.Unequipped:connect(function()
  45. equipped = false
  46. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement