Advertisement
Touch_Grass

Untitled

Nov 12th, 2022
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.81 KB | Source Code | 0 0
  1. local Tabs = script.Parent.Tabs
  2. local GreyGhost = script.Parent.GreyGhost
  3. local TS = game:GetService("TweenService")
  4. local Border = script.Parent.border
  5. local Border2 = script.Parent.Border2
  6. local function QuickTween(obj,goal,info)
  7.     local Tween = TS:Create(obj,info,goal)
  8.     Tween:Play()
  9. end
  10. local function Destroy(obj,up)
  11.     if up == nil then
  12.         return
  13.     else
  14.         up.En.Value = obj.En.Value
  15.     end
  16.     obj:Destroy()
  17. end
  18. for i, tab in pairs(script.Parent.Tabs:GetChildren()) do
  19.     QuickTween(GreyGhost,{Position = tab.Position},TweenInfo.new(.2,Enum.EasingStyle.Circular,Enum.EasingDirection.Out,0,false,0))
  20.     script.Parent.border.Tab_Name.Text = tab.Text
  21.     script.Parent.Swoosh:Play()
  22.     for i, v in pairs(script.Parent.border.ScrollingFrame:GetChildren()) do
  23.         v.Parent = v.Par.Value
  24.         v.Visible = false
  25.     end
  26.     for i, v in pairs(tab.Options:GetChildren()) do
  27.         local Clone = v
  28.         Clone.Parent = script.Parent.border.ScrollingFrame
  29.         Clone.Visible = true
  30.         Clone.BackGround.MouseButton1Click:Connect(function()
  31.             if Clone.En.Value == false then
  32.                 Clone.En.Value = true
  33.             elseif Clone.En.Value == true then
  34.                 Clone.En.Value = false
  35.                 script["Kid saying Ouch.wav"]:Play()
  36.             end
  37.             script["Kid saying Ouch.wav"]:Play()
  38.         end)
  39.         Clone.BackGround.Mover.MouseButton1Click:Connect(function()
  40.             if Clone.En.Value == false then
  41.                 Clone.En.Value = true
  42.             elseif Clone.En.Value == true then
  43.                 Clone.En.Value = false
  44.                 script["Kid saying Ouch.wav"]:Play()
  45.             end
  46.         end)
  47.         local Debounce = false
  48.         game:GetService("RunService").Stepped:Connect(function()
  49.             if Debounce == false then
  50.                 Debounce = true
  51.                 if Clone.En.Value == false then
  52.                     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))
  53.                 else
  54.                     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))
  55.                 end
  56.                 Debounce = false
  57.             end
  58.         end)
  59.     end
  60.     tab.MouseButton1Click:Connect(function()
  61.         QuickTween(GreyGhost,{Position = tab.Position},TweenInfo.new(.2,Enum.EasingStyle.Circular,Enum.EasingDirection.Out,0,false,0))
  62.         script.Parent.border.Tab_Name.Text = tab.Text
  63.         script.Parent.Swoosh:Play()
  64.         for i, v in pairs(script.Parent.border.ScrollingFrame:GetChildren()) do
  65.             v.Parent = v.Par.Value
  66.             v.Visible = false
  67.         end
  68.         for i, v in pairs(tab.Options:GetChildren()) do
  69.             local Clone = v
  70.             Clone.Parent = script.Parent.border.ScrollingFrame
  71.             Clone.Visible = true
  72.             Clone.BackGround.MouseButton1Click:Connect(function()
  73.                 if Clone.En.Value == false then
  74.                     Clone.En.Value = true
  75.                 elseif Clone.En.Value == true then
  76.                     Clone.En.Value = false
  77.                     script["Kid saying Ouch.wav"]:Play()
  78.                 end
  79.             end)
  80.             Clone.BackGround.Mover.MouseButton1Click:Connect(function()
  81.                 if Clone.En.Value == false then
  82.                     Clone.En.Value = true
  83.                 elseif Clone.En.Value == true then
  84.                     Clone.En.Value = false
  85.                     script["Kid saying Ouch.wav"]:Play()
  86.                 end
  87.             end)
  88.             local Debounce = false
  89.             game:GetService("RunService").Stepped:Connect(function()
  90.                 if Debounce == false then
  91.                     Debounce = true
  92.                     if Clone.En.Value == false then
  93.                         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))
  94.                     else
  95.                         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))
  96.                     end
  97.                     Debounce = false
  98.                 end
  99.             end)
  100.         end
  101.     end)
  102. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement