Advertisement
Prephy

studio head

Apr 15th, 2021 (edited)
540
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 12.20 KB | None | 0 0
  1. wait()
  2. player = owner
  3. name=nil
  4. oldpos = nil
  5. NAme=player.Name
  6. local lerp=.3
  7.  
  8. function stuff()
  9.    
  10.     NLS([[
  11.    
  12.    
  13.     player = game:GetService("Players").LocalPlayer
  14. mouse = player:GetMouse()
  15. camstuff = false
  16. forward=false
  17. backward=false
  18. left=false
  19. right=false
  20. up=false
  21. down=false
  22. shooting=false
  23. Speed=3
  24. rem_1 = player.Backpack:waitForChild("1")
  25. camrem = player.Backpack:waitForChild("fgds")
  26. rem_2 = player.Backpack:waitForChild("2")
  27. rem_3 = player.Backpack:waitForChild("3")
  28. rem_4 = player.Backpack:waitForChild("4")
  29. rem_5 = player.Backpack:waitForChild("5")
  30. rem_6 = player.Backpack:waitForChild("6")
  31. rem_7 = player.Backpack:waitForChild("7")
  32. rem_8 = player.Backpack:waitForChild("8")
  33. rem_9 = player.Backpack:waitForChild("9")
  34. rem_10 = player.Backpack:waitForChild("10")
  35. rem_11 = player.Backpack:waitForChild("11")
  36. rem_12 = player.Backpack:waitForChild("12")
  37.  
  38. mouse.KeyDown:Connect(function(kk)
  39.     kk:lower()
  40.     if kk=="k" then
  41.         rem_10:FireServer('reset')
  42.     end
  43. end)
  44.  
  45.  
  46.  
  47. mouse.KeyDown:Connect(function(kk)
  48.     kk:lower()
  49.     if kk=="w" then
  50.         camstuff=false
  51.         forward=true
  52.     end
  53. end)
  54.  
  55. mouse.KeyUp:Connect(function(kk)
  56.     kk:lower()
  57.     if kk=="w" then
  58.         forward=false
  59.     end
  60. end)
  61.  
  62. mouse.KeyDown:Connect(function(kk)
  63.     kk:lower()
  64.     if kk=="s" then
  65.         camstuff=false
  66.         backward=true
  67.     end
  68. end)
  69.  
  70. mouse.KeyUp:Connect(function(kk)
  71.     kk:lower()
  72.     if kk=="s" then
  73.         backward=false
  74.     end
  75. end)
  76.  
  77. mouse.KeyDown:Connect(function(kk)
  78.     kk:lower()
  79.     if kk=="a" then
  80.         camstuff=false
  81.         left=true
  82.     end
  83. end)
  84.  
  85. mouse.KeyUp:Connect(function(kk)
  86.     kk:lower()
  87.     if kk=="a" then
  88.         left=false
  89.     end
  90. end)
  91.  
  92. mouse.KeyDown:Connect(function(kk)
  93.     kk:lower()
  94.     if kk=="d" then
  95.         camstuff=false
  96.     right=true
  97.     end
  98. end)
  99.  
  100. mouse.KeyUp:Connect(function(kk)
  101.     kk:lower()
  102.     if kk=="d" then
  103.         right=false
  104.     end
  105. end)
  106.  
  107. mouse.KeyDown:Connect(function(kk)
  108.     kk:lower()
  109.     if kk=="p" then
  110.         camstuff=false
  111.         rem_5:FireServer("reset")
  112.     end
  113. end)
  114.  
  115. mouse.KeyDown:Connect(function(kk)
  116.     kk:lower()
  117.     if kk=="z" then
  118.         camstuff=false
  119.         rem_6:FireServer(mouse.Hit)
  120.     end
  121. end)
  122.  
  123.  
  124. mouse.KeyDown:Connect(function(kk)
  125.     kk:lower()
  126.     if kk=="e" then
  127.         camstuff=false
  128.         up=true
  129.     end
  130. end)
  131.  
  132. mouse.KeyUp:Connect(function(kk)
  133.     kk:lower()
  134.     if kk=="e" then
  135.     up=false
  136.     end
  137. end)
  138.  
  139. mouse.KeyDown:Connect(function(kk)
  140.     kk:lower()
  141.     if kk=="q" then
  142.         camstuff=false
  143.     down=true
  144.     end
  145. end)
  146.  
  147. mouse.KeyUp:Connect(function(kk)
  148.     kk:lower()
  149.     if kk=="q" then
  150.     down=false
  151.     end
  152. end)
  153.  
  154. mouse.KeyDown:Connect(function(kk)
  155.     kk:lower()
  156.     if kk=="l" then
  157.         if camstuff==false then
  158.             camstuff=true
  159.         else
  160.             camstuff=false
  161.             end
  162.     end
  163. end)
  164.  
  165.  
  166. mouse.Button1Down:Connect(function(kk)
  167.     shooting=true
  168.    
  169. end)
  170.  
  171. mouse.Button1Up:Connect(function(kk)
  172.     shooting=false
  173.  
  174. end)
  175.  
  176.  
  177.  
  178.  
  179. run = game:GetService("RunService")
  180. sec=2
  181. run.Heartbeat:Connect(function(ok)
  182. local   WHAT=sec * ok
  183.     local   part = workspace.Terrain:FindFirstChild(player.Name)
  184.     if part then
  185.         local cam = workspace.CurrentCamera
  186.         local camOrientation = cam.CFrame-cam.CFrame.Position
  187.         cam.CameraSubject=part
  188.         cam.HeadLocked=true
  189.         if camstuff==true then --CoordinateFrame
  190.             camrem:FireServer(CFrame.new(part.Position)*camOrientation)
  191.         end
  192.         if forward==true then
  193.             rem_1:FireServer(CFrame.new(part.Position)*camOrientation*CFrame.new(0,0,-Speed))
  194.         end
  195.         if backward==true then
  196.             rem_2:FireServer(CFrame.new(part.Position)*camOrientation*CFrame.new(0,0,Speed))
  197.         end
  198.         if left==true then
  199.             rem_3:FireServer(CFrame.new(part.Position)*camOrientation*CFrame.new(-Speed,0,0))
  200.         end
  201.         if right==true then
  202.             rem_4:FireServer(CFrame.new(part.Position)*camOrientation*CFrame.new(Speed,0,0))
  203.         end
  204.         if up==true then
  205.             rem_7:FireServer(CFrame.new(part.Position)*camOrientation*CFrame.new(0,Speed,0))
  206.         end
  207.         if down==true then
  208.             rem_8:FireServer(CFrame.new(part.Position)*camOrientation*CFrame.new(0,-Speed,0))
  209.         end
  210.         if shooting==true then
  211.             camstuff=true
  212.             rem_11:FireServer(mouse.Hit)
  213.             rem_12:FireServer(mouse.Target)
  214.  
  215.         end
  216.     end
  217. end)
  218.    
  219.    
  220.    
  221.    
  222.     ]],player.Backpack)
  223. end
  224.  
  225.  
  226. function Kill(die)
  227.     die:BreakJoints()
  228.     for i,g in pairs(die:GetDescendants()) do
  229.         if g:IsA("BasePart") then
  230.             local dies = Instance.new("Sound",g) dies.SoundId="rbxassetid://340722848" dies.PlayOnRemove=true dies.Volume=10
  231.             local dead= Instance.new("Part",workspace) dead.CFrame = g.CFrame dead.Size=g.Size dead.Color=Color3.new(0.666667, 0, 0) dead.Material=Enum.Material.Glass dead.Transparency=.3 dead.CanCollide=false dead.Name = math.random()..g.Name
  232.             local effect = Instance.new("Explosion",workspace) effect.Position=dead.Position effect.Visible=false
  233.             local mesh = g:FindFirstChildOfClass("SpecialMesh")
  234.             if mesh then
  235.                 mesh.Parent=dead
  236.             end
  237.             g:Destroy()
  238.         end
  239.     end
  240. end
  241.  
  242. local run = game:GetService("RunService")
  243. see=2
  244. run.Heartbeat:Connect(function(ok)
  245.     local haha = see * ok
  246.     local pla = game.Players:FindFirstChild(player.Name)
  247.     if pla then
  248.     local cha = workspace:FindFirstChild(player.Name)
  249.     if cha then
  250.         char()
  251.     end
  252.    
  253.     local rem = player.Backpack:FindFirstChild('fgds')
  254.     if rem then
  255.        
  256.     else
  257.         char()
  258.     end
  259.     local rem1 = player.Backpack:FindFirstChild('1')
  260.     if rem1 then
  261.  
  262.     else
  263.         char()
  264.     end
  265.     local rem2 = player.Backpack:FindFirstChild('2')
  266.     if rem2 then
  267.  
  268.     else
  269.         char()
  270.     end
  271.     local rem3 = player.Backpack:FindFirstChild('3')
  272.     if rem3 then
  273.  
  274.     else
  275.         char()
  276.     end
  277.     local rem4 = player.Backpack:FindFirstChild('4')
  278.     if rem4 then
  279.  
  280.     else
  281.         char()
  282.     end
  283.     local rem5 = player.Backpack:FindFirstChild('5')
  284.     if rem5 then
  285.  
  286.     else
  287.         char()
  288.         end
  289.        
  290.         local rem6 = player.Backpack:FindFirstChild('6')
  291.         if rem6 then
  292.  
  293.         else
  294.             char()
  295.         end
  296.        
  297.         local rem7 = player.Backpack:FindFirstChild('7')
  298.         if rem7 then
  299.  
  300.         else
  301.             char()
  302.         end
  303.        
  304.         local rem8 = player.Backpack:FindFirstChild('8')
  305.         if rem8 then
  306.  
  307.         else
  308.             char()
  309.         end
  310.        
  311.         local rem9 = player.Backpack:FindFirstChild('9')
  312.         if rem9 then
  313.  
  314.         else
  315.             char()
  316.         end
  317.         local rem10 = player.Backpack:FindFirstChild('10')
  318.         if rem10 then
  319.  
  320.         else
  321.             char()
  322.         end
  323.     end
  324. end)
  325. function remotes()
  326.     local rem_1 = Instance.new("RemoteEvent",player.Backpack) rem_1.Name="1"
  327.     local camrem = Instance.new("RemoteEvent",player.Backpack) camrem.Name="fgds"
  328.     local rem_2 = Instance.new("RemoteEvent",player.Backpack) rem_2.Name="2"
  329.     local rem_3 = Instance.new("RemoteEvent",player.Backpack) rem_3.Name="3"
  330.     local rem_4 = Instance.new("RemoteEvent",player.Backpack) rem_4.Name="4"
  331.     local rem_5 = Instance.new("RemoteEvent",player.Backpack) rem_5.Name="5"
  332.     local rem_6 = Instance.new("RemoteEvent",player.Backpack) rem_6.Name="6"
  333.     local rem_7 = Instance.new("RemoteEvent",player.Backpack) rem_7.Name="7"
  334.     local rem_8 = Instance.new("RemoteEvent",player.Backpack) rem_8.Name="8"
  335.     local rem_9 = Instance.new("RemoteEvent",player.Backpack) rem_9.Name="9"
  336.     local rem_10 = Instance.new("RemoteEvent",player.Backpack) rem_10.Name="10"
  337.     local rem_11 = Instance.new("RemoteEvent",player.Backpack) rem_11.Name="11"
  338.     local rem_12 = Instance.new("RemoteEvent",player.Backpack) rem_12.Name="12"
  339.  
  340.    
  341.     camrem.OnServerEvent:Connect(function(pl, Position)
  342.         local HHa = workspace.Terrain:FindFirstChild(NAme)
  343.         if HHa then
  344.             HHa.CFrame=Position
  345.         end
  346.  
  347.  
  348.     end)
  349.    
  350.    
  351.     rem_1.OnServerEvent:Connect(function(plr, FORWARD)
  352.         local HHa = workspace.Terrain:FindFirstChild(NAme)
  353.         if HHa then
  354.         HHa.CFrame=HHa.CFrame:Lerp(FORWARD,lerp)  
  355.         end
  356.  
  357.     end)
  358.    
  359.    
  360.    
  361.     rem_2.OnServerEvent:Connect(function(plr, BACKWARD)
  362.         local HHa = workspace.Terrain:FindFirstChild(NAme)
  363.         if HHa then
  364.   HHa.CFrame=HHa.CFrame:Lerp(BACKWARD,lerp)  
  365.         end
  366.     end)
  367.    
  368.    
  369.    
  370.     rem_3.OnServerEvent:Connect(function(plr, LEFT)
  371.         local HHa = workspace.Terrain:FindFirstChild(NAme)
  372.         if HHa then
  373.         HHa.CFrame=HHa.CFrame:Lerp(LEFT,lerp)  
  374.         end
  375.     end)
  376.    
  377.     rem_4.OnServerEvent:Connect(function(plr, RIGHT)
  378.         local HHa = workspace.Terrain:FindFirstChild(NAme)
  379.         if HHa then
  380.         HHa.CFrame=HHa.CFrame:Lerp(RIGHT,lerp)  
  381.         end
  382.     end)
  383.  
  384.     rem_5.OnServerEvent:Connect(function(plr, YES)
  385.         local pla = workspace.Terrain:FindFirstChild(player.Name)
  386.         if pla then
  387.             pla:Destroy()
  388.         else
  389.             refit()
  390.         end
  391.  
  392.     end)
  393.    
  394.     rem_6.OnServerEvent:Connect(function(plr, pos)
  395.        
  396.         local HHH = workspace.Terrain:FindFirstChild(NAme)
  397.         if HHH then
  398.             HHH.CFrame=pos + Vector3.new(0,3,0)
  399.         end
  400.  
  401.     end)
  402.    
  403.     rem_7.OnServerEvent:Connect(function(plr, UP)
  404.         local HHa = workspace.Terrain:FindFirstChild(NAme)
  405.         if HHa then
  406.         HHa.CFrame=HHa.CFrame:Lerp(UP,lerp)  
  407.         end
  408.     end)
  409.    
  410.     rem_8.OnServerEvent:Connect(function(plr, DOWN)
  411.         local HHa = workspace.Terrain:FindFirstChild(NAme)
  412.         if HHa then
  413.         HHa.CFrame=HHa.CFrame:Lerp(DOWN,lerp)  
  414.         end
  415.     end)
  416.    
  417.    
  418.     rem_9.OnServerEvent:Connect(function(plr, lookvector)
  419.         local HHa = workspace.Terrain:FindFirstChild(NAme)
  420.         if HHa then
  421.         HHa.CFrame=HHa.CFrame:Lerp(lookvector,lerp)  
  422.         end
  423.     end)
  424.    
  425.     rem_10.OnServerEvent:Connect(function(plr, newpos)
  426.         player:LoadCharacter()  local hum = player.Character:FindFirstChild("HumanoidRootPart")
  427.         if hum then
  428.             oldpos=hum.CFrame
  429.         end
  430.         local HHa = workspace.Terrain:FindFirstChild(NAme)
  431.         if HHa then
  432.             HHa.CFrame=oldpos
  433.    
  434.         end
  435.  
  436.     end)
  437.    
  438.     rem_11.OnServerEvent:Connect(function(plr, target)
  439.        
  440.         local HHa = workspace.Terrain:FindFirstChild(NAme)
  441.         if HHa then
  442.         local coll = ColorSequence.new(Color3.new(0.666667, 0, 0))
  443. local sound = HHa:FindFirstChildOfClass("Sound")
  444. if sound then
  445. sound:Play()
  446. else
  447.         local shot = Instance.new("Sound",HHa) shot.SoundId="rbxassetid://904440937" shot.Volume=9
  448. end
  449.         local att = Instance.new("Attachment",workspace.Terrain) att.Position = HHa.Position
  450.  
  451.         local att2 = Instance.new("Attachment",workspace.Terrain) att2.Position = target.Position
  452.         local beam = Instance.new("Beam",workspace.Terrain) beam.Enabled=true beam.Color = coll
  453.             beam.FaceCamera=true beam.Attachment0 = att beam.Attachment1=att2
  454.            
  455.         wait(.1)
  456.             beam:Destroy() att2:Destroy() att:Destroy()
  457.            
  458.            
  459.             end
  460.     end)
  461.    
  462.     rem_12.OnServerEvent:Connect(function(plr, target)
  463.         if target.Parent.ClassName == "Model" then
  464.             Kill(target.Parent)
  465.         elseif target.Parent.Parent.ClassName == "Model" then
  466.             Kill(target.Parent.Parent)
  467.         end
  468.  
  469.     end)
  470.  
  471. end
  472.  
  473. function char()
  474.     local pla = game.Players:FindFirstChild(player.Name)
  475.     if pla then
  476.     name=string.char(math.random(1,150))..string.char(math.random(1,150))..string.char(math.random(1,150))..string.char(math.random(1,150))..string.char(math.random(1,150))
  477.     local mod = Instance.new("Model") mod.Name=name mod.Parent=nil
  478.     player.Character=mod
  479.     stuff()
  480.     remotes()
  481.    
  482.     end
  483.    
  484. end
  485.  
  486.  
  487. function refit()
  488.    
  489.     local part = Instance.new("Part",workspace.Terrain) part.Name=NAme part.Anchored=true part.CanCollide=true part.CFrame=oldpos part.Size=Vector3.new(2,1,1)
  490.     local selected = Instance.new("SelectionBox",part) selected.Adornee=part selected.LineThickness=0.015 selected.Color=BrickColor.new("Cyan") selected.Name="lines"
  491.     local rotate = Instance.new("ArcHandles",part) rotate.Adornee=part rotate.Name="selected"
  492.     local face = Instance.new("Decal",part) face.Name='face' face.Texture='rbxasset://textures/face.png'
  493.    
  494.    
  495.    
  496. end
  497.  
  498. game.Players.PlayerAdded:Connect(function(plr)
  499.     if plr.Name==player.Name then
  500.         player=plr
  501.         wait(.2)
  502.         char()
  503.     end
  504. end)
  505.  
  506.  
  507. if player.Character then
  508.     local hum = player.Character:FindFirstChild("HumanoidRootPart")
  509.     if hum then
  510.         oldpos=hum.CFrame
  511.         char()
  512.     else
  513.         print("too bad")
  514.     end
  515. end
  516.  
  517.  
  518.  
  519. second = 1
  520. run.Heartbeat:Connect(function(HM)
  521.     local what = second * HM
  522.     local HH = workspace.Terrain:FindFirstChild(NAme)
  523.     if HH then
  524.        
  525.         local selecte = HH:FindFirstChildOfClass('SelectionBox')
  526.         if selecte then
  527.            
  528.         else
  529.             local selected = Instance.new("SelectionBox",HH) selected.Adornee=HH selected.LineThickness=0.015 selected.Color=BrickColor.new("Cyan") selected.Name="lines"
  530.  
  531.         end
  532.        
  533.         local rot = HH:FindFirstChildOfClass("ArcHandles")
  534.         if rot then
  535.         else
  536.             local rotate = Instance.new("ArcHandles",HH) rotate.Adornee=HH rotate.Name="selected"
  537.  
  538.            
  539.         end
  540.        
  541.         local fac = HH:FindFirstChildOfClass("Decal")
  542.         if fac then
  543.         else
  544.             local face = Instance.new("Decal",HH) face.Name='face' face.Texture='rbxasset://textures/face.png'
  545.  
  546.  
  547.         end
  548.        
  549.         HH.Anchored=true
  550.         oldpos=HH.CFrame
  551.        
  552.        
  553.     else
  554.         refit()
  555.     end
  556.     end)
  557.  
  558.  
  559.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement