|
can someone change this to a player onentered script?
function onTouched(hit)
local h = hit.Parent:findFirstChild("Humanoid")
local check = hit.Parent:findFirstChild("HasSuit")
if (h~=nil) and (check==nil) then
checker = Instance.new("IntValue")
checker.Name = "HasSuit"
checker.Parent = hit.Parent
h = hit.Parent.Humanoid
h.MaxHealth = 400
wait()
h.Health = 400
local clone_a = Bin.Torso1:clone()
local clone_b = Bin.Torso2:clone()
local clone_c = Bin.Torso3:clone()
local clone_LArmA = Bin.LeftArm1:clone()
local clone_RArmA = Bin.RightArm1:clone()
local clone_LArmB = Bin.LeftArm2:clone()
local clone_RArmB = Bin.RightArm2:clone()
local clone_LArmC = Bin.LeftArm3:clone()
local clone_RArmC = Bin.RightArm3:clone()
local clone_LArmD = Bin.LeftArm4:clone()
local clone_RArmD = Bin.RightArm4:clone()
local clone_LLegA = Bin.LeftLeg1:clone()
local clone_RLegA = Bin.RightLeg1:clone()
local clone_LLegB = Bin.LeftLeg2:clone()
local clone_RLegB = Bin.RightLeg2:clone()
local clone_LLegC = Bin.LeftLeg3:clone()
local clone_RLegC = Bin.RightLeg3:clone()
local clone_LLegD = Bin.LeftLeg4:clone()
local clone_RLegD = Bin.RightLeg4:clone()
local clone_LShoulderA = Bin.LeftShoulder1:clone()
local clone_RShoulderA = Bin.RightShoulder1:clone()
local clone_Neck = Bin.Neck:clone()
local clone_Face = Bin.Face:clone()
local clone_Back1 = Bin.Back1:clone()
local clone_Back2 = Bin.Back2:clone()
local clone_HeadA = Bin.HeadA:clone()
local clone_HeadB = Bin.HeadB:clone()
local clone_HeadC = Bin.HeadC:clone()
local clone_HeadD = Bin.HeadD:clone()
local clone_RightKnee = Bin.RightKnee:clone()
local clone_LeftKnee = Bin.LeftKnee:clone()
local clone_LeftTorso = Bin.LeftTorso:clone()
local clone_RightTorso = Bin.RightTorso:clone()
local clone_LeftHand = Bin.LeftHand:clone()
local clone_RightHand = Bin.RightHand:clone()
local clone_LeftFoot = Bin.LeftFoot:clone()
local clone_RightFoot = Bin.RightFoot:clone()
clone_a.Parent = hit.Parent
clone_b.Parent = hit.Parent
clone_c.Parent = hit.Parent
clone_LArmA.Parent = hit.Parent
clone_RArmA.Parent = hit.Parent
clone_LArmB.Parent = hit.Parent
clone_RArmB.Parent = hit.Parent
clone_LArmC.Parent = hit.Parent
clone_RArmC.Parent = hit.Parent
clone_LArmD.Parent = hit.Parent
clone_RArmD.Parent = hit.Parent
clone_LLegA.Parent = hit.Parent
clone_RLegA.Parent = hit.Parent
clone_LLegB.Parent = hit.Parent
clone_RLegB.Parent = hit.Parent
clone_LLegC.Parent = hit.Parent
clone_RLegC.Parent = hit.Parent
clone_LLegD.Parent = hit.Parent
clone_RLegD.Parent = hit.Parent
clone_LShoulderA.Parent = hit.Parent
clone_RShoulderA.Parent = hit.Parent
clone_Neck.Parent = hit.Parent
clone_Face.Parent = hit.Parent
clone_Back1.Parent = hit.Parent
clone_Back2.Parent = hit.Parent
clone_HeadA.Parent = hit.Parent
clone_HeadB.Parent = hit.Parent
clone_HeadC.Parent = hit.Parent
clone_HeadD.Parent = hit.Parent
clone_RightKnee.Parent = hit.Parent
clone_LeftKnee.Parent = hit.Parent
clone_LeftTorso.Parent = hit.Parent
clone_RightTorso.Parent = hit.Parent
clone_LeftHand.Parent = hit.Parent
clone_RightHand.Parent = hit.Parent
clone_LeftFoot.Parent = hit.Parent
clone_RightFoot.Parent = hit.Parent
local weld_a = Instance.new("Weld")
weld_a.Parent = hit.Parent.Torso
weld_a.Part0 = hit.Parent.Torso
weld_a.Part1 = hit.Parent.Torso1
weld_a.C1 = CFrame.fromEulerAnglesXYZ(-4.715, 0, -9.43) * CFrame.new(0, -.5, .7)
local weld_b = Instance.new("Weld")
weld_b.Parent = hit.Parent.Torso
weld_b.Part0 = hit.Parent.Torso
weld_b.Part1 = hit.Parent.Torso2
weld_b.C1 = CFrame.fromEulerAnglesXYZ(-4.715, 0, -9.43) * CFrame.new(.5, .5, .7)
local weld_c = Instance.new("Weld")
weld_c.Parent = hit.Parent.Torso
weld_c.Part0 = hit.Parent.Torso
weld_c.Part1 = hit.Parent.Torso3
weld_c.C1 = CFrame.fromEulerAnglesXYZ(-4.715, 0, -9.43) * CFrame.new(-.5, .5, .7)
local weld_d = Instance.new("Weld")
weld_d.Parent = hit.Parent.Torso
weld_d.Part0 = hit.Parent:findFirstChild("Left Arm")
weld_d.Part1 = hit.Parent.LeftArm1
weld_d.C1 = CFrame.fromEulerAnglesXYZ(-4.715, 0, -4.715) * CFrame.new(0, 0, .7)
local weld_e = Instance.new("Weld")
weld_e.Parent = hit.Parent.Torso
weld_e.Part0 = hit.Parent:findFirstChild("Right Arm")
weld_e.Part1 = hit.Parent.RightArm1
weld_e.C1 = CFrame.fromEulerAnglesXYZ(-4.715, 0, -4.715) * CFrame.new(0, 0, .7)
local weld_f = Instance.new("Weld")
weld_f.Parent = hit.Parent.Torso
weld_f.Part0 = hit.Parent:findFirstChild("Left Arm")
weld_f.Part1 = hit.Parent.LeftShoulder1
weld_f.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, -1, 0)
local weld_g = Instance.new("Weld")
weld_g.Parent = hit.Parent.Torso
weld_g.Part0 = hit.Parent:findFirstChild("Right Arm")
weld_g.Part1 = hit.Parent.RightShoulder1
weld_g.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, -1, 0)
local weld_h = Instance.new("Weld")
weld_h.Parent = hit.Parent.Torso
weld_h.Part0 = hit.Parent:findFirstChild("Left Arm")
weld_h.Part1 = hit.Parent.LeftArm2
weld_h.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 4.715) * CFrame.new(.7, 0, 0)
local weld_i = Instance.new("Weld")
weld_i.Parent = hit.Parent.Torso
weld_i.Part0 = hit.Parent:findFirstChild("Right Arm")
weld_i.Part1 = hit.Parent.RightArm2
weld_i.C1 = CFrame.fromEulerAnglesXYZ(0, 0, -4.715) * CFrame.new(-.7, 0, 0)
local weld_j = Instance.new("Weld")
weld_j.Parent = hit.Parent.Torso
weld_j.Part0 = hit.Parent:findFirstChild("Left Arm")
weld_j.Part1 = hit.Parent.LeftArm3
weld_j.C1 = CFrame.fromEulerAnglesXYZ(4.715, 0, 4.715) * CFrame.new(0, 0, -.7)
local weld_k = Instance.new("Weld")
weld_k.Parent = hit.Parent.Torso
weld_k.Part0 = hit.Parent:findFirstChild("Right Arm")
weld_k.Part1 = hit.Parent.RightArm3
weld_k.C1 = CFrame.fromEulerAnglesXYZ(4.715, 0, 4.715) * CFrame.new(0, 0, -.7)
local weld_l = Instance.new("Weld")
weld_l.Parent = hit.Parent.Torso
weld_l.Part0 = hit.Parent.Torso
weld_l.Part1 = hit.Parent.Neck
weld_l.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, -1, 0)
local weld_m = Instance.new("Weld")
weld_m.Parent = hit.Parent.Torso
weld_m.Part0 = hit.Parent.Torso
weld_m.Part1 = hit.Parent.Back1
weld_m.C1 = CFrame.fromEulerAnglesXYZ(4.715, 0, 0) * CFrame.new(0, -.5, -.7)
local weld_n = Instance.new("Weld")
weld_n.Parent = hit.Parent.Torso
weld_n.Part0 = hit.Parent.Torso
weld_n.Part1 = hit.Parent.Back2
weld_n.C1 = CFrame.fromEulerAnglesXYZ(4.715, 0, -9.43) * CFrame.new(0, .5, -.7)
local weld_o = Instance.new("Weld")
weld_o.Parent = hit.Parent.Torso
weld_o.Part0 = hit.Parent.Head
weld_o.Part1 = hit.Parent.Face
weld_o.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 4.715) * CFrame.new(0, .1, .3)
local weld_p = Instance.new("Weld")
weld_p.Parent = hit.Parent.Torso
weld_p.Part0 = hit.Parent.Head
weld_p.Part1 = hit.Parent.HeadB
weld_p.C1 = CFrame.fromEulerAnglesXYZ(4.715, 0, -9.43) * CFrame.new(0, .2, -.7)
local weld_q = Instance.new("Weld")
weld_q.Parent = hit.Parent.Torso
weld_q.Part0 = hit.Parent.Head
weld_q.Part1 = hit.Parent.HeadA
weld_q.C1 = CFrame.fromEulerAnglesXYZ(4.715, 4.715, -9.43) * CFrame.new(.7, .2, 0)
local weld_r = Instance.new("Weld")
weld_r.Parent = hit.Parent.Torso
weld_r.Part0 = hit.Parent.Head
weld_r.Part1 = hit.Parent.HeadC
weld_r.C1 = CFrame.fromEulerAnglesXYZ(4.715, -4.715, -9.43) * CFrame.new(-.7, .2, 0)
local weld_s = Instance.new("Weld")
weld_s.Parent = hit.Parent.Torso
weld_s.Part0 = hit.Parent.Head
weld_s.Part1 = hit.Parent.HeadD
weld_s.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, -.7, -.1)
local weld_t = Instance.new("Weld")
weld_t.Parent = hit.Parent.Torso
weld_t.Part0 = hit.Parent:findFirstChild("Left Leg")
weld_t.Part1 = hit.Parent.LeftLeg2
weld_t.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 4.715) * CFrame.new(.7, 0, 0)
local weld_u = Instance.new("Weld")
weld_u.Parent = hit.Parent.Torso
weld_u.Part0 = hit.Parent:findFirstChild("Right Leg")
weld_u.Part1 = hit.Parent.RightLeg2
weld_u.C1 = CFrame.fromEulerAnglesXYZ(0, 0, -4.715) * CFrame.new(-.7, 0, 0)
local weld_v = Instance.new("Weld")
weld_v.Parent = hit.Parent.Torso
weld_v.Part0 = hit.Parent:findFirstChild("Left Leg")
weld_v.Part1 = hit.Parent.LeftLeg3
weld_v.C1 = CFrame.fromEulerAnglesXYZ(4.715, 0, 4.715) * CFrame.new(0, 0, -.7)
local weld_w = Instance.new("Weld")
weld_w.Parent = hit.Parent.Torso
weld_w.Part0 = hit.Parent:findFirstChild("Right Leg")
weld_w.Part1 = hit.Parent.RightLeg3
weld_w.C1 = CFrame.fromEulerAnglesXYZ(4.715, 0, 4.715) * CFrame.new(0, 0, -.7)
local weld_x = Instance.new("Weld")
weld_x.Parent = hit.Parent.Torso
weld_x.Part0 = hit.Parent:findFirstChild("Left Leg")
weld_x.Part1 = hit.Parent.LeftLeg1
weld_x.C1 = CFrame.fromEulerAnglesXYZ(-4.715, 0, -4.715) * CFrame.new(0, 0, .7)
local weld_y = Instance.new("Weld")
weld_y.Parent = hit.Parent.Torso
weld_y.Part0 = hit.Parent:findFirstChild("Right Leg")
weld_y.Part1 = hit.Parent.RightLeg1
weld_y.C1 = CFrame.fromEulerAnglesXYZ(-4.715, 0, -4.715) * CFrame.new(0, 0, .7)
local weld_z1 = Instance.new("Weld")
weld_z1.Parent = hit.Parent.Torso
weld_z1.Part0 = hit.Parent:findFirstChild("Right Leg")
weld_z1.Part1 = hit.Parent.RightKnee
weld_z1.C1 = CFrame.fromEulerAnglesXYZ(0, 0, -4.715) * CFrame.new(-0.9, 0, 0)
local weld_z2 = Instance.new("Weld")
weld_z2.Parent = hit.Parent.Torso
weld_z2.Part0 = hit.Parent:findFirstChild("Left Leg")
weld_z2.Part1 = hit.Parent.LeftKnee
weld_z2.C1 = CFrame.fromEulerAnglesXYZ(0, 0, -4.715) * CFrame.new(0.9, 0, 0)
local weld_A = Instance.new("Weld")
weld_A.Parent = hit.Parent.Torso
weld_A.Part0 = hit.Parent:findFirstChild("Right Leg")
weld_A.Part1 = hit.Parent.RightLeg4
weld_A.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 4.715) * CFrame.new(.7, 0, 0)
local weld_B = Instance.new("Weld")
weld_B.Parent = hit.Parent.Torso
weld_B.Part0 = hit.Parent:findFirstChild("Left Leg")
weld_B.Part1 = hit.Parent.LeftLeg4
weld_B.C1 = CFrame.fromEulerAnglesXYZ(0, 0, -4.715) * CFrame.new(-.7, 0, 0)
local weld_C = Instance.new("Weld")
weld_C.Parent = hit.Parent.Torso
weld_C.Part0 = hit.Parent:findFirstChild("Right Arm")
weld_C.Part1 = hit.Parent.RightArm4
weld_C.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 4.715) * CFrame.new(.7, 0, 0)
local weld_D = Instance.new("Weld")
weld_D.Parent = hit.Parent.Torso
weld_D.Part0 = hit.Parent:findFirstChild("Left Arm")
weld_D.Part1 = hit.Parent.LeftArm4
weld_D.C1 = CFrame.fromEulerAnglesXYZ(0, 0, -4.715) * CFrame.new(-.7, 0, 0)
local weld_E = Instance.new("Weld")
weld_E.Parent = hit.Parent.Torso
weld_E.Part0 = hit.Parent.Torso
weld_E.Part1 = hit.Parent.LeftTorso
weld_E.C1 = CFrame.fromEulerAnglesXYZ(0, 0, -4.715) * CFrame.new(-1, 0, 0)
local weld_F = Instance.new("Weld")
weld_F.Parent = hit.Parent.Torso
weld_F.Part0 = hit.Parent.Torso
weld_F.Part1 = hit.Parent.RightTorso
weld_F.C1 = CFrame.fromEulerAnglesXYZ(0, 0, -4.715) * CFrame.new(1, 0, 0)
local weld_G = Instance.new("Weld")
weld_G.Parent = hit.Parent.Torso
weld_G.Part0 = hit.Parent:findFirstChild("Left Arm")
weld_G.Part1 = hit.Parent.LeftHand
weld_G.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, .8, 0)
local weld_H = Instance.new("Weld")
weld_H.Parent = hit.Parent.Torso
weld_H.Part0 = hit.Parent:findFirstChild("Right Arm")
weld_H.Part1 = hit.Parent.RightHand
weld_H.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, .8, 0)
local weld_I = Instance.new("Weld")
weld_I.Parent = hit.Parent.Torso
weld_I.Part0 = hit.Parent:findFirstChild("Left Leg")
weld_I.Part1 = hit.Parent.LeftFoot
weld_I.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 1, 0)
local weld_J = Instance.new("Weld")
weld_J.Parent = hit.Parent.Torso
weld_J.Part0 = hit.Parent:findFirstChild("Right Leg")
weld_J.Part1 = hit.Parent.RightFoot
weld_J.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 1, 0)
end
end
script.Parent.Touched:connect(onTouched) |