SHOW:
|
|
- or go back to the newest paste.
| 1 | if game:GetService("RunService"):IsClient() then error("Use h/ Buster ") end
| |
| 2 | - | ---------------The mysterious button--------------- |
| 2 | + | warn(" credits goes to the real creator ")
|
| 3 | local Player,game,owner = owner,game | |
| 4 | local RealPlayer = Player | |
| 5 | do | |
| 6 | print("FE Compatibility code by Mokiros")
| |
| 7 | local rp = RealPlayer | |
| 8 | script.Parent = rp.Character | |
| 9 | ||
| 10 | --RemoteEvent for communicating | |
| 11 | local Event = Instance.new("RemoteEvent")
| |
| 12 | Event.Name = "UserInput_Event" | |
| 13 | ||
| 14 | --Fake event to make stuff like Mouse.KeyDown work | |
| 15 | local function fakeEvent() | |
| 16 | local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
| |
| 17 | t.connect = t.Connect | |
| 18 | return t | |
| 19 | end | |
| 20 | ||
| 21 | --Creating fake input objects with fake variables | |
| 22 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
| |
| 23 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 24 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 25 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 26 | end} | |
| 27 | --Merged 2 functions into one by checking amount of arguments | |
| 28 | CAS.UnbindAction = CAS.BindAction | |
| 29 | ||
| 30 | --This function will trigger the events that have been :Connect()'ed | |
| 31 | local function te(self,ev,...) | |
| 32 | local t = m[ev] | |
| 33 | if t and t._fakeEvent then | |
| 34 | for _,f in pairs(t.Functions) do | |
| 35 | f(...) | |
| 36 | end | |
| 37 | end | |
| 38 | end | |
| 39 | m.TrigEvent = te | |
| 40 | UIS.TrigEvent = te | |
| 41 | ||
| 42 | Event.OnServerEvent:Connect(function(plr,io) | |
| 43 | if plr~=rp then return end | |
| 44 | m.Target = io.Target | |
| 45 | m.Hit = io.Hit | |
| 46 | if not io.isMouse then | |
| 47 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 48 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 49 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
| 50 | end | |
| 51 | for _,t in pairs(CAS.Actions) do | |
| 52 | for _,k in pairs(t.Keys) do | |
| 53 | if k==io.KeyCode then | |
| 54 | t.Function(t.Name,io.UserInputState,io) | |
| 55 | end | |
| 56 | end | |
| 57 | end | |
| 58 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 59 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 60 | end | |
| 61 | end) | |
| 62 | Event.Parent = NLS([==[ | |
| 63 | local Player = game:GetService("Players").LocalPlayer
| |
| 64 | local Event = script:WaitForChild("UserInput_Event")
| |
| 65 | ||
| 66 | local Mouse = Player:GetMouse() | |
| 67 | local UIS = game:GetService("UserInputService")
| |
| 68 | local input = function(io,a) | |
| 69 | if a then return end | |
| 70 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 71 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
| |
| 72 | end | |
| 73 | UIS.InputBegan:Connect(input) | |
| 74 | UIS.InputEnded:Connect(input) | |
| 75 | ||
| 76 | local h,t | |
| 77 | --Give the server mouse data 30 times every second, but only if the values changed | |
| 78 | --If player is not moving their mouse, client won't fire events | |
| 79 | while wait(1/30) do | |
| 80 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 81 | h,t=Mouse.Hit,Mouse.Target | |
| 82 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 83 | end | |
| 84 | end]==],Player.Character) | |
| 85 | ||
| 86 | ----Sandboxed game object that allows the usage of client-side methods and services | |
| 87 | --Real game object | |
| 88 | local _rg = game | |
| 89 | ||
| 90 | --Metatable for fake service | |
| 91 | local fsmt = {
| |
| 92 | __index = function(self,k) | |
| 93 | local s = rawget(self,"_RealService") | |
| 94 | if s then return s[k] end | |
| 95 | end, | |
| 96 | __newindex = function(self,k,v) | |
| 97 | local s = rawget(self,"_RealService") | |
| 98 | if s then s[k]=v end | |
| 99 | end, | |
| 100 | __call = function(self,...) | |
| 101 | local s = rawget(self,"_RealService") | |
| 102 | if s then return s(...) end | |
| 103 | end | |
| 104 | } | |
| 105 | local function FakeService(t,RealService) | |
| 106 | t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService | |
| 107 | return setmetatable(t,fsmt) | |
| 108 | end | |
| 109 | ||
| 110 | --Fake game object | |
| 111 | local g = {
| |
| 112 | GetService = function(self,s) | |
| 113 | return self[s] | |
| 114 | end, | |
| 115 | Players = FakeService({
| |
| 116 | LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
| |
| 117 | },"Players"), | |
| 118 | UserInputService = FakeService(UIS,"UserInputService"), | |
| 119 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
| 120 | } | |
| 121 | rawset(g.Players,"localPlayer",g.Players.LocalPlayer) | |
| 122 | g.service = g.GetService | |
| 123 | ||
| 124 | g.RunService = FakeService({
| |
| 125 | RenderStepped = _rg:GetService("RunService").Heartbeat,
| |
| 126 | BindToRenderStep = function(self,name,_,fun) | |
| 127 | ||
| 128 | end, | |
| 129 | UnbindFromRenderStep = function(self,name) | |
| 130 | self._btrs[name]:Disconnect() | |
| 131 | end, | |
| 132 | },"RunService") | |
| 133 | ||
| 134 | setmetatable(g,{
| |
| 135 | __index=function(self,s) | |
| 136 | return _rg:GetService(s) or typeof(_rg[s])=="function" | |
| 137 | and function(_,...)return _rg[s](_rg,...)end or _rg[s] | |
| 138 | - | sound2.SoundId = "rbxassetid://1274525620" |
| 138 | + | end, |
| 139 | - | sound2.Volume = 5 |
| 139 | + | __newindex = fsmt.__newindex, |
| 140 | __call = fsmt.__call | |
| 141 | }) | |
| 142 | --Changing owner to fake player object to support owner:GetMouse() | |
| 143 | game,owner = g,g.Players.LocalPlayer | |
| 144 | end | |
| 145 | ||
| 146 | ||
| 147 | ||
| 148 | ||
| 149 | --Made by mrfunnylaughs4. This sure is some weird button. | |
| 150 | ||
| 151 | local debounce = false | |
| 152 | ||
| 153 | --------------------------------------------------- | |
| 154 | ---------------------Functions--------------------- | |
| 155 | --------------------------------------------------- | |
| 156 | ||
| 157 | local function SmoothPart(part) | |
| 158 | part.TopSurface = "Smooth" | |
| 159 | part.BottomSurface = "Smooth" | |
| 160 | part.LeftSurface = "Smooth" | |
| 161 | part.RightSurface = "Smooth" | |
| 162 | part.FrontSurface = "Smooth" | |
| 163 | part.BackSurface = "Smooth" | |
| 164 | end | |
| 165 | ||
| 166 | local function Effect(Length, Type, SizeStart, SizeEnd, Position, Colour, Parent, CanCollide) | |
| 167 | local part = Instance.new("Part")
| |
| 168 | part.Name = Type | |
| 169 | part.CFrame = Position | |
| 170 | part.CanCollide = CanCollide or false | |
| 171 | part.Size = SizeStart | |
| 172 | part.Anchored = true | |
| 173 | part.BrickColor = BrickColor.new(tostring(Colour)) | |
| 174 | part.Parent = Parent or workspace | |
| 175 | if Type == "Block" then | |
| 176 | SmoothPart(part) | |
| 177 | end | |
| 178 | if Type == "Sphere" then | |
| 179 | part.Shape = Enum.PartType.Ball | |
| 180 | SmoothPart(part) | |
| 181 | end | |
| 182 | if Type == "TwirlSwirl" then | |
| 183 | local mesh = Instance.new("SpecialMesh")
| |
| 184 | mesh.MeshType = Enum.MeshType.FileMesh | |
| 185 | mesh.MeshId = "rbxassetid://662585058" | |
| 186 | mesh.Name = "SwirlMesh" | |
| 187 | mesh.Scale = SizeStart / Vector3.new(500, 500, 500) | |
| 188 | mesh.Parent = part | |
| 189 | end | |
| 190 | if Type == "Wave" or Type == "SpiralWave" then | |
| 191 | local mesh = Instance.new("SpecialMesh")
| |
| 192 | mesh.MeshType = Enum.MeshType.FileMesh | |
| 193 | mesh.MeshId = "rbxassetid://20329976" | |
| 194 | mesh.Name = "WaveMesh" | |
| 195 | mesh.Scale = SizeStart / Vector3.new(4, 4, 4) | |
| 196 | mesh.Parent = part | |
| 197 | end | |
| 198 | if Type == "MeshSphere" then | |
| 199 | local mesh = Instance.new("SpecialMesh")
| |
| 200 | mesh.MeshType = Enum.MeshType.Sphere | |
| 201 | mesh.Parent = part | |
| 202 | SmoothPart(part) | |
| 203 | end | |
| 204 | spawn(function() | |
| 205 | local TwirlAngle = math.random(-250, 250) / 1000 | |
| 206 | local WaveAngle = math.random(-500, 500) / 1000 | |
| 207 | for i = 1, Length do | |
| 208 | game:GetService("RunService").Heartbeat:Wait()
| |
| 209 | part.Transparency = part.Transparency + 1 / Length | |
| 210 | part.Size = part.Size + SizeEnd / Vector3.new(Length, Length, Length) | |
| 211 | if Type == "TwirlSwirl" then | |
| 212 | part.CFrame = part.CFrame * CFrame.Angles(TwirlAngle, TwirlAngle, TwirlAngle) | |
| 213 | part.SwirlMesh.Scale = part.SwirlMesh.Scale + SizeEnd / Vector3.new(Length * 500, Length * 500, Length * 500) | |
| 214 | end | |
| 215 | if Type == "SpiralWave" then | |
| 216 | part.CFrame = part.CFrame * CFrame.Angles(WaveAngle, WaveAngle, WaveAngle) | |
| 217 | part.WaveMesh.Scale = part.WaveMesh.Scale + SizeEnd / Vector3.new(Length * 4, Length * 4, Length * 4) | |
| 218 | end | |
| 219 | if Type == "Wave" then | |
| 220 | part.CFrame = part.CFrame * CFrame.Angles(0, WaveAngle, 0) | |
| 221 | part.WaveMesh.Scale = part.WaveMesh.Scale + SizeEnd / Vector3.new(Length * 4, Length * 4, Length * 4) | |
| 222 | end | |
| 223 | end | |
| 224 | part:Destroy() | |
| 225 | end) | |
| 226 | end | |
| 227 | ||
| 228 | --------------------------------------------------- | |
| 229 | -----------------Making the button----------------- | |
| 230 | --------------------------------------------------- | |
| 231 | ||
| 232 | local model = Instance.new("Model")
| |
| 233 | model.Name = "Button" | |
| 234 | model.Parent = workspace | |
| 235 | local base = Instance.new("Part")
| |
| 236 | base.Name = "Base" | |
| 237 | base.Size = Vector3.new(1, 4, 4) | |
| 238 | base.Shape = Enum.PartType.Cylinder | |
| 239 | base.CFrame = CFrame.new(0, 0.5, 0, 0, 0, 1, -1, 0, 0, 0, -1, 0) | |
| 240 | base.BrickColor = BrickColor.new("Medium stone grey")
| |
| 241 | base.Anchored = true | |
| 242 | base.Locked = true | |
| 243 | SmoothPart(base) | |
| 244 | base.Parent = model | |
| 245 | local button = Instance.new("Part")
| |
| 246 | button.Name = "Button" | |
| 247 | button.Size = Vector3.new(1, 3.4, 3.4) | |
| 248 | button.Shape = Enum.PartType.Cylinder | |
| 249 | button.CFrame = CFrame.new(1.49011612e-08, 0.799999952, 0, -0, -0, 1, -1, -0, 0, -0, -1, 0) | |
| 250 | button.BrickColor = BrickColor.new("Bright red")
| |
| 251 | button.Anchored = true | |
| 252 | button.Locked = true | |
| 253 | SmoothPart(button) | |
| 254 | button.Parent = model | |
| 255 | local click = Instance.new("ClickDetector")
| |
| 256 | click.Name = "MouseClickDetect" | |
| 257 | click.MaxActivationDistance = 8 | |
| 258 | click.Parent = button | |
| 259 | ||
| 260 | --------------------------------------------------- | |
| 261 | ----------------------Attacks---------------------- | |
| 262 | --------------------------------------------------- | |
| 263 | ||
| 264 | game:GetService("RunService").Heartbeat:Connect(function()
| |
| 265 | if not click:FindFirstChild("EventHooked") then
| |
| 266 | local val = Instance.new("BoolValue")
| |
| 267 | val.Name = "EventHooked" | |
| 268 | val.Parent = click | |
| 269 | click.MouseClick:Connect(function(player) | |
| 270 | if debounce == false then | |
| 271 | debounce = true | |
| 272 | local sound = Instance.new("Sound")
| |
| 273 | sound.SoundId = "rbxassetid://1677936333" | |
| 274 | sound.Volume = 5 | |
| 275 | sound.Parent = button | |
| 276 | sound:Play() | |
| 277 | button.CFrame = button.CFrame + Vector3.new(0, -0.15, 0) | |
| 278 | wait(0.2) | |
| 279 | button.CFrame = button.CFrame + Vector3.new(0, 0.15, 0) | |
| 280 | wait(0.05) | |
| 281 | local sound2 = Instance.new("Sound")
| |
| 282 | sound2.SoundId = "rbxassetid://3065165447" | |
| 283 | sound2.Volume = 1000 | |
| 284 | sound2.Parent = button | |
| 285 | sound2:Play() | |
| 286 | wait(1.55) | |
| 287 | sound:Destroy() | |
| 288 | sound2:Destroy() | |
| 289 | local choice = math.random(1, 4) | |
| 290 | if choice == 1 then | |
| 291 | local Char = player.Character | |
| 292 | local sound = Instance.new("Sound")
| |
| 293 | sound.SoundId = "rbxassetid://130972023" | |
| 294 | sound.Volume = 5 | |
| 295 | sound.Parent = Char.HumanoidRootPart | |
| 296 | sound:Play() | |
| 297 | Effect(40, "Sphere", Vector3.new(2, 2, 2), Vector3.new(15, 15, 15), Char.HumanoidRootPart.CFrame, BrickColor.new("Really black"), Char)
| |
| 298 | for i = 1, 4 do | |
| 299 | Effect(40, "SpiralWave", Vector3.new(10, 2, 10), Vector3.new(40, 8, 40), Char.HumanoidRootPart.CFrame, BrickColor.new("Really black"), Char)
| |
| 300 | end | |
| 301 | for i,v in pairs(Char:GetChildren()) do | |
| 302 | if v:IsA("BasePart") and not v:IsA("Terrain") then
| |
| 303 | v:BreakJoints() | |
| 304 | v.Velocity = Vector3.new(math.random(-25, 25), 30, math.random(-25, 25)) | |
| 305 | end | |
| 306 | end | |
| 307 | elseif choice == 2 then | |
| 308 | local Char = player.Character | |
| 309 | local sound = Instance.new("Sound")
| |
| 310 | sound.SoundId = "rbxassetid://1368583274" | |
| 311 | sound.Volume = 5 | |
| 312 | sound.Parent = Char.HumanoidRootPart | |
| 313 | sound:Play() | |
| 314 | for i = 1, 120 do | |
| 315 | game:GetService("RunService").Heartbeat:Wait()
| |
| 316 | sound.Volume = sound.Volume - 5 / 120 | |
| 317 | Effect(15, "Wave", Vector3.new(7, 1, 7), Vector3.new(20, 4, 20), Char.HumanoidRootPart.CFrame + Vector3.new(0, -2.5, 0), BrickColor.new("Mid gray"), Char)
| |
| 318 | end | |
| 319 | sound:Destroy() | |
| 320 | local sound = Instance.new("Sound")
| |
| 321 | sound.SoundId = "rbxassetid://165970126" | |
| 322 | sound.Volume = 2 | |
| 323 | sound.Parent = Char.HumanoidRootPart | |
| 324 | sound:Play() | |
| 325 | Effect(20, "MeshSphere", Vector3.new(5, 15, 5), Vector3.new(8, 90, 8), Char.HumanoidRootPart.CFrame, BrickColor.new("Institutional white"), Char)
| |
| 326 | for i = 1, 4 do | |
| 327 | Effect(30, "Wave", Vector3.new(7, 1, 7), Vector3.new(40, 8, 40), Char.HumanoidRootPart.CFrame + Vector3.new(0, -2.5, 0), BrickColor.new("Mid gray"), Char)
| |
| 328 | end | |
| 329 | local vel = Instance.new("BodyVelocity")
| |
| 330 | vel.MaxForce = Vector3.new(1e9, 1e9, 1e9) | |
| 331 | vel.Velocity = Vector3.new(0, 300, 0) | |
| 332 | vel.Parent = Char.HumanoidRootPart | |
| 333 | spawn(function() | |
| 334 | wait(0.5) | |
| 335 | vel:Destroy() | |
| 336 | end) | |
| 337 | elseif choice == 3 then | |
| 338 | local Char = player.Character | |
| 339 | local hole = Instance.new("Part")
| |
| 340 | hole.Name = "Hole" | |
| 341 | hole.Color = Color3.new(0, 0, 0) | |
| 342 | hole.Shape = Enum.PartType.Cylinder | |
| 343 | hole.CFrame = Char.HumanoidRootPart.CFrame * CFrame.new(0, -3.04, 0) * CFrame.Angles(0, 0, math.pi / 2) | |
| 344 | hole.Size = Vector3.new(0.1, 0, 0) | |
| 345 | hole.Anchored = true | |
| 346 | hole.Locked = true | |
| 347 | hole.Material = Enum.Material.Neon | |
| 348 | hole.CanCollide = false | |
| 349 | SmoothPart(hole) | |
| 350 | hole.Parent = Char | |
| 351 | Char.Head.Anchored = true | |
| 352 | for i = 1, 35 do | |
| 353 | game:GetService("RunService").Heartbeat:Wait()
| |
| 354 | hole.Size = hole.Size + Vector3.new(0, 0.2 * Char.HumanoidRootPart.Size.Z, 0.2 * Char.HumanoidRootPart.Size.Z) | |
| 355 | end | |
| 356 | local sound = Instance.new("Sound")
| |
| 357 | sound.SoundId = "rbxassetid://838038142" | |
| 358 | sound.Volume = 2 | |
| 359 | sound.Parent = Char.HumanoidRootPart | |
| 360 | sound:Play() | |
| 361 | repeat | |
| 362 | game:GetService("RunService").Heartbeat:Wait()
| |
| 363 | Char:SetPrimaryPartCFrame(Char.Head.CFrame * CFrame.new(0, -0.05, 0)) | |
| 364 | hole.CFrame = hole.CFrame + Vector3.new(0, 0.05, 0) | |
| 365 | until Char.HumanoidRootPart.Position.Y < hole.Position.Y - 3.4 * Char.HumanoidRootPart.Size.Z | |
| 366 | sound:Destroy() | |
| 367 | for i = 1, 35 do | |
| 368 | game:GetService("RunService").Heartbeat:Wait()
| |
| 369 | hole.Size = hole.Size - Vector3.new(0, 0.2 * Char.HumanoidRootPart.Size.Z, 0.2 * Char.HumanoidRootPart.Size.Z) | |
| 370 | end | |
| 371 | hole:Destroy() | |
| 372 | Char:BreakJoints() | |
| 373 | elseif choice == 4 then | |
| 374 | local Char = player.Character | |
| 375 | local sound = Instance.new("Sound")
| |
| 376 | sound.SoundId = "rbxassetid://130972023" | |
| 377 | sound.Volume = 5 | |
| 378 | sound.Parent = Char.HumanoidRootPart | |
| 379 | sound:Play() | |
| 380 | if Char:FindFirstChildOfClass("Humanoid") then
| |
| 381 | for i = 1, 5 do | |
| 382 | Effect(30, "Wave", Vector3.new(7, 1, 7), Vector3.new(20, 4, 20), Char.HumanoidRootPart.CFrame + Vector3.new(0, -2.5, 0), BrickColor.new("Mid gray"), Char)
| |
| 383 | end | |
| 384 | Char:FindFirstChildOfClass("Humanoid").PlatformStand = true
| |
| 385 | else | |
| 386 | for i = 1, 5 do | |
| 387 | Effect(30, "Wave", Vector3.new(7, 1, 7), Vector3.new(20, 4, 20), Char.HumanoidRootPart.CFrame + Vector3.new(0, -2.5, 0), BrickColor.new("Mid gray"), Char)
| |
| 388 | end | |
| 389 | local bodyforce = Instance.new("BodyForce")
| |
| 390 | bodyforce.Force = Vector3.new(0, -500000, 0) | |
| 391 | bodyforce.Parent = Char.Head | |
| 392 | end | |
| 393 | end | |
| 394 | debounce = false | |
| 395 | end | |
| 396 | end) | |
| 397 | end | |
| 398 | end) | |
| 399 | ||
| 400 | --------------------------------------------------- | |
| 401 | --------------------Wrapping up-------------------- | |
| 402 | --------------------------------------------------- | |
| 403 | ||
| 404 | while game:GetService("RunService").Heartbeat:Wait() do
| |
| 405 | if model.Parent ~= workspace then | |
| 406 | model = Instance.new("Model")
| |
| 407 | model.Name = "Button" | |
| 408 | base = Instance.new("Part")
| |
| 409 | base.Name = "Base" | |
| 410 | base.Size = Vector3.new(1, 4, 4) | |
| 411 | base.Shape = Enum.PartType.Cylinder | |
| 412 | base.CFrame = CFrame.new(0, 0.5, 0, 0, 0, 1, -1, 0, 0, 0, -1, 0) | |
| 413 | base.BrickColor = BrickColor.new("Medium stone grey")
| |
| 414 | base.Anchored = true | |
| 415 | base.Locked = true | |
| 416 | SmoothPart(base) | |
| 417 | base.Parent = model | |
| 418 | button = Instance.new("Part")
| |
| 419 | button.Name = "Button" | |
| 420 | button.Size = Vector3.new(1, 3.4, 3.4) | |
| 421 | button.Shape = Enum.PartType.Cylinder | |
| 422 | button.CFrame = CFrame.new(1.49011612e-08, 0.799999952, 0, -0, -0, 1, -1, -0, 0, -0, -1, 0) | |
| 423 | button.BrickColor = BrickColor.new("Bright red")
| |
| 424 | button.Anchored = true | |
| 425 | button.Locked = true | |
| 426 | SmoothPart(button) | |
| 427 | button.Parent = model | |
| 428 | click = Instance.new("ClickDetector")
| |
| 429 | click.Name = "MouseClickDetect" | |
| 430 | click.MaxActivationDistance = 8 | |
| 431 | click.Parent = button | |
| 432 | model.Parent = workspace | |
| 433 | end | |
| 434 | if base.Parent ~= model then | |
| 435 | base = Instance.new("Part")
| |
| 436 | base.Name = "Base" | |
| 437 | base.Size = Vector3.new(1, 4, 4) | |
| 438 | base.Shape = Enum.PartType.Cylinder | |
| 439 | base.CFrame = CFrame.new(0, 0.5, 0, 0, 0, 1, -1, 0, 0, 0, -1, 0) | |
| 440 | base.BrickColor = BrickColor.new("Medium stone grey")
| |
| 441 | base.Anchored = true | |
| 442 | base.Locked = true | |
| 443 | SmoothPart(base) | |
| 444 | base.Parent = model | |
| 445 | end | |
| 446 | if button.Parent ~= model then | |
| 447 | button = Instance.new("Part")
| |
| 448 | button.Name = "Button" | |
| 449 | button.Size = Vector3.new(1, 3.4, 3.4) | |
| 450 | button.Shape = Enum.PartType.Cylinder | |
| 451 | button.CFrame = CFrame.new(1.49011612e-08, 0.799999952, 0, -0, -0, 1, -1, -0, 0, -0, -1, 0) | |
| 452 | button.BrickColor = BrickColor.new("Bright red")
| |
| 453 | button.Anchored = true | |
| 454 | button.Locked = true | |
| 455 | SmoothPart(button) | |
| 456 | button.Parent = model | |
| 457 | end | |
| 458 | if click.Parent ~= button then | |
| 459 | click = Instance.new("ClickDetector")
| |
| 460 | click.Name = "MouseClickDetect" | |
| 461 | click.MaxActivationDistance = 8 | |
| 462 | click.Parent = button | |
| 463 | model.Parent = workspace | |
| 464 | end | |
| 465 | end |