SHOW:
|
|
- or go back to the newest paste.
| 1 | - | local Morph = script.Parent.Parent["Chest"] |
| 1 | + | local Morph = script.Parent.Parent["Powering_GIRLS1"] |
| 2 | ||
| 3 | function GiveMorph(plr) | |
| 4 | coroutine.resume(coroutine.create(function() | |
| 5 | if plr.Character:FindFirstChild(Morph.Name) == nil then | |
| 6 | local CheckScript = script["CheckScript"]:clone() | |
| 7 | CheckScript.Parent = plr.PlayerGui | |
| 8 | wait(0.1) | |
| 9 | local Cloned = Morph:clone() | |
| 10 | Cloned.Parent = plr.Character | |
| 11 | for i, v in pairs(Cloned:GetChildren()) do | |
| 12 | coroutine.resume(coroutine.create(function() | |
| 13 | if v:IsA("BasePart") then
| |
| 14 | if v.Name ~= "Middle" then | |
| 15 | local w = Instance.new("Weld")
| |
| 16 | w.Part0 = Cloned["Middle"] | |
| 17 | w.Part1 = v | |
| 18 | w.C0 = w.Part0.CFrame:inverse() * CFrame.new(w.Part1.Position) | |
| 19 | w.C1 = w.Part1.CFrame:inverse() * CFrame.new(w.Part1.Position) | |
| 20 | w.Parent = w.Part0 | |
| 21 | else | |
| 22 | coroutine.resume(coroutine.create(function() | |
| 23 | wait(0.1) | |
| 24 | local w = Instance.new("Weld", plr.Character["Torso"])
| |
| 25 | w.Part0 = plr.Character["Torso"] | |
| 26 | w.Part1 = v | |
| 27 | w.C0 = CFrame.new(0, 0, 0) | |
| 28 | end)) | |
| 29 | end | |
| 30 | end | |
| 31 | end)) | |
| 32 | end | |
| 33 | for i, v in pairs(Cloned:GetChildren()) do | |
| 34 | coroutine.resume(coroutine.create(function() | |
| 35 | if v:IsA("BasePart") then
| |
| 36 | v.Anchored = false | |
| 37 | v.CanCollide = false | |
| 38 | end | |
| 39 | end)) | |
| 40 | end | |
| 41 | if plr.Character:findFirstChild("Shirt") ~= nil then
| |
| 42 | plr.Character["Shirt"]:remove() | |
| 43 | end | |
| 44 | if script.Parent:findFirstChild("Shirt") ~= nil then
| |
| 45 | script.Parent["Shirt"]:clone().Parent = plr.Character | |
| 46 | end | |
| 47 | if plr.Character:findFirstChild("Pants") ~= nil then
| |
| 48 | plr.Character["Pants"]:remove() | |
| 49 | end | |
| 50 | if script.Parent:findFirstChild("Pants") ~= nil then
| |
| 51 | script.Parent["Pants"]:clone().Parent = plr.Character | |
| 52 | end | |
| 53 | for i, v in pairs(plr.Character:GetChildren()) do | |
| 54 | coroutine.resume(coroutine.create(function() | |
| 55 | if v:IsA("CharacterMesh") then
| |
| 56 | v:remove() | |
| 57 | end | |
| 58 | if v:IsA("Hat") then
| |
| 59 | v:remove() | |
| 60 | end | |
| 61 | end)) | |
| 62 | end | |
| 63 | end | |
| 64 | end)) | |
| 65 | end | |
| 66 | ||
| 67 | function Touch(hit) | |
| 68 | coroutine.resume(coroutine.create(function() | |
| 69 | if hit.Parent:findFirstChild("Humanoid") ~= nil then
| |
| 70 | local plr = game.Players:GetPlayerFromCharacter(hit.Parent) | |
| 71 | if plr ~= nil then | |
| 72 | GiveMorph(plr) | |
| 73 | end | |
| 74 | end | |
| 75 | end)) | |
| 76 | end | |
| 77 | ||
| 78 | script.Parent.Touched:connect(Touch) |