Advertisement
VoidScripteay72

Fe Character Creator

Aug 12th, 2023
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.53 KB | None | 0 0
  1.  
  2. player = game:GetService("Players").LocalPlayer
  3. camera = workspace.CurrentCamera
  4. character = player.Character
  5. mouse = player:GetMouse()
  6.  
  7. for i,v in pairs(game:GetService("Lighting"):GetChildren()) do
  8. v:Destroy()
  9. end
  10.  
  11. temp = Instance.new("Folder",workspace)
  12.  
  13. stuff = Instance.new("Folder",temp)
  14.  
  15. camera.CameraType = Enum.CameraType.Scriptable
  16. camera.FieldOfView = 1
  17.  
  18. cenoff = 1000
  19.  
  20. camera.CFrame = CFrame.new(-5,cenoff,-1500) * CFrame.Angles(0,math.rad(180),0)
  21.  
  22. background = Instance.new("Part",temp)
  23. background.Anchored = true
  24. background.Size = Vector3.new(100,100,0.1)
  25. background.Position = Vector3.new(0,cenoff,0)
  26. background.Color = Color3.new(0.0941176, 0.952941, 1)
  27.  
  28. hipheight = 0
  29.  
  30. ground = Instance.new("Part",temp)
  31. ground.Anchored = true
  32. ground.Size = Vector3.new(100,100,0.11)
  33. ground.Position = Vector3.new(0,cenoff-53,0)
  34. ground.Color = Color3.new(0.105882, 0.576471, 0.0705882)
  35.  
  36. referance = game:GetObjects("rbxassetid://13540732616")[1]
  37. referance.Parent = temp
  38. referance.HumanoidRootPart.CFrame = CFrame.new(0,cenoff,0)
  39.  
  40. SG = Instance.new("ScreenGui",player.PlayerGui)
  41. SG.IgnoreGuiInset = true
  42.  
  43. uiback = Instance.new("Frame",SG)
  44. uiback.AnchorPoint = Vector2.new(1,0)
  45. uiback.Position = UDim2.new(1)
  46. uiback.Size = UDim2.new(0.25,0,1)
  47. uiback.BorderMode = Enum.BorderMode.Inset
  48. uiback.BorderSizePixel = 10
  49. uiback.BorderColor3 = Color3.new(0,0,0)
  50. uiback.BackgroundColor3 = Color3.new(0.290196, 0.290196, 0.290196)
  51.  
  52. hatname = Instance.new("TextLabel",uiback)
  53. hatname.AnchorPoint = Vector2.new(.5,.5)
  54. hatname.Position = UDim2.new(.5,0,.1)
  55. hatname.Size = UDim2.new(.95,0,.1)
  56. hatname.TextScaled = true
  57. hatname.BackgroundTransparency = 1
  58. hatname.TextColor3 = Color3.new(0,0,0)
  59. hatname.Text = "Hat Name"
  60.  
  61. button = Instance.new("TextButton")
  62. button.Size = UDim2.new(1,0,.1)
  63. button.TextScaled = true
  64. button.BorderMode = Enum.BorderMode.Inset
  65. button.TextColor3 = Color3.new(0,0,0)
  66. button.BorderSizePixel = 10
  67. button.BorderColor3 = Color3.new(0,0,0)
  68. button.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392)
  69. Instance.new("UIStroke",button)
  70.  
  71. buttons = {}
  72.  
  73. buttons.RA = button:Clone()
  74. buttons.RA.Text = "Right Arm"
  75. buttons.RA.Parent = uiback
  76. buttons.RA.Position = UDim2.new(0,0,0.2)
  77. buttons.RA.TextColor3 = Color3.fromRGB(237, 234, 234)
  78.  
  79. buttons.RL = button:Clone()
  80. buttons.RL.Text = "Right Leg"
  81. buttons.RL.Parent = uiback
  82. buttons.RL.Position = UDim2.new(0,0,0.3)
  83. buttons.RL.TextColor3 = Color3.fromRGB(170, 85, 0)
  84.  
  85. buttons.LA = button:Clone()
  86. buttons.LA.Text = "Left Arm"
  87. buttons.LA.Parent = uiback
  88. buttons.LA.Position = UDim2.new(0,0,0.4)
  89. buttons.LA.TextColor3 = Color3.fromRGB(255, 0, 0)
  90.  
  91. buttons.LL = button:Clone()
  92. buttons.LL.Text = "Left Leg"
  93. buttons.LL.Parent = uiback
  94. buttons.LL.Position = UDim2.new(0,0,0.5)
  95. buttons.LL.TextColor3 = Color3.fromRGB(255, 255, 0)
  96.  
  97. buttons.HD = button:Clone()
  98. buttons.HD.Text = "Head"
  99. buttons.HD.Parent = uiback
  100. buttons.HD.Position = UDim2.new(0,0,0.6)
  101. buttons.HD.TextColor3 = Color3.fromRGB(0, 255, 0)
  102.  
  103. buttons.TS = button:Clone()
  104. buttons.TS.Text = "Torso"
  105. buttons.TS.Parent = uiback
  106. buttons.TS.Position = UDim2.new(0,0,0.7)
  107. buttons.TS.TextColor3 = Color3.fromRGB(255, 0, 191)
  108.  
  109. buttons.RP = button:Clone()
  110. buttons.RP.Text = "Root Part"
  111. buttons.RP.Parent = uiback
  112. buttons.RP.Position = UDim2.new(0,0,0.8)
  113.  
  114. Create = button:Clone()
  115. Create.Text = "Create"
  116. Create.Parent = uiback
  117. Create.Position = UDim2.new(0,0,0.9)
  118. Create.BackgroundColor3 = Color3.new(0.133333, 1, 0)
  119.  
  120. credote = Instance.new("TextLabel",SG)
  121. credote.AnchorPoint = Vector2.new(0,1)
  122. credote.Position = UDim2.new(0,0,1)
  123. credote.Size = UDim2.new(.3,0,.075)
  124. credote.Text = "Made by Rouxhaver"
  125. credote.TextScaled = true
  126. credote.BackgroundTransparency = 1
  127. credote.TextColor3 = Color3.new(0,0,0)
  128.  
  129. outline = Instance.new("Highlight",nil)
  130. outline.OutlineColor = Color3.new(1, 0.623529, 0.0941176)
  131.  
  132. selhat = nil
  133.  
  134. handles = {}
  135.  
  136. for i,hat in pairs(character:GetChildren()) do
  137. if hat:IsA("Accessory") then
  138. local part = hat.Handle:Clone()
  139. table.insert(handles, part)
  140. part.Parent = stuff
  141. part.Anchored = true
  142. part.AccessoryWeld:Destroy()
  143. part.CFrame = CFrame.new(math.random(-100,100)/10,cenoff+math.random(-100,100)/10,-10)
  144.  
  145. local limb = Instance.new("StringValue",part)
  146. limb.Value = "RP"
  147. limb.Name = "limb"
  148.  
  149. local pos = Instance.new("Vector3Value",part)
  150. pos.Name = "pos"
  151. pos.Value = part.Position
  152.  
  153. local hatval = Instance.new("ObjectValue",part)
  154. hatval.Name = "hatval"
  155. hatval.Value = hat
  156.  
  157. local rot = Instance.new("Vector3Value",part)
  158. rot.Name = "rot"
  159. rot.Value = Vector3.new()
  160. end
  161. end
  162.  
  163. dragging = false
  164.  
  165. function clearcolor()
  166. for i,v in pairs(buttons) do
  167. v.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392)
  168. end
  169. end
  170.  
  171. mouse.Button1Down:Connect(function()
  172. if mouse.Target and mouse.Target.Parent == stuff then
  173. clearcolor()
  174. selhat = mouse.Target
  175. outline.Parent = selhat
  176. hatname.Text = selhat.hatval.Value.Name
  177. dragging = true
  178. mouse.TargetFilter = stuff
  179. buttons[selhat.limb.Value].BackgroundColor3 = Color3.new(0.94902, 1, 0)
  180. while dragging == true do
  181. selhat.Position = mouse.Hit.p + Vector3.new(0,0,-10)
  182. task.wait()
  183. end
  184. selhat.pos.Value = mouse.Hit.p
  185. end
  186. if mouse.Target == ground then
  187. dragging = true
  188. while dragging == true do
  189. ground.Position = Vector3.new(0,mouse.Hit.Y-50,0)
  190. hipheight = cenoff - mouse.Hit.Y - 3
  191. task.wait()
  192. end
  193. end
  194. end)
  195.  
  196. mouse.Button1Up:Connect(function()
  197. dragging = false
  198. mouse.TargetFilter = nil
  199. end)
  200.  
  201. for i,v in pairs(buttons) do
  202. v.MouseButton1Up:Connect(function()
  203. if selhat ~= nil then
  204. clearcolor()
  205. selhat.limb.Value = tostring(i)
  206. v.BackgroundColor3 = Color3.new(0.94902, 1, 0)
  207. end
  208. end)
  209. end
  210.  
  211. usimp = game:GetService("UserInputService")
  212.  
  213. usimp.InputBegan:Connect(function(key)
  214. if selhat ~= nil then
  215. if key.KeyCode == Enum.KeyCode.R then
  216. selhat.Orientation += Vector3.new(0,10,0)
  217. selhat.rot.Value = selhat.Orientation
  218. end
  219. if key.KeyCode == Enum.KeyCode.T then
  220. selhat.Orientation += Vector3.new(0,0,10)
  221. selhat.rot.Value = selhat.Orientation
  222. end
  223. end
  224. end)
  225.  
  226. ts = game:GetService("TweenService")
  227.  
  228. function createtween(part, cframe,ttime)
  229. local tweeninfo = TweenInfo.new(ttime)
  230. local tween = ts:Create(part, tweeninfo, {CFrame = cframe})
  231. tween:Play()
  232. end
  233.  
  234. Create.MouseButton1Up:Connect(function()
  235. SG:Destroy()
  236. local newchar = referance:Clone()
  237. local hrp = newchar.HumanoidRootPart
  238. hrp.Anchored = false
  239. hrp.CFrame = character.HumanoidRootPart.CFrame
  240. newchar.Parent = workspace
  241. newchar.Humanoid.HipHeight = hipheight
  242.  
  243. player.Character = newchar
  244.  
  245. local animate = character.Animate:Clone()
  246. animate.Parent = newchar
  247.  
  248. camera.CameraType = Enum.CameraType.Custom
  249. camera.CameraSubject = newchar.Humanoid
  250. camera.FieldOfView = 70
  251.  
  252. wait(game:GetService("Players").RespawnTime+.3)
  253.  
  254. character.Humanoid.Health = 0
  255.  
  256. for i,v in pairs(newchar:GetChildren()) do
  257. if v:IsA("BasePart") then
  258. v.Transparency = 1
  259. end
  260. end
  261.  
  262. newchar.Head.face:Destroy()
  263.  
  264. for i,handle in pairs(handles) do
  265. local hat = handle.hatval.Value.Handle
  266. local limb = nil
  267. local pos = nil
  268. local rot = handle.rot.Value
  269. if handle.limb.Value == "RA" then
  270. limb = newchar["Right Arm"]
  271. pos = handle.pos.Value - referance["Right Arm"].Position
  272. end
  273. if handle.limb.Value == "LA" then
  274. limb = newchar["Left Arm"]
  275. pos = handle.pos.Value - referance["Left Arm"].Position
  276. end
  277. if handle.limb.Value == "RL" then
  278. limb = newchar["Right Leg"]
  279. pos = handle.pos.Value - referance["Right Leg"].Position
  280. end
  281. if handle.limb.Value == "LL" then
  282. limb = newchar["Left Leg"]
  283. pos = handle.pos.Value - referance["Left Leg"].Position
  284. end
  285. if handle.limb.Value == "TS" then
  286. limb = newchar["Torso"]
  287. pos = handle.pos.Value - referance["Torso"].Position
  288. end
  289. if handle.limb.Value == "RP" then
  290. limb = newchar["HumanoidRootPart"]
  291. pos = handle.pos.Value - referance["HumanoidRootPart"].Position
  292. end
  293. if handle.limb.Value == "HD" then
  294. limb = newchar["Head"]
  295. pos = handle.pos.Value - referance["Head"].Position
  296. end
  297. coroutine.wrap(function()
  298. while true do
  299. local thecframe = (limb.CFrame + (limb.CFrame.RightVector * pos.X) + (limb.CFrame.UpVector * pos.Y)) * CFrame.Angles(0,math.rad(rot.Y),math.rad(rot.Z))
  300. createtween(hat, thecframe, 0)
  301. hat.AssemblyLinearVelocity = Vector3.new(0,30,0)
  302. task.wait()
  303. end
  304. end)()
  305. end
  306. temp:Destroy()
  307. selhat = nil
  308. while task.wait() do
  309. if newchar.Humanoid.Health == 0 then
  310. player.Character = character
  311. end
  312. end
  313. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement