Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Library = {
- Windows = {}
- }
- local UserInputService = game:GetService("UserInputService")
- local TweenService = game:GetService("TweenService")
- local CoreGui = game:GetService("CoreGui")
- local Players = game:GetService("Players")
- local Player = Players.LocalPlayer
- local Mouse = Player:GetMouse()
- local _ENV = getgenv()
- local Sounds = {} do
- local SoundService = game:GetService("SoundService")
- local Folder = Instance.new("Folder", SoundService)
- Folder.Name = "Mandy's UI Sounds"
- if SoundService:FindFirstChild(Folder.Name) and SoundService[Folder.Name] ~= Folder then
- SoundService[Folder.Name]:Destroy()
- end
- local Click = Instance.new("Sound", Folder)
- Click.SoundId = "rbxassetid://8388724806"
- local Hit1 = Instance.new("Sound", Folder)
- Hit1.SoundId = "rbxassetid://406913243"
- local Hit2 = Instance.new("Sound", Folder)
- Hit2.SoundId = "rbxassetid://1471213022"
- local lenText = Instance.new("Sound", Folder)
- lenText.SoundId = "rbxassetid://929615155"
- local ShopMusic = Instance.new("Sound", Folder)
- ShopMusic.SoundId = "rbxassetid://1844487326"
- ShopMusic.Volume = 0
- ShopMusic.Looped = true
- ShopMusic:Play()
- Sounds.Hits = {Hit1, Hit2}
- Sounds.lenText = lenText
- Sounds.Click = Click
- Sounds.ShopMusic = ShopMusic
- end
- local ScreenGui do
- local Name = "SimpleWindow-Mandy"
- if CoreGui:FindFirstChild(Name) then
- ScreenGui = CoreGui[Name]
- ScreenGui:ClearAllChildren()
- else
- ScreenGui = Instance.new("ScreenGui", CoreGui)
- ScreenGui.Name = Name
- ScreenGui.IgnoreGuiInset = true
- end
- end
- local Border = Instance.new("Frame", ScreenGui) do
- Border.Size = UDim2.new(0, 48, 0, 48)
- Border.Position = UDim2.new(0, 280, 0, 4)
- Border.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- Border.BackgroundTransparency = 0.3
- Border.ClipsDescendants = true
- Border.Active = true
- local OpenClose = Instance.new("TextButton", Border)
- OpenClose.Size = UDim2.new(0, 40, 0, 40)
- OpenClose.Position = UDim2.new(0, 4, 0.5, 0)
- OpenClose.AnchorPoint = Vector2.new(0, 0.5)
- OpenClose.BackgroundTransparency = 1
- OpenClose.Text = ""
- local Icon = Instance.new("ImageLabel", OpenClose)
- Icon.Size = UDim2.new(1, 0, 1, 0)
- Icon.Position = UDim2.new(0.5, 0, 0.5, 0)
- Icon.AnchorPoint = Vector2.new(0.5, 0.5)
- Icon.BackgroundTransparency = 1
- Icon.Image = "rbxassetid://115839646734512"
- local Scale = Instance.new("UIScale", Icon)
- local Corner = Instance.new("UICorner", OpenClose)
- Corner.CornerRadius = UDim.new(1, 0)
- Corner:Clone().Parent = Border
- local Tweens = {
- Enter = TweenService:Create(Scale, TweenInfo.new(0.1, Enum.EasingStyle.Quint), { Scale = 0.7 }),
- Leave = TweenService:Create(Scale, TweenInfo.new(0.25, Enum.EasingStyle.Quint), { Scale = 1 })
- }
- OpenClose.Activated:Connect(function()
- Tweens.Enter:Play()
- task.delay(0.1, Tweens.Leave.Play, Tweens.Leave)
- if Border:GetAttribute("Opened") then
- Border:SetAttribute("Opened", false)
- OpenClose.BackgroundTransparency = 1
- Border:TweenSize(UDim2.new(0, 48, 0, 48), Enum.EasingDirection.Out, Enum.EasingStyle.Quint, 0.5, true)
- Library:CloseUIs()
- else
- Border:SetAttribute("Opened", true)
- local NewSize = UDim2.new(0, Library:GetButtonsSize() + 48, 0, 48)
- OpenClose.BackgroundTransparency = 0.8
- Border:TweenSize(NewSize, Enum.EasingDirection.Out, Enum.EasingStyle.Quint, 0.5, true)
- end
- end)
- end
- local Container = Instance.new("CanvasGroup", Border) do
- Container.Size = UDim2.new(1, -48, 1, 0)
- Container.Position = UDim2.new(0, 48, 0, 0)
- Container.BorderSizePixel = 0
- Container.BackgroundTransparency = 1
- local Layout = Instance.new("UIListLayout", Container)
- Layout.VerticalAlignment = Enum.VerticalAlignment.Center
- Layout.FillDirection = Enum.FillDirection.Horizontal
- Layout.Padding = UDim.new(0, 10)
- end
- local DisplayTem = Instance.new("TextLabel") do
- DisplayTem.Size = UDim2.new(0, 0, 0, 25)
- DisplayTem.AutomaticSize = Enum.AutomaticSize.X
- DisplayTem.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- DisplayTem.TextSize = 15
- DisplayTem.Font = Enum.Font.GothamMedium
- DisplayTem.TextColor3 = Color3.fromRGB(255, 255, 255)
- DisplayTem.BackgroundTransparency = 0.2
- local Corner = Instance.new("UICorner", DisplayTem)
- end
- function Library:GetButtonsSize(): number
- return (#Container:GetChildren() - 1) * 50
- end
- function Library:CreateWindow(Config: table?): table?
- if type(Config) ~= "table" or not Config.Title then
- return error(`table expected, got {type(Config)}`)
- end
- local Window = {
- Title = Config.Title or Config.Name or "Window",
- InitialPosition = Config.InitialPosition or UDim2.new(0.5, 0, -0.5, 0),
- UISize = Config.UISize or UDim2.new(0.5, 0, 0.7, 0),
- Enabled = false
- }
- local Main = Instance.new("Frame", ScreenGui) do
- Main.Size = Window.UISize
- Main.Position = Window.InitialPosition
- Main.AnchorPoint = Vector2.new(0.5, 0.5)
- Main.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- Main.BackgroundTransparency = 0.3
- Main.Visible = false
- local Corner = Instance.new("UICorner", Main)
- Corner.CornerRadius = UDim.new(0.1, 0)
- local Title = Instance.new("TextLabel", Main)
- Title.Size = UDim2.new(1, 0, 0.1, 0)
- Title.Position = UDim2.new(0, 0, 0, 0)
- Title.BackgroundTransparency = 1
- Title.Text = Window.Title
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.TextScaled = true
- Title.FontFace = Font.fromId(12187371840)
- end
- function Window.ToggleGui()
- self:CloseUIs(Window)
- Window.Enabled = not Main.Visible
- if Config.Callback then
- task.spawn(Config.Callback, Window)
- end
- if Main.Visible then
- Main:TweenPosition(Window.InitialPosition, Enum.EasingDirection.Out, Enum.EasingStyle.Quint, 0.1, true)
- task.wait(0.03)
- Main.Visible = false
- else
- Main.Visible = true
- Main:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.5, true)
- task.wait(0.5)
- if Window.Opened then
- task.spawn(Window.Opened)
- end
- end
- end
- function Window:AddButton(Config)
- local Button = {
- Title = Config.Name or Config.Title or "Button",
- Callback = Config.Callback
- }
- local Container = self:GetContainer()
- local TextButton = Instance.new("TextButton", Container)
- TextButton.Size = UDim2.new(1, 0, 0, 32)
- TextButton.Position = UDim2.new(0.10, 0, 0.15, 0)
- TextButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.TextScaled = true
- TextButton.FontFace = Font.fromId(12187371840)
- TextButton.Text = Button.Title
- TextButton.Name = "Option"
- local Corner = Instance.new("UICorner", TextButton)
- Corner.CornerRadius = UDim.new(0.4, 0)
- TextButton.Activated:Connect(function()
- Sounds.Click:Play()
- if Button.Callback then
- task.spawn(Button.Callback)
- end
- end)
- end
- function Window:AddSection(Config)end
- function Window:AddToggle(Config)
- local Toggle = {
- Title = Config.Name or Config.Title or "Button",
- Callback = Config.Callback,
- Enabled = (Config.ToggleStatus == "On") or Config.Default or false,
- }
- local Container = self:GetContainer()
- local TextButton = Instance.new("TextButton", Container)
- TextButton.Size = UDim2.new(1, 0, 0, 32)
- TextButton.Position = UDim2.new(0.10, 0, 0.15, 0)
- TextButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.TextScaled = true
- TextButton.FontFace = Font.fromId(12187371840)
- TextButton.Text = Toggle.Title .. (Toggle.Enabled and ": On" or ": Off")
- TextButton.Name = "Option"
- local Corner = Instance.new("UICorner", TextButton)
- Corner.CornerRadius = UDim.new(0.4, 0)
- TextButton.Activated:Connect(function()
- Sounds.Click:Play()
- task.spawn(Toggle.SetValue, Toggle)
- end)
- function Toggle:SetValue(Value: boolean?): (nil)
- if Value == nil then
- Value = not self.Enabled
- end
- self.Enabled = Value
- TextButton.Text = self.Title .. (Value and ": On" or ": Off")
- if self.Callback then
- task.spawn(self.Callback, Value, self)
- end
- end
- Toggle:SetValue(Toggle.Enabled)
- return Toggle
- end
- function Window:AddParagraph(Config)
- local Paragraph = {
- Title = Config.Name or Config.Title or "Paragraph",
- Content = Config.Text or Config.Content or "Paragraph"
- }
- local Container = self:GetContainer()
- local Frame = Instance.new("Frame", Container)
- Frame.Size = UDim2.new(1, 0, 0, 32)
- Frame.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- Frame.AutomaticSize = Enum.AutomaticSize.Y
- Frame.Name = "Option"
- local Piece = Instance.new("Frame", Frame)
- Piece.BackgroundTransparency = 1
- Piece.Position = UDim2.new(0, 0, 1, 0)
- Piece.Size = UDim2.new(0, 0, 0, 5)
- local TextLabel1 = Instance.new("TextLabel", Frame)
- TextLabel1.Size = UDim2.new(1, 0, 0, 32)
- TextLabel1.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel1.TextScaled = true
- TextLabel1.FontFace = Font.fromId(12187371840)
- TextLabel1.Text = Paragraph.Title
- TextLabel1.BackgroundTransparency = 1
- local TextLabel2 = Instance.new("TextLabel", Frame)
- TextLabel2.Size = UDim2.new(1, 0, 0, 32)
- TextLabel2.Position = UDim2.new(0, 8, 0, 32)
- TextLabel2.TextColor3 = Color3.fromRGB(200, 200, 200)
- TextLabel2.TextSize = 20
- TextLabel2.FontFace = Font.fromId(12187371840)
- TextLabel2.Text = Paragraph.Content
- TextLabel2.AutomaticSize = Enum.AutomaticSize.Y
- TextLabel2.BackgroundTransparency = 1
- local Corner = Instance.new("UICorner", Frame)
- Corner.CornerRadius = UDim.new(0.4, 0)
- function Paragraph:SetContent(Text: string?): (nil)
- TextLabel2.Text = (type(Text) == "string" and Text) or TextLabel2.Text
- end
- return setmetatable(Paragraph, {
- __newindex = function(self, index, value)
- if index == "Visible" then
- Frame.Visible = value
- return nil
- end
- return rawset(self, index, value)
- end
- })
- end
- function Window:GetContainer()
- if self.Container then
- return self.Container
- end
- local Container = Instance.new("ScrollingFrame", Main) do
- Container.Size = UDim2.new(1, 0, 0.95, -10)
- Container.Position = UDim2.new(1, 0, 1, 0)
- Container.AnchorPoint = Vector2.new(1, 1)
- Container.BackgroundTransparency = 1
- Container.AutomaticCanvasSize = "Y"
- Container.CanvasSize = UDim2.new(0, 0, 0, 0)
- local Padding = Instance.new("UIPadding", Container)
- Padding.PaddingLeft = UDim.new(0, 10)
- Padding.PaddingRight = UDim.new(0, 10)
- Padding.PaddingTop = UDim.new(0, 10)
- Padding.PaddingBottom = UDim.new(0, 10)
- local Layout = Instance.new("UIListLayout", Container)
- Layout.Padding = UDim.new(0, 5)
- end
- self.Container = Container
- return Container
- end
- if Config.Builder then
- Config.Builder(Window, Window:GetContainer())
- end
- table.insert(self.Windows, Window)
- return Window
- end
- function Library:CloseUIs(Except)
- for _,Window in ipairs(self.Windows) do
- if Window.Enabled and Window ~= Except then
- task.spawn(Window.ToggleGui)
- end
- end
- end
- function Library:CreateButtons(Buttons: table?): (nil)
- if type(Buttons) ~= "table" then
- return nil
- end
- for _,Button in ipairs(Buttons) do
- if not Button.Callback then continue end
- local Click = Instance.new("TextButton", Container)
- Click.Size = UDim2.new(0, 40, 0, 40)
- Click.BackgroundTransparency = 1
- Click.Text = ""
- local Icon = Instance.new("ImageLabel", Click)
- Icon.Image = Button.Icon or "rbxassetid://115839646734512"
- Icon.Size = UDim2.new(0.7, 0, 0.7, 0)
- Icon.AnchorPoint = Vector2.new(0.5, 0.5)
- Icon.Position = UDim2.new(0.5, 0, 0.5, 0)
- Icon.BackgroundTransparency = 1
- Icon.ImageTransparency = 0.15
- local Corner = Instance.new("UICorner", Click)
- Corner.CornerRadius = UDim.new(0.5, 0)
- local oldClick = 0;
- local Display = nil;
- local Scale = Instance.new("UIScale", Icon)
- local Tweens = {
- Enter1 = TweenService:Create(Click, TweenInfo.new(0.4, Enum.EasingStyle.Quint), { BackgroundTransparency = 0.75 }),
- Leave1 = TweenService:Create(Click, TweenInfo.new(0.4, Enum.EasingStyle.Quint), { BackgroundTransparency = 1 }),
- Enter2 = TweenService:Create(Scale, TweenInfo.new(0.4, Enum.EasingStyle.Quint), { Scale = 0.8 }),
- Leave2 = TweenService:Create(Scale, TweenInfo.new(0.4, Enum.EasingStyle.Quint), { Scale = 1 })
- }
- Click.MouseEnter:Connect(function()
- Tweens.Enter1:Play()
- Tweens.Enter2:Play()
- if not Button.Name or Button.Name == "" then
- return nil
- end
- Display = DisplayTem:Clone()
- Display.Position = UDim2.new(0, Mouse.X, 0, Mouse.Y + 25)
- Display.Text = Button.Name
- Display.Parent = ScreenGui
- end)
- Click.MouseLeave:Connect(function()
- Tweens.Leave1:Play()
- Tweens.Leave2:Play()
- if Display then
- -- local NewPos = UDim2.new(Display.Position.X.Offset, 0, Display.Position.Y.Offset - 20)
- -- Display:TweenPosition(NewPos, Enum.EasingDirection.Out, Enum.EasingStyle.Quint, 0.2, true)
- Display:Destroy()
- end
- end)
- Click.MouseButton1Click:Connect(function()
- if Button.Debounce and ((tick() - oldClick) <= Button.Debounce) then
- return nil
- end
- oldClick = tick()
- Sounds.Click:Play()
- Button.Callback()
- end)
- end
- end
- local QuestsFrame = Library:CreateWindow({
- Title = "Quests",
- UISize = UDim2.new(0.5, 0, 0.65, 0),
- InitialPosition = UDim2.new(0.5, 0, 1.2, 0)
- })
- local SettingsFrame = Library:CreateWindow({
- Title = "Settings",
- UISize = UDim2.new(0.4, 0, 0.5, 0),
- })
- local MusicToggle = SettingsFrame:AddToggle({
- Name = "Music",
- Default = true,
- Callback = function(Value)
- local music = game.Workspace:FindFirstChild("Music")
- if music and music:IsA("Sound") then
- if Value then
- -- Ativa a música se estiver configurada para tocar
- if not music.Playing then
- music:Play() -- Inicia a música do jogo
- end
- else
- -- Desativa a música quando o toggle estiver em false
- if music.Playing then
- music:Stop() -- Para a música do jogo
- end
- end
- else
- warn("Objeto 'Music' não encontrado ou não é do tipo Sound")
- end
- end
- })
- -- Se houver a possibilidade de outros scripts alterarem a música, você pode desativar a música fora deste toggle
- game.Workspace.ChildAdded:Connect(function(child)
- if child.Name == "Music" and child:IsA("Sound") then
- child:Stop() -- Para a música se for adicionada de forma inesperada
- end
- end)
- local Quests = QuestsFrame:AddParagraph({ Title = "Halloween Quest", Content = "loading..." }) do
- local QuestFolder = Player:FindFirstChild("Quests")
- task.spawn(function()
- if QuestFolder then
- local function DisplayQuest(Quest)
- if Quest:GetChildren() == 0 then Quest.ChildAdded:Wait() end
- local Objects = {}
- for _, Child in ipairs(Quest:GetChildren()) do
- local Name = Child.Name
- local Amount, Enemy = Name:match(" (%d+) (%a+)")
- -- Definindo o valor máximo para Alucard
- local MaxValue = (Name:find("Defeat Alucard") and 3) or (tonumber(Amount) or 1)
- if Name:find("Get ") then
- table.insert(Objects, {
- Object = Child,
- Method = "Get",
- Mission = Name:gsub("Get ", ""),
- MaxValue = tonumber(Amount) or 1
- })
- elseif Name:find("Defeat ") then
- table.insert(Objects, {
- Object = Child,
- Method = "Defeat",
- Mission = tonumber(Amount) or 1,
- Enemy = (tonumber(Amount) and Enemy) or Name:gsub("Defeat ", ""),
- MaxValue = MaxValue
- })
- elseif Enemy == "Players" then
- table.insert(Objects, {
- Object = Child,
- Method = "Kill",
- Mission = tonumber(Amount) or 10, -- Limite padrão para "Kill Players"
- MaxValue = tonumber(Amount) or 10 -- MaxValue para "Kill Players"
- })
- end
- end
- local function UpdateParagraph()
- local Text = {}
- for _, Quest in ipairs(Objects) do
- if Quest.Display then
- table.insert(Text, Quest.Display)
- end
- end
- Quests:SetContent(table.concat(Text, "\n"))
- end
- for _, Quest in ipairs(Objects) do
- local Mission = Quest.Mission
- local Method = Quest.Method
- local MaxValue = Quest.MaxValue
- local function Update()
- local Value = math.min(Quest.Object.Value, MaxValue) -- Limita o valor ao MaxValue
- if Method == "Get" then
- Quest.Display = string.format("Get %s %d/%d", Mission, Value, MaxValue)
- elseif Method == "Kill" then
- Quest.Display = string.format("Kill %d Players %d/%d", MaxValue, Value, MaxValue)
- elseif Method == "Defeat" then
- Quest.Display = string.format("Defeat %s %d/%d", Quest.Enemy, Value, MaxValue)
- end
- UpdateParagraph()
- end
- Quest.Object:GetPropertyChangedSignal("Value"):Connect(Update)
- Update()
- end
- end
- if QuestFolder:FindFirstChild("Halloween Quest") then
- Quests.Visible = true
- DisplayQuest(QuestFolder["Halloween Quest"])
- QuestFolder["Halloween Quest"].Destroying:Wait()
- Quests.Visible = false
- end
- QuestFolder.ChildAdded:Connect(function(Quest)
- if Quest.Name == "Halloween Quest" then
- Quests.Visible = true
- DisplayQuest(Quest)
- Quest.Destroying:Wait()
- Quests.Visible = false
- end
- end)
- else
- Quests.Visible = false
- end
- end)
- end
- SettingsFrame:AddToggle({
- Name = "Camera Shake",
- Default = true,
- Callback = function(Value)
- local settings = Player:FindFirstChild("SETTINGS")
- if settings then
- local cameraShake = settings:FindFirstChild("CameraShake")
- if cameraShake then
- cameraShake.Value = Value
- end
- end
- end
- })
- SettingsFrame:AddToggle({
- Name = "Blood Effects",
- Default = true,
- Callback = function(Value)
- local playerSettings = Player:FindFirstChild("SETTINGS")
- if playerSettings then
- local blood = playerSettings:FindFirstChild("Blood")
- local bloodPools = playerSettings:FindFirstChild("BloodPools")
- if blood and bloodPools then
- blood.Value = Value
- bloodPools.Value = Value and 100 or 0
- end
- end
- end
- })
- SettingsFrame:AddToggle({
- Name = "Show Cooldown",
- Default = true,
- Callback = function(Value)
- local playerSettings = game:GetService("Players").LocalPlayer:FindFirstChild("SETTINGS")
- if playerSettings then
- local cdToggle = playerSettings:FindFirstChild("CDToggle")
- if cdToggle then
- cdToggle.Value = Value
- end
- end
- end
- })
- local ShopFrame = Library:CreateWindow({
- Title = "Shop",
- UISize = UDim2.new(0.5, 0, 0.7, 0),
- Builder = function(self, Container)
- Container.Size = UDim2.new(0.58, 0, 0.95, -10)
- Container.AnchorPoint = Vector2.new(0, 1)
- Container.Position = UDim2.new(0, 0, 1, 0)
- local image = Instance.new("ImageButton", Container.Parent)
- image.Size = UDim2.new(0, 260, 0, 210)
- image.Position = UDim2.new(0.9, 0, 0.4, 0)
- image.BackgroundTransparency = 1
- image.Image = "rbxassetid://73599364142863"
- local textBoxImage = Instance.new("ImageLabel", image)
- textBoxImage.Size = UDim2.new(0, 300, 0, 140)
- textBoxImage.Position = UDim2.new(-0.5, 0, -0.30, 0)
- textBoxImage.BackgroundTransparency = 1
- textBoxImage.Image = "rbxassetid://101648307130217"
- local textBoxImage = Instance.new("TextLabel", textBoxImage)
- textBoxImage.Size = UDim2.new(0, 80, 0, 80)
- textBoxImage.Position = UDim2.new(0.5, 0, 0.5, -10)
- textBoxImage.AnchorPoint = Vector2.new(0.5, 0.5)
- textBoxImage.BackgroundTransparency = 1
- textBoxImage.Text = ""
- textBoxImage.TextColor3 = Color3.fromRGB(0, 0, 0)
- textBoxImage.FontFace = Font.fromId(12187371840)
- textBoxImage.TextSize = 18
- textBoxImage.TextScaled = false
- local Corountine
- local texts, hits = {
- "The boss is not my boss... \n for while...",
- "good to see you here",
- "What do you want,\n master?",
- "royi and boobie? \n they are powerful guys",
- "I saw a guy,\nselling rokakakas\n and arrows\n who buys this?..."
- }, {
- "Auch",
- "Don't hit me",
- "Stop evil guy",
- "1v1 me?"
- }
- local function PlayText(Text)
- local next = coroutine.create(function()
- local split = Text:split("")
- for i = 1, #split do
- textBoxImage.Text = textBoxImage.Text .. split[i]
- coroutine.yield(split[i])
- end
- end)
- Corountine, textBoxImage.Text = next, ""
- repeat wait()
- if not Sounds.lenText.Playing then
- Sounds.lenText:Play()
- end
- until Corountine ~= next or not self.Enabled or not coroutine.resume(next)
- textBoxImage.TextColor3 = Color3.fromRGB(0, 0, 0)
- end
- local function hitAnim()
- image.ImageColor3 = Color3.fromRGB(255, 0, 0)
- image:TweenSize(UDim2.new(0, 250, 0, 190), Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 0.3, true)
- task.wait(0.1)
- image:TweenSize(UDim2.new(0, 260, 0, 210), Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 0.3, true)
- image.ImageColor3 = Color3.fromRGB(255, 255, 255)
- end
- image.Activated:Connect(function()
- task.spawn(hitAnim)
- Sounds.Hits[math.random(#Sounds.Hits)]:Play()
- textBoxImage.TextColor3 = Color3.fromRGB(240, 25, 25)
- PlayText(hits[math.random(#hits)])
- end)
- self.Opened = function()
- PlayText(texts[math.random(#texts)])
- end
- end,
- Callback = function(self)
- local Music = workspace:FindFirstChild("Music")
- local ShopMusic = Sounds.ShopMusic -- Certifique-se de que você tenha definido corretamente o objeto ShopMusic
- if Music and ShopMusic then
- if self.Enabled then
- -- Inicia o aumento de volume para ShopMusic e diminui o volume de Music
- while self.Enabled and (Music.Volume > 0 or ShopMusic.Volume < 0.5) do
- task.wait()
- if Music.Volume > 0 then
- Music.Volume = Music.Volume - 0.01
- end
- if ShopMusic.Volume < 0.5 then
- ShopMusic.Volume = ShopMusic.Volume + 0.01
- end
- end
- -- Assegura que ShopMusic tenha um volume final de 0.5
- ShopMusic.Volume = 0.5
- -- Inicia ShopMusic se não estiver tocando
- if not ShopMusic.Playing then
- ShopMusic:Play() -- Inicia a música da loja
- end
- else
- -- Reduz o volume de ShopMusic e aumenta o de Music
- while not self.Enabled and (ShopMusic.Volume > 0 or Music.Volume < 0.5) do
- task.wait()
- if ShopMusic.Volume > 0 then
- ShopMusic.Volume = ShopMusic.Volume - 0.01
- end
- if Music.Volume < 0.5 then
- Music.Volume = Music.Volume + 0.01
- end
- end
- -- Assegura que Music tenha um volume final de 0.5
- Music.Volume = 0.5
- -- Reativa a Music se o toggle estiver desativado
- if not Music.Playing then
- Music:Play() -- Inicia a música do jogo
- end
- end
- end
- end
- })
- ShopFrame:AddButton({
- Name = "gamepass",
- Callback = function()
- -- add here the script to active the purchase system
- end
- })
- Library:CreateButtons({
- {
- Name = "Quest",
- Icon = "rbxassetid://10734943448",
- Callback = QuestsFrame.ToggleGui
- },
- {
- Name = "Shop",
- Icon = "rbxassetid://111429937040741",
- Callback = function()
- ShopFrame.ToggleGui()
- end
- },
- {
- Name = "Bank",
- Icon = "rbxassetid://10723417608",
- Debounce = 0.25,
- Callback = function()
- Library:CloseUIs()
- local Inventory = Player.PlayerGui:WaitForChild("Inventory"):WaitForChild("Inventory")
- Inventory.Visible = not Inventory.Visible
- end
- },
- {
- Name = "Settings",
- Icon = "rbxassetid://10734950309",
- Callback = SettingsFrame.ToggleGui
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment