Advertisement
-zens

Robeats - Auto player

Oct 21st, 2023 (edited)
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.84 KB | None | 0 0
  1. local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
  2.  
  3. local Window = Rayfield:CreateWindow({
  4. Name = "Robeats | Auto Player 🚀",
  5. LoadingTitle = "Zenith Script Hub",
  6. LoadingSubtitle = "Developed by zens",
  7. ConfigurationSaving = {
  8. Enabled = true,
  9. FolderName = nil,
  10. FileName = "Zenith-HUB"
  11. },
  12. Discord = {
  13. Enabled = true,
  14. Invite = "by38yzwHGt",
  15. RememberJoins = true
  16. },
  17. KeySystem = true,
  18. KeySettings = {
  19. Title = "Zenith Authorization",
  20. Subtitle = "Best script provider since 2023.",
  21. Note = "Get your own key from our Discord!",
  22. FileName = "Key",
  23. SaveKey = false,
  24. GrabKeyFromSite = true,
  25. Key = {"https://pastebin.com/raw/Xtv1pMsE"}
  26. }
  27. })
  28.  
  29. local MainTab = Window:CreateTab("🎮 | Auto-Play", nil)
  30. local MainSection = MainTab:CreateSection("Simple Robeats Script for pookie ❤")
  31. local AutoplayEnabled = false
  32. local MainButton = MainTab:CreateButton({
  33. Name = "Toggle Auto Play",
  34. Callback = function()
  35. AutoplayEnabled = not AutoplayEnabled
  36. if AutoplayEnabled then
  37. accuracy = "Perfect"
  38. note_time_target = accuracy_bounds[accuracy]
  39. else
  40. accuracy = shared.accuracy or "Perfect"
  41. note_time_target = accuracy_bounds[accuracy]
  42. end
  43. end,
  44. })
  45.  
  46. local PerfectSlider = MainTab:CreateSlider({
  47. Name = "Chances of hits",
  48. Range = {0, 100},
  49. Increment = 1,
  50. Suffix = "Perfect Percentage (%)",
  51. CurrentValue = 33,
  52. Flag = "Slider1",
  53. Callback = function(Value)
  54. accuracy_bounds["Perfect"] = -Value
  55. if accuracy == "Perfect" and AutoplayEnabled then
  56. note_time_target = accuracy_bounds[accuracy]
  57. end
  58. end,
  59. })
  60.  
  61. local GreatSlider = MainTab:CreateSlider({
  62. Name = "Chances of hits",
  63. Range = {0, 100},
  64. Increment = 1,
  65. Suffix = "Great Percentage (%)",
  66. CurrentValue = 33,
  67. Flag = "Slider2",
  68. Callback = function(Value)
  69. accuracy_bounds["Great"] = -Value
  70. if accuracy == "Great" and AutoplayEnabled then
  71. note_time_target = accuracy_bounds[accuracy]
  72. end
  73. end,
  74. })
  75.  
  76. local OkaySlider = MainTab:CreateSlider({
  77. Name = "Chances of hits",
  78. Range = {0, 100},
  79. Increment = 1,
  80. Suffix = "Okay Percentage (%)",
  81. CurrentValue = 33,
  82. Flag = "Slider3",
  83. Callback = function(Value)
  84. accuracy_bounds["Okay"] = -Value
  85. if accuracy == "Okay" and AutoplayEnabled then
  86. note_time_target = accuracy_bounds[accuracy]
  87. end
  88. end,
  89. })
  90.  
  91. local player = game:GetService("Players").LocalPlayer;
  92.  
  93. local accuracy_bounds = {
  94. Perfect = 0,
  95. Great = 1000,
  96. Okay = 1000
  97. };
  98.  
  99. local accuracy_names = {"Perfect", "Great", "Okay"};
  100.  
  101. local accuracy = shared.accuracy or "Perfect";
  102. local note_time_target = accuracy_bounds[accuracy];
  103.  
  104. local track_system;
  105.  
  106. local function get_track_action_functions(track_system)
  107. local press_track, release_track;
  108.  
  109. for index, track_function in next, track_system do
  110. if type(track_function) == "function" then
  111. local constants = getconstants(track_function);
  112.  
  113. if table.find(constants, "press") then
  114. press_track = track_function;
  115.  
  116. if release_track then
  117. break;
  118. end;
  119. elseif table.find(constants, "release") then
  120. release_track = track_function;
  121.  
  122. if press_track then
  123. break;
  124. end;
  125. end;
  126. end;
  127. end;
  128.  
  129. return press_track, release_track;
  130. end;
  131.  
  132. local function get_local_track_system(session)
  133. local local_slot_index = getupvalue(session.set_local_game_slot, 1);
  134.  
  135. for index, session_function in next, session do
  136. if type(session_function) == "function" then
  137. local object = getupvalues(session_function)[1];
  138.  
  139. if type(object) == "table" and rawget(object, "count") and object:count() <= 4 then
  140. return object:get(local_slot_index);
  141. end;
  142. end;
  143. end;
  144. end;
  145.  
  146. for index, module in next, getloadedmodules() do
  147. local module_value = require(module);
  148.  
  149. if type(module_value) == "table" then
  150. local new_function = rawget(module_value, "new");
  151.  
  152. if new_function then
  153. local first_upvalue = getupvalues(new_function)[1];
  154.  
  155. if type(first_upvalue) == "table" and rawget(first_upvalue, "twister") then
  156. track_system = module_value;
  157.  
  158. break;
  159. end;
  160. end;
  161. end;
  162. end;
  163.  
  164. local old_track_system_new = track_system.new;
  165. track_system.new = function(...)
  166. local track_functions = old_track_system_new(...);
  167. local arguments = {...};
  168.  
  169. if arguments[2]._players._slots:get(arguments[3])._name == player.Name then
  170. for index, track_function in next, track_functions do
  171. local upvalues = getupvalues(track_function);
  172.  
  173. if type(upvalues[1]) == "table" and rawget(upvalues[1], "profilebegin") then
  174. local notes_table = upvalues[2];
  175.  
  176. track_functions[index] = function(self, slot, session)
  177. local local_track_system = get_local_track_system(session);
  178. local press_track, release_track = get_track_action_functions(local_track_system);
  179.  
  180. local test_press_name = getconstant(press_track, 10);
  181. local test_release_name = getconstant(release_track, 6);
  182.  
  183. if accuracy == "Random" then
  184. note_time_target = accuracy_bounds[accuracy_names[math.random(1, 3)]];
  185. end;
  186.  
  187. for note_index = 1, notes_table:count() do
  188. local note = notes_table:get(note_index);
  189.  
  190. if note then
  191. local test_press, test_release = note[test_press_name], note[test_release_name];
  192.  
  193. local note_track_index = note:get_track_index(note_index);
  194. local pressed, press_result, press_delay = test_press(note);
  195.  
  196. if pressed and press_delay >= note_time_target then
  197. press_track(local_track_system, session, note_track_index);
  198.  
  199. session:debug_any_press();
  200.  
  201. if rawget(note, "get_time_to_end") then
  202. delay(math.random(5, 18) / 100, function()
  203. release_track(local_track_system, session, note_track_index);
  204. end);
  205. end;
  206. end;
  207.  
  208. if test_release then
  209. local released, release_result, release_delay = test_release(note);
  210.  
  211. if released and release_delay >= note_time_target then
  212. delay(math.random(2, 5) / 100, function()
  213. release_track(local_track_system, session, note_track_index);
  214. end);
  215. end;
  216. end;
  217. end;
  218. end;
  219.  
  220. return track_function(self, slot, session);
  221. end;
  222. end;
  223. end;
  224. end;
  225.  
  226. return track_functions;
  227. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement