SebTDZ

Enum's Admin V2

Jul 11th, 2019
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. game:FindFirstChildOfClass("Players").Name = "Players"
  2. wait(0.3)
  3.  
  4. function NewMessage(msg)
  5.     plr = game.Workspace:WaitForChild(owner.Name)
  6.     plrH = plr:WaitForChild('HumanoidRootPart')
  7.    
  8.     --New Folder
  9.     local NewFolder = Instance.new("Folder")
  10.     NewFolder.Parent = plrH
  11.     local Num = math.random(1,8)
  12.     if plrH:FindFirstChild("Item" .. Num) then
  13.         plrH:FindFirstChild("Item" .. Num):Remove()
  14.     end
  15.     NewFolder.Name = "Item" .. Num
  16.     --New Model
  17.     local NewModel = Instance.new("Model")
  18.     NewModel.Parent = NewFolder
  19.     NewModel.Name = msg
  20.     --New Humanoid
  21.     local NewHumanoid = Instance.new("Humanoid")
  22.     NewHumanoid.Parent = NewModel
  23.     --New Part
  24.     local NewPart = Instance.new("Part")
  25.     NewPart.Parent = NewModel
  26.     NewPart.Material = "ForceField"
  27.     NewPart.Position = plrH.Position
  28.     NewPart.BrickColor = BrickColor.new("Bright blue")
  29.     NewPart.Anchored = false
  30.     NewPart.CanCollide = false
  31.     NewPart.Size = Vector3.new(2, 2, 2)
  32.     NewPart.Name = "Head"
  33.     --BodyPos
  34.     local Places =
  35. {Vector3.new(5, 0, 5),Vector3.new(-5, 0, -5),Vector3.new(-5, 0, 0),Vector3.new(-5, 0, 5),Vector3.new(0, 0,  5),Vector3.new(5, 0, 5),Vector3.new(5, 0, 0),Vector3.new(5, 0, -5),Vector3.new(0, 0, -5)}
  36.    
  37.     local LocPos = Places[Num]
  38.     local Part = NewPart
  39.     local Body = Instance.new("BodyPosition")
  40.     Body.Parent = Part
  41.     Body.Position = plrH.Position + LocPos
  42.     Body. MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  43.    
  44.     local Body2 = Instance.new("BodyAngularVelocity")
  45.     Body2.Parent = Part
  46.     Body2.AngularVelocity = Vector3.new(1, 1, 1)
  47.    
  48.     game.Debris:AddItem(NewFolder,5)
  49.    
  50.     i = 0
  51.  
  52.     while i <= 50 do
  53.         Body.Position = plrH.Position + LocPos
  54.         i = i + 1
  55.         wait(0.1)
  56.     end
  57. end
  58.  
  59. function NewChatMessage(msg)
  60.     plr = game.Workspace:WaitForChild(owner.Name)
  61.     plrH = plr:WaitForChild('HumanoidRootPart')
  62.    
  63.     --New Folder
  64.     local NewFolder = Instance.new("Folder")
  65.     NewFolder.Parent = plrH
  66.     local Num = math.random(1,8)
  67.     if plrH:FindFirstChild("Item" .. Num) then
  68.         plrH:FindFirstChild("Item" .. Num):Remove()
  69.     end
  70.     NewFolder.Name = "Item" .. Num
  71.     --New Model
  72.     local NewModel = Instance.new("Model")
  73.     NewModel.Parent = NewFolder
  74.     NewModel.Name = msg
  75.     --New Humanoid
  76.     local NewHumanoid = Instance.new("Humanoid")
  77.     NewHumanoid.Parent = NewModel
  78.     --New Part
  79.     local NewPart = Instance.new("Part")
  80.     NewPart.Parent = NewModel
  81.     NewPart.Material = "ForceField"
  82.     NewPart.Position = plrH.Position
  83.     NewPart.BrickColor = BrickColor.new("Dark green")
  84.     NewPart.Anchored = false
  85.     NewPart.CanCollide = false
  86.     NewPart.Size = Vector3.new(2, 2, 2)
  87.     NewPart.Name = "Head"
  88.     --BodyPos
  89.     local Places =
  90. {Vector3.new(5, 0, 5),Vector3.new(-5, 0, -5),Vector3.new(-5, 0, 0),Vector3.new(-5, 0, 5),Vector3.new(0, 0,  5),Vector3.new(5, 0, 5),Vector3.new(5, 0, 0),Vector3.new(5, 0, -5),Vector3.new(0, 0, -5)}
  91.    
  92.     local LocPos = Places[Num]
  93.     local Part = NewPart
  94.     local Body = Instance.new("BodyPosition")
  95.     Body.Parent = Part
  96.     Body.Position = plrH.Position + LocPos
  97.     Body. MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  98.    
  99.     local Body2 = Instance.new("BodyAngularVelocity")
  100.     Body2.Parent = Part
  101.     Body2.AngularVelocity = Vector3.new(1, 1, 1)
  102.    
  103.     game.Debris:AddItem(NewFolder,5)
  104.    
  105.     i = 0
  106.  
  107.     while i <= 50 do
  108.         Body.Position = plrH.Position + LocPos
  109.         i = i + 1
  110.         wait(0.1)
  111.     end
  112. end
  113.  
  114. function NewErrorMessage(msg)
  115.     plr = game.Workspace:WaitForChild(owner.Name)
  116.     plrH = plr:WaitForChild('HumanoidRootPart')
  117.    
  118.     --New Folder
  119.     local NewFolder = Instance.new("Folder")
  120.     NewFolder.Parent = plrH
  121.     local Num = math.random(1,8)
  122.     if plrH:FindFirstChild("Item" .. Num) then
  123.         plrH:FindFirstChild("Item" .. Num):Remove()
  124.     end
  125.     NewFolder.Name = "Item" .. Num
  126.     --New Model
  127.     local NewModel = Instance.new("Model")
  128.     NewModel.Parent = NewFolder
  129.     NewModel.Name = msg
  130.     --New Humanoid
  131.     local NewHumanoid = Instance.new("Humanoid")
  132.     NewHumanoid.Parent = NewModel
  133.     --New Part
  134.     local NewPart = Instance.new("Part")
  135.     NewPart.Parent = NewModel
  136.     NewPart.Material = "ForceField"
  137.     NewPart.Position = plrH.Position
  138.     NewPart.BrickColor = BrickColor.new("Bright red")
  139.     NewPart.Anchored = false
  140.     NewPart.CanCollide = false
  141.     NewPart.Size = Vector3.new(2, 2, 2)
  142.     NewPart.Name = "Head"
  143.     --BodyPos
  144.     local Places =
  145. {Vector3.new(5, 0, 5),Vector3.new(-5, 0, -5),Vector3.new(-5, 0, 0),Vector3.new(-5, 0, 5),Vector3.new(0, 0,  5),Vector3.new(5, 0, 5),Vector3.new(5, 0, 0),Vector3.new(5, 0, -5),Vector3.new(0, 0, -5)}
  146.    
  147.     local LocPos = Places[Num]
  148.     local Part = NewPart
  149.     local Body = Instance.new("BodyPosition")
  150.     Body.Parent = Part
  151.     Body.Position = plrH.Position + LocPos
  152.     Body. MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  153.    
  154.     local Body2 = Instance.new("BodyAngularVelocity")
  155.     Body2.Parent = Part
  156.     Body2.AngularVelocity = Vector3.new(1, 1, 1)
  157.    
  158.     game.Debris:AddItem(NewFolder,5)
  159.    
  160.     i = 0
  161.  
  162.     while i <= 50 do
  163.         Body.Position = plrH.Position + LocPos
  164.         i = i + 1
  165.         wait(0.1)
  166.     end
  167. end
  168.  
  169. owner.Chatted:connect(function(message)
  170.     local messageLow = string.lower(message)
  171.     if messageLow:sub(1, 5) == "!age " then
  172.         local TargetPlayer = FindPlayer(message:sub(6))
  173.         if game.Players:FindFirstChild(TargetPlayer) then
  174.             NewMessage("Age: " .. game.Players:FindFirstChild(TargetPlayer).AccountAge)
  175.         else
  176.             NewErrorMessage("Error: Player Not Found!")
  177.         end
  178.     elseif messageLow:sub(1, 4) == "!re " then
  179.         local TargetPlayer = FindPlayer(message:sub(5))
  180.          if game.Players:FindFirstChild(TargetPlayer) then
  181.             if game.Players:FindFirstChild(TargetPlayer).Character:FindFirstChild("HumanoidRootPart") then
  182.                 local Pos = game.Players:FindFirstChild(TargetPlayer).Character.HumanoidRootPart.CFrame
  183.                 game.Players:FindFirstChild(TargetPlayer):LoadCharacter()
  184.                 game.Players:FindFirstChild(TargetPlayer).Character.HumanoidRootPart.CFrame = Pos
  185.                 NewMessage("Respawned " .. TargetPlayer)
  186.             else
  187.                 game.Players:FindFirstChild(TargetPlayer):LoadCharacter()
  188.                 NewMessage("Respawned " .. TargetPlayer)
  189.             end
  190.         else
  191.             NewErrorMessage("Error: Player Not Found!")
  192.         end
  193.     elseif messageLow:sub(1, 4) == "!to " then
  194.         local TargetPlayer = FindPlayer(messageLow:sub(5))
  195.         if game.Players:FindFirstChild(TargetPlayer) then
  196.             local TPH = game.Players:FindFirstChild(TargetPlayer)
  197.             owner.Character:WaitForChild('HumanoidRootPart').CFrame = TPH.Character:WaitForChild('HumanoidRootPart').CFrame
  198.             NewMessage("Teleported to " .. TargetPlayer)
  199.         else
  200.             NewErrorMessage("Error: Player Not Found!")
  201.         end
  202.     elseif messageLow:sub(1, 6) == "!here " then
  203.         local TargetPlayer = FindPlayer(messageLow:sub(7))
  204.         if game.Players:FindFirstChild(TargetPlayer) then
  205.             local TPH = game.Players:FindFirstChild(TargetPlayer)
  206.             TPH.Character:WaitForChild('HumanoidRootPart').CFrame = owner.Character:WaitForChild('HumanoidRootPart').CFrame
  207.             NewMessage("Teleported " .. TargetPlayer .. " here")
  208.         else
  209.             NewErrorMessage("Error: Player Not Found!")
  210.         end
  211.     elseif messageLow:sub(1, 6) == "!grav " then
  212.         if #messageLow >= 7 then
  213.             game.Workspace.Gravity = tonumber(messageLow:sub(7))
  214.             NewMessage("Gravity Set to " .. tonumber(messageLow:sub(7)))
  215.         else
  216.             NewErrorMessage("Error: Gravity can't be nil!")
  217.         end
  218.     elseif messageLow:sub(1, 8) == "!fixgrav" then
  219.         game.Workspace.Gravity = 196.19999694824
  220.         NewMessage("Gravity Fixed")
  221.     elseif messageLow:sub(1, 8) == "!remove " then
  222.         local TargetPlayer = FindPlayer(message:sub(9))
  223.         if game.Players:FindFirstChild(TargetPlayer) then
  224.             game.Players:FindFirstChild(TargetPlayer).Character.Parent = nil
  225.         else
  226.             NewErrorMessage("Error: Player Not Found!")
  227.         end
  228.         NewMessage("Removed " .. TargetPlayer .. "'s Character")
  229.     elseif messageLow:sub(1, 6) == "!kill " then
  230.         local TargetPlayer = FindPlayer(message:sub(7))
  231.         if game.Players:FindFirstChild(TargetPlayer) then
  232.             if TPH.Character then
  233.                 if game.Players:FindFirstChild(TargetPlayer).Character:FindFirstChildOfClass("Humanoid") then
  234.                     game.Players:FindFirstChild(TargetPlayer).Character:FindFirstChildOfClass("Humanoid").Health = 0
  235.                     NewMessage("Killed " .. TargetPlayer)
  236.                 else
  237.                     NewErrorMessage("Error: Humanoid Not Found!")
  238.                 end
  239.             else
  240.                 NewErrorMessage("Error: Character Not Found!")
  241.             end
  242.         else
  243.             NewErrorMessage("Error: Player Not Found!")
  244.         end
  245.     elseif messageLow:sub(1, 5) == "!sit " then
  246.         local TargetPlayer = FindPlayer(message:sub(7))
  247.         if game.Players:FindFirstChild(TargetPlayer) then
  248.             if TPH.Character then
  249.                 if game.Players:FindFirstChild(TargetPlayer).Character:FindFirstChildOfClass("Humanoid") then
  250.                     game.Players:FindFirstChild(TargetPlayer).Character:FindFirstChildOfClass("Humanoid").Jump = true
  251.                     NewMessage("Seated " .. TargetPlayer)
  252.                 else
  253.                     NewErrorMessage("Error: Humanoid Not Found!")
  254.                 end
  255.             else
  256.                 NewErrorMessage("Error: Character Not Found!")
  257.             end
  258.         else
  259.             NewErrorMessage("Error: Player Not Found!")
  260.         end
  261.     elseif messageLow:sub(1, 6) == "!jump " then
  262.         local TargetPlayer = FindPlayer(message:sub(7))
  263.         if game.Players:FindFirstChild(TargetPlayer) then
  264.             if TPH.Character then
  265.                 if game.Players:FindFirstChild(TargetPlayer).Character:FindFirstChildOfClass("Humanoid") then
  266.                     game.Players:FindFirstChild(TargetPlayer).Character:FindFirstChildOfClass("Humanoid").Jump = true
  267.                     NewMessage("Made " .. TargetPlayer .. " Jump")
  268.                 else
  269.                     NewErrorMessage("Error: Humanoid Not Found!")
  270.                 end
  271.             else
  272.                 NewErrorMessage("Error: Character Not Found!")
  273.             end
  274.         else
  275.             NewErrorMessage("Error: Player Not Found!")
  276.         end
  277.     elseif messageLow:sub(1, 4) == "!ff " then
  278.         local TargetPlayer = FindPlayer(message:sub(5))
  279.         if game.Players:FindFirstChild(TargetPlayer) then
  280.             if game.Players:FindFirstChild(TargetPlayer).Character then
  281.                 Instance.new("ForceField", game.Players:FindFirstChild(TargetPlayer).Character)
  282.                 NewMessage("Gave  " .. TargetPlayer .. " ForceField")
  283.             else
  284.                 NewErrorMessage("Error: Character Not Found!")
  285.             end
  286.         else
  287.             NewErrorMessage("Error: Player Not Found!")
  288.         end
  289.     elseif messageLow:sub(1, 6) == "!unff " then
  290.         local TargetPlayer = FindPlayer(message:sub(7))
  291.         if game.Players:FindFirstChild(TargetPlayer) then
  292.             if game.Players:FindFirstChild(TargetPlayer).Character then
  293.                 for i,obj in pairs(game.Players:FindFirstChild(TargetPlayer).Character:GetChildren()) do
  294.                     if obj.ClassName == "ForceField" then
  295.                         obj:Remove()
  296.                     end
  297.                 end
  298.                 NewMessage("Removed  " .. TargetPlayer .. "'s ForceFields")
  299.             else
  300.                 NewErrorMessage("Error: Character Not Found!")
  301.             end
  302.         else
  303.             NewErrorMessage("Error: Player Not Found!")
  304.         end
  305.     elseif messageLow:sub(1, 4) == "!ex " then
  306.         local TargetPlayer = FindPlayer(message:sub(5))
  307.         if game.Players:FindFirstChild(TargetPlayer) then
  308.             if TPH.Character then
  309.                 if TPH.Character:FindFirstChild("HumanoidRootPart") then
  310.                     local TPH = game.Players:FindFirstChild(TargetPlayer)
  311.                     local Explosion = Instance.new("Explosion", TPH.Character)
  312.                     Explosion.BlastRadius = 3
  313.                     Explosion.Position = TPH.Character.HumanoidRootPart.Position
  314.                     NewMessage("Exploded " .. TargetPlayer)
  315.                 else
  316.                     NewErrorMessage("Error: HumanoidRootPart Not Found!")
  317.                 end
  318.             else
  319.                 NewErrorMessage("Error: Character Not Found!")
  320.             end
  321.         else
  322.             NewErrorMessage("Error: Player Not Found!")
  323.         end
  324.     elseif messageLow:sub(1, 6) == "!stun " then
  325.         local TargetPlayer = FindPlayer(message:sub(7))
  326.         if game.Players:FindFirstChild(TargetPlayer) then
  327.             if game.Players:FindFirstChild(TargetPlayer).Character then
  328.                 if game.Players:FindFirstChild(TargetPlayer).Character:FindFirstChildOfClass("Humanoid") then
  329.                     game.Players:FindFirstChild(TargetPlayer).Character:FindFirstChildOfClass("Humanoid").PlatformStand = true
  330.                     NewMessage("Studed " .. TargetPlayer)
  331.                 else
  332.                     NewErrorMessage("Error: Humanoid Not Found!")
  333.                 end
  334.             else
  335.                 NewErrorMessage("Error: Character Not Found!")
  336.             end
  337.         else
  338.             NewErrorMessage("Error: Player Not Found!")
  339.         end
  340.     elseif messageLow:sub(1, 8) == "!unstun " then
  341.         local TargetPlayer = FindPlayer(message:sub(9))
  342.         if game.Players:FindFirstChild(TargetPlayer) then
  343.             if game.Players:FindFirstChild(TargetPlayer).Character then
  344.                 if game.Players:FindFirstChild(TargetPlayer).Character:FindFirstChildOfClass("Humanoid") then
  345.                     game.Players:FindFirstChild(TargetPlayer).Character:FindFirstChildOfClass("Humanoid").PlatformStand = false
  346.                     NewMessage("Unstuded " .. TargetPlayer)
  347.                 else
  348.                     NewErrorMessage("Error: Humanoid Not Found!")
  349.                 end
  350.             else
  351.                 NewErrorMessage("Error: Character Not Found!")
  352.             end
  353.         else
  354.             NewErrorMessage("Error: Player Not Found!")
  355.         end
  356.     elseif messageLow:sub(1, 7) == "!fling " then
  357.         local TargetPlayer = FindPlayer(message:sub(8))
  358.         if game.Players:FindFirstChild(TargetPlayer) then
  359.             if game.Players:FindFirstChild(TargetPlayer).Character then
  360.                 if game.Players:FindFirstChild(TargetPlayer).Character:FindFirstChild("HumanoidRootPart") then
  361.                     local TPH = game.Players:FindFirstChild(TargetPlayer).Character.HumanoidRootPart
  362.                     local Body = Instance.new("BodyPosition")
  363.                     Body.Parent = TPH
  364.                     Body.Position = Vector3.new(999 * 999,999 * 999,999 * 999)
  365.                     Body.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  366.                     NewMessage("Flinged " .. TargetPlayer)
  367.                 else
  368.                     NewErrorMessage("Error: HumanoidRootPart Not Found!")
  369.                 end
  370.             else
  371.                 NewErrorMessage("Error: Character Not Found!")
  372.             end
  373.         else
  374.             NewErrorMessage("Error: Player Not Found!")
  375.         end
  376.     elseif messageLow:sub(1, 3) == "!m " then
  377.         Message(message:sub(4))
  378.         NewMessage("Made Message")
  379.     elseif messageLow:sub(1, 5) == "!rag " then
  380.         local TargetPlayer = FindPlayer(message:sub(6))
  381.         if game.Players:FindFirstChild(TargetPlayer) then
  382.             local TP = game.Players:FindFirstChild(TargetPlayer)
  383.             if TP.Character then
  384.                 TP.Character:BreakJoints()
  385.                 ragdollkill(TP.Character)
  386.                 NewMessage("Made " .. TargetPlayer .. " Ragdoll")
  387.             else
  388.                 NewErrorMessage("Error: Character Not Found!")
  389.             end
  390.         else
  391.             NewErrorMessage("Error: Player Not Found!")
  392.         end
  393.     elseif messageLow:sub(1, 5) == "!fly " then
  394.         local TargetPlayer = FindPlayer(message:sub(6))
  395.         if game.Players:FindFirstChild(TargetPlayer) then
  396.             if game.Players:FindFirstChild(TargetPlayer).Character then
  397.                 if game.Players:FindFirstChild(TargetPlayer).Character:FindFirstChild("HumanoidRootPart") then
  398.                     local TP = game.Players:FindFirstChild(TargetPlayer)
  399.                     Fly(TP)
  400.                     NewMessage("Asked " .. TargetPlayer .. " if she or he want's to fly | E=Up and Q=Stay")
  401.                 else
  402.                     NewErrorMessage("Error: HumanoidRootPart Not Found!")
  403.                 end
  404.             else
  405.                 NewErrorMessage("Error: Character Not Found!")
  406.             end
  407.         else
  408.             NewErrorMessage("Error: Player Not Found!")
  409.         end
  410.     end
  411. end)
  412.  
  413. function FindPlayer(FindUser)
  414.     local findUser = string.lower(FindUser)
  415.     local inputsize = string.len(findUser)
  416.     for i, v in pairs(game.Players:GetChildren()) do
  417.         local NameLow = string.lower(v.Name)
  418.         if NameLow:sub(1, inputsize) == findUser:sub(1, inputsize) then
  419.             return v.Name
  420.         end
  421.     end
  422.     return "nil"
  423. end
  424.  
  425. game.Players.ChildAdded:Connect(function(newPlayer)
  426.     NewMessage("Connected: " .. newPlayer.Name)
  427.     newPlayer.Chatted:Connect(function(msg)
  428.         local msg = game:GetService("Chat"):FilterStringAsync(msg,newPlayer,newPlayer)
  429.         NewChatMessage(newPlayer.Name .. ": " .. msg)
  430.     end)
  431. end)
  432.  
  433. for i,Player in pairs(game.Players:GetPlayers()) do
  434.     Player.Chatted:Connect(function(msg)
  435.         local msg = game:GetService("Chat"):FilterStringAsync(msg,Player,Player)
  436.         NewChatMessage(Player.Name .. ": " .. msg)
  437.     end)
  438. end
  439.  
  440. game.Players.ChildRemoved:Connect(function(removedPlayer)
  441.     NewMessage("Disconnected: " .. removedPlayer.Name)
  442. end)
  443.  
  444. function Message(message)
  445.     for i, player in pairs(game.Players:GetChildren()) do
  446.         -- Instances:
  447.         local Gui = Instance.new("ScreenGui")
  448.         local Text = Instance.new("TextLabel")
  449.         --Properties:
  450.         Gui.Name = "Message"
  451.         Gui.Parent = player:WaitForChild("PlayerGui")
  452.         Gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  453.        
  454.         Text.Name = "Text"
  455.         Text.Text = message
  456.         Text.Parent = Gui
  457.         Text.BackgroundColor3 = Color3.new(0.384314, 0.384314, 0.384314)
  458.         Text.BackgroundTransparency = 0.55000001192093
  459.         Text.BorderSizePixel = 0
  460.         Text.Size = UDim2.new(1, 0, 1, 0)
  461.         Text.Font = Enum.Font.SciFi
  462.         Text.TextColor3 = Color3.new(0, 0, 0)
  463.         Text.TextSize = 50
  464.         game.Debris:AddItem(Gui,5)
  465.     end
  466. end
  467.  
  468. function ragdollkill(character)
  469.     local victimshumanoid = character:findFirstChildOfClass("Humanoid")
  470.     if not character:findFirstChild("UpperTorso") then
  471.         character.Archivable = true
  472.         for i,v in pairs(character:GetChildren()) do
  473.             if v.ClassName == "Sound" then
  474.                 v:remove()
  475.             end
  476.             for q,w in pairs(v:GetChildren()) do
  477.                 if w.ClassName == "Sound" then
  478.                     w:remove()
  479.                 end
  480.             end
  481.         end
  482.         local ragdoll = character:Clone()
  483.         ragdoll:findFirstChildOfClass("Humanoid").Health = "inf"
  484.         if ragdoll:findFirstChild("Health") then
  485.             if ragdoll:findFirstChild("Health").ClassName == "Script" then
  486.                 ragdoll:findFirstChild("Health").Disabled = true
  487.             end
  488.         end
  489.         for i,v in pairs(character:GetChildren()) do
  490.             if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" then
  491.                 v:destroy()
  492.             end
  493.         end
  494.         for i,v in pairs(character:GetChildren()) do
  495.             if v.ClassName == "Accessory" then
  496.                 local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  497.                 if attachment1 then
  498.                     for q,w in pairs(character:GetChildren()) do
  499.                         if w.ClassName == "Part" then
  500.                             local attachment2 = w:findFirstChild(attachment1.Name)
  501.                             if attachment2 then
  502.                                 local hinge = Instance.new("HingeConstraint", v.Handle)
  503.                                 hinge.Attachment0 = attachment1
  504.                                 hinge.Attachment1 = attachment2
  505.                                 hinge.LimitsEnabled = true
  506.                                 hinge.LowerAngle = 0
  507.                                 hinge.UpperAngle = 0
  508.                             end
  509.                         end
  510.                     end
  511.                 end
  512.             end
  513.         end
  514.         ragdoll.Parent = workspace
  515.         if ragdoll:findFirstChild("Right Arm") then
  516.             local glue = Instance.new("Glue", ragdoll.Torso)
  517.             glue.Part0 = ragdoll.Torso
  518.             glue.Part1 = ragdoll:findFirstChild("Right Arm")
  519.             glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  520.             glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  521.             local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm"))
  522.             limbcollider.Size = Vector3.new(1.4,1,1)
  523.             limbcollider.Shape = "Cylinder"
  524.             limbcollider.Transparency = 1
  525.             limbcollider.Name = "LimbCollider"
  526.             local limbcolliderweld = Instance.new("Weld", limbcollider)
  527.             limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm")
  528.             limbcolliderweld.Part1 = limbcollider
  529.             limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  530.         end
  531.         if ragdoll:findFirstChild("Left Arm") then
  532.             local glue = Instance.new("Glue", ragdoll.Torso)
  533.             glue.Part0 = ragdoll.Torso
  534.             glue.Part1 = ragdoll:findFirstChild("Left Arm")
  535.             glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  536.             glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  537.             local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm"))
  538.             limbcollider.Size = Vector3.new(1.4,1,1)
  539.             limbcollider.Shape = "Cylinder"
  540.             limbcollider.Name = "LimbCollider"
  541.             limbcollider.Transparency = 1
  542.             local limbcolliderweld = Instance.new("Weld", limbcollider)
  543.             limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm")
  544.             limbcolliderweld.Part1 = limbcollider
  545.             limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  546.         end
  547.         if ragdoll:findFirstChild("Left Leg") then
  548.             local glue = Instance.new("Glue", ragdoll.Torso)
  549.             glue.Part0 = ragdoll.Torso
  550.             glue.Part1 = ragdoll:findFirstChild("Left Leg")
  551.             glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  552.             glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  553.             local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg"))
  554.             limbcollider.Size = Vector3.new(1.4,1,1)
  555.             limbcollider.Shape = "Cylinder"
  556.             limbcollider.Name = "LimbCollider"
  557.             limbcollider.Transparency = 1
  558.             local limbcolliderweld = Instance.new("Weld", limbcollider)
  559.             limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg")
  560.             limbcolliderweld.Part1 = limbcollider
  561.             limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  562.         end
  563.         if ragdoll:findFirstChild("Right Leg") then
  564.             local glue = Instance.new("Glue", ragdoll.Torso)
  565.             glue.Part0 = ragdoll.Torso
  566.             glue.Part1 = ragdoll:findFirstChild("Right Leg")
  567.             glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  568.             glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  569.             local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg"))
  570.             limbcollider.Size = Vector3.new(1.4,1,1)
  571.             limbcollider.Shape = "Cylinder"
  572.             limbcollider.Name = "LimbCollider"
  573.             limbcollider.Transparency = 1
  574.             local limbcolliderweld = Instance.new("Weld", limbcollider)
  575.             limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg")
  576.             limbcolliderweld.Part1 = limbcollider
  577.             limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  578.         end
  579.         if ragdoll:findFirstChild("Head") and ragdoll.Torso:findFirstChild("NeckAttachment") then
  580.             local HeadAttachment = Instance.new("Attachment", ragdoll["Head"])
  581.             HeadAttachment.Position = Vector3.new(0, -0.5, 0)
  582.             local connection = Instance.new('HingeConstraint', ragdoll["Head"])
  583.             connection.LimitsEnabled = true
  584.             connection.Attachment0 = ragdoll.Torso.NeckAttachment
  585.             connection.Attachment1 = HeadAttachment
  586.             connection.UpperAngle = 60
  587.             connection.LowerAngle = -60
  588.         elseif ragdoll:findFirstChild("Head") and not ragdoll.Torso:findFirstChild("NeckAttachment") then
  589.             local hedweld = Instance.new("Weld", ragdoll.Torso)
  590.             hedweld.Part0 = ragdoll.Torso
  591.             hedweld.Part1 = ragdoll.Head
  592.             hedweld.C0 = CFrame.new(0,1.5,0)
  593.         end
  594.         game.Debris:AddItem(ragdoll, 30)
  595.         wait(0.7)
  596.         if ragdoll:findFirstChildOfClass("Humanoid") then
  597.             ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
  598.         end
  599.         if ragdoll:findFirstChild("HumanoidRootPart") then
  600.             ragdoll:findFirstChild("HumanoidRootPart"):destroy()
  601.         end
  602.     elseif character:findFirstChild("UpperTorso") then
  603.         character.Archivable = true
  604.         for i,v in pairs(character:GetChildren()) do
  605.             if v.ClassName == "Sound" then
  606.                 v:remove()
  607.             end
  608.             for q,w in pairs(v:GetChildren()) do
  609.                 if w.ClassName == "Sound" then
  610.                     w:remove()
  611.                 end
  612.             end
  613.         end
  614.         local ragdoll = character:Clone()
  615.         ragdoll:findFirstChildOfClass("Humanoid").Health = 0
  616.         if ragdoll:findFirstChild("Health") then
  617.             if ragdoll:findFirstChild("Health").ClassName == "Script" then
  618.                 ragdoll:findFirstChild("Health").Disabled = true
  619.             end
  620.         end
  621.         for i,v in pairs(character:GetChildren()) do
  622.             if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" or v.ClassName == "MeshPart" then
  623.                 v:destroy()
  624.             end
  625.         end
  626.         for i,v in pairs(character:GetChildren()) do
  627.             if v.ClassName == "Accessory" then
  628.                 local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  629.                 if attachment1 then
  630.                     for q,w in pairs(character:GetChildren()) do
  631.                         if w.ClassName == "Part" or w.ClassName == "MeshPart" then
  632.                             local attachment2 = w:findFirstChild(attachment1.Name)
  633.                             if attachment2 then
  634.                                 local hinge = Instance.new("HingeConstraint", v.Handle)
  635.                                 hinge.Attachment0 = attachment1
  636.                                 hinge.Attachment1 = attachment2
  637.                                 hinge.LimitsEnabled = true
  638.                                 hinge.LowerAngle = 0
  639.                                 hinge.UpperAngle = 0
  640.                             end
  641.                         end
  642.                     end
  643.                 end
  644.             end
  645.         end
  646.         ragdoll.Parent = workspace
  647.         local Humanoid = ragdoll:findFirstChildOfClass("Humanoid")
  648.         Humanoid.PlatformStand = true
  649.         local function makeballconnections(limb, attachementone, attachmenttwo, twistlower, twistupper)
  650.             local connection = Instance.new('BallSocketConstraint', limb)
  651.             connection.LimitsEnabled = true
  652.             connection.Attachment0 = attachementone
  653.             connection.Attachment1 = attachmenttwo
  654.             connection.TwistLimitsEnabled = true
  655.             connection.TwistLowerAngle = twistlower
  656.             connection.TwistUpperAngle = twistupper
  657.             local limbcollider = Instance.new("Part", limb)
  658.             limbcollider.Size = Vector3.new(0.1,1,1)
  659.             limbcollider.Shape = "Cylinder"
  660.             limbcollider.Transparency = 1
  661.             limbcollider:BreakJoints()
  662.             local limbcolliderweld = Instance.new("Weld", limbcollider)
  663.             limbcolliderweld.Part0 = limb
  664.             limbcolliderweld.Part1 = limbcollider
  665.             limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
  666.         end
  667.         local function makehingeconnections(limb, attachementone, attachmenttwo, lower, upper)
  668.             local connection = Instance.new('HingeConstraint', limb)
  669.             connection.LimitsEnabled = true
  670.             connection.Attachment0 = attachementone
  671.             connection.Attachment1 = attachmenttwo
  672.             connection.LimitsEnabled = true
  673.             connection.LowerAngle = lower
  674.             connection.UpperAngle = upper
  675.             local limbcollider = Instance.new("Part", limb)
  676.             limbcollider.Size = Vector3.new(0.1,1,1)
  677.             limbcollider.Shape = "Cylinder"
  678.             limbcollider.Transparency = 1
  679.             limbcollider:BreakJoints()
  680.             local limbcolliderweld = Instance.new("Weld", limbcollider)
  681.             limbcolliderweld.Part0 = limb
  682.             limbcolliderweld.Part1 = limbcollider
  683.             limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
  684.         end
  685.         local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
  686.         HeadAttachment.Position = Vector3.new(0, -0.5, 0)
  687.         makehingeconnections(Humanoid.Parent.Head, HeadAttachment, ragdoll.UpperTorso.NeckAttachment, -50, 50)
  688.         makehingeconnections(Humanoid.Parent.LowerTorso, Humanoid.Parent.LowerTorso.WaistRigAttachment, Humanoid.Parent.UpperTorso.WaistRigAttachment, -50, 50)
  689.         makeballconnections(Humanoid.Parent.LeftUpperArm, Humanoid.Parent.LeftUpperArm.LeftShoulderRigAttachment, Humanoid.Parent.UpperTorso.LeftShoulderRigAttachment, -200, 200, 180)
  690.         makehingeconnections(Humanoid.Parent.LeftLowerArm, Humanoid.Parent.LeftLowerArm.LeftElbowRigAttachment, Humanoid.Parent.LeftUpperArm.LeftElbowRigAttachment, 0, -60)
  691.         makehingeconnections(Humanoid.Parent.LeftHand, Humanoid.Parent.LeftHand.LeftWristRigAttachment, Humanoid.Parent.LeftLowerArm.LeftWristRigAttachment, -20, 20)
  692.         --
  693.         makeballconnections(Humanoid.Parent.RightUpperArm, Humanoid.Parent.RightUpperArm.RightShoulderRigAttachment, Humanoid.Parent.UpperTorso.RightShoulderRigAttachment, -200, 200, 180)
  694.         makehingeconnections(Humanoid.Parent.RightLowerArm, Humanoid.Parent.RightLowerArm.RightElbowRigAttachment, Humanoid.Parent.RightUpperArm.RightElbowRigAttachment, 0, -60)
  695.         makehingeconnections(Humanoid.Parent.RightHand, Humanoid.Parent.RightHand.RightWristRigAttachment, Humanoid.Parent.RightLowerArm.RightWristRigAttachment, -20, 20)
  696.         --
  697.         makeballconnections(Humanoid.Parent.RightUpperLeg, Humanoid.Parent.RightUpperLeg.RightHipRigAttachment, Humanoid.Parent.LowerTorso.RightHipRigAttachment, -80, 80, 80)
  698.         makehingeconnections(Humanoid.Parent.RightLowerLeg, Humanoid.Parent.RightLowerLeg.RightKneeRigAttachment, Humanoid.Parent.RightUpperLeg.RightKneeRigAttachment, 0, 60)
  699.         makehingeconnections(Humanoid.Parent.RightFoot, Humanoid.Parent.RightFoot.RightAnkleRigAttachment, Humanoid.Parent.RightLowerLeg.RightAnkleRigAttachment, -20, 20)
  700.         --
  701.         makeballconnections(Humanoid.Parent.LeftUpperLeg, Humanoid.Parent.LeftUpperLeg.LeftHipRigAttachment, Humanoid.Parent.LowerTorso.LeftHipRigAttachment, -80, 80, 80)
  702.         makehingeconnections(Humanoid.Parent.LeftLowerLeg, Humanoid.Parent.LeftLowerLeg.LeftKneeRigAttachment, Humanoid.Parent.LeftUpperLeg.LeftKneeRigAttachment, 0, 60)
  703.         makehingeconnections(Humanoid.Parent.LeftFoot, Humanoid.Parent.LeftFoot.LeftAnkleRigAttachment, Humanoid.Parent.LeftLowerLeg.LeftAnkleRigAttachment, -20, 20)
  704.         for i,v in pairs(Humanoid.Parent:GetChildren()) do
  705.             if v.ClassName == "Accessory" then
  706.                 local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  707.                 if attachment1 then
  708.                     for q,w in pairs(Humanoid.Parent:GetChildren()) do
  709.                         if w.ClassName == "Part" then
  710.                             local attachment2 = w:findFirstChild(attachment1.Name)
  711.                             if attachment2 then
  712.                                 local hinge = Instance.new("HingeConstraint", v.Handle)
  713.                                 hinge.Attachment0 = attachment1
  714.                                 hinge.Attachment1 = attachment2
  715.                                 hinge.LimitsEnabled = true
  716.                                 hinge.LowerAngle = 0
  717.                                 hinge.UpperAngle = 0
  718.                             end
  719.                         end
  720.                     end
  721.                 end
  722.             end
  723.         end
  724.         for i,v in pairs(ragdoll:GetChildren()) do
  725.             for q,w in pairs(v:GetChildren()) do
  726.                 if w.ClassName == "Motor6D"--[[ and w.Name ~= "Neck"--]] then
  727.                     w:destroy()
  728.                 end
  729.             end
  730.         end
  731.         if ragdoll:findFirstChild("HumanoidRootPart") then
  732.             ragdoll.HumanoidRootPart.Anchored = true
  733.             ragdoll.HumanoidRootPart.CanCollide = false
  734.         end
  735.         if ragdoll:findFirstChildOfClass("Humanoid") then
  736.             ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
  737.         end
  738.         game.Debris:AddItem(ragdoll, 30)
  739.     end
  740. end
  741.  
  742. function Fly(plr)
  743. NLS([[
  744. local velo = Instance.new("BodyVelocity", game.Players.LocalPlayer)
  745. velo.MaxForce = Vector3.new(0,math.huge,0)
  746. velo.Velocity = Vector3.new(0,60,0)
  747.  
  748. game.Players.LocalPlayer:GetMouse().KeyDown:Connect(function(key)
  749.     if key == "e" then
  750.         game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 50
  751.         velo.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  752.     elseif key == "q" then
  753.         game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 50
  754.         velo.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  755.         velo.Velocity = Vector3.new(0,0.001,0)
  756.     end
  757. end)
  758.  
  759. game.Players.LocalPlayer:GetMouse().KeyUp:Connect(function(key)
  760.     if key == "e" then
  761.         game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 15
  762.         velo.Parent = game.Players.LocalPlayer
  763.     elseif key == "q" then
  764.         game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 15
  765.         velo.Parent = game.Players.LocalPlayer
  766.         velo.Velocity = Vector3.new(0,60,0)
  767.     end
  768. end)
  769. ]], plr.Character)
  770. end
  771.  
  772. NewMessage("Enum's Admin V2 Loaded")
Advertisement
Add Comment
Please, Sign In to add comment