Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- repeat wait()
- until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Head") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
- local mouse = game.Players.LocalPlayer:GetMouse()
- repeat wait() until mouse
- local plr = game.Players.LocalPlayer
- local torso = plr.Character.Head
- local flying = false
- local deb = true
- local ctrl = {f = 0, b = 0, l = 0, r = 0}
- local lastctrl = {f = 0, b = 0, l = 0, r = 0}
- local maxspeed = 50
- local speed = 0
- function Fly()
- local bg = Instance.new("BodyGyro", torso)
- bg.P = 9e4
- bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
- bg.cframe = torso.CFrame
- local bv = Instance.new("BodyVelocity", torso)
- bv.velocity = Vector3.new(0,0.1,0)
- bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
- repeat wait()
- plr.Character.Humanoid.PlatformStand = true
- if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
- speed = speed+.5+(speed/maxspeed)
- if speed > maxspeed then
- speed = maxspeed
- end
- elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
- speed = speed-1
- if speed < 0 then
- speed = 0
- end
- end
- if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
- bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
- lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
- elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
- bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
- else
- bv.velocity = Vector3.new(0,0.1,0)
- end
- bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
- until not flying
- ctrl = {f = 0, b = 0, l = 0, r = 0}
- lastctrl = {f = 0, b = 0, l = 0, r = 0}
- speed = 0
- bg:Destroy()
- bv:Destroy()
- plr.Character.Humanoid.PlatformStand = false
- end
- mouse.KeyDown:connect(function(key)
- if key:lower() == "e" then
- if flying then flying = false
- else
- flying = true
- Fly()
- end
- elseif key:lower() == "w" then
- ctrl.f = 1
- elseif key:lower() == "s" then
- ctrl.b = -1
- elseif key:lower() == "a" then
- ctrl.l = -1
- elseif key:lower() == "d" then
- ctrl.r = 1
- end
- end)
- mouse.KeyUp:connect(function(key)
- if key:lower() == "w" then
- ctrl.f = 0
- elseif key:lower() == "s" then
- ctrl.b = 0
- elseif key:lower() == "a" then
- ctrl.l = 0
- elseif key:lower() == "d" then
- ctrl.r = 0
- end
- end)
- Fly()
- plr = game.Players.LocalPlayer
- repeat wait() until plr.Character
- char = plr.Character
- wait(1/60)
- print("Principal edit by Emmet0421 -> 'RIP Hastebin.' ")
- print("Original Baldi V2 script created by Theamazingnater")
- char.Humanoid.JumpPower = 100
- char.Humanoid.Animator:Destroy()
- char.Animate:Destroy()
- char.Head.face.Transparency = 1
- local sweep = Instance.new("Part")
- local slap = Instance.new("Sound",char)
- slap.SoundId = "rbxassetid://1953631953"
- slap.Volume = 20
- local congrats = Instance.new("Sound",char)
- congrats.SoundId = "rbxassetid://1923529022"
- congrats.Volume = 20
- local death = Instance.new("Sound",char)
- death.SoundId = "rbxassetid://1923953264"
- death.Volume = 20
- local schoolhouse = Instance.new("Sound",char)
- schoolhouse.SoundId = "rbxassetid://1923529022"
- schoolhouse.Volume = 20
- local doors = Instance.new("Sound",char)
- doors.SoundId = "rbxassetid://1923529022"
- doors.Volume = 20
- local sweepdecal1 = Instance.new("Decal",sweep)
- local sweepdecal2 = Instance.new("Decal",sweep)
- local weld = Instance.new("Weld",sweep)
- sweepdecal1.Face = "Back"
- sweepdecal1.Texture = "rbxassetid://1923831055"
- sweepdecal2.Face = "Front"
- sweepdecal2.Texture = "rbxassetid://1923831055"
- sweep.Name = "gotta sweep sweep sweep"
- sweep.Size = Vector3.new(4.2, 8.4, 0.114)
- sweep.Transparency = 1
- sweep.CanCollide = false
- weld.Part0 = char.Torso
- weld.Part1 = sweep
- weld.C0 = CFrame.new(-0.466694832, 1.18746996, -0.594377518, -0.999195099, 0, 0.0401160046, 0, 1, 0, -0.0401160046, 0, -0.999195099)
- sweep.Parent = char
- local vel = Instance.new("BodyVelocity",sweep)
- vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- vel.Velocity = Vector3.new(0,0,0)
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Part" then
- v.Transparency = 1
- elseif v.ClassName == "Accessory" then
- v.Handle.Transparency = 1
- end
- end
- mouse = plr:GetMouse()
- SpeedofBaldi = 80
- using = false
- char.Torso.Touched:connect(function(part)
- local human = part.Parent:FindFirstChildOfClass("Humanoid")
- if human and using then
- human.Health = 0
- death:Play()
- end
- end)
- function Taunt()
- local rd = math.random(1,3)
- if rd == 1 then
- congrats:Play()
- end
- if rd == 2 then
- schoolhouse:Play()
- end
- if rd == 3 then
- doors:Play()
- end
- end
- function Teleport()
- char.Torso.CFrame = mouse.Hit + Vector3.new(0,3,0)
- slap:Play()
- using = true
- sweepdecal1.Texture = "http://www.roblox.com/asset/?id=1923831055"
- sweepdecal2.Texture = "http://www.roblox.com/asset/?id=1923831055"
- wait(0.4)
- using = false
- sweepdecal1.Face = "Back"
- sweepdecal1.Texture = "rbxassetid://1923831055"
- sweepdecal2.Face = "Front"
- sweepdecal2.Texture = "rbxassetid://1923831055"
- end
- mouse.KeyDown:connect(function(k)
- if k == "v" then
- Taunt()
- end
- if k == "f" then
- Teleport()
- end
- end)
- function move()
- vel.Velocity = char.Torso.CFrame.lookVector * SpeedofBaldi
- sweepdecal1.Texture = "http://www.roblox.com/asset/?id=1923831055"
- sweepdecal2.Texture = "http://www.roblox.com/asset/?id=1923831055"
- using = true
- slap:Play()
- wait(0.4)
- using = false
- vel.Velocity = Vector3.new(0,0,0)
- sweepdecal1.Face = "Back"
- sweepdecal1.Texture = "rbxassetid://1923831055"
- sweepdecal2.Face = "Front"
- sweepdecal2.Texture = "rbxassetid://1923831055"
- end
- mouse.Button1Down:connect(function()
- move()
- end)
Add Comment
Please, Sign In to add comment