Script
Key Required

Script

Math MurderCasualdeveloperCasualdeveloper 894 views 1.2K executesUpdated Jan 12, 2026
Unrated
00
Lua Script•152 lines (6408 chars)
-- Load Rayfield
local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()

local Window = Rayfield:CreateWindow({
    Name = "Auto Answer Bot",
    LoadingTitle = "Auto Typing",
    LoadingSubtitle = "Nexus",
    ConfigurationSaving = { Enabled = false }
})

local Tab = Window:CreateTab("Main", 4483362458)
local Section = Tab:CreateSection("Settings")

----------------------------------------------------
-- Global Variables
----------------------------------------------------
local AutoAnswerEnabled = false
local LastSecondMode = false
local LastSecondTrigger = 3
local TypingSpeed = 0.05       -- default faster
local ErrorSpeed = 0.1
local MaxGuessNumber = 200
local RandomPauseChance = 0.2  -- chance of a human pause
local BigErrorChance = 0.2     -- chance of a big wrong guess
local InstantSubmit = false

----------------------------------------------------
-- UI Elements
----------------------------------------------------
-- Toggles
Tab:CreateToggle({ Name = "Enable Auto-Answer", CurrentValue = false, Callback = function(Value) AutoAnswerEnabled = Value end })
Tab:CreateToggle({ Name = "Enable Answer Only at End", CurrentValue = false, Callback = function(Value) LastSecondMode = Value end })
Tab:CreateToggle({ Name = "Instant Submit", CurrentValue = false, Callback = function(Value) InstantSubmit = Value end })

-- Sliders
Tab:CreateSlider({ Name = "Answer When Remaining (s)", Range = {1, 10}, Increment = 1, CurrentValue = LastSecondTrigger, Callback = function(Value) LastSecondTrigger = Value end })
Tab:CreateSlider({ Name = "Typing Speed (s/char)", Range = {0.01, 0.2}, Increment = 0.01, CurrentValue = TypingSpeed, Callback = function(Value) TypingSpeed = Value end })
Tab:CreateSlider({ Name = "Error Speed (s)", Range = {0.05, 0.5}, Increment = 0.01, CurrentValue = ErrorSpeed, Callback = function(Value) ErrorSpeed = Value end })
Tab:CreateSlider({ Name = "Max Errors", Range = {50, 1000}, Increment = 10, CurrentValue = MaxGuessNumber, Callback = function(Value) MaxGuessNumber = Value end })
Tab:CreateSlider({ Name = "Random Pause Chance (%)", Range = {0, 50}, Increment = 1, CurrentValue = RandomPauseChance*100, Callback = function(Value) RandomPauseChance = Value/100 end })
Tab:CreateSlider({ Name = "Big Error Chance (%)", Range = {0, 50}, Increment = 1, CurrentValue = BigErrorChance*100, Callback = function(Value) BigErrorChance = Value/100 end })

-- Buttons
Tab:CreateButton({ Name = "Type Full Answer Now", Callback = function() 
    if CurrentQuestionResult then HumanType(CurrentQuestionResult) end
end})
Tab:CreateButton({ Name = "Clear Typing", Callback = function() SetTyping("") end })
Tab:CreateButton({ Name = "Submit Now", Callback = function() 
    if CurrentQuestionResult then GameEvent:FireServer("submitAnswer", CurrentQuestionResult) end
end})

----------------------------------------------------
-- References
----------------------------------------------------
local Screen = workspace.Map.Functional.Screen
local QuestionText = Screen.SurfaceGui.MainFrame.MainGameContainer.MainTxtContainer.QuestionText
local TypingText = Screen.SurfaceGui.MainFrame.MainGameContainer.MainTxtContainer.TypingText
local Fill = Screen.SurfaceGui.MainFrame.MainGameContainer.TimerbarContainer.Fill

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local CurrentSpeller = ReplicatedStorage.GameValues.CurrentSpeller
local ClickSound = ReplicatedStorage.Assets.SFX.Click
local GameEvent = ReplicatedStorage.Events.GameEvent
local Player = Players.LocalPlayer

----------------------------------------------------
-- Helper Functions
----------------------------------------------------
local function SetTyping(text)
    if ClickSound then pcall(function() ClickSound:Play() end) end
    TypingText.Text = text
    GameEvent:FireServer("updateAnswer", text)
end

local function HumanType(target)
    local text = ""
    while text ~= target do
        -- Big wrong guess occasionally
        if math.random() < BigErrorChance then
            local wrong = tostring(math.random(1, MaxGuessNumber))
            SetTyping(wrong)
            task.wait(ErrorSpeed * math.random(1,2))
            SetTyping(string.sub(wrong,1,math.random(0,#wrong)))
            task.wait(ErrorSpeed)
        end

        -- type next character
        local nextLen = #TypingText.Text + 1
        text = string.sub(target, 1, nextLen)
        SetTyping(text)

        -- random human pause
        if math.random() < RandomPauseChance then
            task.wait(TypingSpeed * (1 + math.random()))
        else
            task.wait(TypingSpeed)
        end

        -- instant submit check
        if InstantSubmit and text == target then
            GameEvent:FireServer("submitAnswer", text)
        end
    end
end

----------------------------------------------------
-- Clean up old connections
----------------------------------------------------
if script_connections then
    for _, c in ipairs(script_connections) do c:Disconnect() end
    table.clear(script_connections)
end
local Connections = {}
getgenv().script_connections = Connections

----------------------------------------------------
-- Main Logic
----------------------------------------------------
local CurrentQuestionResult
table.insert(Connections, QuestionText:GetPropertyChangedSignal("Text"):Connect(function()
    if not AutoAnswerEnabled and not LastSecondMode then return end

    -- parse question safely
    local question = string.split(QuestionText.Text, "=")[1]
    local success, result = pcall(function()
        return tostring(loadstring("return " .. string.gsub(question, "x", "*"))())
    end)
    if not success then return end
    CurrentQuestionResult = result
    Fill:SetAttribute("Answer", result)

    if CurrentSpeller.Value ~= Player then return end

    if AutoAnswerEnabled then
        task.wait(math.random(1, 3)/10)
        HumanType(result)
        GameEvent:FireServer("submitAnswer", result)
    end

    if LastSecondMode then
        while Fill.Size.X.Scale > (LastSecondTrigger / 10) do
            local wrongGuess = tostring(math.random(1, MaxGuessNumber))
            SetTyping(wrongGuess)
            task.wait(ErrorSpeed)
            SetTyping("")
            task.wait(ErrorSpeed)
        end
        HumanType(result)
        GameEvent:FireServer("submitAnswer", result)
    end
end))

Features & Information

Auto-Answer Instant Submit Typing Speed Error Speed Submit Now Clear Typing Type Full Answer

Community Comments (0)

No comments yet for this script.

More Scripts for Math Murder