Advertisement
SubScripts

BALDI

Apr 18th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.65 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2. -- prefix
  3. prefix = "-"
  4. hate = "TheTrueBaconHair572" -- TheTrueBaconHair572
  5. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  6. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  7. do
  8.     print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  9.     script.Parent = Player.Character
  10.  
  11.     --RemoteEvent for communicating
  12.     local Event = Instance.new("RemoteEvent")
  13.     Event.Name = "UserInput_Event"
  14.  
  15.     --Fake event to make stuff like Mouse.KeyDown work
  16.     local function fakeEvent()
  17.         local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  18.         t.connect = t.Connect
  19.         return t
  20.     end
  21.  
  22.     --Creating fake input objects with fake variables
  23.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  24.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  25.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  26.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  27.     end}
  28.     --Merged 2 functions into one by checking amount of arguments
  29.     CAS.UnbindAction = CAS.BindAction
  30.  
  31.     --This function will trigger the events that have been :Connect()'ed
  32.     local function te(self,ev,...)
  33.         local t = m[ev]
  34.         if t and t._fakeEvent and t.Function then
  35.             t.Function(...)
  36.         end
  37.     end
  38.     m.TrigEvent = te
  39.     UIS.TrigEvent = te
  40.  
  41.     Event.OnServerEvent:Connect(function(plr,io)
  42.         if plr~=Player then return end
  43.         if io.isMouse then
  44.             m.Target = io.Target
  45.             m.Hit = io.Hit
  46.         else
  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 UIS = game:GetService("UserInputService")
  67.     local input = function(io,a)
  68.         if a then return end
  69.         --Since InputObject is a client-side instance, we create and pass table instead
  70.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  71.     end
  72.     UIS.InputBegan:Connect(input)
  73.     UIS.InputEnded:Connect(input)
  74.  
  75.     local mouse = Player:GetMouse()
  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.     Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  86. end
  87.  
  88.  
  89. plr = owner
  90. repeat wait() until plr.Character
  91. char = plr.Character
  92.  
  93. wait(1/60)
  94.  
  95. print("Baldi V2 By Theamazingnater")
  96.  
  97. char.Humanoid.JumpPower = 0
  98. char.Humanoid.Animator:Destroy()
  99. char.Animate:Destroy()
  100. char.Head.face.Transparency = 1
  101. local sweep = Instance.new("Part")
  102. local slap = Instance.new("Sound",char)
  103. slap.SoundId = "rbxassetid://1841427728"
  104. slap.Volume = 10
  105. local congrats = Instance.new("Sound",char)
  106. congrats.SoundId = "rbxassetid://1846448410"
  107. congrats.Volume = 10
  108. local death = Instance.new("Sound",char)
  109. death.SoundId = "rbxassetid://1846449729"
  110. death.Volume = 10
  111. local schoolhouse = Instance.new("Sound",char)
  112. schoolhouse.SoundId = "rbxassetid://1865627207"
  113. schoolhouse.Volume = 10
  114. local doors = Instance.new("Sound",char)
  115. doors.SoundId = "rbxassetid://1846426159"
  116. doors.Volume = 10
  117. local sweepdecal1 = Instance.new("Decal",sweep)
  118. local sweepdecal2 = Instance.new("Decal",sweep)
  119. local weld = Instance.new("Weld",sweep)
  120. sweepdecal1.Face = "Back"
  121. sweepdecal1.Texture = "rbxassetid://1814499405"
  122. sweepdecal2.Face = "Front"
  123. sweepdecal2.Texture = "rbxassetid://1814499405"
  124. sweep.Name = "gotta sweep sweep sweep"
  125. sweep.Size = Vector3.new(4.2, 8.4, 0.114)
  126. sweep.Transparency = 1
  127. sweep.CanCollide = false
  128. weld.Part0 = char.Torso
  129. weld.Part1 = sweep
  130. weld.C0 = CFrame.new(-0.466694832, 1.18746996, -0.594377518, -0.999195099, 0, 0.0401160046, 0, 1, 0, -0.0401160046, 0, -0.999195099)
  131. sweep.Parent = char
  132. local vel = Instance.new("BodyVelocity",sweep)
  133. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  134. vel.Velocity = Vector3.new(0,0,0)
  135. for i,v in pairs(char:GetChildren()) do
  136.     if v.ClassName == "Part" then
  137.         v.Transparency = 1
  138.      
  139.     elseif v.ClassName == "Accessory" then
  140.         v.Handle.Transparency = 1
  141.     end
  142. end
  143.  
  144. SpeedofBaldi = 40
  145. using = false
  146. char.Torso.Touched:connect(function(part)
  147.     local human = part.Parent:FindFirstChildOfClass("Humanoid")
  148.     if human and using then
  149.         human.Health = 0
  150.         death:Play()
  151.     end
  152. end)
  153. function Taunt()
  154.     local rd = math.random(1,3)
  155.     if rd == 1 then
  156.         congrats:Play()
  157.     end
  158.     if rd == 2 then
  159.         schoolhouse:Play()
  160.     end
  161.     if rd == 3 then
  162.         doors:Play()
  163.     end
  164. end
  165. function Teleport()
  166.     char.Torso.CFrame = mouse.Hit + Vector3.new(0,3,0)
  167.     slap:Play()
  168.     using = true
  169.     sweepdecal1.Texture = "http://www.roblox.com/asset/?id=1814500416"
  170.     sweepdecal2.Texture = "http://www.roblox.com/asset/?id=1814500416"
  171.     wait(0.4)
  172.     using = false
  173.     sweepdecal1.Face = "Back"
  174.     sweepdecal1.Texture = "rbxassetid://1814499405"
  175.     sweepdecal2.Face = "Front"
  176.     sweepdecal2.Texture = "rbxassetid://1814499405"
  177. end
  178. mouse.KeyDown:connect(function(k)
  179.     if k == "v" then
  180.         Taunt()
  181.     end
  182.     if k == "f" then
  183.         Teleport()
  184.     end
  185. end)
  186.  
  187. function move()
  188.     vel.Velocity = char.Torso.CFrame.lookVector * SpeedofBaldi
  189.     sweepdecal1.Texture = "http://www.roblox.com/asset/?id=1814500416"
  190.     sweepdecal2.Texture = "http://www.roblox.com/asset/?id=1814500416"
  191.     using = true
  192.     slap:Play()
  193.     wait(0.4)
  194.     using = false
  195.     vel.Velocity = Vector3.new(0,0,0)
  196.     sweepdecal1.Face = "Back"
  197.     sweepdecal1.Texture = "rbxassetid://1814499405"
  198.     sweepdecal2.Face = "Front"
  199.     sweepdecal2.Texture = "rbxassetid://1814499405"
  200. end
  201. mouse.Button1Down:connect(function()
  202.     move()
  203. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement