Advertisement
TempestX

dunguen heroes v1

Jul 12th, 2025 (edited)
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.17 KB | None | 0 0
  1. local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
  2.  
  3. local Window = Rayfield:CreateWindow({
  4.     Name = "Dungeon Heroes UI",
  5.     LoadingTitle = "Loading Dungeon UI",
  6.     LoadingSubtitle = "by TempestX",
  7.     ShowText = "Tempest X", -- for mobile users to unhide rayfield, change if you'd like
  8.     Theme = "Default", -- Check https://docs.sirius.menu/rayfield/configuration/themes
  9.  
  10.    ToggleUIKeybind = Enum.KeyCode.LeftControl, -- The keybind to toggle the UI visibility (string like "K" or Enum.KeyCode)
  11.  
  12.    DisableRayfieldPrompts = false,
  13.    DisableBuildWarnings = false, -- Prevents Rayfield from warning when the script has a version mismatch with the interface
  14.  
  15.    ConfigurationSaving = {
  16.       Enabled = true,
  17.       FolderName = nil, -- Create a custom folder for your hub/game
  18.       FileName = "Big Hub"
  19.    },
  20.    Discord = {
  21.       Enabled = false, -- Prompt the user to join your Discord server if their executor supports it
  22.       Invite = "noinvitelink", -- The Discord invite code, do not include discord.gg/. E.g. discord.gg/ ABCD would be ABCD
  23.       RememberJoins = true -- Set this to false to make them join the discord every time they load it up
  24.    },
  25.    KeySystem = false, -- Set this to true to use our key system
  26.    KeySettings = {
  27.       Title = "Untitled",
  28.       Subtitle = "Key System",
  29.       Note = "No method of obtaining the key is provided", -- Use this to tell the user how to get a key
  30.       FileName = "Key", -- It is recommended to use something unique as other scripts using Rayfield may overwrite your key file
  31.       SaveKey = true, -- The user's key will be saved, but if you change the key, they will be unable to use your script
  32.       GrabKeyFromSite = false, -- If this is true, set Key below to the RAW site you would like Rayfield to get the key from
  33.       Key = {"Hello"} -- List of keys that will be accepted by the system, can be RAW file links (pastebin, github etc) or simple strings ("hello","key22")
  34.    }
  35. })
  36.  
  37. local player = game.Players.LocalPlayer
  38. local screenGui = Instance.new("ScreenGui")
  39. screenGui.Name = "MyCustomGui"
  40. screenGui.ResetOnSpawn = false
  41. screenGui.Parent = game:GetService("CoreGui")
  42. local button = Instance.new("ImageButton")
  43. button.Parent = screenGui
  44. button.Size = UDim2.new(0, 70, 0, 70)
  45. button.Position = UDim2.new(0, 100, 0.5, -350)
  46. button.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  47. button.Image = "rbxassetid://7058352154"
  48. button.Active = true
  49. button.Draggable = true
  50. local corner = Instance.new("UICorner")
  51. corner.CornerRadius = UDim.new(0, 12)
  52. corner.Parent = button
  53. button.MouseButton1Click:Connect(function()
  54.     getgenv().keytoclick = Enum.KeyCode.LeftControl
  55. game:GetService("VirtualInputManager"):SendKeyEvent(true, keytoclick, false, game)
  56. end)
  57.  
  58.  
  59. -- Tabs
  60. local MainTab = Window:CreateTab("Main", 4483362458)
  61. local DungeonTab = Window:CreateTab("Dungeon", 4483362458)
  62.  
  63. -- Variables
  64. local autofarmEnabled = false
  65. local killauraEnabled = false
  66. local autostartEnabled = false
  67. local selectedDungeon = "ForestDungeon"
  68. local selectedMode = 1
  69. local selectedPlayer = 1
  70.  
  71. -- Kill Aura
  72. MainTab:CreateToggle({
  73.     Name = "Kill Aura",
  74.     CurrentValue = false,
  75.     Callback = function(Value)
  76.         killauraEnabled = Value
  77.     end
  78. })
  79.  
  80. task.spawn(function()
  81.     local rs = game:GetService("ReplicatedStorage")
  82.     while true do
  83.         task.wait(0.25)
  84.         if killauraEnabled then
  85.             local mobs = workspace:FindFirstChild("Mobs")
  86.             local mobList = mobs and mobs:GetChildren() or {}
  87.             rs.Systems.Combat.PlayerAttack:FireServer(mobList)
  88.         end
  89.     end
  90. end)
  91.  
  92. -- Auto Start Dungeon
  93. MainTab:CreateToggle({
  94.     Name = "Auto Start Dungeon",
  95.     CurrentValue = false,
  96.     Callback = function(Value)
  97.         autostartEnabled = Value
  98.         if Value then
  99.             game:GetService("ReplicatedStorage").Systems.Dungeons.TriggerStartDungeon:FireServer()
  100.         end
  101.     end
  102. })
  103.  
  104. -- Auto Farm (AlignPosition)
  105. MainTab:CreateToggle({
  106.     Name = "Auto Farm (Fly over mob)",
  107.     CurrentValue = false,
  108.     Callback = function(Value)
  109.         autofarmEnabled = Value
  110.     end
  111. })
  112.  
  113. -- AlignPosition function
  114. local function attachAlignPosition(root)
  115.     local attachment = Instance.new("Attachment", root)
  116.  
  117.     local align = Instance.new("AlignPosition")
  118.     align.Attachment0 = attachment
  119.     align.Position = root.Position
  120.     align.Mode = Enum.PositionAlignmentMode.OneAttachment
  121.     align.RigidityEnabled = true
  122.     align.MaxForce = Vector3.new(1e5, 1e5, 1e5)
  123.     align.Responsiveness = 300
  124.     align.Parent = root
  125.     return align
  126. end
  127. local function noclip(character)
  128.     for _, part in pairs(character:GetDescendants()) do
  129.         if part:IsA("BasePart") then
  130.             part.CanCollide = false
  131.         end
  132.     end
  133. end
  134.  
  135. task.spawn(function()
  136.     local player = game.Players.LocalPlayer
  137.     local align = nil
  138.  
  139.     while true do
  140.         task.wait(0.2)
  141.  
  142.         if autofarmEnabled then
  143.             local char = player.Character or player.CharacterAdded:Wait()
  144.             local root = char:FindFirstChild("HumanoidRootPart")
  145.             if not root then
  146.                 task.wait(0.2)
  147.                 continue
  148.             end
  149.             noclip(char)  -- เรียกใช้ noclip ทุกครั้งใน loop
  150.             if not align or align.Parent ~= root then
  151.                 if align then align:Destroy() end
  152.                 align = attachAlignPosition(root)
  153.             end
  154.  
  155.             local mobs = workspace:FindFirstChild("Mobs")
  156.                 if not mobs then
  157.                     task.wait(0.2)
  158.                     continue
  159.                 end
  160.  
  161.                 local closest, dist = nil, math.huge
  162.                 for _, mob in pairs(mobs:GetChildren()) do
  163.                     -- ตรวจสอบว่า mob ไม่มี PetHealthbar
  164.                     if not mob:FindFirstChild("PetHealthbar") then
  165.                         local hrp = mob:FindFirstChild("HumanoidRootPart")
  166.                         if hrp then
  167.                             local d = (root.Position - hrp.Position).Magnitude
  168.                             if d < dist then
  169.                                 closest, dist = hrp, d
  170.                             end
  171.                         end
  172.                     end
  173.                 end
  174.             if closest then
  175.                 align.Position = closest.Position + Vector3.new(0, 40, 0)
  176.             else
  177.                 align.Position = root.Position + Vector3.new(0, 40, 0)
  178.             end
  179.  
  180.         elseif align then
  181.             align:Destroy()
  182.             align = nil
  183.         end
  184.     end
  185. end)
  186.  
  187.  
  188.  
  189. local autoGoAgainEnabled = false
  190. local Autoagian = MainTab:CreateToggle({
  191.    Name = "Auto play again",
  192.    CurrentValue = false,
  193.    Flag = "Toggle1",
  194.    Callback = function(Value)
  195.        autoGoAgainEnabled = Value
  196.    end,
  197. })
  198.  
  199. task.spawn(function()
  200.     local player = game.Players.LocalPlayer
  201.     while true do
  202.         task.wait(1)
  203.         if autoGoAgainEnabled then
  204.             game:GetService("ReplicatedStorage").Systems.Dungeons.SetExitChoice:FireServer("GoAgain")
  205.         end
  206.     end
  207. end)
  208.  
  209.  
  210. local DungeonMap = {
  211.     ["ForestDungeon 1+"] = "ForestDungeon",
  212.     ["MountainDungeon 15+"] = "MountainDungeon",
  213.     ["CoveDungeon 30+"] = "CoveDungeon",
  214.     ["CastleDungeon 45+"] = "CastleDungeon",
  215.     ["JungleDungeon 60+"] = "JungleDungeon",
  216.     ["AstralDungeon 75+"] = "AstralDungeon",
  217.     ["DesertDungeon 90"] = "DesertDungeon",
  218.     ["CaveDungeon 105+"] = "CaveDungeon",
  219.     ["MushroomDungeon 120+"] = "MushroomDungeon",
  220.     ["GoldDungeon 135+"] = "GoldDungeon"
  221. }
  222. local selectedDungeonValue = "ForestDungeon"
  223. local selectedModeValue = 4
  224. local selectedPlayerValue = 1
  225. local selectedDungeon = DungeonTab:CreateDropdown({
  226.     Name = "Select Dungeon",
  227.     Options = {
  228.         "ForestDungeon 1+", "MountainDungeon 15+", "CoveDungeon 30+",
  229.         "CastleDungeon 45+", "JungleDungeon 60+", "AstralDungeon 75+",
  230.         "DesertDungeon 90+", "CaveDungeon 105+", "MushroomDungeon 120+",
  231.         "GoldDungeon 135+" ---event "FireCultDungeon",
  232.     },
  233.     CurrentOption = {"ForestDungeon"}, -- << ต้องใช้เป็น table ด้วย
  234.     MultipleOptions = false,
  235.     Flag = "selectedDungeondropdown1",
  236.     Callback = function(Options)
  237.         selectedDungeonValue = DungeonMap[Options[1]]
  238.         print("เลือกดันเจียน:", selectedDungeonValue)
  239.     end
  240. })
  241. local selectedMode = DungeonTab:CreateSlider({
  242.    Name = "Select Mode",
  243.    Range = {1, 4},
  244.    Increment = 1,
  245.    Suffix = "Difficulty",
  246.    CurrentValue = 4,
  247.    Flag = "selectedModeslide",
  248.    Callback = function(Value)
  249.     selectedModeValue = Value
  250.    end,
  251. })
  252.  
  253. local selectedPlayer = DungeonTab:CreateSlider({
  254.    Name = "Select Mode",
  255.    Range = {1, 5},
  256.    Increment = 1,
  257.    Suffix = "Cout player",
  258.    CurrentValue = 1,
  259.    Flag = "selectedPlayerslide",
  260.    Callback = function(Value)
  261.     selectedPlayerValue = Value
  262.    end,
  263. })
  264. DungeonTab:CreateButton({
  265.     Name = "Start Dungeon",
  266.     Callback = function()
  267.  
  268.         print("Players:", selectedPlayerValue, type(selectedPlayerValue))
  269.         local args = {
  270.             selectedDungeonValue,
  271.             selectedModeValue,
  272.             selectedPlayerValue,
  273.             false,
  274.             false
  275.         }
  276.         local rs = game:GetService("ReplicatedStorage")
  277.         rs:WaitForChild("Systems"):WaitForChild("Parties"):WaitForChild("SetSettings"):FireServer(unpack(args))
  278.         task.wait(0.5)
  279.         rs:WaitForChild("Systems"):WaitForChild("Dungeons"):WaitForChild("TriggerStartDungeon"):FireServer()
  280.     end
  281. })
  282.  
  283.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement