SHOW:
|
|
- or go back to the newest paste.
| 1 | ||
| 2 | --Converted with ttyyuu12345's model to script plugin v4 | |
| 3 | function sandbox(var,func) | |
| 4 | local env = getfenv(func) | |
| 5 | local newenv = setmetatable({},{
| |
| 6 | __index = function(self,k) | |
| 7 | if k=="script" then | |
| 8 | return var | |
| 9 | else | |
| 10 | return env[k] | |
| 11 | end | |
| 12 | end, | |
| 13 | }) | |
| 14 | setfenv(func,newenv) | |
| 15 | return func | |
| 16 | end | |
| 17 | cors = {}
| |
| 18 | mas = Instance.new("Model",game:GetService("Lighting"))
| |
| 19 | Model0 = Instance.new("Model")
| |
| 20 | - | Part1 = Instance.new("Part")
|
| 20 | + | Script1 = Instance.new("Script")
|
| 21 | Part2 = Instance.new("Part")
| |
| 22 | Part3 = Instance.new("Part")
| |
| 23 | Part4 = Instance.new("Part")
| |
| 24 | Part5 = Instance.new("Part")
| |
| 25 | Part6 = Instance.new("Part")
| |
| 26 | Part7 = Instance.new("Part")
| |
| 27 | Part8 = Instance.new("Part")
| |
| 28 | - | Script9 = Instance.new("Script")
|
| 28 | + | Part9 = Instance.new("Part")
|
| 29 | Script10 = Instance.new("Script")
| |
| 30 | - | Model0.Name = "Ice Slime" |
| 30 | + | BoolValue11 = Instance.new("BoolValue")
|
| 31 | Model0.Name = "Particle Pellets" | |
| 32 | - | Part1.Name = "Slimey" |
| 32 | + | |
| 33 | - | Part1.Parent = Model0 |
| 33 | + | Script1.Parent = Model0 |
| 34 | - | Part1.BrickColor = BrickColor.new("Pastel Blue")
|
| 34 | + | table.insert(cors,sandbox(Script1,function() |
| 35 | - | Part1.Anchored = true |
| 35 | + | --Particle Slime V2 by timwood1104-- |
| 36 | - | Part1.Locked = true |
| 36 | + | |
| 37 | - | Part1.FormFactor = Enum.FormFactor.Symmetric |
| 37 | + | -- V2 includes more customizable options including "range, combine and ooze"! Enjoi :D |
| 38 | - | Part1.Size = Vector3.new(1, 1, 1) |
| 38 | + | |
| 39 | - | Part1.CFrame = CFrame.new(-13.5, 0.500005007, -10.500061, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
| 39 | + | |
| 40 | - | Part1.BackSurface = Enum.SurfaceType.Glue |
| 40 | + | |
| 41 | - | Part1.BottomSurface = Enum.SurfaceType.Glue |
| 41 | + | |
| 42 | - | Part1.FrontSurface = Enum.SurfaceType.Glue |
| 42 | + | |
| 43 | - | Part1.LeftSurface = Enum.SurfaceType.Glue |
| 43 | + | |
| 44 | - | Part1.RightSurface = Enum.SurfaceType.Glue |
| 44 | + | |
| 45 | - | Part1.TopSurface = Enum.SurfaceType.Glue |
| 45 | + | |
| 46 | - | Part1.Color = Color3.new(0.501961, 0.733333, 0.858824) |
| 46 | + | |
| 47 | - | Part1.Position = Vector3.new(-13.5, 0.500005007, -10.500061) |
| 47 | + | |
| 48 | - | Part1.Color = Color3.new(0.501961, 0.733333, 0.858824) |
| 48 | + | spaces = 2 -- How many spaces it travels per move(1-3 is the best, preferably 2) |
| 49 | speed = 6 -- How fast it goes, just put any number I guess :P | |
| 50 | range = 75 -- How far the slime "sees"; if it can't see ya it won't get ya! lol | |
| 51 | - | Part2.BrickColor = BrickColor.new("Pastel Blue")
|
| 51 | + | combine = false -- If there are multiple slimes of the same kind, they will combine together if this is true. |
| 52 | - | Part2.Anchored = true |
| 52 | + | ooze = true -- This is whether the slime will squeeze through thick walls or not. |
| 53 | grabslime = true -- Whether the slime will grab Slimeys from Workspace or not; it doesn't affect much | |
| 54 | ------------- though. Basically, if there is any bricks in Workspace named "Slimey", it will add them to itself. | |
| 55 | ||
| 56 | - | Part2.CFrame = CFrame.new(-13.5, 0.500005007, -9.49992752, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
| 56 | + | |
| 57 | function findTarget() -- Ah, the findTarget() command. This command lets the slime find it's next victim. | |
| 58 | g = game.Workspace:getChildren() | |
| 59 | for i=1, #g do | |
| 60 | if g[i]:findFirstChild("Torso") ~= nil then
| |
| 61 | if (g[i].Torso.Position - script.Parent.Slimey.Position).magnitude < range then | |
| 62 | if T == nil then | |
| 63 | - | Part2.Color = Color3.new(0.501961, 0.733333, 0.858824) |
| 63 | + | |
| 64 | - | Part2.Position = Vector3.new(-13.5, 0.500005007, -9.49992752) |
| 64 | + | |
| 65 | - | Part2.Color = Color3.new(0.501961, 0.733333, 0.858824) |
| 65 | + | if (g[i].Torso.Position - script.Parent.Slimey.Position).magnitude < (T.Position - script.Parent.Slimey.Position).magnitude then |
| 66 | T = g[i].Torso | |
| 67 | end | |
| 68 | - | Part3.BrickColor = BrickColor.new("Pastel Blue")
|
| 68 | + | |
| 69 | - | Part3.Anchored = true |
| 69 | + | |
| 70 | end | |
| 71 | if grabslime == true and g[i].Name == "Slimey" and g[i].className == "Part" and g[i].Size == Vector3.new(1,1,1) then | |
| 72 | g[i].Parent = script.Parent | |
| 73 | - | Part3.CFrame = CFrame.new(-13.5, 1.50000596, -10.500061, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
| 73 | + | |
| 74 | end | |
| 75 | end | |
| 76 | ||
| 77 | function fade(b)-- This lets a brick disappear by "fading" into invisibility, but you can't see the effect very | |
| 78 | while b.Transparency < 1 do-- easily unless the slime is at a slow speed. | |
| 79 | b.Transparency = b.Transparency + 0.01*speed*#p/4 | |
| 80 | - | Part3.Color = Color3.new(0.501961, 0.733333, 0.858824) |
| 80 | + | |
| 81 | - | Part3.Position = Vector3.new(-13.5, 1.50000596, -10.500061) |
| 81 | + | |
| 82 | - | Part3.Color = Color3.new(0.501961, 0.733333, 0.858824) |
| 82 | + | |
| 83 | end | |
| 84 | ||
| 85 | - | Part4.BrickColor = BrickColor.new("Pastel Blue")
|
| 85 | + | |
| 86 | - | Part4.Anchored = true |
| 86 | + | |
| 87 | b.Transparency = b.Transparency - 0.01*speed*#p/4 | |
| 88 | wait(0.001) | |
| 89 | end | |
| 90 | - | Part4.CFrame = CFrame.new(-13.5, 1.50000596, -9.49992752, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
| 90 | + | |
| 91 | end | |
| 92 | ||
| 93 | if combine == true then | |
| 94 | k = game.Workspace:getChildren() | |
| 95 | wait(math.random(1,10)/20) | |
| 96 | for i=1, #k do | |
| 97 | - | Part4.Color = Color3.new(0.501961, 0.733333, 0.858824) |
| 97 | + | if k[i]:findFirstChild("Touch") ~= nil and k[i]:findFirstChild("Slimey") ~= nil and k[i] ~= script.Parent then
|
| 98 | - | Part4.Position = Vector3.new(-13.5, 1.50000596, -9.49992752) |
| 98 | + | if k[i]:findFirstChild("Slimey").BrickColor == script.Parent.Slimey.BrickColor then
|
| 99 | - | Part4.Color = Color3.new(0.501961, 0.733333, 0.858824) |
| 99 | + | h = k[i]:getChildren() |
| 100 | for o=1, #h do | |
| 101 | if h[o].Name == "Slimey" then | |
| 102 | - | Part5.BrickColor = BrickColor.new("Pastel Blue")
|
| 102 | + | h[o].Parent = script.Parent |
| 103 | - | Part5.Anchored = true |
| 103 | + | |
| 104 | end | |
| 105 | k[i]:remove() | |
| 106 | end | |
| 107 | - | Part5.CFrame = CFrame.new(-12.5, 0.500005007, -9.49992752, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
| 107 | + | |
| 108 | end | |
| 109 | end | |
| 110 | ||
| 111 | ||
| 112 | while true do | |
| 113 | ||
| 114 | - | Part5.Color = Color3.new(0.501961, 0.733333, 0.858824) |
| 114 | + | |
| 115 | - | Part5.Position = Vector3.new(-12.5, 0.500005007, -9.49992752) |
| 115 | + | |
| 116 | - | Part5.Color = Color3.new(0.501961, 0.733333, 0.858824) |
| 116 | + | |
| 117 | if ooze == true then | |
| 118 | r = math.random(1,36) --This little bit is supposed to allow the slime to take bigger "steps" every | |
| 119 | - | Part6.BrickColor = BrickColor.new("Pastel Blue")
|
| 119 | + | |
| 120 | - | Part6.Anchored = true |
| 120 | + | |
| 121 | elseif r == 4 or r == 5 then | |
| 122 | space = spaces + 2 | |
| 123 | elseif r == 6 then | |
| 124 | - | Part6.CFrame = CFrame.new(-12.5, 1.50000596, -9.49992752, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
| 124 | + | |
| 125 | else | |
| 126 | space = spaces | |
| 127 | end | |
| 128 | end | |
| 129 | ||
| 130 | if T ~= nil and script.Parent:findFirstChild("on") ~= nil then --If target exists, then attack!
| |
| 131 | - | Part6.Color = Color3.new(0.501961, 0.733333, 0.858824) |
| 131 | + | if script.Parent:findFirstChild("on").Value == true then
|
| 132 | - | Part6.Position = Vector3.new(-12.5, 1.50000596, -9.49992752) |
| 132 | + | p = script.Parent:getChildren() -- Makes a list of the slime's "Slimeys" |
| 133 | - | Part6.Color = Color3.new(0.501961, 0.733333, 0.858824) |
| 133 | + | for i=1, #p do |
| 134 | if p[i].Name == "Slimey" then | |
| 135 | if prev == nil then | |
| 136 | - | Part7.BrickColor = BrickColor.new("Pastel Blue")
|
| 136 | + | prev = p[i] |
| 137 | - | Part7.Anchored = true |
| 137 | + | prev2 = p[i] |
| 138 | end | |
| 139 | if (p[i].Position - T.Position).magnitude > (prev.Position - T.Position).magnitude then | |
| 140 | prev = p[i] -- This finds the Slimey closest to the target. | |
| 141 | - | Part7.CFrame = CFrame.new(-12.5, 1.50000596, -10.500061, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
| 141 | + | end |
| 142 | if (p[i].Position - T.Position).magnitude < (prev2.Position - T.Position).magnitude then | |
| 143 | prev2 = p[i] -- This finds the Slimey farthest away from the target. | |
| 144 | end | |
| 145 | end | |
| 146 | end | |
| 147 | fade(prev) --Make Slimey dissappear. VV- Make Slimey move closer to target. | |
| 148 | - | Part7.Color = Color3.new(0.501961, 0.733333, 0.858824) |
| 148 | + | prev.Position = Vector3.new(prev2.Position.x+math.random(-space,space), prev2.Position.y-1, prev2.Position.z+math.random(-space,space)) |
| 149 | - | Part7.Position = Vector3.new(-12.5, 1.50000596, -10.500061) |
| 149 | + | unfade(prev) -- Make Slimey appear again. |
| 150 | - | Part7.Color = Color3.new(0.501961, 0.733333, 0.858824) |
| 150 | + | |
| 151 | end | |
| 152 | wait(0.01) -- And then wait... :P | |
| 153 | - | Part8.BrickColor = BrickColor.new("Pastel Blue")
|
| 153 | + | |
| 154 | - | Part8.Anchored = true |
| 154 | + | |
| 155 | ||
| 156 | end)) | |
| 157 | Part2.Name = "Slimey" | |
| 158 | - | Part8.CFrame = CFrame.new(-12.5, 0.500005007, -10.500061, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
| 158 | + | |
| 159 | Part2.BrickColor = BrickColor.new("Bright bluish green")
| |
| 160 | Part2.Locked = true | |
| 161 | Part2.FormFactor = Enum.FormFactor.Symmetric | |
| 162 | Part2.Shape = Enum.PartType.Ball | |
| 163 | Part2.Size = Vector3.new(1, 1, 1) | |
| 164 | Part2.CFrame = CFrame.new(-76.5, 0.50001502, -24.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 165 | - | Part8.Color = Color3.new(0.501961, 0.733333, 0.858824) |
| 165 | + | |
| 166 | - | Part8.Position = Vector3.new(-12.5, 0.500005007, -10.500061) |
| 166 | + | |
| 167 | - | Part8.Color = Color3.new(0.501961, 0.733333, 0.858824) |
| 167 | + | |
| 168 | - | Script9.Parent = Model0 |
| 168 | + | |
| 169 | - | table.insert(cors,sandbox(Script9,function() |
| 169 | + | |
| 170 | - | --Particle Slime by timwood1104-- |
| 170 | + | |
| 171 | Part2.Color = Color3.new(0, 0.560784, 0.611765) | |
| 172 | Part2.Position = Vector3.new(-76.5, 0.50001502, -24.5) | |
| 173 | Part2.Color = Color3.new(0, 0.560784, 0.611765) | |
| 174 | Part3.Name = "Slimey" | |
| 175 | Part3.Parent = Model0 | |
| 176 | Part3.BrickColor = BrickColor.new("Bright bluish green")
| |
| 177 | Part3.Locked = true | |
| 178 | Part3.FormFactor = Enum.FormFactor.Symmetric | |
| 179 | Part3.Shape = Enum.PartType.Ball | |
| 180 | - | spaces = 1 -- How many spaces it travels per move(1-3 is the best, preferably 2) |
| 180 | + | |
| 181 | - | speed = 12 -- How fast it goes, just put any number I guess :P |
| 181 | + | Part3.CFrame = CFrame.new(-76.5, 0.50001502, -23.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
| 182 | Part3.BackSurface = Enum.SurfaceType.Glue | |
| 183 | Part3.BottomSurface = Enum.SurfaceType.Glue | |
| 184 | Part3.FrontSurface = Enum.SurfaceType.Glue | |
| 185 | Part3.LeftSurface = Enum.SurfaceType.Glue | |
| 186 | - | function findTarget() -- Ah, the findTarget() command. This command lets the slime find it's next victem. |
| 186 | + | |
| 187 | Part3.TopSurface = Enum.SurfaceType.Glue | |
| 188 | Part3.Color = Color3.new(0, 0.560784, 0.611765) | |
| 189 | Part3.Position = Vector3.new(-76.5, 0.50001502, -23.5) | |
| 190 | - | if T == nil then |
| 190 | + | Part3.Color = Color3.new(0, 0.560784, 0.611765) |
| 191 | - | T = g[i].Torso |
| 191 | + | |
| 192 | - | else |
| 192 | + | |
| 193 | - | if (g[i].Torso.Position - script.Parent.Slimey.Position).magnitude < (T.Position - script.Parent.Slimey.Position).magnitude then |
| 193 | + | Part4.BrickColor = BrickColor.new("Bright bluish green")
|
| 194 | Part4.Locked = true | |
| 195 | Part4.FormFactor = Enum.FormFactor.Symmetric | |
| 196 | Part4.Shape = Enum.PartType.Ball | |
| 197 | Part4.Size = Vector3.new(1, 1, 1) | |
| 198 | Part4.CFrame = CFrame.new(-76.5, 1.50001395, -24.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 199 | Part4.BackSurface = Enum.SurfaceType.Glue | |
| 200 | Part4.BottomSurface = Enum.SurfaceType.Glue | |
| 201 | Part4.FrontSurface = Enum.SurfaceType.Glue | |
| 202 | Part4.LeftSurface = Enum.SurfaceType.Glue | |
| 203 | Part4.RightSurface = Enum.SurfaceType.Glue | |
| 204 | Part4.TopSurface = Enum.SurfaceType.Glue | |
| 205 | Part4.Color = Color3.new(0, 0.560784, 0.611765) | |
| 206 | Part4.Position = Vector3.new(-76.5, 1.50001395, -24.5) | |
| 207 | Part4.Color = Color3.new(0, 0.560784, 0.611765) | |
| 208 | Part5.Name = "Slimey" | |
| 209 | Part5.Parent = Model0 | |
| 210 | Part5.BrickColor = BrickColor.new("Bright bluish green")
| |
| 211 | Part5.Locked = true | |
| 212 | Part5.FormFactor = Enum.FormFactor.Symmetric | |
| 213 | Part5.Shape = Enum.PartType.Ball | |
| 214 | Part5.Size = Vector3.new(1, 1, 1) | |
| 215 | Part5.CFrame = CFrame.new(-76.5, 1.50001395, -23.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 216 | Part5.BackSurface = Enum.SurfaceType.Glue | |
| 217 | Part5.BottomSurface = Enum.SurfaceType.Glue | |
| 218 | Part5.FrontSurface = Enum.SurfaceType.Glue | |
| 219 | Part5.LeftSurface = Enum.SurfaceType.Glue | |
| 220 | Part5.RightSurface = Enum.SurfaceType.Glue | |
| 221 | Part5.TopSurface = Enum.SurfaceType.Glue | |
| 222 | Part5.Color = Color3.new(0, 0.560784, 0.611765) | |
| 223 | Part5.Position = Vector3.new(-76.5, 1.50001395, -23.5) | |
| 224 | Part5.Color = Color3.new(0, 0.560784, 0.611765) | |
| 225 | - | r = math.random(1,20) --This little bit is supposed to allow the slime to take bigger "steps" every |
| 225 | + | |
| 226 | Part6.Parent = Model0 | |
| 227 | Part6.BrickColor = BrickColor.new("Bright bluish green")
| |
| 228 | Part6.Locked = true | |
| 229 | Part6.FormFactor = Enum.FormFactor.Symmetric | |
| 230 | Part6.Shape = Enum.PartType.Ball | |
| 231 | Part6.Size = Vector3.new(1, 1, 1) | |
| 232 | Part6.CFrame = CFrame.new(-75.5, 0.50001502, -23.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 233 | Part6.BackSurface = Enum.SurfaceType.Glue | |
| 234 | Part6.BottomSurface = Enum.SurfaceType.Glue | |
| 235 | Part6.FrontSurface = Enum.SurfaceType.Glue | |
| 236 | - | if T ~= nil then --If target exists, then attack! |
| 236 | + | |
| 237 | - | p = script.Parent:getChildren() -- Makes a list of the slime's "Slimeys" |
| 237 | + | |
| 238 | - | for i=1, #p do |
| 238 | + | |
| 239 | - | if p[i].Name == "Slimey" then |
| 239 | + | Part6.Color = Color3.new(0, 0.560784, 0.611765) |
| 240 | - | if prev == nil then |
| 240 | + | Part6.Position = Vector3.new(-75.5, 0.50001502, -23.5) |
| 241 | - | prev = p[i] |
| 241 | + | Part6.Color = Color3.new(0, 0.560784, 0.611765) |
| 242 | - | prev2 = p[i] |
| 242 | + | |
| 243 | Part7.Parent = Model0 | |
| 244 | - | if (p[i].Position - T.Position).magnitude > (prev.Position - T.Position).magnitude then |
| 244 | + | Part7.BrickColor = BrickColor.new("Bright bluish green")
|
| 245 | - | prev = p[i] -- This finds the Slimey closest to the target. |
| 245 | + | |
| 246 | Part7.FormFactor = Enum.FormFactor.Symmetric | |
| 247 | - | if (p[i].Position - T.Position).magnitude < (prev2.Position - T.Position).magnitude then |
| 247 | + | Part7.Shape = Enum.PartType.Ball |
| 248 | - | prev2 = p[i] -- This finds the Slimey farthest away from the target. |
| 248 | + | |
| 249 | Part7.CFrame = CFrame.new(-75.5, 1.50001395, -23.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 250 | Part7.BackSurface = Enum.SurfaceType.Glue | |
| 251 | Part7.BottomSurface = Enum.SurfaceType.Glue | |
| 252 | - | fade(prev) --Make Slimey dissappear. VV- Make Slimey move closer to target. |
| 252 | + | |
| 253 | - | prev.Position = Vector3.new(prev2.Position.x+math.random(-space,space), prev2.Position.y-1, prev2.Position.z+math.random(-space,space)) |
| 253 | + | |
| 254 | - | unfade(prev) -- Make Slimey appear again. |
| 254 | + | |
| 255 | Part7.TopSurface = Enum.SurfaceType.Glue | |
| 256 | Part7.Color = Color3.new(0, 0.560784, 0.611765) | |
| 257 | Part7.Position = Vector3.new(-75.5, 1.50001395, -23.5) | |
| 258 | Part7.Color = Color3.new(0, 0.560784, 0.611765) | |
| 259 | Part8.Name = "Slimey" | |
| 260 | Part8.Parent = Model0 | |
| 261 | Part8.BrickColor = BrickColor.new("Bright bluish green")
| |
| 262 | Part8.Locked = true | |
| 263 | Part8.FormFactor = Enum.FormFactor.Symmetric | |
| 264 | Part8.Shape = Enum.PartType.Ball | |
| 265 | Part8.Size = Vector3.new(1, 1, 1) | |
| 266 | Part8.CFrame = CFrame.new(-75.5, 1.50001395, -24.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 267 | Part8.BackSurface = Enum.SurfaceType.Glue | |
| 268 | Part8.BottomSurface = Enum.SurfaceType.Glue | |
| 269 | - | p.Anchored = true |
| 269 | + | |
| 270 | Part8.LeftSurface = Enum.SurfaceType.Glue | |
| 271 | Part8.RightSurface = Enum.SurfaceType.Glue | |
| 272 | Part8.TopSurface = Enum.SurfaceType.Glue | |
| 273 | Part8.Color = Color3.new(0, 0.560784, 0.611765) | |
| 274 | Part8.Position = Vector3.new(-75.5, 1.50001395, -24.5) | |
| 275 | Part8.Color = Color3.new(0, 0.560784, 0.611765) | |
| 276 | Part9.Name = "Slimey" | |
| 277 | Part9.Parent = Model0 | |
| 278 | Part9.BrickColor = BrickColor.new("Bright bluish green")
| |
| 279 | Part9.Locked = true | |
| 280 | Part9.FormFactor = Enum.FormFactor.Symmetric | |
| 281 | Part9.Shape = Enum.PartType.Ball | |
| 282 | Part9.Size = Vector3.new(1, 1, 1) | |
| 283 | Part9.CFrame = CFrame.new(-75.5, 0.50001502, -24.5, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 284 | Part9.BackSurface = Enum.SurfaceType.Glue | |
| 285 | Part9.BottomSurface = Enum.SurfaceType.Glue | |
| 286 | Part9.FrontSurface = Enum.SurfaceType.Glue | |
| 287 | Part9.LeftSurface = Enum.SurfaceType.Glue | |
| 288 | Part9.RightSurface = Enum.SurfaceType.Glue | |
| 289 | Part9.TopSurface = Enum.SurfaceType.Glue | |
| 290 | Part9.Color = Color3.new(0, 0.560784, 0.611765) | |
| 291 | Part9.Position = Vector3.new(-75.5, 0.50001502, -24.5) | |
| 292 | Part9.Color = Color3.new(0, 0.560784, 0.611765) | |
| 293 | Script10.Name = "Touch" | |
| 294 | Script10.Parent = Model0 | |
| 295 | table.insert(cors,sandbox(Script10,function() | |
| 296 | ting = false | |
| 297 | function onTouched(p) | |
| 298 | if ting == false then | |
| 299 | ting = true | |
| 300 | if p.Name == "Left Arm" or p.Name == "Right Arm" or p.Name == "Left Leg" or p.Name == "Right Leg" or p.Name == "Head" or p.Name == "Torso" or p.Name == "zarm" then | |
| 301 | p.Anchored = false --OMG!! | |
| 302 | reflect(p) | |
| 303 | part = Instance.new("Part")
| |
| 304 | part.Parent = game.Workspace | |
| 305 | part.Position = p.Position | |
| 306 | p:remove() | |
| 307 | part.Reflectance = 1 | |
| 308 | part.Shape = "Ball" | |
| 309 | part.formFactor = "Symmetric" | |
| 310 | part.TopSurface = "Glue" | |
| 311 | part.BottomSurface = "Glue" | |
| 312 | part.LeftSurface = "Glue" | |
| 313 | part.RightSurface = "Glue" | |
| 314 | part.BackSurface = "Glue" | |
| 315 | part.FrontSurface = "Glue" | |
| 316 | part.Locked = true | |
| 317 | part.Anchored = true | |
| 318 | part.Size = Vector3.new(1,1,1) | |
| 319 | unreflect(part) | |
| 320 | part.BrickColor = script.Parent.Slimey.BrickColor | |
| 321 | part.Parent = script.Parent | |
| 322 | part.Name = "Slimey" | |
| 323 | part.Touched:connect(onTouched) | |
| 324 | end | |
| 325 | ting = false | |
| 326 | end | |
| 327 | end | |
| 328 | ||
| 329 | function reflect(b) | |
| 330 | while b.Reflectance < 1 do | |
| 331 | b.Reflectance = b.Reflectance + 0.05 | |
| 332 | wait(0.01) | |
| 333 | end | |
| 334 | b.Reflectance = 1 | |
| 335 | end | |
| 336 | ||
| 337 | function unreflect(b) | |
| 338 | while b.Reflectance > 0 do | |
| 339 | b.Reflectance = b.Reflectance - 0.05 | |
| 340 | wait(0.01) | |
| 341 | end | |
| 342 | b.Reflectance = 0 | |
| 343 | end | |
| 344 | ||
| 345 | e = script.Parent:getChildren() | |
| 346 | for i=1, #e do | |
| 347 | if e[i].Name == "Slimey" then | |
| 348 | e[i].Touched:connect(onTouched) | |
| 349 | end | |
| 350 | end | |
| 351 | ||
| 352 | end)) | |
| 353 | BoolValue11.Name = "on" | |
| 354 | BoolValue11.Parent = Model0 | |
| 355 | BoolValue11.Value = true | |
| 356 | for i,v in pairs(mas:GetChildren()) do | |
| 357 | v.Parent = workspace | |
| 358 | pcall(function() v:MakeJoints() end) | |
| 359 | end | |
| 360 | mas:Destroy() | |
| 361 | for i,v in pairs(cors) do | |
| 362 | spawn(function() | |
| 363 | pcall(v) | |
| 364 | end) | |
| 365 | end |