Stay Alive And Sword Fight | Help

Hello! I’m Tanvir, I wanted to ask if any scripters/programmers can help me with a time block script that gives you time
image

and a teleport gui that teleports you to spawn, so like if you have 500+ time the teleport gui will show up and you can teleport

Wait so, are you wanting to create something that manages everyone’s time who is still alive? Cause you also say time block script :thinking:

no like I want to know if anyone knows to make a script for a time block, like if you touch the block, you get time

image

They want a block that essentially gives them “points” when they touch it. Every second you are alive when you sword fight you get 1 time. These blocks will increase how much time you have been alive.

@ProjectTqnvirr, you need to look into .Touched() events and how to edit basic leaderstats. Something like this is a rough example:
(script inside the block!)

local timeAmount = math.random(50,100) -- picks a number from 50 to 100.
local touched = false

script.Parent.Touched:Connect(function(hit)
   if game.Players:GetPlayerFromCharacter(hit.Parent) then

      if not touched then
          touched = true
          local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
          local lstats = plr.leaderstats
          local Time = lstats.Time

          Time.Value = Time.Value + timeAmount
          script.Parent:Destroy()
      end

   end
end)
1 Like

Alright, Thank you so much, I’ll try it out and let you know!