detodounpoquito

UserInputService

Apr 29th, 2021
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.37 KB | None | 0 0
  1. local userinputservice = game:GetService("UserInputService")
  2.  
  3. local player = game.Players.LocalPlayer
  4.  
  5. userinputservice.InputBegan:Connect(function(key)
  6.     if key.KeyCode == Enum.KeyCode.R then
  7.         if player.PlayerGui.Radio.Frame.Visible == true then
  8.             player.PlayerGui.Radio.Frame.Visible = false
  9.         else
  10.             player.PlayerGui.Radio.Frame.Visible = true
  11.         end
  12.     end
  13. end)
Advertisement
Add Comment
Please, Sign In to add comment