Bed Wars
Bed Wars
if shared.VapeExecuted then
error("Vape Already Injected")
return
else
shared.VapeExecuted = true
end
shared.GuiLibrary = GuiLibrary
local workspace = game:GetService("Workspace")
local cam = workspace.CurrentCamera
local selfdestruct = false
local GUI = GuiLibrary.CreateMainWindow()
local Combat = GuiLibrary.CreateWindow("Combat", "vape/assets/CombatIcon.png", 15,
UDim2.new(0, 223, 0, 6), false)
local Blatant = GuiLibrary.CreateWindow("Blatant", "vape/assets/BlatantIcon.png",
16, UDim2.new(0, 223, 0, 6), false)
local Render = GuiLibrary.CreateWindow("Render", "vape/assets/RenderIcon.png", 17,
UDim2.new(0, 223, 0, 6), false)
local Utility = GuiLibrary.CreateWindow("Utility", "vape/assets/UtilityIcon.png",
17, UDim2.new(0, 223, 0, 6), false)
local World = GuiLibrary.CreateWindow("World", "vape/assets/WorldIcon.png", 16,
UDim2.new(0, 223, 0, 6), false)
local Other = GuiLibrary.CreateWindow("Other", "vape/assets/OtherIcon.png", 20,
UDim2.new(0, 223, 0, 6), false)
local Friends = GuiLibrary.CreateWindow2("Friends", "vape/assets/FriendsIcon.png",
17, UDim2.new(0, 177, 0, 6), false)
local Profiles = GuiLibrary.CreateWindow2("Profiles",
"vape/assets/ProfilesIcon.png", 19, UDim2.new(0, 177, 0, 6), false)
GUI.CreateDivider()
GUI.CreateButton("Combat", function() Combat.SetVisible(true) end, function()
Combat.SetVisible(false) end, "vape/assets/CombatIcon.png", 15)
GUI.CreateButton("Blatant", function() Blatant.SetVisible(true) end, function()
Blatant.SetVisible(false) end, "vape/assets/BlatantIcon.png", 16)
GUI.CreateButton("Render", function() Render.SetVisible(true) end, function()
Render.SetVisible(false) end, "vape/assets/RenderIcon.png", 17)
GUI.CreateButton("Utility", function() Utility.SetVisible(true) end, function()
Utility.SetVisible(false) end, "vape/assets/UtilityIcon.png", 17)
GUI.CreateButton("World", function() World.SetVisible(true) end, function()
World.SetVisible(false) end, "vape/assets/WorldIcon.png", 16)
GUI.CreateButton("Other", function() Other.SetVisible(true) end, function()
Other.SetVisible(false) end, "vape/assets/OtherIcon.png", 20)
GUI.CreateDivider("MISC")
GUI.CreateButton("Friends", function() Friends.SetVisible(true) end, function()
Friends.SetVisible(false) end)
GUI.CreateButton("Profiles", function() Profiles.SetVisible(true) end, function()
Profiles.SetVisible(false) end)
local FriendsTextList = {["RefreshValues"] = function() end}
FriendsTextList = Friends.CreateTextList("FriendsList", "Username / Alias",
function(user) end, function(num) end, function(obj)
local friendcircle = Instance.new("Frame")
friendcircle.Size = UDim2.new(0, 10, 0, 10)
friendcircle.Name = "FriendCircle"
friendcircle.BackgroundColor3 = Color3.fromHSV(0.44, 1, 1)
friendcircle.BorderSizePixel = 0
friendcircle.Position = UDim2.new(0, 10, 0, 13)
friendcircle.Parent = obj
local friendcorner = Instance.new("UICorner")
friendcorner.CornerRadius = UDim.new(0, 8)
friendcorner.Parent = friendcircle
obj.ItemText.Position = UDim2.new(0, 36, 0, 0)
obj.ItemText.Size = UDim2.new(0, 157, 0, 33)
end)
Friends.CreateColorSlider("Friends Color", function(val)
pcall(function()
FriendsTextList["Object"].AddBoxBKG.AddButton.ImageColor3 =
Color3.fromHSV(val, 1, 1)
end)
for i, v in
pairs(FriendsTextList["ScrollingObject"].ScrollingFrame:GetChildren()) do
pcall(function()
if v:IsA("Frame") then
v.FriendCircle.BackgroundColor3 = Color3.fromHSV(val, 1, 1)
end
end)
end
end)
Friends.CreateToggle("Use Friends", function() end, function() end, false, "")
Friends.CreateToggle("Use Roblox Friends", function() end, function() end, false,
"")
Friends.CreateToggle("Use color", function() end, function() end, false, "")
local ProfilesTextList = {["RefreshValues"] = function() end}
ProfilesTextList = Profiles.CreateTextList("ProfilesList", "Type name",
function(user)
GuiLibrary["Profiles"][user] = {["Keybind"] = "", ["Selected"] = false}
end, function(num)
if #ProfilesTextList["ObjectList"] == 0 then
table.insert(ProfilesTextList["ObjectList"], "default")
ProfilesTextList["RefreshValues"](ProfilesTextList["ObjectList"])
end
end, function(obj, profilename)
if GuiLibrary["Profiles"][profilename] == nil then
GuiLibrary["Profiles"][profilename] = {["Keybind"] = ""}
end
obj.MouseButton1Click:connect(function()
GuiLibrary["SwitchProfile"](profilename)
end)
local newsize = UDim2.new(0, 20, 0, 21)
local bindbkg = Instance.new("TextButton")
bindbkg.Text = ""
bindbkg.AutoButtonColor = false
bindbkg.Size = UDim2.new(0, 20, 0, 21)
bindbkg.Position = UDim2.new(1, -50, 0, 6)
bindbkg.BorderSizePixel = 0
bindbkg.BackgroundColor3 = Color3.fromRGB(54, 53, 54)
bindbkg.Visible = true
bindbkg.Parent = obj
local bindimg = Instance.new("ImageLabel")
bindimg.Image = getcustomassetfunc("vape/assets/KeybindIcon.png")
bindimg.BackgroundTransparency = 1
bindimg.Size = UDim2.new(0, 12, 0, 12)
bindimg.Position = UDim2.new(0, 4, 0, 5)
bindimg.Active = false
bindimg.Visible = (GuiLibrary["Profiles"][profilename]["Keybind"] ==
"")
bindimg.Parent = bindbkg
local bindtext = Instance.new("TextLabel")
bindtext.Active = false
bindtext.BackgroundTransparency = 1
bindtext.TextSize = 16
bindtext.Parent = bindbkg
bindtext.Font = Enum.Font.SourceSans
bindtext.Size = UDim2.new(1, 0, 1, 0)
bindtext.TextColor3 = Color3.fromRGB(201, 201, 201)
bindtext.Visible = (GuiLibrary["Profiles"][profilename]["Keybind"] ~=
"")
local bindtext2 = Instance.new("TextLabel")
bindtext2.Text = "PRESS A KEY TO BIND"
bindtext2.Size = UDim2.new(0, 150, 0, 33)
bindtext2.Font = Enum.Font.SourceSans
bindtext2.TextSize = 17
bindtext2.TextColor3 = Color3.fromRGB(201, 201, 201)
bindtext2.BackgroundColor3 = Color3.fromRGB(37, 37, 37)
bindtext2.BorderSizePixel = 0
bindtext2.Visible = false
bindtext2.Parent = obj
local bindround = Instance.new("UICorner")
bindround.CornerRadius = UDim.new(0, 4)
bindround.Parent = bindbkg
bindbkg.MouseButton1Click:connect(function()
if GuiLibrary["KeybindCaptured"] == false then
GuiLibrary["KeybindCaptured"] = true
spawn(function()
bindtext2.Visible = true
repeat wait() until GuiLibrary["PressedKeybindKey"]
~= ""
local key = (GuiLibrary["PressedKeybindKey"] ==
GuiLibrary["Profiles"][profilename]["Keybind"] and "" or
GuiLibrary["PressedKeybindKey"])
if key == "" then
GuiLibrary["Profiles"][profilename]["Keybind"]
= key
newsize = UDim2.new(0, 20, 0, 21)
bindbkg.Size = newsize
bindbkg.Visible = true
bindbkg.Position = UDim2.new(1, -(30 +
newsize.X.Offset), 0, 6)
bindimg.Visible = true
bindtext.Visible = false
bindtext.Text = key
else
local textsize =
game:GetService("TextService"):GetTextSize(key, 16, bindtext.Font,
Vector2.new(99999, 99999))
newsize = UDim2.new(0, 13 + textsize.X, 0, 21)
GuiLibrary["Profiles"][profilename]["Keybind"]
= key
bindbkg.Visible = true
bindbkg.Size = newsize
bindbkg.Position = UDim2.new(1, -(30 +
newsize.X.Offset), 0, 6)
bindimg.Visible = false
bindtext.Visible = true
bindtext.Text = key
end
GuiLibrary["PressedKeybindKey"] = ""
GuiLibrary["KeybindCaptured"] = false
bindtext2.Visible = false
end)
end
end)
bindbkg.MouseEnter:connect(function()
bindimg.Image = getcustomassetfunc("vape/assets/PencilIcon.png")
bindimg.Visible = true
bindtext.Visible = false
bindbkg.Size = UDim2.new(0, 20, 0, 21)
bindbkg.Position = UDim2.new(1, -50, 0, 6)
end)
bindbkg.MouseLeave:connect(function()
bindimg.Image = getcustomassetfunc("vape/assets/KeybindIcon.png")
if GuiLibrary["Profiles"][profilename]["Keybind"] ~= "" then
bindimg.Visible = false
bindtext.Visible = true
bindbkg.Size = newsize
bindbkg.Position = UDim2.new(1, -(30 + newsize.X.Offset),
0, 6)
end
end)
if GuiLibrary["Profiles"][profilename]["Keybind"] ~= "" then
bindtext.Text = GuiLibrary["Profiles"][profilename]["Keybind"]
local textsize =
game:GetService("TextService"):GetTextSize(GuiLibrary["Profiles"][profilename]
["Keybind"], 16, bindtext.Font, Vector2.new(99999, 99999))
newsize = UDim2.new(0, 13 + textsize.X, 0, 21)
bindbkg.Size = newsize
bindbkg.Position = UDim2.new(1, -(30 + newsize.X.Offset), 0, 6)
end
end)
GUI.CreateDivider()
---GUI.CreateCustomButton("Favorites", "vape/assets/FavoritesListIcon.png",
UDim2.new(0, 17, 0, 14), function() end, function() end)
--GUI.CreateCustomButton("Text GUIVertical", "vape/assets/TextGUIIcon3.png",
UDim2.new(1, -56, 0, 15), function() end, function() end)
local TextGui = GuiLibrary.CreateCustomWindow("Text GUI",
"vape/assets/TextGUIIcon1.png", 21, UDim2.new(0, 177, 0, 6), false)
--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")
GUI.CreateCustomToggle("Text GUI", "vape/assets/TextGUIIcon3.png", function()
TextGui.SetVisible(true) end, function() TextGui.SetVisible(false) end, false,
"OptionsButton", 2)
GuiLibrary["UpdateHudEvent"].Event:connect(UpdateHud)
TextGui.CreateToggle("Watermark", function()
onething.Visible = true
if (TextGui.GetCustomChildren().Parent.Position.X.Offset +
TextGui.GetCustomChildren().Parent.Size.X.Offset / 2) >= (cam.ViewportSize.X / 2)
then
onetext.TextXAlignment = Enum.TextXAlignment.Right
onetext2.TextXAlignment = Enum.TextXAlignment.Right
onetext2.Position = UDim2.new(0, 1, 0, 1)
onetext3.TextXAlignment = Enum.TextXAlignment.Right
onetext4.TextXAlignment = Enum.TextXAlignment.Right
onething.Position = UDim2.new(1, -142, 0, 8)
onetext.Position = UDim2.new(1, -154, 0, (onething.Visible and 35 or
5))
else
onetext.TextXAlignment = Enum.TextXAlignment.Left
onetext2.TextXAlignment = Enum.TextXAlignment.Left
onetext2.Position = UDim2.new(0, 4, 0, 1)
onetext3.TextXAlignment = Enum.TextXAlignment.Left
onetext4.TextXAlignment = Enum.TextXAlignment.Left
onething.Position = UDim2.new(0, 2, 0, 8)
onetext.Position = UDim2.new(0, 6, 0, (onething.Visible and 35 or 5))
end
end, function()
onething.Visible = false
if (TextGui.GetCustomChildren().Parent.Position.X.Offset +
TextGui.GetCustomChildren().Parent.Size.X.Offset / 2) >= (cam.ViewportSize.X / 2)
then
onetext.TextXAlignment = Enum.TextXAlignment.Right
onetext2.TextXAlignment = Enum.TextXAlignment.Right
onetext2.Position = UDim2.new(0, 1, 0, 1)
onetext3.TextXAlignment = Enum.TextXAlignment.Right
onetext4.TextXAlignment = Enum.TextXAlignment.Right
onething.Position = UDim2.new(1, -142, 0, 8)
onetext.Position = UDim2.new(1, -154, 0, (onething.Visible and 35 or
5))
else
onetext.TextXAlignment = Enum.TextXAlignment.Left
onetext2.TextXAlignment = Enum.TextXAlignment.Left
onetext2.Position = UDim2.new(0, 4, 0, 1)
onetext3.TextXAlignment = Enum.TextXAlignment.Left
onetext4.TextXAlignment = Enum.TextXAlignment.Left
onething.Position = UDim2.new(0, 2, 0, 8)
onetext.Position = UDim2.new(0, 6, 0, (onething.Visible and 35 or 5))
end
end)
TextGui.CreateToggle("Shadow", function() onetext2.Visible = true onetext4.Visible
= true onething3.Visible = true end, function() onetext2.Visible = false
onetext4.Visible = false onething3.Visible = false end)
TextGui.CreateToggle("Render background", function()
onething.BackgroundTransparency = 0.5
onething2.BackgroundTransparency = 0.5
onetext.BackgroundTransparency = 0.5
end, function()
onething.BackgroundTransparency = 1
onething2.BackgroundTransparency = 1
onetext.BackgroundTransparency = 1
end)
GUI.CreateDivider2("MODULE SETTINGS")
GUI.CreateToggle("Players", function() end, function() end, true, "")
GUI.CreateToggle("NPCs", function() end, function() end, false, "")
GUI.CreateToggle("Ignore naked", function() end, function() end, false, "")
GUI.CreateToggle("Teams by server", function() end, function() end, false, "")
GUI.CreateToggle("Teams by color", function() end, function() end, true, "")
local MiddleClickInput
GUI.CreateToggle("MiddleClick friends", function()
MiddleClickInput =
game:GetService("UserInputService").InputBegan:connect(function(input1)
if input1.UserInputType == Enum.UserInputType.MouseButton3 then
if mouse.Target.Parent:FindFirstChild("HumanoidRootPart") or
mouse.Target.Parent:IsA("Accessory") and
mouse.Target.Parent.Parent:FindFirstChild("HumanoidRootPart") then
local user = (mouse.Target.Parent:IsA("Accessory") and
mouse.Target.Parent.Parent.Name or mouse.Target.Parent.Name)
if table.find(FriendsTextList["ObjectList"], user) == nil
then
table.insert(FriendsTextList["ObjectList"], user)
FriendsTextList["RefreshValues"]
(FriendsTextList["ObjectList"])
else
table.remove(FriendsTextList["ObjectList"],
table.find(FriendsTextList["ObjectList"], user))
FriendsTextList["RefreshValues"]
(FriendsTextList["ObjectList"])
end
end
end
end)
end, function()
if MiddleClickInput then
MiddleClickInput:Disconnect()
end
end, false, "")
local blatantmode = GUI.CreateToggle("Blatant mode", function()
end, function()
GuiLibrary["UpdateUI"] = function()
pcall(function()
GuiLibrary["ObjectsThatCanBeSaved"]["GUIWindow"]
["Object"].Children.Extras.MainButton.ImageColor3 = (GUI["GetVisibleIcons"]() > 0
and Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 1, 1) or
Color3.fromRGB(199, 199, 199))
GuiLibrary["ObjectsThatCanBeSaved"]["GUIWindow"]
["Object"].Logo1.Logo2.ImageColor3 = Color3.fromHSV(GuiLibrary["Settings"]
["GUIObject"]["Color"], 1, 1)
onething.ImageColor3 = Color3.fromHSV(GuiLibrary["Settings"]
["GUIObject"]["Color"], 1, 1)
onetext.TextColor3 = Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]
["Color"], 1, 1)
local newtext = ""
local newfirst = false
for i2,v2 in pairs(textwithoutthing:split("\n")) do
local rainbowsub = 2
local rainbowcolor = GuiLibrary["Settings"]["GUIObject"]["Color"]
+ (-0.015 * i2)
if rainbowcolor < 0 then rainbowsub = 3 rainbowcolor =
rainbowcolor * 0.25 end
local str = tostring(rainbowcolor)
local newcol = tonumber("0"..string.sub(str, rainbowsub,
string.len(str)))
local newcolor = Color3.fromHSV(newcol, 1, 1)
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>'
newfirst = true
end
onetext.Text = newtext
for i,v in pairs(GuiLibrary["ObjectsThatCanBeSaved"]) do
if v["Type"] == "Button" and v["Api"]["Enabled"] then
v["Object"].ButtonText.TextColor3 =
Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 1, 1)
if v["Object"]:FindFirstChild("ButtonIcon") then
v["Object"].ButtonIcon.ImageColor3 =
Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 1, 1)
end
end
if v["Type"] == "OptionsButton" then
if v["Api"]["Enabled"] then
v["Object"].BackgroundColor3 =
Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 1, 1)
end
end
if v["Type"] == "ExtrasButton" then
if v["Api"]["Enabled"] then
v["Object"].ImageColor3 =
Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 1, 1)
end
end
if v["Type"] == "Toggle" and v["Api"]["Enabled"] then
v["Object"].ToggleFrame1.BackgroundColor3 =
Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 1, 1)
end
if v["Type"] == "Slider" then
v["Object"].Slider.FillSlider.BackgroundColor3 =
Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 1, 1)
v["Object"].Slider.FillSlider.ButtonSlider.ImageColor3 =
Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 1, 1)
end
if v["Type"] == "TwoSlider" then
v["Object"].Slider.FillSlider.BackgroundColor3 =
Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 1, 1)
v["Object"].Slider.ButtonSlider.ImageColor3 =
Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 1, 1)
v["Object"].Slider.ButtonSlider2.ImageColor3 =
Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 1, 1)
end
end
ProfilesTextList["Object"].AddBoxBKG.AddButton.ImageColor3 =
Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 1, 1)
for i3, v3 in
pairs(ProfilesTextList["ScrollingObject"].ScrollingFrame:GetChildren()) do
-- pcall(function()
if v3:IsA("TextButton") and v3.ItemText.Text ==
GuiLibrary["CurrentProfile"] then
v3.BackgroundColor3 =
Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 1, 1)
v3.ImageButton.BackgroundColor3 =
Color3.fromHSV(GuiLibrary["Settings"]["GUIObject"]["Color"], 1, 1)
v3.ItemText.TextColor3 = Color3.new(1, 1, 1)
v3.ItemText.TextStrokeTransparency = 0.75
end
-- end)
end
end)
end
local teleportfunc =
game:GetService("Players").LocalPlayer.OnTeleport:Connect(function(State)
if State == Enum.TeleportState.Started then
GuiLibrary["SaveSettings"]()
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')
end
end)
loadstring(GetURL("AnyGame.vape"))()
if pcall(function() readfile("vape/CustomModules/"..game.PlaceId..".vape") end)
then
loadstring(readfile("vape/CustomModules/"..game.PlaceId..".vape"))()
else
local publicrepo = checkpublicrepo(game.PlaceId)
if publicrepo then
loadstring(publicrepo)()
end
end
GuiLibrary["LoadSettings"]()
if #ProfilesTextList["ObjectList"] == 0 then
table.insert(ProfilesTextList["ObjectList"], "default")
ProfilesTextList["RefreshValues"](ProfilesTextList["ObjectList"])
end
GuiLibrary["UpdateUI"]()
if blatantmode["Enabled"] then
pcall(function()
local frame = GuiLibrary["CreateNotification"]("Blatant Enabled", "Vape
is now in Blatant Mode.", 4, "⚠️")
frame.Frame.BackgroundColor3 = Color3.fromRGB(218, 134, 75)
frame.Frame.Frame.BackgroundColor3 = Color3.fromRGB(218, 134, 75)
end)
end
if not shared.VapeSwitchServers then
GuiLibrary["LoadedAnimation"](welcomemsg["Enabled"])
else
shared.VapeSwitchServers = nil
end
if shared.VapeOpenGui then
GuiLibrary["MainGui"].ClickGui.Visible = true
GuiLibrary["MainBlur"].Enabled = true
shared.VapeOpenGui = nil
end
spawn(function()
while wait(10) do
if not selfdestruct then
GuiLibrary["SaveSettings"]()
end
end
end)