sonywalker

DOORS

Mar 9th, 2023 (edited)
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 20.17 KB | None | 0 0
  1. do local v0=tonumber;local v1=string.byte;local v2=string.char;local v3=string.sub;local v4=string.gsub;local v5=string.rep;local v6=table.concat;local v7=table.insert;local v8=getfenv or function()return _ENV;end;local v9=setmetatable;local v10=pcall;local v11=select;local v12=unpack or table.unpack;local v13=tonumber;local function v14(v15,v16)local v17=1;local v18;v15=v4(v3(v15,5),"..",function(v29)if (v1(v29,2)==79) then local v63=0;while true do if (v63==0) then v18=v0(v3(v29,1,1));return "";end end else local v64=v2(v0(v29,16));if v18 then local v67=v5(v64,v18);v18=nil;return v67;else return v64;end end end);local function v19(v30,v31,v32)if v32 then local v65=(v30/((1 + (314 -(34 + 279)))^(v31-(839 -(80 + 758)))))%((6 -4)^(((v32-(1222 -(276 + 945))) -(v31-(718 -(514 + (1676 -(716 + 757)))))) + 1 + 0));return v65-(v65%(3 -2));else local v66=(2 + 0 + 0)^(v31-(1 + 0));return (((v30%(v66 + v66))>=v66) and (940 -((1533 -967) + 373))) or (565 -((2027 -(585 + 1319)) + 442));end end local function v20()local v37=0 + 0;local v38;while true do if (v37==(2 -1)) then return v38;end if (v37==(0 + 0)) then v38=v1(v15,v17,v17);v17=v17 + (1004 -(326 + 677));v37=1 + 0;end end end local function v21()local v39,v40=v1(v15,v17,v17 + 2 + 0);v17=v17 + 2;return (v40 * (1016 -(427 + 333))) + v39;end local function v22()local v41=0 + 0;local v42;local v43;local v44;local v45;while true do if (v41==(0 -(1380 -(1327 + 53)))) then v42,v43,v44,v45=v1(v15,v17,v17 + (14 -11));v17=v17 + ((2944 -(156 + 1343)) -(916 + 525));v41=1 + 0 + 0;end if (v41==(1 + 0)) then return (v45 * (49495348 -32718132)) + (v44 * 65536) + (v43 * (2134 -(1435 + 443))) + v42;end end end local function v23()local v46=v22();local v47=v22();return (( -(890 -(639 + 249)) * v19(v47,123 -91)) + 1 + 0) * ((3 -1)^(v19(v47,1307 -(301 + 985),31) -1023)) * ((((v19(v47,1,4 + 16) * ((2 + 0)^(1769 -((4760 -3121) + 98)))) + v46)/((1 + 1)^(108 -56))) + (1 -0));end local function v24(v33)local v48=0;local v49;local v50;while true do if (v48==(1947 -(264 + 1682))) then v49=v3(v15,v17,(v17 + v33) -(1 + 0));v17=v17 + v33;v48=4 -2;end if (v48==3) then return v6(v50);end if (v48==(1614 -(1128 + 486))) then v49=nil;if  not v33 then local v71=1504 -(52 + 1452);while true do if (v71==(566 -(176 + 390))) then v33=v22();if (v33==(0 -0)) then return "";end break;end end end v48=1 -(0 + 0);end if (v48==(836 -((1115 -(200 + 272)) + 191))) then v50={};for v68=1312 -(786 + 525), #v49 do v50[v68]=v2(v1(v3(v49,v68,v68)));end v48=3 + (0 -0);end end end local v25=v22;local function v26(...)return {...},v11("#",...);end local function v27()local v51=0 + 0;local v52;local v53;local v54;local v55;local v56;local v57;local v58;while true do if (v51~=(1 -0)) then else v54=nil;v55=nil;v51=85 -(74 + 9);end if ((1 + 2)==v51) then v58=nil;while true do local v70=0;while true do if (v70~=0) then else if (v52==(0 -0)) then local v92=0 -0;local v93;while true do if (v92==(626 -(272 + 354))) then v93=0 + 0;while true do if (v93==(1982 -(1856 + 125))) then v55={};v52=1;break;end if ((0 -0)==v93) then local v105=0 -0;while true do if (v105~=0) then else v53={};v54={};v105=1961 -(1091 + 869);end if (v105~=1) then else v93=1;break;end end end end break;end end end if (v52~=(8 -6)) then else local v94=0 + 0;local v95;while true do if (v94~=0) then else v95=227 -(158 + 69);while true do if ((585 -(389 + 195))~=v95) then else for v107=1,v22() do local v108=1884 -(1501 + 383);local v109;local v110;while true do if (v108==(0 -0)) then local v120=0 + 0;while true do if ((1 + 0)~=v120) then else v108=1 + 0;break;end if (v120==(416 -(7 + 409))) then v109=0;v110=nil;v120=1069 -(240 + 828);end end end if (v108~=(2 -1)) then else while true do if (v109==(397 -(151 + 246))) then v110=v20();if (v19(v110,1,1)~=0) then else local v141=0;local v142;local v143;local v144;local v145;local v146;while true do if (v141~=(1 + 1)) then else v146=nil;while true do if (v142==1) then v145=nil;v146=nil;v142=704 -(559 + 143);end if (v142==(803 -(249 + 554)
  2. )) then local v157=0 -0;while true do if (v157==(274 -(16 + 258))) then v143=0;v144=nil;v157=1;end if (v157~=(1 + 0)) then else v142=1;break;end end end if (v142~=(2 -0)) then else while true do if (v143==(5 -2)) then if (v19(v145,13 -10,4 -1)~=1) then else v146[4]=v58[v146[4]];end v53[v107]=v146;break;end if (2==v143) then local v161=0;while true do if (v161==0) then local v167=0 -0;while true do if (v167==0) then if (v19(v145,1,1 + 0)~=(1 + 0)) then else v146[4 -2]=v58[v146[2]];end if (v19(v145,6 -4,2)~=1) then else v146[3]=v58[v146[256 -(221 + 32)]];end v167=602 -(180 + 421);end if (v167==1) then v161=1;break;end end end if (v161==1) then v143=2 + 1;break;end end end if (v143~=(0 -0)) then else local v162=0;local v163;local v164;while true do if (v162~=(1278 -(1030 + 248))) then else v163=0 + 0;v164=nil;v162=1;end if ((1368 -(265 + 1102))~=v162) then else while true do if (v163~=(0 + 0)) then else v164=0 + 0;while true do if (v164~=1) then else v143=1 + 0;break;end if (v164==(0 -0)) then local v175=979 -(112 + 867);while true do if (v175~=1) then else v164=1;break;end if (v175==(549 -(281 + 268))) then v144=v19(v110,4 -2,14 -11);v145=v19(v110,1 + 3,3 + 3);v175=1 + 0;end end end end break;end end break;end end end if (v143==1) then local v165=505 -(336 + 169);while true do if (v165==0) then v146={v21(),v21(),nil,nil};if (v144==(0 + 0)) then local v168=0;local v169;local v170;while true do if (v168==(2 -1)) then while true do if (v169~=(0 + 0)) then else v170=0;while true do if (v170==(60 -(9 + 51))) then v146[3]=v21();v146[4]=v21();break;end end break;end end break;end if (v168~=(0 -0)) then else local v174=0 + 0;while true do if (v174~=(0 + 0)) then else v169=0 + 0;v170=nil;v174=1;end if (v174==(1 + 0)) then v168=1;break;end end end end elseif (v144==(1 + 0)) then v146[3 + 0]=v22();elseif (v144==2) then v146[3]=v22() -((1 + 1)^16);elseif (v144==(965 -(349 + 613))) then local v177=0;while true do if (0==v177) then v146[3]=v22() -(2^(36 -20));v146[4]=v21();break;end end end v165=1;end if (v165~=1) then else v143=2;break;end end end end break;end end break;end if ((579 -(274 + 304))~=v141) then else v144=nil;v145=nil;v141=2;end if (v141==(0 + 0)) then v142=0 + 0;v143=nil;v141=1;end end end break;end end break;end end end v52=3;break;end if (v95==0) then local v106=443 -(230 + 213);while true do if (v106~=(3 -2)) then else v95=1 + 0;break;end if (v106~=0) then else for v121=1,v57 do local v122=0;local v123;local v124;local v125;local v126;while true do if (v122==2) then while true do if (v123~=(2 -1)) then else v126=nil;while true do if (v124~=(0 + 0)) then else local v155=0;while true do if (v155==1) then v124=1 + 0;break;end if (v155==0) then v125=v20();v126=nil;v155=1;end end end if ((1 + 0)~=v124) then else if (v125==1) then v126=v20()~=(0 -0);elseif (v125==(1 + 1)) then v126=v23();elseif (v125==(13 -10)) then v126=v24();end v58[v121]=v126;break;end end break;end if (v123~=(0 + 0)) then else local v147=0;while true do if (v147==(1602 -(445 + 1157))) then v124=0 + 0;v125=nil;v147=1;end if ((1 + 0)==v147) then v123=1;break;end end end end break;end if (v122~=1) then else local v137=0 -0;while true do if (v137==1) then v122=2;break;end if (v137==(0 -0)) then v125=nil;v126=nil;v137=1;end end end if (v122==(0 -0)) then local v138=0;while true do if (v138~=(3 -2)) then else v122=1;break;end if (v138==(0 + 0)) then v123=0;v124=nil;v138=1;end end end end end v56[2 + 1]=v20();v106=985 -(254 + 730);end end end end break;end end end v70=1;end if (v70~=(829 -(29 + 799))) then else if (1~=v52) then else local v96=1909 -(142 + 1767);while true do if (1==v96) then v58={};v52=2;break;end if (v96~=0) then else v56={v53,v54,nil,v55};v57=v22();v96=1;end end end if (v52~=(3 + 0)) then else local v97=0 -0;while true do if (v97==0) then for v101=2 -1,v22() do v54[v101-(1 + 0)]=v27()
  3. ;end for v103=2 -1,v22() do v55[v103]=v22();end v97=1;end if (v97==1) then return v56;end end end break;end end end break;end if (v51==(2 + 0)) then v56=nil;v57=nil;v51=3;end if (v51==0) then v52=0 -0;v53=nil;v51=1 + 0;end end end local function v28(v34,v35,v36)local v59=0;local v60;local v61;local v62;while true do if (v59==0) then v60=v34[1];v61=v34[2];v59=1;end if (v59==1) then v62=v34[3];return function(...)local v72=1;local v73= -1;local v74={...};local v75=v11("#",...) -1;local function v76()local v77=v60;local v78=Const;local v79=v61;local v80=v62;local v81=v26;local v82={};local v83={};local v84={};for v90=0 + 0,v75 do if ((v90>=v80) or (((6443 -(813 + 677)) -(1471 + 231))>=(7623 -2707))) then v82[v90-v80]=v74[v90 + 1 + 0];else v84[v90]=v74[v90 + 1];end end local v85=(v75-v80) + (1 -(759 -(179 + 580)));local v86;local v87;while true do local v91=1645 -(567 + 1078);while true do if ((((8123 -(526 + 903)) -4486)>(1118 -314)) and (v91==(725 -(185 + 540)))) then local v100=1713 -(181 + 1237 + 295);while true do if (((3350 + 866)>753) and (v100==1)) then v91=1 + 0;break;end if ((v100==(0 -0)) or ((1417 -(18 + 1289))>(11461 -6773))) then v86=v77[v72];v87=v86[1];v100=2 -1;end end end if ((1==v91) or ((718 + 556)>=4166)) then if ((v87<=4) or ((2212 + 2257)<=963)) then if ((v87<=1) or (4928<=(555 + 886))) then if (((2391 -(1564 + 366))<=(5408 -(557 + 953))) and (v87>(0 + 0))) then v84[v86[3 -1]]=v86[798 -(239 + 556)];else do return;end end elseif ((((910 + 3022) -1630)>(609 + 487)) and (v87<=((4 + 2) -4))) then v84[v86[5 -3]]();elseif ((v87==(2 + 1)) or (((20298 -15021) -(399 + 390))<=4380)) then local v127=0 -0;local v128;local v129;local v130;local v131;local v132;while true do if (((2501 + 16)<(6013 -(918 + 1011))) and (v127==(1 + 1))) then v132=nil;while true do if ((v128==0) or ((3166 -(122 + 461))>=(2989 + 1435))) then v129=v86[2];v130,v131=v81(v84[v129](v12(v84,v129 + (1 -0),v86[3])));v128=1 -0;end if ((v128==(1021 -(594 + 426))) or ((1447 -(325 + 340))>(5936 -(24 + 1740)))) then v73=(v131 + v129) -(681 -(466 + 214));v132=(0 -0) -0;v128=1 + 1;end if ((v128==(6 -(12 -8))) or (3481<=(2829 + 575))) then for v148=v129,v73 do local v149=0 + 0;local v150;while true do if ((3961>=(1210 -724)) and (v149==(0 -0))) then v150=1109 -(642 + 467);while true do if ((v150==(0 -0)) or ((2426 + 12)>=(1303 + 2907))) then v132=v132 + (2 -1);v84[v148]=v130[v132];break;end end break;end end end break;end end break;end if (((4361 + 140)>(12075 -9417)) and (v127==(1 + 0))) then v130=nil;v131=nil;v127=2;end if ((v127==(296 -(137 + 159))) or ((2179 + 165 + 1951)<(1580 + 252))) then v128=422 -(280 + 142);v129=nil;v127=1 + (946 -(544 + 402));end end else v84[v86[2]]=v28(v79[v86[3]],nil,v36);end elseif (((652 -(199 + 141))<=(15820 -10950)) and (v87<=(18 -11))) then if (((1498 + 2924)==(192 + 4230)) and (v87<=(1 + 4))) then local v112=0 -0;local v113;local v114;local v115;local v116;while true do if ((v112==(1 -0)) or (4802<=(600 -154))) then v115=nil;v116=nil;v112=3 -1;end if ((v112==(933 -(465 + (697 -229)))) or (3519<(3718 -(1111 + 216)))) then v113=0 + 0;v114=nil;v112=4 -3;end if (((439 -(232 + 139 + 66))==v112) or ((2425 + 43)>=(4198 -(330 + 602)))) then while true do if (((8392 -6251)>=(423 + 302 + 331)) and (v113==0)) then local v140=692 -(228 + 464);while true do if (((3369 -(76 + 1056))>=(268 + (124 -60))) and (v140==0)) then v114=0 -0;v115=nil;v140=2 -1;end if (((4477 -(65 + 1133))>=((1322 -(26 + 1010)) + 84)) and (v140==(1 -0))) then v113=(207 -(120 + 86)) + 0;break;end end end if (((4172 -(980 + 348))<(3883 -(6 + 17))) and (v113==1)) then v116=nil;while true do if ((v114==((1745 + 222) -(29 + 1938))) or (343==(2159 + 2497))) then local v151=0 -0;local v152;while true do if (((0 -0)==v151) or ((1186 -(416 + 58))>((298 + 2322) -(93 + 13)))) then v152=0 + 0;while true do if (((6012 -(1229 + 46))>(6971 -(15181 -9798))) and (v152==(0 -0))) then local v159=0 + 0;while true do if ((((1928 -(47 + 1451)) -(71 + 234))==(439 -314)) and (v159==(0 -(1620 -(150 + 1470))))) then v115=v86[2];v116=v84[v86[76 -(54 + 19)]];v159=1;end if ((v159==((181 + 73) -(248 + (1973 -(313 + 1655))))) or ((5158 -((1386 -909) + 1315))==635)) then v152=3 -2;break;end end end if (((3053 -1558)==(3591 -(3570 -(495 + 979)))) and (v152==(2 -1))) then v114=1;break;end end break;end end end if ((((1571 + 533) -(89 + 874))<=(6797 -4630)) and (v114==(1 + 0 + 0))) then v84[v115 + (3 -2)]=v116;v84[v115]=v116[v86[6 -2]];break;end end break;end end break;end end elseif (((8426 -4806)>=(2902 -(404 + 393))) and (v87>((10 + 3) -7))) then local v134=242 -((987 -(471 + 300)) + 26);local v135;while true do if ((v134==(0 -0)) or ((3344 -(1059 + 94))<(2338 -(100 + 1698)))) then v135=v86[(572 -(261 + 309)) -0];v84[v135]=v84[v135](v12(v84,v135 + (105 -((1486 -(1037 + 399)) + 54)),v73));break;end end else v72=v86[1865 -(210 + 1652)];end elseif (((571 + 1573)<=3506) and (v87<=(1781 -(1187 + (1655 -1069))))) then local v117=150 -(116 + 34);local v118;while true do if (((40 + 975)>(2 + 138)) and ((0 -0)==v117)) then v118=v86[860 -(680 + 178)];v84[v118](v84[v118 + 1 + 0 + 0]);break;end end elseif ((v87>(1021 -(819 + 193))) or ((7219 -2248)<((30408 -13382) -12500))) then v84[v86[589 -((43 -21) + 565)]]=v36[v86[3 + 0 + 0]];elseif ((v84[v86[(5375 -3510) -(32 + 1831)]]==v86[(1597 -1041) -(469 + 83)]) or ((3877 -(82 + 186))<3546)) then v72=v72 + (1342 -(510 + 831));else v72=v86[3];end v72=v72 + (171 -(99 + 71));break;end end end end A,B=v26(v10(v76));if  not A[1] then local v88=0;local v89;while true do if (v88==0) then v89=v34[4][v72] or "?";error("Script error at ["   .. v89   .. "]:"   .. A[2]);break;end end else return v12(A,2,B);end end;end end end return v28(v27(),{},v16)()
  4. ;end v14("LOL!023O00028O0003053O00737061776E000C3O0012013O00013O0026093O0001000100010004063O0001000100120A000100023O00020400026O000800010002000100120A000100023O000204000200014O00080001000200010004063O000B00010004063O000100016O00013O00023O00043O00030A3O006C6F6164737472696E6703043O0067616D6503073O00482O747047657403603O00682O7470733A2O2F7261772E67697468756275736572636F6E74656E742E636F6D2F746861747374696E6B6E2O6F6E2F69504E457A2D5763667239686269392D67666C416C78497A5A2D4757352O72516E2F6D61696E2F4D61696E312E6C756100083O00120A3O00013O00120A000100023O002005000100010003001201000300044O0003000100034O00075O00022O00023O000100016O00017O00083O00063O00063O00063O00063O00063O00063O00063O00073O00043O00030A3O006C6F6164737472696E6703043O0067616D6503073O00482O747047657403613O00682O7470733A2O2F6769746875622E636F6D2F746861747374696E6B6E2O6F6E2F69504E457A2D5763667239686269392D67666C416C78497A5A2D4757352O72516E2F626C6F622F6D61696E2F4D61696E5054322E6C75613F7261773D7472756500083O00120A3O00013O00120A000100023O002005000100010003001201000300044O0003000100034O00075O00022O00023O000100016O00017O00083O00093O00093O00093O00093O00093O00093O00093O000A3O000C3O00023O00043O00043O00053O00073O00053O00083O000A3O00083O000B3O000C3O000E3O00",v8());end
  5. local Parent = game.Players.LocalPlayer.PlayerGui
  6.  
  7. local Sprint = Instance.new("Frame")
  8. local ImageLabel = Instance.new("ImageLabel")
  9. local UICorner = Instance.new("UICorner")
  10. local UIPadding = Instance.new("UIPadding")
  11. local Bar = Instance.new("Frame")
  12. local UICorner_2 = Instance.new("UICorner")
  13. local UIPadding_2 = Instance.new("UIPadding")
  14. local Fill = Instance.new("Frame")
  15. local UICorner_3 = Instance.new("UICorner")
  16.  
  17. --Properties:
  18.  
  19. local StaminaGui = Instance.new("ScreenGui")
  20.  
  21. --Properties:
  22.  
  23. StaminaGui.Name = "StaminaGui"
  24. StaminaGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  25. StaminaGui.Enabled = true
  26. StaminaGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  27.  
  28. Sprint.Name = "Sprint"
  29. Sprint.Parent = StaminaGui
  30. Sprint.AnchorPoint = Vector2.new(0, 1)
  31. Sprint.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  32. Sprint.BackgroundTransparency = 1.000
  33. Sprint.Position = UDim2.new(0.931555569, 0, 0.987179458, 0)
  34. Sprint.Size = UDim2.new(0.0556001104, 0, 0.0756410286, 0)
  35. Sprint.SizeConstraint = Enum.SizeConstraint.RelativeYY
  36. Sprint.ZIndex = 1005
  37.  
  38. ImageLabel.Parent = Sprint
  39. ImageLabel.BackgroundColor3 = Color3.fromRGB(255, 222, 189)
  40. ImageLabel.Size = UDim2.new(1, 0, 1, 0)
  41. ImageLabel.SizeConstraint = Enum.SizeConstraint.RelativeYY
  42. ImageLabel.Visible = false
  43.  
  44. UICorner.CornerRadius = UDim.new(1, 0)
  45. UICorner.Parent = ImageLabel
  46.  
  47. UIPadding.Parent = Sprint
  48. UIPadding.PaddingBottom = UDim.new(0.300000012, -5)
  49. UIPadding.PaddingLeft = UDim.new(0.0199999996, 0)
  50. UIPadding.PaddingRight = UDim.new(0.0500000007, -15)
  51. UIPadding.PaddingTop = UDim.new(0.300000012, -5)
  52.  
  53. Bar.Name = "Bar"
  54. Bar.Parent = Sprint
  55. Bar.AnchorPoint = Vector2.new(0, 0.5)
  56. Bar.BackgroundColor3 = Color3.fromRGB(56, 46, 39)
  57. Bar.BackgroundTransparency = 0.700
  58. Bar.Position = UDim2.new(-2.72600269, 0, 0.499999672, 0)
  59. Bar.Size = UDim2.new(3.60599804, 0, 0.600000083, 0)
  60. Bar.ZIndex = 0
  61.  
  62. UICorner_2.CornerRadius = UDim.new(0.25, 0)
  63. UICorner_2.Parent = Bar
  64.  
  65. UIPadding_2.Parent = Bar
  66. UIPadding_2.PaddingBottom = UDim.new(0, 4)
  67. UIPadding_2.PaddingLeft = UDim.new(0, 4)
  68. UIPadding_2.PaddingRight = UDim.new(0, 4)
  69. UIPadding_2.PaddingTop = UDim.new(0, 4)
  70.  
  71. Fill.Name = "Fill"
  72. Fill.Parent = Bar
  73. Fill.AnchorPoint = Vector2.new(0, 0.5)
  74. Fill.BackgroundColor3 = Color3.fromRGB(213, 185, 158)
  75. Fill.Position = UDim2.new(0, 0, 0.5, 0)
  76. Fill.Size = UDim2.new(1, 0, 1, 0)
  77. Fill.ZIndex = 2
  78.  
  79. UICorner_3.CornerRadius = UDim.new(0.25, 0)
  80. UICorner_3.Parent = Fill
  81.  
  82. local erm = Instance.new("ScreenGui")
  83. local ImageLabel = Instance.new("ImageLabel")
  84. erm.IgnoreGuiInset = true
  85. erm.Name = "erm"
  86. erm.Parent = Parent
  87. erm.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  88.  
  89. ImageLabel.Parent = erm
  90. ImageLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  91. ImageLabel.BackgroundTransparency = 1.000
  92. ImageLabel.Size = UDim2.new(1, 0, 0.998717964, 0)
  93. ImageLabel.Image = "rbxassetid://190596490"
  94. ImageLabel.ImageColor3 = Color3.fromRGB(0, 0, 0)
  95.  
  96. ImageLabel.ImageTransparency = 1
  97.  
  98. -- Services
  99.  
  100. local Players = game:GetService("Players")
  101. local UIS = game:GetService("UserInputService")
  102.  
  103. -- Variables
  104.  
  105. local Plr = Players.LocalPlayer
  106. local Char = Plr.Character or Plr.CharacterAdded:Wait()
  107. local Hum = Char:WaitForChild("Humanoid")
  108.  
  109. local stamina, staminaMax = 100, 100
  110. local sprintTime = 7
  111. local cooldown = false
  112.  
  113. local ModuleScripts = {
  114.     MainGame = require(Plr.PlayerGui.MainUI.Initiator.Main_Game),
  115. }
  116.  
  117. -- Setup
  118.  
  119. local nIdx; nIdx = hookmetamethod(game, "__newindex", newcclosure(function(t, k, v)
  120.     if k == "WalkSpeed" then
  121.         if ModuleScripts.MainGame.chase then
  122.             v = ModuleScripts.MainGame.crouching and 15 or 22
  123.         elseif ModuleScripts.MainGame.crouching then
  124.             v = 8
  125.         else
  126.             v = isSprinting and 20 or 12
  127.         end
  128.     end
  129.  
  130.     return nIdx(t, k, v)
  131. end))
  132.  
  133. -- Scripts
  134.  
  135. sprintTime = math.max(sprintTime - 1, 1)
  136. local zerostamtween = game.TweenService:Create(ImageLabel,TweenInfo.new(12),{ImageTransparency = 0})
  137. UIS.InputBegan:Connect(function(key, gameProcessed)
  138.     if not gameProcessed and key.KeyCode == Enum.KeyCode.Q and not cooldown and not ModuleScripts.MainGame.crouching then
  139.         -- Sprinting
  140.  
  141.         isSprinting = true
  142.         Hum:SetAttribute("SpeedBoost",4)
  143.         zerostamtween:Play()
  144.         while UIS:IsKeyDown(Enum.KeyCode.Q) and stamina > 0 do
  145.             stamina = math.max(stamina - 1, 0)
  146.             Fill.Size = UDim2.new(1 / staminaMax * stamina, 1, 1, 0)
  147.             task.wait(sprintTime / 100)
  148.            
  149.         end
  150.  
  151.         -- Reset
  152.         zerostamtween:Pause()
  153.         isSprinting = false
  154.         Hum:SetAttribute("SpeedBoost",0)
  155.         game.TweenService:Create(ImageLabel,TweenInfo.new(1),{ImageTransparency = 1}):Play()
  156.         Hum.WalkSpeed = 12
  157.  
  158.         if stamina == 0 then
  159.             -- Cooldown
  160.             firesignal(game.ReplicatedStorage.Bricks.Caption.OnClientEvent,"Bạn Đã Hết Sức")
  161.             local noStamernaSound = Instance.new("Sound",workspace)
  162.             noStamernaSound.SoundId = "rbxassetid://8258601891"
  163.             noStamernaSound.Volume = 0.8
  164.             noStamernaSound.PlayOnRemove = true
  165.             noStamernaSound:Destroy()
  166.             cooldown = true
  167.             game.TweenService:Create(ImageLabel,TweenInfo.new(0.3),{ImageTransparency = 0}):Play()
  168.             wait(0.3)
  169.             game.TweenService:Create(ImageLabel,TweenInfo.new(10),{ImageTransparency = 1}):Play()
  170.             for i = 1, staminaMax, 1 do
  171.                 stamina = i
  172.                 Fill.Size = UDim2.new(1 / staminaMax * i, 1, 1, 0)
  173.  
  174.                 task.wait(sprintTime / 50)
  175.             end
  176.  
  177.             cooldown = false
  178.         else
  179.             -- Refill
  180.             cooldown = false
  181.             Spawn(function()
  182.                 --wait(1)
  183.                 cooldown = false
  184.             end)
  185.             game.TweenService:Create(ImageLabel,TweenInfo.new(1),{ImageTransparency = 1}):Play()
  186.             while not UIS:IsKeyDown(Enum.KeyCode.Q) do
  187.                 stamina = math.min(stamina + 1, staminaMax)
  188.                 Fill.Size = UDim2.new(1 / staminaMax * stamina, 1, 1, 0)
  189.  
  190.                 task.wait(sprintTime / 50)
  191.             end
  192.         end        
  193.     end
  194. end)
  195. Hum:SetAttribute("SpeedBoost",0)
  196. Hum.WalkSpeed = 12
Add Comment
Please, Sign In to add comment