OR4NG3-FRU1T

Untitled

May 31st, 2026
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  1. local TabGlobal = Window:CreateTab("Global", 4483362458)
  2. local secStamina = TabGlobal:CreateSection("Stamina")
  3.  
  4. local stam = {
  5. on = cfg.get("stamOn", false),
  6. loss = cfg.get("stamLoss", 10),
  7. gain = cfg.get("stamGain", 20),
  8. max = cfg.get("stamMax", 100),
  9. current = cfg.get("stamCurrent", 100),
  10. noLoss = cfg.get("stamNoLoss", false),
  11. thread = nil,
  12. }
  13.  
  14. local function stamModule()
  15. local ok, m = pcall(function() return require(svc.RS.Systems.Character.Game.Sprinting) end)
  16. return ok and m or nil
  17. end
  18.  
  19. local function stamIsKiller()
  20. local ch = lp.Character; if not ch then return false end
  21. local kf = getTeamFolder("Killers")
  22. return kf and ch:IsDescendantOf(kf)
  23. end
  24.  
  25. local function stamIsEnraged()
  26. local ch = lp.Character; if not ch then return false end
  27. local kf = getTeamFolder("Killers"); if not (kf and ch:IsDescendantOf(kf)) then return false end
  28. for _, v in ipairs(ch:GetDescendants()) do
  29. if v:IsA("NumberValue") and v.Name == "ENRAGED" then return true end
  30. end
  31. return false
  32. end
  33.  
  34. local function stamApply()
  35. local m = stamModule(); if not m then return end
  36. if not m.DefaultsSet then pcall(function() m.Init() end) end
  37. if stamIsEnraged() then
  38. m.StaminaCap = nil
  39. return
  40. end
  41. local forceNoLoss = stam.noLoss or stamIsKiller()
  42. m.StaminaLoss = stam.loss
  43. m.StaminaGain = stam.gain
  44. m.MaxStamina = stam.max
  45. m.StaminaCap = nil
  46. m.StaminaLossDisabled = forceNoLoss
  47. if m.Stamina and m.Stamina > stam.max then m.Stamina = stam.current end
  48. pcall(function() if m.__staminaChangedEvent then m.__staminaChangedEvent:Fire() end end)
  49. end
  50.  
  51. local function stamStart()
  52. if stam.thread then return end
  53. stam.thread = task.spawn(function()
  54. while stam.on do
  55. if lp.Character and lp.Character:FindFirstChild("HumanoidRootPart") then stamApply() end
  56. task.wait(0.5)
  57. end; stam.thread = nil
  58. end)
  59. end
  60.  
  61. local function stamStop()
  62. stam.on = false
  63. if stam.thread then task.cancel(stam.thread); stam.thread = nil end
  64. end
  65.  
  66. secStamina:CreateToggle({
  67. Name = "Custom Stamina",
  68. CurrentValue = stam.on,
  69. Callback = function(on)
  70. stam.on = on; cfg.set("stamOn", on); if on then stamStart() else stamStop() end
  71. end
  72. })
  73.  
  74. secStamina:CreateSlider({
  75. Name = "Loss Rate",
  76. Range = {0, 50},
  77. Increment = 1,
  78. CurrentValue = stam.loss,
  79. Callback = function(v) stam.loss = v; cfg.set("stamLoss", v) end
  80. })
  81.  
  82. secStamina:CreateSlider({
  83. Name = "Gain Rate",
  84. Range = {0, 50},
  85. Increment = 1,
  86. CurrentValue = stam.gain,
  87. Callback = function(v) stam.gain = v; cfg.set("stamGain", v) end
  88. })
  89.  
  90. secStamina:CreateSlider({
  91. Name = "Max Pool",
  92. Range = {50, 500},
  93. Increment = 1,
  94. CurrentValue = stam.max,
  95. Callback = function(v) stam.max = v; cfg.set("stamMax", v) end
  96. })
  97.  
  98. secStamina:CreateSlider({
  99. Name = "Current Value",
  100. Range = {0, 500},
  101. Increment = 1,
  102. CurrentValue = stam.current,
  103. Callback = function(v) stam.current = v; cfg.set("stamCurrent", v) end
  104. })
  105.  
  106. secStamina:CreateToggle({
  107. Name = "Infinite Stamina",
  108. CurrentValue = stam.noLoss,
  109. Callback = function(on)
  110. stam.noLoss = on; cfg.set("stamNoLoss", on); stamApply();
  111. if on and not stam.on then stam.on = true; stamStart() end
  112. end
  113. })
  114.  
  115. if stam.on then stamStart() end
  116. lp.CharacterAdded:Connect(function()
  117. task.delay(1.5, function()
  118. if stam.on then stamApply(); if not stam.thread then stamStart() end end
  119. end)
  120. end)
Advertisement
Add Comment
Please, Sign In to add comment