BankaLanka3

FUNKY FRIDAY 100% WORKING AUTO BOT

Oct 16th, 2021
2,274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.22 KB | None | 0 0
  1. --]]
  2.  
  3. local client = game:GetService('Players').LocalPlayer;
  4. local set_identity = (type(syn) == 'table' and syn.set_thread_identity) or setidentity or setthreadcontext
  5.  
  6. local function fail(r) return client:Kick(r) end
  7.  
  8. -- gracefully handle errors when loading external scripts
  9. local function urlLoad(url)
  10. local success, result = pcall(game.HttpGet, game, url)
  11. if (not success) then
  12. return fail(string.format('Failed to GET url %q for reason: %q', url, tostring(result)))
  13. end
  14.  
  15. local fn, err = loadstring(result)
  16. if (type(fn) ~= 'function') then
  17. return fail(string.format('Failed to loadstring url %q for reason: %q', url, tostring(err)))
  18. end
  19.  
  20. local results = { pcall(fn) }
  21. if (not results[1]) then
  22. return fail(string.format('Failed to initialize url %q for reason: %q', url, tostring(results[2])))
  23. end
  24.  
  25. return unpack(results, 2)
  26. end
  27.  
  28. -- attempt to block imcompatible exploits
  29. -- rewrote because old checks literally did not work
  30. if type(set_identity) ~= 'function' then return fail('Unsupported exploit (missing "set_thread_identity")') end
  31. if type(getconnections) ~= 'function' then return fail('Unsupported exploit (missing "getconnections")') end
  32. if type(getloadedmodules) ~= 'function' then return fail('Unsupported exploit (misssing "getloadedmodules")') end
  33. if type(getgc) ~= 'function' then return fail('Unsupported exploit (misssing "getgc")') end
  34.  
  35. local library = urlLoad("https://raw.githubusercontent.com/wally-rblx/uwuware-ui/main/main.lua")
  36.  
  37. local framework, scrollHandler
  38. local counter = 0
  39.  
  40. while true do
  41. for _, obj in next, getgc(true) do
  42. if type(obj) == 'table' and rawget(obj, 'GameUI') then
  43. framework = obj;
  44. break
  45. end
  46. end
  47.  
  48. for _, module in next, getloadedmodules() do
  49. if module.Name == 'ScrollHandler' then
  50. scrollHandler = module;
  51. break;
  52. end
  53. end
  54.  
  55. if (type(framework) == 'table') and (typeof(scrollHandler) == 'Instance') then
  56. break
  57. end
  58.  
  59. counter = counter + 1
  60. if counter > 6 then
  61. fail(string.format('Failed to load game dependencies. Details: %s, %s', type(framework), typeof(scrollHandler)))
  62. end
  63. wait(1)
  64. end
  65.  
  66. local runService = game:GetService('RunService')
  67. local userInputService = game:GetService('UserInputService')
  68. local random = Random.new()
  69.  
  70. local task = task or getrenv().task;
  71. local fastWait, fastSpawn = task.wait, task.spawn;
  72.  
  73. -- firesignal implementation
  74. -- hitchance rolling
  75. local fireSignal, rollChance do
  76. -- updated for script-ware or whatever
  77. -- attempted to update for krnl
  78.  
  79. function fireSignal(target, signal, ...)
  80. -- getconnections with InputBegan / InputEnded does not work without setting Synapse to the game's context level
  81. set_identity(2)
  82. for _, signal in next, getconnections(signal) do
  83. if type(signal.Function) == 'function' and islclosure(signal.Function) then
  84. local scr = rawget(getfenv(signal.Function), 'script')
  85. if scr == target then
  86. pcall(signal.Function, ...)
  87. end
  88. end
  89. end
  90. set_identity(7)
  91. end
  92.  
  93. -- uses a weighted random system
  94. -- its a bit scuffed rn but it works good enough
  95.  
  96. function rollChance()
  97. if (library.flags.autoPlayerMode == 'Manual') then
  98. if (library.flags.sickHeld) then return 'Sick' end
  99. if (library.flags.goodHeld) then return 'Good' end
  100. if (library.flags.okayHeld) then return 'Ok' end
  101. if (library.flags.missHeld) then return 'Bad' end
  102.  
  103. return 'Bad' -- incase if it cant find one
  104. end
  105.  
  106. local chances = {
  107. { type = 'Sick', value = library.flags.sickChance },
  108. { type = 'Good', value = library.flags.goodChance },
  109. { type = 'Ok', value = library.flags.okChance },
  110. { type = 'Bad', value = library.flags.badChance },
  111. { type = 'Miss' , value = library.flags.missChance },
  112. }
  113.  
  114. table.sort(chances, function(a, b)
  115. return a.value > b.value
  116. end)
  117.  
  118. local sum = 0;
  119. for i = 1, #chances do
  120. sum += chances[i].value
  121. end
  122.  
  123. if sum == 0 then
  124. -- forgot to change this before?
  125. -- fixed 6/5/21
  126.  
  127. return chances[random:NextInteger(1, #chances)].type
  128. end
  129.  
  130. local initialWeight = random:NextInteger(0, sum)
  131. local weight = 0;
  132.  
  133. for i = 1, #chances do
  134. weight = weight + chances[i].value
  135.  
  136. if weight > initialWeight then
  137. return chances[i].type
  138. end
  139. end
  140.  
  141. return 'Sick' -- just incase it fails?
  142. end
  143. end
  144.  
  145. -- autoplayer
  146. do
  147. local map = {
  148. [0] = 'Left',
  149. [1] = 'Down',
  150. [2] = 'Up',
  151. [3] = 'Right',
  152. }
  153.  
  154. local keys = {
  155. Up = Enum.KeyCode.Up;
  156. Down = Enum.KeyCode.Down;
  157. Left = Enum.KeyCode.Left;
  158. Right = Enum.KeyCode.Right;
  159. }
  160.  
  161. local chanceValues = {
  162. Sick = 96,
  163. Good = 92,
  164. Ok = 87,
  165. Bad = 75,
  166. }
  167.  
  168. if shared._unload then
  169. pcall(shared._unload)
  170. end
  171.  
  172. function shared._unload()
  173. if shared._id then
  174. pcall(runService.UnbindFromRenderStep, runService, shared._id)
  175. end
  176.  
  177. if library.open then
  178. library:Close()
  179. end
  180.  
  181. library.base:ClearAllChildren()
  182. library.base:Destroy()
  183. end
  184.  
  185. shared._id = game:GetService('HttpService'):GenerateGUID(false)
  186. runService:BindToRenderStep(shared._id, 1, function()
  187. if (not library.flags.autoPlayer) then return end
  188. if typeof(framework.SongPlayer.CurrentlyPlaying) ~= 'Instance' then return end
  189. if framework.SongPlayer.CurrentlyPlaying.ClassName ~= 'Sound' then return end
  190.  
  191. local arrows = {}
  192. for _, obj in next, framework.UI.ActiveSections do
  193. arrows[#arrows + 1] = obj;
  194. end
  195.  
  196. for idx = 1, #arrows do
  197. local arrow = arrows[idx]
  198. if type(arrow) ~= 'table' then
  199. continue
  200. end
  201.  
  202. if (arrow.Side == framework.UI.CurrentSide) and (not arrow.Marked) and framework.SongPlayer.CurrentlyPlaying.TimePosition > 0 then
  203. local indice = (arrow.Data.Position % 4)
  204. local position = map[indice]
  205.  
  206. if (position) then
  207. local hitboxOffset = 0 do
  208. local settings = framework.Settings;
  209. local offset = type(settings) == 'table' and settings.HitboxOffset;
  210. local value = type(offset) == 'table' and offset.Value;
  211.  
  212. if type(value) == 'number' then
  213. hitboxOffset = value;
  214. end
  215.  
  216. hitboxOffset = hitboxOffset / 1000
  217. end
  218.  
  219. local noteTime = (1 - math.abs(arrow.Data.Time - (framework.SongPlayer.CurrentlyPlaying.TimePosition + hitboxOffset))) * 100;
  220.  
  221. local result = rollChance()
  222. arrow._hitChance = arrow._hitChance or result;
  223.  
  224. local hitChance = (library.flags.autoPlayerMode == 'Manual' and result or arrow._hitChance)
  225. if hitChance ~= "Miss" and noteTime >= chanceValues[arrow._hitChance] then
  226. fastSpawn(function()
  227. arrow.Marked = true;
  228. fireSignal(scrollHandler, userInputService.InputBegan, { KeyCode = keys[position], UserInputType = Enum.UserInputType.Keyboard }, false)
  229.  
  230. if arrow.Data.Length > 0 then
  231. fastWait(arrow.Data.Length + (library.flags.autoDelay / 1000))
  232. else
  233. fastWait(library.flags.autoDelay / 1000)
  234. end
  235.  
  236. fireSignal(scrollHandler, userInputService.InputEnded, { KeyCode = keys[position], UserInputType = Enum.UserInputType.Keyboard }, false)
  237. arrow.Marked = nil;
  238. end)
  239. end
  240. end
  241. end
  242. end
  243. end)
  244. end
  245.  
  246. -- menu
  247. do
  248. local window = library:CreateWindow('Funky Friday') do
  249. local folder = window:AddFolder('Autoplayer') do
  250. local toggle = folder:AddToggle({ text = 'Autoplayer', flag = 'autoPlayer' })
  251.  
  252. -- Fixed to use toggle:SetState
  253. folder:AddBind({ text = 'Autoplayer toggle', flag = 'autoPlayerToggle', key = Enum.KeyCode.End, callback = function()
  254. toggle:SetState(not toggle.state)
  255. end })
  256.  
  257. folder:AddDivider()
  258. folder:AddList({ text = 'Autoplayer mode', flag = 'autoPlayerMode', values = { 'Chances', 'Manual' } })
  259. folder:AddDivider()
  260. folder:AddSlider({ text = 'Sick %', flag = 'sickChance', min = 0, max = 100, value = 100 })
  261. folder:AddSlider({ text = 'Good %', flag = 'goodChance', min = 0, max = 100, value = 0 })
  262. folder:AddSlider({ text = 'Ok %', flag = 'okChance', min = 0, max = 100, value = 0 })
  263. folder:AddSlider({ text = 'Bad %', flag = 'badChance', min = 0, max = 100, value = 0 })
  264. folder:AddSlider({ text = 'Miss %', flag = 'missChance', min = 0, max = 100, value = 0 })
  265. folder:AddSlider({ text = 'Release delay (ms)', flag = 'autoDelay', min = 0, max = 350, value = 50 })
  266. end
  267.  
  268. local folder = window:AddFolder('Manual keybinds') do
  269. folder:AddBind({ text = 'Sick', flag = 'sickBind', key = Enum.KeyCode.One, hold = true, callback = function(val) library.flags.sickHeld = (not val) end, })
  270. folder:AddBind({ text = 'Good', flag = 'goodBind', key = Enum.KeyCode.Two, hold = true, callback = function(val) library.flags.goodHeld = (not val) end, })
  271. folder:AddBind({ text = 'Ok', flag = 'okBind', key = Enum.KeyCode.Three, hold = true, callback = function(val) library.flags.okayHeld = (not val) end, })
  272. folder:AddBind({ text = 'Bad', flag = 'badBind', key = Enum.KeyCode.Four, hold = true, callback = function(val) library.flags.missHeld = (not val) end, })
  273. end
  274.  
  275. local folder = window:AddFolder('Credits') do
  276. folder:AddLabel({ text = 'Jan - UI library' })
  277. folder:AddLabel({ text = 'wally - Script' })
  278. folder:AddLabel({ text = 'Sezei - Contributor'})
  279. end
  280.  
  281. window:AddLabel({ text = 'Version 1.5a' })
  282. window:AddLabel({ text = 'Updated 9/26/21' })
  283. window:AddDivider()
  284. window:AddButton({ text = 'Unload script', callback = function()
  285. shared._unload()
  286. end })
  287. window:AddButton({ text = 'Copy discord', callback = function()
  288. setclipboard("https://wally.cool/discord")
  289. end })
  290. window:AddDivider()
  291. window:AddBind({ text = 'Menu toggle', key = Enum.KeyCode.Delete, callback = function() library:Close() end })
  292. end
  293.  
  294. library:Init()
  295. end
Advertisement
Add Comment
Please, Sign In to add comment