Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --SynapseX Decompiler
- function getTorso(chr)
- if chr.Humanoid.RigType == Enum.HumanoidRigType.R15 and chr:findFirstChild("UpperTorso") then
- return chr.UpperTorso
- elseif chr.Humanoid.RigType == Enum.HumanoidRigType.R6 and chr:findFirstChild("Torso") then
- return chr.Torso
- end
- end
- local plr = game.Players.LocalPlayer
- repeat
- wait()
- until plr:findFirstChild("Current")
- local sparent = script.Parent
- sparent.Base.Visible = true
- local amount = plr.Current.Amount
- local imageCap = sparent.ImageCap
- script.Parent = nil
- repeat
- local perc = 175 / amount.MaxValue
- imageCap.Size = UDim2.new(0, perc * amount.Value, 0, 100)
- sparent.Current.Text = plr.Current.Value
- wait()
- until amount.Value == amount.MaxValue
- imageCap.Size = UDim2.new(0, 175, 0, 100)
- sparent.Current.Text = "BRAY Industries"
- wait(2)
- imageCap.Glow.Visible = true
- imageCap.ImageTop.Visible = false
- wait(5)
- for i = 1, 10 do
- imageCap.Glow.ImageTransparency = imageCap.Glow.ImageTransparency + 1
- sparent.Base.ImageTransparency = sparent.Base.ImageTransparency + 1
- sparent.Current.TextTransparency = sparent.Current.TextTransparency + 1
- sparent.Current.TextStrokeTransparency = sparent.Current.TextStrokeTransparency + 0.02 * i
- wait()
- end
- repeat
- wait()
- until plr:findFirstChild("PlayersData")
- local plrd = plr.PlayersData
- sparent.RP.rpName.Text = plrd.Forename.Value .. " " .. plrd.Surname.Value
- plrd.Forename.Changed:connect(function()
- sparent.RP.rpName.Text = plrd.Forename.Value .. " " .. plrd.Surname.Value
- end)
- plrd.Surname.Changed:connect(function()
- sparent.RP.rpName.Text = plrd.Forename.Value .. " " .. plrd.Surname.Value
- end)
- if plr:GetRankInGroup(2666710) >= 4 and plrd.Forename.Value == "Unknown" and game.ReplicatedStorage:FindFirstChild("Settings") and game.ReplicatedStorage.Settings.Application.Value == false then
- do
- local fna, sna = false, false
- local deb = false
- local sheet = sparent.NameSelection
- sheet.Forename.Changed:connect(function()
- if sheet.Forename.Text ~= "Insert text here" then
- fna = true
- if fna and sna then
- sheet.Submit.Visible = true
- end
- end
- end)
- sheet.Surname.Changed:connect(function()
- if sheet.Surname.Text ~= "Insert text here" then
- sna = true
- if fna and sna then
- sheet.Submit.Visible = true
- end
- end
- end)
- sheet.Submit.MouseButton1Down:connect(function()
- if deb == false then
- deb = true
- sheet.Visible = false
- local sendOff = game.ReplicatedStorage.Database.RequestData:InvokeServer("Update_Name", {
- sheet.Forename.Text,
- sheet.Surname.Text
- })
- end
- end)
- sheet.Visible = true
- end
- end
- local isAdmin = game.ReplicatedStorage.Database.RequestData:InvokeServer("RankInGroup", {2666710, 14})
- if isAdmin then
- do
- local adminsheet = sparent.AdminProfile
- local deb = false
- function setHouse(house)
- plr.PlayerGui.BasicUI.AdminProfile.Profile.House.Value = house
- for i, v in pairs(plr.PlayerGui.BasicUI.AdminProfile.Profile.Houses:GetChildren()) do
- if v.Name == house then
- v.ImageColor3 = Color3.new(1, 1, 1)
- v.ImageTransparency = 0
- else
- v.ImageTransparency = 0.5
- v.ImageColor3 = Color3.new(0.2196078431372549, 0.2196078431372549, 0.2196078431372549)
- end
- end
- end
- for i, v in pairs(adminsheet.Profile.Houses:GetChildren()) do
- v.MouseButton1Down:connect(function()
- if adminsheet.Profile.House.Value ~= v.Name then
- adminsheet.Profile.House.Value = v.Name
- setHouse(v.Name)
- end
- end)
- end
- adminsheet.Profile.Update.MouseButton1Down:connect(function()
- if adminsheet.Profile.House.Value ~= "NaN" and adminsheet.Profile.playersID.Value ~= 0 and deb == false and adminsheet.Profile.House.Value ~= adminsheet.Profile.OriginalHouse.Value then
- deb = true
- adminsheet.Profile.Update.BackgroundTransparency = 1
- adminsheet.Profile.Update.Text = "..UPDATING.."
- local updateHouse = game.ReplicatedStorage.Database.RequestData:InvokeServer("Update_House", {
- adminsheet.Profile.playersID.Value,
- adminsheet.Profile.House.Value,
- adminsheet.Profile.playersName.Value
- })
- if updateHouse then
- adminsheet.Profile.Update.TextColor3 = Color3.new(0, 1, 0)
- adminsheet.Profile.Update.Text = "SUCCESS!"
- else
- adminsheet.Profile.Update.TextColor3 = Color3.new(1, 0, 0)
- adminsheet.Profile.Update.Text = "!ERROR!"
- end
- wait(4)
- adminsheet.Profile.Update.TextColor3 = Color3.new(1, 0, 0)
- for i = 1, 30 do
- adminsheet.Profile.Update.Text = 30 - i
- wait(1)
- end
- adminsheet.Profile.Update.TextColor3 = Color3.new(1, 1, 1)
- adminsheet.Profile.Update.BackgroundTransparency = 0
- adminsheet.Profile.Update.Text = "UPDATE"
- deb = false
- end
- end)
- adminsheet.Spells.Update.MouseButton1Down:connect(function()
- if deb == false then
- deb = true
- local spells = {}
- for i, v in pairs(adminsheet.Spells.Spells:GetChildren()) do
- if v.Teach.Value == true then
- table.insert(spells, v.Text)
- end
- end
- if #spells ~= 0 then
- local updateSpells = game.ReplicatedStorage.Database.RequestData:InvokeServer("Update_Spells", {
- adminsheet.Spells.playersID.Value,
- spells,
- adminsheet.Spells.playersName.Value
- })
- adminsheet.Spells.Update.BackgroundTransparency = 1
- adminsheet.Spells.Update.Text = "..UPDATING.."
- if updateSpells then
- adminsheet.Spells.Update.TextColor3 = Color3.new(0, 1, 0)
- adminsheet.Spells.Update.Text = "SUCCESS!"
- else
- adminsheet.Spells.Update.TextColor3 = Color3.new(1, 0, 0)
- adminsheet.Spells.Update.Text = "!ERROR!"
- end
- adminsheet.Spells.Update.TextColor3 = Color3.new(1, 0, 0)
- for i = 1, 5 do
- adminsheet.Spells.Update.Text = 5 - i
- wait(1)
- end
- adminsheet.Visible = false
- adminsheet.Spells.Update.TextColor3 = Color3.new(1, 1, 1)
- adminsheet.Spells.Update.BackgroundTransparency = 0
- adminsheet.Spells.Update.Text = "TEACH"
- deb = false
- else
- deb = false
- end
- end
- end)
- end
- end
- local currentInstructions = {}
- local pot = sparent.PotionsEdit
- local actDeb = false
- local recipies = {
- cureForBoils = {
- "Cure for Boils",
- {
- "ADD Crushed Snake fang",
- "ADD Crushed Pungous Onion",
- "ADD Flobberworm mucus",
- "STIR",
- "ADD Ginger root",
- "STIR",
- "ADD Shrake spine",
- "STIR",
- "ADD Horned slug",
- "ADD Porcupine quill",
- "FINISH"
- }
- },
- wiggenWeld = {
- "Wiggenweld potion",
- {
- "ADD Salamander blood",
- "ADD Salamander blood",
- "ADD Salamander blood",
- "ADD Salamander blood",
- "HEAT",
- "ADD Lionfish spine",
- "ADD Lionfish spine",
- "ADD Lionfish spine",
- "ADD Lionfish spine",
- "ADD Lionfish spine",
- "HEAT",
- "ADD Lionfish spine",
- "ADD Lionfish spine",
- "ADD Lionfish spine",
- "ADD Lionfish spine",
- "ADD Lionfish spine",
- "ADD Flobberworm mucus",
- "STIR",
- "ADD Flobberworm mucus",
- "STIR",
- "ADD Honey water",
- "ADD Boom berry juice",
- "STIR",
- "FINISH"
- }
- },
- herbicideP = {
- "Herbicide potion",
- {
- "ADD Crushed Lionfish spine",
- "ADD Crushed Lionfish spine",
- "ADD Crushed Lionfish spine",
- "ADD Crushed Lionfish spine",
- "ADD Crushed Standard ingredient",
- "ADD Crushed Standard ingredient",
- "HEAT",
- "ADD Horklump juice",
- "ADD Horklump juice",
- "HEAT",
- "ADD Flobberworm mucus",
- "ADD Flobberworm mucus",
- "STIR",
- "STIR",
- "STIR",
- "STIR",
- "FINISH"
- }
- },
- girding = {
- "Girding potion",
- {
- "ADD Fairy wings",
- "HEAT",
- "ADD Doxy egg",
- "HEAT",
- "ADD Roasted Dragon thoraxe",
- "HEAT",
- "ADD Roasted Dragon thoraxe",
- "HEAT",
- "ADD Doxy egg",
- "ADD Doxy egg",
- "ADD Doxy egg",
- "ADD Dragon thoraxe",
- "HEAT",
- "ADD Flying seahorse",
- "ADD Flying seahorse",
- "ADD Flying seahorse",
- "HEAT",
- "FINISH"
- }
- },
- sleepingdra = {
- "Sleeping Draught",
- {
- "ADD Crushed Lavender",
- "ADD Crushed Lavender",
- "ADD Crushed Lavender",
- "ADD Crushed Lavender",
- "ADD Crushed Standard ingredient",
- "ADD Crushed Standard ingredient",
- "ADD Flobberworm mucus",
- "ADD Flobberworm mucus",
- "ADD Standard ingredient",
- "ADD Standard ingredient",
- "HEAT",
- "ADD Standard ingredient",
- "ADD Standard ingredient",
- "HEAT",
- "ADD Valerian sprig",
- "ADD Valerian sprig",
- "ADD Valerian sprig",
- "ADD Valerian sprig",
- "STIR",
- "STIR",
- "STIR",
- "STIR",
- "STIR",
- "STIR",
- "STIR",
- "FINISH"
- }
- },
- confcon = {
- "Confusing concoction",
- {
- "ADD Scurvy grass",
- "ADD Lovage",
- "ADD Shaken Sneezewort",
- "STIR",
- "FINISH"
- }
- },
- hairraising = {
- "Hair-Raising potion",
- {
- "ADD Rat tail",
- "ADD Sneezewort",
- "ADD Crushed Scurvy grass",
- "STIR",
- "HEAT",
- "STIR",
- "ADD Crushed Lavender",
- "STIR",
- "FINISH"
- }
- },
- forgetfulness = {
- "Forgetfulness potion",
- {
- "ADD Lethe river water",
- "ADD Lethe river water",
- "HEAT",
- "ADD Valerian sprig",
- "ADD Valerian sprig",
- "STIR",
- "STIR",
- "STIR",
- "HEAT",
- "ADD Standard ingredient",
- "ADD Standard ingredient",
- "ADD Crushed Mistletoe berry",
- "ADD Crushed Mistletoe berry",
- "STIR",
- "STIR",
- "STIR",
- "STIR",
- "STIR",
- "FINISH"
- }
- },
- swellingsol = {
- "Swelling solution",
- {
- "ADD Crushed Dried nettle",
- "ADD Crushed Dried nettle",
- "ADD Crushed Puffer-fish eye",
- "ADD Crushed Puffer-fish eye",
- "ADD Crushed Puffer-fish eye",
- "HEAT",
- "STIR",
- "ADD Bat spleen",
- "STIR",
- "STIR",
- "STIR",
- "STIR",
- "HEAT",
- "FINISH"
- }
- },
- antidote = {
- "Antidote for uncommon poisons",
- {
- "ADD Crushed Bezoar",
- "ADD Crushed Bezoar",
- "ADD Standard ingredient",
- "ADD Standard ingredient",
- "HEAT",
- "STIR",
- "ADD Unicorn horn",
- "STIR",
- "STIR",
- "ADD Mistletoe berry",
- "ADD Mistletoe berry",
- "STIR",
- "STIR",
- "FINISH"
- }
- },
- amortior = {
- "Amortentia",
- {
- "ADD Ashwinder egg",
- "ADD Rose thorn",
- "ADD Rose thorn",
- "ADD Peppermint",
- "ADD Crushed Moonstone",
- "ADD Crushed Pearl",
- "HEAT",
- "STIR",
- "FINISH"
- }
- },
- polyjuice = {
- "Polyjuice potion",
- {
- "ADD Fluxweed",
- "ADD Fluxweed",
- "ADD Fluxweed",
- "ADD Knotgrass",
- "ADD Knotgrass",
- "STIR",
- "STIR",
- "STIR",
- "STIR",
- "HEAT",
- "ADD Leech",
- "ADD Leech",
- "ADD Leech",
- "ADD Leech",
- "ADD Crushed Lacewing fly",
- "ADD Crushed Lacewing fly",
- "HEAT",
- "ADD Boomslang skin",
- "ADD Boomslang skin",
- "ADD Boomslang skin",
- "ADD Crushed Bicorn horn",
- "HEAT",
- "STIR",
- "ADD Crushed Lacewing fly",
- "STIR",
- "STIR",
- "STIR",
- "FINISH"
- }
- },
- invdraught = {
- "Invigoration draught",
- {
- "ADD Alihotsy leaf",
- "ADD Alihotsy leaf",
- "ADD Roasted Billywig leaf",
- "ADD Crushed Wormwood",
- "HEAT",
- "STIR",
- "HEAT",
- "FINISH"
- }
- },
- strengthsol = {
- "Strengthening solution",
- {
- "HEAT",
- "ADD Shaken Salamander blood",
- "ADD Shaken Salamander blood",
- "ADD Crushed Griffin claw",
- "ADD Crushed Roasted Griffin claw",
- "STIR",
- "FINISH"
- }
- },
- peacedrau = {
- "Draught of Peace",
- {
- "ADD Crushed Moonstone",
- "STIR",
- "ADD Crushed Moonstone",
- "HEAT",
- "ADD Syrup of hellebore",
- "HEAT",
- "ADD Shaken Crushed Porcupine quill",
- "STIR",
- "ADD Porcupine quill",
- "HEAT",
- "ADD Crushed Unicorn horn",
- "STIR",
- "HEAT",
- "ADD Crushed Moonstone",
- "HEAT",
- "ADD Crushed Porcupine quill",
- "HEAT",
- "FINISH"
- }
- },
- volubilis = {
- "Volubilis potion",
- {
- "HEAT",
- "ADD Honey water",
- "HEAT",
- "ADD Mint sprig",
- "HEAT",
- "ADD Mint sprig",
- "ADD Stewed mandrake",
- "ADD Syrup of hellebore",
- "HEAT",
- "HEAT",
- "FINISH"
- }
- },
- shrink = {
- "Shrinking solution",
- {
- "ADD Crushed Shrivelfig",
- "STIR",
- "HEAT",
- "ADD Crushed Daisy root",
- "ADD Crushed Daisy root",
- "ADD Crushed Daisy root",
- "ADD Crushed Daisy root",
- "ADD Caterpillar",
- "ADD Caterpillar",
- "ADD Caterpillar",
- "ADD Caterpillar",
- "ADD Shaken Wormwood",
- "STIR",
- "ADD Leech juice",
- "STIR",
- "ADD Shaken Rat spleen",
- "ADD Cowbane",
- "STIR",
- "HEAT",
- "ADD Crushed Caterpillar",
- "ADD Crushed Caterpillar",
- "ADD Crushed Caterpillar",
- "ADD Crushed Caterpillar",
- "ADD Crushed Caterpillar",
- "HEAT",
- "ADD Shaken Shrivelfig",
- "HEAT",
- "ADD Rat spleen",
- "ADD Rat spleen",
- "ADD Rat spleen",
- "ADD Rat spleen",
- "ADD Crushed Daisy root",
- "ADD Leech juice",
- "ADD Leech juice",
- "ADD Leech juice",
- "ADD Leech juice",
- "ADD Leech juice",
- "ADD Shrivelfig",
- "ADD Crushed Caterpillar",
- "HEAT",
- "FINISH"
- }
- }
- }
- function cleanList()
- local potUI = sparent.PotionsEdit
- for i, v in pairs(potUI.Ingredients:GetChildren()) do
- v:Destroy()
- end
- end
- function createBrewingList(items, colour, num)
- local i = num
- local switch = false
- local potUI = sparent.PotionsEdit
- for m = 1, #items do
- do
- local tag = script.IngredientTag:Clone()
- tag.Text = items[m].Name
- tag.TextColor3 = colour
- tag.Amount.Text = items[m].Value
- tag.Position = UDim2.new(0, 0, 0, 30 * (i - 1))
- if switch == false then
- tag.BackgroundTransparency = 0.8
- switch = true
- else
- switch = false
- end
- tag.Parent = potUI.Ingredients
- tag.MouseButton1Down:connect(function()
- if actDeb == false then
- actDeb = true
- pot.Specific.Brewing.Ingredient.Value = items[m].Name
- pot.Specific.Brewing.Item.Text = items[m].Name
- actDeb = false
- end
- end)
- potUI.Ingredients.CanvasSize = UDim2.new(0, 0, 0, 30 * i)
- i = i + 1
- end
- end
- return i
- end
- function loadBrewingList()
- actDeb = true
- cleanList()
- local potUI = sparent.PotionsEdit
- local switch = false
- local i = 1
- local relevant = {}
- for _, v in pairs(plr.PlayersData.Ingredients:GetChildren()) do
- table.insert(relevant, v)
- end
- createBrewingList(relevant, Color3.new(1, 1, 1), i)
- potUI.Visible = true
- potUI.Specific.Taking.Visible = false
- potUI.Specific.Brewing.Visible = true
- actDeb = false
- end
- function loadSpecificBrewingList(key)
- actDeb = true
- cleanList()
- local potUI = sparent.PotionsEdit
- local switch = false
- local i = 1
- local relevant = {}
- local notrelevant = {}
- for i, v in pairs(plr.PlayersData.Ingredients:GetChildren()) do
- if string.find(string.lower(v.Name), string.lower(key)) then
- print("relevant for brewing: " .. v.Name)
- table.insert(relevant, v)
- else
- table.insert(notrelevant, v)
- end
- end
- local newnum = createBrewingList(relevant, Color3.new(1, 0, 0), i)
- local secnum = createBrewingList(notrelevant, Color3.new(1, 1, 1), newnum)
- potUI.Visible = true
- potUI.Specific.Taking.Visible = false
- potUI.Specific.Brewing.Visible = true
- actDeb = false
- end
- function loadTakingList()
- actDeb = true
- cleanList()
- local potUI = sparent.PotionsEdit
- local switch = false
- local i = 1
- local relevant = {}
- for _, v in pairs(game.ReplicatedStorage.Ingredients:GetChildren()) do
- table.insert(relevant, v)
- end
- createTakingList(relevant, Color3.new(1, 1, 1), i)
- potUI.Visible = true
- potUI.Specific.Taking.Visible = true
- potUI.Specific.Brewing.Visible = false
- actDeb = false
- end
- function createTakingList(items, colour, num)
- local i = num
- local switch = false
- local potUI = sparent.PotionsEdit
- for m = 1, #items do
- if plr.PlayersData.Ingredients:findFirstChild(items[m].Name) == nil or plr.PlayersData.Ingredients:findFirstChild(items[m].Name) and plr.PlayersData.Ingredients[items[m].Name].Value ~= 10 then
- local tag = script.IngredientTag:Clone()
- tag.Text = items[m].Name
- tag.TextColor3 = colour
- tag.Position = UDim2.new(0, 0, 0, 30 * (i - 1))
- if switch == false then
- tag.BackgroundTransparency = 0.8
- switch = true
- else
- switch = false
- end
- tag.Parent = potUI.Ingredients
- tag.MouseButton1Down:connect(function()
- if actDeb == false then
- actDeb = true
- if items[m].Lock.Value ~= "None" then
- pot.Specific.Taking.Lock.Text = "You must be at LEAST a " .. items[m].Lock.Value .. " to use this ingredient!"
- else
- pot.Specific.Taking.Lock.Text = ""
- end
- if plr:GetRankInGroup(2666710) < items[m].Lock.Rank.Value then
- pot.Specific.Taking.Take.Visible = false
- else
- pot.Specific.Taking.Take.Visible = true
- end
- pot.Specific.Taking.Ingredient.Value = items[m].Name
- pot.Specific.Taking.Item.Text = items[m].Name
- actDeb = false
- end
- end)
- potUI.Ingredients.CanvasSize = UDim2.new(0, 0, 0, 30 * i)
- i = i + 1
- end
- end
- return i
- end
- function loadSpecificTakingList(key)
- actDeb = true
- cleanList()
- local potUI = sparent.PotionsEdit
- local switch = false
- local i = 1
- local relevant = {}
- local notrelevant = {}
- for i, v in pairs(game.ReplicatedStorage.Ingredients:GetChildren()) do
- if string.find(string.lower(v.Name), string.lower(key)) then
- print("relevant for taking: " .. v.Name)
- table.insert(relevant, v)
- else
- table.insert(notrelevant, v)
- end
- end
- local newnum = createTakingList(relevant, Color3.new(1, 0, 0), i)
- local secnum = createTakingList(notrelevant, Color3.new(1, 1, 1), newnum)
- potUI.Visible = true
- potUI.Specific.Taking.Visible = true
- potUI.Specific.Brewing.Visible = false
- actDeb = false
- end
- local numOfListInst = 0
- function cleanInstructions()
- for i = 1, #currentInstructions do
- table.remove(currentInstructions)
- end
- for i, v in pairs(sparent.PotionsEdit.Specific.Brewing.List:GetChildren()) do
- v:Destroy()
- end
- numOfListInst = 0
- end
- local prevstatement, copied, prevtag = "NaN", 0, nil
- function addInstruction(instr)
- table.insert(currentInstructions, instr)
- if instr ~= prevstatement then
- numOfListInst = numOfListInst + 1
- local ta = script.Progress:Clone()
- ta.Text = instr
- ta.Position = UDim2.new(0, 0, 0, 20 * (numOfListInst - 1))
- sparent.PotionsEdit.Specific.Brewing.List.CanvasSize = UDim2.new(0, 0, 0, 20 * numOfListInst)
- ta.Parent = sparent.PotionsEdit.Specific.Brewing.List
- prevstatement = instr
- copied = 1
- prevtag = ta
- elseif instr == prevstatement then
- copied = copied + 1
- prevtag.Text = "[x" .. copied .. "]" .. " " .. instr
- end
- end
- function findPotion()
- for i, z in pairs(recipies) do
- local v = z[2]
- if #v == #currentInstructions then
- local correct = true
- for i = 1, #v do
- print(v[i] .. "/" .. currentInstructions[i])
- if v[i] ~= currentInstructions[i] then
- print("ERROR: " .. v[i] .. "/" .. currentInstructions[i])
- correct = false
- break
- end
- end
- if correct == true then
- return "Successfully made " .. z[1]
- end
- else
- print("not same length: " .. #v .. "/" .. #currentInstructions)
- end
- end
- return "Potion failed!"
- end
- pot.Specific.Taking.Take.MouseButton1Down:connect(function()
- if pot.Specific.Taking.Ingredient.Value ~= "NaN" and actDeb == false and plr:GetRankInGroup(2666710) >= game.ReplicatedStorage.Ingredients[pot.Specific.Taking.Ingredient.Value].Lock.Rank.Value then
- local amount = 1
- if pot.Specific.Taking.Amount.Text ~= nil then
- amount = tonumber(pot.Specific.Taking.Amount.Text)
- end
- if amount > 10 then
- amount = 10
- elseif amount < 1 then
- amount = 1
- end
- local takeIngredients = game.ReplicatedStorage.Database.RequestData:InvokeServer("IncreaseIngredient", {
- pot.Specific.Taking.Ingredient.Value,
- amount
- })
- pot.Specific.Taking.Info.Text = takeIngredients
- wait(0.2)
- actDeb = false
- end
- end)
- pot.Specific.Brewing.Stir.MouseButton1Down:connect(function()
- if actDeb == false and pot.Specific.Brewing.Ingredient.Value ~= "NaN" then
- actDeb = true
- addInstruction("STIR")
- pot.Specific.Brewing.Info.Text = "Stirred cauldron."
- wait()
- actDeb = false
- end
- end)
- pot.Specific.Brewing.Crush.MouseButton1Down:connect(function()
- if actDeb == false and pot.Specific.Brewing.Ingredient.Value ~= "NaN" then
- actDeb = true
- if string.find(pot.Specific.Brewing.Ingredient.Value, "Crushed") == nil then
- local crushIngredient = game.ReplicatedStorage.Database.RequestData:InvokeServer("AlterIngredient", {
- pot.Specific.Brewing.Ingredient.Value,
- "Crushed"
- })
- if crushIngredient == "Done" then
- pot.Specific.Brewing.Info.Text = "Crushed " .. pot.Specific.Brewing.Ingredient.Value
- loadBrewingList()
- end
- wait()
- actDeb = false
- else
- pot.Specific.Brewing.Info.Text = pot.Specific.Brewing.Ingredient.Value .. " has already been crushed!"
- actDeb = false
- end
- end
- end)
- pot.Specific.Brewing.Shake.MouseButton1Down:connect(function()
- if actDeb == false and pot.Specific.Brewing.Ingredient.Value ~= "NaN" then
- actDeb = true
- if string.find(pot.Specific.Brewing.Ingredient.Value, "Shaken") == nil then
- local crushIngredient = game.ReplicatedStorage.Database.RequestData:InvokeServer("AlterIngredient", {
- pot.Specific.Brewing.Ingredient.Value,
- "Shaken"
- })
- if crushIngredient == "Done" then
- pot.Specific.Brewing.Info.Text = "Shook " .. pot.Specific.Brewing.Ingredient.Value
- loadBrewingList()
- end
- wait()
- actDeb = false
- else
- pot.Specific.Brewing.Info.Text = pot.Specific.Brewing.Ingredient.Value .. " has already been shaken!"
- actDeb = false
- end
- end
- end)
- pot.Specific.Brewing.Roast.MouseButton1Down:connect(function()
- if actDeb == false and pot.Specific.Brewing.Ingredient.Value ~= "NaN" then
- actDeb = true
- if string.find(pot.Specific.Brewing.Ingredient.Value, "Roasted") == nil then
- local crushIngredient = game.ReplicatedStorage.Database.RequestData:InvokeServer("AlterIngredient", {
- pot.Specific.Brewing.Ingredient.Value,
- "Roasted"
- })
- if crushIngredient == "Done" then
- pot.Specific.Brewing.Info.Text = "Roasted " .. pot.Specific.Brewing.Ingredient.Value
- loadBrewingList()
- end
- wait()
- actDeb = false
- else
- pot.Specific.Brewing.Info.Text = pot.Specific.Brewing.Ingredient.Value .. " has already been roasted!"
- actDeb = false
- end
- end
- end)
- pot.Specific.Brewing.Add.MouseButton1Down:connect(function()
- if actDeb == false and pot.Specific.Brewing.Ingredient.Value ~= "NaN" then
- actDeb = true
- addInstruction("ADD " .. pot.Specific.Brewing.Ingredient.Value)
- local reduceIngredient = game.ReplicatedStorage.Database.RequestData:InvokeServer("ReduceIngredient", {
- pot.Specific.Brewing.Ingredient.Value
- })
- if reduceIngredient == "Done" then
- pot.Specific.Brewing.Info.Text = "Added " .. pot.Specific.Brewing.Ingredient.Value
- loadBrewingList()
- end
- wait(0.2)
- actDeb = false
- end
- end)
- pot.Specific.Brewing.Heat.MouseButton1Down:connect(function()
- if actDeb == false and pot.Specific.Brewing.Ingredient.Value ~= "NaN" then
- actDeb = true
- addInstruction("HEAT")
- pot.Specific.Brewing.Info.Text = "Applied heat."
- wait()
- actDeb = false
- end
- end)
- pot.Specific.Brewing.Finish.MouseButton1Down:connect(function()
- if actDeb == false and pot.Specific.Brewing.Ingredient.Value ~= "NaN" then
- actDeb = true
- addInstruction("FINISH")
- pot.Specific.Brewing.Info.Text = "..Brewing potion.."
- local answer = findPotion()
- pot.Specific.Brewing.Info.Text = answer
- wait(6)
- sparent.PotionsEdit.Visible = false
- local unclaim = game.ReplicatedStorage.Database.RequestData:InvokeServer("UnClaimCauldron", {})
- cleanInstructions()
- pot.Specific.Brewing.Info.Text = " "
- actDeb = false
- end
- end)
- pot.Specific.Brewing.Cancel.MouseButton1Down:connect(function()
- if actDeb == false then
- actDeb = true
- pot.Specific.Brewing.Info.Text = "..Cancelling and exiting.."
- local unclaim = game.ReplicatedStorage.Database.RequestData:InvokeServer("UnClaimCauldron", {})
- cleanInstructions()
- pot.Specific.Brewing.Info.Text = " "
- pot.Visible = false
- actDeb = false
- end
- end)
- pot.Search.FocusLost:connect(function(enterPressed)
- print(enterPressed)
- if enterPressed and actDeb == false then
- actDeb = true
- if pot.Specific.Brewing.Visible == true then
- print("brewing")
- loadSpecificBrewingList(pot.Search.Text)
- else
- print("taking")
- loadSpecificTakingList(pot.Search.Text)
- end
- end
- end)
- local mouse = plr:GetMouse()
- mouse.Button1Down:connect(function()
- local targ = mouse.Target
- if game.Workspace:FindFirstChild("Potions") then
- if targ and targ.Parent.Name == "Cauldron" and targ.Parent.Settings.User.Value == "NaN" and plr.PlayersData.Interactive.Value == nil and plr.Character and plr.Character.Humanoid.Health > 0 and (getTorso(plr.Character).Position - targ.Position).magnitude <= 10 then
- local claim = game.ReplicatedStorage.Database.RequestData:InvokeServer("ClaimCauldron", {
- targ.Parent.Settings.Number.Value
- })
- if claim == true then
- loadBrewingList()
- end
- elseif targ and targ.Parent.Name == "Cauldron" and targ.Parent == plr.PlayersData.Interactive.Value then
- loadBrewingList()
- else
- sparent.PotionsEdit.Visible = false
- end
- if targ and targ.Parent.Name == "IngredientsShelf" then
- loadTakingList()
- end
- end
- end)
- local count = 0
- function checkLock(item)
- if item:findFirstChild("Lock") then
- for i, v in pairs(item.Lock:GetChildren()) do
- if v.Name == "Group" and plr:GetRankInGroup(v.MaxValue) >= v.MinValue or plr.userId <= 0 then
- return true
- elseif v.Name == "UserId" and plr.userId == v.Value then
- return true
- end
- end
- return false
- else
- return true
- end
- end
- for i, v in pairs(script.ToolItems:GetChildren()) do
- if checkLock(v) then
- local tag = v:Clone()
- tag.Parent = sparent.ToolList
- tag.Position = UDim2.new(0, 0, 0, 55 * count)
- count = count + 1
- sparent.ToolList.Position = UDim2.new(0, 3, 0.5, -(55 * count / 2))
- sparent.ToolList.Size = UDim2.new(0, 0, 0, 55 * count)
- end
- end
- local types = {
- ALL = {
- "ALL",
- Color3.new(1, 1, 1),
- 0
- },
- MISC = {
- "MISC",
- Color3.new(1, 1, 1),
- 0
- },
- DADA = {
- "DADA",
- Color3.new(0, 0, 0),
- 0
- },
- TRANSFIG = {
- "TRANSFIG",
- Color3.new(0, 0, 1),
- 0
- },
- TRAVEL = {
- "TRAVEL",
- Color3.new(1, 1, 0),
- 0
- },
- CHARMS = {
- "CHARMS",
- Color3.new(0, 1, 0),
- 0
- }
- }
- if sparent.ToolList:FindFirstChild("Conjuration") then
- do
- local currentVis
- local wholeUi = sparent.Conjuration
- local uiButton = sparent.ToolList.Conjuration
- uiButton.MouseButton1Down:connect(function()
- if wholeUi.Visible == true then
- wholeUi.Visible = false
- elseif wholeUi.Visible == false and plr.Tools.Item.Value == nil then
- wholeUi.Visible = true
- end
- end)
- local count = 0
- local selecDeb = false
- function makeTab(item, list, count)
- local tag = script.Button:Clone()
- tag.Text = item.Name
- tag.Position = UDim2.new(0, 0, 0, 30 * count)
- tag.MouseButton1Down:connect(function()
- if selecDeb == false then
- selecDeb = true
- local claim = game.ReplicatedStorage.Database.RequestData:InvokeServer("selectItem", {
- item.Name
- })
- wholeUi.Visible = false
- selecDeb = false
- end
- end)
- tag.Parent = list
- list.CanvasSize = UDim2.new(0, 0, 0, 30 * (count + 1))
- return count + 1
- end
- local amnt = 0
- for i, v in pairs(types) do
- do
- local lis = script.List:Clone()
- lis.Name = i
- lis.Parent = sparent.Conjuration
- local tab = script.Tab:Clone()
- tab.Text = i
- tab.TextColor3 = v[2]
- tab.Position = UDim2.new(0, 0, 0, 32 * amnt)
- tab.Parent = sparent.Conjuration.Tabs
- tab.MouseButton1Down:connect(function()
- if currentVis ~= nil then
- currentVis.Visible = false
- end
- currentVis = lis
- lis.Visible = true
- end)
- for _, m in pairs(game.ReplicatedStorage.TeacherTools:GetChildren()) do
- if (m.Type.Value == i or i == "ALL") and checkLock(m) then
- v[3] = makeTab(m, lis, v[3])
- end
- end
- amnt = amnt + 1
- sparent.Conjuration.Tabs.CanvasSize = UDim2.new(0, 0, 0, 32 * amnt)
- end
- end
- end
- end
- if sparent.ToolList:FindFirstChild("Uniform") then
- do
- local wholeUi = sparent.Uniform
- local uiButton = sparent.ToolList.Uniform
- local slytherin = {
- Slytherin = {455190570, 455189929},
- ["Slytherin Boys Sweater"] = {455426609, 455190422},
- ["Slytherin Girls"] = {452436959, 455190106},
- ["Slytherin Unisex 2"] = {455190570, 455190222},
- ["Slytherin Winter"] = {455190570, 455190001}
- }
- local gryffindor = {
- Gryffindor = {455187228, 455187031},
- ["Gryffindor Boys Sweater"] = {455426609, 455187589},
- ["Gryffindor Girls"] = {452436278, 4455187393},
- ["Gryffindor Tie"] = {455187228, 455187604},
- ["Gryffindor Winter"] = {455187228, 455187330}
- }
- local hufflepuff = {
- Hufflepuff = {455187996, 455187955},
- ["Hufflepuff Boys Sweater"] = {455426609, 455188127},
- ["Hufflepuff Girls"] = {452438019, 455188847},
- ["Hufflepuff Tie"] = {455187996, 455187780},
- ["Hufflepuff Winter"] = {455187996, 455187935}
- }
- local ravenclaw = {
- Ravenclaw = {455189747, 455189292},
- ["Ravenclaw Boys Sweater"] = {455426609, 455189687},
- ["Ravenclaw Girls"] = {452437394, 455189511},
- ["Ravenclaw Tie"] = {455189747, 455189546},
- ["Ravenclaw Winter"] = {455189747, 455189402}
- }
- local sorting = {
- Sorting = {159220375, 159220336}
- }
- local remEvent = game:GetService("ReplicatedStorage"):WaitForChild("WearUniform")
- local deb = false
- local count = 0
- function addToList(list, colour)
- for i, v in pairs(list) do
- do
- local tag = script.Button:Clone()
- tag.Text = i
- tag.Position = UDim2.new(0, 0, 0, 30 * count)
- tag.TextColor3 = colour
- tag.MouseButton1Down:connect(function()
- if deb == false then
- deb = true
- remEvent:FireServer(v[2], v[1])
- wait()
- deb = false
- end
- end)
- tag.Parent = wholeUi.List
- count = count + 1
- wholeUi.List.CanvasSize = UDim2.new(0, 0, 0, 30 * count)
- end
- end
- end
- addToList(sorting, Color3.new(1, 1, 1))
- addToList(slytherin, Color3.new(0, 1, 0))
- addToList(ravenclaw, Color3.new(0, 0, 1))
- addToList(gryffindor, Color3.new(1, 0, 0))
- addToList(hufflepuff, Color3.new(1, 1, 0))
- uiButton.MouseButton1Down:connect(function()
- if wholeUi.Visible == true then
- wholeUi.Visible = false
- else
- wholeUi.Visible = true
- end
- end)
- end
- end
- local ctl = sparent.Parent:WaitForChild("ControlGui", 10)
- if ctl then
- ctl.Enabled = false
- end
- sparent.Parent.ChildAdded:Connect(function(item)
- if item.Name == "ControlGui" then
- item.Enabled = false
- end
- end)
- function findRankImgColor(lvl)
- local img
- local color = Color3.new(1, 1, 1)
- if lvl >= 100 then
- img = "rbxassetid://2249296883"
- color = Color3.fromRGB(228, 228, 255)
- elseif lvl >= 90 then
- img = "rbxassetid://2249297055"
- color = Color3.fromRGB(237, 233, 255)
- elseif lvl >= 80 then
- img = "rbxassetid://2249296408"
- color = Color3.fromRGB(233, 220, 240)
- elseif lvl >= 70 then
- img = "rbxassetid://2249296151"
- color = Color3.fromRGB(247, 233, 255)
- elseif lvl >= 60 then
- img = "rbxassetid://2244664627"
- color = Color3.fromRGB(201, 238, 255)
- elseif lvl >= 50 then
- img = "rbxassetid://2244664753"
- color = Color3.fromRGB(255, 253, 170)
- elseif lvl >= 40 then
- img = "rbxassetid://2244649797"
- color = Color3.fromRGB(255, 253, 170)
- elseif lvl >= 30 then
- img = "rbxassetid://2244649649"
- color = Color3.fromRGB(201, 238, 255)
- elseif lvl >= 20 then
- img = "rbxassetid://2244649500"
- color = Color3.fromRGB(255, 170, 127)
- elseif lvl >= 10 then
- img = "rbxassetid://2244649367"
- color = Color3.fromRGB(180, 180, 180)
- else
- img = "rbxassetid://2244649207"
- color = Color3.fromRGB(255, 255, 255)
- end
- return img, color
- end
- function setRankIcon(lvl, xp)
- local rankimg = sparent.Rank
- local img, color = findRankImgColor(lvl)
- rankimg.Image = img
- rankimg.ImageColor3 = color
- local tot = 250 / (lvl * 100)
- sparent.XP.Bar.Size = UDim2.new(0, tot * xp, 0, 15)
- end
- local Database = game.ReplicatedStorage.Database
- local LocalPlayer = game.Players.LocalPlayer
- Editting = false
- repeat
- wait()
- until LocalPlayer.Character and LocalPlayer:FindFirstChild("Communication")
- LocalPlayer.Communication.OnClientEvent:connect(function(MODE, TABLE)
- if MODE == "Update" and TABLE[1] == "RANK" then
- sparent.Level.Lvl.Text = TABLE[2]
- sparent.XP.XP.Text = TABLE[3] .. "/" .. tonumber(TABLE[2]) * 100
- setRankIcon(tonumber(TABLE[2]), tonumber(TABLE[3]))
- end
- end)
- function updateInfo(targ)
- local tableOfInfo = game.ReplicatedStorage.Database.RequestData:InvokeServer("PlayersData", {
- game.Players.LocalPlayer.userId
- })
- wait()
- sparent.Level.Lvl.Text = tableOfInfo.Level
- sparent.XP.XP.Text = tableOfInfo.XP .. "/" .. tonumber(tableOfInfo.Level) * 100
- setRankIcon(tonumber(tableOfInfo.Level), tonumber(tableOfInfo.XP))
- end
- function onCharacter(targ)
- if targ then
- for i, v in pairs(game.Players:GetChildren()) do
- if targ:IsDescendantOf(v.Character) then
- return v
- end
- end
- end
- return false
- end
- function createBadge(img, count)
- local badg2 = sparent.Rank:Clone()
- badg2.Parent = sparent.Profile.Badges
- badg2.Position = UDim2.new(0, 50 * count, 0, 0)
- badg2.ImageColor3 = Color3.new(1, 1, 1)
- badg2.Image = img
- badg2.ZIndex = 5
- end
- function isLegendary(plr)
- local legendaryPlayers = {
- 16149489,
- 30015961,
- 24546863,
- 4788944,
- 170267547,
- 56431538,
- 21924474
- }
- for i = 1, #legendaryPlayers do
- if legendaryPlayers[i] == plr.userId then
- return true
- end
- end
- return false
- end
- function setBadges(plr, lvl)
- for i, v in pairs(sparent.Profile.Badges:GetChildren()) do
- v:Destroy()
- end
- local count = 0
- local badg = sparent.Rank:Clone()
- badg.Parent = sparent.Profile.Badges
- badg.ZIndex = 5
- badg.Position = UDim2.new(0, 0, 0, 0)
- local img, clr = findRankImgColor(lvl)
- badg.ImageColor3 = clr
- badg.Image = img
- count = count + 1
- if plr:GetRankInGroup(3026989) >= 252 then
- createBadge("rbxassetid://2248918423", count)
- count = count + 1
- elseif plr:GetRankInGroup(3026989) >= 251 then
- createBadge("rbxassetid://2248918091", count)
- count = count + 1
- elseif plr:GetRankInGroup(3026989) >= 250 then
- createBadge("rbxassetid://2248917627", count)
- count = count + 1
- end
- if isLegendary(plr) then
- createBadge("rbxassetid://2248032160", count)
- count = count + 1
- end
- if plr.userId == 30015961 then
- createBadge("rbxassetid://2248919868", count)
- count = count + 1
- end
- if plr.userId == 583324466 then
- createBadge("rbxassetid://2252471905", count)
- count = count + 1
- end
- sparent.Profile.RIM.ImageColor3 = clr
- if lvl >= 50 then
- sparent.Profile.RIM.Image = "rbxassetid://2247214397"
- else
- sparent.Profile.RIM.Image = "rbxassetid://2247214222"
- end
- end
- local mouse = LocalPlayer:GetMouse()
- local profOpen = false
- local UserInput = game:GetService("UserInputService")
- local function KeyUp(Input, Process)
- if not Process and Input.UserInputType == Enum.UserInputType.Keyboard then
- local pl = onCharacter(mouse.Target)
- if Input.KeyCode == Enum.KeyCode.F and pl ~= false and profOpen == false and pl:findFirstChild("Communication") then
- local plrLvl = game.ReplicatedStorage.Database.RequestData:InvokeServer("PlayersLevel", {pl})
- sparent.Profile.plrsName.Text = pl.Name
- sparent.Profile.plrsID.Text = pl.PlayersData.Forename.Value .. " " .. pl.PlayersData.Surname.Value
- sparent.Profile.Player.Image = "https://www.roblox.com/headshot-thumbnail/image?userId=" .. pl.userId .. "&width=420&height=420&format=png"
- sparent.Profile.Level.Text = plrLvl
- setBadges(pl, tonumber(plrLvl))
- sparent.Profile.Visible = true
- profOpen = true
- elseif Input.KeyCode == Enum.KeyCode.F and profOpen == true then
- sparent.Profile.Visible = false
- profOpen = false
- end
- end
- end
- UserInput.InputBegan:connect(KeyUp)
- sparent.Level.Lvl.MouseButton1Down:Connect(function()
- if profOpen == false then
- sparent.Profile.plrsName.Text = LocalPlayer.Name
- sparent.Profile.plrsID.Text = plrd.Forename.Value .. " " .. plrd.Surname.Value
- sparent.Profile.Player.Image = "https://www.roblox.com/headshot-thumbnail/image?userId=" .. LocalPlayer.userId .. "&width=420&height=420&format=png"
- sparent.Profile.Level.Text = sparent.Level.Lvl.Text
- setBadges(LocalPlayer, tonumber(sparent.Level.Lvl.Text))
- sparent.Profile.Visible = true
- profOpen = true
- else
- sparent.Profile.Visible = false
- profOpen = false
- end
- end)
- local currimg = script.F
- local RunService = game:GetService("RunService")
- local function onRenderStep()
- local pl = onCharacter(mouse.Target)
- if pl ~= false then
- currimg.Adornee = pl.Character.HumanoidRootPart
- currimg.Enabled = true
- elseif pl == false and currimg.Enabled == true then
- currimg.Enabled = false
- end
- end
- RunService.RenderStepped:connect(onRenderStep)
- updateInfo(LocalPlayer.Name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement