Advertisement
Null_Cat

Minesweeper (Server) v1 (Roblox)

Jan 26th, 2019
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 20.33 KB | None | 0 0
  1. if script.ClassName == "LocalScript" then error("Run with r/, not rl/.") return end
  2. if workspace:FindFirstChild("NullMinesweeperServer") then error("The script is already being ran. Use the client sided script\nIf you believe this is an error, run the following:\n\"c/workspace.NullMinesweeperServer:Destroy()\"") return end
  3.  
  4. script.Name = "NullMinesweeperServer"
  5. --Creates the Remote for Client to Server communication
  6. local mineRemote = Instance.new("RemoteEvent")
  7. mineRemote.Parent = game:GetService"ReplicatedStorage"
  8. mineRemote.Name = "MineRemote"
  9.  
  10. --Creates a function that makes every part Smooth instead of studded
  11. function noOutlines(partNoOutlines)
  12.   if partNoOutlines.ClassName == "Part" or partNoOutlines.ClassName == "WedgePart" then
  13.     partNoOutlines.TopSurface = "SmoothNoOutlines"
  14.     partNoOutlines.BottomSurface = "SmoothNoOutlines"
  15.     partNoOutlines.LeftSurface = "SmoothNoOutlines"
  16.     partNoOutlines.RightSurface = "SmoothNoOutlines"
  17.     partNoOutlines.FrontSurface = "SmoothNoOutlines"
  18.     partNoOutlines.BackSurface = "SmoothNoOutlines"
  19.   else
  20.     error('what')
  21.   end
  22. end
  23.  
  24. --Creates the ID system for placing the boards
  25. local boardID = {}
  26.  
  27. for i = 1, game:GetService"Players".MaxPlayers do --[[Generates the boardID table to be of the MaxPlayers allowed in the game.
  28.   Allows for easy customization of the Players, as well as not having unneccessary 32s and 54s]]
  29.     boardID[i] = i
  30. end
  31.  
  32. --Time for the big boy function
  33. function generateBoard(width, height, lmineCount, x, y, z, plr)
  34.     --Creates two variables that will keep count of the mines
  35.     local minesRemaining = lmineCount
  36.     local mineCount = lmineCount
  37.     local spacesRemaining = (width * height) - lmineCount
  38.     local allowTouch = false -- It's a surprise tool that will help us later. (makes it so you can't uncover the spaces if lost)
  39.  
  40.      --Creates the Model for the spaces
  41.     local minesweepTempStorage = Instance.new("Folder")
  42.    
  43.     local modelSpace = Instance.new("Model")
  44.     modelSpace.Parent = minesweepTempStorage
  45.     modelSpace.Name = "Space"
  46.    
  47.     local spaceCenter = Instance.new("Part")
  48.     spaceCenter.Name = "Center"
  49.     spaceCenter.Anchored = true
  50.     spaceCenter.Parent = modelSpace
  51.     noOutlines(spaceCenter)
  52.     spaceCenter.Color = Color3.fromRGB(163,162,165)
  53.     spaceCenter.Size = Vector3.new(4,0.5,4)
  54.     spaceCenter.CFrame = CFrame.new(-16.5,0.25,-23.5)
  55.     modelSpace.PrimaryPart = spaceCenter
  56.    
  57.     local spaceOutline = Instance.new("Part")
  58.     spaceOutline.Name = "Outline"
  59.     spaceOutline.Parent = modelSpace
  60.     noOutlines(spaceOutline)
  61.     spaceOutline.Color = Color3.fromRGB(99,95,98)
  62.     spaceOutline.Size = Vector3.new(5,0.5,5)
  63.     spaceOutline.CFrame = CFrame.new(-16.5,0.226,-23.5)
  64.     spaceOutline.Anchored = true
  65.    
  66.     local spaceCheck = Instance.new("NumberValue")
  67.     spaceCheck.Name = "Check"
  68.     spaceCheck.Value = 0
  69.     spaceCheck.Parent = modelSpace
  70.  
  71.     local spaceFlag = Instance.new("BoolValue")
  72.     spaceFlag.Parent = modelSpace
  73.     spaceFlag.Value = false
  74.     spaceFlag.Name = "IsFlagged"
  75.  
  76.     local spaceClick = Instance.new("ClickDetector")
  77.     spaceClick.Parent = spaceCenter
  78.     spaceClick.Name = "ToFlag"
  79.  
  80.     --This will help with RNG
  81.     math.randomseed(tick())
  82.   --Generating the Array. First step towards the board generation
  83.     local board = {}
  84.     for i = 1, height do
  85.         local newRow = {} -- This is an array for each new row
  86.         for j = 1, width do
  87.             if mineCount > 0 then -- If there is still meant to be mines
  88.                 if math.random(1,10) == 1 then -- use RNG to see if one should be placed
  89.                     table.insert(newRow,j,10)
  90.                     mineCount = mineCount - 1
  91.                 else -- If RNG fails, don't place a mine.
  92.                     table.insert(newRow,j,0)
  93.                 end
  94.             else -- If there shouldn't be anymore mines, just place an empty space
  95.                 table.insert(newRow,j,0)
  96.             end
  97.         end
  98.         table.insert(board,i,newRow) -- Insert the generated mode into the board. Repeat this "height" times
  99.     end
  100.   --If there still needs to be mines, it'll create them here.
  101.     while mineCount ~= 0 do
  102.         for n,i in ipairs(board) do
  103.             for m,j in ipairs(board[n]) do
  104.                 if board[n][m] ~= 10 then -- Check if the space is not a mine already
  105.                     if math.random(1,15) == 1 then -- If not, go through with RNG. Tougher this time.
  106.                         board[n][m] = 10 -- Replaces board[n][m] with a mine.
  107.                         mineCount = mineCount - 1
  108.                     end
  109.                 end
  110.                 if mineCount == 0 then
  111.                     break
  112.                 end
  113.             end
  114.             if mineCount == 0 then -- Double break because one break only stops part of it
  115.                 break
  116.             end
  117.         end    
  118.     end
  119.     -- Check for Mines and put numbers next to them
  120.     for n,i in ipairs(board) do
  121.         for m,j in ipairs(board[n]) do
  122.             if board[n][m] == 10 then -- If there is a mine, execute all of the following. Each direction shows where it goes towards below.
  123.                 --Left
  124.                 if m-1 ~= 0 then
  125.                     if board[n][m-1] ~= 10 then
  126.                         board[n][m-1] = board[n][m-1] + 1
  127.                     end
  128.                 end
  129.                 --Right
  130.                 if m+1 <= width then
  131.                     if board[n][m+1] ~= 10 then
  132.                         board[n][m+1] = board[n][m+1] + 1
  133.                     end
  134.                 end
  135.                 --Up
  136.                 if n-1 ~= 0 then
  137.                     if board[n-1][m] ~= 10 then
  138.                         board[n-1][m] = board[n-1][m] + 1
  139.                     end
  140.                 end
  141.                 --Down
  142.                 if n+1 <= height then
  143.                     if board[n+1][m] ~= 10 then
  144.                         board[n+1][m] = board[n+1][m] + 1
  145.                     end
  146.                 end
  147.                
  148.                 --Up Left
  149.                 if n-1 ~= 0 and m-1 ~= 0 then
  150.                     if board[n-1][m-1] ~= 10 then
  151.                         board[n-1][m-1] = board[n-1][m-1] + 1
  152.                     end
  153.                 end
  154.                 --Up Right
  155.                 if n-1 ~= 0 and m+1 <= width then
  156.                     if board[n-1][m+1] ~= 10 then
  157.                         board[n-1][m+1] = board[n-1][m+1] + 1
  158.                     end
  159.                 end
  160.                 --Down Left
  161.                 if n+1 <= height and m-1 ~= 0 then
  162.                     if board[n+1][m-1] ~= 10 then
  163.                         board[n+1][m-1] = board[n+1][m-1] + 1
  164.                     end
  165.                 end
  166.                 --Down Right
  167.                 if n+1 <= height and m+1 <= width then
  168.                     if board[n+1][m+1] ~= 10 then
  169.                         board[n+1][m+1] = board[n+1][m+1] + 1
  170.                     end
  171.                 end
  172.             end
  173.         end
  174.     end
  175.    
  176.     -- Now create the actual board
  177.     local physicalBoard = Instance.new("Model") -- Creates a model to hold the board
  178.     physicalBoard.Name = "Board"
  179.     physicalBoard.Parent = workspace
  180.     for n,i in ipairs(board) do
  181.         for m,j in ipairs(board[n]) do
  182.             local newSpace = minesweepTempStorage.Space:Clone() -- Clone the space.
  183.             local numCheck = newSpace.Check -- Get the number container for where it's meant to be.
  184.             newSpace.Parent = physicalBoard -- The Clone is put into the Board Model (in the workspace)
  185.             newSpace:SetPrimaryPartCFrame(CFrame.new(x+(n*5),y,z+(m*5))) --Place it 5 away from the other spaces
  186.             numCheck.Value = board[n][m] --Assign the number container with the corrisponding value
  187.      
  188.      
  189.             newSpace.Center.ToFlag.MouseClick:Connect(function(playerClick) -- To Flag Stuff
  190.                 if playerClick == plr then -- Makes it so other people can mess stuff up
  191.                     if newSpace.IsFlagged.Value then -- If it is flagged, unflag it.
  192.                         newSpace.IsFlagged.Value = false
  193.                         newSpace.Center.Color = Color3.fromRGB(163,162,165)
  194.             if numCheck.Value == 10 then -- This will check if you flagged the right space, and will adjust the mines remaining after.
  195.                 minesRemaining = minesRemaining + 1
  196.             end
  197.                     else -- If it isn't flagged, flag it.
  198.                         newSpace.IsFlagged.Value = true
  199.                         newSpace.Center.Color = Color3.new(1,0,0)
  200.             if numCheck.Value == 10 then -- If it was a mine, reduce the mines remaining.
  201.                 minesRemaining = minesRemaining - 1
  202.             end
  203.                     end
  204.                 end
  205.             end)
  206.             newSpace.Center.Touched:Connect(function(part) -- If they touched a space, clear it.
  207.                 if ((part.Parent.ClassName == "Model" and part.Parent.Name == plr.Character.Name) or (part.Name == "0Detect"..plr.Character.Name)) and allowTouch then -- If you are a model, are named the player playing, AND are allowed to touch stuff (disabled when lost), it will allow.
  208.                     if not newSpace.IsFlagged.Value then -- Checks if the space isn't flagged
  209.                         newSpace.Center:Destroy() -- Destroys the center. Prevents the Touched part to run indefinetly
  210. spacesRemaining = spacesRemaining - 1
  211.                         if numCheck.Value == 0 then -- If its 0, make it semi-transparent
  212.                             newSpace.Outline.Transparency = 0.75
  213.               --Place a block that will clear everything around it.
  214.                 local clearBlock = Instance.new("Part")
  215.                 clearBlock.Parent = physicalBoard
  216.                 clearBlock.Size = Vector3.new(10,10,10)
  217.                 clearBlock.CFrame = newSpace.Outline.CFrame --Set the CFrame to be where the space that was touched was.
  218.                 clearBlock.Transparency = 1
  219.                 clearBlock.Name = "0Detect"..plr.Character.Name --Name it like the Player so it doesn't activate anything else on accident, or anything else doesn't activate it.
  220.                 clearBlock.CanCollide = false
  221.                 wait()
  222.                 clearBlock:Destroy()
  223.                         --Colors each one
  224.                             --1 : RGB(0,0,255)
  225.                             --2 : RGB(0,255,0)
  226.                             --3 : RGB(255,0,0)
  227.                             --4 : RGB(107,50,124)
  228.                             --5 : RGB(117,0,0)
  229.                             --6 : RGB(64,224,208)
  230.                             --7 : RGB(0,0,0)
  231.                             --8 : RGB(99,95,98)
  232.                             --10 : RGB(255,255,255)
  233.                         elseif numCheck.Value == 1 then
  234.                             newSpace.Outline.Color = Color3.fromRGB(0,0,255)
  235.                             --newSpace.Outline.SurfaceGui.Number.Text = "1"
  236.                         elseif numCheck.Value == 2 then
  237.                             newSpace.Outline.Color = Color3.fromRGB(0,255,0)
  238.                             --newSpace.Outline.SurfaceGui.Number.Text = "2"
  239.                         elseif numCheck.Value == 3 then
  240.                             newSpace.Outline.Color = Color3.fromRGB(255,0,0)
  241.                             --newSpace.Outline.SurfaceGui.Number.Text = "3"
  242.                         elseif numCheck.Value == 4 then
  243.                             newSpace.Outline.Color = Color3.fromRGB(107,50,124)
  244.                             --newSpace.Outline.SurfaceGui.Number.Text = "4"
  245.                         elseif numCheck.Value == 5 then
  246.                             newSpace.Outline.Color = Color3.fromRGB(117,0,0)
  247.                             --newSpace.Outline.SurfaceGui.Number.Text = "5"
  248.                         elseif numCheck.Value == 6 then
  249.                             newSpace.Outline.Color = Color3.fromRGB(64,224,208)
  250.                             --newSpace.Outline.SurfaceGui.Number.Text = "6"
  251.                         elseif numCheck.Value == 7 then
  252.                             newSpace.Outline.Color = Color3.fromRGB(0,0,0)
  253.                             --newSpace.Outline.SurfaceGui.Number.Text = "7"
  254.                         elseif numCheck.Value == 8 then
  255.                             newSpace.Outline.Color = Color3.fromRGB(99,95,98)
  256.                             --newSpace.Outline.SurfaceGui.Number.Text = "8"
  257.                         elseif numCheck.Value == 10 then -- Oh hecc, you stepped on a mine!
  258.               spacesRemaining = spacesRemaining + 1 -- Make sure it doesn't trigger the Win sequence
  259.                             newSpace.Outline.Color = Color3.fromRGB(255,255,255)
  260.                             allowTouch = false -- The player can no longer interact with the board.
  261.                             mineRemote:FireClient(plr,"Recieving",nil) -- Grab the ID from the player.
  262.               for _,i in ipairs(physicalBoard:GetChildren()) do -- Highlight all the mines in green
  263.                   if i.ClassName == "Model" then
  264.                       if i.Check.Value == 10 then
  265.                          if i ~= newSpace then -- This checks if it ISN'T the current space, as it will break everything because the Center doesn't exist.
  266.                           i.Center.Color = Color3.new(0,1,0)
  267.                           --i.Center.ToFlag:Destroy()
  268.                          end
  269.                       end
  270.                   end
  271.                end
  272.                             wait(5) -- Wait a little for the player to see the mines
  273.                             physicalBoard:Destroy()
  274.                         end
  275.             if spacesRemaining == 0 then
  276.               for _,i in ipairs(physicalBoard:GetChildren()) do -- Mark all of the mines with green.
  277.                   if i.ClassName == "Model" then
  278.                       if i.Check.Value == 10 then
  279.                           i.Center.Color = Color3.new(0,1,0)
  280.                           i.Center.ToFlag:Destroy()
  281.                       end
  282.                   end
  283.                end
  284.               wait(10) -- Wait 10 for the person who won to see their work.
  285.                             mineRemote:FireClient(plr,"Recieving",nil) -- Grab the ID they were given back.
  286.                             wait(1)
  287.                             physicalBoard:Destroy() -- Destroy the board
  288.                         end
  289.                     end
  290.                 end
  291.             end)
  292.         end
  293.     end
  294.    
  295.     --Create Overhead stuff to start
  296.     local platformBegin = Instance.new("Part") --Creates a platform the player can stand on to move raround to find a starting spot.
  297.     platformBegin.Parent = physicalBoard
  298.     platformBegin.Size = Vector3.new(height*5,0.5,width*5)
  299.     platformBegin.Position = Vector3.new(x+(2.5*height),y+10,z+(2.5*width))
  300.     platformBegin.Anchored = true
  301.     platformBegin.Transparency = 1
  302.    
  303.     wait(0.5)
  304.     plr.Character.HumanoidRootPart.CFrame = CFrame.new(x+(2.5*height),y+13,z+(2.5*width)) -- Teleports the player
  305.     wait(0.25)
  306.    
  307.     local touchToBegin = Instance.new("Part") -- Creates the Overhead part that is used to start the game.
  308.     touchToBegin.Parent = physicalBoard
  309.     touchToBegin.Size = Vector3.new(height*5,0.5,width*5)
  310.     touchToBegin.Position = Vector3.new(x+(2.5*height),y+18,z+(2.5*width))
  311.     touchToBegin.Anchored = true
  312.     touchToBegin.Transparency = 1
  313.    
  314.     touchToBegin.Touched:Connect(function(part) -- If the player jumped, start the game.
  315.         if part.Parent.ClassName == "Model" and part.Parent.Name == plr.Character.Name then
  316.             touchToBegin:Destroy()
  317.             platformBegin:Destroy()
  318.         end
  319.     end)
  320.     minesweepTempStorage:Destroy() -- Destroys the inital part that was cloned to create the board
  321.     allowTouch = true
  322.  
  323.     plr.Character:FindFirstChildOfClass("Humanoid").Died:Connect(function() -- Failsafe in case the player dies
  324.         physicalBoard:Destroy() -- Destroy the board
  325.     end)
  326.     plr.Chatted:Connect(function(msg)
  327.         if msg:sub(1,4):lower() == "/m r" then
  328.             physicalBoard:Destroy()
  329.         elseif msg:sub(1,4):lower() == "/m t" then
  330.         allowTouch = false
  331.         plr.Character.HumanoidRootPart.CFrame = CFrame.new(x+(2.5*height),y+13,z+(2.5*width)) -- Teleports the player
  332.         wait(5)
  333.         allowTouch = true
  334.     end
  335.     end)
  336. end
  337.  
  338. mineRemote.OnServerEvent:Connect(function(plrRec, action, w, h, m, plrID) -- OH BOY SERVER TO CLIENT COMMUNICATION
  339.     if action == "Board" then -- If the client wants to create the board
  340.        
  341.         generateBoard(w,h,m, --[[plrID*(w*5+5)]]0,plrID*20-19,h, plrRec) --Create the board
  342.     elseif action == "ID" then -- The client wants to give an ID
  343.        
  344.         boardID[plrID] = plrID --Takes the player ID and puts it back to be used
  345.     elseif action == "Grab" then -- If the Client requests an ID
  346.        
  347.         for n,i in ipairs(boardID) do --Checks every spot in the board
  348.             if boardID[n] ~= 0 then -- If the ID is available
  349.                 mineRemote:FireClient(plrRec,"Sending",boardID[i]) -- Send the ID to the player
  350.                
  351.                 boardID[n] = 0 -- Set that ID to be nothing so it isn't used again
  352.                 break -- break the loop
  353.             end
  354.         end
  355.     end
  356. end)
  357.  
  358. -- OH BOI LOCALSCRIPT TIME
  359. local localscript = NLS([=[--alright minesweeper time
  360. --kill me
  361. --[[ This is grabbing the play and waiting for controls and stuff.
  362. mostly just mobile stuff but whatever]]--
  363.  
  364. local plr = game:GetService"Players".LocalPlayer -- Grabs player
  365. local chr = plr.Character -- Grabs the player's Model
  366. if workspace:FindFirstChild(plr.Name.."MinesweeperClient") then error("The local is already being ran. If you believe this is an error, run the following:\n\"c/owner.Character:FindFirstChild(plr.Name..\"MinesweeperClient\"):Destroy()\"") return end
  367. local storage = game:GetService"ReplicatedStorage" -- Grab the ReplicatedStorage which contains the RemoteEvent
  368. local remote = storage.MineRemote -- Grab the RemoteEVent
  369. script.Name = plr.Name.."MinesweeperClient"
  370.  
  371. local idForPlr = 0 -- This will be grabbed later. It will help in placing the boards
  372. local ignoreMessages = false
  373. local widthChatRequest, heightChatRequest, mineChatRequest = 2, 2, 1 -- This will come in the "Chatted" Event
  374. local beginner, intermediate, expert = { -- The width, height, and mine count for each difficulty
  375.     ["width"] = 8,
  376.     ["height"] = 8,
  377.     ["mines"] = 10
  378. },{
  379.     ["width"] = 16,
  380.     ["height"] = 16,
  381.     ["mines"] = 40
  382. },{
  383.     ["width"] = 16,
  384.     ["height"] = 30,
  385.     ["mines"] = 99
  386. }
  387.  
  388. function roundNum(num)
  389.   local baseNum, newNum
  390.   if num > 0 then
  391.     baseNum = math.floor(num)
  392.     newNum = num - baseNum
  393.     if newNum >= 0.5 then
  394.       return math.ceil(num)
  395.     elseif newNum < 0.5 then
  396.       return math.floor(num)
  397.     end
  398.   else
  399.     baseNum = math.ceil(num)
  400.     newNum = num - baseNum
  401.     if newNum > -0.5 then
  402.       return math.ceil(num)
  403.     elseif newNum <= -0.5 then
  404.       return math.floor(num)
  405.     end
  406.   end
  407. end
  408.  
  409. function returnID()
  410.     remote:FireServer("ID",0,0,0,idForPlr) -- Send the ID
  411.     idForPlr = 0
  412. end
  413.  
  414. plr.Chatted:Connect(function(msg)
  415.     if msg:sub(1,3):lower() == "/m " then
  416.         local cmd = msg:sub(4)
  417.         if not ignoreMessages then
  418.             ignoreMessages = true
  419.             if cmd:sub(1,1) == "b" then
  420.                 widthChatRequest, heightChatRequest, mineChatRequest = beginner.width, beginner.height, beginner.mines -- Sets beginner difficulty
  421.                 remote:FireServer("Grab", nil, nil, nil, nil) -- Requests an ID
  422.             elseif cmd:sub(1,1) == "i" then
  423.                 widthChatRequest, heightChatRequest, mineChatRequest = intermediate.width, intermediate.height, intermediate.mines -- Sets intermediate difficulty
  424.                 remote:FireServer("Grab", nil, nil, nil, nil) -- Requests an ID
  425.             elseif cmd:sub(1,1) == "e" then
  426.                 widthChatRequest, heightChatRequest, mineChatRequest = expert.width, expert.height, expert.mines -- Sets expert difficulty
  427.                 remote:FireServer("Grab", nil, nil, nil, nil) -- Requests an ID
  428.             elseif cmd:sub(1,1) == "c" then -- Custom Board
  429.         local customVariables = cmd:sub(2) -- grab ONLY the custom variables
  430.         local count = 0 -- This will help in sorting the request
  431.         for i in customVariables:gmatch("%S+") do -- Splits the variables into their own seperate parts
  432.           count = count + 1 -- Adds one to the count, which changes which part to change about the board
  433.           local a = tonumber(i) -- Changes the string to a number
  434.           if count == 1 then -- 1 is requesting width
  435.             if a <= 32 then
  436.               widthChatRequest = a
  437.             elseif a < 2 then
  438.               error("There were less than 2 width in the field. Please try again")
  439.             else
  440.               warn("The width of the board is too big! Setting to 32...")
  441.               widthChatRequest = 32
  442.             end
  443.           elseif count == 2 then -- 2 is requesting height
  444.             if a <= 32 then
  445.               heightChatRequest = a
  446.             elseif a < 2 then
  447.               error("There were less than 2 height in the field. Please try again")
  448.             else
  449.               warn("The height of the board is too big! Setting to 32...")
  450.               heightChatRequest = 32
  451.             end
  452.           elseif count == 3 then -- 3 is requesting mine count
  453.             local maxMines = roundNum((widthChatRequest * heightChatRequest) / 1.25) -- This is to make it so there isn't more mines than the board itself
  454.             if a <= maxMines then
  455.               mineChatRequest = a
  456.             elseif a < 0 then
  457.               error("There were less than 1 mine in the field. Please try again")
  458.             else
  459.               warn("The mine count is too much! Setting to "..maxMines.."...")
  460.               mineChatRequest = maxMines
  461.             end
  462.           end
  463.         end
  464.         remote:FireServer("Grab", nil, nil, nil, nil) -- Requests the ID
  465.       end
  466.         else
  467.             if cmd:sub(1,1) == "r" then -- Restart Minesweeper
  468.                 returnID()
  469.                 ignoreMessages = false
  470.             end
  471.         end
  472.     end
  473. end)
  474.  
  475.  
  476. remote.OnClientEvent:Connect(function(action, newID) -- Server to Client stuff
  477.     if action == "Sending" then -- When the server gives an ID
  478.         idForPlr = newID -- Store the ID
  479.         remote:FireServer("Board", widthChatRequest,heightChatRequest,mineChatRequest,idForPlr) -- Then request a board
  480.         warn("Jump to start. Do not walk off the invisible platform you are on.")
  481.         print("0-Transparent") -- Gives the player instructions on to what each color represents
  482.         print("1-Blue")
  483.         print("2-Green")
  484.         print("3-Red")
  485.         print("4-Purple")
  486.         print("5-Crimson")
  487.         print("6-Turquoise")
  488.         print("7-Black")
  489.         print("8-Gray")
  490.     elseif action == "Recieving" then -- When the server requests for the ID
  491.         returnID()
  492.         ignoreMessages = false
  493.     end
  494. end)
  495.  
  496. chr:FindFirstChildOfClass("Humanoid").Died:Connect(function() -- If the humanoid dies, return the ID. Failsafe.
  497.     returnID()
  498.     script:Destroy()
  499. end)
  500.  
  501. print("Prefix: /m\nb, i, e run the beginner, intermediate, and expert boards respectively.\nc [w] [h] [m] to set a custom board [w]*[h] big with [m] mines.\nr to reset your board.\nt to teleport back to your board.")]=], owner.Character):WaitForChild"MineRemote"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement