aweeb

Untitled

Feb 15th, 2019
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 37.16 KB | None | 0 0
  1. -------------------------------------
  2. --Font module------------------------
  3. -------------------------------------
  4. local Font = (function()
  5. local function split(str,sep)
  6. local fields={}
  7. str:gsub(("([^%s]+)"):format(sep),function(c)table.insert(fields,c) end)
  8. return fields
  9. end
  10. local function RAS(t)
  11. local st = split(table.remove(t,1),' ')
  12. local t = {Mode=table.remove(st,1)}
  13. for i,c in pairs(st) do
  14. local a = split(c,'=')
  15. t[a[1]] = a[2]
  16. end
  17. return t
  18. end
  19.  
  20. --Char keys: id, x, y, width, height, xoffset, yoffset, xadvance
  21. local Functions = {
  22. GetChar = function(Font,byte)
  23. return Font.Chars[byte] or error("Unsupported char: "..string.char(byte))
  24. end,
  25. CreateCharImage = function(Font,Char)
  26. local Image = Instance.new("ImageLabel")
  27. Image.BackgroundTransparency = 1
  28. Image.Size = UDim2.new(0,Char.width,0,Char.height)
  29. Image.Image = Font.Image
  30. Image.ImageRectOffset = Vector2.new(Char.x,Char.y)
  31. Image.ImageRectSize = Vector2.new(Char.width,Char.height)
  32. return Image
  33. end
  34. }
  35.  
  36. return function(txt,img)
  37. local Font = {Image=img,Settings={},Chars={}}
  38. for i,c in pairs(Functions) do Font[i] = c end
  39. txt = split(txt,"\n")
  40. for i,c in pairs(txt) do
  41. local t = split(txt[i],' ')
  42. local mode = table.remove(t,1)
  43. if mode=="char" then
  44. local char = {}
  45. for i2,c2 in pairs(t) do
  46. local a = split(t[i2],'=')
  47. char[a[1]] = tonumber(a[2])
  48. end
  49. Font.Chars[char.id] = char
  50. else
  51. Font[mode] = {}
  52. for i2,c2 in pairs(t) do
  53. local a = split(t[i2],'=')
  54. Font[mode][a[1]] = tonumber(a[2]) or a[2]
  55. end
  56. end
  57. end
  58. return Font
  59. end
  60. end)()
  61. -------------------------------------
  62. --Drawer module----------------------
  63. -------------------------------------
  64. local Drawer = (function()
  65. --Char keys: id, x, y, width, height, xoffset, yoffset, xadvance
  66. local Functions = {
  67. LookAhead = function(Drawer)
  68. local length = 0
  69. for i=Drawer.Position+1,#Drawer.Text+1 do
  70. local ch = Drawer.Text:sub(i,i)
  71. if ch=="\n" then return false end
  72. if not ch or ch==" " or ch=="" then
  73. if Drawer.Cursor.X+length > Drawer.Frame.AbsoluteSize.X then
  74. return true
  75. else
  76. return false
  77. end
  78. end
  79. local byte = string.byte(ch)
  80. local Char = Drawer.Font:GetChar(byte)
  81. length = length + Char.xadvance
  82. end
  83. end,
  84. EatChar = function(Drawer)
  85.  
  86. end,
  87. DrawNext = function(Drawer)
  88. if Drawer.Position>#Drawer.Text then return end
  89. local ch = Drawer.Text:sub(Drawer.Position,Drawer.Position)
  90. if not ch then return false end
  91. if ch=="\n" or (ch==" " and Drawer:LookAhead()) then
  92. Drawer.Cursor = Vector2.new(0,Drawer.Cursor.Y+Drawer.Font.common.lineHeight)
  93. else
  94. local byte = string.byte(ch)
  95. local Char = Drawer.Font:GetChar(byte)
  96. local CharImg = Drawer.Font:CreateCharImage(Char)
  97. local ImgPos = Drawer.Cursor + Vector2.new(Char.xoffset,Char.yoffset)
  98. CharImg.Name = tostring(Drawer.Position).."_"..ch
  99. CharImg.Parent = Drawer.Frame
  100. CharImg.Position = UDim2.new(0,ImgPos.x,0,ImgPos.y)
  101. Drawer.Cursor = Drawer.Cursor + Vector2.new(Char.xadvance,0)
  102. end
  103. Drawer.Position = Drawer.Position+1
  104. return true
  105. end,
  106. DrawAll = function(Drawer)
  107. repeat until not Drawer:DrawNext()
  108. end
  109. }
  110.  
  111. return function(Font,Parent,Text,DrawAll)
  112. local Drawer = {Font=Font,Text=Text,Cursor=Vector2.new(),Position=1}
  113. for i,c in pairs(Functions) do Drawer[i] = c end
  114. if Parent:FindFirstChild("TextDrawer") then
  115. Parent.TextDrawer:Destroy()
  116. end
  117. Drawer.Frame = Instance.new("Frame")
  118. Drawer.Frame.Name = "TextDrawer"
  119. Drawer.Frame.Size = UDim2.new(1,0,1,0)
  120. Drawer.Frame.BackgroundTransparency = 1
  121. Drawer.Frame.Parent = Parent
  122. if DrawAll then Drawer:DrawAll() end
  123. return Drawer
  124. end
  125. end)()
  126. -------------------------------------
  127. --Font object------------------------
  128. -------------------------------------
  129. local FontObj = Font([[info face=VL_PGothic size=-20 bold=0 italic=0 charset= unicode=1 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1 outline=1
  130. common lineHeight=25 base=20 scaleW=256 scaleH=256 pages=1 packed=0 alphaChnl=2 redChnl=2 greenChnl=2 blueChnl=2
  131. page id=0 file="PGothic_20px_0.png"
  132. chars count=193
  133. char id=12 x=23 y=192 width=5 height=3 xoffset=-2 yoffset=23 xadvance=7 page=0 chnl=15
  134. char id=13 x=11 y=192 width=5 height=3 xoffset=-2 yoffset=23 xadvance=7 page=0 chnl=15
  135. char id=32 x=248 y=166 width=5 height=3 xoffset=-2 yoffset=23 xadvance=5 page=0 chnl=15
  136. char id=33 x=250 y=121 width=5 height=17 xoffset=1 yoffset=4 xadvance=7 page=0 chnl=15
  137. char id=34 x=122 y=175 width=8 height=8 xoffset=0 yoffset=3 xadvance=8 page=0 chnl=15
  138. char id=35 x=48 y=127 width=15 height=17 xoffset=-1 yoffset=4 xadvance=14 page=0 chnl=15
  139. char id=36 x=172 y=23 width=13 height=21 xoffset=-1 yoffset=2 xadvance=11 page=0 chnl=15
  140. char id=37 x=12 y=70 width=18 height=18 xoffset=-1 yoffset=4 xadvance=16 page=0 chnl=15
  141. char id=38 x=125 y=65 width=17 height=18 xoffset=-1 yoffset=4 xadvance=14 page=0 chnl=15
  142. char id=39 x=146 y=170 width=5 height=8 xoffset=0 yoffset=3 xadvance=5 page=0 chnl=15
  143. char id=40 x=0 y=48 width=8 height=21 xoffset=0 yoffset=3 xadvance=8 page=0 chnl=15
  144. char id=41 x=223 y=23 width=9 height=21 xoffset=-1 yoffset=3 xadvance=8 page=0 chnl=15
  145. char id=42 x=67 y=177 width=12 height=10 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=15
  146. char id=43 x=188 y=139 width=15 height=14 xoffset=0 yoffset=7 xadvance=15 page=0 chnl=15
  147. char id=44 x=139 y=173 width=6 height=8 xoffset=0 yoffset=16 xadvance=6 page=0 chnl=15
  148. char id=45 x=237 y=168 width=10 height=4 xoffset=0 yoffset=12 xadvance=9 page=0 chnl=15
  149. char id=46 x=202 y=168 width=6 height=5 xoffset=0 yoffset=16 xadvance=6 page=0 chnl=15
  150. char id=47 x=13 y=109 width=12 height=18 xoffset=-1 yoffset=4 xadvance=10 page=0 chnl=15
  151. char id=48 x=206 y=65 width=14 height=18 xoffset=-1 yoffset=4 xadvance=13 page=0 chnl=15
  152. char id=49 x=117 y=142 width=9 height=17 xoffset=1 yoffset=4 xadvance=13 page=0 chnl=15
  153. char id=50 x=152 y=121 width=13 height=17 xoffset=0 yoffset=4 xadvance=13 page=0 chnl=15
  154. char id=51 x=168 y=84 width=13 height=18 xoffset=0 yoffset=4 xadvance=13 page=0 chnl=15
  155. char id=52 x=94 y=125 width=14 height=17 xoffset=-1 yoffset=4 xadvance=13 page=0 chnl=15
  156. char id=53 x=196 y=84 width=13 height=18 xoffset=0 yoffset=4 xadvance=13 page=0 chnl=15
  157. char id=54 x=236 y=65 width=13 height=18 xoffset=0 yoffset=4 xadvance=13 page=0 chnl=15
  158. char id=55 x=0 y=146 width=13 height=17 xoffset=0 yoffset=4 xadvance=13 page=0 chnl=15
  159. char id=56 x=176 y=65 width=14 height=18 xoffset=-1 yoffset=4 xadvance=13 page=0 chnl=15
  160. char id=57 x=221 y=65 width=14 height=18 xoffset=-1 yoffset=4 xadvance=13 page=0 chnl=15
  161. char id=58 x=248 y=139 width=5 height=13 xoffset=1 yoffset=8 xadvance=7 page=0 chnl=15
  162. char id=59 x=159 y=139 width=7 height=16 xoffset=0 yoffset=8 xadvance=8 page=0 chnl=15
  163. char id=60 x=144 y=156 width=13 height=13 xoffset=0 yoffset=8 xadvance=13 page=0 chnl=15
  164. char id=61 x=80 y=177 width=15 height=9 xoffset=0 yoffset=10 xadvance=15 page=0 chnl=15
  165. char id=62 x=129 y=159 width=14 height=13 xoffset=0 yoffset=8 xadvance=13 page=0 chnl=15
  166. char id=63 x=236 y=121 width=13 height=17 xoffset=0 yoffset=4 xadvance=13 page=0 chnl=15
  167. char id=64 x=69 y=68 width=18 height=18 xoffset=-1 yoffset=4 xadvance=17 page=0 chnl=15
  168. char id=65 x=32 y=127 width=15 height=17 xoffset=-1 yoffset=4 xadvance=13 page=0 chnl=15
  169. char id=66 x=28 y=89 width=13 height=18 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15
  170. char id=67 x=70 y=87 width=13 height=18 xoffset=-1 yoffset=4 xadvance=12 page=0 chnl=15
  171. char id=68 x=191 y=65 width=14 height=18 xoffset=0 yoffset=4 xadvance=13 page=0 chnl=15
  172. char id=69 x=79 y=143 width=12 height=17 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15
  173. char id=70 x=14 y=146 width=12 height=17 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15
  174. char id=71 x=160 y=65 width=15 height=18 xoffset=-1 yoffset=4 xadvance=14 page=0 chnl=15
  175. char id=72 x=109 y=124 width=14 height=17 xoffset=0 yoffset=4 xadvance=14 page=0 chnl=15
  176. char id=73 x=248 y=103 width=5 height=17 xoffset=1 yoffset=4 xadvance=6 page=0 chnl=15
  177. char id=74 x=223 y=84 width=12 height=18 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=15
  178. char id=75 x=138 y=121 width=13 height=17 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15
  179. char id=76 x=27 y=146 width=12 height=17 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15
  180. char id=77 x=215 y=103 width=16 height=17 xoffset=0 yoffset=4 xadvance=16 page=0 chnl=15
  181. char id=78 x=79 y=125 width=14 height=17 xoffset=0 yoffset=4 xadvance=14 page=0 chnl=15
  182. char id=79 x=143 y=65 width=16 height=18 xoffset=-1 yoffset=4 xadvance=14 page=0 chnl=15
  183. char id=80 x=166 y=121 width=13 height=17 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15
  184. char id=81 x=18 y=47 width=17 height=20 xoffset=-1 yoffset=4 xadvance=15 page=0 chnl=15
  185. char id=82 x=180 y=121 width=13 height=17 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15
  186. char id=83 x=84 y=87 width=13 height=18 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=15
  187. char id=84 x=64 y=125 width=14 height=17 xoffset=-1 yoffset=4 xadvance=13 page=0 chnl=15
  188. char id=85 x=140 y=84 width=13 height=18 xoffset=0 yoffset=4 xadvance=13 page=0 chnl=15
  189. char id=86 x=232 y=103 width=15 height=17 xoffset=-1 yoffset=4 xadvance=13 page=0 chnl=15
  190. char id=87 x=117 y=105 width=19 height=17 xoffset=-1 yoffset=4 xadvance=18 page=0 chnl=15
  191. char id=88 x=194 y=121 width=13 height=17 xoffset=0 yoffset=4 xadvance=13 page=0 chnl=15
  192. char id=89 x=16 y=128 width=15 height=17 xoffset=-1 yoffset=4 xadvance=13 page=0 chnl=15
  193. char id=90 x=222 y=121 width=13 height=17 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15
  194. char id=91 x=9 y=48 width=8 height=21 xoffset=1 yoffset=3 xadvance=9 page=0 chnl=15
  195. char id=92 x=0 y=109 width=12 height=18 xoffset=-1 yoffset=4 xadvance=10 page=0 chnl=15
  196. char id=93 x=243 y=23 width=9 height=21 xoffset=0 yoffset=3 xadvance=9 page=0 chnl=15
  197. char id=94 x=16 y=179 width=14 height=12 xoffset=-1 yoffset=4 xadvance=13 page=0 chnl=15
  198. char id=95 x=209 y=168 width=15 height=4 xoffset=-2 yoffset=20 xadvance=11 page=0 chnl=15
  199. char id=96 x=131 y=173 width=7 height=8 xoffset=-1 yoffset=2 xadvance=6 page=0 chnl=15
  200. char id=97 x=0 y=164 width=12 height=14 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=15
  201. char id=98 x=210 y=84 width=12 height=18 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15
  202. char id=99 x=39 y=164 width=11 height=14 xoffset=-1 yoffset=8 xadvance=10 page=0 chnl=15
  203. char id=100 x=182 y=84 width=13 height=18 xoffset=-1 yoffset=4 xadvance=12 page=0 chnl=15
  204. char id=101 x=13 y=164 width=12 height=14 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=15
  205. char id=102 x=66 y=143 width=12 height=17 xoffset=-1 yoffset=4 xadvance=10 page=0 chnl=15
  206. char id=103 x=0 y=90 width=13 height=18 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=15
  207. char id=104 x=53 y=145 width=12 height=17 xoffset=0 yoffset=4 xadvance=11 page=0 chnl=15
  208. char id=105 x=137 y=141 width=5 height=17 xoffset=1 yoffset=4 xadvance=6 page=0 chnl=15
  209. char id=106 x=97 y=24 width=9 height=22 xoffset=-2 yoffset=4 xadvance=7 page=0 chnl=15
  210. char id=107 x=40 y=145 width=12 height=17 xoffset=0 yoffset=4 xadvance=11 page=0 chnl=15
  211. char id=108 x=249 y=84 width=5 height=17 xoffset=1 yoffset=4 xadvance=6 page=0 chnl=15
  212. char id=109 x=82 y=161 width=16 height=13 xoffset=0 yoffset=8 xadvance=16 page=0 chnl=15
  213. char id=110 x=200 y=154 width=12 height=13 xoffset=0 yoffset=8 xadvance=11 page=0 chnl=15
  214. char id=111 x=220 y=139 width=13 height=14 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=15
  215. char id=112 x=39 y=108 width=12 height=18 xoffset=0 yoffset=8 xadvance=12 page=0 chnl=15
  216. char id=113 x=154 y=84 width=13 height=18 xoffset=-1 yoffset=8 xadvance=12 page=0 chnl=15
  217. char id=114 x=237 y=154 width=10 height=13 xoffset=0 yoffset=8 xadvance=9 page=0 chnl=15
  218. char id=115 x=26 y=164 width=12 height=14 xoffset=-1 yoffset=8 xadvance=10 page=0 chnl=15
  219. char id=116 x=105 y=143 width=11 height=17 xoffset=-1 yoffset=5 xadvance=10 page=0 chnl=15
  220. char id=117 x=51 y=163 width=11 height=14 xoffset=0 yoffset=8 xadvance=11 page=0 chnl=15
  221. char id=118 x=172 y=154 width=13 height=13 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=15
  222. char id=119 x=63 y=163 width=18 height=13 xoffset=-1 yoffset=8 xadvance=16 page=0 chnl=15
  223. char id=120 x=213 y=154 width=11 height=13 xoffset=0 yoffset=8 xadvance=11 page=0 chnl=15
  224. char id=121 x=14 y=89 width=13 height=18 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=15
  225. char id=122 x=225 y=154 width=11 height=13 xoffset=0 yoffset=8 xadvance=11 page=0 chnl=15
  226. char id=123 x=211 y=23 width=11 height=21 xoffset=-1 yoffset=3 xadvance=10 page=0 chnl=15
  227. char id=124 x=0 y=0 width=5 height=24 xoffset=1 yoffset=2 xadvance=7 page=0 chnl=15
  228. char id=125 x=199 y=23 width=11 height=21 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15
  229. char id=126 x=170 y=170 width=14 height=6 xoffset=0 yoffset=11 xadvance=14 page=0 chnl=15
  230. char id=160 x=17 y=192 width=5 height=3 xoffset=-2 yoffset=23 xadvance=8 page=0 chnl=15
  231. char id=161 x=250 y=65 width=5 height=18 xoffset=1 yoffset=8 xadvance=7 page=0 chnl=15
  232. char id=162 x=51 y=47 width=12 height=20 xoffset=-1 yoffset=5 xadvance=11 page=0 chnl=15
  233. char id=163 x=124 y=123 width=13 height=17 xoffset=0 yoffset=4 xadvance=13 page=0 chnl=15
  234. char id=164 x=114 y=161 width=14 height=13 xoffset=0 yoffset=6 xadvance=14 page=0 chnl=15
  235. char id=165 x=0 y=128 width=15 height=17 xoffset=-1 yoffset=4 xadvance=13 page=0 chnl=15
  236. char id=166 x=76 y=47 width=5 height=20 xoffset=1 yoffset=4 xadvance=7 page=0 chnl=15
  237. char id=167 x=64 y=47 width=11 height=20 xoffset=0 yoffset=4 xadvance=10 page=0 chnl=15
  238. char id=168 x=192 y=168 width=9 height=5 xoffset=0 yoffset=4 xadvance=9 page=0 chnl=15
  239. char id=169 x=50 y=68 width=18 height=18 xoffset=-1 yoffset=4 xadvance=17 page=0 chnl=15
  240. char id=170 x=186 y=154 width=13 height=13 xoffset=0 yoffset=4 xadvance=13 page=0 chnl=15
  241. char id=171 x=31 y=179 width=14 height=12 xoffset=0 yoffset=8 xadvance=14 page=0 chnl=15
  242. char id=172 x=107 y=175 width=14 height=8 xoffset=-1 yoffset=10 xadvance=13 page=0 chnl=15
  243. char id=173 x=0 y=192 width=10 height=4 xoffset=0 yoffset=12 xadvance=9 page=0 chnl=15
  244. char id=174 x=31 y=68 width=18 height=18 xoffset=-1 yoffset=4 xadvance=17 page=0 chnl=15
  245. char id=175 x=225 y=168 width=11 height=4 xoffset=-1 yoffset=5 xadvance=9 page=0 chnl=15
  246. char id=176 x=96 y=175 width=10 height=9 xoffset=-1 yoffset=4 xadvance=8 page=0 chnl=15
  247. char id=177 x=143 y=139 width=15 height=16 xoffset=0 yoffset=6 xadvance=15 page=0 chnl=15
  248. char id=178 x=57 y=178 width=9 height=12 xoffset=-1 yoffset=4 xadvance=8 page=0 chnl=15
  249. char id=179 x=46 y=179 width=10 height=12 xoffset=-1 yoffset=4 xadvance=8 page=0 chnl=15
  250. char id=180 x=163 y=170 width=6 height=7 xoffset=0 yoffset=3 xadvance=5 page=0 chnl=15
  251. char id=181 x=52 y=106 width=12 height=18 xoffset=0 yoffset=8 xadvance=11 page=0 chnl=15
  252. char id=182 x=36 y=47 width=14 height=20 xoffset=-1 yoffset=4 xadvance=13 page=0 chnl=15
  253. char id=183 x=185 y=168 width=6 height=6 xoffset=0 yoffset=11 xadvance=6 page=0 chnl=15
  254. char id=184 x=152 y=170 width=10 height=7 xoffset=-1 yoffset=19 xadvance=8 page=0 chnl=15
  255. char id=185 x=248 y=153 width=7 height=12 xoffset=0 yoffset=4 xadvance=8 page=0 chnl=15
  256. char id=186 x=158 y=156 width=13 height=13 xoffset=0 yoffset=4 xadvance=13 page=0 chnl=15
  257. char id=187 x=0 y=179 width=15 height=12 xoffset=0 yoffset=8 xadvance=14 page=0 chnl=15
  258. char id=188 x=157 y=103 width=19 height=17 xoffset=-1 yoffset=4 xadvance=17 page=0 chnl=15
  259. char id=189 x=177 y=103 width=18 height=17 xoffset=-1 yoffset=4 xadvance=17 page=0 chnl=15
  260. char id=190 x=137 y=103 width=19 height=17 xoffset=-1 yoffset=4 xadvance=17 page=0 chnl=15
  261. char id=191 x=98 y=86 width=13 height=18 xoffset=0 yoffset=8 xadvance=12 page=0 chnl=15
  262. char id=192 x=177 y=0 width=16 height=22 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=15
  263. char id=193 x=194 y=0 width=16 height=22 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=15
  264. char id=194 x=211 y=0 width=16 height=22 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=15
  265. char id=195 x=140 y=23 width=16 height=21 xoffset=-1 yoffset=0 xadvance=14 page=0 chnl=15
  266. char id=196 x=123 y=23 width=16 height=21 xoffset=-1 yoffset=0 xadvance=14 page=0 chnl=15
  267. char id=197 x=160 y=0 width=16 height=22 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=15
  268. char id=198 x=196 y=103 width=18 height=17 xoffset=-1 yoffset=4 xadvance=17 page=0 chnl=15
  269. char id=199 x=228 y=0 width=15 height=22 xoffset=-1 yoffset=4 xadvance=14 page=0 chnl=15
  270. char id=200 x=71 y=24 width=12 height=22 xoffset=0 yoffset=-1 xadvance=12 page=0 chnl=15
  271. char id=201 x=84 y=24 width=12 height=22 xoffset=0 yoffset=-1 xadvance=12 page=0 chnl=15
  272. char id=202 x=45 y=24 width=12 height=22 xoffset=0 yoffset=-1 xadvance=12 page=0 chnl=15
  273. char id=203 x=186 y=23 width=12 height=21 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15
  274. char id=204 x=107 y=24 width=7 height=22 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=15
  275. char id=205 x=115 y=24 width=7 height=22 xoffset=1 yoffset=-1 xadvance=6 page=0 chnl=15
  276. char id=206 x=244 y=0 width=10 height=22 xoffset=-2 yoffset=-1 xadvance=6 page=0 chnl=15
  277. char id=207 x=233 y=23 width=9 height=21 xoffset=-1 yoffset=0 xadvance=6 page=0 chnl=15
  278. char id=208 x=107 y=67 width=17 height=18 xoffset=-1 yoffset=4 xadvance=15 page=0 chnl=15
  279. char id=209 x=157 y=23 width=14 height=21 xoffset=0 yoffset=0 xadvance=14 page=0 chnl=15
  280. char id=210 x=44 y=0 width=18 height=23 xoffset=-1 yoffset=-1 xadvance=16 page=0 chnl=15
  281. char id=211 x=6 y=0 width=18 height=23 xoffset=-1 yoffset=-1 xadvance=16 page=0 chnl=15
  282. char id=212 x=25 y=0 width=18 height=23 xoffset=-1 yoffset=-1 xadvance=16 page=0 chnl=15
  283. char id=213 x=122 y=0 width=18 height=22 xoffset=-1 yoffset=0 xadvance=16 page=0 chnl=15
  284. char id=214 x=141 y=0 width=18 height=22 xoffset=-1 yoffset=0 xadvance=16 page=0 chnl=15
  285. char id=215 x=99 y=161 width=14 height=13 xoffset=-1 yoffset=8 xadvance=12 page=0 chnl=15
  286. char id=216 x=88 y=67 width=18 height=18 xoffset=-1 yoffset=4 xadvance=16 page=0 chnl=15
  287. char id=217 x=63 y=0 width=14 height=23 xoffset=0 yoffset=-1 xadvance=14 page=0 chnl=15
  288. char id=218 x=78 y=0 width=14 height=23 xoffset=0 yoffset=-1 xadvance=14 page=0 chnl=15
  289. char id=219 x=93 y=0 width=14 height=23 xoffset=0 yoffset=-1 xadvance=14 page=0 chnl=15
  290. char id=220 x=16 y=24 width=14 height=22 xoffset=0 yoffset=0 xadvance=14 page=0 chnl=15
  291. char id=221 x=0 y=25 width=15 height=22 xoffset=-1 yoffset=-1 xadvance=13 page=0 chnl=15
  292. char id=222 x=208 y=121 width=13 height=17 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15
  293. char id=223 x=152 y=45 width=13 height=19 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15
  294. char id=224 x=180 y=45 width=12 height=19 xoffset=-1 yoffset=3 xadvance=11 page=0 chnl=15
  295. char id=225 x=193 y=45 width=12 height=19 xoffset=-1 yoffset=3 xadvance=11 page=0 chnl=15
  296. char id=226 x=219 y=45 width=12 height=19 xoffset=-1 yoffset=3 xadvance=11 page=0 chnl=15
  297. char id=227 x=26 y=108 width=12 height=18 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=15
  298. char id=228 x=65 y=106 width=12 height=18 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=15
  299. char id=229 x=206 y=45 width=12 height=19 xoffset=-1 yoffset=3 xadvance=11 page=0 chnl=15
  300. char id=230 x=167 y=139 width=20 height=14 xoffset=-1 yoffset=8 xadvance=18 page=0 chnl=15
  301. char id=231 x=236 y=84 width=12 height=18 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=15
  302. char id=232 x=96 y=47 width=13 height=19 xoffset=-1 yoffset=3 xadvance=11 page=0 chnl=15
  303. char id=233 x=82 y=47 width=13 height=19 xoffset=-1 yoffset=3 xadvance=11 page=0 chnl=15
  304. char id=234 x=166 y=45 width=13 height=19 xoffset=-1 yoffset=3 xadvance=11 page=0 chnl=15
  305. char id=235 x=42 y=87 width=13 height=18 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=15
  306. char id=236 x=101 y=105 width=7 height=18 xoffset=-1 yoffset=3 xadvance=6 page=0 chnl=15
  307. char id=237 x=109 y=105 width=7 height=18 xoffset=1 yoffset=3 xadvance=6 page=0 chnl=15
  308. char id=238 x=90 y=106 width=10 height=18 xoffset=-2 yoffset=3 xadvance=6 page=0 chnl=15
  309. char id=239 x=127 y=141 width=9 height=17 xoffset=-1 yoffset=4 xadvance=6 page=0 chnl=15
  310. char id=240 x=56 y=87 width=13 height=18 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=15
  311. char id=241 x=92 y=143 width=12 height=17 xoffset=0 yoffset=4 xadvance=11 page=0 chnl=15
  312. char id=242 x=110 y=47 width=13 height=19 xoffset=-1 yoffset=3 xadvance=11 page=0 chnl=15
  313. char id=243 x=124 y=45 width=13 height=19 xoffset=-1 yoffset=3 xadvance=11 page=0 chnl=15
  314. char id=244 x=138 y=45 width=13 height=19 xoffset=-1 yoffset=3 xadvance=11 page=0 chnl=15
  315. char id=245 x=112 y=86 width=13 height=18 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=15
  316. char id=246 x=126 y=84 width=13 height=18 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=15
  317. char id=247 x=204 y=139 width=15 height=14 xoffset=0 yoffset=7 xadvance=15 page=0 chnl=15
  318. char id=248 x=234 y=139 width=13 height=14 xoffset=-1 yoffset=8 xadvance=12 page=0 chnl=15
  319. char id=249 x=232 y=45 width=11 height=19 xoffset=0 yoffset=3 xadvance=11 page=0 chnl=15
  320. char id=250 x=244 y=45 width=11 height=19 xoffset=0 yoffset=3 xadvance=11 page=0 chnl=15
  321. char id=251 x=0 y=70 width=11 height=19 xoffset=0 yoffset=3 xadvance=11 page=0 chnl=15
  322. char id=252 x=78 y=106 width=11 height=18 xoffset=0 yoffset=4 xadvance=11 page=0 chnl=15
  323. char id=253 x=108 y=0 width=13 height=23 xoffset=-1 yoffset=3 xadvance=11 page=0 chnl=15
  324. char id=254 x=58 y=24 width=12 height=22 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15
  325. char id=255 x=31 y=24 width=13 height=22 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=15]]
  326. ,"rbxassetid://2771014615")
  327. -------------------------------------
  328. --Map loading------------------------
  329. -------------------------------------
  330. local Decode = function(str,t,props,classes,names,enums,Model,CurPar,LastIns,split,RemoveAndSplit)
  331. local tonum,table_remove,inst,parnt,comma,table_foreach,pattern = tonumber,table.remove,Instance.new,"Parent",",",
  332. function(t,f)
  333. for a,b in pairs(t) do
  334. f(a,b)
  335. end
  336. end,"([^%s]+)"
  337. local Types = {
  338. Color3 = Color3.new,
  339. Vector3 = Vector3.new,
  340. Vector2 = Vector2.new,
  341. UDim = UDim.new,
  342. UDim2 = UDim2.new,
  343. CFrame = CFrame.new,
  344. Rect = Rect.new,
  345. EnumItem = function(a)
  346. return enums[tonumber(a)]
  347. end
  348. }
  349. split = function(str,sep)
  350. local fields = {}
  351. local ConcatNext = false
  352. str:gsub(pattern:format(sep),function(c)
  353. if ConcatNext == true then
  354. fields[#fields] = fields[#fields]..sep..c
  355. ConcatNext = false
  356. else
  357. fields[#fields+1] = c
  358. end
  359. if c:sub(#c)=="\\" then
  360. c = fields[#fields]
  361. fields[#fields] = c:sub(1,#c-1)
  362. ConcatNext = true
  363. end
  364. end)
  365. return fields
  366. end
  367. RemoveAndSplit = function(t)
  368. return split(table_remove(t,1),comma)
  369. end
  370. t = split(str,";")
  371. props = RemoveAndSplit(t)
  372. classes = RemoveAndSplit(t)
  373. names = RemoveAndSplit(t)
  374. enums = RemoveAndSplit(t)
  375. Model = inst"Model"
  376. CurPar = Model
  377. table_foreach(t,function(ct,c)
  378. if c=="n" or c=="p" then
  379. CurPar = c=="n" and LastIns or CurPar[parnt]
  380. else
  381. ct = split(c,"|")
  382. local class = classes[tonum(table_remove(ct,1))]
  383. if class=="UnionOperation" then
  384. LastIns = {Locked="true",Anchored="true",UsePartColor="true"}
  385. else
  386. LastIns = inst(class)
  387. if LastIns:IsA"BasePart" then
  388. LastIns.Anchored = true
  389. LastIns.Locked = true
  390. elseif LastIns:IsA"Script" then
  391. s(LastIns)
  392. end
  393. end
  394.  
  395. local function SetProperty(LastIns,p,str,s)
  396. s = Types[typeof(LastIns[p])]
  397. LastIns[p] = p=="Name" and names[tonum(str)] or s and s(unpack(split(str,comma))) or tonum(str) or (str~="true" and str~="false") and str or str=="true"
  398. end
  399.  
  400. local UnionData
  401. table_foreach(ct,function(s,p,a,str)
  402. a = p:find":"
  403. p,str = props[tonum(p:sub(1,a-1))],p:sub(a+1)
  404. if p=="UnionData" then
  405. UnionData = split(str," ")
  406. return
  407. end
  408. if class=="UnionOperation" then
  409. LastIns[p] = str
  410. return
  411. end
  412. SetProperty(LastIns,p,str)
  413. end)
  414.  
  415. if UnionData then
  416. local LI_Data = LastIns
  417. LastIns = DecodeUnion(UnionData)
  418. table_foreach(LI_Data,function(p,str)
  419. SetProperty(LastIns,p,str)
  420. end)
  421. end
  422.  
  423. LastIns[parnt] = CurPar
  424. end
  425. end)
  426.  
  427. return Model
  428. end
  429. local Model = Decode('Name,Color,Material,Position,Size,BottomSurface,TopSurface,Transparency,Brightness,Shadows,Orientation,CanCollide,Texture,Scale,Value,AnchorPoint,BackgroundColor3,BorderColor3,Font,Text,TextColor3,Tex'
  430. ..'tSize,BackgroundTransparency,PaddingBottom,PaddingLeft,PaddingRight,PaddingTop,Padding,TextScaled,TextWrapped,Active,ExtentsOffsetWorldSpace,Image,ImageTransparency,ScaleType,SliceCenter,BorderSizePix'
  431. ..'el,AspectRatio;Part,Folder,Model,PointLight,WedgePart,Decal,SpecialMesh,Humanoid,BodyColors,StringValue,ScreenGui,Frame,TextLabel,TextButton,UIPadding,UIListLayout,BillboardGui,ImageLabel,UIAspectRati'
  432. ..'oConstraint;Part,Buildings,Building,Table,Illumination,OuterStuff,Top,Floor,Back wall,Roof,Right Wall,Glass,Left Wall,Front wall,NPCs,Average NPC,HumanoidRootPart,Torso,Left Leg,Right Leg,Left Arm,Rig'
  433. ..'ht Arm,Head,Face,Dialog,Prompt,Answer1,Answer3,Answer2,ExecuteFunction,DialogName,Triggers,Baseplate,Spawn,MainFrame,NameLabel,Answers,TextFrame,AdvanceText,InteractBillboard,SidingImageLeft,IconImage'
  434. ..',SidingImageRight,InteractButton;WoodPlanks,Smooth,Brick,Wood,Glass,Grass,Arial,SourceSans,Slice;2|1:2;n;3|1:3;n;1|1:4|2:0.337,0.258,0.211|3:1|4:0,2.5,-19|5:12,3,4|6:2|7:2;1|1:5|8:1|4:-3,8.5,-17|5:1,1'
  435. ..',1|6:2|7:2;n;4|9:5|10:true;p;3|1:6;n;1|1:7|2:0.337,0.141,0.141|3:3|4:-3,16.5,-17|5:20,1,20|6:2|7:2;1|1:8|2:0.337,0.141,0.141|3:3|4:-3,0.5,-17|5:20,1,20|6:2|7:2;1|1:9|2:0.337,0.141,0.141|3:3|4:-3,8.5,-'
  436. ..'26.5|5:18,15,1|6:2|7:2;3|1:10;n;5|2:0.337,0.258,0.211|3:4|4:-6.5,22,-17|11:0,90,0|5:20,10,13|6:2;5|2:0.337,0.258,0.211|3:4|4:3.5,22,-17|11:0,-90,0|5:20,10,7|6:2;p;3|1:11;n;1|2:0.337,0.141,0.141|3:3|4:'
  437. ..'-12.5,3,-17|5:1,4,20|6:2|7:2;1|2:0.337,0.141,0.141|3:3|4:-12.5,8,-10|5:1,6,6|6:2|7:2;1|1:12|2:0.501,0.733,0.858|3:5|8:0.75|4:-12.5,8,-17|5:0.5,6,8|6:2|7:2;1|2:0.337,0.141,0.141|3:3|4:-12.5,13.5,-17|5:'
  438. ..'1,5,20|6:2|7:2;1|2:0.337,0.141,0.141|3:3|4:-12.5,8,-24|5:1,6,6|6:2|7:2;p;3|1:13;n;1|2:0.337,0.141,0.141|3:3|4:6.5,3,-17|5:1,4,20|6:2|7:2;1|2:0.337,0.141,0.141|3:3|4:6.5,8,-10|5:1,6,6|6:2|7:2;1|1:12|2:'
  439. ..'0.501,0.733,0.858|3:5|8:0.75|4:6.5,8,-17|5:0.5,6,8|6:2|7:2;1|2:0.337,0.141,0.141|3:3|4:6.5,13.5,-17|5:1,5,20|6:2|7:2;1|2:0.337,0.141,0.141|3:3|4:6.5,8,-24|5:1,6,6|6:2|7:2;p;3|1:14;n;1|2:0.337,0.141,0.'
  440. ..'141|3:3|4:-9.5,8.5,-7.5|5:5,15,1|6:2|7:2;1|2:0.337,0.141,0.141|3:3|4:-3,13.5,-7.5|5:8,5,1|6:2|7:2;1|2:0.337,0.141,0.141|3:3|4:3.5,8.5,-7.5|5:5,15,1|6:2|7:2;p;p;p;p;2|1:15;n;3|1:16;n;1|1:17|8:1|4:1.999'
  441. ..',3.995,-22.498|11:0,180,0|5:2,2,1|6:2|7:2;1|1:18|2:0.156,0.498,0.278|4:1.999,3.995,-22.498|11:0,180,0|5:2,2,1|12:false|6:2|7:2;1|1:19|2:0.05,0.411,0.674|4:2.499,1.995,-22.498|11:0,180,0|5:1,2,1|12:fal'
  442. ..'se|6:2|7:2;1|1:20|2:0.05,0.411,0.674|4:1.499,1.995,-22.498|11:0,180,0|5:1,2,1|12:false|6:2|7:2;1|1:21|2:0.992,0.917,0.552|4:2.999,4.295,-21.498|11:75,150,0|5:1,2,1|12:false|6:2|7:2;1|1:22|2:0.992,0.91'
  443. ..'7,0.552|4:0.999,4.295,-21.498|11:75,-150,0|5:1,2,1|12:false|6:2|7:2;1|1:23|2:0.992,0.917,0.552|4:1.999,5.495,-22.498|11:0,180,0|5:2,1,1|6:2|7:2;n;6|1:24|13:rbxasset://textures/face.png;7|14:1.2,1.2,1.'
  444. ..'2;p;8;9;2|1:25;n;10|1:26|15:Hello, World!;10|1:27|15:Hello to you too!;10|1:28|15:Goodbye!;10|1:29|15:Who are you?;n;10|1:26|15:idk, and you?;10|1:30|15:Test2;p;10|1:31|15:Dummy;10|1:30|15:Test1;p;p;p'
  445. ..';2|1:32;1|1:33|2:0.294,0.592,0.294|3:6|4:0,-0.5,0|5:512,1,512|7:2;1|1:34|8:1|4:-2,0.5,0|5:5,1,5|12:false|6:2|7:2;11|1:25;n;12|1:35|4:0.5,0,1,0|5:0,640,0,240|16:0.5,1|17:0,0,0|18:1,1,1;n;13|1:36|4:0,0,'
  446. ..'0,-1|5:0,125,0,25|16:0,1|17:0,0,0|18:1,1,1|19:7|20:DialogName|21:1,1,1|22:20;12|1:37|4:1,0,0,0|5:0.25,0,1,0|16:1,0|17:1,1,1|23:1;n;14|1:29|5:1,0,0.3,0|17:0,0,0|18:1,1,1|19:8|20:Answer2|21:1,1,1|22:18;'
  447. ..'14|1:27|5:1,0,0.3,0|17:0,0,0|18:1,1,1|19:8|20:Answer1|21:1,1,1|22:18;15|24:0,10|25:0,10|26:0,10|27:0,10;16|28:0.059,0;14|1:28|5:1,0,0.3,0|17:0,0,0|18:1,1,1|19:8|20:Answer3|21:1,1,1|22:18;p;12|1:38|5:0'
  448. ..'.75,0,1,0|17:1,1,1|23:1;n;15|24:0,10|25:0,10|26:0,10|27:0,10;p;14|1:39|4:1,-10,1,-10|5:0,20,0,20|16:1,1|17:0,0,0|18:1,1,1|19:7|20:>|21:1,1,1|29:true|22:14|30:true;p;p;17|1:40|5:3,0,3,0|31:true|32:0,4,'
  449. ..'0;n;12|1:35|5:1,0,0.5,0|17:1,1,1|23:1|18:0,0,0;n;18|1:41|5:0.05,0,1,0|17:1,1,1|23:1|33:rbxassetid://965810449|34:0.4|35:9|36:16,15,55,40;12|4:0.05,0,0,0|5:0.899,0,1,0|17:1,1,1|23:0.4|37:0;n;18|1:42|4:'
  450. ..'0.5,0,0.5,0|5:1,0,1,0|16:0.5,0.5|17:1,1,1|23:1|33:rbxassetid://968136228;n;19|38:0.5;p;15|24:0.1,0|27:0.1,0;p;18|1:43|4:0.949,0,0,0|5:0.05,0,1,0|17:1,1,1|23:1|33:rbxassetid://965816113|34:0.4|35:9|36:'
  451. ..'0,16,39,40;14|1:44|5:1,0,1,0|17:1,1,1|23:1|18:0,0,0|19:8|20:|22:14;p;p;')
  452. Model.Name = "RPG Map"
  453. Model.PrimaryPart = Model.Baseplate
  454.  
  455. local Util = {
  456. DrawText = function(frame,str,all)
  457. local d = Drawer(FontObj,frame,str,all)
  458. if all then return d end
  459. local skip = false
  460. local con = frame.InputBegan:Connect(function(io)
  461. if io.UserInputType~=Enum.UserInputType.MouseButton1 then return end
  462. skip = true
  463. d:DrawAll()
  464. end)
  465. while d:DrawNext() do
  466. for i=1,2 do
  467. RS:Wait()
  468. end
  469. if skip then break end
  470. end
  471. con:Disconnect()
  472. return d
  473. end
  474. }
  475. --/////////////////////////////////--
  476. --//End of modules/////////////////--
  477. --/////////////////////////////////--
  478.  
  479. local Player = owner
  480. local gui = Player:FindFirstChildOfClass("PlayerGui")
  481. local bg = Model:WaitForChild("InteractBillboard")
  482. local dg = Model:WaitForChild("Dialog")
  483. bg.Parent=nil
  484. dg.Parent=nil
  485. if gui:FindFirstChild("Dialog GUI") then
  486. gui["Dialog GUI"]:Destroy()
  487. end
  488. local f = Instance.new("Folder")
  489. f.Name = "Dialog GUI"
  490. f.Parent = gui
  491. if workspace:FindFirstChild("RPG Map") then
  492. workspace["RPG Map"]:Destroy()
  493. end
  494. Model:SetPrimaryPartCFrame(CFrame.new(1000,0,0))
  495. Model.Parent = workspace
  496.  
  497. local Character = Player.Character or Player.CharacterAdded:Wait()
  498. local WalkSpeed = 16
  499. local JumpPower = 50
  500.  
  501. local Functions = {
  502. Test1 = function()
  503. print('asd')
  504. end,
  505. Test2 = function()
  506. print('dsa')
  507. end,
  508. }
  509.  
  510. Dialog = {
  511. RemoveConnections = function(self)
  512. while #self.Connections>0 do
  513. local con = table.remove(self.Connections)
  514. if con.Connected then
  515. con:Disconnect()
  516. end
  517. end
  518. end,
  519. Load = function(self,dialog,first)
  520. self:RemoveConnections()
  521. local dg = self.Gui.MainFrame
  522. local prompt = dialog:FindFirstChild("Prompt")
  523. local execfunc = dialog:FindFirstChild("ExecuteFunction")
  524. if execfunc then
  525. Functions[execfunc.Value]()
  526. end
  527. if not prompt then
  528. return self:Close()
  529. end
  530. local name = dialog:FindFirstChild("DialogName")
  531. self.Answers = {dialog:FindFirstChild("Answer1"),dialog:FindFirstChild("Answer2"),dialog:FindFirstChild("Answer3")}
  532. dg.Answers.Visible = false
  533. dg.AdvanceText.Visible = false
  534. if #self.Answers<=0 then
  535. dg.TextFrame.Size = UDim2.new(1,0,1,0)
  536. else
  537. dg.TextFrame.Size = UDim2.new(0.75,0,1,0)
  538. end
  539. if name then
  540. dg.NameLabel.Visible = true
  541. dg.NameLabel.Text = name.Value
  542. elseif first then
  543. dg.NameLabel.Visible = false
  544. end
  545.  
  546. Util.DrawText(dg.TextFrame,prompt.Value)
  547.  
  548. for a,b in pairs(self.Answers) do
  549. local but = dg.Answers['Answer'..tostring(a)]
  550. but.Visible = true
  551. but.Text = b.Value
  552. table.insert(self.Connections,but.MouseButton1Up:Connect(function()
  553. self:Load(b)
  554. end))
  555. end
  556. if #self.Answers<=0 then
  557. dg.AdvanceText.Visible = true
  558. table.insert(self.Connections,dg.AdvanceText.MouseButton1Down:Connect(function()
  559. self:Load(prompt)
  560. end))
  561. else
  562. dg.Answers.Visible = true
  563. end
  564. end,
  565. Open = function(self,dialog)
  566. if self.IsOpen then self:Close() end
  567. self.IsOpen = true
  568. self.Gui = dg:Clone()
  569. self.Gui.Parent = f
  570. if Character then
  571. local h = Character:FindFirstChildOfClass("Humanoid")
  572. if h then
  573. h.WalkSpeed = 0
  574. h.JumpPower = 0
  575. end
  576. end
  577. self:Load(dialog,true)
  578. end,
  579. Close = function(self)
  580. if not self.Gui then return end
  581. self.Gui:Destroy()
  582. self.Gui = nil
  583. if Character then
  584. local h = Character:FindFirstChildOfClass("Humanoid")
  585. if h then
  586. h.WalkSpeed = WalkSpeed
  587. h.JumpPower = JumpPower
  588. end
  589. end
  590. self.IsOpen = false
  591. end,
  592. Connections = {},
  593. Answers = {},
  594. Gui = nil,
  595. IsOpen = false,
  596. }
  597.  
  598. Player.CharacterRemoving:Connect(function()
  599. Dialog:Close()
  600. end)
  601. Player.CharacterAdded:Connect(function(char)
  602. Character = char
  603. Character:SetPrimaryPartCFrame(map.Spawn.CFrame + Vector3.new(0,8,0))
  604. end)
  605.  
  606. local function InitDialog(folder,head)
  607. local bg = bg:Clone()
  608. bg.Parent = f
  609. bg.Adornee = head
  610. bg.MainFrame.InteractButton.MouseButton1Down:Connect(function()
  611. if Dialog.IsOpen then return end
  612. Dialog:Open(folder)
  613. end)
  614. end
  615.  
  616. local map = Model
  617. for _,m in pairs(map.NPCs:GetChildren()) do
  618. local d,h = m:FindFirstChild("Dialog"),m:FindFirstChild("Head")
  619. if d and h then
  620. InitDialog(d,h)
  621. end
  622. end
  623.  
  624. if Character then
  625. Character:SetPrimaryPartCFrame(map.Spawn.CFrame + Vector3.new(0,8,0))
  626. end
Advertisement
Add Comment
Please, Sign In to add comment