Advertisement
FragRage21

equip

Sep 10th, 2020
851
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.07 KB | None | 0 0
  1. keys = _G.HotKeys
  2. UI = game:GetService("UserInputService")
  3. UI.InputBegan:Connect(function(input,pass)
  4. if not pass then return end
  5. key = input.KeyCode.Name
  6. input = input.Keyboard.Name
  7. pass = false
  8. for i,info in pairs(keys)
  9. local k = info[1]
  10. if key == k then pass = true break end
  11. end
  12. if pass then
  13. gui.Script.Event:FireServer("Equip",tonumber(key)
  14. end
  15. end)
  16.  
  17. local selected = nil
  18. loca lastsel = nil
  19.  
  20. elseif func == "Equip" then
  21. if f1 == 0 then f1 = 10 end
  22. if f1 >= 1 and 10 >= f1 then
  23. local tool = get("Tool")
  24. locam f = get("Frame",f1)
  25. local selected = [tool,f1,f,f.ImageColor3]
  26. if not lastsel then
  27. lastsel = selected
  28. elseif last and selected[2] == last[2] then
  29. selected = nil
  30. end
  31. count = 0
  32. while selected and selected[2] == last[2] do
  33. if count <= 1 then
  34. wait(.01)
  35. if count == 1 then
  36. selected[3].ImageColor3 = Color3.fromRGB(0,0,50)
  37. count = count+.01
  38. else
  39. count = count-.01
  40. end
  41. elseif count >= 0 then
  42. wait(.01)
  43. if count == 0 then
  44. selected[3].ImageColor3 = selected[4]
  45. count = count-.01
  46. else
  47. count = count+.01
  48. end
  49. end
  50. last
  51. end
  52. end
  53. end--don't need
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement