SHARE
TWEET

Untitled

a guest May 23rd, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local input = {}
  2. local uis = game:service'UserInputService'
  3.  
  4. input.mouse = game:GetService'Players'.LocalPlayer:GetMouse();
  5.  
  6. input.down = setmetatable({}, {
  7.     __index = function(i, v)
  8.         local isDown = false;
  9.         v = v:lower();
  10.         for _, key in pairs(Enum.UserInputType:GetEnumItems()) do
  11.             if (key.Name:lower() == v and uis:IsMouseButtonPressed(key.Name)) then
  12.                 isDown = true;
  13.             end
  14.         end
  15.         for _, key in pairs(Enum.KeyCode:GetEnumItems()) do
  16.             if (key.Name:lower() == v and uis:IsKeyDown(key.Name)) then
  17.                 isDown = true;
  18.             end
  19.         end
  20.         return isDown
  21.     end
  22. })
  23.  
  24. getgenv().input = input;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top