Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I fix this Main Frame, Jumpscare?

Asked by 1 year ago

local chr = script.Parent.Parent.Parent.Parent.Parent.Character local debounce = true

script.Parent.MouseButton1Click:Connect(function() if debounce == true then debounce = false script.Parent.Visible = false script.Parent.Parent.Stun.Visible = false script.Parent.Parent.Parent.Parent.CrouchGui.Crouch.Visible = false script.Parent.Parent.Parent.Parent.CrouchGui.Crouch.Scripts.LocalScript.Disabled = true script.Parent.Parent.Parent.Parent.CrouchGui.Crouch.Scripts.Visible.Disabled = true script.Parent.Parent.Parent.Parent.ClickButton.Emotes.Visible = false if script.Parent.Parent.Parent.Parent.ClickButton.Emotes.TextLabel.Text == "CLOSE" then script.Parent.Parent.Parent.Parent.ClickButton.EmotesFrame.Visible = false end script.Parent.Parent.Parent.menuclick:Play() if chr.PrimaryPart:FindFirstChild("Ambience") then chr.PrimaryPart.Ambience:Stop() end chr.PrimaryPart.Anchored = true if not chr:FindFirstChild("PigDistorted") then if chr.PrimaryPart:FindFirstChild("Jumpscare") then chr.PrimaryPart.Jumpscare:Play() end if chr.PrimaryPart:FindFirstChild("GeorgieJumpscare") then chr.PrimaryPart.GeorgieJumpscare:Play() end end if chr.PrimaryPart:FindFirstChild("FootStep") then chr.PrimaryPart.FootStep.Volume = 0 end if chr:FindFirstChild("Swing") then chr.Humanoid:LoadAnimation(chr.Swing):Play() end if chr:FindFirstChild("HitTimer") then wait(chr.HitTimer.Value) else wait(0.8) end if chr.PrimaryPart:FindFirstChild("HitSound") then if chr.PrimaryPart:FindFirstChild("GeorgieHitSound") then chr.PrimaryPart.GeorgieHitSound:Play() end if not chr:FindFirstChild("Zizzy") then chr.PrimaryPart.HitSound:Play() else chr.PrimaryPart.HitSound:Play() wait(.25) chr.PrimaryPart.HitSound2:Play() wait(.25) chr.PrimaryPart.HitSound3:Play() end if chr:FindFirstChild("PigDistorted") then if chr.PrimaryPart:FindFirstChild("Jumpscare") then chr.PrimaryPart.Jumpscare:Play() end end if chr:FindFirstChild("Particles") then chr.Particles.Embers.Enabled = true chr.Particles.Flash.Enabled = true chr.Particles.sus.Enabled = true chr.Particles.sus2.Enabled = true wait(0.2) chr.Particles.Embers.Enabled = false chr.Particles.Flash.Enabled = false chr.Particles.sus.Enabled = false chr.Particles.sus2.Enabled = false end end if chr:FindFirstChild("Particles") then chr.Particles.Embers.Enabled = true chr.Particles.Flash.Enabled = true chr.Particles.sus.Enabled = true chr.Particles.sus2.Enabled = true wait(0.2) chr.Particles.Embers.Enabled = false chr.Particles.Flash.Enabled = false chr.Particles.sus.Enabled = false chr.Particles.sus2.Enabled = false end end wait(2) if chr.PrimaryPart:FindFirstChild("Ambience") then chr.PrimaryPart.Ambience:Play() end if chr.PrimaryPart:FindFirstChild("FootStep") then chr.PrimaryPart.FootStep.Volume = 2 end chr.PrimaryPart.Anchored = false script.Parent.Visible = true if chr:FindFirstChild("Stun") then script.Parent.Parent.Stun.Visible = true end script.Parent.Parent.Parent.Parent.CrouchGui.Crouch.Visible = true script.Parent.Parent.Parent.Parent.CrouchGui.Crouch.Scripts.LocalScript.Disabled = false script.Parent.Parent.Parent.Parent.CrouchGui.Crouch.Scripts.Visible.Disabled = false script.Parent.Parent.Parent.Parent.ClickButton.Emotes.Visible = true if script.Parent.Parent.Parent.Parent.ClickButton.Emotes.TextLabel.Text == "CLOSE" then script.Parent.Parent.Parent.Parent.ClickButton.EmotesFrame.Visible = true end debounce = true end end)

0
Can you add this in lua code? My brain got oof AgentViteC 58 — 1y

Answer this question