for i, loopPlayer in pairs(game.Players:GetPlayers()) do
local MasterControl = require(loopPlayer:WaitForChild("PlayerScripts"):WaitForChild("ControlScript"):WaitForChild("MasterControl"))
local m = game.Players.LocalPlayer:GetMouse()
local character = game.Players.LocalPlayer.Character
local active = false
local Humanoid = character:WaitForChild("Humanoid")
db = false
m.KeyDown:connect(function(k)
k = k:lower()
if k == 'x' then
if db == false then
game.Lighting.ColorCorrection.Enabled = true
game.Workspace.TimeStop:Play()
active = true
if active == true then
while wait(1) do
Humanoid.Health = Humanoid.Health - 1.5
end
end
if loopPlayer ~= game.Players.LocalPlayer then
MasterControl:Disable()
game.Lighting.Blur.Enabled = true
loopPlayer.PlayerGui.Time.TextLabel.Visible = true
wait(20)
db = true
end
end
if db == true then
game.Lighting.ColorCorrection.Enabled = false
game.Workspace.TimeStop:Stop()
if loopPlayer ~= game.Players.LocalPlayer then
MasterControl:Enable()
game.Lighting.Blur.Enabled = false
loopPlayer.PlayerGui.Time.TextLabel.Visible = false
db = false
end
end
end
end)
end
I tried to print loopPlayer and it gives me ONLY my username and never others. I used Test Server in Studio.

5 comments
You tested in studio?.... There's only one player in Studio and that's you.... -_-
LOL
also keydown is decaperated, use inputbegan from userinputservice
@Pojoto I used local server test....
wait() should NOT be a condition in while loops.