Advertisement
rrixh

FE AVA KREATOR

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