Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Create = function(itemClass,tabl)
- local item = Instance.new(itemClass)
- for i,v in pairs(tabl) do
- local a,b = ypcall(function() return item[i] end)
- if a then
- item[i] = tabl[i]
- end
- end
- return item
- end
- function runDummyScript(f,scri)
- local oldenv = getfenv(f)
- local newenv = setmetatable({}, {
- __index = function(_, k)
- if k:lower() == 'script' then
- return scri
- else
- return oldenv[k]
- end
- end
- })
- setfenv(f, newenv)
- ypcall(function() f() end)
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "CompiledModel"
- o1 = Create("Tool",{
- ["Name"] = "LeopardBalloon",
- ["Parent"] = game.Players.LocalPlayer.Backpack,
- ["TextureId"] = "http://www.roblox.com/asset?id=174382920",
- })
- o2 = Create("Part",{
- ["Name"] = "Handle",
- ["Parent"] = o1,
- ["Position"] = Vector3.new(51.5326347, 7.96369696, 37.0017471),
- ["Rotation"] = Vector3.new(0.520872831, -13.3241835, -8.79623795),
- ["CFrame"] = CFrame.new(51.5326347, 7.96369696, 37.0017471, 0.961636603, 0.14880456, -0.23046048, -0.154985026, 0.987876952, -0.00884611066, 0.226350322, 0.0442246236, 0.973041415),
- ["Locked"] = true,
- ["FormFactor"] = Enum.FormFactor.Custom,
- ["Size"] = Vector3.new(1.5, 6.75, 1.5),
- ["BottomSurface"] = Enum.SurfaceType.Smooth,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- })
- o3 = Create("SpecialMesh",{
- ["Parent"] = o2,
- ["MeshId"] = "http://www.roblox.com/asset?id=174382881",
- ["Scale"] = Vector3.new(3.5, 3.5, 3.5),
- ["TextureId"] = "http://www.roblox.com/asset?id=174382946",
- ["MeshType"] = Enum.MeshType.FileMesh,
- })
- o5 = Create("Script",{
- ["Name"] = "BalloonScript",
- ["Parent"] = o1,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --Made by Luckymaxer
- Tool = script.Parent
- Handle = Tool:WaitForChild("Handle")
- Players = game:GetService("Players")
- Debris = game:GetService("Debris")
- Gravity = 196.2
- Floating = false
- ConnectedParts = {}
- Connections = {}
- Animations = { --Animations by Stickmasterluke
- Hold = {Animation = Tool:WaitForChild("Hold"), Speed = 1},
- Float1 = {Animation = Tool:WaitForChild("Float1"), Speed = 1},
- Float2 = {Animation = Tool:WaitForChild("Float2"), Speed = 0.85}
- }
- ClientControl = (Tool:FindFirstChild("ClientControl") or Instance.new("RemoteFunction"))
- ClientControl.Name = "ClientControl"
- ClientControl.Parent = Tool
- Grips = {
- Equipped = CFrame.new(-0.4, -0.5, -0.25, 1, 0, 0, 0, 0, -1, 0, 1, 0),
- Unequipped = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- }
- Tool.Enabled = true
- Tool.Grip = Grips.Unequipped
- for i, v in pairs(Handle:GetChildren()) do
- if v:IsA("BodyForce") then
- v:Destroy()
- end
- end
- function InvokeClient(Mode, Value)
- pcall(function()
- ClientControl:InvokeClient(Player, Mode, Value)
- end)
- end
- function CheckTable(Table, Instance)
- for i, v in pairs(Table) do
- if v == Instance then
- return true
- end
- end
- return false
- end
- function GetAllPartsConnected(BasePart)
- local PartsConnected = {}
- local function GetPartsConnected(BasePart)
- local ConnectedParts = BasePart:GetConnectedParts()
- if #ConnectedParts > 0 then
- if not CheckTable(PartsConnected, BasePart) then
- table.insert(PartsConnected, BasePart)
- for i, v in pairs(ConnectedParts) do
- GetPartsConnected(v)
- end
- end
- end
- end
- GetPartsConnected(BasePart)
- return PartsConnected
- end
- function ManageConnectedParts()
- for i, v in pairs(Connections) do
- if v then
- v:disconnect()
- end
- end
- Connections = {}
- ConnectedParts = GetAllPartsConnected(Character.PrimaryPart)
- for i, v in pairs(ConnectedParts) do
- local ChildAdded = v.ChildAdded:connect(function(Child)
- if Child == Handle then
- return
- end
- ManageConnectedParts()
- end)
- local ChildRemoved = v.ChildRemoved:connect(function()
- if Child == Handle then
- return
- end
- ManageConnectedParts()
- end)
- table.insert(Connections, ChildAdded)
- table.insert(Connections, ChildRemoved)
- end
- ManageForce(ConnectedParts)
- end
- function ManageForce(Parts)
- if BodyForce and BodyForce.Parent then
- BodyForce.force = Vector3.new(0, (GetTotalMass(Parts) * 1.05), 0)
- end
- end
- function GetTotalMass(Parent)
- local Mass = 0
- local function GetMass(Parent)
- for i, v in pairs(((type(Parent) == "table" and Parent) or Parent:GetChildren())) do
- if v:IsA("BasePart") then
- Mass = (Mass + (v:GetMass() * Gravity))
- end
- GetMass(v)
- end
- end
- GetMass(Parent)
- return Mass
- end
- function FreeFall(Falling)
- if not Equipped then
- return
- end
- if Falling then
- InvokeClient("PlayAnimation", Animations.Float2)
- else
- InvokeClient("PlayAnimation", Animations.Hold)
- end
- end
- function Equipped()
- Equipped = true
- Character = Tool.Parent
- Player = Players:GetPlayerFromCharacter(Character)
- Humanoid = Character:FindFirstChild("Humanoid")
- if not Player or not Humanoid or Humanoid.Health == 0 then
- return
- end
- Tool.Grip = Grips.Equipped
- InvokeClient("PlayAnimation", Animations.Hold)
- BodyForce = Instance.new("BodyForce")
- BodyForce.force = Vector3.new(0, 0, 0)
- BodyForce.Parent = Handle
- ManageConnectedParts()
- local HumanoidState = Humanoid:GetState()
- if HumanoidState == Enum.HumanoidStateType.Freefall then
- FreeFall(true)
- end
- if Equipped then
- HumanoidFalling = Humanoid.FreeFalling:connect(function(Falling)
- FreeFall(Falling)
- end)
- end
- end
- function Unequipped()
- Equipped = false
- Tool.Grip = Grips.Unequipped
- --InvokeClient(nil, "StopAnimation", nil)
- if BodyForce and BodyForce.Parent then
- BodyForce:Destroy()
- end
- if HumanoidFalling then
- HumanoidFalling:disconnect()
- end
- end
- Tool.Unequipped:connect(Unequipped)
- Tool.Equipped:connect(Equipped)
- end,o5)
- end))
- o6 = Create("Animation",{
- ["Name"] = "Hold",
- ["Parent"] = o1,
- ["AnimationId"] = "http://www.roblox.com/asset?id=148831127",
- })
- o7 = Create("Animation",{
- ["Name"] = "Float1",
- ["Parent"] = o1,
- ["AnimationId"] = "http://www.roblox.com/asset?id=148831003",
- })
- o8 = Create("Animation",{
- ["Name"] = "Float2",
- ["Parent"] = o1,
- ["AnimationId"] = "http://www.roblox.com/asset?id=148840371",
- })
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = workspace
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
- --Made by Luckymaxer
- Tool = script.Parent
- Handle = Tool:WaitForChild("Handle")
- Players = game:GetService("Players")
- ClientControl = Tool:WaitForChild("ClientControl")
- Equipped = false
- ClientControl.OnClientInvoke = (function(Mode, Value)
- if not Equipped or not Humanoid then
- return
- end
- if Mode == "PlayAnimation" then
- if CurrentAnimation then
- CurrentAnimation:Stop()
- end
- CurrentAnimation = Humanoid:LoadAnimation(Value.Animation)
- if CurrentAnimation then
- CurrentAnimation:Play(nil, nil, Value.Speed)
- end
- elseif Mode == "StopAnimation" then
- if CurrentAnimation then
- CurrentAnimation:Stop()
- end
- end
- end)
- function Equipped()
- Equipped = true
- Character = Tool.Parent
- Player = Players:GetPlayerFromCharacter(Character)
- Humanoid = Character:FindFirstChild("Humanoid")
- if not Player or not Humanoid or Humanoid.Health == 0 then
- return
- end
- end
- function Unequipped()
- Equipped = false
- if CurrentAnimation then
- CurrentAnimation:Stop()
- end
- end
- Tool.Unequipped:connect(Unequipped)
- Tool.Equipped:connect(Equipped)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement