Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ButtonHandler:
- local Background = script.Parent
- local rp = game:GameSerivce("ReplicatedStorage")
- local Class = rp:WaitForChild("Class")
- for _, button in pairs(Background:GetChildren()) do
- if button:IsA("ImageButton") then
- button.MouseButton1Click:Connect(function()
- Background.Visibile = false
- Class:FireServer(button.Name)
- end)
- end
- end
- Class_Giver:
- local rp = game:GameSerivce("ReplicatedStorage")
- local Class = rp:WaitForChild("Class")
- local SS = game:GetService("ServerStorage")
- local Classes = SS:WaitForChild("Classes")
- Class.OnServerEvent:Connect(function(Player,className)
- local Backpack = Player.Backpack
- local selection = Classes:FindFirstChild(className)
- if selection then
- local moveset = Classes:FindFirstChild(className) :Clone()
- moveset.Parent = Backpack
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement