Advertisement
FurkingBoi

Boxing Simulator

Nov 30th, 2019
2,472
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. local player = game:GetService("Players").LocalPlayer
  2. local db = false
  3. local on = true
  4.  
  5. local function gettool()
  6. return player.Character:FindFirstChildOfClass('Tool') or player.Backpack:FindFirstChildOfClass('Tool')
  7. end
  8.  
  9. game:GetService("RunService").Heartbeat:Connect(function()
  10. if on then
  11. spawn(function()
  12. if not db then
  13. db = true
  14. player.Character.HumanoidRootPart.CFrame = workspace.TouchPads.Sell.Circle.Part.CFrame
  15. pcall(function()
  16. firesignal(game.Players.LocalPlayer.PlayerGui.Stats.StatContainer.Sell.MouseButton1Down)
  17. end)
  18. wait(4)
  19. player.Character.HumanoidRootPart.CFrame = workspace.TouchPads.Sell.Circle.Part.CFrame * CFrame.new(10,10,10)
  20. wait(1)
  21. db = false
  22. end
  23. end)
  24. gettool().Parent = player.Character
  25. gettool():Activate()
  26. end
  27. end)
  28.  
  29. local function getargs(str)
  30. local t = {}
  31. for i in string.gmatch(str,"%S+") do
  32. table.insert(t,i)
  33. end
  34. return t
  35. end
  36.  
  37. local cmd = {}
  38. local prefix = "!"
  39. function cmd.new(msg,command,func)
  40. local args = getargs(msg)
  41. for i,v in pairs(args) do
  42. if v == prefix..command then
  43. func()
  44. end
  45. end
  46. end
  47.  
  48. player.Chatted:Connect(function(msg)
  49. cmd.new(msg,"on",function()
  50. on = true
  51. end)
  52. cmd.new(msg,"off",function()
  53. on = false
  54. end)
  55. end)local player = game:GetService("Players").LocalPlayer
  56. local db = false
  57. local on = true
  58.  
  59. local function gettool()
  60. return player.Character:FindFirstChildOfClass('Tool') or player.Backpack:FindFirstChildOfClass('Tool')
  61. end
  62.  
  63. game:GetService("RunService").Heartbeat:Connect(function()
  64. if on then
  65. spawn(function()
  66. if not db then
  67. db = true
  68. player.Character.HumanoidRootPart.CFrame = workspace.TouchPads.Sell.Circle.Part.CFrame
  69. pcall(function()
  70. firesignal(game.Players.LocalPlayer.PlayerGui.Stats.StatContainer.Sell.MouseButton1Down)
  71. end)
  72. wait(4)
  73. player.Character.HumanoidRootPart.CFrame = workspace.TouchPads.Sell.Circle.Part.CFrame * CFrame.new(10,10,10)
  74. wait(1)
  75. db = false
  76. end
  77. end)
  78. gettool().Parent = player.Character
  79. gettool():Activate()
  80. end
  81. end)
  82.  
  83. local function getargs(str)
  84. local t = {}
  85. for i in string.gmatch(str,"%S+") do
  86. table.insert(t,i)
  87. end
  88. return t
  89. end
  90.  
  91. local cmd = {}
  92. local prefix = "!"
  93. function cmd.new(msg,command,func)
  94. local args = getargs(msg)
  95. for i,v in pairs(args) do
  96. if v == prefix..command then
  97. func()
  98. end
  99. end
  100. end
  101.  
  102. player.Chatted:Connect(function(msg)
  103. cmd.new(msg,"on",function()
  104. on = true
  105. end)
  106. cmd.new(msg,"off",function()
  107. on = false
  108. end)
  109. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement