Itz_Me6969

regular

Feb 18th, 2023
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. --[[
  2. Don't change speed to below 0.04, it will ban you for having a WPM higher than ~250
  3.  
  4. 0.05 is about 190 WPM
  5. 0.04 is about 220 WPM
  6. ]]
  7.  
  8. local Speed = 0.05
  9.  
  10.  
  11. -- Simulates pressing a key
  12. local vim = game:GetService("VirtualInputManager")
  13. local function PressKey(name)
  14. vim:SendKeyEvent(true, Enum.KeyCode[name], false, game)
  15. vim:SendKeyEvent(false, Enum.KeyCode[name], false, game)
  16. end
  17.  
  18. -- Gets keys
  19. local keys = workspace.Letters:GetChildren()[1]
  20. local start
  21. for i,v in pairs(keys:GetChildren()) do
  22. if v:FindFirstChild("PopupTemplate") then
  23. start = v
  24. end
  25. end
  26.  
  27. local dists = {}
  28. for i,v in pairs(keys:GetChildren()) do
  29. if v:FindFirstChild("SurfaceGui") then
  30. local dist = (v.Position - start.Position).Magnitude
  31. table.insert(dists,{v,dist})
  32. end
  33. end
  34.  
  35. table.sort(dists,
  36. function(a,b)
  37. return a[2] < b[2]
  38. end
  39. )
  40.  
  41. -- Type 'em
  42. for i,v in pairs(dists) do
  43. local letter = string.upper(v[1].SurfaceGui.TextLabel.Text)
  44. if letter == " " then
  45. PressKey("Space")
  46. else
  47. PressKey(letter)
  48. end
  49. task.wait(Speed)
  50. end
Add Comment
Please, Sign In to add comment