Advertisement
Guest User

Untitled

a guest
Dec 10th, 2018
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. local plr = game.Players.LocalPlayer
  2. local h = game:GetService('RunService').Heartbeat
  3. local m = plr:GetMouse()
  4.  
  5. local shotty = false
  6. local prefix = "."
  7.  
  8. plr.Chatted:connect(function(cmd)
  9. cmd=cmd:lower()
  10. if cmd == prefix.."shotty" then
  11. shotty = not shotty
  12. end
  13. end)
  14.  
  15. m.Button1Down:connect(function()
  16. h:wait()
  17. if shotty == true then
  18. if plr.Character:FindFirstChild('xxx') then plr.Character.xxx.Fire:FireServer(m.Hit) end
  19. if plr.Character:FindFirstChild('Shotty') then plr.Character.Shotty.Fire:FireServer(m.Hit) end
  20. if plr.Character:FindFirstChild('xxx') then plr.Character.xxx.Fire:FireServer(m.Hit) end
  21. if plr.Character:FindFirstChild('xxx') then plr.Character["xxx"].Fire:FireServer(m.Hit) end
  22. end
  23. end)
  24.  
  25. function start()
  26. while true do
  27. h:wait()
  28. if shotty == true then
  29. if plr.Backpack:FindFirstChild('xxx') then
  30. plr.Backpack.xxx.Parent = plr.Character
  31. h:wait()
  32. elseif plr.Backpack:FindFirstChild('Shotty') then
  33. plr.Backpack.Shotty.Parent = plr.Character
  34. h:wait()
  35. elseif plr.Backpack:FindFirstChild("xxx") then
  36. plr.Backpack.xxx.Parent = plr.Character
  37. h:wait()
  38. elseif plr.Backpack:FindFirstChild("xxx") then
  39. plr.Backpack["xxx"].Parent = plr.Character
  40. h:wait()
  41. end
  42. end
  43. end
  44. end
  45. start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement