Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Tabs = script.Parent.Tabs
- local GreyGhost = script.Parent.GreyGhost
- local TS = game:GetService("TweenService")
- local Border = script.Parent.border
- local Border2 = script.Parent.Border2
- local function QuickTween(obj,goal,info)
- local Tween = TS:Create(obj,info,goal)
- Tween:Play()
- end
- local function Destroy(obj,up)
- if up == nil then
- return
- else
- up.En.Value = obj.En.Value
- end
- obj:Destroy()
- end
- for i, tab in pairs(script.Parent.Tabs:GetChildren()) do
- QuickTween(GreyGhost,{Position = tab.Position},TweenInfo.new(.2,Enum.EasingStyle.Circular,Enum.EasingDirection.Out,0,false,0))
- script.Parent.border.Tab_Name.Text = tab.Text
- script.Parent.Swoosh:Play()
- for i, v in pairs(script.Parent.border.ScrollingFrame:GetChildren()) do
- v.Parent = v.Par.Value
- v.Visible = false
- end
- for i, v in pairs(tab.Options:GetChildren()) do
- local Clone = v
- Clone.Parent = script.Parent.border.ScrollingFrame
- Clone.Visible = true
- Clone.BackGround.MouseButton1Click:Connect(function()
- if Clone.En.Value == false then
- Clone.En.Value = true
- elseif Clone.En.Value == true then
- Clone.En.Value = false
- script["Kid saying Ouch.wav"]:Play()
- end
- script["Kid saying Ouch.wav"]:Play()
- end)
- Clone.BackGround.Mover.MouseButton1Click:Connect(function()
- if Clone.En.Value == false then
- Clone.En.Value = true
- elseif Clone.En.Value == true then
- Clone.En.Value = false
- script["Kid saying Ouch.wav"]:Play()
- end
- end)
- local Debounce = false
- game:GetService("RunService").Stepped:Connect(function()
- if Debounce == false then
- Debounce = true
- if Clone.En.Value == false then
- QuickTween(Clone.BackGround.Mover,{BackgroundColor3 = Color3.new(1, 0.219608, 0.219608),Position = UDim2.new(0,0,0,0)},TweenInfo.new(.2,Enum.EasingStyle.Circular,Enum.EasingDirection.Out,0,false,0))
- else
- QuickTween(Clone.BackGround.Mover,{BackgroundColor3 = Color3.new(0.152941, 0.866667, 0.113725),Position = UDim2.new(0.467, 0,-0.033, 0)},TweenInfo.new(.2,Enum.EasingStyle.Circular,Enum.EasingDirection.Out,0,false,0))
- end
- Debounce = false
- end
- end)
- end
- tab.MouseButton1Click:Connect(function()
- QuickTween(GreyGhost,{Position = tab.Position},TweenInfo.new(.2,Enum.EasingStyle.Circular,Enum.EasingDirection.Out,0,false,0))
- script.Parent.border.Tab_Name.Text = tab.Text
- script.Parent.Swoosh:Play()
- for i, v in pairs(script.Parent.border.ScrollingFrame:GetChildren()) do
- v.Parent = v.Par.Value
- v.Visible = false
- end
- for i, v in pairs(tab.Options:GetChildren()) do
- local Clone = v
- Clone.Parent = script.Parent.border.ScrollingFrame
- Clone.Visible = true
- Clone.BackGround.MouseButton1Click:Connect(function()
- if Clone.En.Value == false then
- Clone.En.Value = true
- elseif Clone.En.Value == true then
- Clone.En.Value = false
- script["Kid saying Ouch.wav"]:Play()
- end
- end)
- Clone.BackGround.Mover.MouseButton1Click:Connect(function()
- if Clone.En.Value == false then
- Clone.En.Value = true
- elseif Clone.En.Value == true then
- Clone.En.Value = false
- script["Kid saying Ouch.wav"]:Play()
- end
- end)
- local Debounce = false
- game:GetService("RunService").Stepped:Connect(function()
- if Debounce == false then
- Debounce = true
- if Clone.En.Value == false then
- QuickTween(Clone.BackGround.Mover,{BackgroundColor3 = Color3.new(1, 0.219608, 0.219608),Position = UDim2.new(0,0,0,0)},TweenInfo.new(.2,Enum.EasingStyle.Circular,Enum.EasingDirection.Out,0,false,0))
- else
- QuickTween(Clone.BackGround.Mover,{BackgroundColor3 = Color3.new(0.152941, 0.866667, 0.113725),Position = UDim2.new(0.467, 0,-0.033, 0)},TweenInfo.new(.2,Enum.EasingStyle.Circular,Enum.EasingDirection.Out,0,false,0))
- end
- Debounce = false
- end
- end)
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement