Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local TweenService = game:GetService("TweenService")
- local Frame = script.Parent:WaitForChild("MapFrame")
- local Image = Frame:WaitForChild("MapImage")
- local Name = Frame:WaitForChild("MapName")
- local MapName = game.ReplicatedStorage.Values:WaitForChild("MapName")
- local MapImage = game.ReplicatedStorage.Values:WaitForChild("MapImage")
- local MapColor = game.ReplicatedStorage.Values:WaitForChild("MapColor")
- local remotes = game.ReplicatedStorage.Remotes
- local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
- --- Visible Tween ---
- local Visible = {}
- Visible.Transparency = 0
- local tweenv = TweenService:Create(Frame, tweenInfo, Visible)
- --- Invisible Tween ---
- local Invisible = {}
- Invisible.Transparency = 1
- local tweeni = TweenService:Create(Frame, tweenInfo, Invisible)
- MapName:GetPropertyChangedSignal("Value"):Connect(function()
- Name.Text = MapName.Value
- end)
- MapImage:GetPropertyChangedSignal("Value"):Connect(function()
- Image.Image = MapImage.Value
- end)
- MapColor:GetPropertyChangedSignal("Value"):Connect(function()
- Frame.BackgroundColor3 = Color3.fromHex(MapColor.Value)
- end)
- remotes.Visible.OnClientEvent:Connect(function()
- tweenv:Play()
- Frame.MapName.BackgroundTransparency = 0.7
- task.wait(3)
- Frame:TweenPosition(UDim2.new(0.017,0, 0.374,0))
- Frame:TweenSize(UDim2.new(0.17,0, 0.307,0))
- end)
- remotes.Invisible.OnClientEvent:Connect(function()
- tweeni:Play()
- Frame.MapName.BackgroundTransparency = 1
- task.wait(3)
- Frame:TweenPosition(UDim2.new(0.344,0, 0.293,0))
- Frame:TweenSize(UDim2.new(0.31,0, 0.412,0))
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement