Prephy

Untitled

Oct 29th, 2020
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[===[
  2.  
  3.  
  4.  
  5. Howdy there!
  6. This is Mr.Skeltal's Doot Doot Script!
  7.  
  8. Made by saltyturtle!
  9.  
  10. v3rm: https://v3rmillion.net/member.php?action=profile&uid=442267
  11.  
  12. Total Lines: 187
  13.  
  14. --]===]
  15.  
  16.  
  17. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  18. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  19. local RealPlayer = Player
  20. do print("never gonna give you up")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer end
  21.  
  22. wait(2)
  23.  
  24. function sandbox(var,func)
  25. local env = getfenv(func)
  26. local newenv = setmetatable({},{
  27. __index = function(self,k)
  28. if k=="script" then
  29. return var
  30. else
  31. return env[k]
  32. end
  33. end,
  34. })
  35. setfenv(func,newenv)
  36. return func
  37. end
  38. cors = {}
  39. mas = Instance.new("Model",game:GetService("Lighting"))
  40. Tool0 = Instance.new("Tool")
  41. Script1 = Instance.new("Script")
  42. LocalScript2 = Instance.new("LocalScript")
  43. Script3 = Instance.new("Script")
  44. RemoteFunction4 = Instance.new("RemoteFunction")
  45. Sound5 = Instance.new("Sound")
  46. Part6 = Instance.new("Part")
  47. SpecialMesh7 = Instance.new("SpecialMesh")
  48. Part8 = Instance.new("Part")
  49. ParticleEmitter9 = Instance.new("ParticleEmitter")
  50. Tool0.Name = "Trumpet"
  51. Tool0.Parent = mas
  52. Tool0.TextureId = "rbxassetid://302280633"
  53. Tool0.ToolTip = "Doot Doot"
  54. Tool0.CanBeDropped = false
  55. Script1.Parent = Tool0
  56. table.insert(cors,sandbox(Script1,function()
  57. script.Parent.Activated:connect(function()
  58. script.Parent.GripForward = Vector3.new(0, -0.985, 0.173)
  59. script.Parent.GripPos = Vector3.new(1.366, 0.356, 0.844)
  60. script.Parent.GripRight = Vector3.new(1, -0, -0)
  61. script.Parent.GripUp = Vector3.new(-0, -0.173, -0.985)
  62. script.Parent.doot:Play()
  63. wait(1)
  64. script.Parent.Part.Inner.Enabled = true
  65. wait(.3)
  66. script.Parent.Part.Inner.Enabled = false
  67. script.Parent.GripForward = Vector3.new(0, 0, -1)
  68. script.Parent.GripPos = Vector3.new(0, 0, 0)
  69. script.Parent.GripRight = Vector3.new(1, 0, 0)
  70. script.Parent.GripUp = Vector3.new(0, 1, 0)
  71. end)
  72. end))
  73. LocalScript2.Name = "ToolWeld"
  74. LocalScript2.Parent = Tool0
  75. table.insert(cors,sandbox(LocalScript2,function()
  76.  
  77. local JointsService = game:GetService('JointsService')
  78. local Tool = Tool0
  79. local Handle = Tool:WaitForChild ('Handle')
  80. local FilteringEnabled = game.Workspace.FilteringEnabled
  81.  
  82. function Weld()
  83. local function WeldParts(Part, handle)
  84. Part.Anchored = false
  85. local weld = Instance.new("ManualWeld")
  86. weld.Part0 = handle
  87. weld.Part1 = Part
  88. weld.C0 = handle.CFrame:inverse()
  89. weld.C1 = Part.CFrame:inverse()
  90. weld.Parent = JointsService
  91. end
  92.  
  93. for _,obj in pairs (Tool:GetChildren()) do
  94. if obj:IsA ("BasePart") or obj:IsA ("UnionOperation") then
  95. WeldParts (obj, Handle)
  96. end
  97. end
  98. end
  99.  
  100. Tool.Equipped:connect(function()
  101. if FilteringEnabled == false then
  102. Weld()
  103. end
  104. end)
  105. end))
  106. Script3.Name = "FilteringEnabled"
  107. Script3.Parent = LocalScript2
  108. Script3.Disabled = true
  109. table.insert(cors,sandbox(Script3,function()
  110. local JointsService = game:GetService('JointsService')
  111.  
  112. local Tool = script.Parent.Parent
  113. local Handle = Tool:WaitForChild ('Handle')
  114.  
  115. local Function = script.Parent:WaitForChild('RemoteFunction')
  116. local FilteringEnabled = game.Workspace.FilteringEnabled
  117.  
  118. function Weld()
  119. local function WeldParts(Part, handle)
  120. Part.Anchored = false
  121. local weld = Instance.new("ManualWeld")
  122. weld.Part0 = handle
  123. weld.Part1 = Part
  124. weld.C0 = handle.CFrame:inverse()
  125. weld.C1 = Part.CFrame:inverse()
  126. weld.Parent = JointsService
  127. end
  128.  
  129. for _,obj in pairs (Tool:GetChildren()) do
  130. if obj:IsA ("BasePart") or obj:IsA ("UnionOperation") then
  131. WeldParts (obj, Handle)
  132. end
  133. end
  134. end
  135.  
  136. function Function.OnServerInvoke()
  137. Weld()
  138. end
  139. end))
  140. RemoteFunction4.Parent = LocalScript2
  141. Sound5.Name = "doot"
  142. Sound5.Parent = Tool0
  143. Sound5.SoundId = "rbxassetid://280066782"
  144. Part6.Name = "Handle"
  145. Part6.Parent = Tool0
  146. Part6.Rotation = Vector3.new(120, 0, 0)
  147. Part6.Size = Vector3.new(4, 1, 2)
  148. Part6.CFrame = CFrame.new(-6, 7.125, -8.78349209, 1, 0, 0, 0, -0.500000238, -0.866025388, 0, 0.866025388, -0.500000238)
  149. Part6.BottomSurface = Enum.SurfaceType.Smooth
  150. Part6.TopSurface = Enum.SurfaceType.Smooth
  151. Part6.Position = Vector3.new(-6, 7.125, -8.78349209)
  152. Part6.Orientation = Vector3.new(60, 180, 180)
  153. SpecialMesh7.Parent = Part6
  154. SpecialMesh7.MeshId = "rbxassetid://32316679"
  155. SpecialMesh7.TextureId = "rbxassetid://32316694"
  156. SpecialMesh7.MeshType = Enum.MeshType.FileMesh
  157. Part8.Parent = Tool0
  158. Part8.Transparency = 1
  159. Part8.Rotation = Vector3.new(120, 0, 0)
  160. Part8.Size = Vector3.new(0.799999952, 0.100000024, 0.900000036)
  161. Part8.CFrame = CFrame.new(-6, 7.72990179, -9.53121567, 1, 0, 0, 0, -0.500000238, -0.866025388, 0, 0.866025388, -0.500000238)
  162. Part8.BottomSurface = Enum.SurfaceType.Smooth
  163. Part8.TopSurface = Enum.SurfaceType.Smooth
  164. Part8.Position = Vector3.new(-6, 7.72990179, -9.53121567)
  165. Part8.Orientation = Vector3.new(60, 180, 180)
  166. ParticleEmitter9.Name = "Inner"
  167. ParticleEmitter9.Parent = Part8
  168. ParticleEmitter9.Size = NumberSequence.new(0.30000001192093,0.30000001192093)
  169. ParticleEmitter9.Color = ColorSequence.new(Color3.new(0.972549, 0.972549, 0.972549),Color3.new(0.972549, 0.972549, 0.972549))
  170. ParticleEmitter9.Enabled = false
  171. ParticleEmitter9.LightEmission = 0.40000000596046
  172. ParticleEmitter9.Texture = "rbxassetid://302280633"
  173. ParticleEmitter9.ZOffset = 0.5
  174. ParticleEmitter9.Lifetime = NumberRange.new(0.10000000149012, 0.10000000149012)
  175. ParticleEmitter9.Rate = 1000
  176. ParticleEmitter9.Speed = NumberRange.new(8, 8)
  177. ParticleEmitter9.Color = ColorSequence.new(Color3.new(0.972549, 0.972549, 0.972549),Color3.new(0.972549, 0.972549, 0.972549))
  178. Tool0.Parent = game.Players.LocalPlayer.Backpack
  179. for i,v in pairs(mas:GetChildren()) do
  180. v.Parent = workspace
  181. pcall(function() v:MakeJoints() end)
  182. end
  183. mas:Destroy()
  184. for i,v in pairs(cors) do
  185. spawn(function()
  186. pcall(v)
  187. end)
  188. end
Add Comment
Please, Sign In to add comment