Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- services
- local Players = game:GetService("Players")
- local Player = Players.LocalPlayer
- -- gui
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Name = "ToggleFriendsGUI"
- ScreenGui.ResetOnSpawn = false
- ScreenGui.Parent = Player:WaitForChild("PlayerGui")
- -- main frame
- local Frame = Instance.new("Frame")
- Frame.Size = UDim2.fromOffset(220, 110)
- Frame.Position = UDim2.fromScale(0.4, 0.4)
- Frame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- Frame.BorderSizePixel = 0
- Frame.Parent = ScreenGui
- -- corner
- local Corner = Instance.new("UICorner")
- Corner.CornerRadius = UDim.new(0, 10)
- Corner.Parent = Frame
- -- title
- local Title = Instance.new("TextLabel")
- Title.Size = UDim2.new(1, 0, 0, 28)
- Title.BackgroundTransparency = 1
- Title.Text = "Plot Toggle"
- Title.TextSize = 14
- Title.Font = Enum.Font.GothamMedium
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.Parent = Frame
- -- button
- local Button = Instance.new("TextButton")
- Button.Size = UDim2.fromOffset(180, 40)
- Button.Position = UDim2.fromOffset(20, 45)
- Button.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- Button.Text = "Toggle Friends"
- Button.TextSize = 14
- Button.Font = Enum.Font.Gotham
- Button.TextColor3 = Color3.fromRGB(255, 255, 255)
- Button.AutoButtonColor = false
- Button.Parent = Frame
- local BtnCorner = Instance.new("UICorner")
- BtnCorner.CornerRadius = UDim.new(0, 8)
- BtnCorner.Parent = Button
- -- draggable
- Frame.Active = true
- Frame.Draggable = true
- -- click action
- Button.MouseButton1Click:Connect(function()
- local net = game.ReplicatedStorage:FindFirstChild("Packages")
- and game.ReplicatedStorage.Packages:FindFirstChild("Net")
- if net then
- local remote = net:FindFirstChild("RE/PlotService/ToggleFriends")
- if remote then
- remote:FireServer()
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment