Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---Defense Until Death Simulator Script Auto Hit Box
- -- Find the player's character
- local character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
- -- Find the humanoid inside the character
- local humanoid = character:WaitForChild("Humanoid")
- -- Function to run when the player dies
- local function onPlayerDied()
- print("Player has died!")
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "A mensagem de yDarkzin",
- Text = "A Gui foi destruída, por favor reinicie a Gui",
- Duration = 9
- })
- end
- -- Connect the function to the Died event
- humanoid.Died:Connect(onPlayerDied)
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "A mensagem de yDarkzin",
- Text = "Script loaded obrigado por usar meu script.",
- Duration = 9
- })
- local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
- local Window = Library.CreateLib("Defense Until Death Simulator", "DarkTheme")
- local Tab = Window:NewTab("Functions")
- local Section = Tab:NewSection("Monster Attacking")
- Section:NewButton("AutoHit (GUI)", "ButtonInfo", function()
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "A mensagem de yDarkzin",
- Text = "Auto Hit Box Gui Loaded",
- Duration = 9
- })
- -- Define the GUI
- local gui = Instance.new("ScreenGui")
- gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- gui.Name = "1612dbxafg-bw1562512-xbwabxg18461"
- -- Define the toggle function
- local toggleEnabled = false
- local function toggleFunction()
- if toggleEnabled then
- print("Toggle is now OFF")
- toggleEnabled = false
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "A mensagem de yDarkzin",
- Text = "Função Auto Hit Box (OFF)",
- Duration = 5
- })
- else
- print("Toggle is now ON")
- toggleEnabled = true
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "A mensagem de yDarkzin",
- Text = "Função Auto Hit Box (ON)",
- Duration = 5
- })
- end
- end
- local toggleButton = Instance.new("TextButton")
- toggleButton.Name = "ToggleButton"
- toggleButton.Text = "Toggle ON/OFF"
- toggleButton.Position = UDim2.new(0, 10, 0, 10)
- toggleButton.Size = UDim2.new(0, 200, 0, 50)
- toggleButton.Font = Enum.Font.SourceSansBold
- toggleButton.TextSize = 18
- toggleButton.Parent = gui
- -- Connect the toggleButton to toggle the on/off state
- toggleButton.MouseButton1Click:Connect(function()
- toggleFunction()
- end)
- -- Check the toggleEnabled state each frame
- game:GetService("RunService").RenderStepped:Connect(function()
- if toggleEnabled then
- game:GetService("ReplicatedStorage").MQTT.battle.AttackHitEvent:FireServer()
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement