Hobo


SUBMITTED BY: Pamlau

DATE: March 8, 2017, 10:31 a.m.

FORMAT: Lua

SIZE: 15.0 kB

HITS: 289

  1. Player = game.Players.LocalPlayer
  2. Char = Player.Character
  3. Torso = Char.Torso
  4. Head = Char.Head
  5. Arms = {Char:FindFirstChild'Right Arm', Char:FindFirstChild'Left Arm'}
  6. Shoulders = {Torso:FindFirstChild'Right Shoulder', Torso:FindFirstChild'Left Shoulder'}
  7. Legs = {Char:FindFirstChild'Right Leg', Char:FindFirstChild'Left Leg'}
  8. HumRoot = Char:FindFirstChild'HumanoidRootPart'
  9. HumRootJ = HumRoot['RootJoint']
  10. Humanoid = Char:FindFirstChild'Humanoid'
  11. local s = Workspace:FindFirstChild('shirobako_script: '..Player.Name,true)
  12. if s then
  13. local f = s:FindFirstChild'stop'
  14. if f then
  15. f:Invoke()
  16. end
  17. end
  18. s=nil
  19. Debris = game:service'Debris'
  20. RS = game:service'RunService'
  21. Chatserv = game:service'Chat'
  22. Insertserv = game:service'InsertService'
  23. Neck = Torso:FindFirstChild'Neck'
  24. pcall(function() Char.Shirobako:Destroy() end)
  25. Main = Instance.new("Model",Char)
  26. Main.Name = "Shirobako"
  27. script.Parent=Main
  28. cfn=CFrame.new
  29. ang = function(x,y,z) return CFrame.Angles(x or 0,y or 0,z or 0)end
  30. m={tau=math.pi*2}
  31. v3n=Vector3.new
  32. md,mr,PI=math.rad, math.random, math.pi
  33. bcol=BrickColor.new
  34. function l(a1,x,y,z,rx,ry,rz)
  35. local cf
  36. if tostring(a1):find(',') == nil then
  37. cf=a1.CFrame
  38. else cf=a1 end
  39. return cf*CFrame.new(x or 0,y or 0,z or 0)*CFrame.Angles(
  40. rx or 0,ry or 0,yz or 0)
  41. end
  42. New = function(what)
  43. return function(bar)
  44. local obj=Instance.new(what)
  45. for arg,val in pairs(bar) do
  46. if arg == "_P" then
  47. obj.Parent = val
  48. else
  49. if pcall(function()return obj[arg] end) then
  50. obj[arg]=val
  51. end
  52. end
  53. end
  54. return obj
  55. end
  56. end
  57. Edit = function(what)
  58. return function(args)
  59. for _,obj in next,what do
  60. for arg,val in next,args do
  61. if pcall(function()return obj[arg]end) then
  62. obj[arg]=val
  63. end
  64. end
  65. end
  66. end
  67. end
  68. _1=nil
  69. set_material = nil
  70. set_color = nil
  71. set_parent = nil
  72. Part = function(x,y,z,col,tr)
  73. local p = New"Part"{
  74. _P=set_parent or Main;
  75. BrickColor = bcol(col or set_color or "White");
  76. CanCollide = false;
  77. Transparency = tr or 0;
  78. Size = Vector3.new(x or 0,y or 0,z or 0);
  79. Material = set_material or 'SmoothPlastic';
  80. }
  81. for _,sur in next,Enum.NormalId:GetEnumItems() do
  82. p[sur.Name..'Surface'] = 0
  83. end
  84. _1 = p
  85. return p
  86. end
  87. Wedge = function(x,y,z,col,tr)
  88. local p = New"WedgePart"{
  89. _P=Main;
  90. BrickColor = bcol(col or "White");
  91. CanCollide = false;
  92. Transparency = tr or 0;
  93. Size = Vector3.new(x or 0,y or 0,z or 0);
  94. Material = set_material or 'SmoothPlastic';
  95. }
  96. for _,sur in next,Enum.NormalId:GetEnumItems() do
  97. p[sur.Name..'Surface'] = 0
  98. end
  99. _1 = p
  100. return p
  101. end
  102. Weld = function(part0,part1,c0,c1,...) --over-engineered welding function which accepts many things
  103. local ar = {...}
  104. local cframe0,cframe1
  105. local function checkf()local res=true
  106. for i,v in pairs(ar)do
  107. if type(v) ~= 'number' then
  108. res=false
  109. end
  110. end
  111. return res
  112. end
  113. if type(c0) == 'table' then
  114. cframe0 = CFrame.new(c0[1] or 0, c0[2] or 0, c0[3] or 0) * CFrame.Angles(
  115. c0[4] or 0, c0[5] or 0, c0[6] or 0)
  116. elseif type(c0) == 'userdata' then
  117. cframe0 = c0
  118. elseif type(c0) == 'number' and checkf() then
  119. cframe0 = CFrame.new(c0 or 0,c1 or 0,ar[1] or 0) * CFrame.Angles(ar[2] or 0, ar[3] or 0, ar[4] or 0)
  120. end
  121. if type(c1) == 'table' then
  122. cframe1 = CFrame.new(c1[1] or 0, c1[2] or 0, c1[3] or 0) * CFrame.Angles(
  123. c1[4] or 0, c1[5] or 0, c1[6] or 0)
  124. elseif type(c1) == 'userdata' then
  125. cframe1 = c1
  126. elseif type(c1) == 'number' and (not c0 or (c0 and type(c0) == 'table')) then
  127. cframe1 = CFrame.new(c1 or 0, ar[1] or 0, ar[2] or 0) * CFrame.Angles(ar[3] or 0, ar[4] or 0, ar[5] or 0)
  128. end
  129. for i,v in pairs(ar)do
  130. if type(v) == 'table' then
  131. cframe1 = CFrame.new(v[1] or 0, v[2] or 0, v[3] or 0) * CFrame.new(v[4] or 0, v[5] or 0, v[6] or 0)
  132. elseif type(v) == 'userdata' then
  133. cframe1 = v
  134. end
  135. end
  136. cframe0,cframe1 = cframe1,cframe0
  137. part0.Position=part1.Position
  138. local weld = Instance.new("Motor")
  139. weld.Part0 = part0
  140. weld.Part1 = part1
  141. weld.C0 = cframe0 or CFrame.new()
  142. weld.C1 = cframe1 or CFrame.new()
  143. weld.MaxVelocity = .1
  144. weld.Parent = part0
  145. return weld
  146. end
  147. mesh_ids = {spike = "rbxassetid://1033714";
  148. ring="rbxassetid://3270017";
  149. }
  150. Mesh = function(parent,id,sx,sy,sz)
  151. local name = ( (id == 'cyl' and 'CylinderMesh') or (id == 'bl' and 'BlockMesh') or 'SpecialMesh')
  152. local mesh = Instance.new(name)
  153. if id == 's' then
  154. mesh.MeshType = Enum.MeshType.Sphere
  155. elseif id == 'w' then
  156. mesh.MeshType = Enum.MeshType.Wedge
  157. elseif string.find(id,"://") ~= nil then
  158. mesh.MeshId = id
  159. end
  160. mesh.Scale = Vector3.new(sx or 1, sy or 1, sz or 1)
  161. mesh.Parent = parent
  162. return mesh
  163. end
  164. hdl = Part(1.1,1.5,1.1) hdl.Material='Wood'
  165. hw=Weld(hdl,Arms[1],0,-2,0,-PI/2)
  166. -- New'Decal'{_P=hdl;face='Front';Texture='rbxassetid://49125250'}
  167. dollar = Part(1,1,1,'Bright green')
  168. dollar_msh=Mesh(dollar,"rbxassetid://443493147",.015,.015,.015)
  169. Weld(dollar,hdl,0,0,-.5,0,PI)
  170. top=Part(1,.1,1,'Black')Mesh(top,'bl',.95,.1,.95)
  171. Weld(top,hdl,0,.75)
  172. ring = Part(1,1,1)
  173. Weld(ring,hdl,0,0,.5,0,PI/2)
  174. Mesh(ring,mesh_ids.ring,1,1,3)
  175. Joints = {}
  176. function addJoint(name,weld,c0,c1)
  177. local t= {}
  178. t.w=weld
  179. t.n_c0 = c0 or weld.C0
  180. t.n_c1 = c1 or weld.C1
  181. t._desired=weld.C0
  182. t.speed=.1
  183. t.l=0
  184. function t:get()
  185. return setmetatable({},{__newindex=function(t,i,v)
  186. if i=='d' and self.l == 0 then
  187. self.d = v
  188. elseif i == 's' then self.speed=v end end})
  189. end
  190. setmetatable(t,{__newindex=function(ta,i,v)
  191. if i=='d' then
  192. ta._desired = ta.n_c0 * v
  193. end end})
  194. Joints[name]=t
  195. end
  196. addJoint('rw',New"Weld"{_P = Torso;Part0=Torso;Part1=Arms[1];
  197. C0=cfn(1,0.5,0); C1=cfn(-.5,0.5,0)})
  198. addJoint('hw',hw)
  199. addJoint('tw',HumRootJ)
  200. rw=Joints.rw
  201. hw=Joints.hw
  202. tw=Joints.tw
  203. snd=New"Sound"{_P=hdl;SoundId='rbxassetid://359628148'}
  204. rw.d=ang(PI/2)
  205. script.Name='shirobako_script: '..Player.Name
  206. angle=0
  207. p_tick=tick()
  208. --Clear clothing--
  209. for i,v in pairs(Char:children())do
  210. if v:IsA'Hat' or v:IsA'Clothing'then
  211. v:Destroy()
  212. end
  213. end
  214. function addHat(id)
  215. return function()
  216. local id=id
  217. for i,v in next,Char:children()do
  218. if v:IsA'Hat' then v:Destroy() end
  219. end
  220. local as=Insertserv:LoadAsset(id):children()[1]
  221. Player:LoadCharacterAppearance(as)
  222. end
  223. end
  224. MONEY = 0
  225. DonatedPlayers = {}
  226. function GiveAll()
  227. local as=Insertserv:LoadAsset(162067148)
  228. for i,v in next,DonatedPlayers do
  229. local pl=game:service'Players':FindFirstChild(v)
  230. if pl then
  231. local cl=as:Clone()
  232. pl:LoadCharacterAppearance(cl:children()[1])
  233. end
  234. end
  235. acting = true
  236. rw.w.Part1 = nil
  237. tw.w.C0 = tw.n_c0
  238. Shoulders[1].Part0=Torso
  239. Shoulders[1].Part1=Arms[1]
  240. Shoulders[1].Parent=Torso
  241. Chatserv:Chat(Head,"THANK YOU EVERYONE =D")
  242. for i,v in pairs(Connections) do
  243. v:disconnect()
  244. end
  245. Main:Destroy()
  246. end
  247. suits = {
  248. beggar={'rbxassetid://54674221','rbxassetid://54676961',-1};
  249. poor={'rbxassetid://398635080','rbxassetid://217385535',10,addHat(68259961)};
  250. rich={'rbxassetid://286378066','rbxassetid://198292567',20,addHat(1563352)};
  251. uberrich={'rbxassetid://231706573','rbxassetid://239131699',30,addHat(138932314)};
  252. FINAL={'rbxassetid://231706573','rbxassetid://239131699',40,GiveAll};
  253. }
  254. shirt = New"Shirt"{_P=Char;ShirtTemplate=suits.beggar[1]}
  255. pants = New"Pants"{_P=Char;PantsTemplate=suits.beggar[2]}
  256. function checksuit()
  257. for i,v in pairs(suits)do
  258. if MONEY == v[3] then
  259. cur_choise = i
  260. shirt.ShirtTemplate=v[1]
  261. pants.PantsTemplate=v[2]
  262. if v[4] then
  263. v[4]()
  264. end
  265. end
  266. end
  267. end
  268. cur_choise = "beggar"
  269. choises = {
  270. beggar = {"Can I have some money?";";_;";"Can ya spare couple bucks?";"I'm so poor..."};
  271. poor = {"I need money for studies.", "Can ya lend me some cash?", ";_; Anyone?"};
  272. rich = {"Can ya give sum money for taxi?", "Please?"};
  273. uberrich={"Wanna get dominus? Gimme money!", "This is not a scam... I swear!", "Does anyone want a dominus?"};
  274. FINAL={"THANK YOU EVERYONE WHO DONATED =D"};
  275. }
  276. text = "_ bucks donated"
  277. text2 = "Thank you kind _"
  278. surfg = New"SurfaceGui"{_P=hdl,Face='Right'}
  279. lab=New"TextLabel"{_P=surfg;Size=UDim2.new(1,0,1,0);Text="0 bucks donated";TextScaled=true;BackgroundTransparency=1}
  280. thanking=false
  281. anim_con = RS.Stepped:connect(function()
  282. for _,j in next,Joints do
  283. j.w.C0 = j.w.C0:lerp(j._desired,j.speed)
  284. end
  285. end)
  286. dead_con = Humanoid.Died:connect(function()
  287. acting=true
  288. Chatserv:Chat(Head,"World is so cruel =(")
  289. end)
  290. acting=false
  291. depmoney=function(a)
  292. if not thanking then
  293. snd:Play()
  294. thanking=true
  295. Chatserv:Chat(Head,text2:gsub('_',(a and a.Name or 'human')) )
  296. MONEY = MONEY+1
  297. if a then
  298. local name = a.Name
  299. local _in=false
  300. for _,v in pairs(DonatedPlayers) do
  301. if v == name then
  302. _in=true
  303. end
  304. end
  305. if not _in then
  306. table.insert(DonatedPlayers,name)
  307. end
  308. end
  309. checksuit()
  310. lab.Text=text:gsub('_',MONEY)
  311. wait(1.25)
  312. thanking=false
  313. end
  314. end
  315. lab.Text=text:gsub('_',MONEY)
  316. New"ClickDetector"{_P=dollar}.MouseClick:connect(function(a)depmoney(a)end)
  317. cnt=0
  318. Connections = {}
  319. for i,v in next,getfenv(0) do
  320. if i:match("_con") ~= nil then
  321. table.insert(Connections,v)
  322. end
  323. end
  324. swoosh_snd = New"Sound"{_P=hdl;SoundId='rbxassetid://134012322'}
  325. hit_snd = New"Sound"{_P=hdl;SoundId='rbxassetid://386946017'}
  326. function slash()
  327. acting=true
  328. rw.speed=.3
  329. rw.d=ang(PI/2,0,-PI/4)*ang(0,PI/2)
  330. swoosh_snd:Play()
  331. local con
  332. con=hdl.Touched:connect(function(hit)
  333. local hum=hit.Parent:FindFirstChild'Humanoid'
  334. if hum then
  335. Spawn(function()hum.PlatformStand=true wait'.1'hum.PlatformStand=false end)
  336. hum.Torso.Velocity=cfn(Torso.Position,hum.Torso.Position).lookVector*70+v3n(0,30,0)
  337. hit_snd:Play()
  338. con:disconnect()
  339. Chatserv:Chat(Head,"Dont come closer!")
  340. end
  341. end)
  342. wait'.15'
  343. rw.d=ang(PI/2,0,PI/4)*ang(0,PI/2)
  344. wait'.25'
  345. acting=false
  346. rw.speed=.1
  347. con:disconnect()
  348. end
  349. New"BindableFunction"{_P=script;Name='stop'}.OnInvoke=function()for i,v in pairs(Connections)do v:disconnect()end end
  350. -- thanking=true
  351. Spawn(function()
  352. while wait()do
  353. if not acting then
  354. if (tick()-p_tick)>(2+(cnt/2*1.75)) and not thanking and cur_choise~='FINAL' then
  355. local choise = choises[cur_choise]
  356. cnt=cnt+1
  357. cnt=(cnt>#choise and 1 or cnt)
  358. Chatserv:Chat(Head, choise[cnt])
  359. p_tick=tick()
  360. end
  361. angle=angle%100 + 1/5
  362. if not thanking then
  363. rw.d=ang(PI/2+math.sin(angle)*.15)
  364. hw.d=ang(0,0,math.sin(angle)*.15)
  365. tw.d=cfn()
  366. else
  367. rw.d=cfn(0,0,.15)*ang(PI/2,0,-PI/4)
  368. hw.d=cfn(.15,0,0)*ang(0,md'-35')
  369. tw.d=ang(md'15')
  370. end end
  371. end
  372. end)
  373. Mouse = Player:GetMouse()
  374. Mouse.KeyDown:connect(function(key)
  375. if acting then return end
  376. if key == 'f' then
  377. slash()
  378. end
  379. end)
  380. -- slash()
  381. -- for i =1,40 do depmoney(Player)end
  382. --type: hl/https://titanpad.com/ep/pad/export/Beggar/latest?format=txt

comments powered by Disqus