Advertisement
Guest User

Roblox gui script copy and paste

a guest
Nov 9th, 2024
894
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.06 KB | None | 0 0
  1. -
  2. Download Here --> https://tinyurl.com/ytwvd2es (Copy and Paste Link)
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9. Simple | Roblox Simple Script GUI
  10. until game . Players . LocalPlayer and game . Players . LocalPlayer . Character and game . Players . LocalPlayer . Character : findFirstChild ( "Head" ) and game . Players . LocalPlayer . Character : findFirstChild ( "Humanoid" )
  11. bv . velocity = ( ( game . Workspace . CurrentCamera . CoordinateFrame . lookVector * ( ctrl . f + ctrl . b ) ) + ( ( game . Workspace . CurrentCamera . CoordinateFrame * CFrame . new ( ctrl . l + ctrl . r , ( ctrl . f + ctrl . b ) * .2 , 0 ) . p ) - game . Workspace . CurrentCamera . CoordinateFrame . p ) ) * speed
  12. bv . velocity = ( ( game . Workspace . CurrentCamera . CoordinateFrame . lookVector * ( lastctrl . f + lastctrl . b ) ) + ( ( game . Workspace . CurrentCamera . CoordinateFrame * CFrame . new ( lastctrl . l + lastctrl . r , ( lastctrl . f + lastctrl . b ) * .2 , 0 ) . p ) - game . Workspace . CurrentCamera . CoordinateFrame . p ) ) * speed
  13. bg . cframe = game . Workspace . CurrentCamera . CoordinateFrame * CFrame . Angles ( - math.rad ( ( ctrl . f + ctrl . b ) * 50 * speed / maxspeed ) , 0 , 0 )
  14. How do I make a working team changer GUI in roblox?
  15. In 2018 Roblox switched coding platforms I believe, most scripts have survived, however I have failed to find a working team changer for myself this year that changes your team when clicked depending if you are in certian groups or not. My scripter says that it works in studio, but an error pops up in game that says " TeamColor is not a valid member of PlayerGui Stack Begin Script 'Players.Benyal.PlayerGui.Starter GUI.TeamGui.Frame.Research and Development.LocalScript', Line 8 Stack End" My scipter tried many different ways but it just wont work! Any seggustions?
  16. Could you please post the code from the local script at "Players.Benyal.PlayerGui.Starter GUI.TeamGui.Frame.Research and Development.LocalScript" as that would let me see what's going wrong a lot easier.
  17. 1 Answer 1
  18. This solution uses two scripts (one LocalScript and one Script), follow the steps below to make a team changing GUI!
  19. local teams = game:GetService("Teams") local settings = repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.PlayerGui local plr = game.Players.LocalPlayer local teamGUI = Instance.new("ScreenGui",plr.PlayerGui) local frame = Instance.new("Frame",teamGUI) frame.AnchorPoint,frame.Size,frame.Position,frame.BackgroundColor3 = Vector2.new(0.5,0.5),UDim2.new(settings.GUIWidth/100,0,settings.GUIHeight/100,0),UDim2.new(0.5,0,0.5,0),settings.GUIColor local title = Instance.new("TextLabel",frame) title.Text,title.Font,title.Size,title.TextScaled,title.BackgroundTransparency = settings.TitleText,settings.TitleFont,UDim2.new(1,0,0.15,0),true,0.5 local closebutton = Instance.new("TextButton",title) closebutton.Size,closebutton.Position,closebutton.BackgroundColor3,closebutton.Text = UDim2.new(0.1,0,1,0),UDim2.new(0.9,0,0,0),Color3.fromRGB(255,155,155),"Close" local list = Instance.new("ScrollingFrame",frame) list.Size,list.Position,list.BackgroundTransparency = UDim2.new(1,0,0.85,0),UDim2.new(0,0,0.15,0),1 local UILayout = Instance.new("UIListLayout",list) local serverTeamHandler = game.ReplicatedStorage:WaitForChild("teamChanger") local getTeams = teams:GetChildren() --this part checks if you have teams in your game (you need to have put the teams in your game already) for i,v in pairs(getTeams) do print("[Team " .. i .. " found]: " .. v:GetFullName()) local teamButton = Instance.new("TextButton",list) teamButton.BackgroundColor3 = v.TeamColor.Color teamButton.Size = UDim2.new(1,0,0,40) teamButton.Text,teamButton.TextColor3,teamButton.TextStrokeTransparency,teamButton.TextScaled = v.Name,Color3.fromRGB(255,255,255),0.7,true teamButton.MouseButton1Down:connect(function() print("You changed teams. You are now in: " .. v.Name) serverTeamHandler:InvokeServer(v) end) end closebutton.MouseButton1Click:connect(function() frame:TweenPosition(UDim2.new(0.5,0,2,0),"Out","Quad",0.5) local returnButton = Instance.new("TextButton",teamGUI) returnButton.Size,returnButton.Position,returnButton.Text,returnButton.TextScaled = UDim2.new(0,200,0,50),UDim2.new(0.5,-100,1,-50),"Open Team Changer",true returnButton.MouseButton1Down:connect(function() returnButton:Destroy() frame:TweenPosition(UDim2.new(0.5,0,0.5,0),"Out","Elastic",1,true) end) end)
  20. Step 1 Insert a LocalScript into StarterGui
  21. Step 2 Copy the stuff above and paste it into this LocalScript
  22. Step 3 Insert a Script into either Workspace or ServerScriptService (your choice)
  23. Step 4 Copy the stuff below and paste it into the Script
  24. local teamChanger = Instance.new("RemoteFunction",game.ReplicatedStorage) teamChanger.Name = "teamChanger" local function changeTeam(client,team) print(client.Name .. "changed teams: now in" .. team.Name) client.Team = team end teamChanger.OnServerInvoke = changeTeam
  25. If you followed these steps correctly, you should now have a working team changing GUI in your game! It works as long as you have already inserted Teams in your game. The first few lines in the LocalScript can also be customized as well!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement