Advertisement
Guest User

Untitled

a guest
Nov 20th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.66 KB | None | 0 0
  1. --SynapseX Decompiler
  2.  
  3. function getTorso(chr)
  4. if chr.Humanoid.RigType == Enum.HumanoidRigType.R15 and chr:findFirstChild("UpperTorso") then
  5. return chr.UpperTorso
  6. elseif chr.Humanoid.RigType == Enum.HumanoidRigType.R6 and chr:findFirstChild("Torso") then
  7. return chr.Torso
  8. end
  9. end
  10. local plr = game.Players.LocalPlayer
  11. repeat
  12. wait()
  13. until plr:findFirstChild("Current")
  14. local sparent = script.Parent
  15. sparent.Base.Visible = true
  16. local amount = plr.Current.Amount
  17. local imageCap = sparent.ImageCap
  18. script.Parent = nil
  19. repeat
  20. local perc = 175 / amount.MaxValue
  21. imageCap.Size = UDim2.new(0, perc * amount.Value, 0, 100)
  22. sparent.Current.Text = plr.Current.Value
  23. wait()
  24. until amount.Value == amount.MaxValue
  25. imageCap.Size = UDim2.new(0, 175, 0, 100)
  26. sparent.Current.Text = "BRAY Industries"
  27. wait(2)
  28. imageCap.Glow.Visible = true
  29. imageCap.ImageTop.Visible = false
  30. wait(5)
  31. for i = 1, 10 do
  32. imageCap.Glow.ImageTransparency = imageCap.Glow.ImageTransparency + 1
  33. sparent.Base.ImageTransparency = sparent.Base.ImageTransparency + 1
  34. sparent.Current.TextTransparency = sparent.Current.TextTransparency + 1
  35. sparent.Current.TextStrokeTransparency = sparent.Current.TextStrokeTransparency + 0.02 * i
  36. wait()
  37. end
  38. repeat
  39. wait()
  40. until plr:findFirstChild("PlayersData")
  41. local plrd = plr.PlayersData
  42. sparent.RP.rpName.Text = plrd.Forename.Value .. " " .. plrd.Surname.Value
  43. plrd.Forename.Changed:connect(function()
  44. sparent.RP.rpName.Text = plrd.Forename.Value .. " " .. plrd.Surname.Value
  45. end)
  46. plrd.Surname.Changed:connect(function()
  47. sparent.RP.rpName.Text = plrd.Forename.Value .. " " .. plrd.Surname.Value
  48. end)
  49. if plr:GetRankInGroup(2666710) >= 4 and plrd.Forename.Value == "Unknown" and game.ReplicatedStorage:FindFirstChild("Settings") and game.ReplicatedStorage.Settings.Application.Value == false then
  50. do
  51. local fna, sna = false, false
  52. local deb = false
  53. local sheet = sparent.NameSelection
  54. sheet.Forename.Changed:connect(function()
  55. if sheet.Forename.Text ~= "Insert text here" then
  56. fna = true
  57. if fna and sna then
  58. sheet.Submit.Visible = true
  59. end
  60. end
  61. end)
  62. sheet.Surname.Changed:connect(function()
  63. if sheet.Surname.Text ~= "Insert text here" then
  64. sna = true
  65. if fna and sna then
  66. sheet.Submit.Visible = true
  67. end
  68. end
  69. end)
  70. sheet.Submit.MouseButton1Down:connect(function()
  71. if deb == false then
  72. deb = true
  73. sheet.Visible = false
  74. local sendOff = game.ReplicatedStorage.Database.RequestData:InvokeServer("Update_Name", {
  75. sheet.Forename.Text,
  76. sheet.Surname.Text
  77. })
  78. end
  79. end)
  80. sheet.Visible = true
  81. end
  82. end
  83. local isAdmin = game.ReplicatedStorage.Database.RequestData:InvokeServer("RankInGroup", {2666710, 14})
  84. if isAdmin then
  85. do
  86. local adminsheet = sparent.AdminProfile
  87. local deb = false
  88. function setHouse(house)
  89. plr.PlayerGui.BasicUI.AdminProfile.Profile.House.Value = house
  90. for i, v in pairs(plr.PlayerGui.BasicUI.AdminProfile.Profile.Houses:GetChildren()) do
  91. if v.Name == house then
  92. v.ImageColor3 = Color3.new(1, 1, 1)
  93. v.ImageTransparency = 0
  94. else
  95. v.ImageTransparency = 0.5
  96. v.ImageColor3 = Color3.new(0.2196078431372549, 0.2196078431372549, 0.2196078431372549)
  97. end
  98. end
  99. end
  100. for i, v in pairs(adminsheet.Profile.Houses:GetChildren()) do
  101. v.MouseButton1Down:connect(function()
  102. if adminsheet.Profile.House.Value ~= v.Name then
  103. adminsheet.Profile.House.Value = v.Name
  104. setHouse(v.Name)
  105. end
  106. end)
  107. end
  108. adminsheet.Profile.Update.MouseButton1Down:connect(function()
  109. 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
  110. deb = true
  111. adminsheet.Profile.Update.BackgroundTransparency = 1
  112. adminsheet.Profile.Update.Text = "..UPDATING.."
  113. local updateHouse = game.ReplicatedStorage.Database.RequestData:InvokeServer("Update_House", {
  114. adminsheet.Profile.playersID.Value,
  115. adminsheet.Profile.House.Value,
  116. adminsheet.Profile.playersName.Value
  117. })
  118. if updateHouse then
  119. adminsheet.Profile.Update.TextColor3 = Color3.new(0, 1, 0)
  120. adminsheet.Profile.Update.Text = "SUCCESS!"
  121. else
  122. adminsheet.Profile.Update.TextColor3 = Color3.new(1, 0, 0)
  123. adminsheet.Profile.Update.Text = "!ERROR!"
  124. end
  125. wait(4)
  126. adminsheet.Profile.Update.TextColor3 = Color3.new(1, 0, 0)
  127. for i = 1, 30 do
  128. adminsheet.Profile.Update.Text = 30 - i
  129. wait(1)
  130. end
  131. adminsheet.Profile.Update.TextColor3 = Color3.new(1, 1, 1)
  132. adminsheet.Profile.Update.BackgroundTransparency = 0
  133. adminsheet.Profile.Update.Text = "UPDATE"
  134. deb = false
  135. end
  136. end)
  137. adminsheet.Spells.Update.MouseButton1Down:connect(function()
  138. if deb == false then
  139. deb = true
  140. local spells = {}
  141. for i, v in pairs(adminsheet.Spells.Spells:GetChildren()) do
  142. if v.Teach.Value == true then
  143. table.insert(spells, v.Text)
  144. end
  145. end
  146. if #spells ~= 0 then
  147. local updateSpells = game.ReplicatedStorage.Database.RequestData:InvokeServer("Update_Spells", {
  148. adminsheet.Spells.playersID.Value,
  149. spells,
  150. adminsheet.Spells.playersName.Value
  151. })
  152. adminsheet.Spells.Update.BackgroundTransparency = 1
  153. adminsheet.Spells.Update.Text = "..UPDATING.."
  154. if updateSpells then
  155. adminsheet.Spells.Update.TextColor3 = Color3.new(0, 1, 0)
  156. adminsheet.Spells.Update.Text = "SUCCESS!"
  157. else
  158. adminsheet.Spells.Update.TextColor3 = Color3.new(1, 0, 0)
  159. adminsheet.Spells.Update.Text = "!ERROR!"
  160. end
  161. adminsheet.Spells.Update.TextColor3 = Color3.new(1, 0, 0)
  162. for i = 1, 5 do
  163. adminsheet.Spells.Update.Text = 5 - i
  164. wait(1)
  165. end
  166. adminsheet.Visible = false
  167. adminsheet.Spells.Update.TextColor3 = Color3.new(1, 1, 1)
  168. adminsheet.Spells.Update.BackgroundTransparency = 0
  169. adminsheet.Spells.Update.Text = "TEACH"
  170. deb = false
  171. else
  172. deb = false
  173. end
  174. end
  175. end)
  176. end
  177. end
  178. local currentInstructions = {}
  179. local pot = sparent.PotionsEdit
  180. local actDeb = false
  181. local recipies = {
  182. cureForBoils = {
  183. "Cure for Boils",
  184. {
  185. "ADD Crushed Snake fang",
  186. "ADD Crushed Pungous Onion",
  187. "ADD Flobberworm mucus",
  188. "STIR",
  189. "ADD Ginger root",
  190. "STIR",
  191. "ADD Shrake spine",
  192. "STIR",
  193. "ADD Horned slug",
  194. "ADD Porcupine quill",
  195. "FINISH"
  196. }
  197. },
  198. wiggenWeld = {
  199. "Wiggenweld potion",
  200. {
  201. "ADD Salamander blood",
  202. "ADD Salamander blood",
  203. "ADD Salamander blood",
  204. "ADD Salamander blood",
  205. "HEAT",
  206. "ADD Lionfish spine",
  207. "ADD Lionfish spine",
  208. "ADD Lionfish spine",
  209. "ADD Lionfish spine",
  210. "ADD Lionfish spine",
  211. "HEAT",
  212. "ADD Lionfish spine",
  213. "ADD Lionfish spine",
  214. "ADD Lionfish spine",
  215. "ADD Lionfish spine",
  216. "ADD Lionfish spine",
  217. "ADD Flobberworm mucus",
  218. "STIR",
  219. "ADD Flobberworm mucus",
  220. "STIR",
  221. "ADD Honey water",
  222. "ADD Boom berry juice",
  223. "STIR",
  224. "FINISH"
  225. }
  226. },
  227. herbicideP = {
  228. "Herbicide potion",
  229. {
  230. "ADD Crushed Lionfish spine",
  231. "ADD Crushed Lionfish spine",
  232. "ADD Crushed Lionfish spine",
  233. "ADD Crushed Lionfish spine",
  234. "ADD Crushed Standard ingredient",
  235. "ADD Crushed Standard ingredient",
  236. "HEAT",
  237. "ADD Horklump juice",
  238. "ADD Horklump juice",
  239. "HEAT",
  240. "ADD Flobberworm mucus",
  241. "ADD Flobberworm mucus",
  242. "STIR",
  243. "STIR",
  244. "STIR",
  245. "STIR",
  246. "FINISH"
  247. }
  248. },
  249. girding = {
  250. "Girding potion",
  251. {
  252. "ADD Fairy wings",
  253. "HEAT",
  254. "ADD Doxy egg",
  255. "HEAT",
  256. "ADD Roasted Dragon thoraxe",
  257. "HEAT",
  258. "ADD Roasted Dragon thoraxe",
  259. "HEAT",
  260. "ADD Doxy egg",
  261. "ADD Doxy egg",
  262. "ADD Doxy egg",
  263. "ADD Dragon thoraxe",
  264. "HEAT",
  265. "ADD Flying seahorse",
  266. "ADD Flying seahorse",
  267. "ADD Flying seahorse",
  268. "HEAT",
  269. "FINISH"
  270. }
  271. },
  272. sleepingdra = {
  273. "Sleeping Draught",
  274. {
  275. "ADD Crushed Lavender",
  276. "ADD Crushed Lavender",
  277. "ADD Crushed Lavender",
  278. "ADD Crushed Lavender",
  279. "ADD Crushed Standard ingredient",
  280. "ADD Crushed Standard ingredient",
  281. "ADD Flobberworm mucus",
  282. "ADD Flobberworm mucus",
  283. "ADD Standard ingredient",
  284. "ADD Standard ingredient",
  285. "HEAT",
  286. "ADD Standard ingredient",
  287. "ADD Standard ingredient",
  288. "HEAT",
  289. "ADD Valerian sprig",
  290. "ADD Valerian sprig",
  291. "ADD Valerian sprig",
  292. "ADD Valerian sprig",
  293. "STIR",
  294. "STIR",
  295. "STIR",
  296. "STIR",
  297. "STIR",
  298. "STIR",
  299. "STIR",
  300. "FINISH"
  301. }
  302. },
  303. confcon = {
  304. "Confusing concoction",
  305. {
  306. "ADD Scurvy grass",
  307. "ADD Lovage",
  308. "ADD Shaken Sneezewort",
  309. "STIR",
  310. "FINISH"
  311. }
  312. },
  313. hairraising = {
  314. "Hair-Raising potion",
  315. {
  316. "ADD Rat tail",
  317. "ADD Sneezewort",
  318. "ADD Crushed Scurvy grass",
  319. "STIR",
  320. "HEAT",
  321. "STIR",
  322. "ADD Crushed Lavender",
  323. "STIR",
  324. "FINISH"
  325. }
  326. },
  327. forgetfulness = {
  328. "Forgetfulness potion",
  329. {
  330. "ADD Lethe river water",
  331. "ADD Lethe river water",
  332. "HEAT",
  333. "ADD Valerian sprig",
  334. "ADD Valerian sprig",
  335. "STIR",
  336. "STIR",
  337. "STIR",
  338. "HEAT",
  339. "ADD Standard ingredient",
  340. "ADD Standard ingredient",
  341. "ADD Crushed Mistletoe berry",
  342. "ADD Crushed Mistletoe berry",
  343. "STIR",
  344. "STIR",
  345. "STIR",
  346. "STIR",
  347. "STIR",
  348. "FINISH"
  349. }
  350. },
  351. swellingsol = {
  352. "Swelling solution",
  353. {
  354. "ADD Crushed Dried nettle",
  355. "ADD Crushed Dried nettle",
  356. "ADD Crushed Puffer-fish eye",
  357. "ADD Crushed Puffer-fish eye",
  358. "ADD Crushed Puffer-fish eye",
  359. "HEAT",
  360. "STIR",
  361. "ADD Bat spleen",
  362. "STIR",
  363. "STIR",
  364. "STIR",
  365. "STIR",
  366. "HEAT",
  367. "FINISH"
  368. }
  369. },
  370. antidote = {
  371. "Antidote for uncommon poisons",
  372. {
  373. "ADD Crushed Bezoar",
  374. "ADD Crushed Bezoar",
  375. "ADD Standard ingredient",
  376. "ADD Standard ingredient",
  377. "HEAT",
  378. "STIR",
  379. "ADD Unicorn horn",
  380. "STIR",
  381. "STIR",
  382. "ADD Mistletoe berry",
  383. "ADD Mistletoe berry",
  384. "STIR",
  385. "STIR",
  386. "FINISH"
  387. }
  388. },
  389. amortior = {
  390. "Amortentia",
  391. {
  392. "ADD Ashwinder egg",
  393. "ADD Rose thorn",
  394. "ADD Rose thorn",
  395. "ADD Peppermint",
  396. "ADD Crushed Moonstone",
  397. "ADD Crushed Pearl",
  398. "HEAT",
  399. "STIR",
  400. "FINISH"
  401. }
  402. },
  403. polyjuice = {
  404. "Polyjuice potion",
  405. {
  406. "ADD Fluxweed",
  407. "ADD Fluxweed",
  408. "ADD Fluxweed",
  409. "ADD Knotgrass",
  410. "ADD Knotgrass",
  411. "STIR",
  412. "STIR",
  413. "STIR",
  414. "STIR",
  415. "HEAT",
  416. "ADD Leech",
  417. "ADD Leech",
  418. "ADD Leech",
  419. "ADD Leech",
  420. "ADD Crushed Lacewing fly",
  421. "ADD Crushed Lacewing fly",
  422. "HEAT",
  423. "ADD Boomslang skin",
  424. "ADD Boomslang skin",
  425. "ADD Boomslang skin",
  426. "ADD Crushed Bicorn horn",
  427. "HEAT",
  428. "STIR",
  429. "ADD Crushed Lacewing fly",
  430. "STIR",
  431. "STIR",
  432. "STIR",
  433. "FINISH"
  434. }
  435. },
  436. invdraught = {
  437. "Invigoration draught",
  438. {
  439. "ADD Alihotsy leaf",
  440. "ADD Alihotsy leaf",
  441. "ADD Roasted Billywig leaf",
  442. "ADD Crushed Wormwood",
  443. "HEAT",
  444. "STIR",
  445. "HEAT",
  446. "FINISH"
  447. }
  448. },
  449. strengthsol = {
  450. "Strengthening solution",
  451. {
  452. "HEAT",
  453. "ADD Shaken Salamander blood",
  454. "ADD Shaken Salamander blood",
  455. "ADD Crushed Griffin claw",
  456. "ADD Crushed Roasted Griffin claw",
  457. "STIR",
  458. "FINISH"
  459. }
  460. },
  461. peacedrau = {
  462. "Draught of Peace",
  463. {
  464. "ADD Crushed Moonstone",
  465. "STIR",
  466. "ADD Crushed Moonstone",
  467. "HEAT",
  468. "ADD Syrup of hellebore",
  469. "HEAT",
  470. "ADD Shaken Crushed Porcupine quill",
  471. "STIR",
  472. "ADD Porcupine quill",
  473. "HEAT",
  474. "ADD Crushed Unicorn horn",
  475. "STIR",
  476. "HEAT",
  477. "ADD Crushed Moonstone",
  478. "HEAT",
  479. "ADD Crushed Porcupine quill",
  480. "HEAT",
  481. "FINISH"
  482. }
  483. },
  484. volubilis = {
  485. "Volubilis potion",
  486. {
  487. "HEAT",
  488. "ADD Honey water",
  489. "HEAT",
  490. "ADD Mint sprig",
  491. "HEAT",
  492. "ADD Mint sprig",
  493. "ADD Stewed mandrake",
  494. "ADD Syrup of hellebore",
  495. "HEAT",
  496. "HEAT",
  497. "FINISH"
  498. }
  499. },
  500. shrink = {
  501. "Shrinking solution",
  502. {
  503. "ADD Crushed Shrivelfig",
  504. "STIR",
  505. "HEAT",
  506. "ADD Crushed Daisy root",
  507. "ADD Crushed Daisy root",
  508. "ADD Crushed Daisy root",
  509. "ADD Crushed Daisy root",
  510. "ADD Caterpillar",
  511. "ADD Caterpillar",
  512. "ADD Caterpillar",
  513. "ADD Caterpillar",
  514. "ADD Shaken Wormwood",
  515. "STIR",
  516. "ADD Leech juice",
  517. "STIR",
  518. "ADD Shaken Rat spleen",
  519. "ADD Cowbane",
  520. "STIR",
  521. "HEAT",
  522. "ADD Crushed Caterpillar",
  523. "ADD Crushed Caterpillar",
  524. "ADD Crushed Caterpillar",
  525. "ADD Crushed Caterpillar",
  526. "ADD Crushed Caterpillar",
  527. "HEAT",
  528. "ADD Shaken Shrivelfig",
  529. "HEAT",
  530. "ADD Rat spleen",
  531. "ADD Rat spleen",
  532. "ADD Rat spleen",
  533. "ADD Rat spleen",
  534. "ADD Crushed Daisy root",
  535. "ADD Leech juice",
  536. "ADD Leech juice",
  537. "ADD Leech juice",
  538. "ADD Leech juice",
  539. "ADD Leech juice",
  540. "ADD Shrivelfig",
  541. "ADD Crushed Caterpillar",
  542. "HEAT",
  543. "FINISH"
  544. }
  545. }
  546. }
  547. function cleanList()
  548. local potUI = sparent.PotionsEdit
  549. for i, v in pairs(potUI.Ingredients:GetChildren()) do
  550. v:Destroy()
  551. end
  552. end
  553. function createBrewingList(items, colour, num)
  554. local i = num
  555. local switch = false
  556. local potUI = sparent.PotionsEdit
  557. for m = 1, #items do
  558. do
  559. local tag = script.IngredientTag:Clone()
  560. tag.Text = items[m].Name
  561. tag.TextColor3 = colour
  562. tag.Amount.Text = items[m].Value
  563. tag.Position = UDim2.new(0, 0, 0, 30 * (i - 1))
  564. if switch == false then
  565. tag.BackgroundTransparency = 0.8
  566. switch = true
  567. else
  568. switch = false
  569. end
  570. tag.Parent = potUI.Ingredients
  571. tag.MouseButton1Down:connect(function()
  572. if actDeb == false then
  573. actDeb = true
  574. pot.Specific.Brewing.Ingredient.Value = items[m].Name
  575. pot.Specific.Brewing.Item.Text = items[m].Name
  576. actDeb = false
  577. end
  578. end)
  579. potUI.Ingredients.CanvasSize = UDim2.new(0, 0, 0, 30 * i)
  580. i = i + 1
  581. end
  582. end
  583. return i
  584. end
  585. function loadBrewingList()
  586. actDeb = true
  587. cleanList()
  588. local potUI = sparent.PotionsEdit
  589. local switch = false
  590. local i = 1
  591. local relevant = {}
  592. for _, v in pairs(plr.PlayersData.Ingredients:GetChildren()) do
  593. table.insert(relevant, v)
  594. end
  595. createBrewingList(relevant, Color3.new(1, 1, 1), i)
  596. potUI.Visible = true
  597. potUI.Specific.Taking.Visible = false
  598. potUI.Specific.Brewing.Visible = true
  599. actDeb = false
  600. end
  601. function loadSpecificBrewingList(key)
  602. actDeb = true
  603. cleanList()
  604. local potUI = sparent.PotionsEdit
  605. local switch = false
  606. local i = 1
  607. local relevant = {}
  608. local notrelevant = {}
  609. for i, v in pairs(plr.PlayersData.Ingredients:GetChildren()) do
  610. if string.find(string.lower(v.Name), string.lower(key)) then
  611. print("relevant for brewing: " .. v.Name)
  612. table.insert(relevant, v)
  613. else
  614. table.insert(notrelevant, v)
  615. end
  616. end
  617. local newnum = createBrewingList(relevant, Color3.new(1, 0, 0), i)
  618. local secnum = createBrewingList(notrelevant, Color3.new(1, 1, 1), newnum)
  619. potUI.Visible = true
  620. potUI.Specific.Taking.Visible = false
  621. potUI.Specific.Brewing.Visible = true
  622. actDeb = false
  623. end
  624. function loadTakingList()
  625. actDeb = true
  626. cleanList()
  627. local potUI = sparent.PotionsEdit
  628. local switch = false
  629. local i = 1
  630. local relevant = {}
  631. for _, v in pairs(game.ReplicatedStorage.Ingredients:GetChildren()) do
  632. table.insert(relevant, v)
  633. end
  634. createTakingList(relevant, Color3.new(1, 1, 1), i)
  635. potUI.Visible = true
  636. potUI.Specific.Taking.Visible = true
  637. potUI.Specific.Brewing.Visible = false
  638. actDeb = false
  639. end
  640. function createTakingList(items, colour, num)
  641. local i = num
  642. local switch = false
  643. local potUI = sparent.PotionsEdit
  644. for m = 1, #items do
  645. 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
  646. local tag = script.IngredientTag:Clone()
  647. tag.Text = items[m].Name
  648. tag.TextColor3 = colour
  649. tag.Position = UDim2.new(0, 0, 0, 30 * (i - 1))
  650. if switch == false then
  651. tag.BackgroundTransparency = 0.8
  652. switch = true
  653. else
  654. switch = false
  655. end
  656. tag.Parent = potUI.Ingredients
  657. tag.MouseButton1Down:connect(function()
  658. if actDeb == false then
  659. actDeb = true
  660. if items[m].Lock.Value ~= "None" then
  661. pot.Specific.Taking.Lock.Text = "You must be at LEAST a " .. items[m].Lock.Value .. " to use this ingredient!"
  662. else
  663. pot.Specific.Taking.Lock.Text = ""
  664. end
  665. if plr:GetRankInGroup(2666710) < items[m].Lock.Rank.Value then
  666. pot.Specific.Taking.Take.Visible = false
  667. else
  668. pot.Specific.Taking.Take.Visible = true
  669. end
  670. pot.Specific.Taking.Ingredient.Value = items[m].Name
  671. pot.Specific.Taking.Item.Text = items[m].Name
  672. actDeb = false
  673. end
  674. end)
  675. potUI.Ingredients.CanvasSize = UDim2.new(0, 0, 0, 30 * i)
  676. i = i + 1
  677. end
  678. end
  679. return i
  680. end
  681. function loadSpecificTakingList(key)
  682. actDeb = true
  683. cleanList()
  684. local potUI = sparent.PotionsEdit
  685. local switch = false
  686. local i = 1
  687. local relevant = {}
  688. local notrelevant = {}
  689. for i, v in pairs(game.ReplicatedStorage.Ingredients:GetChildren()) do
  690. if string.find(string.lower(v.Name), string.lower(key)) then
  691. print("relevant for taking: " .. v.Name)
  692. table.insert(relevant, v)
  693. else
  694. table.insert(notrelevant, v)
  695. end
  696. end
  697. local newnum = createTakingList(relevant, Color3.new(1, 0, 0), i)
  698. local secnum = createTakingList(notrelevant, Color3.new(1, 1, 1), newnum)
  699. potUI.Visible = true
  700. potUI.Specific.Taking.Visible = true
  701. potUI.Specific.Brewing.Visible = false
  702. actDeb = false
  703. end
  704. local numOfListInst = 0
  705. function cleanInstructions()
  706. for i = 1, #currentInstructions do
  707. table.remove(currentInstructions)
  708. end
  709. for i, v in pairs(sparent.PotionsEdit.Specific.Brewing.List:GetChildren()) do
  710. v:Destroy()
  711. end
  712. numOfListInst = 0
  713. end
  714. local prevstatement, copied, prevtag = "NaN", 0, nil
  715. function addInstruction(instr)
  716. table.insert(currentInstructions, instr)
  717. if instr ~= prevstatement then
  718. numOfListInst = numOfListInst + 1
  719. local ta = script.Progress:Clone()
  720. ta.Text = instr
  721. ta.Position = UDim2.new(0, 0, 0, 20 * (numOfListInst - 1))
  722. sparent.PotionsEdit.Specific.Brewing.List.CanvasSize = UDim2.new(0, 0, 0, 20 * numOfListInst)
  723. ta.Parent = sparent.PotionsEdit.Specific.Brewing.List
  724. prevstatement = instr
  725. copied = 1
  726. prevtag = ta
  727. elseif instr == prevstatement then
  728. copied = copied + 1
  729. prevtag.Text = "[x" .. copied .. "]" .. " " .. instr
  730. end
  731. end
  732. function findPotion()
  733. for i, z in pairs(recipies) do
  734. local v = z[2]
  735. if #v == #currentInstructions then
  736. local correct = true
  737. for i = 1, #v do
  738. print(v[i] .. "/" .. currentInstructions[i])
  739. if v[i] ~= currentInstructions[i] then
  740. print("ERROR: " .. v[i] .. "/" .. currentInstructions[i])
  741. correct = false
  742. break
  743. end
  744. end
  745. if correct == true then
  746. return "Successfully made " .. z[1]
  747. end
  748. else
  749. print("not same length: " .. #v .. "/" .. #currentInstructions)
  750. end
  751. end
  752. return "Potion failed!"
  753. end
  754. pot.Specific.Taking.Take.MouseButton1Down:connect(function()
  755. 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
  756. local amount = 1
  757. if pot.Specific.Taking.Amount.Text ~= nil then
  758. amount = tonumber(pot.Specific.Taking.Amount.Text)
  759. end
  760. if amount > 10 then
  761. amount = 10
  762. elseif amount < 1 then
  763. amount = 1
  764. end
  765. local takeIngredients = game.ReplicatedStorage.Database.RequestData:InvokeServer("IncreaseIngredient", {
  766. pot.Specific.Taking.Ingredient.Value,
  767. amount
  768. })
  769. pot.Specific.Taking.Info.Text = takeIngredients
  770. wait(0.2)
  771. actDeb = false
  772. end
  773. end)
  774. pot.Specific.Brewing.Stir.MouseButton1Down:connect(function()
  775. if actDeb == false and pot.Specific.Brewing.Ingredient.Value ~= "NaN" then
  776. actDeb = true
  777. addInstruction("STIR")
  778. pot.Specific.Brewing.Info.Text = "Stirred cauldron."
  779. wait()
  780. actDeb = false
  781. end
  782. end)
  783. pot.Specific.Brewing.Crush.MouseButton1Down:connect(function()
  784. if actDeb == false and pot.Specific.Brewing.Ingredient.Value ~= "NaN" then
  785. actDeb = true
  786. if string.find(pot.Specific.Brewing.Ingredient.Value, "Crushed") == nil then
  787. local crushIngredient = game.ReplicatedStorage.Database.RequestData:InvokeServer("AlterIngredient", {
  788. pot.Specific.Brewing.Ingredient.Value,
  789. "Crushed"
  790. })
  791. if crushIngredient == "Done" then
  792. pot.Specific.Brewing.Info.Text = "Crushed " .. pot.Specific.Brewing.Ingredient.Value
  793. loadBrewingList()
  794. end
  795. wait()
  796. actDeb = false
  797. else
  798. pot.Specific.Brewing.Info.Text = pot.Specific.Brewing.Ingredient.Value .. " has already been crushed!"
  799. actDeb = false
  800. end
  801. end
  802. end)
  803. pot.Specific.Brewing.Shake.MouseButton1Down:connect(function()
  804. if actDeb == false and pot.Specific.Brewing.Ingredient.Value ~= "NaN" then
  805. actDeb = true
  806. if string.find(pot.Specific.Brewing.Ingredient.Value, "Shaken") == nil then
  807. local crushIngredient = game.ReplicatedStorage.Database.RequestData:InvokeServer("AlterIngredient", {
  808. pot.Specific.Brewing.Ingredient.Value,
  809. "Shaken"
  810. })
  811. if crushIngredient == "Done" then
  812. pot.Specific.Brewing.Info.Text = "Shook " .. pot.Specific.Brewing.Ingredient.Value
  813. loadBrewingList()
  814. end
  815. wait()
  816. actDeb = false
  817. else
  818. pot.Specific.Brewing.Info.Text = pot.Specific.Brewing.Ingredient.Value .. " has already been shaken!"
  819. actDeb = false
  820. end
  821. end
  822. end)
  823. pot.Specific.Brewing.Roast.MouseButton1Down:connect(function()
  824. if actDeb == false and pot.Specific.Brewing.Ingredient.Value ~= "NaN" then
  825. actDeb = true
  826. if string.find(pot.Specific.Brewing.Ingredient.Value, "Roasted") == nil then
  827. local crushIngredient = game.ReplicatedStorage.Database.RequestData:InvokeServer("AlterIngredient", {
  828. pot.Specific.Brewing.Ingredient.Value,
  829. "Roasted"
  830. })
  831. if crushIngredient == "Done" then
  832. pot.Specific.Brewing.Info.Text = "Roasted " .. pot.Specific.Brewing.Ingredient.Value
  833. loadBrewingList()
  834. end
  835. wait()
  836. actDeb = false
  837. else
  838. pot.Specific.Brewing.Info.Text = pot.Specific.Brewing.Ingredient.Value .. " has already been roasted!"
  839. actDeb = false
  840. end
  841. end
  842. end)
  843. pot.Specific.Brewing.Add.MouseButton1Down:connect(function()
  844. if actDeb == false and pot.Specific.Brewing.Ingredient.Value ~= "NaN" then
  845. actDeb = true
  846. addInstruction("ADD " .. pot.Specific.Brewing.Ingredient.Value)
  847. local reduceIngredient = game.ReplicatedStorage.Database.RequestData:InvokeServer("ReduceIngredient", {
  848. pot.Specific.Brewing.Ingredient.Value
  849. })
  850. if reduceIngredient == "Done" then
  851. pot.Specific.Brewing.Info.Text = "Added " .. pot.Specific.Brewing.Ingredient.Value
  852. loadBrewingList()
  853. end
  854. wait(0.2)
  855. actDeb = false
  856. end
  857. end)
  858. pot.Specific.Brewing.Heat.MouseButton1Down:connect(function()
  859. if actDeb == false and pot.Specific.Brewing.Ingredient.Value ~= "NaN" then
  860. actDeb = true
  861. addInstruction("HEAT")
  862. pot.Specific.Brewing.Info.Text = "Applied heat."
  863. wait()
  864. actDeb = false
  865. end
  866. end)
  867. pot.Specific.Brewing.Finish.MouseButton1Down:connect(function()
  868. if actDeb == false and pot.Specific.Brewing.Ingredient.Value ~= "NaN" then
  869. actDeb = true
  870. addInstruction("FINISH")
  871. pot.Specific.Brewing.Info.Text = "..Brewing potion.."
  872. local answer = findPotion()
  873. pot.Specific.Brewing.Info.Text = answer
  874. wait(6)
  875. sparent.PotionsEdit.Visible = false
  876. local unclaim = game.ReplicatedStorage.Database.RequestData:InvokeServer("UnClaimCauldron", {})
  877. cleanInstructions()
  878. pot.Specific.Brewing.Info.Text = " "
  879. actDeb = false
  880. end
  881. end)
  882. pot.Specific.Brewing.Cancel.MouseButton1Down:connect(function()
  883. if actDeb == false then
  884. actDeb = true
  885. pot.Specific.Brewing.Info.Text = "..Cancelling and exiting.."
  886. local unclaim = game.ReplicatedStorage.Database.RequestData:InvokeServer("UnClaimCauldron", {})
  887. cleanInstructions()
  888. pot.Specific.Brewing.Info.Text = " "
  889. pot.Visible = false
  890. actDeb = false
  891. end
  892. end)
  893. pot.Search.FocusLost:connect(function(enterPressed)
  894. print(enterPressed)
  895. if enterPressed and actDeb == false then
  896. actDeb = true
  897. if pot.Specific.Brewing.Visible == true then
  898. print("brewing")
  899. loadSpecificBrewingList(pot.Search.Text)
  900. else
  901. print("taking")
  902. loadSpecificTakingList(pot.Search.Text)
  903. end
  904. end
  905. end)
  906. local mouse = plr:GetMouse()
  907. mouse.Button1Down:connect(function()
  908. local targ = mouse.Target
  909. if game.Workspace:FindFirstChild("Potions") then
  910. 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
  911. local claim = game.ReplicatedStorage.Database.RequestData:InvokeServer("ClaimCauldron", {
  912. targ.Parent.Settings.Number.Value
  913. })
  914. if claim == true then
  915. loadBrewingList()
  916. end
  917. elseif targ and targ.Parent.Name == "Cauldron" and targ.Parent == plr.PlayersData.Interactive.Value then
  918. loadBrewingList()
  919. else
  920. sparent.PotionsEdit.Visible = false
  921. end
  922. if targ and targ.Parent.Name == "IngredientsShelf" then
  923. loadTakingList()
  924. end
  925. end
  926. end)
  927. local count = 0
  928. function checkLock(item)
  929. if item:findFirstChild("Lock") then
  930. for i, v in pairs(item.Lock:GetChildren()) do
  931. if v.Name == "Group" and plr:GetRankInGroup(v.MaxValue) >= v.MinValue or plr.userId <= 0 then
  932. return true
  933. elseif v.Name == "UserId" and plr.userId == v.Value then
  934. return true
  935. end
  936. end
  937. return false
  938. else
  939. return true
  940. end
  941. end
  942. for i, v in pairs(script.ToolItems:GetChildren()) do
  943. if checkLock(v) then
  944. local tag = v:Clone()
  945. tag.Parent = sparent.ToolList
  946. tag.Position = UDim2.new(0, 0, 0, 55 * count)
  947. count = count + 1
  948. sparent.ToolList.Position = UDim2.new(0, 3, 0.5, -(55 * count / 2))
  949. sparent.ToolList.Size = UDim2.new(0, 0, 0, 55 * count)
  950. end
  951. end
  952. local types = {
  953. ALL = {
  954. "ALL",
  955. Color3.new(1, 1, 1),
  956. 0
  957. },
  958. MISC = {
  959. "MISC",
  960. Color3.new(1, 1, 1),
  961. 0
  962. },
  963. DADA = {
  964. "DADA",
  965. Color3.new(0, 0, 0),
  966. 0
  967. },
  968. TRANSFIG = {
  969. "TRANSFIG",
  970. Color3.new(0, 0, 1),
  971. 0
  972. },
  973. TRAVEL = {
  974. "TRAVEL",
  975. Color3.new(1, 1, 0),
  976. 0
  977. },
  978. CHARMS = {
  979. "CHARMS",
  980. Color3.new(0, 1, 0),
  981. 0
  982. }
  983. }
  984. if sparent.ToolList:FindFirstChild("Conjuration") then
  985. do
  986. local currentVis
  987. local wholeUi = sparent.Conjuration
  988. local uiButton = sparent.ToolList.Conjuration
  989. uiButton.MouseButton1Down:connect(function()
  990. if wholeUi.Visible == true then
  991. wholeUi.Visible = false
  992. elseif wholeUi.Visible == false and plr.Tools.Item.Value == nil then
  993. wholeUi.Visible = true
  994. end
  995. end)
  996. local count = 0
  997. local selecDeb = false
  998. function makeTab(item, list, count)
  999. local tag = script.Button:Clone()
  1000. tag.Text = item.Name
  1001. tag.Position = UDim2.new(0, 0, 0, 30 * count)
  1002. tag.MouseButton1Down:connect(function()
  1003. if selecDeb == false then
  1004. selecDeb = true
  1005. local claim = game.ReplicatedStorage.Database.RequestData:InvokeServer("selectItem", {
  1006. item.Name
  1007. })
  1008. wholeUi.Visible = false
  1009. selecDeb = false
  1010. end
  1011. end)
  1012. tag.Parent = list
  1013. list.CanvasSize = UDim2.new(0, 0, 0, 30 * (count + 1))
  1014. return count + 1
  1015. end
  1016. local amnt = 0
  1017. for i, v in pairs(types) do
  1018. do
  1019. local lis = script.List:Clone()
  1020. lis.Name = i
  1021. lis.Parent = sparent.Conjuration
  1022. local tab = script.Tab:Clone()
  1023. tab.Text = i
  1024. tab.TextColor3 = v[2]
  1025. tab.Position = UDim2.new(0, 0, 0, 32 * amnt)
  1026. tab.Parent = sparent.Conjuration.Tabs
  1027. tab.MouseButton1Down:connect(function()
  1028. if currentVis ~= nil then
  1029. currentVis.Visible = false
  1030. end
  1031. currentVis = lis
  1032. lis.Visible = true
  1033. end)
  1034. for _, m in pairs(game.ReplicatedStorage.TeacherTools:GetChildren()) do
  1035. if (m.Type.Value == i or i == "ALL") and checkLock(m) then
  1036. v[3] = makeTab(m, lis, v[3])
  1037. end
  1038. end
  1039. amnt = amnt + 1
  1040. sparent.Conjuration.Tabs.CanvasSize = UDim2.new(0, 0, 0, 32 * amnt)
  1041. end
  1042. end
  1043. end
  1044. end
  1045. if sparent.ToolList:FindFirstChild("Uniform") then
  1046. do
  1047. local wholeUi = sparent.Uniform
  1048. local uiButton = sparent.ToolList.Uniform
  1049. local slytherin = {
  1050. Slytherin = {455190570, 455189929},
  1051. ["Slytherin Boys Sweater"] = {455426609, 455190422},
  1052. ["Slytherin Girls"] = {452436959, 455190106},
  1053. ["Slytherin Unisex 2"] = {455190570, 455190222},
  1054. ["Slytherin Winter"] = {455190570, 455190001}
  1055. }
  1056. local gryffindor = {
  1057. Gryffindor = {455187228, 455187031},
  1058. ["Gryffindor Boys Sweater"] = {455426609, 455187589},
  1059. ["Gryffindor Girls"] = {452436278, 4455187393},
  1060. ["Gryffindor Tie"] = {455187228, 455187604},
  1061. ["Gryffindor Winter"] = {455187228, 455187330}
  1062. }
  1063. local hufflepuff = {
  1064. Hufflepuff = {455187996, 455187955},
  1065. ["Hufflepuff Boys Sweater"] = {455426609, 455188127},
  1066. ["Hufflepuff Girls"] = {452438019, 455188847},
  1067. ["Hufflepuff Tie"] = {455187996, 455187780},
  1068. ["Hufflepuff Winter"] = {455187996, 455187935}
  1069. }
  1070. local ravenclaw = {
  1071. Ravenclaw = {455189747, 455189292},
  1072. ["Ravenclaw Boys Sweater"] = {455426609, 455189687},
  1073. ["Ravenclaw Girls"] = {452437394, 455189511},
  1074. ["Ravenclaw Tie"] = {455189747, 455189546},
  1075. ["Ravenclaw Winter"] = {455189747, 455189402}
  1076. }
  1077. local sorting = {
  1078. Sorting = {159220375, 159220336}
  1079. }
  1080. local remEvent = game:GetService("ReplicatedStorage"):WaitForChild("WearUniform")
  1081. local deb = false
  1082. local count = 0
  1083. function addToList(list, colour)
  1084. for i, v in pairs(list) do
  1085. do
  1086. local tag = script.Button:Clone()
  1087. tag.Text = i
  1088. tag.Position = UDim2.new(0, 0, 0, 30 * count)
  1089. tag.TextColor3 = colour
  1090. tag.MouseButton1Down:connect(function()
  1091. if deb == false then
  1092. deb = true
  1093. remEvent:FireServer(v[2], v[1])
  1094. wait()
  1095. deb = false
  1096. end
  1097. end)
  1098. tag.Parent = wholeUi.List
  1099. count = count + 1
  1100. wholeUi.List.CanvasSize = UDim2.new(0, 0, 0, 30 * count)
  1101. end
  1102. end
  1103. end
  1104. addToList(sorting, Color3.new(1, 1, 1))
  1105. addToList(slytherin, Color3.new(0, 1, 0))
  1106. addToList(ravenclaw, Color3.new(0, 0, 1))
  1107. addToList(gryffindor, Color3.new(1, 0, 0))
  1108. addToList(hufflepuff, Color3.new(1, 1, 0))
  1109. uiButton.MouseButton1Down:connect(function()
  1110. if wholeUi.Visible == true then
  1111. wholeUi.Visible = false
  1112. else
  1113. wholeUi.Visible = true
  1114. end
  1115. end)
  1116. end
  1117. end
  1118. local ctl = sparent.Parent:WaitForChild("ControlGui", 10)
  1119. if ctl then
  1120. ctl.Enabled = false
  1121. end
  1122. sparent.Parent.ChildAdded:Connect(function(item)
  1123. if item.Name == "ControlGui" then
  1124. item.Enabled = false
  1125. end
  1126. end)
  1127. function findRankImgColor(lvl)
  1128. local img
  1129. local color = Color3.new(1, 1, 1)
  1130. if lvl >= 100 then
  1131. img = "rbxassetid://2249296883"
  1132. color = Color3.fromRGB(228, 228, 255)
  1133. elseif lvl >= 90 then
  1134. img = "rbxassetid://2249297055"
  1135. color = Color3.fromRGB(237, 233, 255)
  1136. elseif lvl >= 80 then
  1137. img = "rbxassetid://2249296408"
  1138. color = Color3.fromRGB(233, 220, 240)
  1139. elseif lvl >= 70 then
  1140. img = "rbxassetid://2249296151"
  1141. color = Color3.fromRGB(247, 233, 255)
  1142. elseif lvl >= 60 then
  1143. img = "rbxassetid://2244664627"
  1144. color = Color3.fromRGB(201, 238, 255)
  1145. elseif lvl >= 50 then
  1146. img = "rbxassetid://2244664753"
  1147. color = Color3.fromRGB(255, 253, 170)
  1148. elseif lvl >= 40 then
  1149. img = "rbxassetid://2244649797"
  1150. color = Color3.fromRGB(255, 253, 170)
  1151. elseif lvl >= 30 then
  1152. img = "rbxassetid://2244649649"
  1153. color = Color3.fromRGB(201, 238, 255)
  1154. elseif lvl >= 20 then
  1155. img = "rbxassetid://2244649500"
  1156. color = Color3.fromRGB(255, 170, 127)
  1157. elseif lvl >= 10 then
  1158. img = "rbxassetid://2244649367"
  1159. color = Color3.fromRGB(180, 180, 180)
  1160. else
  1161. img = "rbxassetid://2244649207"
  1162. color = Color3.fromRGB(255, 255, 255)
  1163. end
  1164. return img, color
  1165. end
  1166. function setRankIcon(lvl, xp)
  1167. local rankimg = sparent.Rank
  1168. local img, color = findRankImgColor(lvl)
  1169. rankimg.Image = img
  1170. rankimg.ImageColor3 = color
  1171. local tot = 250 / (lvl * 100)
  1172. sparent.XP.Bar.Size = UDim2.new(0, tot * xp, 0, 15)
  1173. end
  1174. local Database = game.ReplicatedStorage.Database
  1175. local LocalPlayer = game.Players.LocalPlayer
  1176. Editting = false
  1177. repeat
  1178. wait()
  1179. until LocalPlayer.Character and LocalPlayer:FindFirstChild("Communication")
  1180. LocalPlayer.Communication.OnClientEvent:connect(function(MODE, TABLE)
  1181. if MODE == "Update" and TABLE[1] == "RANK" then
  1182. sparent.Level.Lvl.Text = TABLE[2]
  1183. sparent.XP.XP.Text = TABLE[3] .. "/" .. tonumber(TABLE[2]) * 100
  1184. setRankIcon(tonumber(TABLE[2]), tonumber(TABLE[3]))
  1185. end
  1186. end)
  1187. function updateInfo(targ)
  1188. local tableOfInfo = game.ReplicatedStorage.Database.RequestData:InvokeServer("PlayersData", {
  1189. game.Players.LocalPlayer.userId
  1190. })
  1191. wait()
  1192. sparent.Level.Lvl.Text = tableOfInfo.Level
  1193. sparent.XP.XP.Text = tableOfInfo.XP .. "/" .. tonumber(tableOfInfo.Level) * 100
  1194. setRankIcon(tonumber(tableOfInfo.Level), tonumber(tableOfInfo.XP))
  1195. end
  1196. function onCharacter(targ)
  1197. if targ then
  1198. for i, v in pairs(game.Players:GetChildren()) do
  1199. if targ:IsDescendantOf(v.Character) then
  1200. return v
  1201. end
  1202. end
  1203. end
  1204. return false
  1205. end
  1206. function createBadge(img, count)
  1207. local badg2 = sparent.Rank:Clone()
  1208. badg2.Parent = sparent.Profile.Badges
  1209. badg2.Position = UDim2.new(0, 50 * count, 0, 0)
  1210. badg2.ImageColor3 = Color3.new(1, 1, 1)
  1211. badg2.Image = img
  1212. badg2.ZIndex = 5
  1213. end
  1214. function isLegendary(plr)
  1215. local legendaryPlayers = {
  1216. 16149489,
  1217. 30015961,
  1218. 24546863,
  1219. 4788944,
  1220. 170267547,
  1221. 56431538,
  1222. 21924474
  1223. }
  1224. for i = 1, #legendaryPlayers do
  1225. if legendaryPlayers[i] == plr.userId then
  1226. return true
  1227. end
  1228. end
  1229. return false
  1230. end
  1231. function setBadges(plr, lvl)
  1232. for i, v in pairs(sparent.Profile.Badges:GetChildren()) do
  1233. v:Destroy()
  1234. end
  1235. local count = 0
  1236. local badg = sparent.Rank:Clone()
  1237. badg.Parent = sparent.Profile.Badges
  1238. badg.ZIndex = 5
  1239. badg.Position = UDim2.new(0, 0, 0, 0)
  1240. local img, clr = findRankImgColor(lvl)
  1241. badg.ImageColor3 = clr
  1242. badg.Image = img
  1243. count = count + 1
  1244. if plr:GetRankInGroup(3026989) >= 252 then
  1245. createBadge("rbxassetid://2248918423", count)
  1246. count = count + 1
  1247. elseif plr:GetRankInGroup(3026989) >= 251 then
  1248. createBadge("rbxassetid://2248918091", count)
  1249. count = count + 1
  1250. elseif plr:GetRankInGroup(3026989) >= 250 then
  1251. createBadge("rbxassetid://2248917627", count)
  1252. count = count + 1
  1253. end
  1254. if isLegendary(plr) then
  1255. createBadge("rbxassetid://2248032160", count)
  1256. count = count + 1
  1257. end
  1258. if plr.userId == 30015961 then
  1259. createBadge("rbxassetid://2248919868", count)
  1260. count = count + 1
  1261. end
  1262. if plr.userId == 583324466 then
  1263. createBadge("rbxassetid://2252471905", count)
  1264. count = count + 1
  1265. end
  1266. sparent.Profile.RIM.ImageColor3 = clr
  1267. if lvl >= 50 then
  1268. sparent.Profile.RIM.Image = "rbxassetid://2247214397"
  1269. else
  1270. sparent.Profile.RIM.Image = "rbxassetid://2247214222"
  1271. end
  1272. end
  1273. local mouse = LocalPlayer:GetMouse()
  1274. local profOpen = false
  1275. local UserInput = game:GetService("UserInputService")
  1276. local function KeyUp(Input, Process)
  1277. if not Process and Input.UserInputType == Enum.UserInputType.Keyboard then
  1278. local pl = onCharacter(mouse.Target)
  1279. if Input.KeyCode == Enum.KeyCode.F and pl ~= false and profOpen == false and pl:findFirstChild("Communication") then
  1280. local plrLvl = game.ReplicatedStorage.Database.RequestData:InvokeServer("PlayersLevel", {pl})
  1281. sparent.Profile.plrsName.Text = pl.Name
  1282. sparent.Profile.plrsID.Text = pl.PlayersData.Forename.Value .. " " .. pl.PlayersData.Surname.Value
  1283. sparent.Profile.Player.Image = "https://www.roblox.com/headshot-thumbnail/image?userId=" .. pl.userId .. "&width=420&height=420&format=png"
  1284. sparent.Profile.Level.Text = plrLvl
  1285. setBadges(pl, tonumber(plrLvl))
  1286. sparent.Profile.Visible = true
  1287. profOpen = true
  1288. elseif Input.KeyCode == Enum.KeyCode.F and profOpen == true then
  1289. sparent.Profile.Visible = false
  1290. profOpen = false
  1291. end
  1292. end
  1293. end
  1294. UserInput.InputBegan:connect(KeyUp)
  1295. sparent.Level.Lvl.MouseButton1Down:Connect(function()
  1296. if profOpen == false then
  1297. sparent.Profile.plrsName.Text = LocalPlayer.Name
  1298. sparent.Profile.plrsID.Text = plrd.Forename.Value .. " " .. plrd.Surname.Value
  1299. sparent.Profile.Player.Image = "https://www.roblox.com/headshot-thumbnail/image?userId=" .. LocalPlayer.userId .. "&width=420&height=420&format=png"
  1300. sparent.Profile.Level.Text = sparent.Level.Lvl.Text
  1301. setBadges(LocalPlayer, tonumber(sparent.Level.Lvl.Text))
  1302. sparent.Profile.Visible = true
  1303. profOpen = true
  1304. else
  1305. sparent.Profile.Visible = false
  1306. profOpen = false
  1307. end
  1308. end)
  1309. local currimg = script.F
  1310. local RunService = game:GetService("RunService")
  1311. local function onRenderStep()
  1312. local pl = onCharacter(mouse.Target)
  1313. if pl ~= false then
  1314. currimg.Adornee = pl.Character.HumanoidRootPart
  1315. currimg.Enabled = true
  1316. elseif pl == false and currimg.Enabled == true then
  1317. currimg.Enabled = false
  1318. end
  1319. end
  1320. RunService.RenderStepped:connect(onRenderStep)
  1321. updateInfo(LocalPlayer.Name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement