meowbee

Random Scripts

Jul 14th, 2024 (edited)
253
-1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.42 KB | Source Code | 0 1
  1. Welcome to my 'Random Scripts' page! Here, you can find plenty of scripts I found during my developing era that may or may not be helpful for your Roblox game. Keep in mind, this is all the script I use in my game 'Sienna Badge Walk' and some other games. There are several badge awarder scripts here and all of them are RATE LIMIT FRIENDLY! Just make sure you follow each step on how to properly set the script and if you would like to correct me or add something, please DM me! Have fun scripting :)
  2.  
  3. == Last Updated: July 14th, 2024 (14/07/2024 | 07/14/2024) ==
  4. Note: I will only update this page whenever I feel like it, so do not expect consistent update!
  5.    
  6. === Badge Awarder Scripts === -- [CREDIT TO: @luckyto_shine (Roblox) and @30l50 (Roblox) --- They created this script, not me!]
  7. == Rate Limit Script ==
  8. Note 1: Make a folder named 'Scripts' that will consist of the following scripts. If you want to rename the folder, make sure to also change the path that is marked in the script!
  9. Note 2: Optionally, you can download this asset and remove unnecessary parts you don't want: https://create.roblox.com/store/asset/11647317355/Badge-Awarder-Kit
  10.  
  11. // Badge Handler //
  12. > Name: BadgeHandler
  13. > Script Type: Script
  14. > Scripts:
  15. for _, item in pairs(script:GetChildren()) do
  16.     item.Parent = game.StarterGui
  17.     for _, scripts in pairs(item:GetDescendants()) do
  18.         if scripts:IsA("Script") or scripts:IsA("LocalScript") then
  19.             scripts.Enabled = true
  20.         end
  21.     end
  22. end
  23.  
  24. >> Name: RateUI
  25. >> Script Type: ScreenGui
  26. Note: Make sure to customize these settings:
  27. 'ClipToDeviceSafeArea' set to enabled,
  28. 'SafeAreaCompatibility' set to FullscreenExtension,
  29. 'ScreenInsets' set to CoreUISafeInsets,
  30. 'DisplayOrder' set to 0,
  31.  
  32. >>> Name: Tracker
  33. >>> Script Type: ObjectValue
  34. Note: Make sure to set the Value type to 'RateLimitTracker'
  35.  
  36. >>> Name: Updater
  37. >>> Script Type: LocalScript
  38. >>> Scripts:
  39. while task.wait(0.1) do
  40.     rate = script.Parent.Tracker.Value.RateLimit.Value
  41.     timeval = script.Parent.Tracker.Value.Time.Value
  42.     ratelimit = 50+(35*#game.Players:GetChildren())
  43.     if rate <= math.ceil(ratelimit/2)-1 then
  44.         script.Parent.RateText.TextColor3 = Color3.fromRGB(rate*(255/(ratelimit/2)),255,0)
  45.     elseif rate == math.ceil(ratelimit/2) then
  46.         script.Parent.RateText.TextColor3 = Color3.fromRGB(255,255,0)
  47.     elseif rate >= math.ceil(ratelimit/2)+1 and rate < ratelimit then
  48.         script.Parent.RateText.TextColor3 = Color3.fromRGB(255,255-((rate-math.ceil(ratelimit/2))*(255/(ratelimit/2))),0)
  49.     elseif rate >= ratelimit then
  50.         script.Parent.RateText.TextColor3 = Color3.fromRGB(255,0,0)
  51.     end
  52.     text = "Rate Limit: " .. rate .. "/" .. ratelimit
  53.     if timeval ~= 0 then
  54.         text = text .. " [" .. timeval .. "]"
  55.     end
  56.     script.Parent.RateText.Text = text
  57. end
  58. Note: Make to disable this script!
  59.  
  60. >>> Name: RateText
  61. >>> Script Type: TextLabel
  62. Note: Make sure to customize these settings:
  63. 'BackgroundTransparency' set to 1,
  64. 'Position' set to {0.414, 0},{0.969.0},
  65. 'Size' set to {0.171,0},{0.031,0},
  66. 'FontFace' set to Highway Gothic,
  67. 'Text' set to "Rate Limit: 0/85",
  68. 'TextColor3' set to {0,255,0},
  69. 'TextScaled' set to enabled,
  70. 'TextWrapped' set to enabled.
  71.  
  72. // Rate Limit Tracker //
  73. > Name: RateLimitTracker
  74. > Script Type: Script
  75. > Scripts:
  76. timerActive = false
  77.  
  78. script.Requests.ChildAdded:Connect(function(newcheck)
  79.     local badgeid = newcheck.Name
  80.     script.RateLimit.Value += 1
  81.     if script.Time.Value <= 0 then
  82.         script.Time.Value = 60
  83.         timerActive = true
  84.     end
  85.     task.wait()
  86.     newcheck:Destroy()
  87. end)
  88.  
  89. while task.wait(1) do
  90.     if timerActive == true and script.Time.Value > 0 then
  91.         script.Time.Value -= 1
  92.         if script.Time.Value <= 0 then
  93.             script.RateLimit.Value = 0
  94.             timerActive = false
  95.         end
  96.     end
  97. end
  98.  
  99. >> Name: Requests
  100. >> Script Type: Folder
  101. Note: Make sure this folder is empty!
  102.  
  103. >> Name: RateLimit
  104. >> Script Type: NumberValue
  105. Note: Make sure to set the Value type to 0
  106.  
  107. >> Name: Time
  108. Script Type: NumberValue
  109. Note: Make sure to set the Value type to 0
  110.  
  111. // Badge Award Manager //
  112. > Name: BadgeAwardManager
  113. > Script Type: ModuleScript
  114. > Scripts:
  115. local manager = {}
  116.  
  117. function manager.AwardBManager(userid,badgeid)
  118.     spawn(function()
  119.         local player = game.Players:GetPlayerByUserId(userid)
  120.         local manager_folder
  121.         if not player:FindFirstChild("BadgeStorerManagerStore") then
  122.             manager_folder = Instance.new("Folder",player)
  123.             manager_folder.Name = "BadgeStorerManagerStore"
  124.             manager_folder.ChildAdded:Connect(function(n)
  125.                 task.wait(5)
  126.                 n:Destroy()
  127.             end)
  128.         end
  129.         manager_folder = player:FindFirstChild("BadgeStorerManagerStore")
  130.         if not manager_folder:FindFirstChild(tostring(badgeid)) then
  131.             local newcheck = Instance.new("ObjectValue",manager_folder)
  132.             newcheck.Value = script.Parent
  133.             newcheck.Name = tostring(badgeid)
  134.             local ratelimit_tracker = Instance.new("Motor")
  135.             ratelimit_tracker.Name = badgeid
  136.             ratelimit_tracker.Parent = script.Parent.RateLimitTracker.Requests
  137.             game.BadgeService:AwardBadge(player.userId,badgeid)
  138.         end
  139.     end)
  140. end
  141.  
  142. return manager
  143.  
  144. == Badge Awarder Script ==
  145. Note 1: Insert this script in any part you wanted them to become touchable to award badge.
  146. Note 2: If you don't want them to be touchable-only, just paste the following scripts to your badge awarding script:
  147.  
  148. local Scripts = workspace:WaitForChild("Scripts")
  149. require(Scripts.BadgeAwardManager).AwardBManager(player.UserId,badgeId)
  150.  
  151. // Touchable Badge Script //
  152. > Name: BadgeAwarder
  153. > Script Type: Script
  154. > Location: Any part you wanted to be touchable to award badge
  155. > Scripts:
  156. local Scripts = workspace:WaitForChild("Scripts") --- replace "Scripts" with your Rate Limit Script folder
  157.  
  158. script.Parent.Touched:Connect(function(hit)
  159.     if hit.Parent:FindFirstChild("Humanoid") then
  160.         local player = game.Players:GetPlayerFromCharacter(hit.Parent)
  161.         require(Scripts.BadgeAwardManager).AwardBManager(player.UserId,badgeId) --- replace badgeId with your Badge ID
  162.     end
  163. end)
  164.  
  165. // Welcome Badge Script // --- Generated by ChatGPT
  166. > Name: BadgeAwarder
  167. > Script Type: Script
  168. > Location: StarterPlayer -> StarterPlayerScripts
  169. > Scripts:
  170. local Players = game:GetService("Players")
  171. local Scripts = workspace:WaitForChild("Scripts") --- replace "Scripts" with your Rate Limit Script folder
  172.  
  173. -- Function to award badge
  174. local function awardWelcomeBadge(player)
  175.     require(Scripts.BadgeAwardManager).AwardBManager(player.UserId, badgeId) --- replaced badgeId with your Badge ID
  176. end
  177.  
  178. -- Connect the PlayerAdded event to award the badge when a player joins
  179. Players.PlayerAdded:Connect(function(player)
  180.     -- Wait for the player's character to be added
  181.     player.CharacterAdded:Connect(function()
  182.         awardWelcomeBadge(player)
  183.     end)
  184. end)
  185.  
  186. -- For players who are already in the game (in case of testing in studio)
  187. for _, player in pairs(Players:GetPlayers()) do
  188.     awardWelcomeBadge(player)
  189. end
  190.  
  191. // Meet Badge Script //
  192. > Name: BadgeAwarder
  193. > Script Type: Script
  194. > Location: ServerScriptService
  195. > Scripts:
  196. local Players = game:GetService("Players")
  197. local Scripts = workspace:WaitForChild("Scripts") --- replace "Scripts" with your Rate Limit Script folder
  198. local CreatorUserId = 12345678  -- Replace with the creator's user ID
  199.  
  200. -- Function to award badge
  201. local function awardBadge(player)
  202.     require(Scripts.BadgeAwardManager).AwardBManager(player.UserId, badgeId) --- replace badgeId with your Badge ID
  203. end
  204.  
  205. -- Function to check and award badge if CreatorUserId is in the game
  206. local function checkAndAwardBadge()
  207.     for _, player in ipairs(Players:GetPlayers()) do
  208.         if player.UserId == CreatorUserId then
  209.             for _, p in ipairs(Players:GetPlayers()) do
  210.                 awardBadge(p)
  211.             end
  212.             break
  213.         end
  214.     end
  215. end
  216.  
  217. -- Connect the PlayerAdded event to check and award badge when a player joins
  218. Players.PlayerAdded:Connect(function(player)
  219.     player.CharacterAdded:Connect(function()
  220.         checkAndAwardBadge()
  221.     end)
  222. end)
  223.  
  224. -- Initial check when the script runs (for players already in the game)
  225. checkAndAwardBadge()
  226.  
  227. // Group Badge Script //
  228. > Name: BadgeAwarder
  229. > Script Type: Script
  230. > Location: Anywhere
  231. > Scripts:
  232. local Scripts = workspace:WaitForChild("Scripts") --- replace "Scripts" with your Rate Limit Script folder
  233.  
  234. game.Players.PlayerAdded:connect(function(p)
  235.     if p:IsInGroup(groupId) then --- replace groupId with your Group ID
  236.         require(Scripts.BadgeAwardManager).AwardBManager(p.UserId,badgeId) --- replace badgeId with your Badge ID
  237.     end
  238. end)
  239.  
  240. Log in to the email I already wrote.
  241. Password: 15th and 16th message in DM, no space, stickers don't count.
Advertisement
Add Comment
Please, Sign In to add comment