YouTube2Text

Pet Stats System! Roblox Studio Simulator Guide Episode 29 — Transcript

by MonzterDEV · 1,737 words · 226 segments · language en · Watch on YouTube

Full transcript

  1. 0:00what's going on ladies and gentlemen in
  2. 0:00today's episode of the simulator series
  3. 0:02we're going to be scripting the pet
  4. 0:03stats so whenever a player equips a
  5. 0:04brand new pet they have increased stats
  6. 0:06as always if you guys do enjoy the video
  7. 0:08or does help you out make sure you smash
  8. 0:09like button also subscribe button and
  9. 0:11turn this post notifications on if you
  10. 0:12want to get notified when i upload more
  11. 0:14roblox development content additionally
  12. 0:15i have a patient if you guys like this
  13. 0:16for me and get access to all the scripts
  14. 0:18and the game file they make during this
  15. 0:19video there's a link down below
  16. 0:20description and you guys can go and
  17. 0:21check that out with that being said
  18. 0:22let's get into it to showcase the
  19. 0:23feature that i'm talking about if we go
  20. 0:25inside of her pet inventory inside of
  21. 0:26eating simulator we can see whenever we
  22. 0:28click on a pet each of the pets have
  23. 0:29their own stats and whenever we equip
  24. 0:31the pet those stats will affect us so
  25. 0:33now whenever we click we get 15 times
  26. 0:35more food and whenever we sell the food
  27. 0:36we also get 15 times more money as well
  28. 0:39hop in directly into studio to start
  29. 0:40working on this the first thing we're
  30. 0:41going to do is we're actually going to
  31. 0:43hide the pet inventory because it should
  32. 0:45be hidden by default anyway then we're
  33. 0:46going to do is we're going to go inside
  34. 0:47of the service grip service inside of
  35. 0:49the utils and inside of the stats module
  36. 0:51that we made a while ago now if you guys
  37. 0:52don't remember this module is what we
  38. 0:54use whenever we're actually going to
  39. 0:55reward a player the food or money or
  40. 0:58other currencies like that the reason
  41. 0:59for that is because there are a lot of
  42. 1:00different things which can affect the
  43. 1:02player's stats such as the item that
  44. 1:04they have equipped or if they've
  45. 1:05purchased the game pass and now also
  46. 1:07pets now in eating simulator the only
  47. 1:09sets that are actually affected by pets
  48. 1:10are the food multiplier and the coin
  49. 1:12multiplier so those are the two stats
  50. 1:14that we're going to be working with now
  51. 1:15additionally if we go inside of the
  52. 1:16replicated storage inside of the configs
  53. 1:17folder and open up the pets module
  54. 1:19inside of here is where all the stats
  55. 1:21are contained for each of our different
  56. 1:22pets so for instance if we equip a
  57. 1:24common dog pet we will have a 2.5 food
  58. 1:26multiplier and a 2.5 coin multiplier as
  59. 1:29well so now that we've got that what we
  60. 1:30need to do is inside of the stats module
  61. 1:32script we need to actually require that
  62. 1:34config so we're going to do is we're
  63. 1:35going to say local pets config equals
  64. 1:38require replicate
  65. 1:40replicatedstorage.config.pets and now we
  66. 1:41have the pets the next thing we need to
  67. 1:43do is we need to actually create a
  68. 1:44function so that we can get all of the
  69. 1:46pets that the player currently has
  70. 1:47equipped so what we're going to do is
  71. 1:48we're going to create a brand new local
  72. 1:50function that's going to be called get
  73. 1:51equipped pets and we're going to accept
  74. 1:54a player then we need to do is we need
  75. 1:55to loop through the player's pet
  76. 1:57inventory so for underscore child in
  77. 1:59ipairs player.pet inventory which is a
  78. 2:03footer get children do now the way that
  79. 2:05we know if a pet is equipped is if
  80. 2:07inside of this folder there is a bull
  81. 2:09value and the value of that would be set
  82. 2:11to true if the pet is equipped but
  83. 2:13before we start working with that for
  84. 2:14loop what we actually need to do is we
  85. 2:15need to create an equipped list and
  86. 2:18that's just going to be set to a table
  87. 2:19so now all the pets that we currently
  88. 2:20have equipped we will add to that list
  89. 2:22so if child dot equipped dot value then
  90. 2:26so now if the pet is equipped what we're
  91. 2:28then going to do is we're going to index
  92. 2:30equipped list with the patch uuid so
  93. 2:33we're going to say child.name because
  94. 2:34that's going to be the uuid then we're
  95. 2:36going to create a brand new table inside
  96. 2:37of this table and it's going to have two
  97. 2:39different properties we're going to have
  98. 2:40the id which is going to be equal to the
  99. 2:42child dot id dot value so that'll tell
  100. 2:44us what type of pet it actually is and
  101. 2:46then we also want to get the rarity as
  102. 2:47well and that's going to be
  103. 2:50child.rarity.value so inside of the
  104. 2:51equipped list we have each of the pet's
  105. 2:53uuids equal to a table and inside of
  106. 2:55that table we then have the type of pet
  107. 2:57that it actually is and the rarity that
  108. 2:58it is as well then we're gonna do at the
  109. 3:00bottom of this function is we are simply
  110. 3:02going to return the equipped list now
  111. 3:04that we have all the pets that the
  112. 3:05player has equipped we now need to
  113. 3:06create a function for calculating all
  114. 3:08the stats that the player obtained from
  115. 3:09having those pets equipped so what we're
  116. 3:11going to do is return a brand new local
  117. 3:12function and this is going to be called
  118. 3:13calculate pet stats and this is going to
  119. 3:16accept a player then what we're going to
  120. 3:18do inside of here is we're going to
  121. 3:19create a new variable called stat and
  122. 3:20we're going to set this to zero reason
  123. 3:22we're setting this to zero is in case by
  124. 3:23default if the player has no pets
  125. 3:25equipped then it's just gonna be set to
  126. 3:26zero the next thing we need to do is we
  127. 3:28need to create a variable for the pets
  128. 3:29that the player has equipped so equipped
  129. 3:31pets and that's going to be set to the
  130. 3:33get equipped pets function and we're
  131. 3:35going to of course pass through the
  132. 3:36player there then we're going to do is
  133. 3:37we're going to loop through the equipped
  134. 3:38pets table so the key is going to be the
  135. 3:40uuid and then the value is going to be
  136. 3:42the info table that we created so in
  137. 3:44pairs equipped pets do now what we need
  138. 3:47to do is we need to actually get the
  139. 3:48stat of the pet so we're going to say
  140. 3:50local pet stat equals and the way that
  141. 3:52we're going to find this is by using the
  142. 3:53pets config then what we can do is we
  143. 3:55can index the type of the pet that we
  144. 3:57currently have equipped and then we can
  145. 3:58index that with the rarity that we have
  146. 4:00equipped as well and this will return a
  147. 4:01number so all we have to do is we just
  148. 4:03have to index that by using the info
  149. 4:05table so we're going to say info dot id
  150. 4:07because that's going to be the type of
  151. 4:08the pet and then info.rarity as that's
  152. 4:10going to be the rarity of the pet and
  153. 4:11now the pet stat is equal to whatever
  154. 4:13the stat actually is so then we can do
  155. 4:15is we can add the pet stat to the stat
  156. 4:16variable that we created so we can say
  157. 4:18stat plus equals pet stat and then that
  158. 4:20loop will go through all the equipped
  159. 4:21pets and add each of the stats to this
  160. 4:23stat value right here and then what alls
  161. 4:25we have to do is return that stat number
  162. 4:27and now we've calculated all the pet
  163. 4:28stats the next thing we have to do is we
  164. 4:30just have to actually implement this
  165. 4:31into our different stats such as our
  166. 4:33through multiplier and our coin
  167. 4:34multiplier as well so we can see inside
  168. 4:36of the food multiplier we have the total
  169. 4:38and then we have rank and this is
  170. 4:39basically a multiplier for this stat
  171. 4:41already so what we're going to do is
  172. 4:42right below this we're going to say
  173. 4:43local pets equals and then calculate pet
  174. 4:45stats pass through the player and then
  175. 4:47we're going to get a number from that
  176. 4:48then all we have to do is we just have
  177. 4:50to add that number so pets to the total
  178. 4:52so then we have the rank multiplier and
  179. 4:54we're adding that to the total and now
  180. 4:55we have the pets multiplier and we're
  181. 4:56adding that to the total as well and
  182. 4:58then we also have the game pass
  183. 4:59multiplier as well so this entire
  184. 5:00function is just calculating the
  185. 5:01multiplier of the food stack then all we
  186. 5:03have to do is add this to the coin
  187. 5:04multiplier as well the exact same way
  188. 5:06that we did with rank so we're just
  189. 5:08going to say local pets equals calculate
  190. 5:10pet stats pass through the player and
  191. 5:12then we just have to add that to the
  192. 5:13total so we're gonna say total plus
  193. 5:15equals pets and there we go now we can
  194. 5:17go ahead and start this up and test this
  195. 5:18out so if we go inside of our game and
  196. 5:19unequip all of our pets just to see how
  197. 5:21much food we should get by default each
  198. 5:24time we click we get plus one food now
  199. 5:25when we equip a dog pet that has a 2.5
  200. 5:28multiplier when we click we get four
  201. 5:30food and if we equip another pet that
  202. 5:31has a 2.5 multiplier so that would be a
  203. 5:33five times multiplier when we click we
  204. 5:35now get six now you might be thinking
  205. 5:37shouldn't we get five each click but the
  206. 5:39reason that we're not getting five per
  207. 5:40click even though we have a five times
  208. 5:41multiplier is because of how we have the
  209. 5:43reward system set up so of course you
  210. 5:44can set up the rewards however you'd
  211. 5:46like to but this is teaching you how to
  212. 5:47have your pet stats set up so ladies
  213. 5:48gentlemen hopefully this video to help
  214. 5:50you guys out if it did make sure you
  215. 5:51smash the like button also the subscribe
  216. 5:52button and turn this notifications on if
  217. 5:54you want to get notified when i upload
  218. 5:55more roblox moment content additionally
  219. 5:57with patreon if you guys like this for
  220. 5:58me and gain access to all the scripts in
  221. 5:59the game file they made during this
  222. 6:00episode there's a link down below
  223. 6:01description and you guys can go and
  224. 6:02check that out with that being said i'll
  225. 6:03see you guys in the next episode
  226. 6:08[Music]

About this transcript

This page contains the full transcript of Pet Stats System! Roblox Studio Simulator Guide Episode 29 by MonzterDEV, generated from the public captions YouTube serves with the video. The transcript has 1,737 words across 226 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.