Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scripting Application;
- Two scripts which consists of more than 100+ lines of code, the first script is an Electrocardiogram (ECG) for a Hospital game of mine.
- The second one however is a Camera intro for a game of mine which i'm still developing.
- -- Scripted by Notxylq
- local TweenService = game:GetService("TweenService")
- local Status = script.Parent.Parent.Parent.On
- local L1 = script.Parent.L1
- local L2 = script.Parent.L2
- local L3 = script.Parent.Test
- local L4 = script.Parent.Test2
- local Pulse = script.Parent.Parent.Parent.Speaker.Pulse
- local NPulse = script.Parent.Parent.Parent.Speaker.NPulse
- local HasTurn = false
- local Blue = script.Parent.Blue
- local ECGVal = script.Parent.ECGValue
- local Red = script.Parent.Red
- local NorHB = script.Parent.Parent.Parent.HB
- NorHB.Value = math.clamp(NorHB.Value, 0, 220)
- local Resp = script.Parent.Parent.Parent.Resp
- local Decor = script.Parent.Parent.Decor
- local Right = script.Parent.Parent.Parent.Right
- local Left = script.Parent.Parent.Parent.Left
- local Middle = script.Parent.Parent.Parent.Middle
- local Speaker = script.Parent.Parent.Parent.Speaker
- local Pulse = Speaker.Pulse
- local NPulse = Speaker.NPulse
- local Alarm1 = Speaker.Alarm1
- local Alarm2 = Speaker.Alarm2
- local Alarm3 = Speaker.Chime
- local Flatline = script.Parent.Flatline
- local FlatlineFlash = script.Parent.FlatlineFlash
- local CardiacArrest = false
- Status:GetPropertyChangedSignal("Value"):Connect(function()
- if (Status.Value == true) then
- ECGVal.Text = NorHB.Value
- Blue.Text = "N/A"
- Red.Text = "N/A"
- print("Electrocardiogram has been activated!")
- task.wait(1)
- Flatline.Visible = true
- -- Turning the Rhythms on
- L1.Visible = true
- L2.Visible = true
- L3.Visible = true
- L4.Visible = true
- -- Audio
- Pulse:Play()
- HasTurn = true
- --
- Blue.TextTransparency = 0
- ECGVal.TextTransparency = 0
- Red.TextTransparency = 0
- for _,v in pairs(Decor:GetChildren()) do
- v.TextTransparency = 0
- end
- NorHB:GetPropertyChangedSignal("Value"):Connect(function()
- ECGVal.Text = NorHB.Value
- if NorHB.Value == math.clamp(NorHB.Value, 41, 60) or NorHB.Value == math.clamp(NorHB.Value, 61, 169) then
- --ECGVal.TextColor3 = Color3.new(0.466667, 1, 0.384314)
- local TextColorChange = TweenService:Create(ECGVal, TweenInfo.new(1), {TextColor3 = Color3.new(0.466667, 1, 0.384314)})
- TextColorChange:Play()
- elseif NorHB.Value == math.clamp(NorHB.Value, 21, 40) then
- --ECGVal.TextColor3 = Color3.new(1, 0.701961, 0)
- local TextColorChange = TweenService:Create(ECGVal, TweenInfo.new(1), {TextColor3 = Color3.new(1, 0.701961, 0)})
- TextColorChange:Play()
- elseif NorHB.Value == math.clamp(NorHB.Value, 0, 20) or NorHB.Value == math.clamp(NorHB.Value, 170, 220) then
- --ECGVal.TextColor3 = Color3.new(1, 0.184314, 0.196078)
- local TextColorChange = TweenService:Create(ECGVal, TweenInfo.new(1), {TextColor3 = Color3.new(1, 0.184314, 0.196078)})
- TextColorChange:Play()
- if NorHB.Value == 0 then
- if not CardiacArrest then
- Flatline.Visible = false
- L1.Visible = false
- L2.Visible = false
- L3.Visible = false
- L4.Visible = false
- Pulse:Stop()
- Alarm3:Play()
- task.wait(1.5)
- Alarm3:Stop()
- NPulse:Play()
- FlatlineFlash.Visible = true
- CardiacArrest = true
- end
- else
- if CardiacArrest then
- Flatline.Visible = true
- L1.Visible = true
- L2.Visible = true
- L3.Visible = true
- L4.Visible = true
- task.wait(.1)
- FlatlineFlash.Visible = false
- NPulse:Stop()
- Pulse:Play()
- CardiacArrest = false
- end
- end
- end
- end)
- elseif (Status.Value == false) and HasTurn == true then
- print("Electrocardiogram has been deactivated!")
- task.wait(1)
- -- Turning the Rhythms on
- L1.Visible = false
- L2.Visible = false
- L3.Visible = false
- L4.Visible = false
- -- Audio
- Pulse:Stop()
- HasTurn = false
- --
- Blue.TextTransparency = 1
- ECGVal.TextTransparency = 1
- Red.TextTransparency = 1
- for _,v in pairs(Decor:GetChildren()) do
- v.TextTransparency = 1
- end
- end
- end)
- Right.ClickingSHit.MouseClick:Connect(function()
- if Status.Value == true then
- if HasTurn == true then
- if NorHB.Value ~= 220 then
- NorHB.Value += 1
- else
- print("Cannot exceed tachycardia.")
- end
- --[[
- Resp.Value = 25/Resp.Value % 100
- print(Resp.Value
- ]]
- end
- end
- end)
- Left.ClickingSHit.MouseClick:Connect(function()
- if Status.Value == true then
- if HasTurn == true then
- if NorHB.Value ~= 0 then
- NorHB.Value -= 1
- else
- print("Cannot exceed Cardiac Arrest.")
- end
- end
- end
- end)
- -- Made by Notxylq
- -- // Variables \\
- local Camera = workspace:WaitForChild("Camera")
- local Cameras = workspace:WaitForChild("Cameras")
- local FrontFacedCamera = Cameras.FrontFacedCamera
- local Player = game.Players.LocalPlayer
- local Mouse = Player:GetMouse()
- local Menu = script:WaitForChild("Menu")
- local Background = Menu.Background
- local Play = Background.ImageButton
- local IntroMusic = script:WaitForChild("Vermillion")
- -- // Services \\
- local RunService = game:GetService("RunService")
- local TweenService = game:GetService("TweenService")
- local Lighting = game:GetService("Lighting")
- local Debris = game:GetService("Debris")
- -- // Setting up \\
- if not game:IsLoaded() then return end
- repeat wait() until Camera.CameraSubject ~= nil
- local function ExecuteCamera()
- IntroMusic:Play()
- for i = 0, .5, .01 do
- IntroMusic.Volume = i
- end
- local Character = Player.Character
- local Humanoid = Character.Humanoid
- local PlayerGui = Player.PlayerGui
- local tilt = .05
- local Mouse = Player:GetMouse()
- local x = math.random(-100,100)/1000
- local y = math.random(-100,100)/1000
- local z = math.random(-100,100)/1000
- Camera.CameraType = Enum.CameraType.Scriptable
- local TweenIn = TweenInfo.new(
- .5,
- Enum.EasingStyle.Quad,
- Enum.EasingDirection.InOut,
- 0,
- false,
- 0
- )
- Camera.FieldOfView = 30
- local CFrameFirst = TweenService:Create(Camera, TweenIn, {CFrame = FrontFacedCamera.CFrame})
- CFrameFirst:Play()
- CFrameFirst.Completed:Connect(function()
- task.wait(1)
- Menu.Parent = PlayerGui
- Menu.Enabled = true
- local Enable = TweenService:Create(Background, TweenInfo.new(.5), {BackgroundTransparency = .5})
- Enable:Play()
- local CameraMovement = RunService.RenderStepped:Connect(function()
- Camera.CFrame = Camera.CFrame * CFrame.Angles(
- math.rad((((Mouse.Y - Mouse.ViewSizeY / 2) / Mouse.ViewSizeY)) * -tilt),
- math.rad((((Mouse.X - Mouse.ViewSizeX / 2) / Mouse.ViewSizeX)) * -tilt),
- 0
- )
- --[[local Coroutines = coroutine.create(function()
- RunService.RenderStepped:Connect(function()
- Camera.CFrame = Camera.CFrame + Vector3.new(0, 0, 5)
- task.wait(.1)
- Camera.CFrame = Camera.CFrame + Vector3.new(0, 0, -5)
- end
- end)
- coroutine.resume(Coroutines)]]
- end)
- Play.MouseButton1Click:Connect(function()
- local Disable = TweenService:Create(Background, TweenInfo.new(1), {BackgroundTransparency = 0})
- Disable:Play()
- Play:Destroy()
- Disable.Completed:Connect(function()
- Camera.FieldOfView = 70
- Camera.CameraSubject = nil
- CameraMovement:Disconnect()
- for i = .5, 0, .01 do
- IntroMusic.Volume = i
- end
- local PlayerCam = TweenService:Create(Camera, TweenIn, {CFrame = Character.Head.CFrame})
- PlayerCam:Play()
- PlayerCam.Completed:Connect(function()
- local DisableAgain = TweenService:Create(Background, TweenInfo.new(1), {BackgroundTransparency = 1})
- DisableAgain:Play()
- Camera.CameraType = Enum.CameraType.Custom
- DisableAgain.Completed:Connect(function()
- IntroMusic:Stop()
- Menu:Destroy()
- Background:Destroy()
- Debris:AddItem(Background)
- Debris:AddItem(Menu)
- end)
- end)
- end)
- end)
- --[[local CameraShake = coroutine.create(function()
- while true do
- Camera.CFrame = Camera.CFrame * CFrame.Angles(0,y,z)
- task.wait(.1)
- end
- end)
- coroutine.resume(CameraShake)]]
- end)
- end
- spawn(function()
- ExecuteCamera()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement