Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NLS([[
- script.Parent = game.Players.LocalPlayer.PlayerScripts
- local locked = false
- local cam = workspace.CurrentCamera
- cam.CameraType = Enum.CameraType.Scriptable
- local runService = game:GetService("RunService")
- local userInputService = game:GetService("UserInputService")
- local deltaa = Vector2.new(0,0)
- local zoom = 10
- local sens = 0.0125
- local scale = 1
- local firstperson = false
- local zoomed = false
- repeat wait() until game.Players.LocalPlayer.Character:FindFirstChild("Head") ~= nil and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") ~= nil
- local subtraction = game.Players.LocalPlayer.Character.Head.Position.Y - game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y
- local Search
- function Search(Parent, Function)
- for Index, Object in next, Parent:children() do
- pcall(function()
- Function(Object)
- end)
- Search(Object, Function)
- end
- end
- function showchar(char)
- coroutine.resume(coroutine.create(function()
- local Character = char
- Search(Character, function(Object)
- if (Object:IsA'BasePart' or Object:IsA'Decal') and Object.Name ~='HumanoidRootPart' then
- Object.Transparency = 0
- end
- end)
- end))
- end
- function hidechar(char)
- coroutine.resume(coroutine.create(function()
- local Character = char
- Search(Character, function(Object)
- if (Object:IsA'BasePart' or Object:IsA'Decal') and Object.Name ~='HumanoidRootPart' then
- Object.Transparency = 1
- end
- end)
- end))
- end
- coroutine.resume(coroutine.create(function()
- while wait() do
- if game.Players.LocalPlayer.Character:FindFirstChild("Head") ~= nil and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") ~= nil then
- if scale ~= game.Players.LocalPlayer.Character.Head.Size.Y then
- scale = game.Players.LocalPlayer.Character.Head.Size.Y
- subtraction = game.Players.LocalPlayer.Character.Head.Position.Y - game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y
- end
- end
- end
- end))
- local function OnRenderStep()
- if game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") ~= nil then
- if zoom > 0.65 then
- local delta = userInputService:GetMouseDelta()
- cam.CFrame = CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(0,subtraction,0))
- delta = Vector2.new((delta.X*sens),(delta.Y*sens))
- deltaa = deltaa + (delta*Vector2.new(-1,-1))
- cam.CFrame = cam.CFrame * CFrame.Angles(0,deltaa.X,0) * CFrame.Angles(deltaa.Y,0,0) * CFrame.new(0,0,(zoom * (scale/1)))
- else
- local delta = userInputService:GetMouseDelta()
- cam.CFrame = CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(0,subtraction,0))
- delta = Vector2.new((delta.X*sens),(delta.Y*sens))
- deltaa = deltaa + (delta*Vector2.new(-1,-1))
- cam.CFrame = cam.CFrame * CFrame.Angles(0,deltaa.X,0) * CFrame.Angles(deltaa.Y,0,0)
- end
- end
- end
- runService:BindToRenderStep("MeasureMouseMovement", Enum.RenderPriority.Input.Value, OnRenderStep)
- userInputService.InputBegan:Connect(function(input, gameProcessed)
- if input.UserInputType == Enum.UserInputType.MouseButton2 and not gameProcessed and zoom > 0.65 then
- userInputService.MouseBehavior = Enum.MouseBehavior.LockCurrentPosition
- elseif input.UserInputType == Enum.UserInputType.Keyboard and not gameProcessed then
- if input.KeyCode == Enum.KeyCode.Z and firstperson then
- workspace.CurrentCamera.FieldOfView = 10
- sens = 0.0125/10
- zoomed = true
- end
- end
- end)
- userInputService.InputEnded:Connect(function(input, gameProcessed)
- if input.UserInputType == Enum.UserInputType.MouseButton2 and not gameProcessed and zoom > 0.65 then
- userInputService.MouseBehavior = Enum.MouseBehavior.Default
- elseif input.UserInputType == Enum.UserInputType.Keyboard and not gameProcessed then
- if input.KeyCode == Enum.KeyCode.Z and zoomed then
- workspace.CurrentCamera.FieldOfView = 70
- sens = 0.0125
- zoomed = false
- end
- end
- end)
- userInputService.InputChanged:Connect(function(input, gameProcessed)
- if input.UserInputType == Enum.UserInputType.MouseWheel then
- if not zoomed then
- if zoom + (input.Position.Z * -1 * (zoom/7)) >= 0 then
- if zoom > 0.65 or input.Position.Z == -1 then
- zoom = zoom + input.Position.Z * -1 * (zoom/7)
- if zoom <= 0.65 and game.Players.LocalPlayer.Character:FindFirstChild("Head").Transparency ~= 1 then
- hidechar(game.Players.LocalPlayer.Character)
- userInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
- firstperson = true
- elseif game.Players.LocalPlayer.Character:FindFirstChild("Head").Transparency ~= 0 then
- showchar(game.Players.LocalPlayer.Character)
- userInputService.MouseBehavior = Enum.MouseBehavior.Default
- firstperson = false
- end
- end
- end
- else
- workspace.CurrentCamera.FieldOfView = workspace.CurrentCamera.FieldOfView + ((input.Position.Z*-1)/2)
- sens = (workspace.CurrentCamera.FieldOfView/10) * (0.0125/10)
- end
- end
- end)
- wait(1.1)
- local plr = game.Players.LocalPlayer
- local body = plr.Character.Humanoid.BodyHeightScale.Value
- local bodyw = plr.Character.Humanoid.BodyWidthScale.Value
- local bodyd = plr.Character.Humanoid.BodyDepthScale.Value
- local heads = plr.Character.Humanoid.HeadScale.Value
- local nearplanez = workspace.CurrentCamera.NearPlaneZ
- local remote = plr:WaitForChild("chickennuggetbuttscale")
- workspace.Gravity = 0
- function changeScale(scale)
- remote:FireServer(scale,{body,bodyw,bodyd,heads})
- workspace.CurrentCamera.CameraSubject = plr.Character.Head--workspace:WaitForChild('ViewPart')
- local density = .3*500
- local friction = 100
- local elasticity = 0
- local frictionWeight = 10
- local elasticityWeight = 0
- -- Construct new PhysicalProperties and set
- local physProperties = PhysicalProperties.new(density, friction, elasticity, frictionWeight, elasticityWeight)
- for i,part in pairs(plr.Character:GetDescendants()) do
- if part:IsA("BasePart") and part.Name ~= "Head" then
- part.CustomPhysicalProperties = physProperties
- end
- end
- plr.Character.Humanoid.WalkSpeed = 16*tonumber(scale)
- plr.Character.Humanoid.JumpPower = 50*tonumber(scale)
- plr.Character.Animate.ScaleDampeningPercent.Value = 1
- local bf = plr.Character.HumanoidRootPart:FindFirstChild("BodyForce")
- if bf == nil then
- bf = Instance.new("BodyForce",plr.Character.HumanoidRootPart)
- end
- bf.Force = Vector3.new(0,(-350*500)*((tonumber(scale))^3.9),0)
- wait()
- wait()
- end
- wait()
- changeScale(1)
- plr.Chatted:Connect(function(msg)
- local split = string.split(msg," ")
- if string.lower(split[1]) == "/e" and string.lower(split[2]) == "scale" then
- if tonumber(split[3]) ~= nil then
- changeScale(tonumber(split[3])-0.01)
- wait(.1)
- changeScale(tonumber(split[3]))
- end
- end
- end)]],owner.PlayerGui)
- NLS([[local player = game.Players.LocalPlayer
- local bin = Instance.new("HopperBin",player.Backpack)
- bin.Name = "Fly"
- script.Parent = bin
- local char = player.Character
- local torso = char:FindFirstChild("HumanoidRootPart")
- local seleted = false
- local pos, gyro;
- local UserInputService = game:GetService("UserInputService")
- bin.Selected:connect(function(mouse)
- selected = true
- pos = Instance.new("BodyPosition", torso)
- pos.maxForce = Vector3.new(1,1,1) * 1e99
- pos.position = torso.Position
- gyro = Instance.new("BodyGyro", torso)
- gyro.maxTorque = Vector3.new(1,1,1) * 1e99
- local angle = CFrame.new()
- touchstart = UserInputService.TouchStarted:connect(function()
- button_up = false
- angle = CFrame.Angles(-math.rad(70),0,0)
- coroutine.resume(coroutine.create(function()
- while not button_up do
- pos.position = pos.position + (mouse.Hit.p - torso.Position).unit * (10*char.Head.Size.Y)
- wait()
- end
- end))
- end)
- touchend = UserInputService.TouchEnded:connect(function()
- button_up = true
- angle = CFrame.new()
- end)
- mouse.Button1Down:connect(function()
- local button_up = false
- angle = CFrame.Angles(-math.rad(70),0,0)
- coroutine.resume(coroutine.create(function()
- while not button_up do
- pos.position = pos.position + (mouse.Hit.p - torso.Position).unit * (10*char.Head.Size.Y)
- wait()
- end
- end))
- mouse.Button1Up:wait()
- button_up = true
- angle = CFrame.new()
- end)
- while selected do
- gyro.cframe = CFrame.new(torso.Position, mouse.Hit.p) * angle
- wait()
- end
- end)
- bin.Deselected:connect(function()
- selected = false
- touchstart:disconnect()
- touchend:Disconnect()
- pos:Destroy()
- gyro:Destroy()
- end)]],owner.Backpack)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement