1. BrickPlanet Forum
  2. Game & Scripting Discussion
  3. [ Free Script ] Brick Pack
[ Free Script ] Brick Pack
Orbit
Level 4
Joined Nov 12th 2022
Posts 5
Posted Apr 28th 2024 at 4:55AM

The Brick Pack is an extremely delayed New Years gift expanding on: https://www.brickplanet.com/forum/thread/8061/free-script-speed-and-kill-brick

Now introducing. . . The Moving Brick and the LeaderBrick! https://www.brickplanet.com/shop/18953/brick-pack

More Bricks coming soon:tm: (or probably next year if I forget)

Orbit
Level 4
Joined Nov 12th 2022
Posts 5
Posted May 3rd 2024 at 3:18AM

For whatever reason I can't upload the whole model and it comes out as one singular script, and I can't update the pack either.

Moving Brick:

interval = 0.1 -- Speed brick moves
xyz = "X" -- Direction Brick moves
startpos = 7.96 -- Starting position for Brick. As I've chosen X, copy and paste the X value.

maxX = 3
minX = 0
maxY = 3
minY = 0
maxZ = 3
minZ = 0

-- Lines 0 - 0 moves part 0.1 studs in the direction of X while keeping Y and Z values the same.
movedpart = script.Parent
while true do
    -- x value
    if xyz == "X" then
        repeat
            movedpart.Position =
                Vector3.new( -- Location of part
                movedpart.Position.X + interval,
                movedpart.Position.Y + interval,
                movedpart.Position.Z + interval
            )
            wait(0)
        until movedpart.Position.X >= startpos + maxX
    end
    if xyz == "X" then
        repeat
            movedpart.Position =
                Vector3.new( -- Location of part
                movedpart.Position.X - interval,
                movedpart.Position.Y - interval,
                movedpart.Position.Z - interval
            )
            wait(0)
        until movedpart.Position.X <= startpos - minX
    end

    --
    -- y value
    if xyz == "Y" then
        repeat
            movedpart.Position =
                Vector3.new( -- Location of part
                movedpart.Position.X + interval,
                movedpart.Position.Y + interval,
                movedpart.Position.Z + interval
            )
            wait(0)
        until movedpart.Position.Y >= startpos + maxY
    end
    if xyz == "Y" then
        repeat
            movedpart.Position =
                Vector3.new( -- Location of part
                movedpart.Position.X + interval,
                movedpart.Position.Y + interval,
                movedpart.Position.Z + interval
            )
            wait(0)
        until movedpart.Position.Y <= startpos - maxY
    end

    --
    -- Z value
    if xyz == "Z" then
        repeat
            movedpart.Position =
                Vector3.new( -- Location of part
                movedpart.Position.X + interval,
                movedpart.Position.Y + interval,
                movedpart.Position.Z + interval
            )
            wait(0)
        until movedpart.Position.Z >= startpos + maxZ
    end
    if xyz == "Z" then
        repeat
            movedpart.Position =
                Vector3.new( -- Location of part
                movedpart.Position.X + interval,
                movedpart.Position.Y + interval,
                movedpart.Position.Z + interval
            )
            wait(0)
        until movedpart.Position.Z <= startpos - maxZ
    end
    wait(0)
end

Damage Over Time Brick:

script.Parent.Touched:connect(function(hit) --Sees if touched by another part. if hit:isa("player")then --Checks if its a player hit:TakeDamage(100) -- Change 100 with whatever value you desire. The lower it is, the less damage the player will take. end end)


Not Technically A Brick, LeaderBrick:

-- Lines 2 - 3 Creates the team and its columns
Leaderboard.CreateTeam("Runner", PartColor.new(128, 0, 128)) -- Creates team Runner. Colour uses RGB values.
Leaderboard.CreateColumn("Stage", 0) -- Creates leaderboard column. Stage is the Column name, and 0 is the default value.

-- Lines 5-8 Add player to set team on Join
Players.PlayerJoined:Connect(
    function(plr) -- On player join
        Leaderboard.SetPlayerTeam(plr, "Runner") -- Adds player to Runner Team

        -- Lines 10 - 13 print the players set team
        for i,v in pairs(Players.GetPlayers()) do -- List of all players in-game.
            print(Leaderboard.GetPlayerTeam(plr)) -- Finds players team using GetPlayerTeam
        end
    end
)

Fixed UniversalBrick:

hit.JumpPower = 3 -- If you want to change this into health do: Health = [ Insert Number Here ] // hit.WalkSpeed = [ Insert Number Here] for Speed. -- hit.WalkSpeed = 3 -- hit.Health = 0 end)
Orbit
Level 4
Joined Nov 12th 2022
Posts 5
Posted May 3rd 2024 at 4:22AM

Search Forum

Thread Info

Replies
2
Views
29
Created Apr 28th 2024
Last Reply May 3rd 2024