TEXT 432
Speed Simulator Script - Infinite Money By venuslock on 5th October 2022 04:51:09 AM
  1. --: services
  2. local Players = game:GetService("Players")
  3.  
  4. --: vars
  5. local LocalPlayer = Players.LocalPlayer
  6. local NPCFolder = workspace:WaitForChild("Npc")
  7. local MonsterFolder = workspace:WaitForChild("Monster")
  8.  
  9. --: game stuff
  10. local GetLevel = function()
  11.    return LocalPlayer.PlayerData.Level.Value
  12. end
  13.  
  14. local EquipTool = function()
  15.    if not LocalPlayer.Character then return end
  16.  
  17.    if not LocalPlayer.Character:FindFirstChildOfClass("Tool") then
  18.        LocalPlayer:WaitForChild("Backpack").Combat.Parent = LocalPlayer.Character
  19.    end
  20. end
  21.  
  22. local GetMonsters = function(quest)
  23.    local monsters = {}; for i, v in pairs(MonsterFolder:GetChildren()) do
  24.        if string.lower(v.Name) == string.lower(quest.QuestScript.Enemy.Value) then
  25.            table.insert(monsters, v)
  26.        end
  27.    end
  28.    
  29.    return monsters
  30. end
  31.  
  32. local GetQuest = function()
  33.    local doable = {}
  34.    for i, v in pairs(NPCFolder:GetChildren()) do
  35.        if not string.find(string.lower(v.Name), "quest") then continue end
  36.        if string.find(v.Name, "[", 0, true) ~= nil then continue end
  37.  
  38.        local Quest; for i2, v2 in pairs(v:GetDescendants()) do
  39.            if v2.ClassName == "ProximityPrompt" then
  40.                Quest = v2
  41.            end
  42.        end
  43.        
  44.        if not Quest then continue end
  45.        if GetLevel() <= Quest.QuestScript.LevelNeed.Value then continue end
  46.  
  47.        table.insert(doable, Quest)
  48.    end
  49.  
  50.    local highestLvl = 0
  51.    local highestQ; for i, v in pairs(doable) do
  52.        if v.QuestScript.LevelNeed.Value > highestLvl then
  53.            highestQ = v
  54.        end
  55.    end
  56.    
  57.    return highestQ
  58. end
  59.  
  60. local Attack = function(quest)
  61.    local Monsters = GetMonsters(quest)
  62.  
  63.    for i, v in pairs(Monsters) do
  64.        repeat
  65.            if not v:FindFirstChild("HumanoidRootPart") then return end
  66.            if not LocalPlayer.Character then return end
  67.            if not LocalPlayer.Character:FindFirstChild("Combat") then return end
  68.            
  69.            LocalPlayer.Character.Combat.Sword_Client.RemoteEvent:FireServer(1, v.HumanoidRootPart.Position)
  70.            task.wait(.2)
  71.        until not v:FindFirstChild("Humanoid") or v.Humanoid.Health <= 0
  72.    end
  73. end
  74.  
  75. local DoQuest = function()
  76.    local Quest = GetQuest()
  77.    pcall(function()
  78.        LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(Quest.Parent.Position.X, Quest.Parent.Position.Y + 10, Quest.Parent.Position.Z)
  79.    end)
  80.    fireproximityprompt(Quest, 0)
  81.  
  82.    repeat
  83.        EquipTool()
  84.        Attack(Quest)
  85.        task.wait()
  86.    until LocalPlayer:FindFirstChild("QuestLeader") == nil
  87. end
  88.  
  89. --: main
  90. while task.wait() do
  91.    DoQuest()
  92. end

Texbin is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.