if not game:IsLoaded() then game.Loaded:Wait() end -- ============================================================ -- SERVICES -- ============================================================ local Players = game:GetService("Players") local TweenService = game:GetService("TweenService") local RunService = game:GetService("RunService") local HttpService = game:GetService("HttpService") local UserInputService = game:GetService("UserInputService") local lp = Players.LocalPlayer -- FOV: always grab camera lazily so it's never nil local function getCam() return workspace.CurrentCamera end -- ============================================================ -- RAYFIELD -- ============================================================ local Rayfield = loadstring(game:HttpGet("https://sirius.menu/rayfield"))() local Window = Rayfield:CreateWindow({ Name = "TF Hub", LoadingTitle = "Track & Field Hub", LoadingSubtitle = "by HIM", Theme = "Default", DisableRayfieldPrompts = false, DisableBuildWarnings = false, ConfigurationSaving = { Enabled = false }, KeySystem = false, }) -- ============================================================ -- MANUAL CONFIG (writefile / readfile — bypasses Rayfield save) -- ============================================================ local CONFIG_FOLDER = "TrackFieldHub" local CONFIG_FILE = "TrackFieldHub/Config.json" local function saveConfig(s) if not isfolder(CONFIG_FOLDER) then makefolder(CONFIG_FOLDER) end writefile(CONFIG_FILE, HttpService:JSONEncode({ SpeedMode = s.SpeedMode, TargetSpeed = s.TargetSpeed, CFSpeed = s.CFSpeed, JumpMode = s.JumpMode, LongJumpForward = s.LongJumpForward, LongJumpUp = s.LongJumpUp, HighJumpForce = s.HighJumpForce, HurdleForce = s.HurdleForce, HurdleInterval = s.HurdleInterval, JumpPower = s.JumpPower, FOVValue = s.FOVValue, SpeedKeybind = s.SpeedKeybind, SprintBurstDur = s.SprintBurstDur, })) end local function loadConfig() if not isfile(CONFIG_FILE) then return nil end local ok, r = pcall(function() return HttpService:JSONDecode(readfile(CONFIG_FILE)) end) return ok and r or nil end -- ============================================================ -- HELPERS -- ============================================================ local function getChar() return lp.Character end local function getHum() local c = getChar(); return c and c:FindFirstChildOfClass("Humanoid") end local function getHRP() local c = getChar(); return c and c:FindFirstChild("HumanoidRootPart") end local function notify(title, body, dur) Rayfield:Notify({ Title = title, Content = body, Duration = dur or 2, Image = 4483362458 }) end -- ============================================================ -- STATE -- ============================================================ local State = { -- Speed SpeedEnabled = false, SpeedMode = "WalkSpeed", TargetSpeed = 24, DefaultSpeed = 16, CFSpeed = 24, -- Jump JumpEnabled = false, JumpMode = "Long Jump", InfJump = false, LongJumpForward = 80, LongJumpUp = 40, HighJumpForce = 80, -- Jump Power JumpPowerEnabled = false, JumpPower = 50, DefaultJumpPower = 50, -- Hurdles AutoHurdle = false, HurdleForce = 55, HurdleInterval = 1.2, -- Sprint Burst SprintBurst = false, SprintBurstDur = 3.0, _BurstActive = false, _LastMoveState = false, -- Keybind SpeedKeybind = "R", KeybindEnabled = false, -- FOV FOVEnabled = false, FOVValue = 90, DefaultFOV = 70, -- Utility AntiAFK = false, } -- ============================================================ -- SPEED — WalkSpeed smooth tween -- ============================================================ local speedTween = nil local enforceTick = 0 local function smoothSetSpeed(target, dur) local hum = getHum(); if not hum then return end if speedTween then speedTween:Cancel(); speedTween = nil end speedTween = TweenService:Create( hum, TweenInfo.new(dur or 0.8, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { WalkSpeed = target } ) speedTween:Play() end RunService.Heartbeat:Connect(function() if not State.SpeedEnabled or State.SpeedMode ~= "WalkSpeed" then return end local now = tick() if now - enforceTick < 0.8 then return end enforceTick = now local hum = getHum() if hum and math.abs(hum.WalkSpeed - State.TargetSpeed) > 3 then smoothSetSpeed(State.TargetSpeed, 0.4) end end) -- ============================================================ -- SPEED — CFrame-based (WalkSpeed stays 16) -- ============================================================ RunService.RenderStepped:Connect(function(dt) if not State.SpeedEnabled or State.SpeedMode ~= "CFrame" then return end local hrp = getHRP(); if not hrp then return end local hum = getHum(); if not hum or hum.MoveDirection.Magnitude < 0.1 then return end local flat = Vector3.new(hum.MoveDirection.X, 0, hum.MoveDirection.Z) if flat.Magnitude < 0.01 then return end local bonus = State.CFSpeed - State.DefaultSpeed if bonus <= 0 then return end hrp.CFrame = hrp.CFrame + flat.Unit * bonus * dt end) -- ============================================================ -- FOV — fixed: lazy camera ref + RunService enforcement -- ============================================================ local fovTween = nil local function smoothSetFOV(target, dur) local camera = getCam(); if not camera then return end if fovTween then fovTween:Cancel(); fovTween = nil end fovTween = TweenService:Create( camera, TweenInfo.new(dur or 0.6, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { FieldOfView = target } ) fovTween:Play() end -- Enforce FOV every frame — some games reset it constantly local fovEnforceTick = 0 RunService.RenderStepped:Connect(function() if not State.FOVEnabled then return end local now = tick() if now - fovEnforceTick < 0.3 then return end fovEnforceTick = now local camera = getCam(); if not camera then return end if math.abs(camera.FieldOfView - State.FOVValue) > 1 then camera.FieldOfView = State.FOVValue end end) -- ============================================================ -- JUMP POWER — smooth tween + enforcement -- ============================================================ local jpTween = nil local jpEnforceTick = 0 local function smoothSetJumpPower(target, dur) local hum = getHum(); if not hum then return end if jpTween then jpTween:Cancel(); jpTween = nil end jpTween = TweenService:Create( hum, TweenInfo.new(dur or 0.8, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { JumpPower = target } ) jpTween:Play() end RunService.Heartbeat:Connect(function() if not State.JumpPowerEnabled then return end local now = tick() if now - jpEnforceTick < 0.8 then return end jpEnforceTick = now local hum = getHum() if hum and math.abs(hum.JumpPower - State.JumpPower) > 3 then smoothSetJumpPower(State.JumpPower, 0.4) end end) -- ============================================================ -- SPRINT BURST -- ============================================================ RunService.Heartbeat:Connect(function() if not State.SprintBurst then return end local hum = getHum(); if not hum then return end local moving = hum.MoveDirection.Magnitude > 0.1 if moving and not State._LastMoveState and not State._BurstActive then State._BurstActive = true State.SpeedEnabled = true if State.SpeedMode == "WalkSpeed" then smoothSetSpeed(State.TargetSpeed, 0.3) end notify("Sprint Burst", "Burst active!", 2) task.delay(State.SprintBurstDur, function() State._BurstActive = false if State.SpeedEnabled then State.SpeedEnabled = false if State.SpeedMode == "WalkSpeed" then smoothSetSpeed(State.DefaultSpeed, 1.5) end end notify("Sprint Burst", "Burst ended.", 2) end) end State._LastMoveState = moving end) -- ============================================================ -- KEYBIND -- ============================================================ UserInputService.InputBegan:Connect(function(input, gp) if gp or not State.KeybindEnabled then return end if input.KeyCode.Name == State.SpeedKeybind then State.SpeedEnabled = not State.SpeedEnabled if State.SpeedMode == "WalkSpeed" then smoothSetSpeed(State.SpeedEnabled and State.TargetSpeed or State.DefaultSpeed, 0.5) end notify("Keybind", "Speed " .. (State.SpeedEnabled and "ON" or "OFF"), 1) end end) -- ============================================================ -- ANTI-AFK -- ============================================================ local afkConn = nil local function startAntiAFK() if afkConn then afkConn:Disconnect(); afkConn = nil end local VU = game:GetService("VirtualUser") local last = tick() afkConn = RunService.Heartbeat:Connect(function() if not State.AntiAFK then afkConn:Disconnect(); afkConn = nil; return end if tick() - last >= 55 then last = tick() VU:CaptureController() VU:ClickButton2(Vector2.new()) end end) end -- ============================================================ -- JUMP LOGIC -- ============================================================ local function applyHighJump(hrp, force) local old = hrp:FindFirstChild("_HiBV"); if old then old:Destroy() end local bv = Instance.new("BodyVelocity") bv.Name = "_HiBV"; bv.Velocity = Vector3.new(0, force, 0) bv.MaxForce = Vector3.new(0, math.huge, 0); bv.P = math.huge bv.Parent = hrp game:GetService("Debris"):AddItem(bv, 0.08) end local function applyLongJump(hrp, fwd, up) local old = hrp:FindFirstChild("_LjBV"); if old then old:Destroy() end local flat = Vector3.new(hrp.CFrame.LookVector.X, 0, hrp.CFrame.LookVector.Z).Unit local bv = Instance.new("BodyVelocity") bv.Name = "_LjBV" bv.Velocity = Vector3.new(flat.X * fwd, up, flat.Z * fwd) bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge); bv.P = math.huge bv.Parent = hrp game:GetService("Debris"):AddItem(bv, 0.12) end -- ============================================================ -- AUTO HURDLE -- ============================================================ local hurdleConn = nil local lastHurdleTick = 0 local function doHurdleJump() local hrp = getHRP(); local hum = getHum(); if not hrp or not hum then return end local st = hum:GetState() if st ~= Enum.HumanoidStateType.Running and st ~= Enum.HumanoidStateType.RunningNoPhysics then return end hum:ChangeState(Enum.HumanoidStateType.Jumping) task.delay(0.02, function() local h = getHRP(); if not h then return end local old = h:FindFirstChild("_HdBV"); if old then old:Destroy() end local bv = Instance.new("BodyVelocity") bv.Name = "_HdBV"; bv.Velocity = Vector3.new(0, State.HurdleForce, 0) bv.MaxForce = Vector3.new(0, math.huge, 0); bv.P = math.huge bv.Parent = h game:GetService("Debris"):AddItem(bv, 0.09) end) end local function startAutoHurdle() if hurdleConn then hurdleConn:Disconnect(); hurdleConn = nil end hurdleConn = RunService.Heartbeat:Connect(function() if not State.AutoHurdle then hurdleConn:Disconnect(); hurdleConn = nil; return end local hum = getHum(); if not hum or hum.MoveDirection.Magnitude < 0.1 then return end local now = tick() if now - lastHurdleTick < State.HurdleInterval then return end lastHurdleTick = now doHurdleJump() end) end -- ============================================================ -- JUMP BOOST CONNECTION -- ============================================================ local jumpConn = nil local function connectJump(char) if jumpConn then jumpConn:Disconnect(); jumpConn = nil end local hum = char:WaitForChild("Humanoid") jumpConn = hum.StateChanged:Connect(function(_, new) if new ~= Enum.HumanoidStateType.Jumping then return end local hrp = char:FindFirstChild("HumanoidRootPart"); if not hrp then return end if State.JumpEnabled then if State.JumpMode == "Long Jump" then task.delay(0.02, function() applyLongJump(hrp, State.LongJumpForward, State.LongJumpUp) end) elseif State.JumpMode == "High Jump" then task.delay(0.02, function() applyHighJump(hrp, State.HighJumpForce) end) end end if State.InfJump then task.wait(0.13) hum:ChangeState(Enum.HumanoidStateType.Jumping) end end) end -- ============================================================ -- RESPAWN HANDLER -- ============================================================ lp.CharacterAdded:Connect(function(char) task.wait(0.8) if State.SpeedEnabled and State.SpeedMode == "WalkSpeed" then local hum = char:FindFirstChildOfClass("Humanoid") if hum then hum.WalkSpeed = State.DefaultSpeed task.delay(1, function() smoothSetSpeed(State.TargetSpeed, 1.5) end) end end if State.FOVEnabled then task.delay(0.5, function() smoothSetFOV(State.FOVValue, 0.5) end) end connectJump(char) end) if lp.Character then connectJump(lp.Character) end -- ============================================================ -- ============================================================ -- U I -- ============================================================ -- ============================================================ -- ════════════════════════════════════════ -- TAB › SPEED -- ════════════════════════════════════════ local SpeedTab = Window:CreateTab("⚡ Speed", 4483362458) SpeedTab:CreateSection("Method") SpeedTab:CreateDropdown({ Name = "Speed Mode", Options = { "WalkSpeed", "CFrame" }, CurrentOption = { "WalkSpeed" }, MultipleOptions = false, Flag = "SpeedMode", Callback = function(v) local prev = State.SpeedMode State.SpeedMode = v[1] if prev == "WalkSpeed" and State.SpeedEnabled then smoothSetSpeed(State.DefaultSpeed, 1) end notify("Speed Mode", v[1] .. " selected", 2) end, }) SpeedTab:CreateSection("WalkSpeed") SpeedTab:CreateToggle({ Name = "Enable Speed Boost", CurrentValue = false, Flag = "SpeedToggle", Callback = function(v) State.SpeedEnabled = v if State.SpeedMode == "WalkSpeed" then smoothSetSpeed(v and State.TargetSpeed or State.DefaultSpeed, 1.5) end notify("Speed", v and "ON → " .. State.TargetSpeed .. " ws" or "OFF", 2) end, }) SpeedTab:CreateSlider({ Name = "Walk Speed", Range = { 16, 30 }, Increment = 1, Suffix = " ws", CurrentValue = 24, Flag = "SpeedSlider", Callback = function(v) State.TargetSpeed = v if State.SpeedEnabled and State.SpeedMode == "WalkSpeed" then smoothSetSpeed(v, 0.5) end end, }) SpeedTab:CreateSection("CFrame Speed") SpeedTab:CreateSlider({ Name = "CFrame Speed", Range = { 16, 60 }, Increment = 1, Suffix = " st/s", CurrentValue = 24, Flag = "CFSpeedSlider", Callback = function(v) State.CFSpeed = v end, }) SpeedTab:CreateSection("Sprint Burst") SpeedTab:CreateToggle({ Name = "Auto Burst on Race Start", CurrentValue = false, Flag = "SprintBurst", Callback = function(v) State.SprintBurst = v State._LastMoveState = false State._BurstActive = false notify("Sprint Burst", v and "ON — waiting for movement" or "OFF", 2) end, }) SpeedTab:CreateSlider({ Name = "Burst Duration", Range = { 1, 10 }, Increment = 0.5, Suffix = " s", CurrentValue = 3, Flag = "SprintBurstDur", Callback = function(v) State.SprintBurstDur = v end, }) SpeedTab:CreateSection("Keybind") SpeedTab:CreateToggle({ Name = "Enable Speed Keybind", CurrentValue = false, Flag = "KeybindEnabled", Callback = function(v) State.KeybindEnabled = v notify("Keybind", v and "Active — key: " .. State.SpeedKeybind or "Disabled", 2) end, }) SpeedTab:CreateDropdown({ Name = "Toggle Key", Options = { "R", "F", "G", "H", "T", "Y", "Z", "X", "C", "V" }, CurrentOption = { "R" }, MultipleOptions = false, Flag = "SpeedKey", Callback = function(v) State.SpeedKeybind = v[1] notify("Keybind", "Key set to " .. v[1], 2) end, }) SpeedTab:CreateButton({ Name = "Reset Speed to Default", Callback = function() State.SpeedEnabled = false smoothSetSpeed(State.DefaultSpeed, 1.5) notify("Speed", "Reset to 16 ws", 2) end, }) -- ════════════════════════════════════════ -- TAB › JUMP -- ════════════════════════════════════════ local JumpTab = Window:CreateTab("🦘 Jump", 4483362458) JumpTab:CreateSection("Event") JumpTab:CreateDropdown({ Name = "Jump Event", Options = { "Long Jump", "High Jump" }, CurrentOption = { "Long Jump" }, MultipleOptions = false, Flag = "JumpMode", Callback = function(v) State.JumpMode = v[1] notify("Jump", v[1] .. " selected", 2) end, }) JumpTab:CreateToggle({ Name = "Enable Jump Boost", CurrentValue = false, Flag = "JumpToggle", Callback = function(v) State.JumpEnabled = v notify("Jump Boost", v and "ON — " .. State.JumpMode or "OFF", 2) end, }) JumpTab:CreateSection("Long Jump") SpeedTab = SpeedTab -- just keeping reference clean JumpTab:CreateSlider({ Name = "Forward Force", Range = { 20, 300 }, Increment = 5, Suffix = " fwd", CurrentValue = 80, Flag = "LongJumpFwd", Callback = function(v) State.LongJumpForward = v end, }) JumpTab:CreateSlider({ Name = "Upward Arc", Range = { 0, 100 }, Increment = 5, Suffix = " up", CurrentValue = 40, Flag = "LongJumpUp", Callback = function(v) State.LongJumpUp = v end, }) JumpTab:CreateButton({ Name = "Test Long Jump", Callback = function() local hrp = getHRP() if hrp then applyLongJump(hrp, State.LongJumpForward, State.LongJumpUp) notify("Long Jump", "Fwd " .. State.LongJumpForward .. " Up " .. State.LongJumpUp, 2) end end, }) JumpTab:CreateSection("High Jump") JumpTab:CreateSlider({ Name = "Upward Force", Range = { 50, 500 }, Increment = 5, Suffix = " force", CurrentValue = 80, Flag = "HighJumpForce", Callback = function(v) State.HighJumpForce = v end, }) JumpTab:CreateButton({ Name = "Test High Jump", Callback = function() local hrp = getHRP() if hrp then applyHighJump(hrp, State.HighJumpForce) notify("High Jump", "Force " .. State.HighJumpForce, 2) end end, }) JumpTab:CreateSection("Jump Power") JumpTab:CreateToggle({ Name = "Enable Jump Power Override", CurrentValue = false, Flag = "JumpPowerToggle", Callback = function(v) State.JumpPowerEnabled = v smoothSetJumpPower(v and State.JumpPower or State.DefaultJumpPower, 1) notify("Jump Power", v and "ON → " .. State.JumpPower or "OFF — restored", 2) end, }) JumpTab:CreateSlider({ Name = "Jump Power", Range = { 50, 300 }, Increment = 5, Suffix = " jp", CurrentValue = 50, Flag = "JumpPowerSlider", Callback = function(v) State.JumpPower = v if State.JumpPowerEnabled then smoothSetJumpPower(v, 0.5) end end, }) JumpTab:CreateSection("Misc") JumpTab:CreateToggle({ Name = "Infinite Jump", CurrentValue = false, Flag = "InfJump", Callback = function(v) State.InfJump = v notify("Infinite Jump", v and "ON" or "OFF", 2) end, }) -- ════════════════════════════════════════ -- TAB › HURDLES -- ════════════════════════════════════════ local HurdleTab = Window:CreateTab("🏃 Hurdles", 4483362458) HurdleTab:CreateSection("Auto Jump") HurdleTab:CreateToggle({ Name = "Enable Auto Hurdle Jump", CurrentValue = false, Flag = "AutoHurdle", Callback = function(v) State.AutoHurdle = v lastHurdleTick = 0 if v then startAutoHurdle() end notify("Hurdles", v and "ON — start running!" or "OFF", 2) end, }) HurdleTab:CreateSection("Tuning") HurdleTab:CreateSlider({ Name = "Jump Force", Range = { 20, 120 }, Increment = 1, Suffix = " force", CurrentValue = 55, Flag = "HurdleForce", Callback = function(v) State.HurdleForce = v end, }) HurdleTab:CreateSlider({ Name = "Jump Interval", Range = { 0.3, 12.0 }, Increment = 0.1, Suffix = " s", CurrentValue = 1.2, Flag = "HurdleInterval", Callback = function(v) State.HurdleInterval = v end, }) -- ════════════════════════════════════════ -- TAB › VISUALS -- ════════════════════════════════════════ local VisualTab = Window:CreateTab("🎨 Visuals", 4483362458) VisualTab:CreateSection("Field of View") VisualTab:CreateToggle({ Name = "Enable FOV Override", CurrentValue = false, Flag = "FOVToggle", Callback = function(v) State.FOVEnabled = v local camera = getCam() if camera then if v then smoothSetFOV(State.FOVValue, 0.6) notify("FOV", "ON → " .. State.FOVValue .. "°", 2) else smoothSetFOV(State.DefaultFOV, 0.6) notify("FOV", "OFF — restored to " .. State.DefaultFOV .. "°", 2) end end end, }) VisualTab:CreateSlider({ Name = "FOV", Range = { 70, 120 }, Increment = 1, Suffix = "°", CurrentValue = 90, Flag = "FOVSlider", Callback = function(v) State.FOVValue = v if State.FOVEnabled then local camera = getCam() if camera then camera.FieldOfView = v end end end, }) VisualTab:CreateButton({ Name = "Reset FOV", Callback = function() State.FOVEnabled = false smoothSetFOV(State.DefaultFOV, 0.6) notify("FOV", "Reset to " .. State.DefaultFOV .. "°", 2) end, }) -- ════════════════════════════════════════ -- TAB › UTILITY -- ════════════════════════════════════════ local UtilTab = Window:CreateTab("🔧 Utility", 4483362458) UtilTab:CreateSection("Anti-AFK") UtilTab:CreateToggle({ Name = "Enable Anti-AFK", CurrentValue = false, Flag = "AntiAFK", Callback = function(v) State.AntiAFK = v if v then startAntiAFK() end notify("Anti-AFK", v and "ON — pings every 55s" or "OFF", 2) end, }) UtilTab:CreateSection("Character") UtilTab:CreateButton({ Name = "Respawn Character", Callback = function() local char = getChar() if char then char:BreakJoints() notify("Respawn", "Respawning...", 2) else notify("Respawn", "No character found.", 2) end end, }) -- ════════════════════════════════════════ -- TAB › SETTINGS -- ════════════════════════════════════════ local SettingsTab = Window:CreateTab("⚙️ Settings", 4483362458) SettingsTab:CreateSection("Configuration") SettingsTab:CreateButton({ Name = "Save Settings", Callback = function() local ok, err = pcall(saveConfig, State) notify("Settings", ok and "Saved!" or "Error: " .. tostring(err), ok and 2 or 4) end, }) SettingsTab:CreateButton({ Name = "Load Settings", Callback = function() local data = loadConfig() if not data then notify("Settings", "No saved config found.", 3); return end for k, v in pairs(data) do if State[k] ~= nil then State[k] = v end end notify("Settings", "Loaded! Re-enable features to apply.", 3) end, }) SettingsTab:CreateSection("Reset") SettingsTab:CreateButton({ Name = "Turn Off All Features", Callback = function() State.SpeedEnabled = false State.JumpEnabled = false State.InfJump = false State.AutoHurdle = false State.SprintBurst = false State.JumpPowerEnabled = false State.FOVEnabled = false State.AntiAFK = false State.KeybindEnabled = false smoothSetSpeed(State.DefaultSpeed, 1.5) smoothSetJumpPower(State.DefaultJumpPower, 1.5) smoothSetFOV(State.DefaultFOV, 0.6) notify("Reset", "All features off.", 2) end, }) SettingsTab:CreateSection("About") SettingsTab:CreateLabel("Track & Field Hub — by HIM")