A zombie tracker I made

I made a zombie tracker!
Thanks to ChatGPT for scripting this! And me for designing the UI.
Source Code

-- Get references
local player = game.Players.LocalPlayer
local zombie = workspace:WaitForChild("Zombie")  -- Your zombie's model
local zombieTrackerGui = player:WaitForChild("PlayerGui"):WaitForChild("ZombieTrackerGui")
local trackerLabel = zombieTrackerGui:WaitForChild("ZombieTrackerLabel")
local alertSound = trackerLabel:WaitForChild("AlertSound")  -- Sound inside the label

-- Function to update the label color and sound based on distance
local function updateZombieTracker()
	local playerChar = player.Character
	if not (playerChar and playerChar:FindFirstChild("HumanoidRootPart")) then return end

	local zombieHRP = zombie and zombie:FindFirstChild("HumanoidRootPart")
	if not zombieHRP then return end

	local playerPos = playerChar.HumanoidRootPart.Position
	local zombiePos = zombieHRP.Position
	local distance = (playerPos - zombiePos).Magnitude

	if distance < 10 then
		-- GRAVE Danger
		trackerLabel.Text = "GRAVE"
		trackerLabel.TextColor3 = Color3.fromRGB(150, 0, 0) -- Purple
		alertSound.PlaybackSpeed = 3
	elseif distance < 20 then
		-- DANGER
		trackerLabel.Text = "DANGER"
		trackerLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
		alertSound.PlaybackSpeed = 2
	elseif distance < 50 then
		-- MODERATE
		trackerLabel.Text = "MODERATE"
		trackerLabel.TextColor3 = Color3.fromRGB(255, 165, 0)
		alertSound.PlaybackSpeed = 1.5
	else
		-- SAFE
		trackerLabel.Text = "SAFE"
		trackerLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
		alertSound.PlaybackSpeed = 1
	end
end

-- Start playing sound (if it’s not already)
if not alertSound.IsPlaying then
	alertSound:Play()
end

-- Continuously update
game:GetService("RunService").Heartbeat:Connect(updateZombieTracker)

Setup Instructions

  1. Insert a LocalScript in StarterPlayerScripts
  2. Then copy paste the code from the Source Code into the LocalScript.
  3. Name the LocalScript. “ZombieTrackerScript” is preferrable.
  4. Insert ZombieTrackerGui into StarterGui
  5. Insert ZombieTrackerScript into StarterPlayerScript

Link to model: Zombie Tracker - Creator Store

10 Likes

What’s the point if chatgpt did 99% of the work though. Not even the instructions r urs :broken_heart::sob:.

2 Likes

This is just a goofy ChatGPT ahh script :sob: :sob:

9 Likes

Are you bullying me???

1 Like

Why are you sharing this if you didn’t make it? All these vibe coders bruh…

5 Likes

I dont see why people are getting so mad over this, its a resource that you put out for free (you did use chatgpt but as long as you learn from it its fine imo).

keep making things buddy and also the next time you upload something like this, upload it in the #resources:community-resources category.
have fun!

7 Likes

I made the UI to be correct. I partially contributed as well. Don’t think as everything I do as I don’t exist

Then why didn’t you include the UI if it’s the only thing you made yourself

1 Like

How am i bullying you bro??? :person_facepalming:

1 Like

he made it using ai, it cant make anything without instructions, and he made the ui which the ai obviously cant make.

be supportive, using ai isnt a crime - its actually great for beginners so they can learn from actually working (sometimes) code samples.

2 Likes

You’re telling me it actually takes effort to simply give a prompt to an AI so that it can do all the work for you? He did not make it using AI, the AI made it for him. Of course, i’m not saying using AI is a crime, i’m saying that you’re not gonna learn anything by just asking AI to do the job for you, so you can then publish it online for others to use.

3 Likes

Not true, ChatGPT does give instructions with how the scripts works, just saying😏

1 Like

it does take effort, yes, with simple scripts the ai is pretty much always accurate but you cant get complex scripts out of the ai unless you know coding yourself (and even then you might have to correct the code yourself.)

and you DO learn by asking the ai as it explains what it writes.
the problem is that you were unnecessarily mean (along with others), he published this for free, said that chatgpt helped and hes obviously a beginner, so you should be encouraging him not putting him down.

3 Likes

yall r just jealous you cant code like chatgpt (jk good resource, chill out)

1 Like

@02shot is the one making the ragebait here lol

1 Like

i really dont understand where this hate is coming from, people are so weird.

2 Likes

anyways, can you explain what it does other than show the code? it seems like a cool resource. actually inspired me to make a minimap for my game

Thank you for sharing your implementation of the zombie tracker system. This is a great example of combining UI design and real-time scripting to create an immersive gameplay feature. The logic you’ve implemented to vary the threat level based on proximity is intuitive and well-structured, and the use of both color changes and dynamic audio feedback (via PlaybackSpeed) provides a clear, multi-sensory indication of danger that players can quickly understand and react to.

Your use of RunService.Heartbeat ensures that the tracker updates consistently with the game loop, which is important for maintaining accuracy and responsiveness, especially in fast-paced gameplay scenarios. Additionally, your conditional checks to ensure both the player character and zombie references are valid are good defensive programming practices that help avoid runtime errors in edge cases, such as when characters haven’t fully loaded.

From a design perspective, labeling threat levels as “SAFE”, “MODERATE”, “DANGER”, and “GRAVE” is both thematic and user-friendly. The color palette you’ve chosen complements these labels well and enhances readability. I also appreciate the attention to detail with the alert sound system—modulating playback speed based on distance is a clever way to signal urgency without requiring visual attention, which can be critical during high-intensity moments.

For potential future improvements, you might consider:

  • Expanding the system to support tracking multiple hostile entities.
  • Integrating directional cues to indicate where the danger is coming from.
  • Using tweening for smooth color transitions to enhance visual polish.
  • Adding a configuration module to allow players or developers to easily adjust distance thresholds and feedback parameters.

Overall, this is a well-constructed system that demonstrates a solid understanding of Roblox’s scripting and GUI systems. Excellent work collaborating with ChatGPT on the logic, and your user interface design ties everything together nicely. Looking forward to seeing how this evolves or how others in the community build upon it!

2 Likes

“learn to script silly vibe coder” don’t call me names!

1 Like

ty thank you very much for doing that

1 Like