ViggoCS

Begging for Money

Jul 22nd, 2017
703
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.69 KB | None | 0 0
  1. --SHIROBAKO made by mugex--
  2.  
  3.  
  4.  
  5.  
  6. Player = game.Players.LocalPlayer
  7.  
  8. Char = Player.Character
  9.  
  10. Torso = Char.Torso
  11.  
  12. Head = Char.Head
  13.  
  14. Arms = {Char:FindFirstChild'Right Arm', Char:FindFirstChild'Left Arm'}
  15.  
  16. Shoulders = {Torso:FindFirstChild'Right Shoulder', Torso:FindFirstChild'Left Shoulder'}
  17.  
  18. Legs = {Char:FindFirstChild'Right Leg', Char:FindFirstChild'Left Leg'}
  19.  
  20. HumRoot = Char:FindFirstChild'HumanoidRootPart'
  21.  
  22. HumRootJ = HumRoot['RootJoint']
  23.  
  24. Humanoid = Char:FindFirstChild'Humanoid'
  25.  
  26.  
  27.  
  28.  
  29. local s = Workspace:FindFirstChild('shirobako_script: '..Player.Name,true)
  30.  
  31. if s then
  32.  
  33. local f = s:FindFirstChild'stop'
  34.  
  35. if f then
  36.  
  37. f:Invoke()
  38.  
  39. end
  40.  
  41. end
  42.  
  43. s=nil
  44.  
  45.  
  46.  
  47.  
  48. Debris = game:service'Debris'
  49.  
  50. RS = game:service'RunService'
  51.  
  52. Chatserv = game:service'Chat'
  53.  
  54. Insertserv = game:service'InsertService'
  55.  
  56.  
  57.  
  58.  
  59. Neck = Torso:FindFirstChild'Neck'
  60.  
  61.  
  62.  
  63.  
  64. pcall(function() Char.Shirobako:Destroy() end)
  65.  
  66. Main = Instance.new("Model",Char)
  67.  
  68. Main.Name = "Shirobako"
  69.  
  70. script.Parent=Main
  71.  
  72.  
  73.  
  74.  
  75. cfn=CFrame.new
  76.  
  77. ang = function(x,y,z) return CFrame.Angles(x or 0,y or 0,z or 0)end
  78.  
  79. m={tau=math.pi*2}
  80.  
  81. v3n=Vector3.new
  82.  
  83. md,mr,PI=math.rad, math.random, math.pi
  84.  
  85. bcol=BrickColor.new
  86.  
  87.  
  88.  
  89.  
  90. function l(a1,x,y,z,rx,ry,rz)
  91.  
  92. local cf
  93.  
  94. if tostring(a1):find(',') == nil then
  95.  
  96. cf=a1.CFrame
  97.  
  98. else cf=a1 end
  99.  
  100. return cf*CFrame.new(x or 0,y or 0,z or 0)*CFrame.Angles(
  101.  
  102. rx or 0,ry or 0,yz or 0)
  103.  
  104. end
  105.  
  106.  
  107.  
  108.  
  109. New = function(what)
  110.  
  111. return function(bar)
  112.  
  113. local obj=Instance.new(what)
  114.  
  115. for arg,val in pairs(bar) do
  116.  
  117. if arg == "_P" then
  118.  
  119. obj.Parent = val
  120.  
  121. else
  122.  
  123. if pcall(function()return obj[arg] end) then
  124.  
  125. obj[arg]=val
  126.  
  127. end
  128.  
  129. end
  130.  
  131. end
  132.  
  133. return obj
  134.  
  135. end
  136.  
  137. end
  138.  
  139.  
  140.  
  141.  
  142. Edit = function(what)
  143.  
  144. return function(args)
  145.  
  146. for _,obj in next,what do
  147.  
  148. for arg,val in next,args do
  149.  
  150. if pcall(function()return obj[arg]end) then
  151.  
  152. obj[arg]=val
  153.  
  154. end
  155.  
  156. end
  157.  
  158. end
  159.  
  160. end
  161.  
  162. end
  163.  
  164.  
  165.  
  166.  
  167. _1=nil
  168.  
  169. set_material = nil
  170.  
  171. set_color = nil
  172.  
  173. set_parent = nil
  174.  
  175. Part = function(x,y,z,col,tr)
  176.  
  177. local p = New"Part"{
  178.  
  179. _P=set_parent or Main;
  180.  
  181. BrickColor = bcol(col or set_color or "White");
  182.  
  183. CanCollide = false;
  184.  
  185. Transparency = tr or 0;
  186.  
  187. Size = Vector3.new(x or 0,y or 0,z or 0);
  188.  
  189. Material = set_material or 'SmoothPlastic';
  190.  
  191. }
  192.  
  193. for _,sur in next,Enum.NormalId:GetEnumItems() do
  194.  
  195. p[sur.Name..'Surface'] = 0
  196.  
  197. end
  198.  
  199. _1 = p
  200.  
  201. return p
  202.  
  203. end
  204.  
  205. Wedge = function(x,y,z,col,tr)
  206.  
  207. local p = New"WedgePart"{
  208.  
  209. _P=Main;
  210.  
  211. BrickColor = bcol(col or "White");
  212.  
  213. CanCollide = false;
  214.  
  215. Transparency = tr or 0;
  216.  
  217. Size = Vector3.new(x or 0,y or 0,z or 0);
  218.  
  219. Material = set_material or 'SmoothPlastic';
  220.  
  221. }
  222.  
  223. for _,sur in next,Enum.NormalId:GetEnumItems() do
  224.  
  225. p[sur.Name..'Surface'] = 0
  226.  
  227. end
  228.  
  229. _1 = p
  230.  
  231. return p
  232.  
  233. end
  234.  
  235. Weld = function(part0,part1,c0,c1,...) --over-engineered welding function which accepts many things
  236.  
  237. local ar = {...}
  238.  
  239. local cframe0,cframe1
  240.  
  241. local function checkf()local res=true
  242.  
  243. for i,v in pairs(ar)do
  244.  
  245. if type(v) ~= 'number' then
  246.  
  247. res=false
  248.  
  249. end
  250.  
  251. end
  252.  
  253. return res
  254.  
  255. end
  256.  
  257. if type(c0) == 'table' then
  258.  
  259. cframe0 = CFrame.new(c0[1] or 0, c0[2] or 0, c0[3] or 0) * CFrame.Angles(
  260.  
  261. c0[4] or 0, c0[5] or 0, c0[6] or 0)
  262.  
  263. elseif type(c0) == 'userdata' then
  264.  
  265. cframe0 = c0
  266.  
  267. elseif type(c0) == 'number' and checkf() then
  268.  
  269. 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)
  270.  
  271. end
  272.  
  273. if type(c1) == 'table' then
  274.  
  275. cframe1 = CFrame.new(c1[1] or 0, c1[2] or 0, c1[3] or 0) * CFrame.Angles(
  276.  
  277. c1[4] or 0, c1[5] or 0, c1[6] or 0)
  278.  
  279. elseif type(c1) == 'userdata' then
  280.  
  281. cframe1 = c1
  282.  
  283. elseif type(c1) == 'number' and (not c0 or (c0 and type(c0) == 'table')) then
  284.  
  285. 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)
  286.  
  287. end
  288.  
  289. for i,v in pairs(ar)do
  290.  
  291. if type(v) == 'table' then
  292.  
  293. 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)
  294.  
  295. elseif type(v) == 'userdata' then
  296.  
  297. cframe1 = v
  298.  
  299. end
  300.  
  301. end
  302.  
  303.  
  304.  
  305. cframe0,cframe1 = cframe1,cframe0
  306.  
  307. part0.Position=part1.Position
  308.  
  309. local weld = Instance.new("Motor")
  310.  
  311. weld.Part0 = part0
  312.  
  313. weld.Part1 = part1
  314.  
  315. weld.C0 = cframe0 or CFrame.new()
  316.  
  317. weld.C1 = cframe1 or CFrame.new()
  318.  
  319. weld.MaxVelocity = .1
  320.  
  321. weld.Parent = part0
  322.  
  323. return weld
  324.  
  325. end
  326.  
  327.  
  328.  
  329.  
  330. mesh_ids = {spike = "rbxassetid://1033714";
  331.  
  332. ring="rbxassetid://3270017";
  333.  
  334. }
  335.  
  336.  
  337.  
  338.  
  339. Mesh = function(parent,id,sx,sy,sz)
  340.  
  341. local name = ( (id == 'cyl' and 'CylinderMesh') or (id == 'bl' and 'BlockMesh') or 'SpecialMesh')
  342.  
  343. local mesh = Instance.new(name)
  344.  
  345. if id == 's' then
  346.  
  347. mesh.MeshType = Enum.MeshType.Sphere
  348.  
  349. elseif id == 'w' then
  350.  
  351. mesh.MeshType = Enum.MeshType.Wedge
  352.  
  353. elseif string.find(id,"://") ~= nil then
  354.  
  355. mesh.MeshId = id
  356.  
  357. end
  358.  
  359. mesh.Scale = Vector3.new(sx or 1, sy or 1, sz or 1)
  360.  
  361. mesh.Parent = parent
  362.  
  363. return mesh
  364.  
  365. end
  366.  
  367.  
  368.  
  369.  
  370. hdl = Part(1.1,1.5,1.1) hdl.Material='Wood'
  371.  
  372. hw=Weld(hdl,Arms[1],0,-2,0,-PI/2)
  373.  
  374.  
  375.  
  376.  
  377. -- New'Decal'{_P=hdl;face='Front';Texture='rbxassetid://49125250'}
  378.  
  379.  
  380.  
  381.  
  382. dollar = Part(1,1,1,'Bright green')
  383.  
  384. dollar_msh=Mesh(dollar,"rbxassetid://443493147",.015,.015,.015)
  385.  
  386. Weld(dollar,hdl,0,0,-.5,0,PI)
  387.  
  388.  
  389.  
  390.  
  391. top=Part(1,.1,1,'Black')Mesh(top,'bl',.95,.1,.95)
  392.  
  393. Weld(top,hdl,0,.75)
  394.  
  395.  
  396.  
  397.  
  398. ring = Part(1,1,1)
  399.  
  400. Weld(ring,hdl,0,0,.5,0,PI/2)
  401.  
  402. Mesh(ring,mesh_ids.ring,1,1,3)
  403.  
  404.  
  405.  
  406.  
  407. Joints = {}
  408.  
  409. function addJoint(name,weld,c0,c1)
  410.  
  411. local t= {}
  412.  
  413. t.w=weld
  414.  
  415. t.n_c0 = c0 or weld.C0
  416.  
  417. t.n_c1 = c1 or weld.C1
  418.  
  419. t._desired=weld.C0
  420.  
  421. t.speed=.1
  422.  
  423. t.l=0
  424.  
  425.  
  426.  
  427. function t:get()
  428.  
  429. return setmetatable({},{__newindex=function(t,i,v)
  430.  
  431. if i=='d' and self.l == 0 then
  432.  
  433. self.d = v
  434.  
  435. elseif i == 's' then self.speed=v end end})
  436.  
  437. end
  438.  
  439.  
  440.  
  441.  
  442. setmetatable(t,{__newindex=function(ta,i,v)
  443.  
  444. if i=='d' then
  445.  
  446. ta._desired = ta.n_c0 * v
  447.  
  448. end end})
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455. Joints[name]=t
  456.  
  457. end
  458.  
  459.  
  460.  
  461.  
  462. addJoint('rw',New"Weld"{_P = Torso;Part0=Torso;Part1=Arms[1];
  463.  
  464. C0=cfn(1,0.5,0); C1=cfn(-.5,0.5,0)})
  465.  
  466. addJoint('hw',hw)
  467.  
  468. addJoint('tw',HumRootJ)
  469.  
  470.  
  471.  
  472.  
  473. rw=Joints.rw
  474.  
  475. hw=Joints.hw
  476.  
  477. tw=Joints.tw
  478.  
  479.  
  480.  
  481.  
  482. snd=New"Sound"{_P=hdl;SoundId='rbxassetid://359628148'}
  483.  
  484.  
  485.  
  486.  
  487. rw.d=ang(PI/2)
  488.  
  489. script.Name='shirobako_script: '..Player.Name
  490.  
  491.  
  492.  
  493.  
  494. angle=0
  495.  
  496. p_tick=tick()
  497.  
  498.  
  499.  
  500.  
  501. --Clear clothing--
  502.  
  503. for i,v in pairs(Char:children())do
  504.  
  505. if v:IsA'Hat' or v:IsA'Clothing'then
  506.  
  507. v:Destroy()
  508.  
  509. end
  510.  
  511. end
  512.  
  513.  
  514.  
  515.  
  516. function addHat(id)
  517.  
  518. return function()
  519.  
  520. local id=id
  521.  
  522. for i,v in next,Char:children()do
  523.  
  524. if v:IsA'Hat' then v:Destroy() end
  525.  
  526. end
  527.  
  528. local as=Insertserv:LoadAsset(id):children()[1]
  529.  
  530. Player:LoadCharacterAppearance(as)
  531.  
  532. end
  533.  
  534. end
  535.  
  536.  
  537.  
  538.  
  539. MONEY = 0
  540.  
  541. DonatedPlayers = {}
  542.  
  543.  
  544.  
  545.  
  546. function GiveAll()
  547.  
  548. local as=Insertserv:LoadAsset(162067148)
  549.  
  550. for i,v in next,DonatedPlayers do
  551.  
  552. local pl=game:service'Players':FindFirstChild(v)
  553.  
  554. if pl then
  555.  
  556. local cl=as:Clone()
  557.  
  558. pl:LoadCharacterAppearance(cl:children()[1])
  559.  
  560. end
  561.  
  562. end
  563.  
  564.  
  565.  
  566.  
  567. acting = true
  568.  
  569. rw.w.Part1 = nil
  570.  
  571. tw.w.C0 = tw.n_c0
  572.  
  573. Shoulders[1].Part0=Torso
  574.  
  575. Shoulders[1].Part1=Arms[1]
  576.  
  577. Shoulders[1].Parent=Torso
  578.  
  579. Chatserv:Chat(Head,"THANK YOU EVERYONE =D")
  580.  
  581. for i,v in pairs(Connections) do
  582.  
  583. v:disconnect()
  584.  
  585. end
  586.  
  587. Main:Destroy()
  588.  
  589. end
  590.  
  591.  
  592.  
  593.  
  594. suits = {
  595.  
  596. beggar={'rbxassetid://54674221','rbxassetid://54676961',-1};
  597.  
  598. poor={'rbxassetid://398635080','rbxassetid://217385535',10,addHat(68259961)};
  599.  
  600. rich={'rbxassetid://286378066','rbxassetid://198292567',20,addHat(1563352)};
  601.  
  602. uberrich={'rbxassetid://231706573','rbxassetid://239131699',30,addHat(138932314)};
  603.  
  604. FINAL={'rbxassetid://231706573','rbxassetid://239131699',40,GiveAll};
  605.  
  606. }
  607.  
  608.  
  609.  
  610.  
  611. shirt = New"Shirt"{_P=Char;ShirtTemplate=suits.beggar[1]}
  612.  
  613. pants = New"Pants"{_P=Char;PantsTemplate=suits.beggar[2]}
  614.  
  615.  
  616.  
  617.  
  618. function checksuit()
  619.  
  620. for i,v in pairs(suits)do
  621.  
  622. if MONEY == v[3] then
  623.  
  624. cur_choise = i
  625.  
  626. shirt.ShirtTemplate=v[1]
  627.  
  628. pants.PantsTemplate=v[2]
  629.  
  630. if v[4] then
  631.  
  632. v[4]()
  633.  
  634. end
  635.  
  636. end
  637.  
  638. end
  639.  
  640. end
  641.  
  642.  
  643.  
  644.  
  645. cur_choise = "beggar"
  646.  
  647. choises = {
  648.  
  649. beggar = {"Can I have some money?";";_;";"Can ya spare couple bucks?";"I'm so poor..."};
  650.  
  651. poor = {"I need money for studies.", "Can ya lend me some cash?", ";_; Anyone?"};
  652.  
  653. rich = {"Can ya give sum money for taxi?", "Please?"};
  654.  
  655. uberrich={"Wanna get dominus? Gimme money!", "This is not a scam... I swear!", "Does anyone want a dominus?"};
  656.  
  657. FINAL={"THANK YOU EVERYONE WHO DONATED =D"};
  658.  
  659. }
  660.  
  661.  
  662.  
  663.  
  664. text = "_ bucks donated"
  665.  
  666. text2 = "Thank you kind _"
  667.  
  668. surfg = New"SurfaceGui"{_P=hdl,Face='Right'}
  669.  
  670. lab=New"TextLabel"{_P=surfg;Size=UDim2.new(1,0,1,0);Text="0 bucks donated";TextScaled=true;BackgroundTransparency=1}
  671.  
  672. thanking=false
  673.  
  674.  
  675.  
  676.  
  677. anim_con = RS.Stepped:connect(function()
  678.  
  679. for _,j in next,Joints do
  680.  
  681. j.w.C0 = j.w.C0:lerp(j._desired,j.speed)
  682.  
  683. end
  684.  
  685. end)
  686.  
  687. dead_con = Humanoid.Died:connect(function()
  688.  
  689. acting=true
  690.  
  691. Chatserv:Chat(Head,"World is so cruel =(")
  692.  
  693. end)
  694.  
  695.  
  696.  
  697.  
  698. acting=false
  699.  
  700.  
  701.  
  702.  
  703. depmoney=function(a)
  704.  
  705. if not thanking then
  706.  
  707. snd:Play()
  708.  
  709. thanking=true
  710.  
  711. Chatserv:Chat(Head,text2:gsub('_',(a and a.Name or 'human')) )
  712.  
  713. MONEY = MONEY+1
  714.  
  715. if a then
  716.  
  717. local name = a.Name
  718.  
  719. local _in=false
  720.  
  721. for _,v in pairs(DonatedPlayers) do
  722.  
  723. if v == name then
  724.  
  725. _in=true
  726.  
  727. end
  728.  
  729. end
  730.  
  731. if not _in then
  732.  
  733. table.insert(DonatedPlayers,name)
  734.  
  735. end
  736.  
  737. end
  738.  
  739. checksuit()
  740.  
  741. lab.Text=text:gsub('_',MONEY)
  742.  
  743. wait(1.25)
  744.  
  745. thanking=false
  746.  
  747. end
  748.  
  749. end
  750.  
  751.  
  752.  
  753.  
  754. lab.Text=text:gsub('_',MONEY)
  755.  
  756. New"ClickDetector"{_P=dollar}.MouseClick:connect(function(a)depmoney(a)end)
  757.  
  758. cnt=0
  759.  
  760. Connections = {}
  761.  
  762. for i,v in next,getfenv(0) do
  763.  
  764. if i:match("_con") ~= nil then
  765.  
  766. table.insert(Connections,v)
  767.  
  768. end
  769.  
  770. end
  771.  
  772.  
  773.  
  774.  
  775. swoosh_snd = New"Sound"{_P=hdl;SoundId='rbxassetid://134012322'}
  776.  
  777. hit_snd = New"Sound"{_P=hdl;SoundId='rbxassetid://386946017'}
  778.  
  779.  
  780.  
  781.  
  782. function slash()
  783.  
  784. acting=true
  785.  
  786. rw.speed=.3
  787.  
  788. rw.d=ang(PI/2,0,-PI/4)*ang(0,PI/2)
  789.  
  790. swoosh_snd:Play()
  791.  
  792. local con
  793.  
  794. con=hdl.Touched:connect(function(hit)
  795.  
  796. local hum=hit.Parent:FindFirstChild'Humanoid'
  797.  
  798. if hum then
  799.  
  800. Spawn(function()hum.PlatformStand=true wait'.1'hum.PlatformStand=false end)
  801.  
  802. hum.Torso.Velocity=cfn(Torso.Position,hum.Torso.Position).lookVector*70+v3n(0,30,0)
  803.  
  804. hit_snd:Play()
  805.  
  806. con:disconnect()
  807.  
  808. Chatserv:Chat(Head,"Dont come closer!")
  809.  
  810. end
  811.  
  812. end)
  813.  
  814. wait'.15'
  815.  
  816. rw.d=ang(PI/2,0,PI/4)*ang(0,PI/2)
  817.  
  818. wait'.25'
  819.  
  820. acting=false
  821.  
  822. rw.speed=.1
  823.  
  824. con:disconnect()
  825.  
  826. end
  827.  
  828. New"BindableFunction"{_P=script;Name='stop'}.OnInvoke=function()for i,v in pairs(Connections)do v:disconnect()end end
  829.  
  830. -- thanking=true
  831.  
  832. Spawn(function()
  833.  
  834. while wait()do
  835.  
  836. if not acting then
  837.  
  838. if (tick()-p_tick)>(2+(cnt/2*1.75)) and not thanking and cur_choise~='FINAL' then
  839.  
  840. local choise = choises[cur_choise]
  841.  
  842. cnt=cnt+1
  843.  
  844. cnt=(cnt>#choise and 1 or cnt)
  845.  
  846. Chatserv:Chat(Head, choise[cnt])
  847.  
  848. p_tick=tick()
  849.  
  850. end
  851.  
  852. angle=angle%100 + 1/5
  853.  
  854.  
  855.  
  856. if not thanking then
  857.  
  858. rw.d=ang(PI/2+math.sin(angle)*.15)
  859.  
  860. hw.d=ang(0,0,math.sin(angle)*.15)
  861.  
  862. tw.d=cfn()
  863.  
  864. else
  865.  
  866. rw.d=cfn(0,0,.15)*ang(PI/2,0,-PI/4)
  867.  
  868. hw.d=cfn(.15,0,0)*ang(0,md'-35')
  869.  
  870. tw.d=ang(md'15')
  871.  
  872. end end
  873.  
  874. end
  875.  
  876. end)
  877.  
  878.  
  879.  
  880.  
  881. Mouse = Player:GetMouse()
  882.  
  883. Mouse.KeyDown:connect(function(key)
  884.  
  885. if acting then return end
  886.  
  887. if key == 'f' then
  888.  
  889. slash()
  890.  
  891. end
  892.  
  893. end)
  894.  
  895. -- slash()
  896.  
  897. -- for i =1,40 do depmoney(Player)end
  898.  
  899.  
  900.  
  901.  
  902. --type: hl/https://titanpad.com/ep/pad/export/Beggar/latest?format=txt
Add Comment
Please, Sign In to add comment