ShanuGaming

Bedwars vape

Jul 2nd, 2024
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.95 KB | None | 0 0
  1. if getgenv and not getgenv().shared then getgenv().shared = {} end
  2. local errorPopupShown = false
  3. local setidentity = syn and syn.set_thread_identity or set_thread_identity or setidentity or setthreadidentity or function() end
  4. local getidentity = syn and syn.get_thread_identity or get_thread_identity or getidentity or getthreadidentity or function() return 8 end
  5. local isfile = isfile or function(file)
  6. local suc, res = pcall(function() return readfile(file) end)
  7. return suc and res ~= nil
  8. end
  9. local delfile = delfile or function(file) writefile(file, "") end
  10.  
  11. local function displayErrorPopup(text, func)
  12. local oldidentity = getidentity()
  13. setidentity(8)
  14. local ErrorPrompt = getrenv().require(game:GetService("CoreGui").RobloxGui.Modules.ErrorPrompt)
  15. local prompt = ErrorPrompt.new("Default")
  16. prompt._hideErrorCode = true
  17. local gui = Instance.new("ScreenGui", game:GetService("CoreGui"))
  18. prompt:setErrorTitle("Vape")
  19. prompt:updateButtons({{
  20. Text = "OK",
  21. Callback = function()
  22. prompt:_close()
  23. if func then func() end
  24. end,
  25. Primary = true
  26. }}, 'Default')
  27. prompt:setParent(gui)
  28. prompt:_open(text)
  29. setidentity(oldidentity)
  30. end
  31.  
  32. local function vapeGithubRequest(scripturl)
  33. if not isfile("vape/"..scripturl) then
  34. local suc, res
  35. task.delay(15, function()
  36. if not res and not errorPopupShown then
  37. errorPopupShown = true
  38. displayErrorPopup("The connection to github is taking a while, Please be patient.")
  39. end
  40. end)
  41. suc, res = pcall(function() return game:HttpGet("https://raw.githubusercontent.com/7GrandDadPGN/VapeV4ForRoblox/"..readfile("vape/commithash.txt").."/"..scripturl, true) end)
  42. if not suc or res == "404: Not Found" then
  43. if identifyexecutor and ({identifyexecutor()})[1] == 'Wave' then
  44. displayErrorPopup('Stop using detected garbage, Vape will not work on such garabge until they fix BOTH HttpGet & file functions.')
  45. error(res)
  46. end
  47. displayErrorPopup("Failed to connect to github : vape/"..scripturl.." : "..res)
  48. error(res)
  49. end
  50. if scripturl:find(".lua") then res = "--This watermark is used to delete the file if its cached, remove it to make the file persist after commits.\n"..res end
  51. writefile("vape/"..scripturl, res)
  52. end
  53. return readfile("vape/"..scripturl)
  54. end
  55.  
  56. if not shared.VapeDeveloper then
  57. local commit = "main"
  58. for i,v in pairs(game:HttpGet("https://github.com/7GrandDadPGN/VapeV4ForRoblox"):split("\n")) do
  59. if v:find("commit") and v:find("fragment") then
  60. local str = v:split("/")[5]
  61. commit = str:sub(0, str:find('"') - 1)
  62. break
  63. end
  64. end
  65. if commit then
  66. if isfolder("vape") then
  67. if ((not isfile("vape/commithash.txt")) or (readfile("vape/commithash.txt") ~= commit or commit == "main")) then
  68. for i,v in pairs({"vape/Universal.lua", "vape/MainScript.lua", "vape/GuiLibrary.lua"}) do
  69. if isfile(v) and readfile(v):find("--This watermark is used to delete the file if its cached, remove it to make the file persist after commits.") then
  70. delfile(v)
  71. end
  72. end
  73. if isfolder("vape/CustomModules") then
  74. for i,v in pairs(listfiles("vape/CustomModules")) do
  75. if isfile(v) and readfile(v):find("--This watermark is used to delete the file if its cached, remove it to make the file persist after commits.") then
  76. delfile(v)
  77. end
  78. end
  79. end
  80. if isfolder("vape/Libraries") then
  81. for i,v in pairs(listfiles("vape/Libraries")) do
  82. if isfile(v) and readfile(v):find("--This watermark is used to delete the file if its cached, remove it to make the file persist after commits.") then
  83. delfile(v)
  84. end
  85. end
  86. end
  87. writefile("vape/commithash.txt", commit)
  88. end
  89. else
  90. makefolder("vape")
  91. writefile("vape/commithash.txt", commit)
  92. end
  93. else
  94. displayErrorPopup("Failed to connect to github, please try using a VPN.")
  95. error("Failed to connect to github, please try using a VPN.")
  96. end
  97. end
  98.  
  99. return loadstring(vapeGithubRequest("MainScript.lua"))()
Add Comment
Please, Sign In to add comment