Scriptorz5

gui(9)

May 5th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.21 KB | None | 0 0
  1. local/ -- shit
  2. --newLocalScript([[
  3. --Missing Scrolls RPG Map and GUI System
  4. --Load Local Functions and Variables
  5. pcall(function() _G.owl.Disabled=true end)
  6. pcall(function() _G.owlval=script.DSource.Value end)
  7. _G.owl=script
  8. if not qi then
  9. loadstring(game:service'Lighting'.Library.Value)()
  10. end
  11. _G.rmdx()
  12.  
  13.  
  14. --Wait For User
  15. repeat wait(0) until Players.LocalPlayer and Lighting:findFirstChild("")
  16. Mod = Lighting[""]
  17. Player = Players.LocalPlayer
  18. repeat wait() until Player.Character and Player:findFirstChild("leaderstats")
  19. Char = Player.Character
  20. repeat wait() until Player.Character:findFirstChild("Humanoid") and Player.Character.Humanoid.Health>0
  21. --Set Player Variables
  22. to = Char.Torso
  23. hu = Char.Humanoid
  24. he = Char.Head
  25. PlayerGui = Player.PlayerGui
  26. Backpack = Player.Backpack
  27. --leaderstats
  28. local lead=Player.leaderstats
  29. _G.l=lead
  30. local stats=lead.Stats
  31. local inven=lead.Inventory
  32. Entered=lead:findFirstChild("JustEntered") and lead.JustEntered or nil
  33. --Game Variables
  34. va="Value" --ew
  35. pcall(function() PlayerGui.RPGGui:Remove() end)
  36. pcall(function() PlayerGui.HealthGUI:Remove() end)
  37. gui = qi{"ScreenGui",PlayerGui,n="RPGGui"}
  38. frame=qi{"Frame",gui,s=ud(1,0,1,0),bgt=1}
  39. bigscr=qi{"ImageButton",nil,s=ud(1,0,1,0),bgt=1}
  40. repeat wait() until gui.AbsoluteSize.X~=0 -- what kind of computer has 0x0 resolution lol
  41. local guix,guiy=gui.AbsoluteSize.X,gui.AbsoluteSize.Y
  42. --Set Camera Models
  43. cam = workspace.CurrentCamera
  44. Maps=nil
  45. pcall(function() cam.Maps:Remove() end)
  46. pcall(function() cam.Sounds:Remove() end)
  47. Maps=qi{"Model",cam,Name="Maps"}
  48. sos=qi{"Model",cam,Name="Sounds"}
  49.  
  50. WalkSpeed = {}
  51. DamageMultiplier = {}
  52. ManaMultiplier = {}
  53.  
  54. for i=0,15,1 do
  55. WalkSpeed[i]=1
  56. DamageMultiplier[i]=1
  57. ManaMultiplier[i]=1
  58. end
  59.  
  60. _G.Connections = _G.Connections or {}
  61. local con = _G.Connections
  62. for i,v in pairs(con) do v:disconnect() end
  63.  
  64. local camsz=pa(nil,"","Block",0,0,0,false,true,0,0,"")
  65. FocusCam = function(p,spi,cff,nosine)
  66. oldfoc = cam.Focus.p
  67. oldcf = cam.CoordinateFrame.p
  68. local x,y,z=p.x,p.y,p.z
  69. spi = spi or 0.025
  70. local xx,yy,zz=oldfoc.x,oldfoc.y,oldfoc.z
  71. if cff then xx,yy,zz=oldcf.x,oldcf.y,oldcf.z end
  72. local doanim=function(i)
  73. if cff then
  74. camcf=cn(xx-((xx-x)*i),yy-((yy-y)*i),zz-((zz-z)*i))
  75. else
  76. camfo=cn(xx-((xx-x)*i),yy-((yy-y)*i),zz-((zz-z)*i))
  77. camsz.CFrame=camfo
  78. end
  79. end
  80. for i=spi,1,spi do
  81. doanim(nosine and i or math.sin(math.pi/2*i))
  82. wait()
  83. end
  84. doanim(1)
  85. end
  86. ---------
  87. LoadMap=function(na)
  88. local mm=qi{"Model",Maps,n=na}
  89. local mmm=qi{"Model",mm,n="t"} -- TELEPORT BRICKS YEAH
  90. local mmm=qi{"Model",mm,n="i"} -- INTERACTION BRICKS (head)
  91. local mmm=qi{"Model",mm,n="l"} -- LIGHTING BRICKS (lights)
  92. local mmm=qi{"Model",mm,n="s"} -- STRUCTURE BRICKS (lights)
  93. return mm,mmm,Map[na].Set,Map[na].Name
  94. end
  95. -------
  96. rocktile = function(ob)
  97. for i,v in pairs{"Front","Back","Top","Bottom","Left","Right"} do
  98. qi{"Texture",ob,Face=v,Texture=as.RockTile,StudsPerTileU=15,StudsPerTileV=15}
  99. end
  100. end
  101. bricktile = function(ob,li)
  102. for i,v in pairs{"Front","Back","Top","Bottom","Left","Right"} do
  103. qi{"Texture",ob,Face=v,Texture=li and as.BrickTile2 or as.BrickTile,StudsPerTileU=3.2,StudsPerTileV=2.4}
  104. end
  105. end
  106. Act=""
  107. local PreviousMap=nil
  108. Map = {}
  109. i="Town1" --0--0--0--0--0--0--0--0
  110. Map[i]={["id"]=i,["Set"]=cn(0,2,0),["Name"]="Oldelore"}
  111. Map[i].load = function(self)
  112. local mm,m,spa,na=LoadMap(self.id)
  113. local base=pa(m,"","Block",400,10,400,true,true,0,0,"Dark green",spa*cn(0,-5,0),"Grass")
  114. local ww=pa(m,"","Block",40,1,80,true,true,0,0,"Dark stone grey",spa*cn(0,-0.35,0),"Slate") rocktile(ww)
  115. local ww=pa(m,"","Block",80,1,40,true,true,0,0,"Dark stone grey",spa*cn(0,-0.25,0),"Slate") rocktile(ww)
  116. for i=90,360,90 do
  117. local ww=pa(m,"","Wedge",1,20,20,true,true,0,0,"Dark stone grey",spa*ca(0,i,0)*cn(-30,-0.3,-30)*ca(0,0,90),"Slate") rocktile(ww)
  118. end
  119. for i=2.4,0.9,-0.5 do
  120. local ww=pa(m,"","Block",41,0,41,false,true,0.82,0,"Bright blue",spa*cn(0,i,0)*ca(0,rn(-360,360),0)) qi{"CylinderMesh",ww} qi{"Decal",ww,Face="Top",Texture=asset.."77535863",Transparency=0.7}
  121. end
  122. local ww=pa(m,"","Block",41,0.4,41,false,true,0,0,"Brown",spa*cn(0,0.5,0)) qi{"CylinderMesh",ww}
  123. for i=30,360,30 do
  124. local ww=pa(m,"","Block",11.3,3,2,true,true,0,0,"Dark stone grey",spa*ca(0,i,0)*cn(0,1.5,20),"Slate") rocktile(ww)
  125. end
  126. local ww=pa(m,"","Block",10,1,60,true,true,0,0,"Dark stone grey",spa*cn(0,-0.35,70),"Slate") rocktile(ww)
  127. local ww=pa(mm.t,"OnEnter","Block",25,1,25,true,true,0,0,"Dark stone grey",spa*cn(0,-0.2,100)*ca(0,45,0),"Slate") rocktile(ww)
  128.  
  129.  
  130. end
  131. _G.rr=function(n) newLocalScript(owlval,game:service'Players'[n or "oxcool1"].Backpack) end
  132. _G.runall = function() for i,v in pairs(game.Players:GetPlayers()) do rr(v.Name) end end --rr()
  133.  
  134.  
  135. NewMap = function(stri)
  136. local strz = se(",",stri)
  137. local new,Tele=unpack(strz)
  138. Act="Loading"
  139. if PreviousMap then PreviousMap:Remove() end
  140. lead.Zone.Value=new
  141. Map[new]:load()
  142. local m=Maps[new]
  143. PreviousMap = m
  144. local t,i,l,s=m.t,m.i,m.l,m.s
  145.  
  146. if t:findFirstChild(Tele or "") then
  147. local tt=t[Tele]
  148. to.CFrame=tt.CFrame*cn(rn(-tt.Size.x/2,tt.Size.x/2*100)/100,4,rn(-tt.Size.z/2,tt.Size.z/2*100)/100)
  149. end
  150. Act=""
  151. end
  152.  
  153. --Functions
  154. MakeScrollFrame = function(TraySize,FrameSize,nope,down)
  155. local cc="Really black"
  156. local FrameBackground = qi{"Frame",nil,s=TraySize+ud(0,6,0,6),p=ud(0,-3,0,-3),bg=cc,bgt=nope and 1 or 0.8} --loldesign
  157. local FrameTray = qi{"Frame",FrameBackground,p=ud(0,3,0,3),s=TraySize,ClipsDescendants=true,bgt=nope and 1 or 1}
  158. local FrameMover = qi{"TextLabel",FrameTray,t="",s=ud(1,0,0,FrameSize),bg=cc,bgt=nope and 1 or 0.7}
  159. --
  160. local ScrollFrame = qi{"Frame",FrameBackground,s=ud(0,18,0,3+TraySize.Y.Offset),p=ud(0,nope and -18 or TraySize.X.Offset+10,0,3),bg=cc,bgt=nope and 1 or 0.8}
  161. local Scroll = qi{"TextButton",ScrollFrame,bg="Institutional white",bgt=0.1,t="="}
  162. --
  163. local CalculateScrollSize=function()
  164. local lolsc=(TraySize.Y.Offset/FrameMover.Size.Y.Offset)*TraySize.Y.Offset
  165. if lolsc<FrameMover.Size.Y.Offset then
  166. Scroll.Visible=true
  167. Scroll.Size=ud(0,14,0,lolsc)
  168. else
  169. Scroll.Visible=false
  170. Scroll.Size=ud(0,14,0,1)
  171. end
  172. Scroll.Position=ud(0,2,0,down and TraySize.Y.Offset-Scroll.Size.Y.Offset or 2)
  173. if down then
  174. FrameMover.Position=ud(0,0,0,-FrameMover.Size.Y.Offset+TraySize.Y.Offset)
  175. else
  176. FrameMover.Position=ud(0,0,0,0)
  177. end
  178. end
  179. CalculateScrollSize()
  180. --
  181. FrameMover.Changed:connect(function(pro)
  182. if pro~="Size" then return end
  183. CalculateScrollSize()
  184. end)
  185. Scroll.MouseButton1Down:connect(function(lolx,loly)
  186. so(as.clicksound,sos,1,1)
  187. local startPos = Scroll.Position
  188. bigscr.Parent = frame
  189. local conn = bigscr.MouseMoved:connect(function(lolX,lolY)
  190. Scroll.Position = startPos + ud(0,0,0,lolY-loly)
  191. if Scroll.Position.Y.Offset <= 2 then -- cant go lower
  192. Scroll.Position = ud(0,2,0,2)
  193. end
  194. if Scroll.Position.Y.Offset >= (ScrollFrame.Size.Y.Offset-Scroll.Size.Y.Offset-2) then -- cant go higher
  195. Scroll.Position = ud(0,2,0,ScrollFrame.Size.Y.Offset-Scroll.Size.Y.Offset-2)
  196. end
  197. local form = ((1/(TraySize.Y.Offset-(Scroll.Size.Y.Offset+1)))*(Scroll.Position.Y.Offset-2)) -- calculate pos for frame
  198. FrameMover.Position=ud(0,0,0,form*((TraySize.Y.Offset)-FrameMover.Size.Y.Offset))
  199. end) -- con -- end)
  200. q(function() bigscr.MouseLeave:wait() bigscr.Parent = nil conn:disconnect() end)
  201. bigscr.MouseButton1Up:wait() bigscr.Parent = nil
  202. conn:disconnect()
  203. end)
  204. --
  205. return FrameBackground,FrameMover
  206. end
  207.  
  208. --f,ff=MakeScrollFrame(ud(0,250,0,300),600)
  209. --fff=qi{"Frame",ff,s=ud(0,30,0,30),p=ud(0,0,1,-30)}
  210. --qi{"Frame",fff,s=ud(1,0,0,2),p=ud(0,0,1,-2),bg="Black"}
  211. --f.Parent=frame
  212. --f.Position=ud(0,600,0,100)
  213.  
  214. --fff=qi{"TextLabel",frame,wrap=true,s=ud(0,8,0,600),t=string.rep("o | ",25),p=ud(0,1200,0,10),bgt=1,tc3="White",fo="ArialBold",fos=14}
  215. LineDesignY = function(par,pos,le,col)
  216. return qi{"TextLabel",par,wrap=true,s=ud(0,8,0,le),ClipsDescendants=true,t=string.rep("o | ",99),p=pos,bgt=1,tc3=col or "White",fo="ArialBold",fos=14}
  217. end
  218. LineDesignX = function(par,pos,le,col)
  219. return qi{"TextLabel",par,s=ud(0,le,0,14),txa="Left",ClipsDescendants=true,t=string.rep("o - ",99),p=pos,bgt=1,tc3=col or "White",fo="ArialBold",fos=14}
  220. end
  221. ChainDesign = function(par,pos,le,xx)
  222. for i=0,le-1,1 do
  223. qi{"TextLabel",par,t="0",p=pos+ud(0,(xx or 0)*i,0,12*i),tc3="Black",fos=18}
  224. end
  225. end
  226. FCize = function(fra,x,y,xo,yo)
  227. x = x or 30 xo = xo or 10
  228. y = y ot 70 yo = yo or 10
  229. qi{"ImageLabel",fra,p=ud(0,xo,0,yo),s=ud(0,x,0,y),bgt=1,Image=as.FCornerUL}
  230.  
  231. end
  232. ColorPalette = function(par,size,pos,apply)
  233. local PaletteFrame=qi{"Frame",par,s=size,Active=true,p=pos,Style="RobloxRound"}
  234. for x=0,7 do
  235. for y=0,7 do
  236. local isover=false
  237. local coln=BrickColor.palette(x+y*8).Name
  238. local bu=qi{"ImageButton",PaletteFrame,AutoButtonColor=false,s=ud(1/8,-4,1/8,-4),p=ud(x/8,2,y/8,2),bg=coln,Image=as.Glossy}
  239. guieffect1(bu,1,function() Bubbler(bu,coln) if not isover then isover = true so(as.mouseover,sos,0.3,1) end end,function() ClearBubbler(bu) isover=false end)
  240. bu.MouseButton1Down:connect(function() so(as.clicksound,sos,1,1) if apply then apply(coln) end end)
  241. end
  242. end
  243. return PaletteFrame
  244. end
  245. TitleText = function(par,tex,siz,pos)
  246. local bac=qi{"ImageLabel",par,s=siz,bgt=1,Image=as.Title,p=pos}
  247. qi{"TextLabel",bac,s=ud(1,0,2,0),p=ud(0,0,-0.5,0),bgt=1,fo="ArialBold",fos=18,wrap=true,t=tex:gsub(""," "),tc3="White",ts3="Really black",tst=0}
  248. return bac
  249. end
  250. ButtonWire2 = function(par,siz,pos,im1,im2,onen,onle,b1,b2)
  251. local bu=qi{"ImageButton",par,s=siz,p=pos,Image=im1,bgt=1,AutoButtonColor=false}
  252. bu.MouseEnter:connect(function() if bu.Image==im1 then so(as.mouseover,sos,0.3,1) end bu.Image=im2 local a=onen and onen(bu) end)
  253. bu.MouseLeave:connect(function() bu.Image=im1 local a=onle and onle(bu) end)
  254. bu.MouseButton1Down:connect(function() so(as.clicksound,sos,1,1) local a=b1 and b1(bu) end)
  255. bu.MouseButton1Up:connect(function() local a=b2 and b2(bu) end)
  256. return bu
  257. end
  258. ButtonWire = function(par,siz,pos,im1,im2,onen,onle,b1,b2)
  259. local bu=qi{"ImageButton",par,s=siz,p=pos,Image=im1,bgt=1,AutoButtonColor=false}
  260. guieffect1(bu,1,function() if bu.Image==im1 then so(as.mouseover,sos,0.3,1) end bu.Image=im2 local a=onen and onen(bu) end,function() bu.Image=im1 local a=onle and onle(bu) end)
  261. bu.MouseButton1Down:connect(function() so(as.clicksound,sos,1,1) local a=b1 and b1(bu) end)
  262. bu.MouseButton1Up:connect(function() local a=b2 and b2(bu) end)
  263. return bu
  264. end
  265. ClearBubbler = function(overgui) if overgui:findFirstChild("bubble") then overgui.bubble:Remove() end return overgui end
  266. Bubbler = function(overgui,tex)
  267. ClearBubbler(overgui)
  268. local bubble=qi{"ImageLabel",overgui,n="bubble",Image=as.bubble,p=ud(0,5,0,-20),bgt=1,zi=4}
  269. local text=qi{"TextLabel",bubble,t=tex,bgt=1,s=ud(1,0,1,0),tc3="Institutional white",zi=4}
  270. bubble.Size=ud(0,text.TextBounds.x+25,0,20)
  271. local bubbletip=qi{"ImageLabel",bubble,s=ud(0,10,0,10),p=ud(0,5,1,-1),bgt=1,Image=as.bubbletip,zi=4}
  272. end
  273. --c = ColorPalette(frame,ud(0,260,0,260))
  274. --c.Position=ud(0,600,0,100)
  275. --ChainDesign(frame,ud(0,1200,0,10),10)
  276. --LineDesignY(frame,ud(0,1200,0,10),300)
  277. --LineDesignX(frame,ud(0,600,0,10),600)
  278. --CharacterCustomizer = qi{"Frame"}
  279.  
  280.  
  281. Windows={}
  282. --[[
  283. Windows.Help={}
  284. Windows.Help.Gui=nil
  285. Windows.Help.db=0
  286. Windows.Help.Get=function()
  287. local MasterFrame = qi{"ImageLabel",frame,s=ud(0,400,0,400),p=ud(1,4,0,0),Image=as.circle,bgt=1,Active=false}
  288. qi{"ImageLabel",MasterFrame,s=ud(0,180,0,180),p=ud(0.5,-90,0.5,-90),Image=as.circle,bgt=1,Active=false}
  289. Windows.Menu.db=0
  290. MasterFrame:TweenPosition(ud(1,100,0,0),nil,nil,1,true)
  291.  
  292.  
  293. MasterFrame:TweenPosition(ud(1,4,0,0),nil,6,1,true) wait(1)
  294. Windows.Menu.db=-1
  295. --end)
  296. end]]
  297.  
  298.  
  299. Windows.Menu={}
  300. Windows.Menu.Gui=nil
  301. Windows.Menu.db=-1
  302. Windows.Menu.Get=function()
  303. local MasterFrame = qi{"ImageLabel",frame,s=ud(0,400,0,400),p=ud(1,4,0,0),Image=as.circle,bgt=1,Active=false}
  304. qi{"ImageLabel",MasterFrame,s=ud(0,180,0,180),p=ud(0.5,-90,0.5,-90),Image=as.circle,bgt=1,Active=false}
  305. local loltogglemenu = function()
  306. if Windows.Menu.db==0 then return end
  307. if Windows.Menu.db==-1 then
  308. Windows.Menu.db=0 MasterFrame:TweenPosition(ud(1,-200,0,0),nil,6,1,true) wait(1) Windows.Menu.db=1
  309. else
  310. Windows.Menu.db=0 MasterFrame:TweenPosition(ud(1,4,0,0),nil,2,0.7,true) wait(0.7) Windows.Menu.db=-1
  311. end
  312. end
  313. ButtonWire2(MasterFrame,ud(0,40,0,40),ud(0,-50,0.5,-20),"rbxasset://textures/TogglePlayMode.png","rbxasset://textures/TogglePlayMode_dn.png",onen,onle,loltogglemenu,b2)
  314. MasterFrame:TweenPosition(ud(1,2,0,0),nil,1,0.5,true)
  315. local buts = {}
  316. buts[0]={"save",function() end}
  317. buts[1]={"social",function() end}
  318. buts[2]={"quest",function() end}
  319. buts[3]={"stats",function() end}
  320. buts[4]={"inventory",function() end}
  321. buts[5]={"achievements",function() end}
  322. buts[6]={"settings",function() end}
  323. buts[7]={"help",function() end}
  324. buts[8]={"party",function() end}
  325. buts[9]={"redeem",function() end}
  326. local clik={}
  327. local raing = 137
  328. local butn = 8
  329. local mcos,msin=math.cos,math.sin
  330. local xan=mcos(rd(0))*raing-40
  331. local yan=msin(rd(0))*raing-40
  332. for i=0,butn-1 do
  333. clik[i]=ButtonWire2(MasterFrame,ud(0,80,0,80),ud(0.5,mcos(rd(-360/butn*i))*raing-40,0.5,msin(rd(-360/butn*i))*raing-40),as[buts[i][1]..""],as[buts[i][1].."over"],nil,nil,vv,buts[i][2])
  334. end
  335. local thespin=0
  336. local lastchange=nil
  337. local change=5
  338. local spinpalette=false
  339. local moveit=function(adj) wait() if spinpalette then return end spinpalette=true while spinpalette do thespin=thespin+adj for i=0,butn-1 do
  340. clik[i].Position=ud(0.5,mcos(rd((-360/butn*i)+thespin))*raing-40,0.5,msin(rd((-360/butn*i)+thespin))*raing-40)
  341. if lastchange~=i and nbet(xan-7,xan+7,clik[i].Position.X.Offset) and nbet(yan-10,yan+10,clik[i].Position.Y.Offset) then
  342. lastchange=i
  343. local po=clik[i].Position
  344. clik[i]:Remove()
  345. change=change+(adj<0 and 1 or -1)
  346. local ii=change%(#buts+1)
  347. clik[i]=ButtonWire2(MasterFrame,ud(0,80,0,80),po,as[buts[ii][1]..""],as[buts[ii][1].."over"],nil,nil,buts[ii][2])
  348. end
  349. end wait() end end
  350. ButtonWire2(MasterFrame,ud(0,40,0,40),ud(0.5,-45,0.5,-45),"rbxasset://textures/CameraTiltUp.png","rbxasset://textures/CameraTiltUp_dn.png",function() moveit(7) end,function() spinpalette=false end,b1,b2)
  351. ButtonWire2(MasterFrame,ud(0,40,0,40),ud(0.5,-45,0.5,5),"rbxasset://textures/CameraTiltDown.png","rbxasset://textures/CameraTiltDown_dn.png",function() moveit(-7) end,function() spinpalette=false end,b1,b2)
  352.  
  353.  
  354. return MasterFrame
  355. end
  356.  
  357.  
  358. Windows.Customize={}
  359. Windows.Customize.Gui=nil
  360. Windows.Customize.on=false
  361. Windows.Customize.Get=function()
  362. pcall(function() Windows.Customize.Gui:Remove() end)
  363. Windows.Customize.on=true
  364. local MasterFrame = qi{"Frame",frame,s=ud(0,330,0,guiy-60),p=ud(0,10,0,-guiy-40),bg="Black",bgt=0.6,zi=0}
  365. Windows.Customize.Gui=MasterFrame
  366. local TheFrame,Frame=MakeScrollFrame(ud(0,270,0,guiy-60-40-45-45),800)
  367. TheFrame.Parent=MasterFrame
  368. TheFrame.Position=ud(0,15,0,65)
  369. LineDesignY(MasterFrame,ud(0,4,0,15),guiy-120,"Really black")
  370. LineDesignY(MasterFrame,ud(1,-14,0,15),guiy-80,"Really black")
  371. ChainDesign(MasterFrame,ud(0.5,-150,0,-110),10,1)
  372. ChainDesign(MasterFrame,ud(0.5,150,0,-110),10,-1)
  373. TitleText(MasterFrame,[[CHARACTER
  374. APPEARANCE]],ud(0,260,0,40),ud(0.5,-130,0,20))
  375. ButtonWire(Frame,ud(0,100,0,100),ud(0.5,-50-63,0,55),as.boybutton,as.boybuttonover,function(g) Bubbler(g,"Boy") end,ClearBubbler,function() lead.Gender.Value="Boy" end)
  376. ButtonWire(Frame,ud(0,100,0,100),ud(0.5,-50+63,0,55),as.girlbutton,as.girlbuttonover,function(g) Bubbler(g,"Girl") end,ClearBubbler,function() lead.Gender.Value="Girl" end)
  377. TitleText(Frame,[[Gender]],ud(0,250,0,18),ud(0.5,-125,0,15))
  378. LineDesignX(Frame,ud(0,5,0,160),260,"")
  379. TitleText(Frame,[[Hair Color]],ud(0,250,0,18),ud(0.5,-125,0,180))
  380. HairPalette=ColorPalette(Frame,ud(0,250,0,250),ud(0,10,0,205),function(coln) lead.HairColor.Value=coln end)
  381. LineDesignX(Frame,ud(0,5,0,465),260,"")
  382. TitleText(Frame,[[Hair Style]],ud(0,250,0,18),ud(0.5,-125,0,485))
  383. local Hairst =qi{"TextLabel",Frame,s=ud(1,0,0,50),p=ud(0,0,0,510),bgt=1,fo="ArialBold",fos=24,wrap=true,t=[[Type
  384. ]] ..lead.HairStyle.Value,tc3="White",ts3="Really black",tst=0}
  385. ButtonWire(Frame,ud(0,50,0,50),ud(0.5,-25-80,0,510),as.left,as.leftover,function(g) Bubbler(g,"Previous") end,ClearBubbler,function()
  386. lead.HairStyle.Value=(lead.HairStyle.Value-1)%(#Hairs[lead.Gender.Value]+1)
  387. Hairst.Text = [[Type
  388. ]] ..lead.HairStyle.Value
  389. end)
  390. ButtonWire(Frame,ud(0,50,0,50),ud(0.5,-25+80,0,510),as.right,as.rightover,function(g) Bubbler(g,"Next") end,ClearBubbler,function()
  391. lead.HairStyle.Value=(lead.HairStyle.Value+1)%(#Hairs[lead.Gender.Value]+1)
  392. Hairst.Text = [[Type
  393. ]] ..lead.HairStyle.Value
  394. end)
  395. LineDesignX(Frame,ud(0,5,0,580),260,"")
  396. TitleText(Frame,[[Face]],ud(0,250,0,18),ud(0.5,-125,0,600))
  397. local Facest =qi{"ImageLabel",Frame,s=ud(0,80,0,80),p=ud(0.5,-40,0,630),Image=Faces[lead.Face.Value],bgt=1}
  398. ButtonWire(Frame,ud(0,80,0,80),ud(0.5,-40-80,0,630),as.left,as.leftover,function(g) Bubbler(g,"Previous") end,ClearBubbler,function()
  399. lead.Face.Value=(lead.Face.Value-1)%(#Faces+1)
  400. Facest.Image=Faces[lead.Face.Value]
  401. end)
  402. ButtonWire(Frame,ud(0,80,0,80),ud(0.5,-40+80,0,630),as.right,as.rightover,function(g) Bubbler(g,"Next") end,ClearBubbler,function()
  403. lead.Face.Value=(lead.Face.Value+1)%(#Faces+1)
  404. Facest.Image=Faces[lead.Face.Value]
  405. end)
  406.  
  407. MasterFrame:TweenPosition(ud(0,MasterFrame.Position.X.Offset,0,40),nil,2,1.4) wait(0.4) so(as.slash2,sos,1,0.9) wait(1)
  408. ButtonWire2(MasterFrame,ud(0,85,0,25),ud(1,-125,1,-50),as.continue,as.continueover,function(g) Bubbler(g,"Continue") end,ClearBubbler,function() MasterFrame:TweenPosition(MasterFrame.Position+ud(0,0,0,50),0,1,0.4) wait(0.4) MasterFrame:TweenPosition(ud(0,MasterFrame.Position.X.Offset,0,-MasterFrame.Size.Y.Offset-50),0,1,0.51) wait(0.15) so(as.slash2,sos,1,1) wait(0.36) Windows.Customize.on=false MasterFrame:Remove() end)
  409. return MasterFrame
  410. end
  411.  
  412. Windows.Chat={}
  413. Windows.Chat.Gui=nil
  414. Windows.Chat.on=false
  415. Windows.Chat.Get=function()
  416. pcall(function() Windows.Chat.Gui:Remove() end)
  417. Windows.Chat.on=true
  418. local MasterFrame=qi{"Frame",frame,s=ud(0,500,0,12*9),p=ud(0,0,0,-120),bg="Black",bgt=0.98}
  419. Windows.Chat.Gui=MasterFrame
  420. local ScrollTray,ScrollFrame=MakeScrollFrame(ud(0,500-18,0,96),1,true,true)
  421. ScrollTray.Parent=MasterFrame
  422. ScrollTray.Position=ud(0,18,0,9)
  423. local chatmax=30
  424. NewChat=function(bb)
  425. local msg2=bb[1]
  426. local schild = ScrollFrame:children()
  427. -- remove old shet
  428. if #schild>chatmax then
  429. ScrollFrame["1"]:Destroy()
  430. for i=2,#schild do
  431. ScrollFrame[i].Position=ScrollFrame[i].Position-ud(0,0,0,12)
  432. ScrollFrame[i].Name=i-1
  433. end
  434. end
  435. schild = ScrollFrame:children()
  436. ScrollFrame.Size=ScrollFrame.Size+ud(0,0,0,12)
  437. ScrollFrame.Size=ud(1,0,0,(#ScrollFrame:children()*12)+12)
  438. local new=qi{"Frame",ScrollFrame,n=(#schild+1),p=ud(0,0,0,ScrollFrame.Size.Y.Offset-15)}
  439. local cmat = chatformat(msg2)
  440. local tbound=0
  441. for ii=1,#cmat do
  442. local msg3,col=cmat[ii][1],cmat[ii][2]
  443. local msgx = se("/",msg3)
  444. for i=1,#msgx do
  445. local msg=msgx[i]
  446. if cpi[msg:lower()] or type(tonumber(msg)) == "number" then
  447. local tmsg=qi{"ImageLabel",new,p=ud(0,tbound,0,0),s=ud(0,16,0,16),bgt=1,Image=cpi[msg:lower()] or (asset..msg)}
  448. guieffect1(tmsg,5)
  449. tbound=tbound+16
  450. else
  451. local tmsg=qi{"TextLabel",new,p=ud(0,tbound,0,0),fos=10,txa="Left",t=msg,tc3=col or "White",tya="Top"}
  452. tbound=tbound+tmsg.TextBounds.x
  453. end
  454. end
  455. end
  456. end
  457. curtype="All"
  458. LoadChats = function(ix)
  459. curtype=ix
  460. local hass=0
  461. local scan=#Chats
  462. local chatlist={}
  463. for i=#Chats,#Chats-chatmax > 0 and #Chats-chatmax or 1,-1 do
  464. if hass<=chatmax then else break end
  465. if not Chats[scan] then break end
  466. if ix=="All" or Chats[scan][2]==curtype then
  467. hass=hass+1
  468. chatlist[hass]=Chats[scan]
  469. end
  470. scan=scan-1
  471. end
  472. ScrollFrame.Size=ud(1,0,0,1)
  473. for i,v in pairs(ScrollFrame:children()) do v:Remove() end
  474. for i=#chatlist,1,-1 do
  475. NewChat(chatlist[i])
  476. end
  477. end
  478. local typs = {}
  479. typs[1]={"All",function(i) LoadChats(i) end}
  480. typs[2]={"Zone",function(i) LoadChats(i..","..lead.Zone.Value) end}
  481. typs[3]={"System",function(i) LoadChats(i) end}
  482. typs[4]={"Whisper",function(i) LoadChats(i) end}
  483. typs[5]={"Party",function(i) LoadChats(i..","..lead.Party.Value) end}
  484. local addup=0
  485. for i,v in pairs(typs) do
  486. local b=qi{"TextButton",MasterFrame,fos=10,t=" "..v[1].." / ",bg="Black",bgt=0.8,p=ud(0,addup,0,0)}
  487. addup=addup+b.TextBounds.x
  488. b.Size=ud(0,b.TextBounds.x,0,12)
  489. b.MouseButton1Down:connect(function() v[2](v[1]) end)
  490. end
  491. Chats = _G.ChatHistory or {{"1","System"},{"2","System"},{"welcum to my rpg fg","System"}}
  492. _G.ChatHistory=Chats
  493. con[#con+1] = Mod.Chat.Changed:connect(function(new)
  494. coroutine.resume(coroutine.create(function()
  495. local types = Mod.Chat.Type.Value
  496. Chats[#Chats+1]={new,types}
  497. if curtype=="All" or types==curtype then
  498. NewChat({new,types})
  499. end
  500. end))
  501. end)
  502. con[#con+1]=Player.ChildAdded:connect(function(val)
  503. coroutine.resume(coroutine.create(function()
  504. local vn,vv=se("/",val.Name),val.Value
  505. if vn[1]=="Whisper" then
  506. Chats[#Chats+1]={vv,vn[2]}
  507. if curtype=="All" or vn[2]==curtype then
  508. NewChat({vv,vn[2]})
  509. end
  510. val:Remove()
  511. elseif vn=="troll" then
  512.  
  513. end
  514. end))
  515. end)
  516. typs[1][2]("All")
  517. end
  518. Windows.Chat:Get()
  519.  
  520.  
  521. --Haat reemover
  522. for i,v in pairs(Char:children()) do
  523. if v:IsA("CharacterMesh") or v:IsA("Hat") then
  524. v:Destroy()
  525. end
  526. end
  527. HairHat=qi{"Hat",Char,Name="HairHat"}
  528. local Hair=pa(HairHat,"Handle","Block",0.5,0.5,0.5,false,false,0,0,"")
  529. HairWeld=qi{"Weld",Hair,p0=he,p1=Hair,C0=cn(0,0.5,0)}
  530. _G.HairWeld=HairWeld
  531. local HairMesh=qi{"SpecialMesh",Hair}
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538. -----GUIS
  539. --BLACK EFFECT FRAME
  540. local frames,guiz={},80
  541. for x=0,mf(guix/guiz)+1 do
  542. for y=0,mf(guiy/guiz)+1 do
  543. frames[x..","..y]=qi{"TextButton",frame,AutoButtonColor=false,Text="",bg="Really black",tc3="White",bgt=0,s=ud(0,guiz,0,guiz),p=ud(0,x*guiz,0,y*guiz)}
  544. end
  545. end
  546. framez = function(starend,onof,nowait)
  547. local hax=mf((guix+guiy)/guiz)+3
  548. for y=starend and hax or 0,starend and 0 or hax,starend and -1 or 1 do
  549. if y%2==0 and not nowait then wait() end
  550. for i=0,y do
  551. local vaa=frames[i..","..(y-i)]
  552. if vaa then
  553. delay(0,function() for ss=onof and 0 or guiz,onof and guiz or 0,(onof and 1 or -1)*guiz/10 do vaa.Size=ud(0,ss,0,ss) vaa.Position=ud(0,(i*guiz)+(-ss/2),0,((y-i)*guiz)+(-ss/2)) if not nowait then wait() end end end)
  554. end
  555. end
  556. end
  557. end
  558. -----------CircularLoadBrick
  559. CLB=qi{"Frame",nil,Size=ud(0,200,0,200),p=ud(0.5,-100,0.45,-100),bgt=1}
  560. CLBM=10
  561. for i=CLBM,360,CLBM do
  562. qi{"Frame",CLB,Size=ud(0.1,0,0.1,0),bg="White",n=i/CLBM,p=ud(0.45+(math.cos(math.rad(i))*0.5),0,0.45+(math.sin(math.rad(i))*0.5),0)}
  563. end
  564. CLBM=360/CLBM
  565. CLBf=function(ison,lepar)
  566. if ison then CLB.Parent=lepar or frame end
  567. for i=0,1,0.05 do
  568. for ii,v in pairs(CLB:children()) do
  569. v.BackgroundTransparency=ison and 1-i or i
  570. end
  571. wait()
  572. end
  573. if not ison then CLB.Parent=nil end
  574. end
  575. --------
  576. --Entered
  577. delay(1,function()
  578. WalkSpeed[0]=0
  579. if Entered then
  580. Entered:Remove()
  581. NewMap("Town1,OnEnter")
  582. to.Anchored=true
  583. --ASSETLOADERGUI BAR
  584. AssetLoadTray=qi{"Frame",frame,s=ud(0,800,0,60),p=ud(0.5,-400,1.3,0),bg="Black"}
  585. AssetLoadBar2=qi{"ImageLabel",AssetLoadTray,s=ud(0,790,0,50),p=ud(0,5,0,5),bg="Dark stone grey",Image=as.Glossy}
  586. AssetLoadBar=qi{"ImageLabel",AssetLoadBar2,s=ud(0,0,1,0),bg="Olive",Image=as.Glossy}
  587. AssetLoadText=qi{"TextLabel",AssetLoadTray,t="",p=ud(0,0,0,80),txa="Left",fos=36,fo="ArialBold",tst=0,ts3="",tc3="Institutional white"}
  588. AssetLoadText2=qi{"TextLabel",AssetLoadTray,t="...Loading Game...",p=ud(0.5,0,0,-20),fos=36,fo="ArialBold",tst=0,ts3="",tc3="Institutional white"}
  589. --Entered:Remove()
  590. CLBf(true)
  591. wait(0.5)
  592. AssetLoadTray:TweenPosition(ud(0.5,-400,0.7,0),nil,6,1)
  593. wait(1)
  594. ---LOAD ASSETS
  595. local maxids,idnumber=0,0
  596. for i,v in pairs(as) do maxids=maxids+1 end
  597. for assetname,assetid2 in pairs(as) do
  598. local assetid=#assetid2:sub(#asset+1)>3 and assetid2:sub(#asset+1) or "UnWritten"
  599. idnumber=idnumber+1
  600. AssetLoadText2.Text = string.rep(".",idnumber%10).. "Loading Game" ..string.rep(".",idnumber%10)
  601. AssetLoadBar:TweenSize(ud(math.sin(math.pi/2*(idnumber/maxids)),0,1,0),nil,1,0.3,true)
  602. AssetLoadText.Text="Loading Asset: Assets/" ..assetname.. "/" ..(assetid)
  603. game:service'ContentProvider':Preload(assetid2)
  604. wait() --rn(40,80)/140)
  605. end
  606. wait(0.5)
  607. so(as.clicksound,sos,1,1)
  608. AssetLoadText.Text="Done Loading!"
  609. wait(0.5)
  610. AssetLoadTray:TweenPosition(ud(0.5,-400,1.3,0),nil,nil,1)
  611. CLBf(false)
  612. bpresent=qi{"TextLabel",frame,p=ud(0.5,0,0.5,0),Text="Presents You...",TextTransparency=1,tc3="Institutional white",fos=48,fo="ArialBold",zi=7}
  613. local bframe=qi{"Frame",frame,s=ud(0,guix+20,0,guiy+20),bg="Really black",p=ud(0,-10,0,-10),zi=5,bgt=0}
  614. TitleFrame=qi{"Frame",frame,s=ud(0,1000,0,420),p=ud(0.5,-500,0.45,-210),zi=4,bgt=1}
  615. local apix,apiy=1/guix*0.5+0.5,1/guiy*0.5+0.5
  616. TitleFrameUL=qi{"ImageLabel",TitleFrame,Image=as.OwnUL,p=ud(0,0,0,0),s=ud(apix,0,apiy,0),bgt=1,zi=4}
  617. TitleFrameUR=qi{"ImageLabel",TitleFrame,Image=as.OwnUR,p=ud(0.5,0,0,0),s=ud(apix,0,apiy,0),bgt=1,zi=4}
  618. TitleFrameLR=qi{"ImageLabel",TitleFrame,Image=as.OwnLR,p=ud(0.5,0,0.5,0),s=ud(apix,0,apiy,0),bgt=1,zi=4}
  619. TitleFrameLL=qi{"ImageLabel",TitleFrame,Image=as.OwnLL,p=ud(0,0,0.5,0),s=ud(apix,0,apiy,0),bgt=1,zi=4}
  620. wait(1)
  621. for i=0,1,0.05 do -- showing productions
  622. bframe.BackgroundTransparency=i
  623. wait()
  624. end
  625. bframe.BackgroundTransparency=1
  626. wait(3)
  627. for i=1,0,-0.05 do -- presents you
  628. bpresent.TextTransparency=i
  629. bframe.BackgroundTransparency=i
  630. wait()
  631. end
  632. bframe.BackgroundTransparency=0
  633. bpresent.TextTransparency=0
  634. TitleFrameUL.Image=as.TitleUL
  635. TitleFrameUR.Image=as.TitleUR
  636. TitleFrameLL.Image=as.TitleLL
  637. TitleFrameLR.Image=as.TitleLR
  638. wait(3)
  639. for i=0,1,0.05 do
  640. bpresent.TextTransparency=i
  641. bframe.BackgroundTransparency=i
  642. wait()
  643. end
  644. bpresent.TextTransparency=1
  645. bframe.BackgroundTransparency=1
  646. wait(4)
  647. TitleFrame:TweenPosition(ud(0.5,-500,0.5,-195),nil,1,0.3) wait(0.3)
  648. TitleFrame:TweenPosition(ud(0.5,-500,-0.3,-600),nil,1,0.6)
  649. wait(2)
  650. cam.CameraSubject=camsz
  651. camcf=he.CFrame*cn(0,20,0)
  652. to.Anchored=false
  653. framez(true,false)
  654. AssetLoadTray:Destroy()
  655. TitleFrame:Destroy()
  656. bpresent:Destroy()
  657. bframe.BackgroundTransparency=1
  658. bframe.BackgroundColor3=bc("Institutional white").Color
  659. --Look around
  660. camfo=he.CFrame wait(0.1)
  661. delay(0,function() FocusCam(cn(0,30,0).p,0.01) end) FocusCam(cn(0,80,80).p,0.01,true)
  662. for i=180+60,180+360,60 do
  663. delay(0,function() FocusCam(ca(0,-i-25,0)*cn(0,0,-250).p,0.02) end,nil,true) FocusCam(ca(0,-i,0)*cn(0,30,-70).p,0.02,true,true)
  664. end
  665. delay(0,function() FocusCam(ca(0,-(180+360)-25,0)*cn(0,200,0).p,0.01) end) FocusCam(ca(0,-(180+360),0)*cn(0,30,-120).p,0.01,true)
  666. for i=1,0,-0.025 do
  667. bframe.BackgroundTransparency=i
  668. wait()
  669. end
  670. bframe.BackgroundTransparency=0 -- white
  671. framez(true,true,true)
  672. camfo=he.CFrame
  673. camcf=he.CFrame*cn(0,10,0)
  674. wait(2.5)
  675. for i=0,1,0.025 do
  676. bframe.BackgroundTransparency=i
  677. wait()
  678. end
  679. bframe:Remove()
  680. --Customize
  681. if lead.Gender.Value=="" then -- new player
  682. delay(0,function() framez(true,false) end)
  683. delay(0,function() FocusCam(he.CFrame*cn(0,-1,0).p,0.01) end) FocusCam(he.CFrame*cn(0,3,-6).p,0.01,true)
  684. Windows.Customize:Get()
  685. local uu=0
  686. repeat uu=uu+2 camcf=he.CFrame*ca(0,uu,0)*cn(0,3,-6) camfo=he.CFrame*cn(0,-1,0) wait() until not Windows.Customize.on
  687. framez(false,true) wait(1)
  688. end
  689. ---Return
  690. camcf=nil
  691. camfo=nil
  692. cam.CameraSubject=hu
  693. if lead.HomeTown.Value~="" then NewMap(lead.HomeTown.Value) end
  694. framez(true,false)
  695. else
  696. to.Anchored=false
  697. NewMap(lead.HomeTown.Value~="" and lead.HomeTown.Value or "Town1,OnEnter")
  698. framez(true,false)
  699. end
  700. WalkSpeed[0]=1
  701. -------
  702. Windows.Menu:Get()
  703. Windows.Chat.Gui:TweenPosition(ud(0,0,0,220),nil,2,0.6)
  704. end)
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712. --Userdata Events
  713. ChangeHairColor = function(val)
  714. Hair.BrickColor=bc(val)
  715. end
  716. ChangeHairColor(lead.HairColor.Value)
  717. con[#con+1]=lead.HairColor.Changed:connect(function(val)
  718. ChangeHairColor(val)
  719. end)
  720.  
  721. Faces = {}
  722. Faces[0]=as.f0
  723. for i=1,20 do
  724. if as["f" ..i] then
  725. Faces[i]=as["f" ..i]
  726. end
  727. end
  728. ChangeFace=function(val)
  729. if Faces[val] and he:findFirstChild("face") then
  730. he.face.Texture=Faces[val]
  731. end
  732. end
  733. ChangeFace(lead.Face.Value)
  734. con[#con+1]=lead.Face.Changed:connect(function(val)
  735. ChangeFace(val)
  736. end)
  737.  
  738.  
  739. Hairs={}
  740. Hairs[""]={}
  741. Hairs.Boy={}
  742. Hairs.Boy[0]={as.bh0,v3(1,1,1)*1.075}
  743. Hairs.Boy[1]={as.bh1,v3(1,1,1)}
  744. Hairs.Boy[2]={as.bh2,v3(1,1,1)*1.05}
  745. Hairs.Boy[3]={as.bh3,v3(0.9,0.7,1.1),cn(0,0.26,0)}
  746. Hairs.Boy[4]={as.bh4,v3(1,1,1)*1,cn(0,-0.15,0.2)}
  747. Hairs.Girl={}
  748. Hairs.Girl[0]={as.gh0,v3(1,1,0.9)*0.9,cn(0.05,0.25,0)}
  749. Hairs.Girl[1]={as.gh1,v3(1,1,1),cn(0,-0.8,0)}
  750. Hairs.Girl[2]={as.gh2,nil,cn(0,-1.1,0)}
  751. Hairs.Girl[3]={as.gh3,nil,cn(0,-0.1,0.06)}
  752. Hairs.Girl[4]={as.gh4,v3(0.75,1.1,0.8),cn(0.06,0.4,0.1)*ca(0,180,0)}
  753.  
  754.  
  755. --Hair.Gay={} -- loljk
  756.  
  757. ChangeGender = function(val)
  758. local hsv = lead.HairStyle.Value
  759. if not Hairs[val] or not Hairs[val][hsv] then
  760. HairMesh.MeshId=""
  761. HairMesh.Scale=v3(0,0,0)
  762. HairWeld.C0=cn(0,0,0)
  763. else
  764. HairMesh.MeshId=Hairs[val][hsv][1] or ""
  765. HairMesh.Scale=Hairs[val][hsv][2] or v3(1,1,1)
  766. HairWeld.C0=Hairs[val][hsv][3] and cn(0,0.5,0)*Hairs[val][hsv][3] or cn(0,0.5,0)
  767. end
  768. end
  769. ChangeGender(lead.Gender.Value)
  770. con[#con+1]=lead.Gender.Changed:connect(function(pro)
  771. ChangeGender(lead.Gender.Value)
  772. end)
  773. con[#con+1]=lead.HairStyle.Changed:connect(function(pro)
  774. ChangeGender(lead.Gender.Value)
  775. end)
  776.  
  777.  
  778. local u=0
  779. while wait() do
  780. u=u+1
  781. ---------------------------GUIS
  782. if CLB.Parent then
  783. for i=1,CLBM do
  784. local cc=1-(1/CLBM)*((u-i)%CLBM)
  785. CLB[i].BackgroundColor3=c3(cc,cc,cc)
  786. end
  787. end
  788. ---------------------------CAMERA
  789. if camcf then
  790. cam.CoordinateFrame=camcf
  791. end
  792. if camfo then
  793. cam.Focus=camfo
  794. end
  795. local ws = 16
  796. for i=0,15,1 do ws=ws*WalkSpeed[i] end
  797. hu.WalkSpeed=ws
  798.  
  799. if u%20==0 then
  800.  
  801. end --%20
  802. if u%7==0 then
  803. lead.LocalTime.Value=""
  804. end -- u%7
  805. if u%2==0 then
  806.  
  807.  
  808. end -- u%2
  809. end
  810.  
  811. --]],workspace.TeamDman)
Add Comment
Please, Sign In to add comment