Advertisement
Guest User

anti crash

a guest
Jul 18th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.16 KB | None | 0 0
  1. LP = game.Players.LocalPlayer
  2. game.StarterGui.ResetPlayerGuiOnSpawn = false
  3. game:GetService("TeleportService").CustomizedTeleportUI = true
  4. local CurrentArena, Global_CanTP = nil, false
  5. local RepStorage = game.ReplicatedStorage
  6. RepStorage.ServerConnection:WaitForChild("SetTouch"):FireServer(game:GetService("UserInputService").TouchEnabled)
  7. local UserAssetRequest = RepStorage.ServerConnection:WaitForChild("HasGamepass")
  8. local pConnectFolder = LP:WaitForChild("Connection")
  9. repeat
  10. wait()
  11. until LP:FindFirstChild("PlayerGui")
  12. local ScreenGui = LP.PlayerGui:WaitForChild("ScreenGui")
  13. local ResultFrame = ScreenGui:WaitForChild("SummaryFrame")
  14. local ResultBody = ResultFrame:WaitForChild("body"):WaitForChild("stats")
  15. local SettingsGui = ScreenGui:WaitForChild("ArenaSettings")
  16. local PingFrame = ScreenGui:WaitForChild("PingFrame")
  17. local PromoFrame = ScreenGui:WaitForChild("PromoFrame")
  18. local LeagueFrame = ScreenGui:WaitForChild("LeagueFrame")
  19. local LeagueInvFrame = ScreenGui:WaitForChild("LeagueInvFrame")
  20. local ChatService = game:GetService("Chat")
  21. local function filterForBroadcast(chat)
  22. local filtered
  23. local success, e = pcall(function()
  24. filtered = ChatService:FilterStringForBroadcast(chat, LP)
  25. end)
  26. if success and filtered then
  27. return filtered
  28. else
  29. return "Unable to filter"
  30. end
  31. end
  32. HumChanges = {
  33. JumpPower = 50,
  34. HipHeight = 0,
  35. MaxHealth = 100,
  36. WalkSpeed = 16,
  37. MaxSlopeAngle = 89
  38. }
  39. LP.CharacterAppearanceLoaded:connect(function©
  40. local hum = c:WaitForChild("Humanoid")
  41. hum.Changed:connect(function(prop)
  42. if HumChanges[prop] then
  43. hum[prop] = HumChanges[prop]
  44. end
  45. end)
  46. end)
  47. game.ReplicatedStorage.Builds.V7Lock:Clone().Parent = workspace.CurrentCamera
  48. game.ReplicatedStorage.Builds.Holiday_Decorations:Clone().Parent = workspace.CurrentCamera
  49. SettingsGui.InDuel.wb2.Select.MouseButton1Down:connect(function()
  50. if CurrentArena then
  51. if SettingsGui.InDuel.wb2.Current.Text == "X" then
  52. CurrentArena.Events.Client.DuelSettings:FireServer("wb", 0)
  53. else
  54. CurrentArena.Events.Client.DuelSettings:FireServer("wb", 2)
  55. end
  56. end
  57. end)
  58. SettingsGui.InDuel.playingto.Select.MouseButton1Down:connect(function()
  59. if CurrentArena then
  60. CurrentArena.Events.Client.DuelSettings:FireServer("NextPlayingTo")
  61. end
  62. end)
  63. SettingsGui.InDuel.map.Select.MouseButton1Down:connect(function()
  64. if SettingsGui.InDuel.map.Choices.Visible == false then
  65. SettingsGui.InDuel.map.Choices.Visible = true
  66. SettingsGui.InDuel.reset.Position = UDim2.new(1, -120, 1, -172)
  67. else
  68. SettingsGui.InDuel.map.Choices.Visible = false
  69. SettingsGui.InDuel.reset.Position = UDim2.new(1, -120, 1, -77)
  70. end
  71. end)
  72. for _, map in ipairs(SettingsGui.InDuel.map.Choices:GetChildren()) do
  73. map.MouseButton1Up:connect(function()
  74. if CurrentArena then
  75. CurrentArena.Events.Client.DuelSettings:FireServer("CurrentMap", map.Name)
  76. SettingsGui.InDuel.map.Choices.Visible = false
  77. SettingsGui.InDuel.reset.Position = UDim2.new(1, -120, 1, -77)
  78. end
  79. end)
  80. end
  81. SettingsGui.InDuel.reset.MouseButton1Up:connect(function()
  82. if CurrentArena then
  83. CurrentArena.Events.Client.EndDuel:FireServer()
  84. end
  85. end)
  86. SettingsGui.OutDuel.StartDuel.MouseButton1Up:connect(function()
  87. if CurrentArena then
  88. CurrentArena.Events.Client.StartDuel:FireServer()
  89. end
  90. end)
  91. SettingsGui.ArenaTP.TP.MouseButton1Down:connect(function()
  92. if CurrentArena and Global_CanTP then
  93. local TPed = CurrentArena.Events.Client.RequestTP:InvokeServer()
  94. if TPed then
  95. SettingsGui.ArenaTP:TweenPosition(UDim2.new(0, 0, 0, 10), "Out", "Quad", 0.2, true)
  96. end
  97. end
  98. end)
  99. local IsOnPart = function(torso, part)
  100. if torso.Position.X > part.Position.X - 3 and torso.Position.X < part.Position.X + 3 and torso.Position.Z > part.Position.Z - 3 and torso.Position.Z < part.Position.Z + 3 then
  101. return true
  102. end
  103. return false
  104. end
  105. local aFolder = game.Workspace.ArenaWorkspace
  106. repeat
  107. wait()
  108. until #aFolder.Arenas:GetChildren() == 6
  109. for _, a in ipairs(aFolder.Arenas:GetChildren()) do
  110. if a:FindFirstChild("Bricks") then
  111. for _, pad in ipairs(a.Bricks.Plates:GetChildren()) do
  112. do
  113. local function handle()
  114. local torso
  115. if LP.Character then
  116. torso = LP.Character:FindFirstChild("Torso")
  117. end
  118. if torso then
  119. if IsOnPart(torso, pad.join) then
  120. a.Events.Client.HandlePad:FireServer("join", pad.Name)
  121. else
  122. a.Events.Client.HandlePad:FireServer("leave", pad.Name)
  123. end
  124. end
  125. end
  126. pad.join.Touched:connect(function()
  127. handle()
  128. end)
  129. pad.join.TouchEnded:connect(function()
  130. handle()
  131. end)
  132. end
  133. end
  134. end
  135. end
  136. workspace.TipJar.ClickDetector.MouseClick:connect(function()
  137. if LP.PlayerGui:FindFirstChild("TipGui") then
  138. else
  139. game.ReplicatedStorage.UI.TipGui:Clone().Parent = LP.PlayerGui
  140. end
  141. end)
  142. workspace.MapPurchaser.ClickDetector.MouseClick:connect(function()
  143. if LP.PlayerGui:FindFirstChild("MapGui") then
  144. elseif game.ReplicatedStorage.UI:FindFirstChild("MapGui") then
  145. game.ReplicatedStorage.UI.MapGui:Clone().Parent = LP.PlayerGui
  146. end
  147. end)
  148. local CurrentLeague, SelectedName, NoticeMethod
  149. local Working = false
  150. local LeaveID, LastInv = 0, 0
  151. function LeagueTrim(s)
  152. s = s:gsub("|", "")
  153. s = sConfusedub(0, 20)
  154. return s:match("^%s*(.-)%s*$")
  155. end
  156. local function UpdateLeagueFrame()
  157. CurrentLeague = workspace.StatService.gLeagueOfUser:InvokeServer(LP.userId)
  158. if CurrentLeague ~= "None" then
  159. if CurrentLeague.name ~= "None" then
  160. local leagueName = filterForBroadcast(CurrentLeague.name)
  161. if CurrentLeague.owner ~= LP.userId then
  162. LeagueFrame.CannotEdit.Visible = true
  163. LeagueFrame.LeagueMembers.Delete.Visible = false
  164. LeagueFrame.LeagueName.Back.EnterName.Text = "Enter League Name"
  165. LeagueFrame.LeagueMembers.title.Text = "LEAGUE MEMBERS"
  166. LeagueFrame.LeagueMembers.Members.AddMembers.Visible = false
  167. LeagueFrame.LeagueMembers.Members.ManageMembers.Visible = false
  168. else
  169. LeagueFrame.CannotEdit.Visible = false
  170. LeagueFrame.LeagueMembers.Delete.Visible = true
  171. LeagueFrame.LeagueName.Back.EnterName.Text = leagueName
  172. for _, m in pairs(LeagueFrame.LeagueMembers.Members.ManageMembers:GetChildren()) do
  173. if m.Name ~= "UserExample" then
  174. mBig Grinestroy()
  175. end
  176. end
  177. local leagueP_today = workspace.StatService.gLeague:InvokeServer(CurrentLeague.name)
  178. local leagueP_alltime = workspace.StatService.Storage.Leagues:WaitForChild(CurrentLeague.name:lower())
  179. repeat
  180. wait()
  181. until leagueP_alltime.Value ~= 7777777777777
  182. leagueP_alltime = leagueP_alltime.Value
  183. LeagueFrame.LeagueName.points.Text = leagueP_today + leagueP_alltime .. " league points (" .. leagueP_today .. " today)"
  184. local MaxMembers = 10
  185. if UserAssetRequest:InvokeServer(394793196) then
  186. MaxMembers = 20
  187. LeagueFrame.ProLeague.Check.Text = "LEARN MORE"
  188. LeagueFrame.ProLeague.Status.Text = "Yes"
  189. LeagueFrame.ProFrame.BuyPro.Visible = false
  190. end
  191. LeagueFrame.LeagueMembers.title.Text = "LEAGUE MEMBERS (" .. #CurrentLeague.members .. "/" .. MaxMembers .. ")"
  192. for i, user in pairs(CurrentLeague.members) do
  193. do
  194. local frame = LeagueFrame.LeagueMembers.Members.ManageMembers.UserExample:Clone()
  195. frame.Username.Text = game.Players:GetNameFromUserIdAsync(user)
  196. frame.Name = user
  197. frame.Position = UDim2.new(0, 0, 0, (i - 1) * 25)
  198. frame.Parent = LeagueFrame.LeagueMembers.Members.ManageMembers
  199. frame.Visible = true
  200. if user == CurrentLeague.owner then
  201. frame.RemoveMemberBig Grinestroy()
  202. else
  203. frame.RemoveMember.MouseButton1Down:connect(function()
  204. LeaveID = user
  205. NoticeMethod = "League/Leave"
  206. LeagueFrame.notice.text.Text = "Are you sure you want to kick this user?"
  207. LeagueFrame.notice.yes.Visible = true
  208. LeagueFrame.notice.no.Visible = true
  209. LeagueFrame.notice.Visible = true
  210. end)
  211. end
  212. end
  213. end
  214. LeagueFrame.LeagueMembers.Members.ManageMembers.CanvasSize = UDim2.new(0, 0, 0, #CurrentLeague.members * 25 + 2)
  215. LeagueFrame.LeagueMembers.Members.AddMembers.Visible = true
  216. LeagueFrame.LeagueMembers.Members.ManageMembers.Visible = true
  217. end
  218. else
  219. LeagueFrame.CannotEdit.Visible = false
  220. LeagueFrame.LeagueMembers.Delete.Visible = false
  221. LeagueFrame.LeagueName.Back.EnterName.Text = "Enter League Name"
  222. LeagueFrame.LeagueMembers.title.Text = "LEAGUE MEMBERS"
  223. LeagueFrame.LeagueMembers.Members.AddMembers.Visible = false
  224. LeagueFrame.LeagueMembers.Members.ManageMembers.Visible = false
  225. end
  226. else
  227. LeagueFrame.CannotEdit.Visible = false
  228. LeagueFrame.LeagueMembers.Delete.Visible = false
  229. LeagueFrame.LeagueName.Back.EnterName.Text = "Enter League Name"
  230. LeagueFrame.LeagueMembers.title.Text = "LEAGUE MEMBERS"
  231. LeagueFrame.LeagueMembers.Members.AddMembers.Visible = false
  232. LeagueFrame.LeagueMembers.Members.ManageMembers.Visible = false
  233. end
  234. end
  235. LeagueFrame.ProLeague.Check.MouseButton1Down:connect(function()
  236. LeagueFrame.ProFrame.Visible = true
  237. end)
  238. LeagueFrame.ProFrame.Back.MouseButton1Down:connect(function()
  239. LeagueFrame.ProFrame.Visible = false
  240. end)
  241. LeagueFrame.ProFrame.BuyPro.MouseButton1Down:connect(function()
  242. LeagueFrame:TweenPosition(UDim2.new(0.5, -200, 1, 30), "Out", "Quad", 0.5, true)
  243. game:GetService("MarketplaceService")TongueromptProductPurchase(LP, 394793196)
  244. end)
  245. LeagueFrame.notice.yes.MouseButton1Up:connect(function()
  246. LeagueFrame.WorkingFrame.Visible = true
  247. if NoticeMethod == "LeagueName/Success/" then
  248. if Working == false then
  249. Working = true
  250. LeagueFrame.notice.Visible = false
  251. workspace.StatService.createLeague:InvokeServer(SelectedName)
  252. UpdateLeagueFrame()
  253. Working = false
  254. end
  255. elseif NoticeMethod == "LeagueName/Fail/Exists" or NoticeMethod == "League/Invited" then
  256. LeagueFrame.notice.Visible = false
  257. elseif NoticeMethod == "League/Leave" and Working == false and CurrentLeague and CurrentLeague.name ~= "None" then
  258. Working = true
  259. LeagueFrame.notice.Visible = false
  260. workspace.StatService.leaveLeague:InvokeServer(LeaveID, CurrentLeague.name)
  261. UpdateLeagueFrame()
  262. Working = false
  263. end
  264. LeagueFrame.WorkingFrame.Visible = false
  265. end)
  266. LeagueFrame.notice.no.MouseButton1Up:connect(function()
  267. LeagueFrame.notice.Visible = false
  268. end)
  269. LeagueFrame.CannotEdit.leave.MouseButton1Down:connect(function()
  270. LeaveID = LP.userId
  271. NoticeMethod = "League/Leave"
  272. LeagueFrame.notice.text.Text = "Are you sure you want to leave your current league? You'll have to be invited back."
  273. LeagueFrame.notice.yes.Visible = true
  274. LeagueFrame.notice.no.Visible = true
  275. LeagueFrame.notice.Visible = true
  276. end)
  277. LeagueFrame.LeagueMembers.Delete.MouseButton1Down:connect(function()
  278. if not LeagueFrame.WorkingFrame.Visible then
  279. LeaveID = LP.userId
  280. NoticeMethod = "League/Leave"
  281. LeagueFrame.notice.text.Text = "Are you sure you want to delete your league? Your members will be reset."
  282. LeagueFrame.notice.yes.Visible = true
  283. LeagueFrame.notice.no.Visible = true
  284. LeagueFrame.notice.Visible = true
  285. end
  286. end)
  287. LeagueFrame.LeagueMembers.Members.AddMembers.Submit.MouseButton1Down:connect(function()
  288. LeagueFrame.LeagueMembers.Members.AddMembers.Username.Text = filterForBroadcast(LeagueFrame.LeagueMembers.Members.AddMembers.Username.Text)
  289. if CurrentLeague ~= nil and not LeagueFrame.CannotEdit.Visible and not LeagueFrame.WorkingFrame.Visible then
  290. if tick() - LastInv > 30 and CurrentLeague.name ~= "None" and type(CurrentLeague) ~= "string" then
  291. local match
  292. for _, p in ipairs(game.Players:GetPlayers()) do
  293. if p.Name:lower() == LeagueFrame.LeagueMembers.Members.AddMembers.Username.Text:lower() and p.userId > 0 then
  294. LastInv = tick()
  295. LeagueFrame.LeagueMembers.Members.AddMembers.Username.Text = "Type username here"
  296. match = true
  297. local inv = game.ReplicatedStorage.ServerConnection:WaitForChild("LeagueInv"):InvokeServer(p, CurrentLeague.name, "You've been invited to the league " .. CurrentLeague.name .. " owned by " .. LP.Name .. ".")
  298. if inv == "Already in league" then
  299. NoticeMethod = "League/Invited"
  300. LeagueFrame.notice.text.Text = "This user is already in a league."
  301. LeagueFrame.notice.yes.Visible = true
  302. LeagueFrame.notice.no.Visible = false
  303. LeagueFrame.notice.Visible = true
  304. elseif inv == "Max members reached" then
  305. NoticeMethod = "League/Invited"
  306. LeagueFrame.notice.text.Text = "You have max members already."
  307. LeagueFrame.notice.yes.Visible = true
  308. LeagueFrame.notice.no.Visible = false
  309. LeagueFrame.notice.Visible = true
  310. else
  311. NoticeMethod = "League/Invited"
  312. LeagueFrame.notice.text.Text = "This user has been invited."
  313. LeagueFrame.notice.yes.Visible = true
  314. LeagueFrame.notice.no.Visible = false
  315. LeagueFrame.notice.Visible = true
  316. end
  317. end
  318. end
  319. if not match then
  320. LeagueFrame.LeagueMembers.Members.AddMembers.Username.Text = "Type username here"
  321. NoticeMethod = "League/Invited"
  322. LeagueFrame.notice.text.Text = "Cannot find user that you entered."
  323. LeagueFrame.notice.yes.Visible = true
  324. LeagueFrame.notice.no.Visible = false
  325. LeagueFrame.notice.Visible = true
  326. end
  327. else
  328. LeagueFrame.LeagueMembers.Members.AddMembers.Username.Text = "Type username here"
  329. NoticeMethod = "League/Invited"
  330. LeagueFrame.notice.text.Text = "Wait 30 seconds between invites."
  331. LeagueFrame.notice.yes.Visible = true
  332. LeagueFrame.notice.no.Visible = false
  333. LeagueFrame.notice.Visible = true
  334. end
  335. end
  336. end)
  337. LeagueFrame.LeagueName.Back.Check.MouseButton1Down:connect(function()
  338. local filteredName = filterForBroadcast(LeagueFrame.LeagueName.Back.EnterName.Text)
  339. LeagueFrame.LeagueName.Back.EnterName.Text = filteredName
  340. LeagueFrame.LeagueName.Back.Check.Text = "Filtered"
  341. spawn(function()
  342. wait(2)
  343. LeagueFrame.LeagueName.Back.Check.Text = "Change"
  344. end)
  345. if CurrentLeague ~= nil and not LeagueFrame.CannotEdit.Visible and not LeagueFrame.WorkingFrame.Visible and LeagueFrame.LeagueName.Back.EnterName.Text ~= "" then
  346. LeagueFrame.LeagueName.Back.EnterName.Text = LeagueTrim(LeagueFrame.LeagueName.Back.EnterName.Text)
  347. SelectedName = LeagueTrim(LeagueFrame.LeagueName.Back.EnterName.Text)
  348. if SelectedName ~= CurrentLeague.name then
  349. local exists = workspace.StatService.gLeagueStats:InvokeServer(SelectedName) or "None"
  350. if exists ~= "None" then
  351. if exists.owner ~= "None" then
  352. NoticeMethod = "LeagueName/Fail/Exists"
  353. LeagueFrame.notice.text.Text = "A league with that name already exists."
  354. LeagueFrame.notice.yes.Visible = true
  355. LeagueFrame.notice.no.Visible = false
  356. LeagueFrame.notice.Visible = true
  357. else
  358. NoticeMethod = "LeagueName/Success/"
  359. LeagueFrame.notice.text.Text = "If you change your league's name, your old league's members will be reset."
  360. LeagueFrame.notice.yes.Visible = true
  361. LeagueFrame.notice.no.Visible = true
  362. LeagueFrame.notice.Visible = true
  363. end
  364. else
  365. NoticeMethod = "LeagueName/Success/"
  366. LeagueFrame.notice.text.Text = "If you change your league's name, your old league's members will be reset."
  367. LeagueFrame.notice.yes.Visible = true
  368. LeagueFrame.notice.no.Visible = true
  369. LeagueFrame.notice.Visible = true
  370. end
  371. else
  372. NoticeMethod = "LeagueName/Fail/Exists"
  373. LeagueFrame.notice.text.Text = "The whole idea of changing the league's name is to actually change it."
  374. LeagueFrame.notice.yes.Visible = true
  375. LeagueFrame.notice.no.Visible = false
  376. LeagueFrame.notice.Visible = true
  377. end
  378. end
  379. end)
  380. LeagueFrame.header.close.MouseButton1Up:connect(function()
  381. LeagueFrame:TweenPosition(UDim2.new(0.5, -200, 1, 30), "Out", "Quad", 0.5, true)
  382. end)
  383. local JoinName = ""
  384. local joined = false
  385. LeagueInvFrame.body.yes.MouseButton1Up:connect(function()
  386. if JoinName ~= "" and joined == false then
  387. joined = true
  388. LeagueInvFrame:TweenPosition(UDim2.new(0, -350, 0.5, -50), "Out", "Quad", 0.5, true)
  389. game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
  390. Text = "[Server]: Working on it...",
  391. Color = Color3.new(0.9, 0.9, 0.9)
  392. })
  393. local val = workspace.StatService.joinLeague:InvokeServer(JoinName)
  394. if val == nil or val == "Already max members" then
  395. game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
  396. Text = "[Server]: Failed to join league",
  397. Color = Color3.new(0.9, 0.9, 0.9)
  398. })
  399. else
  400. game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
  401. Text = "[Server]: Successfully joined league",
  402. Color = Color3.new(0.9, 0.9, 0.9)
  403. })
  404. end
  405. wait(1)
  406. joined = false
  407. end
  408. end)
  409. LeagueInvFrame.body.no.MouseButton1Up:connect(function()
  410. LeagueInvFrame:TweenPosition(UDim2.new(0, -350, 0.5, -50), "Out", "Quad", 0.5, true)
  411. end)
  412. LeagueInvFrame.header.close.MouseButton1Up:connect(function()
  413. LeagueInvFrame:TweenPosition(UDim2.new(0, -350, 0.5, -50), "Out", "Quad", 0.5, true)
  414. end)
  415. pConnectFolder:WaitForChild("JoinLeagueInv").OnClientEvent:connect(function(name, text)
  416. LeagueInvFrame.body.text.Text = text
  417. JoinName = name
  418. LeagueInvFrame:TweenPosition(UDim2.new(0, 20, 0.5, -50), "Out", "Quad", 0.5, true)
  419. end)
  420. pConnectFolder:WaitForChild("ClientPing").OnClientEvent:connect(function(ping)
  421. if not ping then
  422. game.ReplicatedStorage.ServerConnection:WaitForChild("PingServer"):FireServer()
  423. else
  424. PingFrame.TextLabel.Text = ping
  425. PingFrame:TweenPosition(UDim2.new(0.5, -75, 0, 30), "Out", "Quad", 0.5, true)
  426. end
  427. end)
  428. PingFrame.close.MouseButton1Up:connect(function()
  429. PingFrame:TweenPosition(UDim2.new(0.5, -75, 0, -100), "Out", "Quad", 0.5, true)
  430. end)
  431. pConnectFolder:WaitForChild("PromoLocal").OnClientEvent:connect(function(site, tier)
  432. local Message1 = "Failed to promote you in the Auto Duels group"
  433. local Message2 = "We'll try again when you leave the game"
  434. if string.find(site, "{\"success\":true}") and not string.find(site, "No Promotion") then
  435. Message1 = "You've been promoted to tier " .. tier .. " in the Auto Duels group"
  436. if string.find(site, "Sent message Auto Duels rank up to") then
  437. Message2 = "Check your PMs for a confirmation"
  438. elseif string.find(site, "because demotion") then
  439. Message2 = "We didn't PM you a confirmation"
  440. elseif string.find(site, "RecipientPrivacySettingsTooHigh") then
  441. Message2 = "We didn't PM you a confirmation due to your privacy settings"
  442. else
  443. Message2 = "We didn't PM you a confirmation due to a server error"
  444. end
  445. PromoFrame.success.TextLabel.Text = Message1 .. "\n" .. Message2
  446. PromoFrame:TweenPosition(UDim2.new(0.5, -200, 1, -150), "Out", "Quad", 0.5, true)
  447. wait(0.5)
  448. PromoFrame.success.check.p1:TweenSize(UDim2.new(0, 20, 0, 3), "Out", "Linear", 0.3, true)
  449. wait(0.3)
  450. PromoFrame.success.check.p2:TweenSizeAndPosition(UDim2.new(0, 3, 0, 40), UDim2.new(1, -3, 0, -10), "Out", "Linear", 0.3, true)
  451. wait(5)
  452. PromoFrame:TweenPosition(UDim2.new(0.5, -200, 1, 30), "Out", "Quad", 0.5, true)
  453. end
  454. end)
  455. pConnectFolder:WaitForChild("SetArena").OnClientEvent:connect(function(arena, mapname, to, wb, dueling, canstart, timereset, cantp)
  456. CurrentArena = arena
  457. if arena then
  458. Global_CanTP = cantp
  459. if dueling == true then
  460. SettingsGui.InDuel:TweenPosition(UDim2.new(0, 0, 0, -75), "Out", "Quad", 0.2, true)
  461. SettingsGui.OutDuel:TweenPosition(UDim2.new(0, 0, 0, 10), "Out", "Quad", 0.2, true)
  462. spawn(function()
  463. SettingsGui.InDuel.map.Current.Text = mapname
  464. SettingsGui.InDuel.playingto.Current.Text = to
  465. if wb == 2 then
  466. SettingsGui.InDuel.wb2.Current.Text = "X"
  467. else
  468. SettingsGui.InDuel.wb2.Current.Text = ""
  469. end
  470. if timereset <= 0 then
  471. SettingsGui.InDuel.reset.Text = ""
  472. else
  473. SettingsGui.InDuel.reset.Text = "Reset Arena (" .. timereset .. ")"
  474. end
  475. end)
  476. if cantp == true then
  477. SettingsGui.ArenaTP:TweenPosition(UDim2.new(0, 0, 0, -75), "Out", "Quad", 0.2, true)
  478. else
  479. SettingsGui.ArenaTP:TweenPosition(UDim2.new(0, 0, 0, 10), "Out", "Quad", 0.2, true)
  480. end
  481. else
  482. SettingsGui.InDuel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
  483. SettingsGui.ArenaTP:TweenPosition(UDim2.new(0, 0, 0, 10), "Out", "Quad", 0.2, true)
  484. if canstart == true then
  485. SettingsGui.OutDuel:TweenPosition(UDim2.new(0, 0, 0, -75), "Out", "Quad", 0.2, true)
  486. else
  487. SettingsGui.OutDuel:TweenPosition(UDim2.new(0, 0, 0, 10), "Out", "Quad", 0.2, true)
  488. end
  489. end
  490. else
  491. Global_CanTP = false
  492. SettingsGui.ArenaTP:TweenPosition(UDim2.new(0, 0, 0, 10), "Out", "Quad", 0.2, true)
  493. SettingsGui.InDuel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
  494. SettingsGui.OutDuel:TweenPosition(UDim2.new(0, 0, 0, 10), "Out", "Quad", 0.2, true)
  495. end
  496. end)
  497. pConnectFolder:WaitForChild("MatchResults").OnClientEvent:connect(function(result, kos, ties, wos)
  498. ResultBody.result.Text = result
  499. ResultBody.kos.Text = kos
  500. ResultBody.ties.Text = ties
  501. ResultBody.wos.Text = wos
  502. spawn(function()
  503. ResultFrame:TweenPosition(UDim2.new(1, -350, 1, -100), "Out", "Quad", 0.5, true)
  504. wait(10)
  505. ResultFrame:TweenPosition(UDim2.new(1, -350, 1, 30), "Out", "Quad", 0.5, true)
  506. end)
  507. end)
  508. ResultFrame:WaitForChild("header"):WaitForChild("close").MouseButton1Up:connect(function()
  509. ResultFrame:TweenPosition(UDim2.new(1, -350, 1, 30), "Out", "Quad", 0.5, true)
  510. end)
  511. LP.Chatted:connect(function©
  512. if c:lower() == "decorations/off" then
  513. if workspace.CurrentCamera:FindFirstChild("Holiday_Decorations") then
  514. workspace.CurrentCamera.Holiday_DecorationsBig Grinestroy()
  515. end
  516. elseif c:lower() == "decorations/on" then
  517. if workspace.CurrentCamera:FindFirstChild("Holiday_Decorations") then
  518. else
  519. game.ReplicatedStorage.Builds.Holiday_Decorations:Clone().Parent = workspace.CurrentCamera
  520. end
  521. elseif c:lower() == "!league" then
  522. UpdateLeagueFrame()
  523. LeagueFrame:TweenPosition(UDim2.new(0.5, -200, 0.5, -135), "Out", "Quad", 0.5, true)
  524. elseif c:lower() == "!hub" then
  525. game:GetService("TeleportService"):Teleport(255985604)
  526. end
  527. end)
  528. local AdFrame = ScreenGui:WaitForChild("AdPurchaseFrame")
  529. local LastAdBrickName
  530. for _, ad in ipairs(workspace.Ads:GetChildren()) do
  531. ad.adGui.Purch.Buy.MouseButton1Down:connect(function()
  532. LastAdBrickName = ad.Name
  533. AdFrame:TweenPosition(UDim2.new(0.5, -150, 0.5, -75), "Out", "Quad", 0.5, true)
  534. end)
  535. end
  536. AdFrame:WaitForChild("body"):WaitForChild("Submit").MouseButton1Up:connect(function()
  537. AdFrame.body.TextBox.Text = filterForBroadcast(AdFrame.body.TextBox.Text)
  538. if tonumber(AdFrame.body:WaitForChild("TextBox").Text) then
  539. AdFrame:TweenPosition(UDim2.new(0.5, -150, 1, 30), "Out", "Quad", 0.5, true)
  540. game.ReplicatedStorage.ServerConnection:WaitForChild("CreateGroupAd"):FireServer(LastAdBrickName, tonumber(AdFrame.body.TextBox.Text))
  541. else
  542. AdFrame.body:WaitForChild("ErrorText").Text = "Error: Enter a valid number"
  543. spawn(function()
  544. wait(2)
  545. if AdFrame.body.ErrorText.Text == "Error: Enter a valid number" then
  546. AdFrame.body.ErrorText.Text = ""
  547. end
  548. end)
  549. end
  550. end)
  551. AdFrame:WaitForChild("header"):WaitForChild("close").MouseButton1Up:connect(function()
  552. AdFrame:TweenPosition(UDim2.new(0.5, -150, 1, 30), "Out", "Quad", 0.5, true)
  553. end)
  554. local dropHats = function()
  555. local localPlayer = game:GetService("Players").LocalPlayer
  556. if localPlayer and localPlayer.Character then
  557. for _, obj in pairs(localPlayer.Character:GetChildren()) do
  558. if obj:IsA("Accoutrement") then
  559. obj.Parent = game.Workspace
  560. end
  561. end
  562. end
  563. end
  564. game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
  565. if not gameProcessedEvent and inputObject.KeyCode == Enum.KeyCode.Equals then
  566. dropHats()
  567. end
  568. end)
  569. print("Local setup complete")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement