Pet Stats System! Roblox Studio Simulator Guide Episode 29 — Transcript
Full transcript
- 0:00what's going on ladies and gentlemen in
- 0:00today's episode of the simulator series
- 0:02we're going to be scripting the pet
- 0:03stats so whenever a player equips a
- 0:04brand new pet they have increased stats
- 0:06as always if you guys do enjoy the video
- 0:08or does help you out make sure you smash
- 0:09like button also subscribe button and
- 0:11turn this post notifications on if you
- 0:12want to get notified when i upload more
- 0:14roblox development content additionally
- 0:15i have a patient if you guys like this
- 0:16for me and get access to all the scripts
- 0:18and the game file they make during this
- 0:19video there's a link down below
- 0:20description and you guys can go and
- 0:21check that out with that being said
- 0:22let's get into it to showcase the
- 0:23feature that i'm talking about if we go
- 0:25inside of her pet inventory inside of
- 0:26eating simulator we can see whenever we
- 0:28click on a pet each of the pets have
- 0:29their own stats and whenever we equip
- 0:31the pet those stats will affect us so
- 0:33now whenever we click we get 15 times
- 0:35more food and whenever we sell the food
- 0:36we also get 15 times more money as well
- 0:39hop in directly into studio to start
- 0:40working on this the first thing we're
- 0:41going to do is we're actually going to
- 0:43hide the pet inventory because it should
- 0:45be hidden by default anyway then we're
- 0:46going to do is we're going to go inside
- 0:47of the service grip service inside of
- 0:49the utils and inside of the stats module
- 0:51that we made a while ago now if you guys
- 0:52don't remember this module is what we
- 0:54use whenever we're actually going to
- 0:55reward a player the food or money or
- 0:58other currencies like that the reason
- 0:59for that is because there are a lot of
- 1:00different things which can affect the
- 1:02player's stats such as the item that
- 1:04they have equipped or if they've
- 1:05purchased the game pass and now also
- 1:07pets now in eating simulator the only
- 1:09sets that are actually affected by pets
- 1:10are the food multiplier and the coin
- 1:12multiplier so those are the two stats
- 1:14that we're going to be working with now
- 1:15additionally if we go inside of the
- 1:16replicated storage inside of the configs
- 1:17folder and open up the pets module
- 1:19inside of here is where all the stats
- 1:21are contained for each of our different
- 1:22pets so for instance if we equip a
- 1:24common dog pet we will have a 2.5 food
- 1:26multiplier and a 2.5 coin multiplier as
- 1:29well so now that we've got that what we
- 1:30need to do is inside of the stats module
- 1:32script we need to actually require that
- 1:34config so we're going to do is we're
- 1:35going to say local pets config equals
- 1:38require replicate
- 1:40replicatedstorage.config.pets and now we
- 1:41have the pets the next thing we need to
- 1:43do is we need to actually create a
- 1:44function so that we can get all of the
- 1:46pets that the player currently has
- 1:47equipped so what we're going to do is
- 1:48we're going to create a brand new local
- 1:50function that's going to be called get
- 1:51equipped pets and we're going to accept
- 1:54a player then we need to do is we need
- 1:55to loop through the player's pet
- 1:57inventory so for underscore child in
- 1:59ipairs player.pet inventory which is a
- 2:03footer get children do now the way that
- 2:05we know if a pet is equipped is if
- 2:07inside of this folder there is a bull
- 2:09value and the value of that would be set
- 2:11to true if the pet is equipped but
- 2:13before we start working with that for
- 2:14loop what we actually need to do is we
- 2:15need to create an equipped list and
- 2:18that's just going to be set to a table
- 2:19so now all the pets that we currently
- 2:20have equipped we will add to that list
- 2:22so if child dot equipped dot value then
- 2:26so now if the pet is equipped what we're
- 2:28then going to do is we're going to index
- 2:30equipped list with the patch uuid so
- 2:33we're going to say child.name because
- 2:34that's going to be the uuid then we're
- 2:36going to create a brand new table inside
- 2:37of this table and it's going to have two
- 2:39different properties we're going to have
- 2:40the id which is going to be equal to the
- 2:42child dot id dot value so that'll tell
- 2:44us what type of pet it actually is and
- 2:46then we also want to get the rarity as
- 2:47well and that's going to be
- 2:50child.rarity.value so inside of the
- 2:51equipped list we have each of the pet's
- 2:53uuids equal to a table and inside of
- 2:55that table we then have the type of pet
- 2:57that it actually is and the rarity that
- 2:58it is as well then we're gonna do at the
- 3:00bottom of this function is we are simply
- 3:02going to return the equipped list now
- 3:04that we have all the pets that the
- 3:05player has equipped we now need to
- 3:06create a function for calculating all
- 3:08the stats that the player obtained from
- 3:09having those pets equipped so what we're
- 3:11going to do is return a brand new local
- 3:12function and this is going to be called
- 3:13calculate pet stats and this is going to
- 3:16accept a player then what we're going to
- 3:18do inside of here is we're going to
- 3:19create a new variable called stat and
- 3:20we're going to set this to zero reason
- 3:22we're setting this to zero is in case by
- 3:23default if the player has no pets
- 3:25equipped then it's just gonna be set to
- 3:26zero the next thing we need to do is we
- 3:28need to create a variable for the pets
- 3:29that the player has equipped so equipped
- 3:31pets and that's going to be set to the
- 3:33get equipped pets function and we're
- 3:35going to of course pass through the
- 3:36player there then we're going to do is
- 3:37we're going to loop through the equipped
- 3:38pets table so the key is going to be the
- 3:40uuid and then the value is going to be
- 3:42the info table that we created so in
- 3:44pairs equipped pets do now what we need
- 3:47to do is we need to actually get the
- 3:48stat of the pet so we're going to say
- 3:50local pet stat equals and the way that
- 3:52we're going to find this is by using the
- 3:53pets config then what we can do is we
- 3:55can index the type of the pet that we
- 3:57currently have equipped and then we can
- 3:58index that with the rarity that we have
- 4:00equipped as well and this will return a
- 4:01number so all we have to do is we just
- 4:03have to index that by using the info
- 4:05table so we're going to say info dot id
- 4:07because that's going to be the type of
- 4:08the pet and then info.rarity as that's
- 4:10going to be the rarity of the pet and
- 4:11now the pet stat is equal to whatever
- 4:13the stat actually is so then we can do
- 4:15is we can add the pet stat to the stat
- 4:16variable that we created so we can say
- 4:18stat plus equals pet stat and then that
- 4:20loop will go through all the equipped
- 4:21pets and add each of the stats to this
- 4:23stat value right here and then what alls
- 4:25we have to do is return that stat number
- 4:27and now we've calculated all the pet
- 4:28stats the next thing we have to do is we
- 4:30just have to actually implement this
- 4:31into our different stats such as our
- 4:33through multiplier and our coin
- 4:34multiplier as well so we can see inside
- 4:36of the food multiplier we have the total
- 4:38and then we have rank and this is
- 4:39basically a multiplier for this stat
- 4:41already so what we're going to do is
- 4:42right below this we're going to say
- 4:43local pets equals and then calculate pet
- 4:45stats pass through the player and then
- 4:47we're going to get a number from that
- 4:48then all we have to do is we just have
- 4:50to add that number so pets to the total
- 4:52so then we have the rank multiplier and
- 4:54we're adding that to the total and now
- 4:55we have the pets multiplier and we're
- 4:56adding that to the total as well and
- 4:58then we also have the game pass
- 4:59multiplier as well so this entire
- 5:00function is just calculating the
- 5:01multiplier of the food stack then all we
- 5:03have to do is add this to the coin
- 5:04multiplier as well the exact same way
- 5:06that we did with rank so we're just
- 5:08going to say local pets equals calculate
- 5:10pet stats pass through the player and
- 5:12then we just have to add that to the
- 5:13total so we're gonna say total plus
- 5:15equals pets and there we go now we can
- 5:17go ahead and start this up and test this
- 5:18out so if we go inside of our game and
- 5:19unequip all of our pets just to see how
- 5:21much food we should get by default each
- 5:24time we click we get plus one food now
- 5:25when we equip a dog pet that has a 2.5
- 5:28multiplier when we click we get four
- 5:30food and if we equip another pet that
- 5:31has a 2.5 multiplier so that would be a
- 5:33five times multiplier when we click we
- 5:35now get six now you might be thinking
- 5:37shouldn't we get five each click but the
- 5:39reason that we're not getting five per
- 5:40click even though we have a five times
- 5:41multiplier is because of how we have the
- 5:43reward system set up so of course you
- 5:44can set up the rewards however you'd
- 5:46like to but this is teaching you how to
- 5:47have your pet stats set up so ladies
- 5:48gentlemen hopefully this video to help
- 5:50you guys out if it did make sure you
- 5:51smash the like button also the subscribe
- 5:52button and turn this notifications on if
- 5:54you want to get notified when i upload
- 5:55more roblox moment content additionally
- 5:57with patreon if you guys like this for
- 5:58me and gain access to all the scripts in
- 5:59the game file they made during this
- 6:00episode there's a link down below
- 6:01description and you guys can go and
- 6:02check that out with that being said i'll
- 6:03see you guys in the next episode
- 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.