Advertisement
BillsTheGod

Grammar Jacks

Jul 1st, 2022 (edited)
1,625
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.16 KB | None | 0 0
  1. -- made by BillsTheGod, dm this account if u have any issues with it or whatsoever: dont dm me#4277
  2. -- nice discord name i know
  3.  
  4. repeat wait() until game:IsLoaded();
  5.  
  6. -- // SETTINGS \\ --
  7.  
  8. local DELAY_IN_SECONDS = {
  9.     LOWEST_VALUE = 1.5,
  10.     HIGHEST_VALUE = 3.25,
  11. };
  12.  
  13. local AMOUNT_OF_JACKS = 15;
  14. local EMERGENCY_SHORTCUT_KEY = Enum.KeyCode.Delete; --https://developer.roblox.com/en-us/api-reference/enum/KeyCode
  15. local SAY_RANK = ""; --"CAPTAIN" if you want it to speak the rank in the GJ
  16.  
  17. -- // DO NOT CHANGE BELOW \\ --
  18.  
  19. local Players = game:GetService("Players");
  20. local LocalPlayer = Players.LocalPlayer;
  21.  
  22. repeat wait() until LocalPlayer.Character:FindFirstChildOfClass("Humanoid");
  23.  
  24. local Humanoid = LocalPlayer.Character:FindFirstChildOfClass("Humanoid");
  25. local ReplicatedStorage = game:GetService("ReplicatedStorage");
  26. local UserInputService = game:GetService("UserInputService");
  27. local SayMessageRequest = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents"):WaitForChild("SayMessageRequest");
  28. local NumbersList = {
  29.     "ONE",
  30.     "TWO",
  31.     "THREE",
  32.     "FOUR",
  33.     "FIVE",
  34.     "SIX",
  35.     "SEVEN",
  36.     "EIGHT",
  37.     "NINE",
  38.     "TEN",
  39.     "ELEVEN",
  40.     "TWELVE",
  41.     "THIRTEEN",
  42.     "FOURTEEN",
  43.     "FIFTEEN",
  44.     "SIXTEEN",
  45.     "SEVENTEEN",
  46.     "EIGHTEEN",
  47.     "NINETEEN",
  48.     "TWENTY",
  49.  
  50.     -- // SPECIAL ONES \\ --
  51.  
  52.     "THIRTY",
  53.     "FORTY",
  54.     "FIFTY",
  55.     "SIXTY",
  56.     "SEVENTY",
  57.     "EIGHTY",
  58.     "NINETY",
  59.  
  60.     "ONE HUNDRED"
  61. };
  62. local IsPaused = false;
  63.  
  64. UserInputService.InputBegan:Connect(function(Input, Processed)
  65.     if Input.KeyCode == EMERGENCY_SHORTCUT_KEY and not Processed then
  66.         IsPaused = not IsPaused;
  67.     end
  68. end)
  69.  
  70. local function toString(Number)
  71.     local Result = Number;
  72.  
  73.     if Number > 0 and Number <= 20 then
  74.         Result = NumbersList[Number];
  75.     else
  76.         local Characters = #tostring(Number);
  77.         local FirstCharacter = string.sub(Number, 1, 1);
  78.         local SecondCharacter = string.sub(Number, 2, 2);
  79.  
  80.         if Characters < 3 then
  81.             Result = NumbersList[20 + tonumber(FirstCharacter) - 2] .. (SecondCharacter ~= "0" and " " .. NumbersList[tonumber(SecondCharacter)] or "");
  82.         elseif Characters == 3 then
  83.             local ThirdCharacter = string.sub(Number, 3, 3);
  84.  
  85.             if tonumber(SecondCharacter .. ThirdCharacter) < 20 then
  86.                 Result = NumbersList[28] .. (SecondCharacter ~= "0" and " AND " .. NumbersList[tonumber(SecondCharacter .. ThirdCharacter)] or " AND " .. NumbersList[tonumber(ThirdCharacter)])
  87.             else
  88.                 Result = NumbersList[28] .. (SecondCharacter ~= "0" and " AND " .. NumbersList[tonumber(20 + tonumber(SecondCharacter) - 2)] or "") .. (ThirdCharacter ~= "0" and (SecondCharacter ~= "0" and " " or " AND ") .. NumbersList[tonumber(ThirdCharacter)] or "");
  89.             end
  90.         end
  91.     end
  92.     return Result .. (SAY_RANK ~= "" and ", " .. SAY_RANK or SAY_RANK);
  93. end
  94.  
  95. for i=1, AMOUNT_OF_JACKS do
  96.     if AMOUNT_OF_JACKS > 199 or DELAY_IN_SECONDS["LOWEST_VALUE"] < 0.5 or (DELAY_IN_SECONDS["LOWEST_VALUE"] == DELAY_IN_SECONDS["HIGHEST_VALUE"] or DELAY_IN_SECONDS["HIGHEST_VALUE"] < 1) then return end;
  97.     if IsPaused then repeat wait() until not IsPaused end;
  98.  
  99.     SayMessageRequest:FireServer(toString(i), "All");
  100.     Humanoid.Jump = true;
  101.     wait(math.random(DELAY_IN_SECONDS["LOWEST_VALUE"], DELAY_IN_SECONDS["HIGHEST_VALUE"]));
  102. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement