Advertisement
Guest User

Untitled

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