I’m trying to create a system that converts elements into compounds and gives cash as a reward
everything works perfectly except everytime i fire a remote event to the server it does it fine the first time but every other time i fire it, it fires 1 more evertime
for example:
1st time - 1 fire
2nd time - 2 fires
3rd time - 3 fires
I’ve tried everything i can think of; changing some datastore values, rewriting half of my 644 line code and some other small details that i thought might have changed it but hasnt
code:
local c = false
local db = false
local function typeWriter(s)
local newString
for i = 0, s:len(), 1 do
newString = s:sub(1, i)
if s:sub(i - 1, i - 1) == "," then
wait(0.1)
elseif s:sub(i - 1, i - 1) == "." then
wait(0.2)
elseif s:sub(i - 1, i - 1) == "!" then
wait(0.2)
elseif s:sub(i - 1, i - 1) == "?" then
wait(0.2)
end
script.Parent.Parent.Error.Text = newString
wait(0.01)
game.SoundService.Click:Play()
end
end
local ts = game:GetService("TweenService")
local ti = TweenInfo.new(
10,
Enum.EasingStyle.Linear,
Enum.EasingDirection.In,
0,
false,
0
)
local ti2 = TweenInfo.new(
0.2,
Enum.EasingStyle.Sine,
Enum.EasingDirection.In,
0,
false,
0
)
local ti3 = TweenInfo.new(
2,
Enum.EasingStyle.Sine,
Enum.EasingDirection.In,
0,
false,
0
)
local tweenPos = ts:Create(script.Parent, ti, {Position=UDim2.new(0.5, 0,0.5, 0)})
local tweenSize = ts:Create(script.Parent, ti, {Size=UDim2.new(0.964, 0,0.556, 0)})
local boostTween = ts:Create(script.Parent.Parent.Parent.BoostButton, ti2, {Position=UDim2.new(0.414, 0,1.04, 0)})
local profileTween = ts:Create(script.Parent.Parent.Parent.ProfileButton, ti2, {Position=UDim2.new(0.528, 0,1.04, 0)})
local settingsTween = ts:Create(script.Parent.Parent.Parent.SettingsButton, ti2, {Position=UDim2.new(0.585, 0,1.04, 0)})
local shopTween = ts:Create(script.Parent.Parent.Parent.ShopButton, ti2, {Position=UDim2.new(0.471, 0,1.04, 0)})
local boostTween2 = ts:Create(script.Parent.Parent.Parent.BoostButton, ti2, {Position=UDim2.new(0.414, 0,0.944, 0)})
local profileTween2 = ts:Create(script.Parent.Parent.Parent.ProfileButton, ti2, {Position=UDim2.new(0.528, 0,0.944, 0)})
local settingsTween2 = ts:Create(script.Parent.Parent.Parent.SettingsButton, ti2, {Position=UDim2.new(0.585, 0,0.944, 0)})
local shopTween2 = ts:Create(script.Parent.Parent.Parent.ShopButton, ti2, {Position=UDim2.new(0.471, 0,0.944, 0)})
game.Workspace.Carbon.Text.Buy.Triggered:Connect(function(plr)
if c == false then
typeWriter("Comeplete todo list first!")
wait(1)
script.Parent.Parent.Error.Text = ""
end
end)
workspace.BoilingFlask.Boil.ProximityPrompt.Triggered:Connect(function(player)
if not db then
db = true
if script.Parent.Parent.Parent.Background.E1.TextLabel.Text == "" or script.Parent.Parent.Parent.Background.E2.TextLabel.Text == "" then
typeWriter("You need atleast 2 elements before you can use the boiling flask!")
wait(1)
script.Parent.Parent.Error.Text = ""
else
if game.Players.LocalPlayer.PlayerScripts:WaitForChild("InFlask").Element1.Value == "Hydrogen" then
if game.Players.LocalPlayer.PlayerScripts:WaitForChild("InFlask").Element2.Value == "Hydrogen" then
if game.Players.LocalPlayer.PlayerScripts:WaitForChild("InFlask").Element3.Value == "Oxygen" then
script.Parent.Parent.TextLabel.BoilText.Enabled = true
script.Parent.Parent.BackgroundTransparency = 0
script.Parent.Parent.Inner.BackgroundTransparency = 0
script.Parent.Parent.TextLabel.TextTransparency = 0
script.Parent.Size = UDim2.new(0, 0,0.556, 0)
script.Parent.Position = UDim2.new(0.018, 0,0.5, 0)
tweenPos:Play()
tweenSize:Play()
boostTween:Play()
profileTween:Play()
settingsTween:Play()
shopTween:Play()
tweenPos.Completed:Connect(function()
script.Parent.Parent.TextLabel.BoilText.Enabled = false
script.Parent.Parent.TextLabel.Text = "Boiling Complete!"
wait(1.5)
script.Parent.Parent.BackgroundTransparency = 1
script.Parent.Parent.Inner.BackgroundTransparency = 1
script.Parent.Parent.TextLabel.TextTransparency = 1
boostTween2:Play()
profileTween2:Play()
settingsTween2:Play()
shopTween2:Play()
local smoke = game.ReplicatedStorage.Smoke:Clone()
smoke.Parent = workspace
local water = game.ReplicatedStorage.Compounds.Water:Clone()
water.Parent = workspace
local TweenS1 = ts:Create(game.SoundService.Radio.Song1, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.2})
TweenS1:Play()
local TweenS2 = ts:Create(game.SoundService.Radio.Song2, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.2})
TweenS2:Play()
wait(0.5)
script.Parent.Parent.Parent.TodoBackground.Todo.Frame.Frame.TextLabel.Visible = true
game.SoundService.element:Play()
game:GetService("ReplicatedStorage").RemoteEvents.Give250:FireServer(player)
wait(0.5)
local Tween2S1 = ts:Create(game.SoundService.Radio.Song1, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.5})
Tween2S1:Play()
local Tween2S2 = ts:Create(game.SoundService.Radio.Song2, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.5})
Tween2S2:Play()
wait(0.5)
local smokeTween = ts:Create(smoke.Smoke, ti2, {Rate=0})
smokeTween:Play()
wait(3)
smoke:Destroy()
wait(2)
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Text = "Purchase Carbon"
script.Parent.Parent.Parent.TodoBackground.Todo.Frame.Frame.TextLabel.Visible = false
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Position = UDim2.new(0.55, 0,0.241, 0)
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Size = UDim2.new(0.5, 0,0.138, 0)
script.Parent.Parent.Parent.TodoBackground.Quests.Enabled = true
c = true
db = false
end)
else
typeWriter("Invalid Element!")
wait(1)
script.Parent.Parent.Error.Text = ""
end
elseif game.Players.LocalPlayer.PlayerScripts:WaitForChild("InFlask").Element2.Value == "Oxygen" then
if game.Players.LocalPlayer.PlayerScripts:WaitForChild("InFlask").Element3.Value == "Hydrogen" then
script.Parent.Parent.TextLabel.BoilText.Enabled = true
script.Parent.Parent.BackgroundTransparency = 0
script.Parent.Parent.Inner.BackgroundTransparency = 0
script.Parent.Parent.TextLabel.TextTransparency = 0
script.Parent.Size = UDim2.new(0, 0,0, 15)
script.Parent.Position = UDim2.new(0.02, 0,0.5, 0)
tweenPos:Play()
tweenSize:Play()
boostTween:Play()
profileTween:Play()
settingsTween:Play()
shopTween:Play()
tweenPos.Completed:Connect(function()
script.Parent.Parent.TextLabel.BoilText.Enabled = false
script.Parent.Parent.TextLabel.Text = "Boiling Complete!"
wait(1.5)
script.Parent.Parent.BackgroundTransparency = 1
script.Parent.Parent.Inner.BackgroundTransparency = 1
script.Parent.Parent.TextLabel.TextTransparency = 1
boostTween2:Play()
profileTween2:Play()
settingsTween2:Play()
shopTween2:Play()
local smoke = game.ReplicatedStorage.Smoke:Clone()
smoke.Parent = workspace
local water = game.ReplicatedStorage.Compounds.Water:Clone()
water.Parent = workspace
local TweenS1 = ts:Create(game.SoundService.Radio.Song1, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.2})
TweenS1:Play()
local TweenS2 = ts:Create(game.SoundService.Radio.Song2, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.2})
TweenS2:Play()
wait(0.5)
script.Parent.Parent.Parent.TodoBackground.Todo.Frame.Frame.TextLabel.Visible = true
game.SoundService.element:Play()
game:GetService("ReplicatedStorage").RemoteEvents.Give250:FireServer(player)
wait(0.5)
local Tween2S1 = ts:Create(game.SoundService.Radio.Song1, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.5})
Tween2S1:Play()
local Tween2S2 = ts:Create(game.SoundService.Radio.Song2, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.5})
Tween2S2:Play()
wait(0.5)
local smokeTween = ts:Create(smoke.Smoke, ti2, {Rate=0})
smokeTween:Play()
wait(3)
smoke:Destroy()
wait(2)
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Text = "Purchase Carbon"
script.Parent.Parent.Parent.TodoBackground.Todo.Frame.Frame.TextLabel.Visible = false
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Position = UDim2.new(0.55, 0,0.241, 0)
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Size = UDim2.new(0.5, 0,0.138, 0)
script.Parent.Parent.Parent.TodoBackground.Quests.Enabled = true
c = true
db = false
end)
else
typeWriter("Invalid Element!")
wait(1)
script.Parent.Parent.Error.Text = ""
end
end
elseif game.Players.LocalPlayer.PlayerScripts:WaitForChild("InFlask").Element1.Value == "Oxygen" then
if game.Players.LocalPlayer.PlayerScripts:WaitForChild("InFlask").Element2.Value == "Hydrogen" then
if game.Players.LocalPlayer.PlayerScripts:WaitForChild("InFlask").Element3.Value == "Hydrogen" then
script.Parent.Parent.TextLabel.BoilText.Enabled = true
script.Parent.Parent.BackgroundTransparency = 0
script.Parent.Parent.Inner.BackgroundTransparency = 0
script.Parent.Parent.TextLabel.TextTransparency = 0
script.Parent.Size = UDim2.new(0, 0,0, 15)
script.Parent.Position = UDim2.new(0.02, 0,0.5, 0)
tweenPos:Play()
tweenSize:Play()
boostTween:Play()
profileTween:Play()
settingsTween:Play()
shopTween:Play()
tweenPos.Completed:Connect(function()
script.Parent.Parent.TextLabel.BoilText.Enabled = false
script.Parent.Parent.TextLabel.Text = "Boiling Complete!"
wait(1.5)
script.Parent.Parent.BackgroundTransparency = 1
script.Parent.Parent.Inner.BackgroundTransparency = 1
script.Parent.Parent.TextLabel.TextTransparency = 1
boostTween2:Play()
profileTween2:Play()
settingsTween2:Play()
shopTween2:Play()
local smoke = game.ReplicatedStorage.Smoke:Clone()
smoke.Parent = workspace
local water = game.ReplicatedStorage.Compounds.Water:Clone()
water.Parent = workspace
local TweenS1 = ts:Create(game.SoundService.Radio.Song1, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.2})
TweenS1:Play()
local TweenS2 = ts:Create(game.SoundService.Radio.Song2, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.2})
TweenS2:Play()
wait(0.5)
script.Parent.Parent.Parent.TodoBackground.Todo.Frame.Frame.TextLabel.Visible = true
game.SoundService.element:Play()
game:GetService("ReplicatedStorage").RemoteEvents.Give500:FireServer(player)
wait(0.5)
local Tween2S1 = ts:Create(game.SoundService.Radio.Song1, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.5})
Tween2S1:Play()
local Tween2S2 = ts:Create(game.SoundService.Radio.Song2, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.5})
Tween2S2:Play()
wait(0.5)
local smokeTween = ts:Create(smoke.Smoke, ti2, {Rate=0})
smokeTween:Play()
wait(3)
smoke:Destroy()
wait(2)
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Text = "Purchase Carbon"
script.Parent.Parent.Parent.TodoBackground.Todo.Frame.Frame.TextLabel.Visible = false
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Position = UDim2.new(0.55, 0,0.241, 0)
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Size = UDim2.new(0.5, 0,0.138, 0)
script.Parent.Parent.Parent.TodoBackground.Quests.Enabled = true
c = true
db = false
script.Parent.Parent.TextLabel.BoilText.Enabled = true
end)
end
else
typeWriter("Invalid Element!")
wait(1)
script.Parent.Parent.Error.Text = ""
end
end
end
if script.Parent.Parent.Parent.Background.E1.TextLabel.Text == "" or script.Parent.Parent.Parent.Background.E2.TextLabel.Text == "" then
typeWriter("You need atleast 2 elements before you can use the boiling flask!!")
wait(1)
script.Parent.Parent.Error.Text = ""
end
else
typeWriter("Please wait!")
wait(1)
script.Parent.Parent.Error.Text = ""
end
end)
workspace.BoilingFlask.Boil.ProximityPrompt.Triggered:Connect(function(player)
if script.Parent.Parent.Parent.Background.E1.TextLabel.Text == "" or script.Parent.Parent.Parent.Background.E2.TextLabel.Text == "" then
typeWriter("You need atleast 2 elements before you can use the boiling flask!")
wait(1)
script.Parent.Parent.Error.Text = ""
else
if game.Players.LocalPlayer.PlayerScripts:WaitForChild("InFlask").Element1.Value == "Oxygen" then
if game.Players.LocalPlayer.PlayerScripts:WaitForChild("InFlask").Element2.Value == "Oxygen" then
if game.Players.LocalPlayer.PlayerScripts:WaitForChild("InFlask").Element3.Value == "Carbon" then
script.Parent.Parent.Error.Visible = false
script.Parent.Parent.TextLabel.BoilText.Enabled = true
script.Parent.Parent.BackgroundTransparency = 0
script.Parent.Parent.Inner.BackgroundTransparency = 0
script.Parent.Parent.TextLabel.TextTransparency = 0
script.Parent.Size = UDim2.new(0, 0,0.556, 0)
script.Parent.Position = UDim2.new(0.018, 0,0.5, 0)
tweenPos:Play()
tweenSize:Play()
boostTween:Play()
profileTween:Play()
settingsTween:Play()
shopTween:Play()
tweenPos.Completed:Connect(function()
script.Parent.Parent.TextLabel.BoilText.Enabled = false
script.Parent.Parent.TextLabel.Text = "Boiling Complete!"
wait(1.5)
script.Parent.Parent.BackgroundTransparency = 1
script.Parent.Parent.Inner.BackgroundTransparency = 1
script.Parent.Parent.TextLabel.TextTransparency = 1
boostTween2:Play()
profileTween2:Play()
settingsTween2:Play()
shopTween2:Play()
local smoke = game.ReplicatedStorage.Smoke:Clone()
smoke.Parent = workspace
local water = game.ReplicatedStorage.Compounds.Water:Clone()
water.Parent = workspace
local TweenS1 = ts:Create(game.SoundService.Radio.Song1, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.2})
TweenS1:Play()
local TweenS2 = ts:Create(game.SoundService.Radio.Song2, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.2})
TweenS2:Play()
wait(0.5)
script.Parent.Parent.Parent.TodoBackground.Todo.Frame.Frame.TextLabel.Visible = true
game.SoundService.element:Play()
game:GetService("ReplicatedStorage").RemoteEvents.Give500:FireServer(player)
wait(0.5)
local Tween2S1 = ts:Create(game.SoundService.Radio.Song1, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.5})
Tween2S1:Play()
local Tween2S2 = ts:Create(game.SoundService.Radio.Song2, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.5})
Tween2S2:Play()
wait(0.5)
local smokeTween = ts:Create(smoke.Smoke, ti2, {Rate=0})
smokeTween:Play()
wait(3)
smoke:Destroy()
wait(2)
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Text = "Purchase Carbon"
script.Parent.Parent.Parent.TodoBackground.Todo.Frame.Frame.TextLabel.Visible = false
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Position = UDim2.new(0.55, 0,0.241, 0)
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Size = UDim2.new(0.5, 0,0.138, 0)
script.Parent.Parent.Parent.TodoBackground.Quests.Enabled = true
c = true
db = false
script.Parent.Parent.TextLabel.BoilText.Enabled = true
end)
else
typeWriter("Invalid Element!")
wait(1)
script.Parent.Parent.Error.Text = ""
end
elseif game.Players.LocalPlayer.PlayerScripts:WaitForChild("InFlask").Element2.Value == "Carbon" then
if game.Players.LocalPlayer.PlayerScripts:WaitForChild("InFlask").Element3.Value == "Oxygen" then
script.Parent.Parent.Error.Visible = false
script.Parent.Parent.TextLabel.BoilText.Enabled = true
script.Parent.Parent.BackgroundTransparency = 0
script.Parent.Parent.Inner.BackgroundTransparency = 0
script.Parent.Parent.TextLabel.TextTransparency = 0
script.Parent.Size = UDim2.new(0, 0,0.556, 0)
script.Parent.Position = UDim2.new(0.018, 0,0.5, 0)
tweenPos:Play()
tweenSize:Play()
boostTween:Play()
profileTween:Play()
settingsTween:Play()
shopTween:Play()
tweenPos.Completed:Connect(function()
script.Parent.Parent.TextLabel.BoilText.Enabled = false
script.Parent.Parent.TextLabel.Text = "Boiling Complete!"
wait(1.5)
script.Parent.Parent.BackgroundTransparency = 1
script.Parent.Parent.Inner.BackgroundTransparency = 1
script.Parent.Parent.TextLabel.TextTransparency = 1
boostTween2:Play()
profileTween2:Play()
settingsTween2:Play()
shopTween2:Play()
local smoke = game.ReplicatedStorage.Smoke:Clone()
smoke.Parent = workspace
local water = game.ReplicatedStorage.Compounds.Water:Clone()
water.Parent = workspace
local TweenS1 = ts:Create(game.SoundService.Radio.Song1, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.2})
TweenS1:Play()
local TweenS2 = ts:Create(game.SoundService.Radio.Song2, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.2})
TweenS2:Play()
wait(0.5)
script.Parent.Parent.Parent.TodoBackground.Todo.Frame.Frame.TextLabel.Visible = true
game.SoundService.element:Play()
game:GetService("ReplicatedStorage").RemoteEvents.Give500:FireServer(player)
wait(0.5)
local Tween2S1 = ts:Create(game.SoundService.Radio.Song1, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.5})
Tween2S1:Play()
local Tween2S2 = ts:Create(game.SoundService.Radio.Song2, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.5})
Tween2S2:Play()
wait(0.5)
local smokeTween = ts:Create(smoke.Smoke, ti2, {Rate=0})
smokeTween:Play()
wait(3)
smoke:Destroy()
wait(2)
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Text = "Purchase Carbon"
script.Parent.Parent.Parent.TodoBackground.Todo.Frame.Frame.TextLabel.Visible = false
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Position = UDim2.new(0.55, 0,0.241, 0)
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Size = UDim2.new(0.5, 0,0.138, 0)
script.Parent.Parent.Parent.TodoBackground.Quests.Enabled = true
c = true
db = false
script.Parent.Parent.TextLabel.BoilText.Enabled = true
end)
else
typeWriter("Invalid Element!")
wait(1)
script.Parent.Parent.Error.Text = ""
end
end
elseif game.Players.LocalPlayer.PlayerScripts:WaitForChild("InFlask").Element1.Value == "Carbon" then
if game.Players.LocalPlayer.PlayerScripts:WaitForChild("InFlask").Element2.Value == "Oxygen" then
if game.Players.LocalPlayer.PlayerScripts:WaitForChild("InFlask").Element3.Value == "Oxygen" then
script.Parent.Parent.Error.Visible = false
script.Parent.Parent.TextLabel.BoilText.Enabled = true
script.Parent.Parent.BackgroundTransparency = 0
script.Parent.Parent.Inner.BackgroundTransparency = 0
script.Parent.Parent.TextLabel.TextTransparency = 0
script.Parent.Size = UDim2.new(0, 0,0.556, 0)
script.Parent.Position = UDim2.new(0.018, 0,0.5, 0)
tweenPos:Play()
tweenSize:Play()
boostTween:Play()
profileTween:Play()
settingsTween:Play()
shopTween:Play()
tweenPos.Completed:Connect(function()
script.Parent.Parent.TextLabel.BoilText.Enabled = false
script.Parent.Parent.TextLabel.Text = "Boiling Complete!"
wait(1.5)
script.Parent.Parent.BackgroundTransparency = 1
script.Parent.Parent.Inner.BackgroundTransparency = 1
script.Parent.Parent.TextLabel.TextTransparency = 1
boostTween2:Play()
profileTween2:Play()
settingsTween2:Play()
shopTween2:Play()
local smoke = game.ReplicatedStorage.Smoke:Clone()
smoke.Parent = workspace
local water = game.ReplicatedStorage.Compounds.Water:Clone()
water.Parent = workspace
local TweenS1 = ts:Create(game.SoundService.Radio.Song1, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.2})
TweenS1:Play()
local TweenS2 = ts:Create(game.SoundService.Radio.Song2, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.2})
TweenS2:Play()
wait(0.5)
script.Parent.Parent.Parent.TodoBackground.Todo.Frame.Frame.TextLabel.Visible = true
game.SoundService.element:Play()
game:GetService("ReplicatedStorage").RemoteEvents.Give500:FireServer(player)
wait(0.5)
local Tween2S1 = ts:Create(game.SoundService.Radio.Song1, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.5})
Tween2S1:Play()
local Tween2S2 = ts:Create(game.SoundService.Radio.Song2, TweenInfo.new(0.2, Enum.EasingStyle.Linear), {Volume = 0.5})
Tween2S2:Play()
wait(0.5)
local smokeTween = ts:Create(smoke.Smoke, ti2, {Rate=0})
smokeTween:Play()
wait(3)
smoke:Destroy()
wait(2)
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Text = "Purchase Carbon"
script.Parent.Parent.Parent.TodoBackground.Todo.Frame.Frame.TextLabel.Visible = false
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Position = UDim2.new(0.55, 0,0.241, 0)
script.Parent.Parent.Parent.TodoBackground.Todo.Quest.Size = UDim2.new(0.5, 0,0.138, 0)
script.Parent.Parent.Parent.TodoBackground.Quests.Enabled = true
c = true
db = false
script.Parent.Parent.TextLabel.BoilText.Enabled = true
end)
end
else
typeWriter("Invalid Element!")
wait(1)
script.Parent.Parent.Error.Text = ""
end
end
end
end)```
i know the code is very inefficient, don't mention it lol
if you can help that would be amazing