Mr_3242

Bridge Battles! Script (semi functional)

May 10th, 2026
51
0
Never
3
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.93 KB | Gaming | 0 0
  1. ---------------------------------------------------------------------
  2. --// SERVICES
  3. ---------------------------------------------------------------------
  4. local Players = game:GetService("Players")
  5.  
  6. ---------------------------------------------------------------------
  7. --// PLAYER
  8. ---------------------------------------------------------------------
  9. local LocalPlayer = Players.LocalPlayer
  10.  
  11. ---------------------------------------------------------------------
  12. --// CLEAN RE-EXECUTE
  13. ---------------------------------------------------------------------
  14. if getgenv().GamemodeUnload then
  15.     pcall(getgenv().GamemodeUnload)
  16. end
  17.  
  18. ---------------------------------------------------------------------
  19. --// LOAD RAYFIELD
  20. ---------------------------------------------------------------------
  21. local Rayfield
  22.  
  23. repeat
  24.     local s,r = pcall(function()
  25.         return loadstring(game:HttpGet("https://sirius.menu/rayfield"))()
  26.     end)
  27.  
  28.     if s and r then
  29.         Rayfield = r
  30.     else
  31.         task.wait(1)
  32.     end
  33. until Rayfield
  34.  
  35. ---------------------------------------------------------------------
  36. --// FILTER NOTIFICATIONS
  37. ---------------------------------------------------------------------
  38. local oldNotify = Rayfield.Notify
  39.  
  40. Rayfield.Notify = function(self,data)
  41.  
  42.     if data and data.Title then
  43.         local t = tostring(data.Title)
  44.  
  45.         if t:find("Rayfield") or t:find("Interface") then
  46.             return
  47.         end
  48.     end
  49.  
  50.     return oldNotify(self,data)
  51. end
  52.  
  53. ---------------------------------------------------------------------
  54. --// CUSTOM NOTIFICATIONS
  55. ---------------------------------------------------------------------
  56. local function Notify(title,content)
  57.  
  58.     Rayfield:Notify({
  59.         Title = title,
  60.         Content = content,
  61.         Duration = 3,
  62.         Image = 4483362458
  63.     })
  64.  
  65. end
  66.  
  67. ---------------------------------------------------------------------
  68. --// WINDOW
  69. ---------------------------------------------------------------------
  70. local Window = Rayfield:CreateWindow({
  71.     Name = "Bridge Battles!",
  72.     LoadingTitle = "Semi functional",
  73.     LoadingSubtitle = "Follow me in TikTok Mr_3242",
  74.     ConfigurationSaving = {
  75.         Enabled = false
  76.     }
  77. })
  78.  
  79. ---------------------------------------------------------------------
  80. --// TABS
  81. ---------------------------------------------------------------------
  82. local Tabs = {}
  83.  
  84. Tabs.CurrentGamemode = Window:CreateTab("Current Gamemode",4483362458)
  85. Tabs.Classic = Window:CreateTab("Classic Gamemode",4483362458)
  86. Tabs.Race = Window:CreateTab("Race Gamemode",4483362458)
  87. Tabs.Showdown = Window:CreateTab("Showdown Gamemode",4483362458)
  88. Tabs.Chaos = Window:CreateTab("Chaos Gamemode",4483362458)
  89. Tabs.Credits = Window:CreateTab("Credits",4483362458)
  90. Tabs.Unload = Window:CreateTab("Unload",4483362458)
  91.  
  92. ---------------------------------------------------------------------
  93. --// STATES
  94. ---------------------------------------------------------------------
  95. local states = {}
  96.  
  97. local savedCFrame = nil
  98. local atGiver = false
  99.  
  100. ---------------------------------------------------------------------
  101. --// GAMEMODES
  102. ---------------------------------------------------------------------
  103. local Gamemodes = {
  104.     Classic = {"Blue","Green","Red","Yellow"},
  105.     Race = {"Blue","Red"},
  106.     Showdown = {"Blue","Red"},
  107.     Chaos = {"Black","Blue","Green","Orange","Pink","Purple","Red","Yellow"}
  108. }
  109.  
  110. ---------------------------------------------------------------------
  111. --// CURRENT GAMEMODE
  112. ---------------------------------------------------------------------
  113. local gmParagraph = Tabs.CurrentGamemode:CreateParagraph({
  114.     Title = "Current Gamemode",
  115.     Content = "Detecting..."
  116. })
  117.  
  118. local function getGamemode()
  119.  
  120.     for mode in pairs(Gamemodes) do
  121.  
  122.         if workspace:FindFirstChild(mode) then
  123.             return mode
  124.         end
  125.  
  126.     end
  127.  
  128.     return "None"
  129. end
  130.  
  131. task.spawn(function()
  132.  
  133.     while task.wait(0.5) do
  134.  
  135.         local mode = getGamemode()
  136.  
  137.         gmParagraph:Set({
  138.             Title = "Current Gamemode",
  139.             Content = "The current gamemode is " .. mode .. " Gamemode"
  140.         })
  141.  
  142.     end
  143.  
  144. end)
  145.  
  146. ---------------------------------------------------------------------
  147. --// HELPERS
  148. ---------------------------------------------------------------------
  149. local function getHRP()
  150.  
  151.     local char = LocalPlayer.Character
  152.     if not char then return end
  153.  
  154.     return char:FindFirstChild("HumanoidRootPart")
  155. end
  156.  
  157. local function getGiver(mode,team)
  158.  
  159.     local gm = workspace:FindFirstChild(mode)
  160.     if not gm then return end
  161.  
  162.     local teamFolder = gm:FindFirstChild(team)
  163.     if not teamFolder then return end
  164.  
  165.     local blockMain = teamFolder:FindFirstChild("BlockMain")
  166.     if not blockMain then return end
  167.  
  168.     return blockMain:FindFirstChild("Giver")
  169. end
  170.  
  171. ---------------------------------------------------------------------
  172. --// TELEPORT SYSTEM
  173. ---------------------------------------------------------------------
  174. task.spawn(function()
  175.  
  176.     while task.wait(0.1) do
  177.  
  178.         local brick = LocalPlayer:FindFirstChild("BrickCount")
  179.         local hrp = getHRP()
  180.  
  181.         if not brick or not hrp then
  182.             continue
  183.         end
  184.  
  185.         local currentMode = getGamemode()
  186.  
  187.         -------------------------------------------------------------
  188.         -- TELEPORT TO GIVER
  189.         -------------------------------------------------------------
  190.         if brick.Value == 0 and not atGiver then
  191.  
  192.             for key,v in pairs(states) do
  193.  
  194.                 if v then
  195.  
  196.                     local team = key:gsub(currentMode,"")
  197.                     local giver = getGiver(currentMode,team)
  198.  
  199.                     if giver then
  200.  
  201.                         savedCFrame = hrp.CFrame
  202.  
  203.                         hrp.CFrame = giver.CFrame + Vector3.new(0,5,0)
  204.  
  205.                         atGiver = true
  206.  
  207.                         break
  208.                     end
  209.                 end
  210.             end
  211.         end
  212.  
  213.         -------------------------------------------------------------
  214.         -- TELEPORT BACK
  215.         -------------------------------------------------------------
  216.         if brick.Value > 0 and atGiver then
  217.  
  218.             if savedCFrame then
  219.                 hrp.CFrame = savedCFrame
  220.             end
  221.  
  222.             atGiver = false
  223.         end
  224.  
  225.     end
  226.  
  227. end)
  228.  
  229. ---------------------------------------------------------------------
  230. --// TOGGLE BUILDER
  231. ---------------------------------------------------------------------
  232. local function createTeam(tab,mode,team)
  233.  
  234.     tab:CreateParagraph({
  235.         Title = "========= "..string.upper(team).." TEAM =========",
  236.         Content = mode.." "..team.." blocks giver"
  237.     })
  238.  
  239.     tab:CreateToggle({
  240.         Name = team,
  241.         CurrentValue = false,
  242.  
  243.         Callback = function(v)
  244.             states[mode..team] = v
  245.         end
  246.     })
  247.  
  248. end
  249.  
  250. ---------------------------------------------------------------------
  251. --// BUILD GAMEMODE TABS
  252. ---------------------------------------------------------------------
  253. for mode,teams in pairs(Gamemodes) do
  254.  
  255.     for _,team in ipairs(teams) do
  256.         createTeam(Tabs[mode],mode,team)
  257.     end
  258.  
  259. end
  260.  
  261. ---------------------------------------------------------------------
  262. --// CREDITS
  263. ---------------------------------------------------------------------
  264. Tabs.Credits:CreateParagraph({
  265.     Title="Credits",
  266.     Content="Script created by Mr_3242\nThanks for using the script!"
  267. })
  268.  
  269. Tabs.Credits:CreateButton({
  270.     Name="Copy TikTok Link",
  271.     Callback=function()
  272.         setclipboard("https://www.tiktok.com/@Mr_3242")
  273.         Notify("Copied","TikTok link copied")
  274.     end
  275. })
  276.  
  277. Tabs.Credits:CreateButton({
  278.     Name="Copy YouTube Link",
  279.     Callback=function()
  280.         setclipboard("https://www.youtube.com/@Mr_3242.")
  281.         Notify("Copied","YouTube link copied")
  282.     end
  283. })
  284.  
  285. Tabs.Credits:CreateButton({
  286.     Name="Copy Twitch Link",
  287.     Callback=function()
  288.         setclipboard("https://m.twitch.tv/pantherarmy_42/home")
  289.         Notify("Copied","Twitch link copied")
  290.     end
  291. })
  292.  
  293. ---------------------------------------------------------------------
  294. --// UNLOAD
  295. ---------------------------------------------------------------------
  296. Tabs.Unload:CreateButton({
  297.     Name = "Unload Script",
  298.  
  299.     Callback = function()
  300.  
  301.         for k in pairs(states) do
  302.             states[k] = false
  303.         end
  304.  
  305.         atGiver = false
  306.         savedCFrame = nil
  307.  
  308.         task.wait(0.1)
  309.  
  310.         pcall(function()
  311.             Rayfield:Destroy()
  312.         end)
  313.  
  314.         getgenv().GamemodeUnload = nil
  315.     end
  316. })
  317.  
  318. ---------------------------------------------------------------------
  319. --// GLOBAL UNLOAD
  320. ---------------------------------------------------------------------
  321. getgenv().GamemodeUnload = function()
  322.  
  323.     for k in pairs(states) do
  324.         states[k] = false
  325.     end
  326.  
  327.     atGiver = false
  328.     savedCFrame = nil
  329.  
  330.     pcall(function()
  331.         Rayfield:Destroy()
  332.     end)
  333.  
  334.     getgenv().GamemodeUnload = nil
  335. end
Tags: delta
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment