Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Epik skeleton dancing F3X By ItsKittyyyGD
- local player = game.Players.LocalPlayer
- local char = player.Character or player.CharacterAdded:Wait()
- local tool
- for i, v in player:GetDescendants() do
- if v.Name == "SyncAPI" then
- tool = v.Parent
- end
- end
- for i, v in game.ReplicatedStorage:GetDescendants() do
- if v.Name == "SyncAPI" then
- tool = v.Parent
- end
- end
- local remote = tool.SyncAPI.ServerEndpoint
- local RunService = game:GetService("RunService")
- function _(args)
- remote:InvokeServer(unpack(args))
- end
- function CreatePart(cf, parent)
- local args = {
- [1] = "CreatePart",
- [2] = "Normal",
- [3] = cf,
- [4] = parent
- }
- _(args)
- end
- function SetAnchor(part, boolean)
- local args = {
- [1] = "SyncAnchor",
- [2] = {
- [1] = {
- ["Part"] = part,
- ["Anchored"] = boolean
- }
- }
- }
- _(args)
- end
- function AddMesh(part)
- local args = {
- [1] = "CreateMeshes",
- [2] = {
- [1] = {
- ["Part"] = part
- }
- }
- }
- _(args)
- end
- function SetMesh(part, meshid)
- local args = {
- [1] = "SyncMesh",
- [2] = {
- [1] = {
- ["Part"] = part,
- ["MeshId"] = "rbxassetid://" .. meshid
- }
- }
- }
- _(args)
- end
- function SetTexture(part, texid)
- local args = {
- [1] = "SyncMesh",
- [2] = {
- [1] = {
- ["Part"] = part,
- ["TextureId"] = texid
- }
- }
- }
- _(args)
- end
- function MeshResize(part, size)
- local args = {
- [1] = "SyncMesh",
- [2] = {
- [1] = {
- ["Part"] = part,
- ["Scale"] = size
- }
- }
- }
- _(args)
- end
- function SetTransparency(part, value)
- local args = {
- [1] = "SyncTransparency",
- [2] = {
- [1] = {
- ["Part"] = part,
- ["Transparency"] = value
- }
- }
- }
- _(args)
- end
- function DestroyPart(part)
- local args = {
- [1] = "Remove",
- [2] = {
- [1] = part
- }
- }
- _(args)
- end
- local images = {
- "http://www.roblox.com/asset/?id=169585459",
- "http://www.roblox.com/asset/?id=169585475",
- "http://www.roblox.com/asset/?id=169585485",
- "http://www.roblox.com/asset/?id=169585502",
- "http://www.roblox.com/asset/?id=169585515",
- "http://www.roblox.com/asset/?id=169585502",
- "http://www.roblox.com/asset/?id=169585485",
- "http://www.roblox.com/asset/?id=169585475"
- }
- local skyPart
- local skyLoop
- local frameTime = 1 / 10
- local lastUpdate = 0
- function CreateSky()
- local hrp = char:FindFirstChild("HumanoidRootPart")
- if not hrp then return end
- local cf = hrp.CFrame
- CreatePart(CFrame.new(cf.Position + Vector3.new(0, 6, 0)), workspace)
- for _, v in workspace:GetDescendants() do
- if v:IsA("BasePart") and v.CFrame.Position == cf.Position + Vector3.new(0, 6, 0) then
- skyPart = v
- SetAnchor(skyPart, true)
- AddMesh(skyPart)
- SetMesh(skyPart, "111891702759441")
- MeshResize(skyPart, Vector3.new(8000, 8000, 8000))
- SetTransparency(skyPart, 1)
- local index = 1
- local timeSinceLastChange = 0
- skyLoop = RunService.Heartbeat:Connect(function(deltaTime)
- if not skyPart then
- skyLoop:Disconnect()
- return
- end
- timeSinceLastChange = timeSinceLastChange + deltaTime
- if timeSinceLastChange >= 0.5 then -- задержка 1 секунда
- timeSinceLastChange = 0
- SetTransparency(skyPart, 0)
- SetTexture(skyPart, images[index])
- index = index % #images + 1
- end
- end)
- end
- end
- end
- function ResetSky()
- if skyPart then
- DestroyPart(skyPart)
- skyPart = nil
- end
- if skyLoop then
- skyLoop:Disconnect()
- skyLoop = nil
- end
- CreateSky()
- end
- player.CharacterAdded:Connect(function(newChar)
- char = newChar
- ResetSky()
- end)
- if char and char:FindFirstChild("Humanoid") then
- char:WaitForChild("Humanoid").Died:Connect(function()
- ResetSky()
- end)
- end
- CreateSky()
- -- Thank you very much for using my scripts, Blue2spooky,Bedshrine(NDLGEN).
Advertisement
Add Comment
Please, Sign In to add comment