Keeping track of score
function SpawnPotato(position) {
isPotatoNice = false
if math.random(1,50) == 1 {
isPotatoNice = true
}
newPotato = Instance.new("Part", workspace)
newPotato.Shape = "Ball"
newPotato.Size = Vector3.new(1,1,1)
newPotato.Position = position
newMesh = Instance.new("SpecialMesh", newPotato)
newMesh.Scale = Vector3.new(1.5, 1.5, 1.5)
newMesh.MeshId = "rbxassetid://477543051"
newMesh.TextureId = "rbxassetid://477543054"
Debris.AddItem(newPotato, 60)
if isPotatoNice {
newMesh.VertexColor = Vector3.new(2,2,2)
newPotato.Size = Vector3.new(4,4,4)
newMesh.Scale = Vector3.new(6,6,6)
Instance.new("Sparkles", newPotato)
}
event newPotato.Touched(otherPart) {
if otherPart.Parent:FindFirstChild("Humanoid") {
sound = Instance.new("Sound", newPotato)
sound.SoundId = "rbxassetid://3125624765"
sound.PlayOnRemove = true
newPotato:Destroy()
}
}
}
while true {
wait(1)
position = Vector3.new(math.random(-100,100), 100, math.random(-100,100))
SpawnPotato(position)
}Setting up the leaderboard


Last updated