So this is a local script that is inside Starter Player, that has a Remote Event. when this script is ran when pressing R, it adds the health you need (Yay! :D) then takes away the health you gained seconds later, to return to health back to its original percent. (No! D:) If anyone could help with this, that would be great.
local repStorage = game:GetService("ReplicatedStorage")
local remote = repStorage:WaitForChild("HealEvent")
remote:FireServer("argument")
game:GetService("UserInputService").InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.R then
game.Players.LocalPlayer.Character.Humanoid.Health = game.Players.LocalPlayer.Character.Humanoid.Health + 99
end
end)

3 comments
can you give a script please? im not good at that stuff.
or at least give me the script on how if r is pressed down, it will run a script below it.
THIS deserves to be the accepted answer. and it is now.