Advertisement
Guest User

Bedwars

a guest
Sep 22nd, 2021
3,458
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 38.03 KB | None | 0 0
  1. repeat wait() until game:IsLoaded() == true
  2.  
  3. local function GetURL(scripturl)
  4. if shared.VapeDeveloper then
  5. return readfile("vape/"..scripturl)
  6. else
  7. return game:HttpGet("https://raw.githubusercontent.com/7GrandDadPGN/VapeV4ForRoblox/main/"..scripturl, true)
  8. end
  9. end
  10. local getasset = getsynasset or getcustomasset
  11. if getasset == nil then
  12. getgenv().getcustomasset = function(location) return "rbxasset://"..location end
  13. getasset = getgenv().getcustomasset
  14. end
  15. local queueteleport = syn and syn.queue_on_teleport or queue_on_teleport or fluxus and fluxus.queue_on_teleport
  16. local requestfunc = syn and syn.request or http and http.request or http_request or fluxus and fluxus.request or getgenv().request or request
  17.  
  18. local function checkpublicrepo(id)
  19. local req = requestfunc({
  20. Url = "https://raw.githubusercontent.com/7GrandDadPGN/VapeV4ForRoblox/main/CustomModules/"..id..".vape",
  21. Method = "GET"
  22. })
  23. if req.StatusCode == 200 then
  24. return req.Body
  25. end
  26. return nil
  27. end
  28.  
  29. local function checkassetversion()
  30. local req = requestfunc({
  31. Url = "https://raw.githubusercontent.com/7GrandDadPGN/VapeV4ForRoblox/main/assetsversion.dat",
  32. Method = "GET"
  33. })
  34. if req.StatusCode == 200 then
  35. return req.Body
  36. else
  37. return nil
  38. end
  39. end
  40.  
  41. if not (getasset and requestfunc and queueteleport) then
  42. print("Vape not supported with your exploit.")
  43. return
  44. end
  45.  
  46. if shared.VapeExecuted then
  47. error("Vape Already Injected")
  48. return
  49. else
  50. shared.VapeExecuted = true
  51. end
  52.  
  53. if isfolder("vape") == false then
  54. makefolder("vape")
  55. end
  56. if isfile("vape/assetsversion.dat") == false then
  57. writefile("vape/assetsversion.dat", "1")
  58. end
  59. if isfolder("vape/CustomModules") == false then
  60. makefolder("vape/CustomModules")
  61. end
  62. if isfolder("vape/Profiles") == false then
  63. makefolder("vape/Profiles")
  64. end
  65. local assetver = checkassetversion()
  66. if assetver and assetver > readfile("vape/assetsversion.dat") then
  67. if shared.VapeDeveloper == nil then
  68. if isfolder("vape/assets") then
  69. if delfolder then
  70. delfolder("vape/assets")
  71. end
  72. end
  73. writefile("vape/assetsversion.dat", assetver)
  74. end
  75. end
  76. if isfolder("vape/assets") == false then
  77. makefolder("vape/assets")
  78. end
  79.  
  80. local GuiLibrary = loadstring(GetURL("NewGuiLibrary.lua"))()
  81.  
  82. local function getcustomassetfunc(path)
  83. if not isfile(path) then
  84. spawn(function()
  85. local textlabel = Instance.new("TextLabel")
  86. textlabel.Size = UDim2.new(1, 0, 0, 36)
  87. textlabel.Text = "Downloading "..path
  88. textlabel.BackgroundTransparency = 1
  89. textlabel.TextStrokeTransparency = 0
  90. textlabel.TextSize = 30
  91. textlabel.Font = Enum.Font.SourceSans
  92. textlabel.TextColor3 = Color3.new(1, 1, 1)
  93. textlabel.Position = UDim2.new(0, 0, 0, -36)
  94. textlabel.Parent = GuiLibrary["MainGui"]
  95. repeat wait() until isfile(path)
  96. textlabel:Remove()
  97. end)
  98. local req = requestfunc({
  99. Url = "https://raw.githubusercontent.com/7GrandDadPGN/VapeV4ForRoblox/main/"..path:gsub("vape/assets", "assets"),
  100. Method = "GET"
  101. })
  102. writefile(path, req.Body)
  103. end
  104. return getasset(path)
  105. end
  106.  
  107. shared.GuiLibrary = GuiLibrary
  108. local workspace = game:GetService("Workspace")
  109. local cam = workspace.CurrentCamera
  110. local selfdestruct = false
  111. local GUI = GuiLibrary.CreateMainWindow()
  112. local Combat = GuiLibrary.CreateWindow({
  113. ["Name"] = "Combat",
  114. ["Icon"] = "vape/assets/CombatIcon.png",
  115. ["IconSize"] = 15
  116. })
  117. local Blatant = GuiLibrary.CreateWindow({
  118. ["Name"] = "Blatant",
  119. ["Icon"] = "vape/assets/BlatantIcon.png",
  120. ["IconSize"] = 16
  121. })
  122. local Render = GuiLibrary.CreateWindow({
  123. ["Name"] = "Render",
  124. ["Icon"] = "vape/assets/RenderIcon.png",
  125. ["IconSize"] = 17
  126. })
  127. local Utility = GuiLibrary.CreateWindow({
  128. ["Name"] = "Utility",
  129. ["Icon"] = "vape/assets/UtilityIcon.png",
  130. ["IconSize"] = 17
  131. })
  132. local World = GuiLibrary.CreateWindow({
  133. ["Name"] = "World",
  134. ["Icon"] = "vape/assets/WorldIcon.png",
  135. ["IconSize"] = 16
  136. })
  137. local Friends = GuiLibrary.CreateWindow2({
  138. ["Name"] = "Friends",
  139. ["Icon"] = "vape/assets/FriendsIcon.png",
  140. ["IconSize"] = 17
  141. })
  142. local Profiles = GuiLibrary.CreateWindow2({
  143. ["Name"] = "Profiles",
  144. ["Icon"] = "vape/assets/ProfilesIcon.png",
  145. ["IconSize"] = 19
  146. })
  147. GUI.CreateDivider()
  148. GUI.CreateButton({
  149. ["Name"] = "Combat",
  150. ["Function"] = function(callback) Combat.SetVisible(callback) end,
  151. ["Icon"] = "vape/assets/CombatIcon.png",
  152. ["IconSize"] = 15
  153. })
  154. GUI.CreateButton({
  155. ["Name"] = "Blatant",
  156. ["Function"] = function(callback) Blatant.SetVisible(callback) end,
  157. ["Icon"] = "vape/assets/BlatantIcon.png",
  158. ["IconSize"] = 16
  159. })
  160. GUI.CreateButton({
  161. ["Name"] = "Render",
  162. ["Function"] = function(callback) Render.SetVisible(callback) end,
  163. ["Icon"] = "vape/assets/RenderIcon.png",
  164. ["IconSize"] = 17
  165. })
  166. GUI.CreateButton({
  167. ["Name"] = "Utility",
  168. ["Function"] = function(callback) Utility.SetVisible(callback) end,
  169. ["Icon"] = "vape/assets/UtilityIcon.png",
  170. ["IconSize"] = 17
  171. })
  172. GUI.CreateButton({
  173. ["Name"] = "World",
  174. ["Function"] = function(callback) World.SetVisible(callback) end,
  175. ["Icon"] = "vape/assets/WorldIcon.png",
  176. ["IconSize"] = 16
  177. })
  178. GUI.CreateDivider("MISC")
  179. GUI.CreateButton({
  180. ["Name"] = "Friends",
  181. ["Function"] = function(callback) Friends.SetVisible(callback) end,
  182. })
  183. GUI.CreateButton({
  184. ["Name"] = "Profiles",
  185. ["Function"] = function(callback) Profiles.SetVisible(callback) end,
  186. })
  187. local FriendsTextList = {["RefreshValues"] = function() end}
  188. FriendsTextList = Friends.CreateTextList({
  189. ["Name"] = "FriendsList",
  190. ["TempText"] = "Username / Alias",
  191. ["CustomFunction"] = function(obj)
  192. local friendcircle = Instance.new("Frame")
  193. friendcircle.Size = UDim2.new(0, 10, 0, 10)
  194. friendcircle.Name = "FriendCircle"
  195. friendcircle.BackgroundColor3 = Color3.fromHSV(0.44, 1, 1)
  196. friendcircle.BorderSizePixel = 0
  197. friendcircle.Position = UDim2.new(0, 10, 0, 13)
  198. friendcircle.Parent = obj
  199. local friendcorner = Instance.new("UICorner")
  200. friendcorner.CornerRadius = UDim.new(0, 8)
  201. friendcorner.Parent = friendcircle
  202. obj.ItemText.Position = UDim2.new(0, 36, 0, 0)
  203. obj.ItemText.Size = UDim2.new(0, 157, 0, 33)
  204. end
  205. })
  206. Friends.CreateColorSlider({
  207. ["Name"] = "Friends Color",
  208. ["Function"] = function(val)
  209. pcall(function()
  210. FriendsTextList["Object"].AddBoxBKG.AddButton.ImageColor3 = Color3.fromHSV(val, 1, 1)
  211. end)
  212. for i, v in pairs(FriendsTextList["ScrollingObject"].ScrollingFrame:GetChildren()) do
  213. pcall(function()
  214. if v:IsA("Frame") then
  215. v.FriendCircle.BackgroundColor3 = Color3.fromHSV(val, 1, 1)
  216. end
  217. end)
  218. end
  219. end
  220. })
  221. Friends.CreateToggle({
  222. ["Name"] = "Use Friends",
  223. ["Function"] = function(callback) end,
  224. })
  225. Friends.CreateToggle({
  226. ["Name"] = "Use Roblox Friends",
  227. ["Function"] = function(callback) end,
  228. })
  229. Friends.CreateToggle({
  230. ["Name"] = "Use color",
  231. ["Function"] = function(callback) end,
  232. })
  233. local ProfilesTextList = {["RefreshValues"] = function() end}
  234. ProfilesTextList = Profiles.CreateTextList({
  235. ["Name"] = "ProfilesList",
  236. ["TempText"] = "Type name",
  237. ["AddFunction"] = function(user)
  238. GuiLibrary["Profiles"][user] = {["Keybind"] = "", ["Selected"] = false}
  239. end,
  240. ["RemoveFunction"] = function(num)
  241. if #ProfilesTextList["ObjectList"] == 0 then
  242. table.insert(ProfilesTextList["ObjectList"], "default")
  243. ProfilesTextList["RefreshValues"](ProfilesTextList["ObjectList"])
  244. end
  245. end,
  246. ["CustomFunction"] = function(obj, profilename)
  247. if GuiLibrary["Profiles"][profilename] == nil then
  248. GuiLibrary["Profiles"][profilename] = {["Keybind"] = ""}
  249. end
  250. obj.MouseButton1Click:connect(function()
  251. GuiLibrary["SwitchProfile"](profilename)
  252. end)
  253. local newsize = UDim2.new(0, 20, 0, 21)
  254. local bindbkg = Instance.new("TextButton")
  255. bindbkg.Text = ""
  256. bindbkg.AutoButtonColor = false
  257. bindbkg.Size = UDim2.new(0, 20, 0, 21)
  258. bindbkg.Position = UDim2.new(1, -50, 0, 6)
  259. bindbkg.BorderSizePixel = 0
  260. bindbkg.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  261. bindbkg.BackgroundTransparency = 0.7
  262. bindbkg.Visible = true
  263. bindbkg.Parent = obj
  264. local bindimg = Instance.new("ImageLabel")
  265. bindimg.Image = getcustomassetfunc("vape/assets/KeybindIcon.png")
  266. bindimg.BackgroundTransparency = 1
  267. bindimg.Size = UDim2.new(0, 12, 0, 12)
  268. bindimg.Position = UDim2.new(0, 4, 0, 5)
  269. bindimg.ImageTransparency = 0.2
  270. bindimg.Active = false
  271. bindimg.Visible = (GuiLibrary["Profiles"][profilename]["Keybind"] == "")
  272. bindimg.Parent = bindbkg
  273. local bindtext = Instance.new("TextLabel")
  274. bindtext.Active = false
  275. bindtext.BackgroundTransparency = 1
  276. bindtext.TextSize = 16
  277. bindtext.Parent = bindbkg
  278. bindtext.Font = Enum.Font.SourceSans
  279. bindtext.Size = UDim2.new(1, 0, 1, 0)
  280. bindtext.TextColor3 = Color3.fromRGB(201, 201, 201)
  281. bindtext.Visible = (GuiLibrary["Profiles"][profilename]["Keybind"] ~= "")
  282. local bindtext2 = Instance.new("TextLabel")
  283. bindtext2.Text = "PRESS A KEY TO BIND"
  284. bindtext2.Size = UDim2.new(0, 150, 0, 33)
  285. bindtext2.Font = Enum.Font.SourceSans
  286. bindtext2.TextSize = 17
  287. bindtext2.TextColor3 = Color3.fromRGB(201, 201, 201)
  288. bindtext2.BackgroundColor3 = Color3.fromRGB(37, 37, 37)
  289. bindtext2.BorderSizePixel = 0
  290. bindtext2.Visible = false
  291. bindtext2.Parent = obj
  292. local bindround = Instance.new("UICorner")
  293. bindround.CornerRadius = UDim.new(0, 4)
  294. bindround.Parent = bindbkg
  295. bindbkg.MouseButton1Click:connect(function()
  296. if GuiLibrary["KeybindCaptured"] == false then
  297. GuiLibrary["KeybindCaptured"] = true
  298. spawn(function()
  299. bindtext2.Visible = true
  300. repeat wait() until GuiLibrary["PressedKeybindKey"] ~= ""
  301. local key = (GuiLibrary["PressedKeybindKey"] == GuiLibrary["Profiles"][profilename]["Keybind"] and "" or GuiLibrary["PressedKeybindKey"])
  302. if key == "" then
  303. GuiLibrary["Profiles"][profilename]["Keybind"] = key
  304. newsize = UDim2.new(0, 20, 0, 21)
  305. bindbkg.Size = newsize
  306. bindbkg.Visible = true
  307. bindbkg.Position = UDim2.new(1, -(30 + newsize.X.Offset), 0, 6)
  308. bindimg.Visible = true
  309. bindtext.Visible = false
  310. bindtext.Text = key
  311. else
  312. local textsize = game:GetService("TextService"):GetTextSize(key, 16, bindtext.Font, Vector2.new(99999, 99999))
  313. newsize = UDim2.new(0, 13 + textsize.X, 0, 21)
  314. GuiLibrary["Profiles"][profilename]["Keybind"] = key
  315. bindbkg.Visible = true
  316. bindbkg.Size = newsize
  317. bindbkg.Position = UDim2.new(1, -(30 + newsize.X.Offset), 0, 6)
  318. bindimg.Visible = false
  319. bindtext.Visible = true
  320. bindtext.Text = key
  321. end
  322. GuiLibrary["PressedKeybindKey"] = ""
  323. GuiLibrary["KeybindCaptured"] = false
  324. bindtext2.Visible = false
  325. end)
  326. end
  327. end)
  328. bindbkg.MouseEnter:connect(function()
  329. bindimg.Image = getcustomassetfunc("vape/assets/PencilIcon.png")
  330. bindimg.Visible = true
  331. bindtext.Visible = false
  332. bindbkg.Size = UDim2.new(0, 20, 0, 21)
  333. bindbkg.Position = UDim2.new(1, -50, 0, 6)
  334. end)
  335. bindbkg.MouseLeave:connect(function()
  336. bindimg.Image = getcustomassetfunc("vape/assets/KeybindIcon.png")
  337. if GuiLibrary["Profiles"][profilename]["Keybind"] ~= "" then
  338. bindimg.Visible = false
  339. bindtext.Visible = true
  340. bindbkg.Size = newsize
  341. bindbkg.Position = UDim2.new(1, -(30 + newsize.X.Offset), 0, 6)
  342. end
  343. end)
  344. if GuiLibrary["Profiles"][profilename]["Keybind"] ~= "" then
  345. bindtext.Text = GuiLibrary["Profiles"][profilename]["Keybind"]
  346. local textsize = game:GetService("TextService"):GetTextSize(GuiLibrary["Profiles"][profilename]["Keybind"], 16, bindtext.Font, Vector2.new(99999, 99999))
  347. newsize = UDim2.new(0, 13 + textsize.X, 0, 21)
  348. bindbkg.Size = newsize
  349. bindbkg.Position = UDim2.new(1, -(30 + newsize.X.Offset), 0, 6)
  350. end
  351. if profilename == GuiLibrary["CurrentProfile"] then
  352. obj.BackgroundColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  353. obj.ImageButton.BackgroundColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  354. obj.ItemText.TextColor3 = Color3.new(1, 1, 1)
  355. obj.ItemText.TextStrokeTransparency = 0.75
  356. end
  357. end
  358. })
  359. GUI.CreateDivider()
  360. ---GUI.CreateCustomButton("Favorites", "vape/assets/FavoritesListIcon.png", UDim2.new(0, 17, 0, 14), function() end, function() end)
  361. --GUI.CreateCustomButton("Text GUIVertical", "vape/assets/TextGUIIcon3.png", UDim2.new(1, -56, 0, 15), function() end, function() end)
  362. local TextGui = GuiLibrary.CreateCustomWindow({
  363. ["Name"] = "Text GUI",
  364. ["Icon"] = "vape/assets/TextGUIIcon1.png",
  365. ["IconSize"] = 21
  366. })
  367. --GUI.CreateCustomButton("Text GUI", "vape/assets/TextGUIIcon2.png", UDim2.new(1, -23, 0, 15), function() TextGui.SetVisible(true) end, function() TextGui.SetVisible(false) end, "OptionsButton")
  368. GUI.CreateCustomToggle({
  369. ["Name"] = "Text GUI",
  370. ["Icon"] = "vape/assets/TextGUIIcon3.png",
  371. ["Function"] = function(callback) TextGui.SetVisible(callback) end,
  372. ["Priority"] = 2
  373. })
  374.  
  375. local rainbowval = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromHSV(0, 0, 1)), ColorSequenceKeypoint.new(1, Color3.fromHSV(0, 0, 1))})
  376. local rainbowval2 = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromHSV(0, 0, 0.42)), ColorSequenceKeypoint.new(1, Color3.fromHSV(0, 0, 0.42))})
  377. local rainbowval3 = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromHSV(0, 0, 1)), ColorSequenceKeypoint.new(1, Color3.fromHSV(0, 0, 1))})
  378. local guicolorslider = {["RainbowValue"] = false}
  379.  
  380. local onething = Instance.new("ImageLabel")
  381. onething.Parent = TextGui.GetCustomChildren()
  382. onething.Name = "Logo"
  383. onething.Size = UDim2.new(0, 100, 0, 27)
  384. onething.Position = UDim2.new(1, -140, 0, 3)
  385. onething.BackgroundColor3 = Color3.new(0, 0, 0)
  386. onething.BorderSizePixel = 0
  387. onething.BackgroundTransparency = 1
  388. onething.Visible = false
  389. onething.Image = getcustomassetfunc("vape/assets/VapeLogo3.png")
  390. local onething2 = Instance.new("ImageLabel")
  391. onething2.Parent = onething
  392. onething2.Size = UDim2.new(0, 41, 0, 24)
  393. onething2.Name = "Logo2"
  394. onething2.Position = UDim2.new(1, 0, 0, 1)
  395. onething2.BorderSizePixel = 0
  396. onething2.BackgroundColor3 = Color3.new(0, 0, 0)
  397. onething2.BackgroundTransparency = 1
  398. onething2.Image = getcustomassetfunc("vape/assets/VapeLogo4.png")
  399. local onething3 = onething:Clone()
  400. onething3.ImageColor3 = Color3.new(0, 0, 0)
  401. onething3.ImageTransparency = 0.5
  402. onething3.ZIndex = 0
  403. onething3.Position = UDim2.new(0, 1, 0, 1)
  404. onething3.Visible = false
  405. onething3.Parent = onething
  406. onething3.Logo2.ImageColor3 = Color3.new(0, 0, 0)
  407. onething3.Logo2.ZIndex = 0
  408. onething3.Logo2.ImageTransparency = 0.5
  409. local onetext = Instance.new("TextLabel")
  410. onetext.Parent = TextGui.GetCustomChildren()
  411. onetext.Size = UDim2.new(1, 0, 1, 0)
  412. onetext.Position = UDim2.new(1, -154, 0, 35)
  413. onetext.TextColor3 = Color3.new(1, 1, 1)
  414. onetext.RichText = true
  415. onetext.BackgroundTransparency = 1
  416. onetext.TextXAlignment = Enum.TextXAlignment.Left
  417. onetext.TextYAlignment = Enum.TextYAlignment.Top
  418. onetext.BorderSizePixel = 0
  419. onetext.BackgroundColor3 = Color3.new(0, 0, 0)
  420. onetext.Font = Enum.Font.SourceSans
  421. onetext.Text = ""
  422. onetext.TextSize = 20
  423. local onetext2 = Instance.new("TextLabel")
  424. onetext2.Name = "ExtraText"
  425. onetext2.Parent = onetext
  426. onetext2.Size = UDim2.new(1, 0, 1, 0)
  427. onetext2.Position = UDim2.new(0, 1, 0, 1)
  428. onetext2.BorderSizePixel = 0
  429. onetext2.Visible = false
  430. onetext2.ZIndex = 0
  431. onetext2.Text = ""
  432. onetext2.BackgroundTransparency = 1
  433. onetext2.TextTransparency = 0.5
  434. onetext2.TextXAlignment = Enum.TextXAlignment.Left
  435. onetext2.TextYAlignment = Enum.TextYAlignment.Top
  436. onetext2.TextColor3 = Color3.new(0, 0, 0)
  437. onetext2.Font = Enum.Font.SourceSans
  438. onetext2.TextSize = 20
  439. local onetext3 = onetext:Clone()
  440. onetext3.Name = "ExtraText"
  441. onetext3.Position = UDim2.new(0, 0, 0, 0)
  442. onetext3.TextColor3 = Color3.new(0.65, 0.65, 0.65)
  443. onetext3.Parent = onetext
  444. local onetext4 = onetext3.ExtraText
  445. onetext4.TextColor3 = Color3.new(0, 0, 0)
  446. onetext4.TextTransparency = 0.5
  447. onetext3:GetPropertyChangedSignal("Text"):connect(function() onetext4.Text = onetext3.Text end)
  448. TextGui.GetCustomChildren().Parent:GetPropertyChangedSignal("Position"):connect(function()
  449. if (TextGui.GetCustomChildren().Parent.Position.X.Offset + TextGui.GetCustomChildren().Parent.Size.X.Offset / 2) >= (cam.ViewportSize.X / 2) then
  450. onetext.TextXAlignment = Enum.TextXAlignment.Right
  451. onetext2.TextXAlignment = Enum.TextXAlignment.Right
  452. onetext3.TextXAlignment = Enum.TextXAlignment.Right
  453. onetext4.TextXAlignment = Enum.TextXAlignment.Right
  454. onetext2.Position = UDim2.new(0, 1, 0, 1)
  455. onething.Position = UDim2.new(1, -142, 0, 8)
  456. onetext.Position = UDim2.new(1, -154, 0, (onething.Visible and 35 or 5))
  457. else
  458. onetext.TextXAlignment = Enum.TextXAlignment.Left
  459. onetext2.TextXAlignment = Enum.TextXAlignment.Left
  460. onetext2.Position = UDim2.new(0, 4, 0, 1)
  461. onetext3.TextXAlignment = Enum.TextXAlignment.Left
  462. onetext4.TextXAlignment = Enum.TextXAlignment.Left
  463. onething.Position = UDim2.new(0, 2, 0, 8)
  464. onetext.Position = UDim2.new(0, 6, 0, (onething.Visible and 35 or 5))
  465. end
  466. end)
  467.  
  468. onething.Visible = true onetext.Position = UDim2.new(0, 0, 0, 35)
  469.  
  470. local sortingmethod = "Alphabetical"
  471. local textwithoutthing = ""
  472. local function getSpaces(str)
  473. local strSize = game:GetService("TextService"):GetTextSize(str, 20, Enum.Font.SourceSans, Vector2.new(10000, 10000))
  474. return math.ceil(strSize.X / 3)
  475. end
  476. local function UpdateHud()
  477. local text = ""
  478. local text2 = ""
  479. local tableofmodules = {}
  480. local first = true
  481.  
  482. for i,v in pairs(GuiLibrary["ObjectsThatCanBeSaved"]) do
  483. if v["Type"] == "OptionsButton" and v["Api"]["Name"] ~= "Text GUI" then
  484. if v["Api"]["Enabled"] then
  485. table.insert(tableofmodules, {["Text"] = v["Api"]["Name"], ["ExtraText"] = v["Api"]["GetExtraText"]})
  486. end
  487. end
  488. end
  489. if sortingmethod == "Alphabetical" then
  490. table.sort(tableofmodules, function(a, b) return a["Text"]:lower() < b["Text"]:lower() end)
  491. end
  492. for i2,v2 in pairs(tableofmodules) do
  493. if first then
  494. text = v2["Text"]..string.rep(" ", getSpaces(v2["ExtraText"]()))
  495. text2 = string.rep(" ", getSpaces(v2["Text"]))..v2["ExtraText"]()
  496. first = false
  497. else
  498. text = text..'\n'..v2["Text"]..string.rep(" ", getSpaces(v2["ExtraText"]()))
  499. text2 = text2..'\n'..string.rep(" ", getSpaces(v2["Text"]))..v2["ExtraText"]()
  500. end
  501. end
  502. textwithoutthing = text
  503. onetext.Text = text
  504. onetext2.Text = text
  505. onetext3.Text = text2
  506. local newsize = game:GetService("TextService"):GetTextSize(text, onetext.TextSize, onetext.Font, Vector2.new(1000000, 1000000))
  507. onetext.Size = UDim2.new(0, 154, 0, newsize.Y)
  508. onetext3.Size = UDim2.new(0, 154, 0, newsize.Y)
  509. if TextGui.GetCustomChildren().Parent then
  510. if (TextGui.GetCustomChildren().Parent.Position.X.Offset + TextGui.GetCustomChildren().Parent.Size.X.Offset / 2) >= (cam.ViewportSize.X / 2) then
  511. onetext.TextXAlignment = Enum.TextXAlignment.Right
  512. onetext2.Position = UDim2.new(0, 1, 0, 1)
  513. onetext2.TextXAlignment = Enum.TextXAlignment.Right
  514. onetext3.TextXAlignment = Enum.TextXAlignment.Right
  515. onetext4.TextXAlignment = Enum.TextXAlignment.Right
  516. onething.Position = UDim2.new(1, -142, 0, 8)
  517. onetext.Position = UDim2.new(1, -154, 0, (onething.Visible and 35 or 5))
  518. else
  519. onetext.TextXAlignment = Enum.TextXAlignment.Left
  520. onetext2.TextXAlignment = Enum.TextXAlignment.Left
  521. onetext2.Position = UDim2.new(0, 4, 0, 1)
  522. onetext3.TextXAlignment = Enum.TextXAlignment.Left
  523. onetext4.TextXAlignment = Enum.TextXAlignment.Left
  524. onething.Position = UDim2.new(0, 2, 0, 8)
  525. onetext.Position = UDim2.new(0, 6, 0, (onething.Visible and 35 or 5))
  526. end
  527. end
  528. end
  529.  
  530. GuiLibrary["UpdateHudEvent"].Event:connect(UpdateHud)
  531.  
  532. TextGui.CreateToggle({
  533. ["Name"] = "Watermark",
  534. ["Function"] = function(callback)
  535. if callback then
  536. onething.Visible = true
  537. if (TextGui.GetCustomChildren().Parent.Position.X.Offset + TextGui.GetCustomChildren().Parent.Size.X.Offset / 2) >= (cam.ViewportSize.X / 2) then
  538. onetext.TextXAlignment = Enum.TextXAlignment.Right
  539. onetext2.TextXAlignment = Enum.TextXAlignment.Right
  540. onetext2.Position = UDim2.new(0, 1, 0, 1)
  541. onetext3.TextXAlignment = Enum.TextXAlignment.Right
  542. onetext4.TextXAlignment = Enum.TextXAlignment.Right
  543. onething.Position = UDim2.new(1, -142, 0, 8)
  544. onetext.Position = UDim2.new(1, -154, 0, (onething.Visible and 35 or 5))
  545. else
  546. onetext.TextXAlignment = Enum.TextXAlignment.Left
  547. onetext2.TextXAlignment = Enum.TextXAlignment.Left
  548. onetext2.Position = UDim2.new(0, 4, 0, 1)
  549. onetext3.TextXAlignment = Enum.TextXAlignment.Left
  550. onetext4.TextXAlignment = Enum.TextXAlignment.Left
  551. onething.Position = UDim2.new(0, 2, 0, 8)
  552. onetext.Position = UDim2.new(0, 6, 0, (onething.Visible and 35 or 5))
  553. end
  554. else
  555. onething.Visible = false
  556. if (TextGui.GetCustomChildren().Parent.Position.X.Offset + TextGui.GetCustomChildren().Parent.Size.X.Offset / 2) >= (cam.ViewportSize.X / 2) then
  557. onetext.TextXAlignment = Enum.TextXAlignment.Right
  558. onetext2.TextXAlignment = Enum.TextXAlignment.Right
  559. onetext2.Position = UDim2.new(0, 1, 0, 1)
  560. onetext3.TextXAlignment = Enum.TextXAlignment.Right
  561. onetext4.TextXAlignment = Enum.TextXAlignment.Right
  562. onething.Position = UDim2.new(1, -142, 0, 8)
  563. onetext.Position = UDim2.new(1, -154, 0, (onething.Visible and 35 or 5))
  564. else
  565. onetext.TextXAlignment = Enum.TextXAlignment.Left
  566. onetext2.TextXAlignment = Enum.TextXAlignment.Left
  567. onetext2.Position = UDim2.new(0, 4, 0, 1)
  568. onetext3.TextXAlignment = Enum.TextXAlignment.Left
  569. onetext4.TextXAlignment = Enum.TextXAlignment.Left
  570. onething.Position = UDim2.new(0, 2, 0, 8)
  571. onetext.Position = UDim2.new(0, 6, 0, (onething.Visible and 35 or 5))
  572. end
  573. end
  574. end
  575. })
  576. TextGui.CreateToggle({
  577. ["Name"] = "Shadow",
  578. ["Function"] = function(callback) onetext2.Visible = callback onetext4.Visible = callback onething3.Visible = callback end
  579. })
  580. TextGui.CreateToggle({
  581. ["Name"] = "Render background",
  582. ["Function"] = function(callback)
  583. if callback then
  584. onething.BackgroundTransparency = 0.5
  585. onething2.BackgroundTransparency = 0.5
  586. onetext.BackgroundTransparency = 0.5
  587. else
  588. onething.BackgroundTransparency = 1
  589. onething2.BackgroundTransparency = 1
  590. onetext.BackgroundTransparency = 1
  591. end
  592. end
  593. })
  594.  
  595. local TargetInfo = GuiLibrary.CreateCustomWindow({
  596. ["Name"] = "Target Info",
  597. ["Icon"] = "vape/assets/TargetInfoIcon1.png",
  598. ["IconSize"] = 16
  599. })
  600. local targetinfobkg1 = Instance.new("Frame")
  601. targetinfobkg1.BackgroundColor3 = Color3.fromRGB(26, 25, 26)
  602. targetinfobkg1.BorderSizePixel = 0
  603. targetinfobkg1.Size = UDim2.new(0, 220, 0, 72)
  604. targetinfobkg1.Position = UDim2.new(0, 0, 0, 0)
  605. targetinfobkg1.Parent = TargetInfo.GetCustomChildren()
  606. local targetinfobkg2 = targetinfobkg1:Clone()
  607. targetinfobkg2.ZIndex = 0
  608. targetinfobkg2.Position = UDim2.new(0, 0, 0, -6)
  609. targetinfobkg2.Size = UDim2.new(0, 220, 0, 86)
  610. targetinfobkg2.Parent = targetinfobkg1
  611. local targetinfobkg3 = Instance.new("Frame")
  612. targetinfobkg3.BackgroundColor3 = Color3.fromRGB(31, 30, 31)
  613. targetinfobkg3.Size = UDim2.new(0, 220, 0, 80)
  614. targetinfobkg3.Position = UDim2.new(0, 0, 0, -5)
  615. targetinfobkg3.Name = "MainInfo"
  616. targetinfobkg3.Parent = targetinfobkg1
  617. local targetname = Instance.new("TextLabel")
  618. targetname.TextSize = 17
  619. targetname.Font = Enum.Font.SourceSans
  620. targetname.TextColor3 = Color3.new(1, 1, 1)
  621. targetname.Position = UDim2.new(0, 72, 0, 6)
  622. targetname.BackgroundTransparency = 1
  623. targetname.Size = UDim2.new(0, 80, 0, 14)
  624. targetname.TextScaled = true
  625. targetname.Text = "Target name"
  626. targetname.ZIndex = 2
  627. targetname.TextXAlignment = Enum.TextXAlignment.Left
  628. targetname.TextYAlignment = Enum.TextYAlignment.Top
  629. targetname.Parent = targetinfobkg3
  630. local targethealth = Instance.new("TextLabel")
  631. targethealth.TextColor3 = Color3.fromRGB(95, 94, 95)
  632. targethealth.Font = Enum.Font.SourceSans
  633. targethealth.Size = UDim2.new(0, 0, 0, 0)
  634. targethealth.TextSize = 17
  635. targethealth.Position = UDim2.new(0, 210, 0, 6)
  636. targethealth.BackgroundTransparency = 1
  637. targethealth.Text = '20'..' hp'
  638. targethealth.TextScaled = false
  639. targethealth.ZIndex = 2
  640. targethealth.TextXAlignment = Enum.TextXAlignment.Right
  641. targethealth.TextYAlignment = Enum.TextYAlignment.Top
  642. targethealth.Parent = targetinfobkg3
  643. local targethealthbkg = Instance.new("Frame")
  644. targethealthbkg.BackgroundColor3 = Color3.fromRGB(43, 42, 43)
  645. targethealthbkg.Size = UDim2.new(0, 138, 0, 4)
  646. targethealthbkg.Position = UDim2.new(0, 72, 0, 29)
  647. targethealthbkg.Parent = targetinfobkg3
  648. local targethealthgreen = Instance.new("Frame")
  649. targethealthgreen.BackgroundColor3 = Color3.fromRGB(40, 137, 109)
  650. targethealthgreen.Size = UDim2.new(1, 0, 0, 4)
  651. targethealthgreen.Parent = targethealthbkg
  652. local targetimage = Instance.new("ImageLabel")
  653. targetimage.Size = UDim2.new(0, 61, 0, 61)
  654. targetimage.BackgroundTransparency = 1
  655. targetimage.Image = 'rbxthumb://type=AvatarHeadShot&id='..game:GetService("Players").LocalPlayer.UserId..'&w=420&h=420'
  656. targetimage.Position = UDim2.new(0, 5, 0, 10)
  657. targetimage.Parent = targetinfobkg3
  658. local round1 = Instance.new("UICorner")
  659. round1.CornerRadius = UDim.new(0, 4)
  660. round1.Parent = targetinfobkg2
  661. local round2 = Instance.new("UICorner")
  662. round2.CornerRadius = UDim.new(0, 4)
  663. round2.Parent = targetinfobkg3
  664. local round3 = Instance.new("UICorner")
  665. round3.CornerRadius = UDim.new(0, 4)
  666. round3.Parent = targethealthbkg
  667. local round4 = Instance.new("UICorner")
  668. round4.CornerRadius = UDim.new(0, 4)
  669. round4.Parent = targethealthgreen
  670. local round5 = Instance.new("UICorner")
  671. round5.CornerRadius = UDim.new(0, 4)
  672. round5.Parent = targetimage
  673. TargetInfo.GetCustomChildren().Parent:GetPropertyChangedSignal("Size"):connect(function()
  674. if TargetInfo.GetCustomChildren().Parent.Size ~= UDim2.new(0, 220, 0, 0) then
  675. targetinfobkg3.Position = UDim2.new(0, 0, 0, -5)
  676. targetinfobkg2.BackgroundTransparency = 0
  677. targetinfobkg1.BackgroundTransparency = 0
  678. else
  679. targetinfobkg3.Position = UDim2.new(0, 0, 0, 0)
  680. targetinfobkg2.BackgroundTransparency = 1
  681. targetinfobkg1.BackgroundTransparency = 1
  682. end
  683. end)
  684. shared.VapeTargetInfo = {
  685. ["UpdateInfo"] = function(tab, targetsize)
  686. targetinfobkg3.Visible = (targetsize > 0) or (TargetInfo.GetCustomChildren().Parent.Size ~= UDim2.new(0, 220, 0, 0))
  687. for i,v in pairs(tab) do
  688. targetimage.Image = 'rbxthumb://type=AvatarHeadShot&id='..v["UserId"]..'&w=420&h=420'
  689. targethealthgreen:TweenSize(UDim2.new(v["Health"] / v["MaxHealth"], 0, 0, 4), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.05, true)
  690. targethealth.Text = math.floor(v["Health"]).." hp"
  691. targetname.Text = i
  692. end
  693. end,
  694. ["Object"] = TargetInfo
  695. }
  696. GUI.CreateCustomToggle({
  697. ["Name"] = "Target Info",
  698. ["Icon"] = "vape/assets/TargetInfoIcon2.png",
  699. ["Function"] = function(callback) TargetInfo.SetVisible(callback) end,
  700. ["Priority"] = 1
  701. })
  702.  
  703. GUI.CreateDivider2("MODULE SETTINGS")
  704. GUI.CreateToggle({
  705. ["Name"] = "Players",
  706. ["Function"] = function() end,
  707. ["Default"] = true
  708. })
  709. GUI.CreateToggle({
  710. ["Name"] = "NPCs",
  711. ["Function"] = function() end,
  712. })
  713. GUI.CreateToggle({
  714. ["Name"] = "Ignore naked",
  715. ["Function"] = function() end,
  716. })
  717. GUI.CreateToggle({
  718. ["Name"] = "Teams by server",
  719. ["Function"] = function() end,
  720. })
  721. GUI.CreateToggle({
  722. ["Name"] = "Teams by color",
  723. ["Function"] = function() end,
  724. ["Default"] = true
  725. })
  726. local MiddleClickInput
  727. GUI.CreateToggle({
  728. ["Name"] = "MiddleClick friends",
  729. ["Function"] = function(callback)
  730. if callback then
  731. MiddleClickInput = game:GetService("UserInputService").InputBegan:connect(function(input1)
  732. if input1.UserInputType == Enum.UserInputType.MouseButton3 then
  733. if mouse.Target.Parent:FindFirstChild("HumanoidRootPart") or mouse.Target.Parent:IsA("Accessory") and mouse.Target.Parent.Parent:FindFirstChild("HumanoidRootPart") then
  734. local user = (mouse.Target.Parent:IsA("Accessory") and mouse.Target.Parent.Parent.Name or mouse.Target.Parent.Name)
  735. if table.find(FriendsTextList["ObjectList"], user) == nil then
  736. table.insert(FriendsTextList["ObjectList"], user)
  737. FriendsTextList["RefreshValues"](FriendsTextList["ObjectList"])
  738. else
  739. table.remove(FriendsTextList["ObjectList"], table.find(FriendsTextList["ObjectList"], user))
  740. FriendsTextList["RefreshValues"](FriendsTextList["ObjectList"])
  741. end
  742. end
  743. end
  744. end)
  745. else
  746. if MiddleClickInput then
  747. MiddleClickInput:Disconnect()
  748. end
  749. end
  750. end
  751. })
  752. local blatantmode = GUI.CreateToggle({
  753. ["Name"] = "Blatant mode",
  754. ["Function"] = function() end
  755. })
  756. GUI.CreateDivider2("GENERAL SETTINGS")
  757. guicolorslider = GUI.CreateColorSlider("GUI Theme", function(val) GuiLibrary["Settings"]["GUIObject"]["Color"] = val GuiLibrary["UpdateUI"]() end)
  758.  
  759. GuiLibrary["UpdateUI"] = function()
  760. pcall(function()
  761. GuiLibrary["ObjectsThatCanBeSaved"]["GUIWindow"]["Object"].Children.Extras.MainButton.ImageColor3 = (GUI["GetVisibleIcons"]() > 0 and Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9) or Color3.fromRGB(199, 199, 199))
  762. GuiLibrary["ObjectsThatCanBeSaved"]["GUIWindow"]["Object"].Logo1.Logo2.ImageColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  763. onething.ImageColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  764. onetext.TextColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  765. local newtext = ""
  766. local newfirst = false
  767. for i2,v2 in pairs(textwithoutthing:split("\n")) do
  768. local rainbowsub = 2
  769. local rainbowcolor = GuiLibrary["Settings"]["GUIObject"]["Color"] + (GuiLibrary["ObjectsThatCanBeSaved"]["Gui ColorSliderColor"]["Api"]["RainbowValue"] and (-0.015 * i2) or 0)
  770. if rainbowcolor < 0 then rainbowsub = 3 rainbowcolor = rainbowcolor * 0.25 end
  771. local str = tostring(rainbowcolor)
  772. local newcol = tonumber("0"..string.sub(str, rainbowsub, string.len(str)))
  773. local newcolor = Color3.fromHSV(newcol, 0.7, 0.9)
  774. newtext = newtext..(newfirst and "\n" or " ")..'<font color="rgb('..tostring(math.floor(newcolor.R * 255))..","..tostring(math.floor(newcolor.G * 255))..","..tostring(math.floor(newcolor.B * 255))..')">'..v2..'</font>'
  775. newfirst = true
  776. end
  777. onetext.Text = newtext
  778. for i,v in pairs(GuiLibrary["ObjectsThatCanBeSaved"]) do
  779. if (v["Type"] == "Button" or v["Type"] == "ButtonMain") and v["Api"]["Enabled"] then
  780. v["Object"].ButtonText.TextColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  781. if v["Object"]:FindFirstChild("ButtonIcon") then
  782. v["Object"].ButtonIcon.ImageColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  783. end
  784. end
  785. if v["Type"] == "OptionsButton" then
  786. if v["Api"]["Enabled"] then
  787. v["Object"].BackgroundColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  788. end
  789. end
  790. if v["Type"] == "ExtrasButton" then
  791. if v["Api"]["Enabled"] then
  792. v["Object"].ImageColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  793. end
  794. end
  795. if (v["Type"] == "Toggle" or v["Type"] == "ToggleMain") and v["Api"]["Enabled"] then
  796. v["Object"].ToggleFrame1.BackgroundColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  797. end
  798. if v["Type"] == "Slider" then
  799. v["Object"].Slider.FillSlider.BackgroundColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  800. v["Object"].Slider.FillSlider.ButtonSlider.ImageColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  801. end
  802. if v["Type"] == "TwoSlider" then
  803. v["Object"].Slider.FillSlider.BackgroundColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  804. v["Object"].Slider.ButtonSlider.ImageColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  805. v["Object"].Slider.ButtonSlider2.ImageColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  806. end
  807. end
  808. ProfilesTextList["Object"].AddBoxBKG.AddButton.ImageColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  809. for i3, v3 in pairs(ProfilesTextList["ScrollingObject"].ScrollingFrame:GetChildren()) do
  810. -- pcall(function()
  811. if v3:IsA("TextButton") and v3.ItemText.Text == GuiLibrary["CurrentProfile"] then
  812. v3.BackgroundColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  813. v3.ImageButton.BackgroundColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 0.7, 0.9)
  814. v3.ItemText.TextColor3 = Color3.new(1, 1, 1)
  815. v3.ItemText.TextStrokeTransparency = 0.75
  816. end
  817. -- end)
  818. end
  819. end)
  820. end
  821.  
  822. GUI.CreateToggle({
  823. ["Name"] = "Auto-load module states",
  824. ["Function"] = function() end
  825. })
  826. GUI.CreateToggle({
  827. ["Name"] = "Blur Background",
  828. ["Function"] = function(callback) GuiLibrary["MainBlur"].Size = (callback and 25 or 0) end,
  829. ["Default"] = true
  830. })
  831. local rescale = GUI.CreateToggle({
  832. ["Name"] = "Rescale",
  833. ["Function"] = function(callback)
  834. GuiLibrary["MainRescale"].Scale = (callback and math.clamp(cam.ViewportSize.X / 1920, 0.5, 1) or 1)
  835. end,
  836. ["Default"] = true
  837. })
  838. cam:GetPropertyChangedSignal("ViewportSize"):connect(function()
  839. if rescale["Enabled"] then
  840. GuiLibrary["MainRescale"].Scale = math.clamp(cam.ViewportSize.X / 1920, 0.5, 1)
  841. end
  842. end)
  843. GUI.CreateToggle({
  844. ["Name"] = "Enable Multi-Keybinding",
  845. ["Function"] = function() end
  846. })
  847. local welcomemsg = GUI.CreateToggle({
  848. ["Name"] = "GUI bind indicator",
  849. ["Function"] = function() end,
  850. ["Default"] = true
  851. })
  852. GUI.CreateToggle({
  853. ["Name"] = "Show Tooltips",
  854. ["Function"] = function(callback) GuiLibrary["ToggleTooltips"] = callback end,
  855. ["Default"] = true
  856. })
  857. GUI.CreateToggle({
  858. ["Name"] = "Discord integration",
  859. ["Function"] = function() end
  860. })
  861. local ToggleNotifications = {["Object"] = nil}
  862. local Notifications = GUI.CreateToggle({
  863. ["Name"] = "Notifications",
  864. ["Function"] = function(callback)
  865. GuiLibrary["Notifications"] = callback
  866. if ToggleNotifications["Object"] then
  867. ToggleNotifications["Object"].Visible = callback
  868. end
  869. end,
  870. ["Default"] = true
  871. })
  872. ToggleNotifications = GUI.CreateToggle({
  873. ["Name"] = "Toggle Notifications",
  874. ["Function"] = function(callback) GuiLibrary["ToggleNotifications"] = callback end,
  875. ["Default"] = true
  876. })
  877. ToggleNotifications["Object"].BackgroundTransparency = 0
  878. ToggleNotifications["Object"].BorderSizePixel = 0
  879. ToggleNotifications["Object"].BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  880. ToggleNotifications["Object"].Visible = Notifications["Enabled"]
  881.  
  882. local GUIbind = GUI.CreateGUIBind()
  883.  
  884. local teleportfunc = game:GetService("Players").LocalPlayer.OnTeleport:Connect(function(State)
  885. if State == Enum.TeleportState.Started then
  886. GuiLibrary["SaveSettings"]()
  887. queueteleport('shared.VapeSwitchServers = true if shared.VapeDeveloper then loadstring(readfile("vape/NewMainScript.lua"))() else loadstring(game:HttpGet("https://raw.githubusercontent.com/7GrandDadPGN/VapeV4ForRoblox/main/NewMainScript.lua", true))() end')
  888. end
  889. end)
  890.  
  891. GuiLibrary["SelfDestruct"] = function()
  892. selfdestruct = true
  893. GuiLibrary["SaveSettings"]()
  894. for i,v in pairs(GuiLibrary["ObjectsThatCanBeSaved"]) do
  895. if (v["Type"] == "Button" or v["Type"] == "OptionsButton") and v["Api"]["Enabled"] then
  896. v["Api"]["ToggleButton"](false)
  897. end
  898. end
  899. shared.VapeExecuted = nil
  900. shared.VapeSwitchServers = nil
  901. shared.GuiLibrary = nil
  902. GuiLibrary["KeyInputHandler"]:Disconnect()
  903. GuiLibrary["KeyInputHandler2"]:Disconnect()
  904. if MiddleClickInput then
  905. MiddleClickInput:Disconnect()
  906. end
  907. teleportfunc:Disconnect()
  908. GuiLibrary["MainGui"]:Remove()
  909. GuiLibrary["MainBlur"]:Remove()
  910. end
  911.  
  912. GUI.CreateButton2({
  913. ["Name"] = "RESET CURRENT PROFILE",
  914. ["Function"] = function()
  915. GuiLibrary["SelfDestruct"]()
  916. delfile("vape/Profiles/"..(GuiLibrary["CurrentProfile"] == "default" and "" or GuiLibrary["CurrentProfile"])..game.PlaceId..".vapeprofile")
  917. shared.VapeSwitchServers = true
  918. shared.VapeOpenGui = true
  919. loadstring(GetURL("NewMainScript.lua"))()
  920. end
  921. })
  922. GUI.CreateButton2({
  923. ["Name"] = "RESET GUI POSITIONS",
  924. ["Function"] = function()
  925. for i,v in pairs(GuiLibrary["ObjectsThatCanBeSaved"]) do
  926. if (v["Type"] == "Window" or v["Type"] == "CustomWindow") and GuiLibrary["findObjectInTable"](GuiLibrary["ObjectsThatCanBeSaved"], i) then
  927. v["Object"].Position = (i == "GUIWindow" and UDim2.new(0, 6, 0, 6) or UDim2.new(0, 223, 0, 6))
  928. end
  929. end
  930. end
  931. })
  932. GUI.CreateButton2({
  933. ["Name"] = "SORT GUI",
  934. ["Function"] = function()
  935. local sorttable = {}
  936. local num = 229
  937. for i,v in pairs(GuiLibrary["ObjectsThatCanBeSaved"]) do
  938. if (v["Type"] == "Window" or v["Type"] == "CustomWindow") and i ~= "GUIWindow" and GuiLibrary["findObjectInTable"](GuiLibrary["ObjectsThatCanBeSaved"], i) and v["Object"].Visible then
  939. sorttable[#sorttable + (v["Type"] == "CustomWindow" and 100 or 1)] = v["Object"]
  940. end
  941. end
  942. for i2,v2 in pairs(sorttable) do
  943. v2.Position = UDim2.new(0, num, 0, 6)
  944. num = num + 223
  945. end
  946. end
  947. })
  948. GUI.CreateButton2({
  949. ["Name"] = "UNINJECT",
  950. ["Function"] = GuiLibrary["SelfDestruct"]
  951. })
  952.  
  953. loadstring(GetURL("AnyGame.vape"))()
  954. if pcall(function() readfile("vape/CustomModules/"..game.PlaceId..".vape") end) then
  955. loadstring(readfile("vape/CustomModules/"..game.PlaceId..".vape"))()
  956. else
  957. local publicrepo = checkpublicrepo(game.PlaceId)
  958. if publicrepo then
  959. loadstring(publicrepo)()
  960. end
  961. end
  962.  
  963. GuiLibrary["LoadSettings"]()
  964. if #ProfilesTextList["ObjectList"] == 0 then
  965. table.insert(ProfilesTextList["ObjectList"], "default")
  966. ProfilesTextList["RefreshValues"](ProfilesTextList["ObjectList"])
  967. end
  968. GUIbind["Reload"]()
  969. GuiLibrary["UpdateUI"]()
  970. if blatantmode["Enabled"] then
  971. pcall(function()
  972. local frame = GuiLibrary["CreateNotification"]("Blatant Enabled", "Vape is now in Blatant Mode.", 4, "vape/assets/WarningNotification.png")
  973. frame.Frame.BackgroundColor3 = Color3.fromRGB(236, 129, 44)
  974. frame.Frame.Frame.BackgroundColor3 = Color3.fromRGB(236, 129, 44)
  975. end)
  976. end
  977. if not shared.VapeSwitchServers then
  978. GuiLibrary["LoadedAnimation"](welcomemsg["Enabled"])
  979. else
  980. shared.VapeSwitchServers = nil
  981. end
  982. if shared.VapeOpenGui then
  983. GuiLibrary["MainGui"].ClickGui.Visible = true
  984. GuiLibrary["MainBlur"].Enabled = true
  985. shared.VapeOpenGui = nil
  986. end
  987.  
  988. spawn(function()
  989. while wait(10) do
  990. if not selfdestruct then
  991. GuiLibrary["SaveSettings"]()
  992. end
  993. end
  994. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement