Advertisement
Markjac

Roblox Character Chooser Scripts

Nov 22nd, 2016
5,943
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.59 KB | None | 0 0
  1. player = script.Parent.Parent.Parent
  2. backpack = player.Backpack
  3.  
  4. function chooseClass(class)
  5.     for i, v in pairs(backpack:GetChildren()) do v:remove() end
  6.     for i, v in pairs(class:GetChildren()) do
  7.         if v:IsA("Tool") then
  8.             v:clone().Parent = backpack
  9.         elseif v:IsA("HopperBin") then
  10.             v:clone().Parent = backpack
  11.         end
  12.     end
  13.    
  14.     script.Parent.Main.Visible = false
  15.     script.Parent.Title.Visible = false
  16.     script.Parent.TitleBackground.Visible = false
  17. end
  18.  
  19. function onHumanoidDied(humanoid, player)
  20.     script.Parent.Main.Visible = true
  21.     script.Parent.Title.Visible = true
  22.     script.Parent.TitleBackground.Visible = true
  23.     end
  24.  
  25. for i, v in pairs(script.Parent.Main:GetChildren()) do
  26.     v.MouseButton1Up:connect(function () chooseClass(v) end)
  27. end
  28.  
  29.  
  30. ----------------------------------------------------------------------------------------------------------------------------------
  31.  
  32.  
  33. player = game.Players.LocalPlayer.Character
  34. wait(1)
  35. player.Torso.Anchored = true
  36. window = script.Parent.Parent
  37. function onClicked(GUI)
  38. wait(1)
  39.     window:remove()
  40.     player.Torso.Anchored = false
  41. end
  42. script.Parent.MouseButton1Click:connect(onClicked)
  43.  
  44. ------------------------------------------------------------------------------------------------------------------
  45.  
  46.  
  47. victim = script.Parent.Parent.Parent.Parent.Parent.Character
  48.  
  49. function kill()
  50.     v =  victim:GetChildren()
  51.     for f = 1,#v do
  52.         if v[f].className == "CharacterMesh" then
  53.             v[f]:Remove()
  54.         end
  55.     end
  56.     p = script:GetChildren()
  57.     for i = 1,#p do
  58.         if p[i].className == "CharacterMesh" then
  59.             p[i]:clone().Parent = victim
  60.         end
  61.     end
  62. end
  63.  
  64. script.Parent.MouseButton1Down:connect(kill)
  65.  
  66. ----------------------------------------------------------------------------------------------------------------
  67.  
  68.  
  69. victim = script.Parent.Parent.Parent.Parent.Parent.Character
  70.  
  71. function kill()
  72. for i,v in ipairs (victim:GetChildren()) do
  73. if v:IsA('Accoutrement') then
  74. v:Destroy()
  75. end
  76. end
  77.     p = script:GetChildren()
  78.     for i = 1,#p do
  79.         if p[i].className == "Accessory" then
  80.             p[i]:clone().Parent = victim
  81.         end
  82.     end
  83.  
  84.  end
  85. script.Parent.MouseButton1Down:connect(kill)
  86.  
  87. ---------------------------------------------------------------------------------------------------------------
  88.  
  89.  
  90. color1 = 1030
  91. function color()
  92. script.Parent.Parent.Parent.Parent.Parent.Character["Head"].BrickColor = BrickColor.new(color1)
  93. script.Parent.Parent.Parent.Parent.Parent.Character["Torso"].BrickColor = BrickColor.new(color1)
  94. script.Parent.Parent.Parent.Parent.Parent.Character["Left Arm"].BrickColor = BrickColor.new(color1)
  95. script.Parent.Parent.Parent.Parent.Parent.Character["Right Arm"].BrickColor = BrickColor.new(color1)
  96. script.Parent.Parent.Parent.Parent.Parent.Character["Left Leg"].BrickColor = BrickColor.new(color1)
  97. script.Parent.Parent.Parent.Parent.Parent.Character["Right Leg"].BrickColor = BrickColor.new(color1)
  98. end
  99.  
  100. script.Parent.MouseButton1Down:connect(color)
  101.  
  102. -----------------------------------------------------------------------------------------------------------------------------------
  103.  
  104. function Click()
  105. local chance = math.random(1,3)
  106. script.Parent.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(1333.91, 327.491, -1367.77)
  107. end
  108. script.Parent.MouseButton1Down:connect(Click)
  109.  
  110.  
  111.  
  112.  
  113. -------------------------------------------------------------------------------------------------------------------------------------
  114.  
  115.  
  116. local Player = game:GetService("Players").LocalPlayer
  117. --Settings--
  118. local Uniform = {}
  119. Uniform.Shirt = "http://roblox.com/asset/?id=24402346"
  120. Uniform.Pants = "http://roblox.com/asset/?id=24402848"
  121. --function--
  122. function AddUniform(P)
  123.     local Character = P.Character
  124.     repeat wait(0) until Character ~= nil
  125.     for i,Object in next,Character:GetChildren() do
  126.         if Object:IsA("Shirt") or Object:IsA("Pants") then
  127.             Object:Destroy()
  128.         end
  129.     end
  130.     local Shirt = Instance.new("Shirt",Character)
  131.     Shirt.ShirtTemplate = Uniform.Shirt
  132.     local Pants = Instance.new("Pants",Character)
  133.     Pants.PantsTemplate = Uniform.Pants
  134. end
  135. --GUIPart--
  136. local Bin = script.Parent
  137. if Bin:IsA("TextButton") or Bin:IsA("ImageButton") then
  138.     Bin.MouseButton1Down:connect(function()
  139.         AddUniform(Player)
  140.     end)
  141. end
  142.  
  143. --------------------------------------------------------------------------------------------------------------------------------
  144.  
  145.  
  146. player = script.Parent.Parent.Parent.Parent.Parent.Parent
  147. script.Parent.Parent.MouseButton1Click:connect(function()
  148.         if player.Character and player.Character:findFirstChild("face", true)then
  149.                player.Character.Head.face.Texture = script.Parent.Image
  150.         end
  151. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement